@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.
Files changed (125) hide show
  1. package/lib/parser/cals/index.d.ts +379 -366
  2. package/lib/parser/cals/index.d.ts.map +1 -1
  3. package/lib/parser/cals/index.js +75 -13
  4. package/lib/parser/cals/utils/block/index.d.ts +14 -14
  5. package/lib/parser/cals/utils/block/index.d.ts.map +0 -0
  6. package/lib/parser/cals/utils/block/index.js +3 -3
  7. package/lib/parser/cals/utils/code/index.d.ts +30 -30
  8. package/lib/parser/cals/utils/code/index.d.ts.map +0 -0
  9. package/lib/parser/cals/utils/code/index.js +12 -13
  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 -2
  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 -3
  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 +6 -3
  25. package/lib/parser/cals/utils/version/common.d.ts +4 -4
  26. package/lib/parser/cals/utils/version/common.d.ts.map +0 -0
  27. package/lib/parser/cals/utils/version/common.js +34 -11
  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 +0 -0
  36. package/lib/parser/cals/utils/version/parses.js +37 -14
  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 -2
  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 +6 -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 -359
  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 +3 -13
  125. package/lib/cloudbase.cals.umd.min.js +0 -5
@@ -1,367 +1,380 @@
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
+ };
177
+ /**
178
+ * [WeApps协议] to [CALS协议]
179
+ *
180
+ * @param data
181
+ */
182
+ export declare function serializePlatformApp(data: any, optsions: {
183
+ dependencies: object[];
184
+ }): IPlatformApp;
185
+ /**
186
+ * [CALS协议] to [WeApps协议]
187
+ *
188
+ * @param data
189
+ */
190
+ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
191
+ dependencies: object[];
192
+ }): {
193
+ id: any;
194
+ version: string;
195
+ author: string;
196
+ name: string;
197
+ label: string;
198
+ description: string;
199
+ selectedPageId: string;
200
+ historyType: "HASH" | "BROWSER";
201
+ pageInstanceList: {
202
+ id: string;
203
+ isHome: boolean;
204
+ dataset: any;
205
+ vars: {
206
+ data: {
207
+ title: string;
208
+ name: string;
209
+ varType: "datasource";
210
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
211
+ dataSourceName: string;
212
+ initMethod?: IDataVarMethod;
213
+ updateMethod?: IDataVarMethod;
214
+ }[];
215
+ };
216
+ data: {
217
+ [key: string]: IDynamicValue;
218
+ };
219
+ componentInstances: {
220
+ [key: string]: object;
221
+ };
222
+ commonStyle: object;
223
+ staticResourceAttribute: string[];
224
+ hideAdminPortalMenu: boolean;
225
+ lowCodes: {
226
+ type: string;
227
+ code: string;
228
+ description?: string;
229
+ path?: string;
230
+ name: string;
231
+ }[];
232
+ listeners: {
233
+ key: string;
234
+ trigger: string;
235
+ type: string;
236
+ handler: {
237
+ name: string;
238
+ moduleName: string;
239
+ };
240
+ data: {
241
+ [key: string]: IDynamicValue;
242
+ };
243
+ isCapturePhase: boolean;
244
+ noPropagation: boolean;
245
+ }[];
246
+ }[];
247
+ lowCodes: {
248
+ type: string;
249
+ code: string;
250
+ description?: string;
251
+ path?: string;
252
+ name: string;
253
+ }[];
254
+ datasources: IPlatformDataSource[];
255
+ dataset: any;
256
+ vars: {
257
+ data: {
258
+ title: string;
259
+ name: string;
260
+ varType: "datasource";
261
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
262
+ dataSourceName: string;
263
+ initMethod?: IDataVarMethod;
264
+ updateMethod?: IDataVarMethod;
265
+ }[];
266
+ };
267
+ compHiddenConfig: {
268
+ [pageId: string]: string[];
269
+ };
270
+ npmDependencies: {
271
+ [key: string]: string;
272
+ };
273
+ plugins: {
274
+ title: string;
275
+ name: string;
276
+ module: string;
277
+ type?: "kbone" | "mp";
278
+ version: string;
279
+ }[];
280
+ maxID: number;
281
+ rootPath: string;
282
+ themeVars: {
283
+ [key: string]: string;
284
+ };
285
+ presetColors: string[];
286
+ appConfig: {};
287
+ miniprogramPlugins: {
288
+ name: string;
289
+ version: string;
290
+ pluginAppId: string;
291
+ componentConfigs: (object & {
292
+ isMiniProgramPlugins?: boolean;
293
+ })[];
294
+ }[];
295
+ externalResources: import("../../types").IExternalResource[];
296
+ extra: {
297
+ name: string;
298
+ author: string;
299
+ description: string;
300
+ lastDependencies: {
301
+ [key: string]: string;
302
+ };
303
+ domain?: string;
304
+ originHistoryId?: string;
305
+ };
306
+ dependencies: IDependencies;
307
+ schemaVersion: string;
308
+ };
309
+ /**
310
+ * page
311
+ * [formily] to [CALS]
312
+ */
313
+ export declare function serializeRuntimePage(ctx: Pick<ISerializeContext, 'app' | 'dependencies' | 'streamlineDefaultValue'>, page: any): IPageComponent;
314
+ /**
315
+ * component
316
+ * [formily] to [CALS]
317
+ */
318
+ export declare function serializeRuntimeComponent(ctx: ISerializeContext & {
319
+ page: Required<ISerializeContext>['page'];
320
+ }, component: any & {
321
+ id: string;
322
+ }): IBasicComponent | IComplexComponent;
323
+ /**
324
+ * component
325
+ * [CALS] to [formily]
326
+ * To be continue, currently support listener
327
+ */
328
+ export declare function deserializeRuntimeComponent(ctx: any, component: any): any;
329
+ export declare function deserializeComponentLibraryMeta(meta: {
330
+ styles?: string[];
331
+ dependencies?: {
332
+ [lib: string]: string;
333
+ };
334
+ components: {
335
+ [key: string]: LCDS.IComponent;
336
+ };
337
+ actions: {
338
+ [key: string]: LCDS.IAction;
339
+ };
340
+ }): {
341
+ styles: string[];
342
+ dependencies: {
343
+ [lib: string]: string;
344
+ };
345
+ components: {
346
+ [key: string]: {
347
+ title: string;
348
+ desc?: string;
349
+ category: string;
350
+ platforms?: {
351
+ [key: string]: {
352
+ tagName: 'audio';
353
+ };
354
+ };
355
+ thumbnail?: string;
356
+ };
357
+ };
358
+ actions: {
359
+ [key: string]: LCDS.IAction;
360
+ };
361
+ };
362
+ export declare function processRuntimeCodeResources(ctx: {
363
+ id: string;
364
+ version?: string;
365
+ }, resources: any[], scope: string): any[];
366
+ /**
367
+ * 解析 cals version 来生成 feature map
368
+ */
369
+ export declare function parseVersion(version?: string, dependencies?: any[]): {
370
+ defaultDynamicCssUnit: boolean;
371
+ enableObserverRef: boolean;
372
+ enablePageRoot: boolean;
373
+ };
374
+ export declare function processListeners(listeners: IPlatformListener[], options?: {
375
+ strict: boolean;
376
+ }): {
377
+ listeners: IPlatformListener[];
378
+ eventFlows: IEventFlow[];
379
+ };
367
380
  //# sourceMappingURL=index.d.ts.map