Skip to content

Commit 6ba6bb5

Browse files
authored
Merge branch 'lowcoder-org:main' into main
2 parents 3f04247 + 44a7c5e commit 6ba6bb5

File tree

83 files changed

+1287
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1287
-236
lines changed

client/packages/lowcoder-design/src/components/customSelect.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,29 @@ const SelectWrapper = styled.div<{ border?: boolean }>`
7171
}
7272
`;
7373

74-
export type CustomSelectProps = {
74+
export interface CustomSelectProps extends AntdSelectProps {
7575
children?: JSX.Element | React.ReactNode;
76-
innerRef?: React.Ref<HTMLDivElement> | undefined;
7776
border?: boolean;
7877
};
7978

80-
function CustomSelect(props: CustomSelectProps & AntdSelectProps) {
79+
interface CustomSelectInterface extends React.ForwardRefExoticComponent<
80+
CustomSelectProps & React.RefAttributes<HTMLDivElement>
81+
> {
82+
Option: any;
83+
}
84+
const CustomSelect = React.forwardRef<HTMLDivElement, CustomSelectProps>((
85+
props,
86+
ref,
87+
) => {
8188
const {
8289
children,
83-
innerRef,
8490
className,
8591
border,
8692
popupClassName = "custom-ant-select-dropdown",
8793
...restProps
8894
} = props;
8995
return (
90-
<SelectWrapper className={className} ref={innerRef} border={border}>
96+
<SelectWrapper className={className} ref={ref} border={border}>
9197
<AntdSelect
9298
popupClassName={popupClassName}
9399
popupMatchSelectWidth={false}
@@ -96,9 +102,10 @@ function CustomSelect(props: CustomSelectProps & AntdSelectProps) {
96102
>
97103
{children}
98104
</AntdSelect>
105+
<div></div>
99106
</SelectWrapper>
100107
);
101-
}
108+
}) as CustomSelectInterface;
102109

103110
CustomSelect.Option = AntdSelect.Option;
104111
export { CustomSelect };
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

client/packages/lowcoder-design/src/icons/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,5 @@ export { ReactComponent as TimeLineIcon } from "icons/icon-timeline-comp.svg"
291291
export { ReactComponent as LottieIcon } from "icons/icon-lottie.svg";
292292
export { ReactComponent as MentionIcon } from "icons/icon-mention-comp.svg";
293293
export { ReactComponent as AutoCompleteCompIcon } from "icons/icon-autocomplete-comp.svg";
294+
export { ReactComponent as WidthIcon } from "icons/icon-width.svg";
295+
export { ReactComponent as ResponsiveLayoutCompIcon } from "icons/icon-responsive-layout-comp.svg";

client/packages/lowcoder-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "0.0.41",
3+
"version": "2.1.0",
44
"type": "module",
55
"files": [
66
"src",

client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const PermissionSelector = (props: {
328328
<PermissionSelectWrapper>
329329
<AddPermissionsSelect
330330
open
331-
innerRef={selectRef}
331+
ref={selectRef}
332332
placeholder={trans("home.addPermissionPlaceholder")}
333333
mode="multiple"
334334
getPopupContainer={() => document.getElementById("add-app-user-permission-dropdown")!}

client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
booleanExposingStateControl,
4545
} from "comps/controls/codeStateControl";
4646

47-
import { getMomentLocale } from "i18n/momentLocale";
47+
import { getDayJSLocale } from "i18n/dayjsLocale";
4848
import {
4949
autoCompleteDate,
5050
itemsDataTooltip,
@@ -151,7 +151,7 @@ let AutoCompleteCompBase = (function () {
151151
const [validateState, setvalidateState] = useState({});
152152

153153
// 是否中文环境
154-
const [chineseEnv, setChineseEnv] = useState(getMomentLocale() === "zh-cn");
154+
const [chineseEnv, setChineseEnv] = useState(getDayJSLocale() === "zh-cn");
155155

156156
useEffect(() => {
157157
setsearchtext(props.value.value);
@@ -346,11 +346,11 @@ let AutoCompleteCompBase = (function () {
346346
tooltip: itemsDataTooltip,
347347
placeholder: "[]",
348348
})}
349-
{getMomentLocale() === "zh-cn" &&
349+
{getDayJSLocale() === "zh-cn" &&
350350
children.searchFirstPY.propertyView({
351351
label: trans("autoComplete.searchFirstPY"),
352352
})}
353-
{getMomentLocale() === "zh-cn" &&
353+
{getDayJSLocale() === "zh-cn" &&
354354
children.searchCompletePY.propertyView({
355355
label: trans("autoComplete.searchCompletePY"),
356356
})}

client/packages/lowcoder/src/comps/comps/formComp/generate/comp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ const multiSelectComps: CompConfig[] = [
8888
const dateComp: CompConfig = {
8989
type: "date",
9090
};
91-
// TODO: RAHEEL
91+
9292
function dateTimeToTimestamp(compName: string) {
93-
return "moment(" + compName + ".value || 0).valueOf()";
93+
return "dayjs(" + compName + ".value || 0).valueOf()";
9494
}
9595
function dateTimeComp(toTimestamp?: boolean): CompConfig {
9696
return {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ResponsiveLayoutComp } from "./responsiveLayout";

0 commit comments

Comments
 (0)