@cloudbase/cals 0.3.14 → 0.3.18

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.
@@ -1,5 +1,5 @@
1
1
  import { IAttributes, IPlatformApp, IComplexComponent, IBasicComponent, IPageComponent, IDataSourceVariable, IDataVarMethod, // 勿删,为了生成d.ts
2
- IPlatformDataSource, LCDS } from '../../types';
2
+ IPlatformDataSource, IDependencies, LCDS } from '../../types';
3
3
  import { IDynamicValue, PropBindType } from '../expression';
4
4
  interface IDeserializeContext {
5
5
  app?: IPlatformApp;
@@ -45,12 +45,6 @@ export declare function deserializeValue(ctx: IDeserializeContext, key: string,
45
45
  type: PropBindType;
46
46
  value: any;
47
47
  };
48
- } | {
49
- key: string;
50
- value: {
51
- type: undefined;
52
- value: any;
53
- } | undefined;
54
48
  };
55
49
  export declare function serializeDynamicMap({ ctx, map, scope, streamlineDefaultValue, }: {
56
50
  ctx: ISerializeContext;
@@ -66,7 +60,7 @@ export declare function deserializeDynamicMap(ctx: IDeserializeContext, map: {
66
60
  [key: string]: string | any;
67
61
  }): {
68
62
  [key: string]: {
69
- type?: string | undefined;
63
+ type?: string;
70
64
  value: any;
71
65
  };
72
66
  };
@@ -77,18 +71,18 @@ export declare function serializeAttributes(ctx: ISerializeContext, scope: 'page
77
71
  };
78
72
  export declare function deserializeAttributes(ctx: IDeserializeContext, attributes?: IAttributes): {
79
73
  [key: string]: {
80
- type?: string | undefined;
74
+ type?: string;
81
75
  value: any;
82
76
  };
83
77
  };
84
78
  export declare function deserializeDataVariables(ctx: IDeserializeContext, data: IDataSourceVariable): {
85
- title: string | undefined;
79
+ title: string;
86
80
  name: string;
87
81
  varType: "datasource";
88
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
82
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
89
83
  dataSourceName: string;
90
- initMethod?: IDataVarMethod | undefined;
91
- updateMethod?: IDataVarMethod | undefined;
84
+ initMethod?: IDataVarMethod;
85
+ updateMethod?: IDataVarMethod;
92
86
  };
93
87
  export declare function serializeComponent(ctx: ISerializeContext & ({
94
88
  page: Required<ISerializeContext>['page'];
@@ -132,23 +126,23 @@ export declare function deserializePage(ctx: {
132
126
  dependencies: IDeserializeContext['dependencies'];
133
127
  homePageId: string;
134
128
  }, page: IPageComponent): {
135
- id: string | undefined;
129
+ id: string;
136
130
  isHome: boolean;
137
131
  dataset: any;
138
132
  vars: {
139
133
  data: {
140
- title: string | undefined;
134
+ title: string;
141
135
  name: string;
142
136
  varType: "datasource";
143
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
137
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
144
138
  dataSourceName: string;
145
- initMethod?: IDataVarMethod | undefined;
146
- updateMethod?: IDataVarMethod | undefined;
139
+ initMethod?: IDataVarMethod;
140
+ updateMethod?: IDataVarMethod;
147
141
  }[];
148
142
  };
149
143
  data: {
150
144
  [key: string]: {
151
- type?: string | undefined;
145
+ type?: string;
152
146
  value: any;
153
147
  };
154
148
  };
@@ -163,36 +157,36 @@ export declare function deserializePage(ctx: {
163
157
  propertyPath: string;
164
158
  bindDataPath: string;
165
159
  type?: any;
166
- }[] | undefined;
160
+ }[];
167
161
  dataTypes?: {
168
162
  propertyPath: string;
169
- type?: "bind" | "static" | "slot" | undefined;
170
- }[] | undefined;
163
+ type?: "static" | "slot" | "bind";
164
+ }[];
171
165
  key: string;
172
166
  sourceKey: string;
173
- instanceFunction?: string | undefined;
174
- } | undefined;
175
- commonStyle: object | undefined;
176
- staticResourceAttribute: string[] | undefined;
177
- hideAdminPortalMenu: boolean | undefined;
167
+ instanceFunction?: string;
168
+ };
169
+ commonStyle: object;
170
+ staticResourceAttribute: string[];
171
+ hideAdminPortalMenu: boolean;
178
172
  lowCodes: {
179
- type: string | undefined;
173
+ type: string;
180
174
  code: string;
181
- description?: string | undefined;
182
- path?: string | undefined;
175
+ description?: string;
176
+ path?: string;
183
177
  name: string;
184
- }[] | undefined;
178
+ }[];
185
179
  listeners: {
186
180
  key: string;
187
181
  trigger: string;
188
- type: string | undefined;
182
+ type: string;
189
183
  handler: {
190
- name: string | undefined;
191
- moduleName: string | undefined;
184
+ name: string;
185
+ moduleName: string;
192
186
  };
193
187
  data: {
194
188
  [key: string]: {
195
- type?: string | undefined;
189
+ type?: string;
196
190
  value: any;
197
191
  };
198
192
  };
@@ -217,31 +211,31 @@ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
217
211
  dependencies: object[];
218
212
  }): {
219
213
  id: any;
220
- version: string | undefined;
221
- author: string | undefined;
222
- name: string | undefined;
223
- label: string | undefined;
224
- description: string | undefined;
214
+ version: string;
215
+ author: string;
216
+ name: string;
217
+ label: string;
218
+ description: string;
225
219
  selectedPageId: string;
226
- historyType: "HASH" | "BROWSER" | undefined;
220
+ historyType: "HASH" | "BROWSER";
227
221
  pageInstanceList: {
228
- id: string | undefined;
222
+ id: string;
229
223
  isHome: boolean;
230
224
  dataset: any;
231
225
  vars: {
232
226
  data: {
233
- title: string | undefined;
227
+ title: string;
234
228
  name: string;
235
229
  varType: "datasource";
236
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
230
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
237
231
  dataSourceName: string;
238
- initMethod?: IDataVarMethod | undefined;
239
- updateMethod?: IDataVarMethod | undefined;
232
+ initMethod?: IDataVarMethod;
233
+ updateMethod?: IDataVarMethod;
240
234
  }[];
241
235
  };
242
236
  data: {
243
237
  [key: string]: {
244
- type?: string | undefined;
238
+ type?: string;
245
239
  value: any;
246
240
  };
247
241
  };
@@ -256,36 +250,36 @@ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
256
250
  propertyPath: string;
257
251
  bindDataPath: string;
258
252
  type?: any;
259
- }[] | undefined;
253
+ }[];
260
254
  dataTypes?: {
261
255
  propertyPath: string;
262
- type?: "bind" | "static" | "slot" | undefined;
263
- }[] | undefined;
256
+ type?: "static" | "slot" | "bind";
257
+ }[];
264
258
  key: string;
