Skip to content

Commit 5cdf061

Browse files
authored
Merge pull request #1406 from lowcoder-org/dev
Dev -> Main v2.5.2
2 parents afb0891 + 444ca54 commit 5cdf061

File tree

168 files changed

+72841
-1605
lines changed

Some content is hidden

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

168 files changed

+72841
-1605
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ application-dev-localhost.yaml
1717
.vscode/launch.json
1818
server/api-service/lowcoder-server/src/main/resources/application-local-dev.yaml
1919
translations/locales/node_modules/
20-
.vscode/settings.json
2120
server/api-service/lowcoder-server/src/main/resources/application-local-dev-ee.yaml

app.json

+131
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,137 @@
3939
"LOWCODER_REDIS_URL": {
4040
"description": "Your Redis Database URL.",
4141
"required": false
42+
},
43+
"LOWCODER_MAX_REQUEST_SIZE": {
44+
"description": "Lowcoder max request size",
45+
"value": "20m",
46+
"required": false
47+
},
48+
"LOWCODER_MAX_QUERY_TIMEOUT": {
49+
"description": "Lowcoder max query timeout (in seconds)",
50+
"value": "120",
51+
"required": false
52+
},
53+
"LOWCODER_DEFAULT_QUERY_TIMEOUT": {
54+
"description": "Lowcoder default query timeout (in seconds)",
55+
"value": "10",
56+
"required": false
57+
},
58+
"LOWCODER_API_RATE_LIMIT": {
59+
"description": "Number of max Request per Second",
60+
"value": "100",
61+
"required": false
62+
},
63+
"LOWCODER_API_SERVICE_URL": {
64+
"description": "Lowcoder API service URL",
65+
"value": "http://localhost:8080",
66+
"required": false
67+
},
68+
"LOWCODER_NODE_SERVICE_URL": {
69+
"description": "Lowcoder Node service (js executor) URL",
70+
"value": "http://localhost:6060",
71+
"required": false
72+
},
73+
"LOWCODER_MAX_ORGS_PER_USER": {
74+
"description": "Default maximum organizations per user",
75+
"value": "100",
76+
"required": false
77+
},
78+
"LOWCODER_MAX_MEMBERS_PER_ORG": {
79+
"description": "Default maximum members per organization",
80+
"value": "1000",
81+
"required": false
82+
},
83+
"LOWCODER_MAX_GROUPS_PER_ORG": {
84+
"description": "Default maximum groups per organization",
85+
"value": "100",
86+
"required": false
87+
},
88+
"LOWCODER_MAX_APPS_PER_ORG": {
89+
"description": "Default maximum applications per organization",
90+
"value": "1000",
91+
"required": false
92+
},
93+
"LOWCODER_MAX_DEVELOPERS": {
94+
"description": "Default maximum developers",
95+
"value": "100",
96+
"required": false
97+
},
98+
"LOWCODER_WORKSPACE_MODE": {
99+
"description": "SAAS to activate, ENTERPRISE to switch off - Workspaces",
100+
"value": "SAAS",
101+
"required": false
102+
},
103+
"LOWCODER_EMAIL_SIGNUP_ENABLED": {
104+
"description": "Control if users create their own Workspace automatic when Sign Up",
105+
"value": "true",
106+
"required": false
107+
},
108+
"LOWCODER_CREATE_WORKSPACE_ON_SIGNUP": {
109+
"description": "IF LOWCODER_WORKSPACE_MODE = SAAS, controls if a own workspace is created for the user after sign up",
110+
"value": "true",
111+
"required": false
112+
},
113+
"LOWCODER_MARKETPLACE_PRIVATE_MODE": {
114+
"description": "Control if not to show Apps on the local Marketplace to anonymous users",
115+
"value": "true",
116+
"required": false
117+
},
118+
"LOWCODER_SUPERUSER_USERNAME": {
119+
"description": "Username of the Super-User of an Lowcoder Installation",
120+
"value": "admin@localhost",
121+
"required": false
122+
},
123+
"LOWCODER_SUPERUSER_PASSWORD": {
124+
"description": "Password of the Super-User, if not present or empty, it will be generated",
125+
"value": "`generated and printed into log file",
126+
"required": false
127+
},
128+
"LOWCODER_API_KEY_SECRET": {
129+
"description": "String to encrypt/sign API Keys that users may create",
130+
"required": false
131+
},
132+
"LOWCODER_ADMIN_SMTP_HOST": {
133+
"description": "SMTP Hostname of your Mail Relay Server",
134+
"required": false
135+
},
136+
"LOWCODER_ADMIN_SMTP_PORT": {
137+
"description": "Port number for the SMTP service",
138+
"value": "587",
139+
"required": false
140+
},
141+
"LOWCODER_ADMIN_SMTP_USERNAME": {
142+
"description": "Username for SMTP authentication",
143+
"required": false
144+
},
145+
"LOWCODER_ADMIN_SMTP_PASSWORD": {
146+
"description": "Password for SMTP authentication",
147+
"required": false
148+
},
149+
"LOWCODER_ADMIN_SMTP_AUTH": {
150+
"description": "Enable SMTP authentication",
151+
"value": "true",
152+
"required": false
153+
},
154+
"LOWCODER_ADMIN_SMTP_SSL_ENABLED": {
155+
"description": "Enable SSL encryption",
156+
"value": "false",
157+
"required": false
158+
},
159+
"LOWCODER_ADMIN_SMTP_STARTTLS_ENABLED": {
160+
"description": "Enable STARTTLS encryption",
161+
"value": "true",
162+
"required": false
163+
},
164+
"LOWCODER_ADMIN_SMTP_STARTTLS_REQUIRED": {
165+
"description": "Require STARTTLS encryption",
166+
"value": "true",
167+
"required": false
168+
},
169+
"LOWCODER_LOST_PASSWORD_EMAIL_SENDER": {
170+
"description": "\"from\" Email address of the password Reset Email Sender",
171+
"value": "[email protected]",
172+
"required": false
42173
}
43174
}
44175
}

