@cloudbase/cals 1.0.0 → 1.0.1-2.beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/lib/parser/cals/index.d.ts +63 -3
  2. package/lib/parser/cals/index.d.ts.map +1 -1
  3. package/lib/parser/cals/index.js +240 -91
  4. package/lib/parser/cals/utils/block/index.d.ts +0 -0
  5. package/lib/parser/cals/utils/block/index.d.ts.map +1 -1
  6. package/lib/parser/cals/utils/block/index.js +7 -3
  7. package/lib/parser/cals/utils/code/index.d.ts +0 -0
  8. package/lib/parser/cals/utils/code/index.d.ts.map +1 -1
  9. package/lib/parser/cals/utils/code/index.js +18 -12
  10. package/lib/parser/cals/utils/common.d.ts +0 -0
  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 +0 -0
  14. package/lib/parser/cals/utils/runtime.d.ts.map +1 -1
  15. package/lib/parser/cals/utils/runtime.js +5 -2
  16. package/lib/parser/cals/utils/spinoff/index.d.ts +0 -0
  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 +0 -0
  20. package/lib/parser/cals/utils/style.d.ts.map +1 -1
  21. package/lib/parser/cals/utils/style.js +7 -3
  22. package/lib/parser/cals/utils/template.d.ts +0 -0
  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 +0 -0
  26. package/lib/parser/cals/utils/version/common.d.ts.map +1 -1
  27. package/lib/parser/cals/utils/version/common.js +16 -33
  28. package/lib/parser/cals/utils/version/config.d.ts +0 -0
  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 +0 -0
  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 +0 -0
  35. package/lib/parser/cals/utils/version/parses.d.ts.map +1 -1
  36. package/lib/parser/cals/utils/version/parses.js +18 -36
  37. package/lib/parser/cals/utils/version/utils.d.ts +0 -0
  38. package/lib/parser/cals/utils/version/utils.d.ts.map +0 -0
  39. package/lib/parser/cals/utils/version/utils.js +5 -2
  40. package/lib/parser/expression/index.d.ts +0 -0
  41. package/lib/parser/expression/index.d.ts.map +0 -0
  42. package/lib/parser/expression/index.js +0 -0
  43. package/lib/parser/index.d.ts +0 -0
  44. package/lib/parser/index.d.ts.map +0 -0
  45. package/lib/parser/index.js +0 -0
  46. package/lib/parser/plugins/postcss-rpx2clac.js +2 -2
  47. package/lib/types/basic/app.d.ts +0 -0
  48. package/lib/types/basic/app.d.ts.map +0 -0
  49. package/lib/types/basic/app.js +0 -0
  50. package/lib/types/basic/common.d.ts +2 -1
  51. package/lib/types/basic/common.d.ts.map +1 -1
  52. package/lib/types/basic/common.js +0 -0
  53. package/lib/types/basic/component.d.ts +5 -0
  54. package/lib/types/basic/component.d.ts.map +1 -1
  55. package/lib/types/basic/component.js +0 -0
  56. package/lib/types/basic/datasource.d.ts +0 -0
  57. package/lib/types/basic/datasource.d.ts.map +0 -0
  58. package/lib/types/basic/datasource.js +0 -0
  59. package/lib/types/index.d.ts +2 -1
  60. package/lib/types/index.d.ts.map +1 -1
  61. package/lib/types/index.js +14 -1
  62. package/lib/types/lcds.d.ts +400 -114
  63. package/lib/types/lcds.d.ts.map +1 -1
  64. package/lib/types/lcds.js +0 -0
  65. package/lib/types/platform/app.d.ts +4 -0
  66. package/lib/types/platform/app.d.ts.map +1 -1
  67. package/lib/types/platform/app.js +0 -0
  68. package/lib/types/platform/common.d.ts +11 -1
  69. package/lib/types/platform/common.d.ts.map +1 -1
  70. package/lib/types/platform/common.js +0 -0
  71. package/lib/types/platform/component.d.ts +6 -0
  72. package/lib/types/platform/component.d.ts.map +1 -1
  73. package/lib/types/platform/component.js +0 -0
  74. package/lib/types/platform/datasource.d.ts +0 -0
  75. package/lib/types/platform/datasource.d.ts.map +0 -0
  76. package/lib/types/platform/datasource.js +0 -0
  77. package/lib/types/platform/eventFlow.d.ts +20 -0
  78. package/lib/types/platform/eventFlow.d.ts.map +1 -0
  79. package/lib/types/platform/eventFlow.js +2 -0
  80. package/lib/types/platform/query.d.ts +67 -0
  81. package/lib/types/platform/query.d.ts.map +1 -0
  82. package/lib/types/platform/query.js +2 -0
  83. package/lib/types/platform/widget/form.d.ts +0 -0
  84. package/lib/types/platform/widget/form.d.ts.map +0 -0
  85. package/lib/types/platform/widget/form.js +0 -0
  86. package/lib/types/platform/widget/meta.d.ts +0 -0
  87. package/lib/types/platform/widget/meta.d.ts.map +0 -0
  88. package/lib/types/platform/widget/meta.js +0 -0
  89. package/lib/utils/CSSProperty.d.ts +0 -0
  90. package/lib/utils/CSSProperty.d.ts.map +0 -0
  91. package/lib/utils/CSSProperty.js +0 -0
  92. package/lib/utils/build.d.ts +0 -0
  93. package/lib/utils/build.d.ts.map +0 -0
  94. package/lib/utils/build.js +3 -3
  95. package/lib/utils/constant.d.ts +0 -0
  96. package/lib/utils/constant.d.ts.map +0 -0
  97. package/lib/utils/constant.js +0 -0
  98. package/lib/utils/dts/auto-generated.d.ts +1 -1
  99. package/lib/utils/dts/auto-generated.d.ts.map +1 -1
  100. package/lib/utils/dts/auto-generated.js +1241 -35
  101. package/lib/utils/dts/index.d.ts +46 -5
  102. package/lib/utils/dts/index.d.ts.map +1 -1
  103. package/lib/utils/dts/index.js +478 -68
  104. package/lib/utils/index.d.ts +0 -0
  105. package/lib/utils/index.d.ts.map +0 -0
  106. package/lib/utils/index.js +0 -0
  107. package/lib/utils/version/featureChecker.js +2 -2
  108. package/lib/utils/version/migrations/version4.js +2 -2
  109. package/package.json +2 -1
  110. package/lib/parser/constants.d.ts +0 -2
  111. package/lib/parser/constants.d.ts.map +0 -1
  112. package/lib/parser/constants.js +0 -4
  113. package/lib/utils/version-migrations/common.d.ts +0 -5
  114. package/lib/utils/version-migrations/common.d.ts.map +0 -1
  115. package/lib/utils/version-migrations/common.js +0 -29
  116. package/lib/utils/version-migrations/version4.d.ts +0 -3
  117. package/lib/utils/version-migrations/version4.d.ts.map +0 -1
  118. package/lib/utils/version-migrations/version4.js +0 -199