265
259
  sourceKey: string;
266
- instanceFunction?: string | undefined;
267
- } | undefined;
268
- commonStyle: object | undefined;
269
- staticResourceAttribute: string[] | undefined;
270
- hideAdminPortalMenu: boolean | undefined;
260
+ instanceFunction?: string;
261
+ };
262
+ commonStyle: object;
263
+ staticResourceAttribute: string[];
264
+ hideAdminPortalMenu: boolean;
271
265
  lowCodes: {
272
- type: string | undefined;
266
+ type: string;
273
267
  code: string;
274
- description?: string | undefined;
275
- path?: string | undefined;
268
+ description?: string;
269
+ path?: string;
276
270
  name: string;
277
- }[] | undefined;
271
+ }[];
278
272
  listeners: {
279
273
  key: string;
280
274
  trigger: string;
281
- type: string | undefined;
275
+ type: string;
282
276
  handler: {
283
- name: string | undefined;
284
- moduleName: string | undefined;
277
+ name: string;
278
+ moduleName: string;
285
279
  };
286
280
  data: {
287
281
  [key: string]: {
288
- type?: string | undefined;
282
+ type?: string;
289
283
  value: any;
290
284
  };
291
285
  };
@@ -294,23 +288,23 @@ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
294
288
  }[];
295
289
  }[];
296
290
  lowCodes: {
297
- type: string | undefined;
291
+ type: string;
298
292
  code: string;
299
- description?: string | undefined;
300
- path?: string | undefined;
293
+ description?: string;
294
+ path?: string;
301
295
  name: string;
302
296
  }[];
303
- datasources: IPlatformDataSource[] | undefined;
297
+ datasources: IPlatformDataSource[];
304
298
  dataset: any;
305
299
  vars: {
306
300
  data: {
307
- title: string | undefined;
301
+ title: string;
308
302
  name: string;
309
303
  varType: "datasource";
310
- dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit" | undefined;
304
+ dataType?: "record-collection" | "new-record" | "single-record" | "single-record-edit";
311
305
  dataSourceName: string;
312
- initMethod?: IDataVarMethod | undefined;
313
- updateMethod?: IDataVarMethod | undefined;
306
+ initMethod?: IDataVarMethod;
307
+ updateMethod?: IDataVarMethod;
314
308
  }[];
315
309
  };
316
310
  npmDependencies: {
@@ -320,29 +314,30 @@ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
320
314
  title: string;
321
315
  name: string;
322
316
  module: string;
323
- type?: "kbone" | "mp" | undefined;
317
+ type?: "kbone" | "mp";
324
318
  version: string;
325
319
  }[];
