Skip to content

Commit 1b7ae6e

Browse files
author
FalkWolsky
committed
Enablement of Comps, update for Language Settings
1 parent 15361ae commit 1b7ae6e

File tree

14 files changed

+3037
-2796
lines changed

14 files changed

+3037
-2796
lines changed

client/packages/lowcoder-comps/package.json

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "0.0.39",
3+
"version": "2.4.0",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {
@@ -38,152 +38,152 @@
3838
"name": "Agora Meeting Controller",
3939
"icon": "./icons/icon-comp-calendar.svg",
4040
"layoutInfo": {
41-
"w": 15,
42-
"h": 60
41+
"w": 1,
42+
"h": 1
4343
}
4444
},
4545
"meetingSharing": {
4646
"name": "Agora Meeting Sharing",
4747
"icon": "./icons/icon-comp-calendar.svg",
4848
"layoutInfo": {
49-
"w": 15,
50-
"h": 60
49+
"w": 6,
50+
"h": 40
5151
}
5252
},
5353
"meetingStream": {
5454
"name": "Video Stream",
5555
"icon": "./icons/icon-comp-calendar.svg",
5656
"layoutInfo": {
57-
"w": 15,
58-
"h": 60
57+
"w": 6,
58+
"h": 40
5959
}
6060
},
6161
"calendar": {
6262
"name": "Calendar",
6363
"icon": "./icons/icon-comp-calendar.svg",
6464
"layoutInfo": {
65-
"w": 15,
65+
"w": 19,
6666
"h": 60
6767
}
6868
},
6969
"chart": {
7070
"name": "Chart",
7171
"icon": "./icons/icon-chart.svg",
7272
"layoutInfo": {
73-
"w": 15,
73+
"w": 12,
7474
"h": 40
7575
}
7676
},
7777
"imageEditor": {
7878
"name": "Image Editor",
7979
"icon": "./icons/icon-chart.svg",
8080
"layoutInfo": {
81-
"w": 15,
81+
"w": 12,
8282
"h": 40
8383
}
8484
},
8585
"mermaid": {
8686
"name": "Mermaid",
8787
"icon": "./icons/mermaidchart.svg",
8888
"layoutInfo": {
89-
"w": 15,
89+
"w": 12,
9090
"h": 40
9191
}
9292
},
9393
"funnelChart": {
9494
"name": "Funnel Chart",
9595
"icon": "./icons/icon-chart.svg",
9696
"layoutInfo": {
97-
"w": 15,
97+
"w": 12,
9898
"h": 40
9999
}
100100
},
101101
"gaugeChart": {
102102
"name": "Gauge Chart",
103103
"icon": "./icons/icon-chart.svg",
104104
"layoutInfo": {
105-
"w": 15,
105+
"w": 12,
106106
"h": 40
107107
}
108108
},
109109
"sankeyChart": {
110110
"name": "Sankey Chart",
111111
"icon": "./icons/icon-chart.svg",
112112
"layoutInfo": {
113-
"w": 15,
113+
"w": 12,
114114
"h": 40
115115
}
116116
},
117117
"candleStickChart": {
118118
"name": "CandleStick Chart",
119119
"icon": "./icons/icon-chart.svg",
120120
"layoutInfo": {
121-
"w": 15,
121+
"w": 12,
122122
"h": 40
123123
}
124124
},
125125
"radarChart": {
126126
"name": "Radar Chart",
127127
"icon": "./icons/icon-chart.svg",
128128
"layoutInfo": {
129-
"w": 15,
129+
"w": 12,
130130
"h": 40
131131
}
132132
},
133133
"heatmapChart": {
134134
"name": "Heatmap Chart",
135135
"icon": "./icons/icon-chart.svg",
136136
"layoutInfo": {
137-
"w": 15,
137+
"w": 12,
138138
"h": 40
139139
}
140140
},
141141
"graphChart": {
142142
"name": "Graph Chart",
143143
"icon": "./icons/icon-chart.svg",
144144
"layoutInfo": {
145-
"w": 15,
145+
"w": 12,
146146
"h": 40
147147
}
148148
},
149149
"treeChart": {
150150
"name": "Tree Chart",
151151
"icon": "./icons/icon-chart.svg",
152152
"layoutInfo": {
153-
"w": 15,
153+
"w": 12,
154154
"h": 40
155155
}
156156
},
157157
"treemapChart": {
158158
"name": "Treemap Chart",
159159
"icon": "./icons/icon-chart.svg",
160160
"layoutInfo": {
161-
"w": 15,
161+
"w": 12,
162162
"h": 40
163163
}
164164
},
165165
"sunburstChart": {
166166
"name": "Sunburst Chart",
167167
"icon": "./icons/icon-chart.svg",
168168
"layoutInfo": {
169-
"w": 15,
169+
"w": 12,
170170
"h": 40
171171
}
172172
},
173173
"themeriverChart": {
174174
"name": "Themeriver Chart",
175175
"icon": "./icons/icon-chart.svg",
176176
"layoutInfo": {
177-
"w": 15,
177+
"w": 12,
178178
"h": 40
179179
}
180180
},
181-
"map": {
182-
"name": "Map",
181+
"chartsGeoMap": {
182+
"name": "chartsGeoMap",
183183
"icon": "./icons/icon-chart.svg",
184184
"layoutInfo": {
185-
"w": 15,
186-
"h": 40
185+
"w": 19,
186+
"h": 60
187187
}
188188
}
189189
}