client/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.1
1+
2.5.2

client/packages/lowcoder-comps/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "2.5.1",
3+
"version": "2.5.3",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

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

+57-16
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ let CalendarBasicComp = (function () {
306306
...(item.groupId ? { groupId: item.groupId } : {}),
307307
backgroundColor: item.backgroundColor,
308308
extendedProps: { // Ensure color is in extendedProps
309-
color: isValidColor(item.color || "") ? item.color : theme?.theme?.primary,
309+
color: isValidColor(item.color || "") ? item.color : theme?.theme?.primary,
310310
detail: item.detail,
311311
titleColor:item.titleColor,
312312
detailColor:item.detailColor,
@@ -324,22 +324,13 @@ let CalendarBasicComp = (function () {
324324
}, [currentEvents, theme])
325325

326326
useEffect(() => {
327+
if (initData.current) return;
328+
327329
const mapData: Record<string, number> = {};
328330
events?.forEach((item: any, index: number) => {
329331
mapData[`${item.id}`] = index;
330332
})
331333

332-
if (initData.current) {
333-
const difference = differenceWith(events, props.initialData, isEqual);
334-
const inserted = differenceBy(difference, Object.keys(initDataMap)?.map(id => ({ id })), 'id')
335-
const updated = filter(difference, obj => includes(Object.keys(initDataMap), String(obj.id)));
336-
const deleted = differenceBy(props.initialData, Object.keys(mapData)?.map(id => ({ id })), 'id')
337-
338-
comp.children?.comp.children?.updatedEvents.dispatchChangeValueAction(updated);
339-
comp.children?.comp.children?.insertedEvents.dispatchChangeValueAction(inserted);
340-
comp.children?.comp.children?.deletedEvents.dispatchChangeValueAction(deleted);
341-
}
342-
343334
if (!initData.current && events?.length && comp?.children?.comp?.children?.initialData) {
344335
setInitDataMap(mapData);
345336
comp?.children?.comp?.children?.initialData?.dispatch?.(
@@ -407,7 +398,54 @@ let CalendarBasicComp = (function () {
407398
}
408399
}, [slotLabelFormat, slotLabelFormatWeek, slotLabelFormatMonth]);
409400

410-
const handleEventDataChange = useCallback((data: Array<Record<string,any>>) => {
401+
const findUpdatedInsertedDeletedEvents = useCallback((data: Array<EventType>) => {
402+
if (!initData.current) return;
403+
404+
let eventsData: Array<Record<string, any>> = currentView == "resourceTimelineDay" || currentView == "resourceTimeGridDay"
405+
? data.filter((event: { resourceId?: string; }) => Boolean(event.resourceId))
406+
: data.filter((event: { resourceId?: string; }) => !Boolean(event.resourceId));
407+
408+
eventsData = eventsData.map((item) => ({
409+
title: item.label,
410+
id: item.id,
411+
start: dayjs(item.start, DateParser).format(),
412+
end: dayjs(item.end, DateParser).format(),
413+
allDay: item.allDay,
414+
...(item.resourceId ? { resourceId: item.resourceId } : {}),
415+
...(item.groupId ? { groupId: item.groupId } : {}),
416+
backgroundColor: item.backgroundColor,
417+
extendedProps: { // Ensure color is in extendedProps
418+
color: isValidColor(item.color || "") ? item.color : theme?.theme?.primary,
419+
detail: item.detail,
420+
titleColor:item.titleColor,
421+
detailColor:item.detailColor,
422+
titleFontWeight:item.titleFontWeight,
423+
titleFontStyle:item.titleFontStyle,
424+
detailFontWeight:item.detailFontWeight,
425+
detailFontStyle:item.detailFontStyle,
426+
animation:item?.animation,
427+
animationDelay:item?.animationDelay,
428+
animationDuration:item?.animationDuration,
429+
animationIterationCount:item?.animationIterationCount
430+
}
431+
}));
432+
433+
const mapData: Record<string, number> = {};
434+
eventsData?.forEach((item: any, index: number) => {
435+
mapData[`${item.id}`] = index;
436+
})
437+
438+
const difference = differenceWith(eventsData, props.initialData, isEqual);
439+
const inserted = differenceBy(difference, Object.keys(initDataMap)?.map(id => ({ id })), 'id')
440+
const updated = filter(difference, obj => includes(Object.keys(initDataMap), String(obj.id)));
441+
const deleted = differenceBy(props.initialData, Object.keys(mapData)?.map(id => ({ id })), 'id')
442+
443+
comp?.children?.comp?.children?.updatedEvents.dispatchChangeValueAction(updated);
444+
comp?.children?.comp?.children?.insertedEvents.dispatchChangeValueAction(inserted);
445+
comp?.children?.comp?.children?.deletedEvents.dispatchChangeValueAction(deleted);
446+
}, [initDataMap, currentView, props.initialData, initData.current]);
447+
448+
const handleEventDataChange = useCallback((data: Array<EventType>) => {
411449
comp?.children?.comp.children.events.children.manual.children.manual.dispatch(
412450
comp?.children?.comp.children.events.children.manual.children.manual.setChildrensAction(
413451
data
@@ -416,6 +454,9 @@ let CalendarBasicComp = (function () {
416454
comp?.children?.comp.children.events.children.mapData.children.data.dispatchChangeValueAction(
417455
JSON.stringify(data)
418456
);
457+
458+
findUpdatedInsertedDeletedEvents(data);
459+
419460
props.onEvent("change");
420461
}, [comp, props.onEvent]);
421462

@@ -955,9 +996,9 @@ let CalendarBasicComp = (function () {
955996
changeEvents.push(event);
956997
}
957998
});
958-
if (needChange) {
959-
props.onEvent("change");
960-
}
999+
// if (needChange) {
1000+
// props.onEvent("change");
1001+
// }
9611002
}}
9621003
eventDragStart={() => {
9631004
if (typeof props.onDropEvent === 'function') {

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ CandleStickChartTmpComp = withViewFn(CandleStickChartTmpComp, (comp) => {
168168
}}
169169
>
170170
<ReactECharts
171-
ref={(e) => (echartsCompRef.current = e)}
172-
style={{ height: "100%" }}
173-
notMerge
174-
lazyUpdate
175-
opts={{ locale: getEchartsLocale() }}
176-
option={option}
177-
theme={mode !== 'map' ? themeConfig : undefined}
178-
mode={mode}
179-
/>
171+
ref={(e) => (echartsCompRef.current = e)}
172+
style={{ height: "100%" }}
173+
notMerge
174+
lazyUpdate
175+
opts={{ locale: getEchartsLocale() }}
176+
option={option}
177+
theme={mode !== 'map' ? themeConfig : undefined}
178+
mode={mode}
179+
/>
180180
</ReactResizeDetector>
181181
);
182182
});

client/packages/lowcoder-comps/src/comps/candleStickChartComp/candleStickChartPropertyView.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ export function candleStickChartPropertyView(
3838
{children.onEvent.propertyView()}
3939
</Section>
4040
<Section name={sectionNames.style}>
41-
{children.style?.getPropertyView()}
41+
{children.style?.getPropertyView()}
4242
</Section>
4343
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
4444
</>
4545
);
46-
46+
4747
const getChatConfigByMode = (mode: string) => {
4848
switch(mode) {
4949
case "json":

0 commit comments

Comments
 (0)