326
- maxID: number | undefined;
327
- rootPath: string | null | undefined;
320
+ maxID: number;
321
+ rootPath: string;
328
322
  themeVars: {
329
323
  [key: string]: string;
330
- } | undefined;
324
+ };
331
325
  presetColors: string[];
332
- appConfig: {} | undefined;
326
+ appConfig: {};
333
327
  miniprogramPlugins: {
334
328
  name: string;
335
329
  version: string;
336
330
  pluginAppId: string;
337
331
  componentConfigs: (object & {
338
- isMiniProgramPlugins?: boolean | undefined;
332
+ isMiniProgramPlugins?: boolean;
339
333
  })[];
340
- }[] | undefined;
334
+ }[];
341
335
  extra: {
342
- name: string | undefined;
343
- author: string | undefined;
344
- description: string | undefined;
336
+ name: string;
337
+ author: string;
338
+ description: string;
345
339
  };
340
+ dependencies: IDependencies;
346
341
  };
347
342
  /**
348
343
  * page
@@ -383,14 +378,14 @@ export declare function deserializeComponentLibraryMeta(meta: {
383
378
  components: {
384
379
  [key: string]: {
385
380
  title: string;
386
- desc?: string | undefined;
381
+ desc?: string;
387
382
  category: string;
388
383
  platforms?: {
389
384
  [key: string]: {
390
385
  tagName: 'audio';
391
386
  };
392
- } | undefined;
393
- thumbnail?: string | undefined;
387
+ };
388
+ thumbnail?: string;
394
389
  };
395
390
  };
396
391
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../parser/cals/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,WAAW,EACX,YAAY,EAEZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EAGd,mBAAmB,EACnB,cAAc,EAAE,cAAc;AAC9B,mBAAmB,EACnB,IAAI,EACL,MAAM,aAAa,CAAA;AAEpB,OAAO,EAGL,aAAa,EACb,YAAY,EACb,MAAM,eAAe,CA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AE;IACpD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACxC,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAA;KAAE,CAAA;IAC9C,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,OAAO,CAAA;KAAE,CAAA;CACzC;;;;;;;mBAUY,MAAM;mBACN,MAAM;sBACH,MAAM;;;6BACwB,OAAO;;;wBACnC,MAAM;;;EA8BvB"}
@@ -165,7 +165,7 @@ function serializeDynamicMap({ ctx, map = {}, scope = 'page', streamlineDefaultV
165
165
  let ValueTmp = processedValue;
166
166
  /* 选区结构处理 [formily] to [CALS] */
