Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bdf5a26

Browse files
Added suport for JSONForms through ANTd renderer
1 parent 91cde6a commit bdf5a26

File tree

25 files changed

+1576
-227
lines changed

25 files changed

+1576
-227
lines changed

‎client/package.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,25 @@
7272
"eslint-plugin-only-ascii@^0.0.0": "patch:eslint-plugin-only-ascii@npm%3A0.0.0#./.yarn/patches/eslint-plugin-only-ascii-npm-0.0.0-29e3417685.patch"
7373
},
7474
"dependencies": {
75+
"@emotion/react": "^11.14.0",
76+
"@emotion/styled": "^11.14.0",
77+
"@jsonforms/core": "3.5.1",
78+
"@jsonforms/material-renderers": "^3.5.1",
79+
"@jsonforms/react": "3.5.1",
7580
"@lottiefiles/react-lottie-player": "^3.5.3",
7681
"@remixicon/react": "^4.1.1",
82+
"@rjsf/antd": "^6.0.0-beta.10",
83+
"@rjsf/core": "^6.0.0-beta.10",
84+
"@rjsf/utils": "^6.0.0-beta.10",
85+
"@rjsf/validator-ajv8": "^6.0.0-beta.10",
7786
"@supabase/supabase-js": "^2.45.4",
7887
"@testing-library/react": "^14.1.2",
7988
"@testing-library/user-event": "^14.5.1",
8089
"@types/styled-components": "^5.1.34",
90+
"antd": "^5.25.3",
8191
"antd-mobile": "^5.34.0",
8292
"chalk": "4",
93+
"dayjs": "^1.11.13",
8394
"flag-icons": "^7.2.1",
8495
"number-precision": "^1.6.0",
8596
"react-countup": "^6.5.3",
@@ -88,6 +99,7 @@
8899
"resize-observer-polyfill": "^1.5.1",
89100
"rollup": "^4.22.5",
90101
"simplebar": "^6.2.5",
102+
"styled-components": "^6.1.18",
91103
"tui-image-editor": "^3.15.3"
92104
}
93105
}

‎client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
SlotLabelContentArg,
2929
ViewContentArg,
3030
} from "@fullcalendar/core";
31-
import { default as Form } from "antd/es/form";
31+
import { default as Form,FormProps } from "antd/es/form";
3232

3333
type Theme = typeof Theme;
3434
type EventModalStyleType = typeof EventModalStyleType;
@@ -727,7 +727,7 @@ export const Event = styled.div<{
727727
margin-left: 15px;
728728
white-space: pre-wrap;
729729
word-break: break-word;
730-
margin-top: 2px;
730+
margin-top: 2px;
731731
}
732732
733733
&.small {
@@ -761,10 +761,10 @@ export const Event = styled.div<{
761761
}
762762
&.past {
763763
background-color: ${(props) =>
764-
`rgba(${props?.$extendedProps?.color}, 0.3)`};
764+
`rgba(${props?.$extendedProps?.color}, 0.3)`};
765765
&::before {
766-
background-color: ${(props) => props?.$extendedProps?.color};
767-
opacity: 0.3;
766+
background-color: ${(props) => props?.$extendedProps?.color};
767+
opacity: 0.3;
768768
}
769769
&::before,
770770
.event-title,
@@ -776,9 +776,11 @@ export const Event = styled.div<{
776776
}
777777
`;
778778

779-
export const FormWrapper = styled(Form)<{
780-
$modalStyle?: EventModalStyleType
781-
}>`
779+
export const FormWrapper = styled(Form)<
780+
FormProps & {
781+
$modalStyle?: EventModalStyleType;
782+
}
783+
>`
782784
.ant-form-item-label {
783785
width: 125px;
784786
text-align: left;
@@ -787,12 +789,11 @@ export const FormWrapper = styled(Form)<{
787789
label:not(.ant-form-item-required) {
788790
margin-left: 2px;
789791
}
790-
label.ant-form-item-required{
792+
label.ant-form-item-required{
791793
margin-left: 2px;
792794
}
793795
label span {
794796
${UnderlineCss}
795-
796797
}
797798
}
798799
@@ -1117,12 +1118,12 @@ export const slotLabelFormat = [
11171118
{
11181119
hour: "2-digit",
11191120
minute: "2-digit",
1120-
},
1121+
},
11211122
] as FormatterInput[];
11221123

11231124
export const slotLabelFormatWeek = [
11241125
{ week: "short" },
1125-
{ hour: "2-digit" },
1126+
{ hour: "2-digit" },
11261127
] as FormatterInput[];
11271128

11281129
export const slotLabelFormatMonth = [

‎client/packages/lowcoder-design/src/components/Dropdown.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export const DropdownContainer = styled.div<{ $placement: ControlPlacement }>`
1818
width: ${(props) =>
1919
props.$placement === "right"
2020
? "calc(100% - 96px)"
21-
: "bottom"
22-
? "calc(100% - 112px)"
23-
: "calc(100% - 136px"};
21+
: props.$placement==="bottom"
22+
? "calc(100% - 112px)"
23+
: "calc(100% - 136px)"};
2424
flex-grow: 1;
2525
2626
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
@@ -124,7 +124,8 @@ const FlexDiv = styled.div`
124124

125125
const LabelWrapper = styled.div<{ $placement: ControlPlacement }>`
126126
flex-shrink: 0;
127-
width: ${(props) => (props.$placement === "right" ? "96px" : "bottom" ? "112px" : "136px")};
127+
width: ${(props) =>
128+
props.$placement === "right" ? "96px" : props.$placement === "bottom" ? "112px" : "136px"};
128129
`;
129130

130131
export type OptionType = {

‎client/packages/lowcoder-design/src/components/form.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { default as Form } from "antd/es/form";
2-
import { default as AntdFormItem, FormItemProps as AntdFormItemProps} from "antd/es/form/FormItem";
1+
import { default as Form,FormProps } from "antd/es/form";
2+
import { default as AntdFormItem, FormItemProps as AntdFormItemProps} from "antd/es/form/FormItem";
33
import { default as Input, InputProps } from "antd/es/input";
44
import { default as TextArea, TextAreaProps } from "antd/es/input/TextArea";
55
import { default as InputNumber, InputNumberProps } from "antd/es/input-number";
@@ -429,7 +429,7 @@ export const FormKeyValueItem = (props: FormItemProps) => (
429429
</FormItemContain>
430430
);
431431

432-
export const DatasourceForm = styled(Form)`
432+
export const DatasourceForm = styled(Form)<FormProps>`
433433
display: flex;
434434
flex-direction: column;
435435
gap: 8px;

‎client/packages/lowcoder/src/components/JSLibraryTree.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ const JSLibraryCollapse = styled(Collapse)<{ $mode: "row" | "column" }>`
134134
}
135135
136136
.lib-label-name {
137-
${EllipsisTextCss};
137+
${css`
138+
overflow: hidden;
139+
text-overflow: ellipsis;
140+
white-space: nowrap;
141+
`}
138142
}
139143
`;
140144

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /