@cloudbase/cals 1.0.3-alpha.8 → 1.0.3-alpha.9
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/lib/parser/cals/index.d.ts +379 -366
- package/lib/parser/cals/index.d.ts.map +1 -1
- package/lib/parser/cals/index.js +75 -13
- package/lib/parser/cals/utils/block/index.d.ts +14 -14
- package/lib/parser/cals/utils/block/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/block/index.js +3 -3
- package/lib/parser/cals/utils/code/index.d.ts +30 -30
- package/lib/parser/cals/utils/code/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/code/index.js +12 -13
- package/lib/parser/cals/utils/common.d.ts +11 -11
- package/lib/parser/cals/utils/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/common.js +0 -0
- package/lib/parser/cals/utils/runtime.d.ts +13 -13
- package/lib/parser/cals/utils/runtime.d.ts.map +1 -1
- package/lib/parser/cals/utils/runtime.js +2 -2
- package/lib/parser/cals/utils/spinoff/index.d.ts +9 -9
- package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/spinoff/index.js +0 -0
- package/lib/parser/cals/utils/style.d.ts +42 -42
- package/lib/parser/cals/utils/style.d.ts.map +1 -1
- package/lib/parser/cals/utils/style.js +3 -3
- package/lib/parser/cals/utils/template.d.ts +5 -5
- package/lib/parser/cals/utils/template.d.ts.map +0 -0
- package/lib/parser/cals/utils/template.js +6 -3
- package/lib/parser/cals/utils/version/common.d.ts +4 -4
- package/lib/parser/cals/utils/version/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/common.js +34 -11
- package/lib/parser/cals/utils/version/config.d.ts +13 -13
- package/lib/parser/cals/utils/version/config.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/config.js +0 -0
- package/lib/parser/cals/utils/version/index.d.ts +2 -2
- package/lib/parser/cals/utils/version/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/index.js +0 -0
- package/lib/parser/cals/utils/version/parses.d.ts +15 -15
- package/lib/parser/cals/utils/version/parses.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/parses.js +37 -14
- package/lib/parser/cals/utils/version/utils.d.ts +13 -13
- package/lib/parser/cals/utils/version/utils.d.ts.map +1 -1
- package/lib/parser/cals/utils/version/utils.js +2 -2
- package/lib/parser/constants.d.ts +2 -0
- package/lib/parser/constants.d.ts.map +1 -0
- package/lib/parser/constants.js +4 -0
- package/lib/parser/expression/index.d.ts +122 -122
- package/lib/parser/expression/index.d.ts.map +0 -0
- package/lib/parser/expression/index.js +0 -0
- package/lib/parser/index.d.ts +8 -8
- package/lib/parser/index.d.ts.map +0 -0
- package/lib/parser/index.js +0 -0
- package/lib/parser/plugins/postcss-rpx2clac.d.ts +17 -17
- package/lib/parser/plugins/postcss-rpx2clac.js +2 -2
- package/lib/types/basic/app.d.ts +72 -72
- package/lib/types/basic/app.d.ts.map +0 -0
- package/lib/types/basic/app.js +0 -0
- package/lib/types/basic/common.d.ts +88 -88
- package/lib/types/basic/common.d.ts.map +1 -1
- package/lib/types/basic/common.js +0 -0
- package/lib/types/basic/component.d.ts +213 -208
- package/lib/types/basic/component.d.ts.map +1 -1
- package/lib/types/basic/component.js +0 -0
- package/lib/types/basic/datasource.d.ts +49 -49
- package/lib/types/basic/datasource.d.ts.map +0 -0
- package/lib/types/basic/datasource.js +0 -0
- package/lib/types/index.d.ts +10 -9
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +1 -14
- package/lib/types/lcds.d.ts +334 -447
- package/lib/types/lcds.d.ts.map +1 -1
- package/lib/types/lcds.js +0 -0
- package/lib/types/platform/app.d.ts +176 -176
- package/lib/types/platform/app.d.ts.map +0 -0
- package/lib/types/platform/app.js +0 -0
- package/lib/types/platform/common.d.ts +147 -137
- package/lib/types/platform/common.d.ts.map +1 -1
- package/lib/types/platform/common.js +0 -0
- package/lib/types/platform/component.d.ts +145 -140
- package/lib/types/platform/component.d.ts.map +1 -1
- package/lib/types/platform/component.js +0 -0
- package/lib/types/platform/datasource.d.ts +466 -466
- package/lib/types/platform/datasource.d.ts.map +0 -0
- package/lib/types/platform/datasource.js +0 -0
- package/lib/types/platform/eventFlow.d.ts +20 -0
- package/lib/types/platform/eventFlow.d.ts.map +1 -0
- package/lib/types/platform/eventFlow.js +2 -0
- package/lib/types/platform/query.d.ts +58 -0
- package/lib/types/platform/query.d.ts.map +1 -0
- package/lib/types/platform/query.js +2 -0
- package/lib/types/platform/widget/form.d.ts +89 -89
- package/lib/types/platform/widget/form.d.ts.map +0 -0
- package/lib/types/platform/widget/form.js +0 -0
- package/lib/types/platform/widget/meta.d.ts +59 -59
- package/lib/types/platform/widget/meta.d.ts.map +0 -0
- package/lib/types/platform/widget/meta.js +0 -0
- package/lib/utils/CSSProperty.d.ts +63 -63
- package/lib/utils/CSSProperty.d.ts.map +0 -0
- package/lib/utils/CSSProperty.js +0 -0
- package/lib/utils/build.d.ts +1 -1
- package/lib/utils/build.d.ts.map +0 -0
- package/lib/utils/build.js +6 -3
- package/lib/utils/constant.d.ts +40 -40
- package/lib/utils/constant.d.ts.map +0 -0
- package/lib/utils/constant.js +0 -0
- package/lib/utils/dts/auto-generated.d.ts +1 -1
- package/lib/utils/dts/auto-generated.d.ts.map +1 -1
- package/lib/utils/dts/auto-generated.js +35 -1227
- package/lib/utils/dts/build.d.ts +1 -1
- package/lib/utils/dts/build.js +4 -1
- package/lib/utils/dts/index.d.ts +93 -130
- package/lib/utils/dts/index.d.ts.map +1 -1
- package/lib/utils/dts/index.js +66 -359
- package/lib/utils/index.d.ts +7 -7
- package/lib/utils/index.d.ts.map +0 -0
- package/lib/utils/index.js +0 -0
- package/lib/utils/version/common.d.ts +2 -2
- package/lib/utils/version/featureChecker.d.ts +2 -2
- package/lib/utils/version/featureChecker.d.ts.map +1 -1
- package/lib/utils/version/migrations/version4.d.ts +2 -2
- package/lib/utils/version/migrations/version4.js +2 -2
- package/lib/utils/version-migrations/common.d.ts +5 -0
- package/lib/utils/version-migrations/common.d.ts.map +1 -0
- package/lib/utils/version-migrations/common.js +29 -0
- package/lib/utils/version-migrations/version4.d.ts +3 -0
- package/lib/utils/version-migrations/version4.d.ts.map +1 -0
- package/lib/utils/version-migrations/version4.js +199 -0
- package/package.json +3 -13
- package/lib/cloudbase.cals.umd.min.js +0 -5
package/lib/types/lcds.d.ts
CHANGED
|
@@ -1,448 +1,335 @@
|
|
|
1
|
-
import type * as CSS from 'csstype';
|
|
2
|
-
/**
|
|
3
|
-
* 低码组件库开发规范 (LCDS, Lowcode Components Development Specification)
|
|
4
|
-
*
|
|
5
|
-
* 基于 LCDS 开发的组件库, 可以在云开发低码平台内使用
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 选填,
|
|
97
|
-
*
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
*
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
*
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
*
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
*
|
|
323
|
-
*/
|
|
324
|
-
name
|
|
325
|
-
/**
|
|
326
|
-
*
|
|
327
|
-
*/
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
*
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
*/
|
|
336
|
-
detail?: Record<string, any>;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* 低码组件可以暴露的自定义方法
|
|
340
|
-
*/
|
|
341
|
-
export interface IMethod {
|
|
342
|
-
/**
|
|
343
|
-
* 必填, 用作组件方法的唯一标识
|
|
344
|
-
*/
|
|
345
|
-
name: string;
|
|
346
|
-
/**
|
|
347
|
-
* 必填, 组件方法别名, 用于低码平台展示
|
|
348
|
-
*/
|
|
349
|
-
label: string;
|
|
350
|
-
/**
|
|
351
|
-
* 选填, 组件方法可以接收的数据
|
|
352
|
-
* 需要符合 JSON SCHEMA 规范
|
|
353
|
-
*
|
|
354
|
-
* @default {}
|
|
355
|
-
*/
|
|
356
|
-
params?: any;
|
|
357
|
-
/**
|
|
358
|
-
* 选填, 组件自定义方法适配的平台
|
|
359
|
-
*/
|
|
360
|
-
platforms?: string[];
|
|
361
|
-
/**
|
|
362
|
-
* 选填, 组件方法描述
|
|
363
|
-
*/
|
|
364
|
-
description?: string;
|
|
365
|
-
}
|
|
366
|
-
export interface IRenderMode {
|
|
367
|
-
/**
|
|
368
|
-
* 必填, 转换的目标组件名称
|
|
369
|
-
*/
|
|
370
|
-
component: string;
|
|
371
|
-
/**
|
|
372
|
-
* 必填, 表示升级还是替换
|
|
373
|
-
*/
|
|
374
|
-
renderType: 'update' | 'replace';
|
|
375
|
-
/**
|
|
376
|
-
* 选填, [源组件的属性路径]:[转换目标组件的属性路径] 标记属性路径的映射关系
|
|
377
|
-
*/
|
|
378
|
-
props?: {
|
|
379
|
-
[name: string]: string;
|
|
380
|
-
};
|
|
381
|
-
/**
|
|
382
|
-
* 选填, 表示升级组件所属组件库,默认与废弃组件同库
|
|
383
|
-
*/
|
|
384
|
-
materialName?: string;
|
|
385
|
-
/**
|
|
386
|
-
* 选填, 升级说明
|
|
387
|
-
*/
|
|
388
|
-
description?: string;
|
|
389
|
-
}
|
|
390
|
-
/** 组件/方法/属性所支持的平台 */
|
|
391
|
-
export declare type XPlatform = 'MP' | 'WEB' | 'PCWEB' | 'MOBILEWEB';
|
|
392
|
-
/** 组件在应用编辑器/低码编辑器的生效情况*/
|
|
393
|
-
export declare type VisibleItem = 'APP' | 'COMPONENT';
|
|
394
|
-
/** 组件模板配置 */
|
|
395
|
-
export interface ITemplate {
|
|
396
|
-
/**
|
|
397
|
-
* 插入模板的节点或插槽
|
|
398
|
-
* 不设置或设置 $children 表示插入到当前组件,可配置多个节点或插槽并用逗号隔开
|
|
399
|
-
*/
|
|
400
|
-
to?: '$children' | string;
|
|
401
|
-
/**
|
|
402
|
-
* 插入模板的时机
|
|
403
|
-
* 不设置或设置 $attached 表示刚拖入组件时执行,可配置多个属性名称并用逗号隔开
|
|
404
|
-
*/
|
|
405
|
-
when?: '$attached' | string;
|
|
406
|
-
/**
|
|
407
|
-
* 插入的模板主体
|
|
408
|
-
* 目前仅支持 toml 配置语法,结构内容参考组件 CALS
|
|
409
|
-
*/
|
|
410
|
-
body?: string;
|
|
411
|
-
/**
|
|
412
|
-
* 插入模板时自动选中的节点
|
|
413
|
-
* 如 template[0] 表示选中所插入模板的第1个节点
|
|
414
|
-
*/
|
|
415
|
-
autoSelectPath?: `template${string}`;
|
|
416
|
-
}
|
|
417
|
-
/** 组件快捷编辑协议 */
|
|
418
|
-
export interface IShortcut {
|
|
419
|
-
/**
|
|
420
|
-
* 选填,快捷编辑面板中支持的组件属性
|
|
421
|
-
*/
|
|
422
|
-
props?: string[];
|
|
423
|
-
/**
|
|
424
|
-
* 选填,快捷编辑面板中支持拖入的组件
|
|
425
|
-
*/
|
|
426
|
-
extra?: Record<string, {
|
|
427
|
-
'x-component': 'container';
|
|
428
|
-
'x-component-props'?: string[];
|
|
429
|
-
'x-index'?: number;
|
|
430
|
-
'x-insert-path'?: string;
|
|
431
|
-
}>;
|
|
432
|
-
}
|
|
433
|
-
/** 组件样式 API */
|
|
434
|
-
export interface IClasses {
|
|
435
|
-
/**
|
|
436
|
-
* 样式名称
|
|
437
|
-
*/
|
|
438
|
-
name?: string;
|
|
439
|
-
/**
|
|
440
|
-
* 样式选择器
|
|
441
|
-
*/
|
|
442
|
-
selector?: string;
|
|
443
|
-
/**
|
|
444
|
-
* 样式说明
|
|
445
|
-
*/
|
|
446
|
-
description?: string;
|
|
447
|
-
}
|
|
1
|
+
import type * as CSS from 'csstype';
|
|
2
|
+
/**
|
|
3
|
+
* 低码组件库开发规范 (LCDS, Lowcode Components Development Specification)
|
|
4
|
+
*
|
|
5
|
+
* 基于 LCDS 开发的组件库, 可以在云开发低码平台内使用
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace LCDS {
|
|
8
|
+
/**
|
|
9
|
+
* 低码的平台方法的开发配置
|
|
10
|
+
*/
|
|
11
|
+
interface IAction {
|
|
12
|
+
/**
|
|
13
|
+
* 选填, 平台方法的唯一标识
|
|
14
|
+
* @maxLength 214
|
|
15
|
+
* @minLength 1
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 选填, 平台方法可以接收的数据
|
|
20
|
+
* 需要符合 JSON SCHEMA 规范
|
|
21
|
+
*
|
|
22
|
+
* @default {}
|
|
23
|
+
*/
|
|
24
|
+
data?: any;
|
|
25
|
+
/**
|
|
26
|
+
* 选填, 组件对外开放的只读属性,可通过 $w.id1.xx 获取
|
|
27
|
+
* 需要符合 JSON SCHEMA 规范
|
|
28
|
+
*/
|
|
29
|
+
properties?: any;
|
|
30
|
+
/**
|
|
31
|
+
* 选填, 平台方法适配的平台
|
|
32
|
+
*
|
|
33
|
+
* 如果该字段为空, 则进行智能推断
|
|
34
|
+
*/
|
|
35
|
+
platforms?: string[];
|
|
36
|
+
/**
|
|
37
|
+
* 选填, 仅用于在低码平台的信息展示
|
|
38
|
+
*/
|
|
39
|
+
meta?: {
|
|
40
|
+
/**
|
|
41
|
+
* 选填, 平台方法的别名, 建议用中文
|
|
42
|
+
*/
|
|
43
|
+
title?: string;
|
|
44
|
+
/**
|
|
45
|
+
* 选填, 平台方法的简介, 建议用中文
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 选填, 扩展字段, 尽量避免用
|
|
51
|
+
*/
|
|
52
|
+
extra?: any;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 低码组件开发配置
|
|
56
|
+
*/
|
|
57
|
+
interface IComponent {
|
|
58
|
+
/**
|
|
59
|
+
* 选填, 组件唯一标识
|
|
60
|
+
* @maxLength 214
|
|
61
|
+
* @minLength 1
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* 选填, 组件可以被捕获的事件信息
|
|
66
|
+
*
|
|
67
|
+
* @default []
|
|
68
|
+
*/
|
|
69
|
+
events?: IEvent[];
|
|
70
|
+
/**
|
|
71
|
+
* 选填,组件样式 API
|
|
72
|
+
*/
|
|
73
|
+
classes?: IClasses[];
|
|
74
|
+
/**
|
|
75
|
+
* 选填, 组件内定义的自定义方法
|
|
76
|
+
*
|
|
77
|
+
* @default []
|
|
78
|
+
*/
|
|
79
|
+
methods?: IMethod[];
|
|
80
|
+
/**
|
|
81
|
+
* 选填, 组件需要在运行时获取的配置项
|
|
82
|
+
*/
|
|
83
|
+
compConfig?: {
|
|
84
|
+
/**
|
|
85
|
+
* 选填, 组件是否开启数据容器功能
|
|
86
|
+
* 默认为 false, 设置为 true 后, 在组件内可通过调用 onDataChange 事件将内部数据挂载到组件的 $context 上下文对象
|
|
87
|
+
*/
|
|
88
|
+
isDataContainer?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 选填, 组件类型
|
|
91
|
+
* 支持将表单类组件设置为 formField,即可在表单容器中收集值
|
|
92
|
+
*/
|
|
93
|
+
componentType?: string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 选填, 组件可以接收的数据, 用作组件props入参
|
|
97
|
+
* 需要符合 JSON SCHEMA 规范
|
|
98
|
+
*
|
|
99
|
+
* @default {}
|
|
100
|
+
*/
|
|
101
|
+
data?: any;
|
|
102
|
+
/**
|
|
103
|
+
* 选填, 组件适配的平台
|
|
104
|
+
*
|
|
105
|
+
* 如果该字段为空, 则进行智能推断
|
|
106
|
+
*/
|
|
107
|
+
platforms?: string[];
|
|
108
|
+
/**
|
|
109
|
+
* 选填, 仅用于在低码平台的信息展示
|
|
110
|
+
*/
|
|
111
|
+
meta?: IConfigMeta & {
|
|
112
|
+
/**
|
|
113
|
+
* 选填, 组件英文标识
|
|
114
|
+
*/
|
|
115
|
+
name?: string;
|
|
116
|
+
/**
|
|
117
|
+
* 选填, 用于生成组件 id 的前缀标识
|
|
118
|
+
*/
|
|
119
|
+
componentName?: string;
|
|
120
|
+
/**
|
|
121
|
+
* 选填, 组件别名, 建议用中文
|
|
122
|
+
*/
|
|
123
|
+
title?: string;
|
|
124
|
+
/**
|
|
125
|
+
* 选填, 组件简介, 建议用中文
|
|
126
|
+
*/
|
|
127
|
+
description?: string;
|
|
128
|
+
/**
|
|
129
|
+
* 选填, 组件图标, 支持本地图片
|
|
130
|
+
*/
|
|
131
|
+
icon?: string;
|
|
132
|
+
/**
|
|
133
|
+
* 选填, 组件分类, 建议用中文
|
|
134
|
+
*/
|
|
135
|
+
category?: string;
|
|
136
|
+
/**
|
|
137
|
+
* 选填, 组件的排序权重
|
|
138
|
+
*
|
|
139
|
+
* @minimum 1
|
|
140
|
+
* @maximum 10000
|
|
141
|
+
*/
|
|
142
|
+
componentOrder?: number;
|
|
143
|
+
/**
|
|
144
|
+
* 选填, 组件生效的平台
|
|
145
|
+
*/
|
|
146
|
+
platform?: XPlatform[];
|
|
147
|
+
/**
|
|
148
|
+
* 选填, 组件可见性配置
|
|
149
|
+
* 默认均显示,[]表示隐藏, ['APP']表示只在应用编辑器显示,['COMPONENT']表示只在组件编辑器显示
|
|
150
|
+
*/
|
|
151
|
+
visible?: VisibleItem[];
|
|
152
|
+
/**
|
|
153
|
+
* 选填,组件模板配置
|
|
154
|
+
*/
|
|
155
|
+
templates?: ITemplate[];
|
|
156
|
+
/**
|
|
157
|
+
* 选填, 标识旧组件废弃,控制单组件升级按钮显隐
|
|
158
|
+
*/
|
|
159
|
+
deprecated?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* 选填, 单组件渲染模式[升级/替换]
|
|
162
|
+
*/
|
|
163
|
+
renderMode?: IRenderMode[];
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* 选填, 扩展字段, 尽量避免用
|
|
167
|
+
*/
|
|
168
|
+
extra?: any;
|
|
169
|
+
/**
|
|
170
|
+
* 选填, 是否容器组件
|
|
171
|
+
*
|
|
172
|
+
* 容器可以包含子节点,但是不能配置插槽
|
|
173
|
+
*/
|
|
174
|
+
isContainer?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* 默认样式
|
|
177
|
+
* defaultStyles 接收一个React.CSSProperties对象
|
|
178
|
+
*/
|
|
179
|
+
defaultStyles?: CSS.Properties<string | number>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 低码组件可以被捕获的事件信息
|
|
183
|
+
*/
|
|
184
|
+
interface IEvent {
|
|
185
|
+
/**
|
|
186
|
+
* 必填, 用作抛出和捕获事件的唯一标识
|
|
187
|
+
*/
|
|
188
|
+
name: string;
|
|
189
|
+
/**
|
|
190
|
+
* 选填, 事件别名, 用于低码平台展示
|
|
191
|
+
*/
|
|
192
|
+
title: string;
|
|
193
|
+
/**
|
|
194
|
+
* 选填,事件生效的平台
|
|
195
|
+
*/
|
|
196
|
+
'x-platforms'?: XPlatform;
|
|
197
|
+
/**
|
|
198
|
+
* 事件参数对象
|
|
199
|
+
*/
|
|
200
|
+
detail?: Record<string, any>;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* 低码组件可以暴露的自定义方法
|
|
204
|
+
*/
|
|
205
|
+
interface IMethod {
|
|
206
|
+
/**
|
|
207
|
+
* 必填, 用作组件方法的唯一标识
|
|
208
|
+
*/
|
|
209
|
+
name: string;
|
|
210
|
+
/**
|
|
211
|
+
* 必填, 组件方法别名, 用于低码平台展示
|
|
212
|
+
*/
|
|
213
|
+
label: string;
|
|
214
|
+
/**
|
|
215
|
+
* 选填, 组件方法可以接收的数据
|
|
216
|
+
* 需要符合 JSON SCHEMA 规范
|
|
217
|
+
*
|
|
218
|
+
* @default {}
|
|
219
|
+
*/
|
|
220
|
+
params?: any;
|
|
221
|
+
/**
|
|
222
|
+
* 选填, 组件自定义方法适配的平台
|
|
223
|
+
*/
|
|
224
|
+
platforms?: string[];
|
|
225
|
+
/**
|
|
226
|
+
* 选填, 组件方法描述
|
|
227
|
+
*/
|
|
228
|
+
description?: string;
|
|
229
|
+
}
|
|
230
|
+
interface IRenderMode {
|
|
231
|
+
/**
|
|
232
|
+
* 必填, 转换的目标组件名称
|
|
233
|
+
*/
|
|
234
|
+
component: string;
|
|
235
|
+
/**
|
|
236
|
+
* 必填, 表示升级还是替换
|
|
237
|
+
*/
|
|
238
|
+
renderType: 'update' | 'replace';
|
|
239
|
+
/**
|
|
240
|
+
* 选填, [源组件的属性路径]:[转换目标组件的属性路径] 标记属性路径的映射关系
|
|
241
|
+
*/
|
|
242
|
+
props?: {
|
|
243
|
+
[name: string]: string;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* 选填, 表示升级组件所属组件库,默认与废弃组件同库
|
|
247
|
+
*/
|
|
248
|
+
materialName?: string;
|
|
249
|
+
/**
|
|
250
|
+
* 选填, 升级说明
|
|
251
|
+
*/
|
|
252
|
+
description?: string;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/** 组件/方法/属性所支持的平台 */
|
|
256
|
+
declare type XPlatform = 'MP' | 'WEB' | 'PCWEB' | 'MOBILEWEB';
|
|
257
|
+
/** 组件在应用编辑器/低码编辑器的生效情况*/
|
|
258
|
+
declare type VisibleItem = 'APP' | 'COMPONENT';
|
|
259
|
+
/** 组件模板配置 */
|
|
260
|
+
interface ITemplate {
|
|
261
|
+
/**
|
|
262
|
+
* 插入模板的节点或插槽
|
|
263
|
+
* 不设置或设置 $children 表示插入到当前组件,可配置多个节点或插槽并用逗号隔开
|
|
264
|
+
*/
|
|
265
|
+
to?: '$children' | string;
|
|
266
|
+
/**
|
|
267
|
+
* 插入模板的时机
|
|
268
|
+
* 不设置或设置 $attached 表示刚拖入组件时执行,可配置多个属性名称并用逗号隔开
|
|
269
|
+
*/
|
|
270
|
+
when?: '$attached' | string;
|
|
271
|
+
/**
|
|
272
|
+
* 插入的模板主体
|
|
273
|
+
* 目前仅支持 toml 配置语法,结构内容参考组件 CALS
|
|
274
|
+
*/
|
|
275
|
+
body?: string;
|
|
276
|
+
/**
|
|
277
|
+
* 插入模板时自动选中的节点
|
|
278
|
+
* 如 template[0] 表示选中所插入模板的第1个节点
|
|
279
|
+
*/
|
|
280
|
+
autoSelectPath?: `template${string}`;
|
|
281
|
+
}
|
|
282
|
+
/** 组件配置 */
|
|
283
|
+
interface IConfigMeta {
|
|
284
|
+
/**
|
|
285
|
+
* 选填, 组件说明文档的地址
|
|
286
|
+
*/
|
|
287
|
+
docsUrl?: string;
|
|
288
|
+
/**
|
|
289
|
+
* 选填, 组件可见性配置
|
|
290
|
+
*/
|
|
291
|
+
visible?: VisibleItem[];
|
|
292
|
+
/**
|
|
293
|
+
* 选填, 组件快捷编辑协议
|
|
294
|
+
*/
|
|
295
|
+
shortcut?: IShortcut;
|
|
296
|
+
/**
|
|
297
|
+
* 选填,组件上下文协议,配置后可通过 $context.id.state.xx 读取属性值
|
|
298
|
+
*/
|
|
299
|
+
contextData?: {
|
|
300
|
+
extra?: Record<string, any>;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/** 组件快捷编辑协议 */
|
|
304
|
+
interface IShortcut {
|
|
305
|
+
/**
|
|
306
|
+
* 选填,快捷编辑面板中支持的组件属性
|
|
307
|
+
*/
|
|
308
|
+
props?: string[];
|
|
309
|
+
/**
|
|
310
|
+
* 选填,快捷编辑面板中支持拖入的组件
|
|
311
|
+
*/
|
|
312
|
+
extra?: Record<string, {
|
|
313
|
+
'x-component': 'container';
|
|
314
|
+
'x-component-props'?: string[];
|
|
315
|
+
'x-index'?: number;
|
|
316
|
+
'x-insert-path'?: string;
|
|
317
|
+
}>;
|
|
318
|
+
}
|
|
319
|
+
/** 组件样式 API */
|
|
320
|
+
interface IClasses {
|
|
321
|
+
/**
|
|
322
|
+
* 样式名称
|
|
323
|
+
*/
|
|
324
|
+
name?: string;
|
|
325
|
+
/**
|
|
326
|
+
* 样式选择器
|
|
327
|
+
*/
|
|
328
|
+
selector?: string;
|
|
329
|
+
/**
|
|
330
|
+
* 样式说明
|
|
331
|
+
*/
|
|
332
|
+
description?: string;
|
|
333
|
+
}
|
|
334
|
+
export {};
|
|
448
335
|
//# sourceMappingURL=lcds.d.ts.map
|