@cloudbase/cals 1.0.3-alpha.10 → 1.0.3-alpha.12

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.
Files changed (125) hide show
  1. package/lib/parser/cals/index.d.ts +417 -366
  2. package/lib/parser/cals/index.d.ts.map +1 -1
  3. package/lib/parser/cals/index.js +90 -25
  4. package/lib/parser/cals/utils/block/index.d.ts +14 -14
  5. package/lib/parser/cals/utils/block/index.d.ts.map +1 -1
  6. package/lib/parser/cals/utils/block/index.js +3 -7
  7. package/lib/parser/cals/utils/code/index.d.ts +30 -30
  8. package/lib/parser/cals/utils/code/index.d.ts.map +1 -1
  9. package/lib/parser/cals/utils/code/index.js +12 -18
  10. package/lib/parser/cals/utils/common.d.ts +11 -11
  11. package/lib/parser/cals/utils/common.d.ts.map +0 -0
  12. package/lib/parser/cals/utils/common.js +0 -0
  13. package/lib/parser/cals/utils/runtime.d.ts +13 -13
  14. package/lib/parser/cals/utils/runtime.d.ts.map +1 -1
  15. package/lib/parser/cals/utils/runtime.js +2 -5
  16. package/lib/parser/cals/utils/spinoff/index.d.ts +9 -9
  17. package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -0
  18. package/lib/parser/cals/utils/spinoff/index.js +0 -0
  19. package/lib/parser/cals/utils/style.d.ts +42 -42
  20. package/lib/parser/cals/utils/style.d.ts.map +1 -1
  21. package/lib/parser/cals/utils/style.js +3 -7
  22. package/lib/parser/cals/utils/template.d.ts +5 -5
  23. package/lib/parser/cals/utils/template.d.ts.map +0 -0
  24. package/lib/parser/cals/utils/template.js +0 -0
  25. package/lib/parser/cals/utils/version/common.d.ts +4 -4
  26. package/lib/parser/cals/utils/version/common.d.ts.map +1 -1
  27. package/lib/parser/cals/utils/version/common.js +33 -16
  28. package/lib/parser/cals/utils/version/config.d.ts +13 -13
  29. package/lib/parser/cals/utils/version/config.d.ts.map +0 -0
  30. package/lib/parser/cals/utils/version/config.js +0 -0
  31. package/lib/parser/cals/utils/version/index.d.ts +2 -2
  32. package/lib/parser/cals/utils/version/index.d.ts.map +0 -0
  33. package/lib/parser/cals/utils/version/index.js +0 -0
  34. package/lib/parser/cals/utils/version/parses.d.ts +15 -15
  35. package/lib/parser/cals/utils/version/parses.d.ts.map +1 -1
  36. package/lib/parser/cals/utils/version/parses.js +36 -18
  37. package/lib/parser/cals/utils/version/utils.d.ts +13 -13
  38. package/lib/parser/cals/utils/version/utils.d.ts.map +1 -1
  39. package/lib/parser/cals/utils/version/utils.js +2 -5
  40. package/lib/parser/constants.d.ts +2 -0
  41. package/lib/parser/constants.d.ts.map +1 -0
  42. package/lib/parser/constants.js +4 -0
  43. package/lib/parser/expression/index.d.ts +122 -122
  44. package/lib/parser/expression/index.d.ts.map +0 -0
  45. package/lib/parser/expression/index.js +0 -0
  46. package/lib/parser/index.d.ts +8 -8
  47. package/lib/parser/index.d.ts.map +0 -0
  48. package/lib/parser/index.js +0 -0
  49. package/lib/parser/plugins/postcss-rpx2clac.d.ts +17 -17
  50. package/lib/parser/plugins/postcss-rpx2clac.js +2 -2
  51. package/lib/types/basic/app.d.ts +72 -72
  52. package/lib/types/basic/app.d.ts.map +0 -0
  53. package/lib/types/basic/app.js +0 -0
  54. package/lib/types/basic/common.d.ts +88 -88
  55. package/lib/types/basic/common.d.ts.map +1 -1
  56. package/lib/types/basic/common.js +0 -0
  57. package/lib/types/basic/component.d.ts +213 -208
  58. package/lib/types/basic/component.d.ts.map +1 -1
  59. package/lib/types/basic/component.js +0 -0
  60. package/lib/types/basic/datasource.d.ts +49 -49
  61. package/lib/types/basic/datasource.d.ts.map +0 -0
  62. package/lib/types/basic/datasource.js +0 -0
  63. package/lib/types/index.d.ts +10 -9
  64. package/lib/types/index.d.ts.map +1 -1
  65. package/lib/types/index.js +1 -14
  66. package/lib/types/lcds.d.ts +334 -447
  67. package/lib/types/lcds.d.ts.map +1 -1
  68. package/lib/types/lcds.js +0 -0
  69. package/lib/types/platform/app.d.ts +176 -176
  70. package/lib/types/platform/app.d.ts.map +0 -0
  71. package/lib/types/platform/app.js +0 -0
  72. package/lib/types/platform/common.d.ts +147 -137
  73. package/lib/types/platform/common.d.ts.map +1 -1
  74. package/lib/types/platform/common.js +0 -0
  75. package/lib/types/platform/component.d.ts +145 -140
  76. package/lib/types/platform/component.d.ts.map +1 -1
  77. package/lib/types/platform/component.js +0 -0
  78. package/lib/types/platform/datasource.d.ts +466 -466
  79. package/lib/types/platform/datasource.d.ts.map +0 -0
  80. package/lib/types/platform/datasource.js +0 -0
  81. package/lib/types/platform/eventFlow.d.ts +20 -0
  82. package/lib/types/platform/eventFlow.d.ts.map +1 -0
  83. package/lib/types/platform/eventFlow.js +2 -0
  84. package/lib/types/platform/query.d.ts +58 -0
  85. package/lib/types/platform/query.d.ts.map +1 -0
  86. package/lib/types/platform/query.js +2 -0
  87. package/lib/types/platform/widget/form.d.ts +89 -89
  88. package/lib/types/platform/widget/form.d.ts.map +0 -0
  89. package/lib/types/platform/widget/form.js +0 -0
  90. package/lib/types/platform/widget/meta.d.ts +59 -59
  91. package/lib/types/platform/widget/meta.d.ts.map +0 -0
  92. package/lib/types/platform/widget/meta.js +0 -0
  93. package/lib/utils/CSSProperty.d.ts +63 -63
  94. package/lib/utils/CSSProperty.d.ts.map +0 -0
  95. package/lib/utils/CSSProperty.js +0 -0
  96. package/lib/utils/build.d.ts +1 -1
  97. package/lib/utils/build.d.ts.map +0 -0
  98. package/lib/utils/build.js +3 -3
  99. package/lib/utils/constant.d.ts +40 -40
  100. package/lib/utils/constant.d.ts.map +0 -0
  101. package/lib/utils/constant.js +0 -0
  102. package/lib/utils/dts/auto-generated.d.ts +1 -1
  103. package/lib/utils/dts/auto-generated.d.ts.map +1 -1
  104. package/lib/utils/dts/auto-generated.js +35 -1227
  105. package/lib/utils/dts/build.d.ts +1 -1
  106. package/lib/utils/dts/build.js +4 -1
  107. package/lib/utils/dts/index.d.ts +93 -130
  108. package/lib/utils/dts/index.d.ts.map +1 -1
  109. package/lib/utils/dts/index.js +66 -361
  110. package/lib/utils/index.d.ts +7 -7
  111. package/lib/utils/index.d.ts.map +0 -0
  112. package/lib/utils/index.js +0 -0
  113. package/lib/utils/version/common.d.ts +2 -2
  114. package/lib/utils/version/featureChecker.d.ts +2 -2
  115. package/lib/utils/version/featureChecker.d.ts.map +1 -1
  116. package/lib/utils/version/migrations/version4.d.ts +2 -2
  117. package/lib/utils/version/migrations/version4.js +2 -2
  118. package/lib/utils/version-migrations/common.d.ts +5 -0
  119. package/lib/utils/version-migrations/common.d.ts.map +1 -0
  120. package/lib/utils/version-migrations/common.js +29 -0
  121. package/lib/utils/version-migrations/version4.d.ts +3 -0
  122. package/lib/utils/version-migrations/version4.d.ts.map +1 -0
  123. package/lib/utils/version-migrations/version4.js +199 -0
  124. package/package.json +1 -11
  125. package/lib/cloudbase.cals.umd.min.js +0 -5