167
167
  if (Array.isArray(ValueTmp) &&
168
- (ValueTmp === null || ValueTmp === void 0 ? void 0 : ValueTmp.some((item) => item.selectableBlock))) {
168
+ (ValueTmp === null || ValueTmp === void 0 ? void 0 : ValueTmp.some((item) => item && item.selectableBlock))) {
169
169
  ValueTmp = (0, lodash_1.cloneDeep)(processedValue);
170
170
  ValueTmp === null || ValueTmp === void 0 ? void 0 : ValueTmp.map((_value) => {
171
171
  var _a, _b, _c;
@@ -196,7 +196,7 @@ function deserializeDynamicMap(ctx, map) {
196
196
  let ValueTmp = processedValue;
197
197
  /* 选区结构处理 [CALS] to [formily] */
198
198
  if (Array.isArray(processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) &&
199
- ((_b = processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) === null || _b === void 0 ? void 0 : _b.some((item) => item.selectableBlock))) {
199
+ ((_b = processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) === null || _b === void 0 ? void 0 : _b.some((item) => item && item.selectableBlock))) {
200
200
  ValueTmp = (0, lodash_1.cloneDeep)(processedValue);
201
201
  (_c = ValueTmp === null || ValueTmp === void 0 ? void 0 : ValueTmp.value) === null || _c === void 0 ? void 0 : _c.map((_value) => {
202
202
  var _a, _b, _c, _d;
@@ -688,7 +688,7 @@ exports.deserializePage = deserializePage;
688
688
  */
689
689
  function serializePlatformApp(data, optsions) {
690
690
  var _a;
691
- let { version, author, name, label, description, selectedPageId, pageInstanceList, lowCodes = [], datasources, vars, dataset, extra, miniprogramPlugins } = data, restData = __rest(data, ["version", "author", "name", "label", "description", "selectedPageId", "pageInstanceList", "lowCodes", "datasources", "vars", "dataset", "extra", "miniprogramPlugins"]);
691
+ let { version, author, name, label, description, selectedPageId, pageInstanceList, lowCodes = [], datasources, vars, dataset, extra, dependencies: calsDependencies, miniprogramPlugins } = data, restData = __rest(data, ["version", "author", "name", "label", "description", "selectedPageId", "pageInstanceList", "lowCodes", "datasources", "vars", "dataset", "extra", "dependencies", "miniprogramPlugins"]);
692
692
  let { dependencies = [] } = optsions || {};
693
693
  const _b = extra || {}, { name: extraName, label: extraLabel, author: extraAuthor, description: extraDescription } = _b, restExtra = __rest(_b, ["name", "label", "author", "description"]);
694
694
  const ctx = {
@@ -709,6 +709,7 @@ function serializePlatformApp(data, optsions) {
709
709
  dataSources: datasources,
710
710
  dataset: serializeDataset(ctx, dataset),
711
711
  dataVariables: (0, runtime_1.getValidValue)(vars === null || vars === void 0 ? void 0 : vars.data.map((item) => serializeDataVariables(ctx, item))),
712
+ dependencies: calsDependencies,
712
713
  extra: Object.assign(Object.assign(Object.assign({}, restExtra), restData), { miniprogramPlugins, historyType: data.historyType, npmDependencies: data.npmDependencies || {}, plugins: data.plugins, maxID: data.maxID, rootPath: data.rootPath, themeVars: data.themeVars, presetColors: data.presetColors, appConfig: data.appConfig }),
713
714
  };
714
715
  return processed;
@@ -760,6 +761,7 @@ function deserializePlatformApp(data, optsions) {
760
761
  appConfig: appConfig,
761
762
  miniprogramPlugins,
762
763
  extra: Object.assign(Object.assign({}, restExtra), { name: data.name, author: data.author, description: data.description }),
764
+ dependencies: data.dependencies,
763
765
  // TODO
764
766
  // emitEvents: [], { "name": "自定义校验规则", "eventName": "validator" }
765
767
  };
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../parser/cals/utils/runtime.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAC5B,UAAU,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAmB,EACnD,WAAW,GAAE,MAAM,EAAO,GACzB,MAAM,CA+DR;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,OAuCtC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,OA8BvC;AAED,wBAAgB,aAAa,CAAC,iBAAiB,GAAE,GAAG,EAAO,OAiB1D;AAED,wBAAgB,cAAc,CAAC,SAAS,GAAE,GAAG,EAAO,SAenD;AAGD,wBAAgB,gBAAgB,CAAC,IAAI,KAAU,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,OAgExE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAKjE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,OAWvC"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../parser/cals/utils/runtime.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAC5B,UAAU,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAmB,EACnD,WAAW,GAAE,MAAM,EAAO,GACzB,MAAM,CA+DR;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,OAuCtC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,OA8BvC;AAED,wBAAgB,aAAa,CAAC,iBAAiB,GAAE,GAAG,EAAO,OAiB1D;AAED,wBAAgB,cAAc,CAAC,SAAS,GAAE,GAAG,EAAO,SAenD;AAGD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,OAgExE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAKjE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,OAWvC"}
@@ -1,12 +1,12 @@
1
1
  export declare function init(json: any): void;
2
2
  export declare function getId(): string;
3
- export declare function isComplexComponent(name?: string): string | undefined;
4
- export declare function isGsdH5ReactComponent(name?: string): string | undefined;
5
- export declare function addDefaultSlot(slotKey: string[] | undefined, comp: any): void;
3
+ export declare function isComplexComponent(name?: string): string;
4
+ export declare function isGsdH5ReactComponent(name?: string): string;
5
+ export declare function addDefaultSlot(slotKey: string[], comp: any): void;
6
6
  export declare function addDefaultData(defaultData: any, comp: any): void;
7
7
  export declare function isComplexJSON(json: any): any;
8
8
  export declare function getComponentChildren(component: any): [string, unknown][];
9
- export declare function isWeAppId(key?: string): RegExpMatchArray | null;
9
+ export declare function isWeAppId(key?: string): RegExpMatchArray;
10
10
  export declare function isEmptyObject(obj?: {}): boolean;
11
11
  export declare function isPlainObject(src: any): boolean;
12
12
  export declare function checkIsNeedAddFormWrapper(tree: any): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../parser/cals/utils/version/utils.ts"],"names":[],"mappings":"AASA,wBAAgB,IAAI,CAAC,IAAI,EAAE,GAAG,QA6B7B;AAED,wBAAgB,KAAK,WAEpB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,SAAK,sBAQ3C;AAED,wBAAgB,qBAAqB,CAAC,IAAI,SAAK,sBAQ9C;AAED,wBAAgB,cAAc,CAAC,OAAO,sBAAe,EAAE,IAAI,EAAE,GAAG,QAO/D;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAKzD;AAED,wBAAgB,aAAa,CA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