client/packages/lowcoder-comps/src/comps/agoraMeetingComp/meetingControllerComp.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -864,16 +864,16 @@ let MTComp = (function () {
864864
]);
865865

866866
MeetingControllerComp = withExposingConfigs(MTComp, [
867-
new NameConfig("appId", trans("meeting.appid")),
868-
new NameConfig("localUser", trans("meeting.host")),
869-
new NameConfig("participants", trans("meeting.participants")),
870-
new NameConfig("meetingActive", trans("meeting.meetingActive")),
871-
new NameConfig("meetingName", trans("meeting.meetingName")),
872-
new NameConfig("localUserID", trans("meeting.localUserID")),
873-
new NameConfig("messages", trans("meeting.messages")),
874-
new NameConfig("rtmToken", trans("meeting.rtmToken")),
875-
new NameConfig("rtcToken", trans("meeting.rtcToken")),
876-
]);
867+
new NameConfig("appId", trans("meeting.appid")),
868+
new NameConfig("localUser", trans("meeting.host")),
869+
new NameConfig("participants", trans("meeting.participants")),
870+
new NameConfig("meetingActive", trans("meeting.meetingActive")),
871+
new NameConfig("meetingName", trans("meeting.meetingName")),
872+
new NameConfig("localUserID", trans("meeting.localUserID")),
873+
new NameConfig("messages", trans("meeting.messages")),
874+
new NameConfig("rtmToken", trans("meeting.rtmToken")),
875+
new NameConfig("rtcToken", trans("meeting.rtcToken")),
876+
]);
877877

878878
} else {
879879
console.error("ContainerCompBuilder for Meeting Comp is not available. Please ensure that Lowcoder SDK version v2.4 or higher is installed.");

client/packages/lowcoder-comps/src/comps/mapComp/mapComp.tsx renamed to client/packages/lowcoder-comps/src/comps/chartsGeoMapComp/chartsGeoMapComp.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ MapTmpComp = class extends MapTmpComp {
287287
}
288288
};
289289

