@cloudbase/weda-ui 3.26.1 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.26.1",
3
+ "version": "3.27.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",
@@ -9,7 +9,8 @@
9
9
  "@cloudbase/lowcode-cli": ">=0.17.0"
10
10
  },
11
11
  "files": [
12
- "dist"
12
+ "dist",
13
+ "i18n/source/*"
13
14
  ],
14
15
  "sideEffects": [
15
16
  "**/*.{css,scss,less}",
@@ -74,7 +75,9 @@
74
75
  "sync-icon": "node tools/publish-icon/sync-icon.mjs",
75
76
  "deploy": "node scripts/deploy.mjs && npm run release",
76
77
  "release": "node scripts/release.mjs",
77
- "use-node18": "node scripts/use-node18.mjs && hash -r && node -v"
78
+ "scan": "tcb-i18n -c ./i18n/i18next-scanner.config.js",
79
+ "dict:push": "lingo push",
80
+ "dict:pull": "lingo pull"
78
81
  },
79
82
  "keywords": [
80
83
  "weda",
@@ -86,7 +89,7 @@
86
89
  "description": "腾讯云微搭低代码组件库模板",
87
90
  "dependencies": {
88
91
  "@antv/g6": "^4.8.5",
89
- "@cloudbase/weda-client": "^1.1.35",
92
+ "@cloudbase/weda-client": "^1.1.36",
90
93
  "@codemirror/autocomplete": "^6.16.0",
91
94
  "@codemirror/lang-javascript": "^6.2.2",
92
95
  "@codemirror/lang-json": "^6.0.1",
@@ -148,7 +151,7 @@
148
151
  "@babel/preset-env": "^7.22.15",
149
152
  "@babel/preset-react": "^7.22.15",
150
153
  "@babel/preset-typescript": "^7.22.15",
151
- "@cloudbase/cals": "^1.2.18",
154
+ "@cloudbase/cals": "^1.2.20",
152
155
  "@cloudbase/lowcode-cli": "^0.22.4",
153
156
  "@cloudbase/weda-cloud-sdk": "^1.0.107",
154
157
  "@commitlint/cli": "^16.0.2",
@@ -172,6 +175,7 @@
172
175
  "@swc/core": "1.3.37",
173
176
  "@swc/jest": "^0.2.24",
174
177
  "@tcwd/dev-tools": "^1.0.1",
178
+ "@tcwd/tcb-i18n": "^1.0.3",
175
179
  "@testing-library/jest-dom": "^5.16.4",
176
180
  "@testing-library/react": "^12.1.5",
177
181
  "@testing-library/react-hooks": "^8.0.1",
@@ -1,473 +0,0 @@
1
- {
2
- "$schema": "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json",
3
- "data": {
4
- "type": "object",
5
- "properties": {
6
- "dataSource": {
7
- "type": "object",
8
- "title": "数据源",
9
- "x-index": 10,
10
- "x-component": "chart-datasource-select",
11
- "x-helper-text": "方法的出入参需满足组件要求,[查看文档](https://cloud.tencent.com/document/product/1301/71197#.E7.BB.9F.E8.AE.A1.E5.8D.A1.E7.89.87)",
12
- "x-helper-text-color": "#E37318",
13
- "x-props": {
14
- "data-hidebind": true
15
- },
16
- "x-component-props": {
17
- "postChange": {
18
- "addOrUpdateComponentDataBinds": {
19
- "dataBind": {
20
- "propertyPath": "filterData",
21
- "bindDataPath": "[]",
22
- "type": "expression",
23
- "extra": {}
24
- }
25
- }
26
- },
27
- "docUrl": "https://cloud.tencent.com/document/product/1301/71197#.E7.BB.9F.E8.AE.A1.E5.8D.A1.E7.89.87",
28
- "paramsSchema": {
29
- "type": "object",
30
- "properties": {
31
- "outParams": {
32
- "type": "object",
33
- "properties": {
34
- "properties": {
35
- "type": "object",
36
- "properties": {
37
- "result": {
38
- "type": "object",
39
- "properties": {
40
- "type": {
41
- "const": "array"
42
- },
43
- "items": {
44
- "type": "object",
45
- "properties": {
46
- "type": {
47
- "const": "object"
48
- },
49
- "properties": {
50
- "type": "object",
51
- "properties": {
52
- "Name": {
53
- "type": "object",
54
- "properties": {
55
- "type": {
56
- "const": "string"
57
- }
58
- }
59
- },
60
- "Value": {
61
- "type": "object",
62
- "properties": {
63
- "type": {
64
- "const": "number"
65
- }
66
- }
67
- }
68
- },
69
- "required": ["Value"]
70
- }
71
- }
72
- }
73
- }
74
- }
75
- },
76
- "required": ["result"]
77
- }
78
- }
79
- }
80
- }
81
- }
82
- },
83
- "x-linkages": [
84
- {
85
- "type": "value:visible",
86
- "target": "*(filterData,field,operationType,isCountEmpty)",
87
- "condition": "{{ $self.value && $self.value.type === 'database' }}"
88
- },
89
- {
90
- "type": "value:schema",
91
- "target": "filterData",
92
- "schema": {
93
- "x-component-props": {
94
- "selectedDataSourceName": "{{ $self.value && $self.value.name }}"
95
- }
96
- }
97
- },
98
- {
99
- "type": "value:state",
100
- "target": "*(operationType,field,filterData)",
101
- "condition": "{{ $self.inputed }}",
102
- "state": {
103
- "value": ""
104
- }
105
- }
106
- ]
107
- },
108
- "filterData": {
109
- "title": "数据筛选",
110
- "x-index": 20,
111
- "x-category": "基础属性",
112
- "x-component": "condition-select",
113
- "x-component-props": {
114
- "dataSourceNamePropKey": "dataSource",
115
- "blackListConfig": {
116
- "type": ["object", "array"]
117
- },
118
- "customRelOptions": {
119
- "string": [
120
- {
121
- "text": "等于",
122
- "value": "eq"
123
- },
124
- {
125
- "text": "不等于",
126
- "value": "neq"
127
- },
128
- {
129
- "text": "包含",
130
- "value": "search"
131
- },
132
- {
133
- "text": "不包含",
134
- "value": "nsearch"
135
- }
136
- ],
137
- "boolean": [
138
- {
139
- "text": "等于",
140
- "value": "eq"
141
- }
142
- ],
143
- "keyVarType": [
144
- {
145
- "value": "eq",
146
- "text": "等于"
147
- },
148
- {
149
- "value": "neq",
150
- "text": "不等于"
151
- },
152
- {
153
- "value": "gt",
154
- "text": "大于"
155
- },
156
- {
157
- "value": "lt",
158
- "text": "小于"
159
- }
160
- ],
161
- "number": [
162
- {
163
- "text": "等于",
164
- "value": "eq",
165
- "type": "equal"
166
- },
167
- {
168
- "text": "不等于",
169
- "value": "neq",
170
- "type": "unequal"
171
- },
172
- {
173
- "text": "小于",
174
- "value": "lt",
175
- "type": "less"
176
- },
177
- {
178
- "text": "小于或等于",
179
- "value": "lte",
180
- "type": "less_or_equal"
181
- },
182
- {
183
- "text": "大于",
184
- "value": "gt",
185
- "type": "greater"
186
- },
187
- {
188
- "text": "大于或等于",
189
- "value": "gte",
190
- "type": "greater_or_equal"
191
- }
192
- ]
193
- }
194
- },
195
- "x-props": {
196
- "data-hidebind": true,
197
- "data-hideBindValue": true,
198
- "data-withBindMeta": true
199
- }
200
- },
201
- "field": {
202
- "type": "string",
203
- "title": "字段选择",
204
- "x-index": 30,
205
- "x-category": "基础属性",
206
- "x-component": "data-source-field-select",
207
- "x-datasource-method-reset": "",
208
- "x-component-props": {
209
- "dataSourceNamePropKey": "dataSource",
210
- "isMethod": true
211
- },
212
- "x-linkages": [
213
- {
214
- "type": "value:schema",
215
- "target": "operationType",
216
- "condition": "{{ $self.value && ($self.value.type !=='number' || ['datetime','date','time'].includes($self.value.format)) }}",
217
- "schema": {
218
- "enum": [
219
- {
220
- "label": "计数",
221
- "value": "count"
222
- }
223
- ]
224
- }
225
- },
226
- {
227
- "type": "value:state",
228
- "target": "operationType",
229
- "condition": "{{ $self.inputed }}",
230
- "state": {
231
- "value": ""
232
- }
233
- },
234
- {
235
- "type": "value:schema",
236
- "target": "operationType",
237
- "condition": "{{ !$self.value || ($self.value.type ==='number' && !(['datetime','date','time'].includes($self.value.format)) ) }}",
238
- "schema": {
239
- "enum": [
240
- {
241
- "label": "计数",
242
- "value": "count"
243
- },
244
- {
245
- "label": "求和",
246
- "value": "sum"
247
- },
248
- {
249
- "label": "最大值",
250
- "value": "max"
251
- },
252
- {
253
- "label": "最小值",
254
- "value": "min"
255
- },
256
- {
257
- "label": "平均值",
258
- "value": "avg"
259
- }
260
- ]
261
- }
262
- }
263
- ]
264
- },
265
- "operationType": {
266
- "type": "string",
267
- "title": "统计方式",
268
- "x-category": "基础属性",
269
- "x-index": 40,
270
- "x-linkages": [
271
- {
272
- "type": "value:state",
273
- "target": "label",
274
- "condition": "{{ $self.inputed && !!$form.values.field && !!$self.value }}",
275
- "state": {
276
- "value": "{{ $form.values.field.title + ['计数','最大值','最小值','平均值'][['count','max','min','avg'].indexOf($self.value)] }}"
277
- }
278
- },
279
- {
280
- "type": "value:state",
281
- "target": "label",
282
- "condition": "{{ $self.inputed && !!$form.values.field && $self.value==='sum' }}",
283
- "state": {
284
- "value": "{{ $form.values.field.title + '总和' }}"
285
- }
286
- }
287
- ]
288
- },
289
- "label": {
290
- "type": "string",
291
- "title": "字段展示名称",
292
- "x-category": "基础属性",
293
- "x-index": 50,
294
- "x-props": {
295
- "placeholder": "根据字段选择自动填充"
296
- },
297
- "default": "今日活跃用户数"
298
- },
299
- "isCountEmpty": {
300
- "type": "boolean",
301
- "title": "是否统计空值",
302
- "x-category": "基础属性",
303
- "x-index": 60,
304
- "default": false
305
- },
306
- "isShowUnit": {
307
- "type": "boolean",
308
- "title": "是否显示单位",
309
- "x-category": "高级属性",
310
- "x-index": 70,
311
- "default": true,
312
- "x-linkages": [
313
- {
314
- "type": "value:visible",
315
- "target": "*(unit,decimalDigits,suffix)",
316
- "condition": "{{ $self.value }}"
317
- }
318
- ]
319
- },
320
- "unit": {
321
- "type": "number",
322
- "title": "数值量级",
323
- "x-category": "高级属性",
324
- "x-index": 80,
325
- "default": 1,
326
- "enum": [
327
- {
328
- "label": "个",
329
- "value": 1
330
- },
331
- {
332
- "label": "十",
333
- "value": 10
334
- },
335
- {
336
- "label": "百",
337
- "value": 100
338
- },
339
- {
340
- "label": "千",
341
- "value": 1000
342
- },
343
- {
344
- "label": "万",
345
- "value": 10000
346
- },
347
- {
348
- "label": "十万",
349
- "value": 100000
350
- },
351
- {
352
- "label": "百万",
353
- "value": 1000000
354
- },
355
- {
356
- "label": "千万",
357
- "value": 10000000
358
- },
359
- {
360
- "label": "亿",
361
- "value": 100000000
362
- }
363
- ],
364
- "x-linkages": [
365
- {
366
- "type": "value:state",
367
- "target": "suffix",
368
- "condition": "{{ $self.inputed && $self.value!==1 }}",
369
- "state": {
370
- "value": "{{$self.props.enum.find(s=>s.value===$self.value) ? $self.props.enum.find(s=>s.value===$self.value).label: '' }}"
371
- }
372
- },
373
- {
374
- "type": "value:state",
375
- "target": "suffix",
376
- "condition": "{{ $self.inputed && $self.value===1 }}",
377
- "state": {
378
- "value": ""
379
- }
380
- }
381
- ]
382
- },
383
- "decimalDigits": {
384
- "type": "number",
385
- "title": "小数位数",
386
- "x-category": "高级属性",
387
- "x-index": 90,
388
- "default": 0,
389
- "x-props": {
390
- "max": 10,
391
- "min": 0
392
- },
393
- "x-linkages": [
394
- {
395
- "type": "value:state",
396
- "target": "decimalDigits",
397
- "condition": "{{ $self.value == '' || isNaN($self.value) || $self.value < 0 }}",
398
- "state": {
399
- "value": 0
400
- }
401
- },
402
- {
403
- "type": "value:state",
404
- "target": "decimalDigits",
405
- "condition": "{{ $self.value > 10 }}",
406
- "state": {
407
- "value": 10
408
- }
409
- }
410
- ]
411
- },
412
- "suffix": {
413
- "type": "string",
414
- "title": "后缀",
415
- "x-category": "高级属性",
416
- "x-index": 100
417
- }
418
- }
419
- },
420
- "events": [
421
- {
422
- "title": "点击",
423
- "name": "tap"
424
- }
425
- ],
426
- "meta": {
427
- "title": "统计卡片",
428
- "description": "提供报表场景下的指标数据统计并展示功能。",
429
- "figureIcon": "../../figureIcons/StatisticsCard.svg",
430
- "icon": "../../icons/StatisticsCard.svg",
431
- "category": "图表",
432
- "categoryOrder": 600,
433
- "componentOrder": 530,
434
- "inlineStyleForm": {
435
- "fontSize": {
436
- "visible": false
437
- },
438
- "color": {
439
- "visible": false
440
- },
441
- "fontWeight": {
442
- "visible": false
443
- },
444
- "lineHeight": {
445
- "visible": false
446
- },
447
- "justifyContent": {
448
- "visible": false
449
- },
450
- "flexDirection": {
451
- "visible": false
452
- },
453
- "border": {
454
- "visible": false
455
- },
456
- "background": {
457
- "visible": false
458
- },
459
- "boxShadow": {
460
- "visible": false
461
- },
462
- "opacity": {
463
- "visible": false
464
- },
465
- "alignItems": {
466
- "visible": false
467
- }
468
- }
469
- },
470
- "configMeta": {
471
- "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/chart/statisticsCard"
472
- }
473
- }