@@ -1,367 +1,418 @@
1
- import { IAttributes, IPlatformApp, IComplexComponent, IBasicComponent, IPageComponent, IDataSourceVariable, IDataVarMethod, // 勿删,为了生成d.ts
2
- IPlatformDataSource, IDependencies, LCDS } from '../../types';
3
- import { IDynamicValue, PropBindType } from '../expression';
4
- export { getUsedComps } from './utils/common';
5
- export { generateDefaultCode } from './utils/template';
6
- interface IDeserializeContext {
7
- app?: IPlatformApp;
8
- dependencies?: any[];
9
- dependenciesMap?: any;
10
- page?: IPageComponent;
11
- }
12
- interface ISerializeContext {
13
- app?: any;
14
- page?: {
15
- id: string;
16
- };
17
- component?: {
18
- id: string;
19
- module?: string;
20
- component?: string;
21
- };
22
- /**
23
- * 依赖描述
24
- * map 由 数组处理得到
25
- */
26
- dependencies?: any[];
27
- dependenciesMap?: any;
28
- streamlineDefaultValue?: boolean;
29
- streamlineModuleName?: boolean;
30
- }
31
- export declare function serializeValue({ ctx, key, dynamicValue, scope, streamlineDefaultValue, }: {
32
- ctx: ISerializeContext;
33
- key: string;
34
- dynamicValue: IDynamicValue;
35
- scope?: 'page' | 'component';
36
- streamlineDefaultValue?: boolean;
37
- }): {
38
- key: string;
39
- value: any;
40
- extra?: any;
41
- };
42
- export declare function deserializeValue(ctx: IDeserializeContext, key: string, value: any, extra?: any): {
43
- key: string;
44
- value: {
45
- type: PropBindType;
46
- value: any;
47
- extra: any;
48
- };
49
- } | {
50
- key: string;
51
- value: {
52
- type: undefined;
53
- value: any;
54
- extra: any;
55
- } | undefined;
56
- };
57
- interface ISerializeDynamicMapProps {
58
- ctx: ISerializeContext;
59
- map: {
60
- [key: string]: IDynamicValue;
61
- };
62
- scope?: 'page' | 'component';
63
- streamlineDefaultValue?: boolean;
64
- }
65
- export declare function serializeDynamicMap(props: ISerializeDynamicMapProps): {
66
- [key: string]: string;
67
- };
68
- export declare function deserializeDynamicMap(ctx: IDeserializeContext, map: {
69
- [key: string]: string | any;
70
- }, extraMap?: {
71
- [key: string]: any;
72
- }): any;
73
- export declare function serializeAttributes(ctx: ISerializeContext, scope: 'page' | 'component', attributes?: {
74
- [key: string]: IDynamicValue;
75
- }): {
76
- [key: string]: string;
77
- };
78
- export declare function deserializeAttributes(ctx: IDeserializeContext, attributes?: IAttributes, attributesExtraData?: {}): any;
79
- export declare function deserializeDataVariables(ctx: IDeserializeContext, data: IDataSourceVariable): {
80
- title: string | undefined;
81
- name: string;
82
- varType: "datasource";
83
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
84
- dataSourceName: string;
85
- initMethod?: IDataVarMethod | undefined;
86
- updateMethod?: IDataVarMethod | undefined;
87
- };
88
- export declare function serializeComponent(ctx: ISerializeContext & ({
89
- page: Required<ISerializeContext>['page'];
90
- } | {
91
- component: Required<ISerializeContext>['component'];
92
- }), component: {
93
- xComponent?: {
94
- moduleName: string;
95
- name: string;
96
- };
97
- xProps?: {
98
- data: {
99
- [prop: string]: IDynamicValue;
100
- };
101
- directives?: {
102
- waIf?: IDynamicValue;
103
- waDisplay?: IDynamicValue;
104
- waFor?: IDynamicValue;
105
- waForKey?: IDynamicValue;
106
- };
107
- listeners?: any[];
108
- style: any;
109
- styleBind: IDynamicValue;
110
- classList: string[];
111
- classListBind: IDynamicValue;
112
- commonStyle: any;
113
- styleBindPath?: string;
114
- staticResourceAttribute: string[];
115
- };
116
- xIndex?: number;
117
- properties?: {
118
- [key: string]: any;
119
- };
120
- } & {
121
- id: string;
122
- label?: string;
123
- }, scope?: 'page' | 'component'): IBasicComponent | IComplexComponent;
124
- export declare function deserializeComponent(ctx: IDeserializeContext, components: (IBasicComponent | IComplexComponent)[]): {
125
- [key: string]: object;
126
- };
127
- export declare function serializePage(ctx: Pick<ISerializeContext, 'app' | 'dependencies' | 'dependenciesMap'>, page: any): IPageComponent;
128
- export declare function deserializePage(ctx: {
129
- app: Required<IDeserializeContext>['app'];
130
- dependencies: IDeserializeContext['dependencies'];
131
- homePageId: string;
132
- }, page: IPageComponent): {
133
- id: string;
134
- isHome: boolean;
135
- dataset: any;
136
- vars: {
137
- data: {
138
- title: string | undefined;
139
- name: string;
140
- varType: "datasource";
141
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
142
- dataSourceName: string;
143
- initMethod?: IDataVarMethod | undefined;
144
- updateMethod?: IDataVarMethod | undefined;
145
- }[];
146
- };
147
- data: any;
148
- componentInstances: {
149
- [key: string]: object;
150
- };
151
- commonStyle: object | undefined;
152
- staticResourceAttribute: string[] | undefined;
153
- hideAdminPortalMenu: boolean | undefined;
154
- lowCodes: {
155
- type: string | undefined;
156
- code: string;
157
- description?: string | undefined;
158
- path?: string | undefined;
159
- name: string;
160
- }[] | undefined;
161
- listeners: {
162
- key: string;
163
- trigger: string;
164
- type: string | undefined;
165
- handler: {
166
- name: string | undefined;
167
- moduleName: string | undefined;
168
- };
169
- data: any;
170
- isCapturePhase: boolean;
171
- noPropagation: boolean;
172
- }[];
173
- };
174
- /**
175
- * [WeApps协议] to [CALS协议]
176
- *
177
- * @param data
178
- */
179
- export declare function serializePlatformApp(data: any, optsions: {
180
- dependencies: object[];
181
- }): IPlatformApp;
182
- /**
183
- * [CALS协议] to [WeApps协议]
184
- *
185
- * @param data
186
- */
187
- export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
188
- dependencies: object[];
189
- }): {
190
- id: any;
191
- version: string | undefined;
192
- author: string | undefined;
193
- name: string | undefined;
194
- label: string | undefined;
195
- description: string | undefined;
196
- selectedPageId: string;
197
- historyType: "HASH" | "BROWSER" | undefined;
198
- pageInstanceList: {
199
- id: string;
200
- isHome: boolean;
201
- dataset: any;
202
- vars: {
203
- data: {
204
- title: string | undefined;
205
- name: string;
206
- varType: "datasource";
207
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
208
- dataSourceName: string;
209
- initMethod?: IDataVarMethod | undefined;
210
- updateMethod?: IDataVarMethod | undefined;
211
- }[];
212
- };
213
- data: any;
214
- componentInstances: {
215
- [key: string]: object;
216
- };
217
- commonStyle: object | undefined;
218
- staticResourceAttribute: string[] | undefined;
219
- hideAdminPortalMenu: boolean | undefined;
220
- lowCodes: {
221
- type: string | undefined;
222
- code: string;
223
- description?: string | undefined;
224
- path?: string | undefined;
225
- name: string;
226
- }[] | undefined;
227
- listeners: {
228
- key: string;
229
- trigger: string;
230
- type: string | undefined;
231
- handler: {
232
- name: string | undefined;
233
- moduleName: string | undefined;
234
- };
235
- data: any;
236
- isCapturePhase: boolean;
237
- noPropagation: boolean;
238
- }[];
239
- }[];
240
- lowCodes: {
241
- type: string | undefined;
242
- code: string;
243
- description?: string | undefined;
244
- path?: string | undefined;
245
- name: string;
246
- }[];
247
- datasources: IPlatformDataSource[] | undefined;
248
- dataset: any;
249
- vars: {
250
- data: {
251
- title: string | undefined;
252
- name: string;
253
- varType: "datasource";
254
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
255
- dataSourceName: string;
256
- initMethod?: IDataVarMethod | undefined;
257
- updateMethod?: IDataVarMethod | undefined;
258
- }[];
259
- };
260
- compHiddenConfig: {
261
- [pageId: string]: string[];
262
- };
263
- npmDependencies: {
264
- [key: string]: string;
265
- };
266
- plugins: {
267
- title: string;
268
- name: string;
269
- module: string;
270
- type?: "kbone" | "mp" | undefined;
271
- version: string;
272
- }[];
273
- maxID: number | undefined;
274
- rootPath: string | null | undefined;
275
- themeVars: {
276
- [key: string]: string;
277
- } | undefined;
278
- presetColors: string[];
279
- appConfig: {} | undefined;
280
- miniprogramPlugins: {
281
- name: string;
282
- version: string;
283
- pluginAppId: string;
284
- componentConfigs: (object & {
285
- isMiniProgramPlugins?: boolean | undefined;
286
- })[];
287
- }[] | undefined;
288
- externalResources: import("../../types").IExternalResource[] | undefined;
289
- extra: {
290
- name: string | undefined;
291
- author: string | undefined;
292
- description: string | undefined;
293
- lastDependencies: {
294
- [key: string]: string;
295
- } | undefined;
296
- domain?: string | undefined;
297
- originHistoryId?: string | undefined;
298
- };
299
- dependencies: IDependencies | undefined;
300
- schemaVersion: string | undefined;
301
- };
302
- /**
303
- * page
304
- * [formily] to [CALS]
305
- */
306
- export declare function serializeRuntimePage(ctx: Pick<ISerializeContext, 'app' | 'dependencies' | 'streamlineDefaultValue'>, page: any): IPageComponent;
307
- /**
308
- * component
309
- * [formily] to [CALS]
310
- */
311
- export declare function serializeRuntimeComponent(ctx: ISerializeContext & {
312
- page: Required<ISerializeContext>['page'];
313
- }, component: any & {
314
- id: string;
315
- }): IBasicComponent | IComplexComponent;
316
- /**
317
- * component
318
- * [CALS] to [formily]
319
- * To be continue, currently support listener
320
- */
321
- export declare function deserializeRuntimeComponent(ctx: any, component: any): any;
322
- export declare function deserializeComponentLibraryMeta(meta: {
323
- styles?: string[];
324
- dependencies?: {
325
- [lib: string]: string;
326
- };
327
- components: {
328
- [key: string]: LCDS.IComponent;
329
- };
330
- actions: {
331
- [key: string]: LCDS.IAction;
332
- };
333
- }): {
334
- styles: string[];
335
- dependencies: {
336
- [lib: string]: string;
337
- };
338
- components: {
339
- [key: string]: {
340
- title: string;
341
- desc?: string | undefined;
342
- category: string;
343
- platforms?: {
344
- [key: string]: {
345
- tagName: 'audio';
346
- };
347
- } | undefined;
348
- thumbnail?: string | undefined;
349
- };
350
- };
351
- actions: {
352
- [key: string]: LCDS.IAction;
353
- };
354
- };
355
- export declare function processRuntimeCodeResources(ctx: {
356
- id: string;
357
- version?: string;
358
- }, resources: any, scope: string): any;
359
- /**
360
- * 解析 cals version 来生成 feature map
361
- */
362
- export declare function parseVersion(version?: string, dependencies?: never[]): {
363
- defaultDynamicCssUnit: boolean;
364
- enableObserverRef: boolean;
365
- enablePageRoot: boolean;
366
- };
1
+ import { IPlatformListener } from '../../types/platform/common';
2
+ import { IAttributes, IPlatformApp, IComplexComponent, IBasicComponent, IPageComponent, IDataSourceVariable, IDataVarMethod, // 勿删,为了生成d.ts
3
+ IPlatformDataSource, IDependencies, LCDS } from '../../types';
4
+ import { IDynamicValue, PropBindType } from '../expression';
5
+ import { IEventFlow } from '../../types/platform/eventFlow';
6
+ export { getUsedComps } from './utils/common';
7
+ export { generateDefaultCode } from './utils/template';
8
+ interface IDeserializeContext {
9
+ app?: IPlatformApp;
10
+ dependencies?: any[];
11
+ dependenciesMap?: any;
12
+ page?: IPageComponent;
13
+ }
14
+ interface ISerializeContext {
15
+ app?: any;
16
+ page?: {
17
+ id: string;
18
+ };
19
+ component?: {
20
+ id: string;
21
+ module?: string;
22
+ component?: string;
23
+ };
24
+ /**
25
+ * 依赖描述
26
+ * map 由 数组处理得到
27
+ */
28
+ dependencies?: any[];
29
+ dependenciesMap?: any;
30
+ streamlineDefaultValue?: boolean;
31
+ streamlineModuleName?: boolean;
32
+ }
33
+ export declare function serializeValue({ ctx, key, dynamicValue, scope, streamlineDefaultValue, }: {
34
+ ctx: ISerializeContext;
35
+ key: string;
36
+ dynamicValue: IDynamicValue;
37
+ scope?: 'page' | 'component';
38
+ streamlineDefaultValue?: boolean;
39
+ }): {
40
+ key: string;
41
+ value: any;
42
+ extra?: any;
43
+ };
44
+ export declare function deserializeValue(ctx: IDeserializeContext, key: string, value: any, extra?: any): {
45
+ key: string;
46
+ value: {
47
+ type: PropBindType;
48
+ value: any;
49
+ extra: any;
50
+ };
51
+ };
52
+ interface ISerializeDynamicMapProps {
53
+ ctx: ISerializeContext;
54
+ map: {
55
+ [key: string]: IDynamicValue;
56
+ };
57
+ scope?: 'page' | 'component';
58
+ streamlineDefaultValue?: boolean;
59
+ }
60
+ export declare function serializeDynamicMap(props: ISerializeDynamicMapProps): {
61
+ [key: string]: string;
62
+ };
63
+ export declare function deserializeDynamicMap(ctx: IDeserializeContext, map: {
64
+ [key: string]: string | any;
65
+ }, extraMap?: {
66
+ [key: string]: any;
67
+ }): {
68
+ [key: string]: IDynamicValue;
69
+ };
70
+ export declare function serializeAttributes(ctx: ISerializeContext, scope: 'page' | 'component', attributes?: {
71
+ [key: string]: IDynamicValue;
72
+ }): {
73
+ [key: string]: string;
74
+ };
75
+ export declare function deserializeAttributes(ctx: IDeserializeContext, attributes?: IAttributes, attributesExtraData?: {}): {
76
+ [key: string]: IDynamicValue;
77
+ };
78
+ export declare function deserializeDataVariables(ctx: IDeserializeContext, data: IDataSourceVariable): {
79
+ title: string;
80
+ name: string;
81
+ varType: "datasource";
82
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
83
+ dataSourceName: string;
84
+ initMethod?: IDataVarMethod;
85
+ updateMethod?: IDataVarMethod;
86
+ };
87
+ export declare function serializeComponent(ctx: ISerializeContext & ({
88
+ page: Required<ISerializeContext>['page'];
89
+ } | {
90
+ component: Required<ISerializeContext>['component'];
91
+ }), component: {
92
+ xComponent?: {
93
+ moduleName: string;
94
+ name: string;
95
+ };
96
+ xProps?: {
97
+ data: {
98
+ [prop: string]: IDynamicValue;
99
+ };
100
+ directives?: {
101
+ waIf?: IDynamicValue;
102
+ waDisplay?: IDynamicValue;
103
+ waFor?: IDynamicValue;
104
+ waForKey?: IDynamicValue;
105
+ };
106
+ listeners?: any[];
107
+ style: any;
108
+ styleBind: IDynamicValue;
109
+ classList: string[];
110
+ classListBind: IDynamicValue;
111
+ commonStyle: any;
112
+ styleBindPath?: string;
113
+ staticResourceAttribute: string[];
114
+ };
115
+ xIndex?: number;
116
+ properties?: {
117
+ [key: string]: any;
118
+ };
119
+ } & {
120
+ id: string;
121
+ label?: string;
122
+ }, scope?: 'page' | 'component'): IBasicComponent | IComplexComponent;
123
+ export declare function deserializeComponent(ctx: IDeserializeContext, components: (IBasicComponent | IComplexComponent)[]): {
124
+ [key: string]: object;
125
+ };
126
+ export declare function serializePage(ctx: Pick<ISerializeContext, 'app' | 'dependencies' | 'dependenciesMap'>, page: any): IPageComponent;
127
+ export declare function deserializePage(ctx: {
128
+ app: Required<IDeserializeContext>['app'];
129
+ dependencies: IDeserializeContext['dependencies'];
130
+ homePageId: string;
131
+ }, page: IPageComponent): {
132
+ id: string;
133
+ isHome: boolean;
134
+ dataset: any;
135
+ vars: {
136
+ data: {
137
+ title: string;
138
+ name: string;
139
+ varType: "datasource";
140
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
141
+ dataSourceName: string;
142
+ initMethod?: IDataVarMethod;
143
+ updateMethod?: IDataVarMethod;
144
+ }[];
145
+ };
146
+ data: {
147
+ [key: string]: IDynamicValue;
148
+ };
149
+ componentInstances: {
150
+ [key: string]: object;
151
+ };
152
+ commonStyle: object;
153
+ staticResourceAttribute: string[];
154
+ hideAdminPortalMenu: boolean;
155
+ lowCodes: {
156
+ type: string;
157
+ code: string;
158
+ description?: string;
159
+ path?: string;
160
+ name: string;
161
+ }[];
162
+ listeners: {
163
+ key: string;
164
+ trigger: string;
165
+ type: string;
166
+ handler: {
167
+ name: string;
168
+ moduleName: string;
169
+ };
170
+ data: {
171
+ [key: string]: IDynamicValue;
172
+ };
173
+ isCapturePhase: boolean;
174
+ noPropagation: boolean;
175
+ }[];
176
+ eventFlows: {
177
+ listeners: {
178
+ key: string;
179
+ trigger: string;
180
+ type: string;
181
+ handler: {
182
+ name: string;
183
+ moduleName: string;
184
+ };
185
+ data: {
186
+ [key: string]: IDynamicValue;
187
+ };
188
+ isCapturePhase: boolean;
189
+ noPropagation: boolean;
190
+ }[];
191
+ id: string;
192
+ label?: string;
193
+ description?: string;
194
+ }[];
195
+ };
196
+ /**
197
+ * [WeApps协议] to [CALS协议]
198
+ *
199
+ * @param data
200
+ */
201
+ export declare function serializePlatformApp(data: any, optsions: {
202
+ dependencies: object[];
203
+ }): IPlatformApp;
204
+ /**
205
+ * [CALS协议] to [WeApps协议]
206
+ *
207
+ * @param data
208
+ */
209
+ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
210
+ dependencies: object[];
211
+ }): {
212
+ id: any;
213
+ version: string;
214
+ author: string;
215
+ name: string;
216
+ label: string;
217
+ description: string;
218
+ selectedPageId: string;
219
+ historyType: "HASH" | "BROWSER";
220
+ pageInstanceList: {
221
+ id: string;
222
+ isHome: boolean;
223
+ dataset: any;
224
+ vars: {
225
+ data: {
226
+ title: string;
227
+ name: string;
228
+ varType: "datasource";
229
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
230
+ dataSourceName: string;
231
+ initMethod?: IDataVarMethod;
232
+ updateMethod?: IDataVarMethod;
233
+ }[];
234
+ };
235
+ data: {
236
+ [key: string]: IDynamicValue;
237
+ };
238
+ componentInstances: {
239
+ [key: string]: object;
240
+ };
241
+ commonStyle: object;
242
+ staticResourceAttribute: string[];
243
+ hideAdminPortalMenu: boolean;
244
+ lowCodes: {
245
+ type: string;
246
+ code: string;
247
+ description?: string;
248
+ path?: string;
249
+ name: string;
250
+ }[];
251
+ listeners: {
252
+ key: string;
253
+ trigger: string;
254
+ type: string;
255
+ handler: {
256
+ name: string;
257
+ moduleName: string;
258
+ };
259
+ data: {
260
+ [key: string]: IDynamicValue;
261
+ };
262
+ isCapturePhase: boolean;
263
+ noPropagation: boolean;
264
+ }[];
265
+ eventFlows: {
266
+ listeners: {
267
+ key: string;
268
+ trigger: string;
269
+ type: string;
270
+ handler: {
271
+ name: string;
272
+ moduleName: string;
273
+ };
274
+ data: {
275
+ [key: string]: IDynamicValue;
276
+ };
277
+ isCapturePhase: boolean;
278
+ noPropagation: boolean;
279
+ }[];
280
+ id: string;
281
+ label?: string;
282
+ description?: string;
283
+ }[];
284
+ }[];
285
+ lowCodes: {
286
+ type: string;
287
+ code: string;
288
+ description?: string;
289
+ path?: string;
290
+ name: string;
291
+ }[];
292
+ datasources: IPlatformDataSource[];
293
+ dataset: any;
294
+ vars: {
295
+ data: {
296
+ title: string;
297
+ name: string;
298
+ varType: "datasource";
299
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
300
+ dataSourceName: string;
301
+ initMethod?: IDataVarMethod;
302
+ updateMethod?: IDataVarMethod;
303
+ }[];
304
+ };
305
+ compHiddenConfig: {
306
+ [pageId: string]: string[];
307
+ };
308
+ npmDependencies: {
309
+ [key: string]: string;
310
+ };
311
+ plugins: {
312
+ title: string;
313
+ name: string;
314
+ module: string;
315
+ type?: "kbone" | "mp";
316
+ version: string;
317
+ }[];
318
+ maxID: number;
319
+ rootPath: string;
320
+ themeVars: {
321
+ [key: string]: string;
322
+ };
323
+ presetColors: string[];
324
+ appConfig: {};
325
+ miniprogramPlugins: {
326
+ name: string;
327
+ version: string;
328
+ pluginAppId: string;
329
+ componentConfigs: (object & {
330
+ isMiniProgramPlugins?: boolean;
331
+ })[];
332
+ }[];
333
+ externalResources: import("../../types").IExternalResource[];
334
+ extra: {
335
+ name: string;
336
+ author: string;
337
+ description: string;
338
+ lastDependencies: {
339
+ [key: string]: string;
340
+ };
341
+ domain?: string;
342
+ originHistoryId?: string;
343
+ };
344
+ dependencies: IDependencies;
345
+ schemaVersion: string;
346
+ };
347
+ /**
348
+ * page
349
+ * [formily] to [CALS]
350
+ */
351
+ export declare function serializeRuntimePage(ctx: Pick<ISerializeContext, 'app' | 'dependencies' | 'streamlineDefaultValue'>, page: any): IPageComponent;
352
+ /**
353
+ * component
354
+ * [formily] to [CALS]
355
+ */
356
+ export declare function serializeRuntimeComponent(ctx: ISerializeContext & {
357
+ page: Required<ISerializeContext>['page'];
358
+ }, component: any & {
359
+ id: string;
360
+ }): IBasicComponent | IComplexComponent;
361
+ /**
362
+ * component
363
+ * [CALS] to [formily]
364
+ * To be continue, currently support listener
365
+ */
366
+ export declare function deserializeRuntimeComponent(ctx: any, component: any): any;
367
+ export declare function deserializeComponentLibraryMeta(meta: {
368
+ styles?: string[];
369
+ dependencies?: {
370
+ [lib: string]: string;
371
+ };
372
+ components: {
373
+ [key: string]: LCDS.IComponent;
374
+ };
375
+ actions: {
376
+ [key: string]: LCDS.IAction;
377
+ };
378
+ }): {
379
+ styles: string[];
380
+ dependencies: {
381
+ [lib: string]: string;
382
+ };
383
+ components: {
384
+ [key: string]: {
385
+ title: string;
386
+ desc?: string;
387
+ category: string;
388
+ platforms?: {
389
+ [key: string]: {
390
+ tagName: 'audio';
391
+ };
392
+ };
393
+ thumbnail?: string;
394
+ };
395
+ };
396
+ actions: {
397
+ [key: string]: LCDS.IAction;
398
+ };
399
+ };
400
+ export declare function processRuntimeCodeResources(ctx: {
401
+ id: string;
402
+ version?: string;
403
+ }, resources: any[], scope: string): any[];
404
+ /**
405
+ * 解析 cals version 来生成 feature map
406
+ */
407
+ export declare function parseVersion(version?: string, dependencies?: any[]): {
408
+ defaultDynamicCssUnit: boolean;
409
+ enableObserverRef: boolean;
410
+ enablePageRoot: boolean;
411
+ };
412
+ export declare function processListeners(listeners: IPlatformListener[], options?: {
413
+ strict: boolean;
414
+ }): {
415
+ listeners: IPlatformListener[];
416
+ eventFlows: IEventFlow[];
417
+ };
367
418
  //# sourceMappingURL=index.d.ts.map