Skip to content

Commit 40bec08

Browse files
authored
Merge branch 'dev' into add-appconfig-query
2 parents 278ad55 + ec9c177 commit 40bec08

File tree

165 files changed

+3805
-1304
lines changed

Some content is hidden

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

165 files changed

+3805
-1304
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
</>

0 commit comments

Comments
 (0)