@@ -10,9 +10,17 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
13
16
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.parseVersion = exports.processRuntimeCodeResources = exports.deserializeComponentLibraryMeta = exports.deserializeRuntimeComponent = exports.serializeRuntimeComponent = exports.serializeRuntimePage = exports.deserializePlatformApp = exports.serializePlatformApp = exports.deserializePage = exports.serializePage = exports.deserializeComponent = exports.serializeComponent = exports.deserializeDataVariables = exports.deserializeAttributes = exports.serializeAttributes = exports.deserializeDynamicMap = exports.serializeDynamicMap = exports.deserializeValue = exports.serializeValue = exports.generateDefaultCode = exports.getUsedComps = void 0;
15
- const lodash_1 = require("lodash");
17
+ exports.processListeners = exports.parseVersion = exports.processRuntimeCodeResources = exports.deserializeComponentLibraryMeta = exports.deserializeRuntimeComponent = exports.serializeRuntimeComponent = exports.serializeRuntimeDataset = exports.serializeRuntimePage = exports.deserializePlatformApp = exports.serializePlatformApp = exports.deserializePage = exports.serializePage = exports.deserializeComponent = exports.serializeComponent = exports.deserializeDataVariables = exports.normalizeQuery = exports.deserializeDataset = exports.serializeDataset = exports.deserializeAttributes = exports.serializeAttributes = exports.deserializeDynamicMap = exports.serializeDynamicMap = exports.deserializeValue = exports.serializeValue = exports.generateDefaultCode = exports.getUsedComps = void 0;
18
+ const get_1 = __importDefault(require("lodash/get"));
19
+ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
20
+ const unset_1 = __importDefault(require("lodash/unset"));
21
+ const set_1 = __importDefault(require("lodash/set"));
22
+ const isArray_1 = __importDefault(require("lodash/isArray"));
23
+ const isObject_1 = __importDefault(require("lodash/isObject"));
16
24
  const common_1 = require("../../types/platform/common");
17
25
  const expression_1 = require("../expression");
18
26
  const common_2 = require("./utils/common");
@@ -21,6 +29,7 @@ const runtime_1 = require("./utils/runtime");
21
29
  const config_1 = require("./utils/version/config");
22
30
  const template_1 = require("./utils/template");
23
31
  const featureChecker_1 = require("../../utils/version/featureChecker");
32
+ const utils_1 = require("../../utils");
24
33
  var common_3 = require("./utils/common");
25
34
  Object.defineProperty(exports, "getUsedComps", { enumerable: true, get: function () { return common_3.getUsedComps; } });
26
35
  var template_2 = require("./utils/template");
