Skip to content

Commit ac6eb29

Browse files
authored
Merge branch 'dev' into lost-password-feature
2 parents a8b2ece + e719522 commit ac6eb29

File tree

155 files changed

+3592
-1305
lines changed

Some content is hidden

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

155 files changed

+3592
-1305
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ client/node_modules/
99
client/packages/lowcoder-plugin-demo/.yarn/install-state.gz
1010
client/packages/lowcoder-plugin-demo/yarn.lock
1111
client/packages/lowcoder-plugin-demo/.yarn/cache/@types-node-npm-16.18.68-56f72825c0-094ae9ed80.zip
12+
application-dev.yml

client/packages/lowcoder-comps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "0.0.26",
3+
"version": "0.0.27",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

client/packages/lowcoder-comps/src/comps/chartComp/chartComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ ChartTmpComp = withViewFn(ChartTmpComp, (comp) => {
120120

121121
const handleOnMapScriptLoad = () => {
122122
setMapScriptLoaded(true);
123-
loadGoogleMapData();
123+
setTimeout(() => {
124+
loadGoogleMapData();
125+
})
124126
}
125127

126128
useEffect(() => {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const labelCss: any = css`
55
user-select: none;
66
77
font-size: 13px;
8-
color: #222222;
98
109
&:hover {
1110
cursor: default;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export const sectionNames = {
142142
validation: trans("prop.validation"),
143143
layout: trans("prop.layout"),
144144
style: trans("prop.style"),
145+
labelStyle:trans("prop.labelStyle"),
145146
data: trans("prop.data"),
146147
meetings : trans("prop.meetings"), // added by Falk Wolsky
147148
};

client/packages/lowcoder-design/src/i18n/design/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const en = {
2222
advanced: "Advanced",
2323
validation: "Validation",
2424
layout: "Layout",
25+
labelStyle:"Label Style",
2526
style: "Style",
2627
meetings : "Meeting Settings",
2728
data: "Data",

client/packages/lowcoder-design/src/i18n/design/locales/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const zh = {
2222
advanced: "高级",
2323
validation: "验证",
2424
layout: "布局",
25+
labelStyle:"标签样式",
2526
style: "样式",
2627
meetings: "会议",
2728
data: "数据",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export { ReactComponent as WidthIcon } from "./icon-width.svg";
290290
export { ReactComponent as ResponsiveLayoutCompIcon } from "./icon-responsive-layout-comp.svg";
291291
export { ReactComponent as TextSizeIcon } from "./remix/font-size-2.svg";
292292
export { ReactComponent as FontFamilyIcon } from "./remix/font-sans-serif.svg";
293-
export { ReactComponent as TextWeigthIcon } from "./remix/bold.svg";
293+
export { ReactComponent as TextWeightIcon } from "./remix/bold.svg";
294294
export { ReactComponent as BorderWidthIcon } from "./remix/expand-width-line.svg";
295295
export { ReactComponent as LeftInfoLine } from "./remix/information-line.svg";
296296
export { ReactComponent as LeftInfoFill } from "./remix/information-fill.svg";

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { styleControl } from "comps/controls/styleControl";
55
import {
66
InputLikeStyle,
77
InputLikeStyleType,
8+
LabelStyle,
89
} from "comps/controls/styleControlConstants";
910
import {
1011
NameConfig,
@@ -73,6 +74,7 @@ const childrenMap = {
7374
viewRef: RefControl<InputRef>,
7475
allowClear: BoolControl.DEFAULT_TRUE,
7576
style: styleControl(InputLikeStyle),
77+
labelStyle:styleControl(LabelStyle),
7678
prefixIcon: IconControl,
7779
suffixIcon: IconControl,
7880
items: jsonControl(convertAutoCompleteData, autoCompleteDate),
@@ -276,8 +278,9 @@ let AutoCompleteCompBase = (function () {
276278
</ConfigProvider>
277279
</>
278280
),
279-
// style: props.style,
280-
// ...validateState,
281+
style: props.style,
282+
labelStyle:props.labelStyle,
283+
...validateState,
281284
});
282285
})
283286
.setPropertyViewFn((children) => {
@@ -335,6 +338,9 @@ let AutoCompleteCompBase = (function () {
335338
<Section name={sectionNames.style}>
336339
{children.style.getPropertyView()}
337340
</Section>
341+
<Section name={sectionNames.labelStyle}>
342+
{children.labelStyle.getPropertyView()}
343+
</Section>
338344
</>
339345
);
340346
})

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

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { UICompBuilder, withDefault } from "../../generators";
2020
import { CommonNameConfig, depsConfig, withExposingConfigs } from "../../generators/withExposing";
2121
import { formDataChildren, FormDataPropertyView } from "../formComp/formDataConstants";
2222
import { styleControl } from "comps/controls/styleControl";
23-
import { DateTimeStyle, DateTimeStyleType } from "comps/controls/styleControlConstants";
23+
import { DateTimeStyle, DateTimeStyleType, LabelStyle } from "comps/controls/styleControlConstants";
2424
import { withMethodExposing } from "../../generators/withMethodExposing";
2525
import {
2626
disabledPropertyView,
@@ -72,6 +72,7 @@ const commonChildren = {
7272
minuteStep: RangeControl.closed(1, 60, 1),
7373
secondStep: RangeControl.closed(1, 60, 1),
7474
style: styleControl(DateTimeStyle),
75+
labelStyle: styleControl(LabelStyle.filter((style) => ['accent', 'validate'].includes(style.name) === false)),
7576
suffixIcon: withDefault(IconControl, "/icon:regular/calendar"),
7677
...validationChildren,
7778
viewRef: RefControl<CommonPickerMethods>,
@@ -159,12 +160,13 @@ export type DateCompViewProps = Pick<
159160

160161
export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
161162
let time = dayjs(null);
162-
if(props.value.value !== '') {
163+
if (props.value.value !== '') {
163164
time = dayjs(props.value.value, DateParser);
164165
}
165166
return props.label({
166167
required: props.required,
167168
style: props.style,
169+
labelStyle:props.labelStyle,
168170
children: (
169171
<DateUIView
170172
viewRef={props.viewRef}
@@ -212,11 +214,11 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
212214

213215
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
214216
<><Section name={sectionNames.validation}>
215-
{requiredPropertyView(children)}
216-
{dateValidationFields(children)}
217-
{timeValidationFields(children)}
218-
{children.customRule.propertyView({})}
219-
</Section>
217+
{requiredPropertyView(children)}
218+
{dateValidationFields(children)}
219+
{timeValidationFields(children)}
220+
{children.customRule.propertyView({})}
221+
</Section>
220222
<Section name={sectionNames.interaction}>
221223
{children.onEvent.getPropertyView()}
222224
{disabledPropertyView(children)}
@@ -234,19 +236,24 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
234236
{children.placeholder.propertyView({ label: trans("date.placeholderText") })}
235237
</Section>
236238
)}
237-
239+
238240
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
239-
<><Section name={sectionNames.advanced}>
241+
<><Section name={sectionNames.advanced}>
240242
{timeFields(children, isMobile)}
241243
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
242244
</Section></>
243245
)}
244246
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && !isMobile && commonAdvanceSection(children)}
245247

246248
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
247-
<Section name={sectionNames.style}>
248-
{children.style.getPropertyView()}
249-
</Section>
249+
<>
250+
<Section name={sectionNames.style}>
251+
{children.style.getPropertyView()}
252+
</Section>
253+
<Section name={sectionNames.labelStyle}>
254+
{children.labelStyle.getPropertyView()}
255+
</Section>
256+
</>
250257
)}
251258
</>
252259
);
@@ -264,10 +271,10 @@ export const dateRangeControl = (function () {
264271
return new UICompBuilder(childrenMap, (props) => {
265272
let start = dayjs(null);
266273
let end = dayjs(null);
267-
if(props.start.value !== '') {
274+
if (props.start.value !== '') {
268275
start = dayjs(props.start.value, DateParser);
269276
}
270-
if(props.end.value !== '') {
277+
if (props.end.value !== '') {
271278
end = dayjs(props.end.value, DateParser);
272279
}
273280

@@ -310,12 +317,13 @@ export const dateRangeControl = (function () {
310317
return props.label({
311318
required: props.required,
312319
style: props.style,
320+
labelStyle:props.labelStyle,
313321
children: children,
314322
...(startResult.validateStatus !== "success"
315323
? startResult
316324
: endResult.validateStatus !== "success"
317-
? endResult
318-
: startResult),
325+
? endResult
326+
: startResult),
319327
});
320328
})
321329
.setPropertyViewFn((children) => {
@@ -337,11 +345,11 @@ export const dateRangeControl = (function () {
337345

338346
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
339347
<><Section name={sectionNames.validation}>
340-
{requiredPropertyView(children)}
341-
{dateValidationFields(children)}
342-
{timeValidationFields(children)}
343-
{children.customRule.propertyView({})}
344-
</Section>
348+
{requiredPropertyView(children)}
349+
{dateValidationFields(children)}
350+
{timeValidationFields(children)}
351+
{children.customRule.propertyView({})}
352+
</Section>
345353
<Section name={sectionNames.interaction}>
346354
{children.onEvent.getPropertyView()}
347355
{disabledPropertyView(children)}
@@ -358,7 +366,7 @@ export const dateRangeControl = (function () {
358366
{children.placeholder.propertyView({ label: trans("date.placeholderText") })}
359367
</Section>
360368
)}
361-
369+
362370
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
363371
<><Section name={sectionNames.advanced}>
364372
{timeFields(children, isMobile)}
@@ -368,9 +376,14 @@ export const dateRangeControl = (function () {
368376
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && commonAdvanceSection(children)}
369377

370378
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
371-
<Section name={sectionNames.style}>
372-
{children.style.getPropertyView()}
373-
</Section>
379+
<>
380+
<Section name={sectionNames.style}>
381+
{children.style.getPropertyView()}
382+
</Section>
383+
<Section name={sectionNames.labelStyle}>
384+
{children.labelStyle.getPropertyView()}
385+
</Section>
386+
</>
374387
)}
375388

376389
</>

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { formDataChildren, FormDataPropertyView } from "../formComp/formDataCons
3030
import { withMethodExposing, refMethods } from "../../generators/withMethodExposing";
3131
import { RefControl } from "../../controls/refControl";
3232
import { styleControl } from "comps/controls/styleControl";
33-
import { InputLikeStyle, InputLikeStyleType, heightCalculator, widthCalculator } from "comps/controls/styleControlConstants";
33+
import { InputLikeStyle, InputLikeStyleType, LabelStyle, heightCalculator, widthCalculator } from "comps/controls/styleControlConstants";
3434
import {
3535
disabledPropertyView,
3636
hiddenPropertyView,
@@ -52,6 +52,8 @@ import {
5252

5353
import { useContext } from "react";
5454
import { EditorContext } from "comps/editorState";
55+
import { migrateOldData } from "comps/generators/simpleGenerators";
56+
import { fixOldInputCompData } from "../textInputComp/textInputConstants";
5557

5658
const getStyle = (style: InputLikeStyleType) => {
5759
return css`
@@ -256,6 +258,7 @@ const childrenMap = {
256258
onEvent: InputEventHandlerControl,
257259
viewRef: RefControl<HTMLInputElement>,
258260
style: styleControl(InputLikeStyle),
261+
labelStyle:styleControl(LabelStyle),
259262
prefixIcon: IconControl,
260263

261264
// validation
@@ -372,12 +375,13 @@ const CustomInputNumber = (props: RecordConstructorToView<typeof childrenMap>) =
372375
);
373376
};
374377

375-
const NumberInputTmpComp = (function () {
378+
let NumberInputTmpComp = (function () {
376379
return new UICompBuilder(childrenMap, (props) => {
377380
return props.label({
378381
required: props.required,
379382
children: <CustomInputNumber {...props} />,
380383
style: props.style,
384+
labelStyle:props.labelStyle,
381385
...validate(props),
382386
});
383387
})
@@ -425,15 +429,22 @@ const NumberInputTmpComp = (function () {
425429
)}
426430

427431
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
432+
<>
428433
<Section name={sectionNames.style}>
429434
{children.style.getPropertyView()}
430435
</Section>
436+
<Section name={sectionNames.labelStyle}>
437+
{children.labelStyle.getPropertyView()}
438+
</Section>
439+
</>
431440
)}
432441
</>
433442
))
434443
.build();
435444
})();
436445

446+
NumberInputTmpComp = migrateOldData(NumberInputTmpComp, fixOldInputCompData);
447+
437448
const NumberInputTmp2Comp = withMethodExposing(
438449
NumberInputTmpComp,
439450
refMethods([

client/packages/lowcoder/src/comps/comps/numberInputComp/rangeSliderComp.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const RangeSliderBasicComp = (function () {
1515
return new UICompBuilder(childrenMap, (props) => {
1616
return props.label({
1717
style: props.style,
18+
labelStyle: props.labelStyle,
1819
children: (
1920
<SliderWrapper
2021
onMouseDown={(e: any) => {
@@ -28,7 +29,7 @@ const RangeSliderBasicComp = (function () {
2829
range={true}
2930
value={[props.start.value, props.end.value]}
3031
$style={props.style}
31-
style={{margin: 0}}
32+
style={{ margin: 0 }}
3233
onChange={([start, end]) => {
3334
props.start.onChange(start);
3435
props.end.onChange(end);

client/packages/lowcoder/src/comps/comps/numberInputComp/sliderComp.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const SliderBasicComp = (function () {
1919
return new UICompBuilder(childrenMap, (props) => {
2020
return props.label({
2121
style: props.style,
22+
labelStyle:props.labelStyle,
2223
children: (
2324
<SliderWrapper
2425
onMouseDown={(e: any) => {

client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ChangeEventHandlerControl } from "../../controls/eventHandlerControl";
55
import { Section, sectionNames } from "lowcoder-design";
66
import { RecordConstructorToComp } from "lowcoder-core";
77
import { styleControl } from "comps/controls/styleControl";
8-
import { SliderStyle, SliderStyleType } from "comps/controls/styleControlConstants";
8+
import { LabelStyle, SliderStyle, SliderStyleType } from "comps/controls/styleControlConstants";
99
import styled, { css } from "styled-components";
1010
import { default as Slider } from "antd/es/slider";
1111
import { darkenColor, fadeColor } from "lowcoder-design";
@@ -30,7 +30,7 @@ const getStyle = (style: SliderStyleType) => {
3030
}
3131
.ant-slider-handle {
3232
background-color: ${style.thumb};
33-
border-color: ${style.thumbBoder};
33+
border-color: ${style.thumbBorder};
3434
}
3535
}
3636
&:hover {
@@ -39,7 +39,7 @@ const getStyle = (style: SliderStyleType) => {
3939
}
4040
}
4141
.ant-slider-handle:focus {
42-
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBoder, 0.08), 0.12)};
42+
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBorder, 0.08), 0.12)};
4343
}
4444
}
4545
`;
@@ -67,6 +67,7 @@ export const SliderChildren = {
6767
disabled: BoolCodeControl,
6868
onEvent: ChangeEventHandlerControl,
6969
style: styleControl(SliderStyle),
70+
labelStyle:styleControl(LabelStyle.filter((style)=> ['accent','validate'].includes(style.name) === false)),
7071
prefixIcon: IconControl,
7172
suffixIcon: IconControl,
7273
};
@@ -96,6 +97,9 @@ export const SliderPropertyView = (
9697
<Section name={sectionNames.style}>
9798
{children.style.getPropertyView()}
9899
</Section>
100+
<Section name={sectionNames.labelStyle}>
101+
{children.labelStyle.getPropertyView()}
102+
</Section>
99103
</>
100104
)}
101105
</>

0 commit comments

Comments
 (0)