290-
let MapComp = withExposingConfigs(MapTmpComp, [
290+
let ChartsGeoMapCompTMP = withExposingConfigs(MapTmpComp, [
291291
depsConfig({
292292
name: "selectedPoints",
293293
desc: trans("chart.selectedPointsDesc"),
@@ -313,7 +313,7 @@ let MapComp = withExposingConfigs(MapTmpComp, [
313313
new NameConfig("title", trans("chart.titleDesc")),
314314
]);
315315

316-
MapComp = withMethodExposing(MapComp, [
316+
export const ChartsGeoMapComp = withMethodExposing(ChartsGeoMapCompTMP, [
317317
{
318318
method: {
319319
name: "getMapInstance",
@@ -369,7 +369,7 @@ MapComp = withMethodExposing(MapComp, [
369369
},
370370
])
371371

372-
export const MapCompWithDefault = withDefault(MapComp, {
372+
/* export const MapCompWithDefault = withDefault(ChartsGeoMapComp, {
373373
xAxisKey: "date",
374374
series: [
375375
{
@@ -383,4 +383,4 @@ export const MapCompWithDefault = withDefault(MapComp, {
383383
columnName: "budget",
384384
},
385385
],
386-
});
386+
}); */

client/packages/lowcoder-comps/src/comps/gaugeChartComp/gaugeChartUtils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ export function getEchartsConfig(props: EchartsConfigProps, chartSize?: ChartSiz
154154
"max": props.max,
155155
"gap": props.gap,
156156
'detail': {
157-
"backgroundColor": props?.style?.background,
157+
"backgroundColor": props?.style?.background, "formatter": "{value}%"
158158
},
159159
"label": {
160160
"show": props.label,
161161
"position": props.echartsLabelConfig.top
162162
},
163-
"detail": {
163+
/*"detail": {
164164
"formatter": "{value}%"
165-
},
165+
}, */
166166
"data": props.echartsOption.data
167167
}
168168
]

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

-4
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,8 @@ export const en = {
245245
videoId: "Video Stream ID",
246246
audioStatus: "Audio Status",
247247
left: "Left",
248-
widthTooltip: "Pixel or Percentage, e.g. 520, 60%",
249-
heightTooltip: "Pixel, e.g. 378",
250248
openDrawerDesc: "Open Drawer",
251249
closeDrawerDesc: "Close Drawer",
252-
width: "Drawer Width",
253-
height: "Drawer Height",
254250
actionBtnDesc: "Action Button",
255251
broadCast: "Broadcast Messages",
256252
title: "Meeting Title",

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
export const zh = {
1+
import { en } from "./en";
2+
3+
export const zh: typeof en = {
4+
...en,
25
chart: {
6+
...en.chart,
37
delete: "删除",
48
data: "数据",
59
mode: "模式",
@@ -82,6 +86,7 @@ export const zh = {
8286
chartEventHandlers: "图表事件处理程序",
8387
},
8488
imageEditor: {
89+
...en.imageEditor,
8590
defaultSrc: "",
8691
save: "保存",
8792
saveDesc: "保存图像",
@@ -95,6 +100,7 @@ export const zh = {
95100
buttonTextDesc: "按钮文本",
96101
},
97102
calendar: {
103+
...en.calendar,
98104
events: "事件数据",
99105
resources: "资源数据",
100106
resourcesDefault: "客房",

client/packages/lowcoder-comps/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ChartCompWithDefault } from "./comps/chartComp/chartComp";
22
import { ImageEditorComp } from "./comps/imageEditorComp/index";
33
import { CalendarComp } from "./comps/calendarComp/calendarComp";
4-
import { MapCompWithDefault } from "comps/mapComp/mapComp";
4+
import { ChartsGeoMapComp } from "comps/chartsGeoMapComp/chartsGeoMapComp";
55
import { FunnelChartCompWithDefault } from "comps/funnelChartComp/funnelChartComp";
66
import { GaugeChartCompWithDefault } from "comps/gaugeChartComp/gaugeChartComp";
77
import { SankeyChartCompWithDefault } from "comps/sankeyChartComp/sankeyChartComp";
@@ -21,7 +21,7 @@ import { VideoSharingStreamComp } from "comps/agoraMeetingComp/videoSharingStrea
2121

2222
export default {
2323
chart: ChartCompWithDefault,
24-
map: MapCompWithDefault,
24+
chartsGeoMap: ChartsGeoMapComp,
2525
funnelChart: FunnelChartCompWithDefault,
2626
gaugeChart: GaugeChartCompWithDefault,
2727
sankeyChart: SankeyChartCompWithDefault,

client/packages/lowcoder-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"type": "module",
55
"files": [
66
"src",

0 commit comments

Comments
 (0)