@@ -175,13 +184,16 @@ function serializeDynamicMapWithExtra({ ctx, map = {}, scope = 'page', streamlin
175
184
  let originKey = processedKey;
176
185
  if (matched) {
177
186
  originKey = matched[1];
178
- (0, lodash_1.unset)(data, originKey);
187
+ if (!originKey) {
188
+ return;
189
+ }
190
+ (0, unset_1.default)(data, originKey);
179
191
  }
180
192
  const originKeyArr = originKey.split('.');
181
- if ((0, lodash_1.get)(data, processedKey) == undefined) {
193
+ if ((0, get_1.default)(data, processedKey) == undefined) {
182
194
  /* 选区结构处理 [formily] to [CALS] */
183
195
  if (Array.isArray(processedValue) && (processedValue === null || processedValue === void 0 ? void 0 : processedValue.some((item) => !!(item === null || item === void 0 ? void 0 : item.selectableBlock)))) {
184
- let valueTmp = (0, lodash_1.cloneDeep)(processedValue);
196
+ let valueTmp = (0, cloneDeep_1.default)(processedValue);
185
197
  processedValue = valueTmp === null || valueTmp === void 0 ? void 0 : valueTmp.map((_value) => {
186
198
  var _a, _b, _c;
187
199
  const xProp = (_a = _value === null || _value === void 0 ? void 0 : _value.selectableBlock) === null || _a === void 0 ? void 0 : _a['x-props'];
@@ -198,10 +210,10 @@ function serializeDynamicMapWithExtra({ ctx, map = {}, scope = 'page', streamlin
198
210
  }
199
211
  // 为动态数据且有多级,将{":range.0.label": "$page.dataset.state.test1"}转为{ range: [{ label: "$page.dataset.state.test1"}] }
200
212
  if (matched && originKeyArr.length >= 2) {
201
- (0, lodash_1.set)(data, replaceWithColon(originKey), (0, lodash_1.cloneDeep)(processedValue));
213
+ (0, set_1.default)(data, replaceWithColon(originKey), (0, cloneDeep_1.default)(processedValue));
202
214
  }
203
215
  else {
204
- data[processedKey] = (0, lodash_1.cloneDeep)(processedValue);
216
+ data[processedKey] = (0, cloneDeep_1.default)(processedValue);
205
217
  }
206
218
  }
207
219
  extra[originKey] = processedExtra;
@@ -231,19 +243,19 @@ function replaceWithColon(key) {
231
243
  function recoverSynamicMap(parent, current, path = '') {
232
244
  Object.keys(current).forEach((key) => {
233
245
  let value = current[key];
234
- if ((0, lodash_1.isArray)(value)) {
246
+ if ((0, isArray_1.default)(value)) {
235
247
  // 注意如果是 selectableBlock 独立处理
236
248
  if (value === null || value === void 0 ? void 0 : value.some((item) => !!(item === null || item === void 0 ? void 0 : item.selectableBlock))) {
237
249
  return;
238
250
  }
239
251
  // 数组必须在前面
240
252
  value.forEach((valueItem, valueIndex) => {
241
- if ((0, lodash_1.isObject)(valueItem)) {
253
+ if ((0, isObject_1.default)(valueItem)) {
242
254
  valueItem = recoverSynamicMap(parent, valueItem, `${path === '' ? '' : `${path}.`}${key}.${valueIndex}`);
243
255
  }
244
256
  });
245
257
  }
246
- else if ((0, lodash_1.isObject)(value)) {
258
+ else if ((0, isObject_1.default)(value)) {
247
259
  value = recoverSynamicMap(parent, value, `${path === '' ? '' : `${path}.`}${key}`);
248
260
  }
249
261
  else {
@@ -252,7 +264,7 @@ function recoverSynamicMap(parent, current, path = '') {
252
264
  parent[`:${path === '' ? '' : `${path}.`}${matched[1]}`] = current[key];
253
265
  if (current !== parent) {
254
266
  // 如果是第一层级,说明current和parent相等,不unset
255
- (0, lodash_1.unset)(current, key);
267
+ (0, unset_1.default)(current, key);
256
268
  }
257
269
  }
258
270
  }
@@ -262,12 +274,15 @@ function recoverSynamicMap(parent, current, path = '') {
262
274
  function deserializeDynamicMap(ctx, map, extraMap) {
263
275
  var _a, _b;
264
276
  let data = {};
265
- const clonedMap = (0, lodash_1.cloneDeep)(map);
277
+ const clonedMap = (0, cloneDeep_1.default)(map);
266
278
  // 还原flatten path
267
279
  map = recoverSynamicMap(clonedMap, clonedMap, '');
268
280
  for (let key in map || {}) {
269
281
  let value = map === null || map === void 0 ? void 0 : map[key];
270
282
  let matched = key.match(DYNAMIC_KEY_REG);
283
+ if (matched && !matched[1]) {
284
+ continue;
285
+ }
271
286
  let { key: processedKey, value: processedValue } = deserializeValue(ctx, key, value, extraMap === null || extraMap === void 0 ? void 0 : extraMap[matched ? matched[1] : key]);
272
287
  /* 选区结构处理 [CALS] to [formily] */
273
288
  if (Array.isArray(processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) && ((_a = processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) === null || _a === void 0 ? void 0 : _a.some((item) => !!(item === null || item === void 0 ? void 0 : item.selectableBlock)))) {
@@ -327,10 +342,11 @@ exports.deserializeAttributes = deserializeAttributes;
327
342
  * 目前仅转换 state 中的 initMethod.params 和 updateMethod.params
328
343
  */
329
344
  function serializeDataset(ctx, dataset) {
330
- if (!isDatasetNeedToProcess(dataset))
345
+ if (!dataset) {
331
346
  return dataset;
332
- const result = JSON.parse(JSON.stringify(dataset));
333
- Object.values(result.state).forEach((state) => {
347
+ }
348
+ const result = JSON.parse(JSON.stringify(dataset || {}));
349
+ Object.values(result.state || {}).forEach((state) => {
334
350
  var _a, _b, _c, _d;
335
351
  if (state.varType !== 'datasource')
336
352
  return;
@@ -347,18 +363,47 @@ function serializeDataset(ctx, dataset) {
347
363
  })) === null || _d === void 0 ? void 0 : _d.data;
348
364
  }
349
365
  });
366
+ Object.entries(result.query || {}).forEach(([key, query]) => {
367
+ var _a, _b, _c;
368
+ let { dataSourceName, method, listeners, handler, data } = query, restQuery = __rest(query, ["dataSourceName", "method", "listeners", "handler", "data"]);
369
+ let mergedData = (_a = serializeDynamicMapWithExtra({
370
+ ctx,
371
+ map: data || {},
372
+ })) === null || _a === void 0 ? void 0 : _a.data;
373
+ if (dataSourceName && !handler) {
374
+ handler = {
375
+ moduleName: 'platform',
376
+ name: 'cloud.callDataSource',
377
+ };
378
+ mergedData = {
379
+ dataSourceName,
380
+ methodName: method === null || method === void 0 ? void 0 : method.name,
381
+ params: (_b = serializeDynamicMapWithExtra({
382
+ ctx,
383
+ map: (method === null || method === void 0 ? void 0 : method.params) || {},
384
+ })) === null || _b === void 0 ? void 0 : _b.data,
385
+ };
386
+ }
387
+ result.query[key] = Object.assign(Object.assign({}, restQuery), { handler: {
388
+ module: handler === null || handler === void 0 ? void 0 : handler.moduleName,
389
+ name: handler === null || handler === void 0 ? void 0 : handler.name,
390
+ params: mergedData,
391
+ }, listeners: (_c = listeners === null || listeners === void 0 ? void 0 : listeners.map) === null || _c === void 0 ? void 0 : _c.call(listeners, (listener) => serializeListener(ctx, listener)) });
392
+ });
350
393
  return result;
351
394
  }
395
+ exports.serializeDataset = serializeDataset;
352
396
  /**
353
397
  * 将dataset({state: {}, params: {}})从 cals 结构转换为weapp结构
354
398
  * 目前仅转换 state 中的 initMethod.params 和 updateMethod.params
355
399
  */
356
400
  function deserializeDataset(ctx, dataset) {
357
- if (!isDatasetNeedToProcess(dataset))
401
+ if (!dataset) {
358
402
  return dataset;
403
+ }
359
404
  // 克隆, 避免引用问题
360
- const result = JSON.parse(JSON.stringify(dataset));
361
- Object.values(result.state).forEach((state) => {
405
+ const result = JSON.parse(JSON.stringify(dataset || {}));
406
+ Object.values(result.state || {}).forEach((state) => {
362
407
  var _a, _b;
363
408
  if (state.varType !== 'datasource')
364
409
  return;
@@ -369,23 +414,35 @@ function deserializeDataset(ctx, dataset) {
369
414
  state.updateMethod.params = deserializeDynamicMap(ctx, state.updateMethod.params);
370
415
  }
371
416
  });
417
+ Object.entries(result.query || {}).forEach(([key, query]) => {
418
+ var _a;
419
+ const _b = normalizeQuery(query), { handler, listeners } = _b, restQuery = __rest(_b, ["handler", "listeners"]);
420
+ result.query[key] = Object.assign(Object.assign({}, restQuery), { handler: {
421
+ moduleName: handler === null || handler === void 0 ? void 0 : handler.module,
422
+ name: (handler === null || handler === void 0 ? void 0 : handler.name) || '',
423
+ }, data: deserializeDynamicMap(ctx, (handler === null || handler === void 0 ? void 0 : handler.params) || {}), listeners: (_a = listeners === null || listeners === void 0 ? void 0 : listeners.map) === null || _a === void 0 ? void 0 : _a.call(listeners, (listener) => {
424
+ return deserializeListener(ctx, listener);
425
+ }) });
426
+ });
372
427
  return result;
373
428
  }
374
- /**
375
- * dataset 是否需要转换处理
376
- * dataset 为空, 或者无数据源变量, 或者变量中未使用入参, 则不需要进行转换
377
- */
378
- function isDatasetNeedToProcess(dataset) {
379
- if (!dataset || !dataset.state)
380
- return false;
381
- const hasNoParams = Object.values(dataset.state).every((item) => {
382
- var _a, _b;
383
- return item.varType !== 'datasource' || !(((_a = item.initMethod) === null || _a === void 0 ? void 0 : _a.params) || ((_b = item.updateMethod) === null || _b === void 0 ? void 0 : _b.params));
384
- });
385
- if (hasNoParams)
386
- return false;
387
- return true;
429
+ exports.deserializeDataset = deserializeDataset;
430
+ function normalizeQuery(query) {
431
+ let { dataSourceName, method, handler } = query, restQuery = __rest(query, ["dataSourceName", "method", "handler"]);
432
+ if (dataSourceName && !handler) {
433
+ handler = {
434
+ module: 'platform',
435
+ name: 'cloud.callDataSource',
436
+ params: {
437
+ dataSourceName,
438
+ methodName: (method === null || method === void 0 ? void 0 : method.name) || '',
439
+ params: (method === null || method === void 0 ? void 0 : method.params) || {},
440
+ },
441
+ };
442
+ }
443
+ return Object.assign(Object.assign({}, restQuery), { handler });
388
444
  }
445
+ exports.normalizeQuery = normalizeQuery;
389
446
  function serializeDirecties(ctx, directives, scope = 'page') {
390
447
  var _a;
391
448
  let processed = {
@@ -520,30 +577,9 @@ function deserializeCodeResource(ctx, data) {
520
577
  return Object.assign(Object.assign({}, resData), { type: codeType });
521
578
  }
522
579
  function serializeModuleName(ctx, moduleName, componentName) {
523
- var _a, _b;
524
580
  let { dependencies = [], dependenciesMap = {} } = ctx;
525
- if (ctx.streamlineModuleName) {
526
- if (moduleName === ((_a = dependencies[0]) === null || _a === void 0 ? void 0 : _a.name)) {
527
- moduleName = undefined;
528
- }
529
- let find = undefined;
530
- for (let i = dependencies.length - 1; i > 0; i--) {
531
- let lib = dependencies[i];
532
- let currentModuleName = lib.name;
533
- let key = `${currentModuleName}:${componentName}`;
534
- if (!!dependenciesMap[key]) {
535
- find = lib;
536
- break;
537
- }
538
- }
539
- if (find) {
540
- if ((find === null || find === void 0 ? void 0 : find.name) === moduleName) {
541
- return undefined;
542
- }
543
- }
544
- else if (((_b = dependencies[0]) === null || _b === void 0 ? void 0 : _b.name) === moduleName) {
545
- return undefined;
546
- }
581
+ if (moduleName === utils_1.OFFICIAL_LIB_KEY) {
582
+ moduleName = undefined;
547
583
  }
548
584
  else if (moduleName &&
549
585
  !/-lcap-spinoff$/.test(moduleName) &&
@@ -554,22 +590,12 @@ function serializeModuleName(ctx, moduleName, componentName) {
554
590
  return moduleName;
555
591
  }
556
592
  function deserializeModuleName(ctx, componentName, moduleName) {
557
- var _a;
558
- let { dependencies = [], dependenciesMap = {} } = ctx;
559
- let defaultModuleName = (_a = dependencies[0]) === null || _a === void 0 ? void 0 : _a.name;
560
- // 补充默认的 moduleName 按照依赖反序查找
561
- if (!moduleName) {
562
- let find = undefined;
563
- for (let i = dependencies.length - 1; i > 0; i--) {
564
- let lib = dependencies[i];
565
- let { name } = lib;
566
- let key = `${name}:${componentName}`;
567
- if (!!dependenciesMap[key]) {
568
- find = lib;
569
- break;
570
- }
571
- }
572
- return find ? find === null || find === void 0 ? void 0 : find.name : defaultModuleName;
593
+ let { dependenciesMap = {} } = ctx;
594
+ /**
595
+ * 无组件库名 有组件名
596
+ */
597
+ if (!moduleName && componentName) {
598
+ return utils_1.OFFICIAL_LIB_KEY;
573
599
  }
574
600
  else if (moduleName &&
575
601
  !/-lcap-spinoff$/.test(moduleName) &&
@@ -579,6 +605,15 @@ function deserializeModuleName(ctx, componentName, moduleName) {
579
605
  }
580
606
  return moduleName;
581
607
  }
608
+ function serializeXIndex(ctx, list) {
609
+ return list
610
+ .sort((a, b) => { var _a, _b; return (((_a = a.extra) === null || _a === void 0 ? void 0 : _a.xIndex) || 0) - (((_b = b.extra) === null || _b === void 0 ? void 0 : _b.xIndex) || 0); })
611
+ .map((component) => {
612
+ const { extra } = component, restComponent = __rest(component, ["extra"]);
613
+ const _a = extra || {}, { xIndex } = _a, restExtra = __rest(_a, ["xIndex"]);
614
+ return Object.assign(Object.assign({}, restComponent), { extra: extra ? restExtra : undefined });
615
+ });
616
+ }
582
617
  function serializeComponent(ctx, component, scope = 'page') {
583
618
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
584
619
  // const scope = ctx.component?.id ? 'component' : 'page'
@@ -626,10 +661,10 @@ function serializeComponent(ctx, component, scope = 'page') {
626
661
  attributes: (0, runtime_1.getValidValue)(component.xProps
627
662
  ? Object.assign(Object.assign({}, attributes), { style: (_j = component.xProps) === null || _j === void 0 ? void 0 : _j.style, class: (_l = (_k = component.xProps) === null || _k === void 0 ? void 0 : _k.classList) === null || _l === void 0 ? void 0 : _l.join(' ') }) : undefined),
628
663
  items: component.properties
629
- ? Object.keys(component.properties).map((key) => {
664
+ ? serializeXIndex(componentCtx, Object.keys(component.properties).map((key) => {
630
665
  var _a;
631
666
  return serializeComponent(componentCtx, Object.assign({ id: key }, (_a = component.properties) === null || _a === void 0 ? void 0 : _a[key]), scope);
632
- })
667
+ }))
633
668
  : undefined,
634
669
  listeners: (0, runtime_1.getValidValue)((_o = (_m = component.xProps) === null || _m === void 0 ? void 0 : _m.listeners) === null || _o === void 0 ? void 0 : _o.map((listener) => {
635
670
  return serializeListener(componentCtx, listener);
@@ -650,7 +685,7 @@ function serializeComponent(ctx, component, scope = 'page') {
650
685
  }
651
686
  exports.serializeComponent = serializeComponent;
652
687
  function deserializeComponent(ctx, components) {
653
- let componentMap = components.reduce((map, item) => {
688
+ let componentMap = components.reduce((map, item, index) => {
654
689
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
655
690
  const { attributeExtraData = {} } = item.extra || {};
656
691
  let dynamicStyle = item[':style']
@@ -696,15 +731,12 @@ function deserializeComponent(ctx, components) {
696
731
  if (Array.isArray(item)) {
697
732
  return !!item.length;
698
733
  }
699
- return item != undefined && !(0, common_2.isEmptyObj)(item);
734
+ return item !== undefined && !(0, common_2.isEmptyObj)(item);
700
735
  })
701
736
  ? xProps
702
737
  : undefined,
703
- /**
704
- * TODO
705
- */
706
- xIndex: ((_h = item.extra) === null || _h === void 0 ? void 0 : _h.xIndex) !== undefined ? (_j = item.extra) === null || _j === void 0 ? void 0 : _j.xIndex : undefined /* 0*/,
707
- label: (item === null || item === void 0 ? void 0 : item.label) !== undefined ? item === null || item === void 0 ? void 0 : item.label : undefined /* 0*/,
738
+ xIndex: ((_h = item.extra) === null || _h === void 0 ? void 0 : _h.xIndex) !== undefined ? (_j = item.extra) === null || _j === void 0 ? void 0 : _j.xIndex : index,
739
+ label: (item === null || item === void 0 ? void 0 : item.label) !== undefined ? item === null || item === void 0 ? void 0 : item.label : undefined,
708
740
  properties: item.items ? deserializeComponent(ctx, item.items) : undefined,
709
741
  };
710
742
  map[item.id] = processed;
@@ -714,7 +746,7 @@ function deserializeComponent(ctx, components) {
714
746
  }
715
747
  exports.deserializeComponent = deserializeComponent;
716
748
  function serializePage(ctx, page) {
717
- var _a, _b, _c, _d, _e;
749
+ var _a, _b, _c, _d, _e, _f;
718
750
  const pageCtx = Object.assign(Object.assign({}, ctx), { page });
719
751
  if (pageCtx.dependencies && !pageCtx.dependenciesMap) {
720
752
  pageCtx.dependenciesMap = processDependenciesMap(pageCtx.dependencies || []);
@@ -724,18 +756,22 @@ function serializePage(ctx, page) {
724
756
  type: 'PAGE',
725
757
  component: 'Page',
726
758
  attributes: (0, runtime_1.getValidValue)((_a = serializeAttributesWithExtra(pageCtx, 'page', page.data)) === null || _a === void 0 ? void 0 : _a.data),
727
- items: Object.keys(page.componentInstances || {}).map((id) => {
759
+ items: serializeXIndex(pageCtx, Object.keys(page.componentInstances || {}).map((id) => {
728
760
  return serializeComponent(pageCtx, Object.assign({ id }, page.componentInstances[id]));
729
- }),
761
+ })),
730
762
  directives: {
731
763
  ':if': true,
732
764
  },
733
765
  resources: (_b = page === null || page === void 0 ? void 0 : page.lowCodes) === null || _b === void 0 ? void 0 : _b.map((item) => serializeCodeSource(pageCtx, item)),
734
766
  dataset: serializeDataset(ctx, page === null || page === void 0 ? void 0 : page.dataset),
735
767
  dataVariables: (0, runtime_1.getValidValue)((_d = (_c = page === null || page === void 0 ? void 0 : page.vars) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.map((item) => serializeDataVariables(pageCtx, item))),
736
- listeners: (0, runtime_1.getValidValue)((_e = page === null || page === void 0 ? void 0 : page.listeners) === null || _e === void 0 ? void 0 : _e.map((item) => {
768
+ listeners: (0, runtime_1.getValidValue)((_e = ((page === null || page === void 0 ? void 0 : page.listeners) || [])) === null || _e === void 0 ? void 0 : _e.map((item) => {
737
769
  return serializeListener(pageCtx, item);
738
- })),
770
+ }).concat(((_f = page === null || page === void 0 ? void 0 : page.eventFlows) === null || _f === void 0 ? void 0 : _f.reduce((list, flow) => {
771
+ var _a;
772
+ list.push(...(((_a = flow.listeners) === null || _a === void 0 ? void 0 : _a.map((item) => serializeListener(pageCtx, item))) || []));
773
+ return list;
774
+ }, [])) || [])),
739
775
  extra: {
740
776
  commonStyle: page === null || page === void 0 ? void 0 : page.commonStyle,
741
777
  xIndex: page.xIndex,
@@ -761,8 +797,9 @@ function serializePage(ctx, page) {
761
797
  }
762
798
  exports.serializePage = serializePage;
763
799
  function deserializePage(ctx, page) {
764
- var _a, _b, _c, _d, _e, _f, _g;
800
+ var _a, _b, _c, _d, _e, _f;
765
801
  let pageCtx = Object.assign(Object.assign({}, ctx), { page });
802
+ const { listeners = [], eventFlows } = processListeners((page === null || page === void 0 ? void 0 : page.listeners) || []);
766
803
  return {
767
804
  id: page.id,
768
805
  isHome: page.id === ctx.homePageId,
@@ -777,10 +814,16 @@ function deserializePage(ctx, page) {
777
814
  commonStyle: (_c = page === null || page === void 0 ? void 0 : page.extra) === null || _c === void 0 ? void 0 : _c.commonStyle,
778
815
  staticResourceAttribute: (_d = page === null || page === void 0 ? void 0 : page.extra) === null || _d === void 0 ? void 0 : _d.staticResourceAttribute,
779
816
  hideAdminPortalMenu: (_e = page === null || page === void 0 ? void 0 : page.extra) === null || _e === void 0 ? void 0 : _e.hideAdminPortalMenu,
780
- lowCodes: (_f = page === null || page === void 0 ? void 0 : page.resources) === null || _f === void 0 ? void 0 : _f.filter((item) => item.type === common_1.EResourceType.CODE).map((item) => deserializeCodeResource(pageCtx, item)),
781
- listeners: ((_g = page === null || page === void 0 ? void 0 : page.listeners) === null || _g === void 0 ? void 0 : _g.map((item) => {
817
+ lowCodes: (_f = page === null || page === void 0 ? void 0 : page.resources) === null || _f === void 0 ? void 0 : _f.filter((item) => item.type === common_1.EResourceType.CODE && item.name !== common_1.ECodeName.PLACEHOLDER).map((item) => deserializeCodeResource(pageCtx, item)),
818
+ listeners: (listeners === null || listeners === void 0 ? void 0 : listeners.map((item) => {
782
819
  return deserializeListener(pageCtx, item);
783
820
  })) || [],
821
+ eventFlows: (eventFlows === null || eventFlows === void 0 ? void 0 : eventFlows.map((eventFlow) => {
822
+ var _a, _b;
823
+ return Object.assign(Object.assign({}, eventFlow), { listeners: ((_b = (_a = eventFlow.listeners) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, (item) => {
824
+ return deserializeListener(pageCtx, item);
825
+ })) || [] });
826
+ })) || [],
784
827
  // TODO
785
828
  // children: [],
786
829
  // styleBindPath: item.styleBindPath,
@@ -851,7 +894,7 @@ function deserializePlatformApp(data, optsions) {
851
894
  pageInstanceList: (data.items || []).map((page) => deserializePage(ctx, page)),
852
895
  // lowCodes: data.resources || [],
853
896
  lowCodes: (data.resources || [])
854
- .filter((item) => item.type === common_1.EResourceType.CODE)
897
+ .filter((item) => item.type === common_1.EResourceType.CODE && item.name !== common_1.ECodeName.PLACEHOLDER)
855
898
  .map((item) => deserializeCodeResource(ctx, item)),
856
899
  datasources: data.dataSources,
857
900
  dataset: deserializeDataset(ctx, data.dataset),
@@ -896,7 +939,10 @@ function serializeRuntimePage(ctx, page) {
896
939
  return serializeRuntimeComponent(pageCtx, Object.assign({ id }, (_a = page.componentSchemaJson) === null || _a === void 0 ? void 0 : _a.properties[id]));
897
940
  })),
898
941
  resources: (_c = page === null || page === void 0 ? void 0 : page.codeModules) === null || _c === void 0 ? void 0 : _c.map((item) => serializeCodeSource(pageCtx, item)),
899
- dataset: page === null || page === void 0 ? void 0 : page.dataset,
942
+ /**
943
+ * 感觉此处有问题,状态应该无法直接透传才对
944
+ */
945
+ dataset: serializeRuntimeDataset(pageCtx, page === null || page === void 0 ? void 0 : page.dataset),
900
946
  dataVariables: (0, runtime_1.getValidValue)((_e = (_d = page === null || page === void 0 ? void 0 : page.vars) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.map((item) => serializeDataVariables(pageCtx, item))),
901
947
  listeners: (0, runtime_1.getValidValue)((0, runtime_1.readListeners)(page.listenerInstances || []).map((item) => {
902
948
  return serializeListener(pageCtx, item);
@@ -925,6 +971,42 @@ function serializeRuntimePage(ctx, page) {
925
971
  return processedPage;
926
972
  }
927
973
  exports.serializeRuntimePage = serializeRuntimePage;
974
+ function serializeRuntimeDataset(ctx, dataset) {
975
+ if (!dataset) {
976
+ return dataset;
977
+ }
978
+ const { query } = dataset, resetDataset = __rest(dataset, ["query"]);
979
+ return Object.assign(Object.assign({}, resetDataset), { query: query
980
+ ? Object.entries(query).reduce((map, [key, query]) => {
981
+ var _a;
982
+ let { dataSourceName, listenerInstances, method, handler, data, dataTypes, dataBinds } = query, restQuey = __rest(query, ["dataSourceName", "listenerInstances", "method", "handler", "data", "dataTypes", "dataBinds"]);
983
+ if (dataSourceName && !handler) {
984
+ let { data: paramsData, dataBinds: paramsDataBinds = [], dataTypes: paramsDataTypes = [] } = method || {};
985
+ handler = {
986
+ moduleName: 'platform',
987
+ name: 'cloud.callDataSource',
988
+ };
989
+ data = {
990
+ dataSourceName,
991
+ methodName: method === null || method === void 0 ? void 0 : method.name,
992
+ params: paramsData,
993
+ };
994
+ dataTypes =
995
+ paramsDataTypes.map((item) => (Object.assign(Object.assign({}, item), { propertyPath: `params.${item.propertyPath}` }))) || [];
996
+ dataBinds = paramsDataBinds === null || paramsDataBinds === void 0 ? void 0 : paramsDataBinds.map((bind) => (Object.assign(Object.assign({}, bind), { propertyPath: `params.${bind.propertyPath}` })));
997
+ }
998
+ map[key] = Object.assign(Object.assign({}, restQuey), { handler: {
999
+ module: 'platform',
1000
+ name: 'cloud.callDataSource',
1001
+ params: serializeAttributesWithExtra(ctx, 'page', (0, runtime_1.getValidValue)((0, runtime_1.readDynamicData)({ data, dataTypes, dataBinds })) || {}).data || {},
1002
+ }, listeners: (_a = (0, runtime_1.getValidValue)((0, runtime_1.readListeners)(listenerInstances || []))) === null || _a === void 0 ? void 0 : _a.map((listener /* IEventListener */) => {
1003
+ return serializeListener(ctx, listener);
1004
+ }) });
1005
+ return map;
1006
+ }, {})
1007
+ : query });
1008
+ }
1009
+ exports.serializeRuntimeDataset = serializeRuntimeDataset;
928
1010
  // /**
929
1011
  // * page
930
1012
  // * [CALS] to [formily]
@@ -1057,7 +1139,7 @@ function deserializeComponentLibraryMeta(meta) {
1057
1139
  dependencies, components: processedComponents, actions });
1058
1140
  }
1059
1141
  exports.deserializeComponentLibraryMeta = deserializeComponentLibraryMeta;
1060
- function processRuntimeCodeResources(ctx, resources /* : IWeappCode[]*/ = [], scope) {
1142
+ function processRuntimeCodeResources(ctx, resources = [], scope) {
1061
1143
  const { id } = ctx;
1062
1144
  const fileTypes = [common_1.ECodeType.STYLE, common_1.ECodeType.STATE, common_1.ECodeType.LIFECYCLE, common_1.ECodeType.COMPUTEDN];
1063
1145
  const CODE_TYPE_NAME_MAP = {
@@ -1110,12 +1192,79 @@ function parseVersion(version = '', dependencies = []) {
1110
1192
  * 以及对根节点加 id
1111
1193
  */
1112
1194
  enablePageRoot: false,
1195
+ /**
1196
+ * 是否依赖 数据源 profile
1197
+ */
1198
+ staticDatasourceProfile: true,
1113
1199
  };
1114
1200
  if (list[0] === '4' || version === 'latest') {
1115
1201
  FEATURE_MAP.defaultDynamicCssUnit = false;
1116
1202
  }
1117
1203
  FEATURE_MAP.enableObserverRef = (0, featureChecker_1.isEnbaleObserverVersion)(dependencies);
1118
1204
  FEATURE_MAP.enablePageRoot = (0, featureChecker_1.isEnablePageRoot)(dependencies);
1205
+ FEATURE_MAP.staticDatasourceProfile = !(0, featureChecker_1.isEnablePageRoot)(dependencies);
1119
1206
  return FEATURE_MAP;
1120
1207
  }
1121
1208
  exports.parseVersion = parseVersion;
1209
+ function processListeners(listeners, options) {
1210
+ const { strict = false } = options || {};
1211
+ const listenerEventNameMap = listeners.reduce((map, listener) => {
1212
+ const { eventName } = listener;
1213
+ if (!map[eventName]) {
1214
+ map[eventName] = [];
1215
+ }
1216
+ map[eventName].push(listener);
1217
+ return map;
1218
+ }, {});
1219
+ const flowListenerIdMap = {};
1220
+ const eventFlowMap = {};
1221
+ listeners.forEach((listener) => {
1222
+ const { id, eventName } = listener;
1223
+ if (flowListenerIdMap[id]) {
1224
+ return;
1225
+ }
1226
+ const [_, eventFlowId] = eventName.match(/(.*?)\.start/) || [];
1227
+ const evnetTree = [];
1228
+ let eventFlow = { id: '', listeners: [] };
1229
+ if (eventFlowId) {
1230
+ eventFlow.id = eventFlowId;
1231
+ if (listener.description) {
1232
+ eventFlow.description = listener.description;
1233
+ }
1234
+ if (listener.label) {
1235
+ eventFlow.label = listener.label;
1236
+ }
1237
+ eventFlowMap[eventFlowId] = eventFlow;
1238
+ evnetTree.push(eventName);
1239
+ }
1240
+ for (let eventName of evnetTree) {
1241
+ const list = listenerEventNameMap[eventName] || [];
1242
+ if (strict && list.length > 1) {
1243
+ throw new Error(`事件流 ${eventFlowId} 中 ${eventName} 事件存在并发调用`);
1244
+ }
1245
+ list.forEach((item) => {
1246
+ flowListenerIdMap[item.id] = eventFlowId;
1247
+ const successEventName = `${item.id}.success`;
1248
+ const failEventName = `${item.id}.fail`;
1249
+ if (listenerEventNameMap[successEventName]) {
1250
+ evnetTree.push(successEventName);
1251
+ }
1252
+ if (listenerEventNameMap[failEventName]) {
1253
+ evnetTree.push(failEventName);
1254
+ }
1255
+ });
1256
+ }
1257
+ });
1258
+ const rawListeners = [];
1259
+ listeners.forEach((listener) => {
1260
+ const flowId = flowListenerIdMap[listener.id];
1261
+ if (flowId && eventFlowMap[flowId]) {
1262
+ eventFlowMap[flowId].listeners.push(listener);
1263
+ }
1264
+ else {
1265
+ rawListeners.push(listener);
1266
+ }
1267
+ });
1268
+ return { listeners: rawListeners, eventFlows: Object.values(eventFlowMap) };
1269
+ }
1270
+ exports.processListeners = processListeners;
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAqB,MAAM,mBAAmB,CAAC;AAI1F,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,aAAa,CAyD/G"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAqB,MAAM,mBAAmB,CAAC;AAK1F,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,aAAa,CAyD/G"}
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.parseComponentCals = void 0;
4
- const lodash_1 = require("lodash");
7
+ const get_1 = __importDefault(require("lodash/get"));
8
+ const set_1 = __importDefault(require("lodash/set"));
5
9
  const expression_1 = require("../../../expression");
6
10
  function parseComponentCals(ctx, cals) {
7
11
  if (!ctx.datasetMap) {
@@ -23,8 +27,8 @@ function parseComponentCals(ctx, cals) {
23
27
  id: cals.id || '',
24
28
  };
25
29
  const { component, module, attributes = {}, items = [], listeners = [], directives = {}, [':class']: dynamicClassList, [':style']: dynamicStyle, } = cals;
26
- if (module && component && !(0, lodash_1.get)(ctx.componentMap, `${module}.${component}`)) {
27
- (0, lodash_1.set)(ctx.componentMap, `${module}.${component}`, true);
30
+ if (module && component && !(0, get_1.default)(ctx.componentMap, `${module}.${component}`)) {
31
+ (0, set_1.default)(ctx.componentMap, `${module}.${component}`, true);
28
32
  ctx.componentLibMap[module] = true;
29
33
  }
30
34
  // 优先处理 directives 因为其他绑定会用到for
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/code/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAsE,MAAM,mBAAmB,CAAC;AAGrH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,GAAE,IAAI,GAAG,IAAW,GAAG,SAAS,EAAE,CAwL3F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,OAAO,GAAE,IAAI,GAAG,IAAW,GAAG,YAAY,CA+J3F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CA6BlF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/code/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAsE,MAAM,mBAAmB,CAAC;AAKrH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,GAAE,IAAI,GAAG,IAAW,GAAG,SAAS,EAAE,CAwL3F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,OAAO,GAAE,IAAI,GAAG,IAAW,GAAG,YAAY,CA+J3F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CA6BlF"}