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

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,43 +1,43 @@
1
- import { Properties } from 'csstype';
2
- export declare function removeInvalidStyleFormValue(styleForm?: any): any;
3
- /**
4
- * Convert WeApps common style to css styles(React.CSSProperties)
5
- * toRem/toRpx/toRpx 三者互斥 @deprecated
6
- * 应使用 defaultUnit 来声明
7
- */
8
- export declare function processCommonStyle2CSSProperties(commonStyle?: any, options?: {
9
- /**
10
- * 默认 px/无单位 转 rem
11
- * @deprecated
12
- */
13
- toRem?: boolean;
14
- /**
15
- * 默认 px/无单位 转为rpx
16
- * @deprecated
17
- */
18
- toRpx?: boolean;
19
- /**
20
- * px/无单位情况下 处理为何单位
21
- * rem | rpx | px
22
- * 优先级高于以上
23
- */
24
- defaultUnit?: 'rem' | 'px' | 'rpx';
25
- /**
26
- * 是否使用 calc(xx px / `${rpxCalcRoot}`) 来模拟rpx
27
- * 小程序不需要转
28
- */
29
- rpxCalcRoot?: string;
30
- ignoreSelf?: boolean;
31
- addPXUnit?: boolean;
32
- }): Properties<string | number>;
33
- interface ITranslateStyleOptions {
34
- looseError?: boolean;
35
- rpxCalcRoot?: string;
36
- }
37
- /**
38
- * @deprecated
39
- */
40
- export declare function processCSSProperties2Rem(style?: Properties<string | number>, options?: ITranslateStyleOptions): Properties<string | number>;
41
- export declare function processCSSPropertiesUnit(style: Properties<string | number, string & {}> | undefined, type: 'px' | 'rem' | 'rpx', options?: ITranslateStyleOptions): {};
42
- export {};
1
+ import { Properties } from 'csstype';
2
+ export declare function removeInvalidStyleFormValue(styleForm?: any): any;
3
+ /**
4
+ * Convert WeApps common style to css styles(React.CSSProperties)
5
+ * toRem/toRpx/toRpx 三者互斥 @deprecated
6
+ * 应使用 defaultUnit 来声明
7
+ */
8
+ export declare function processCommonStyle2CSSProperties(commonStyle?: any, options?: {
9
+ /**
10
+ * 默认 px/无单位 转 rem
11
+ * @deprecated
12
+ */
13
+ toRem?: boolean;
14
+ /**
15
+ * 默认 px/无单位 转为rpx
16
+ * @deprecated
17
+ */
18
+ toRpx?: boolean;
19
+ /**
20
+ * px/无单位情况下 处理为何单位
21
+ * rem | rpx | px
22
+ * 优先级高于以上
23
+ */
24
+ defaultUnit?: 'rem' | 'px' | 'rpx';
25
+ /**
26
+ * 是否使用 calc(xx px / `${rpxCalcRoot}`) 来模拟rpx
27
+ * 小程序不需要转
28
+ */
29
+ rpxCalcRoot?: string;
30
+ ignoreSelf?: boolean;
31
+ addPXUnit?: boolean;
32
+ }): Properties<string | number>;
33
+ interface ITranslateStyleOptions {
34
+ looseError?: boolean;
35
+ rpxCalcRoot?: string;
36
+ }
37
+ /**
38
+ * @deprecated
39
+ */
40
+ export declare function processCSSProperties2Rem(style?: Properties<string | number>, options?: ITranslateStyleOptions): Properties<string | number>;
41
+ export declare function processCSSPropertiesUnit(style: Properties<string | number>, type: 'px' | 'rem' | 'rpx', options?: ITranslateStyleOptions): {};
42
+ export {};
43
43
  //# sourceMappingURL=style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/parser/cals/utils/style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS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CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACwE,GAC7F,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAkS7B;AACD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,GAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAM,EACvC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAE7B;AACD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAM,EACvC,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,EAC1B,OAAO,CAAC,EAAE,sBAAsB,MAajC"}
@@ -10,14 +10,10 @@ 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
- };
16
13
  Object.defineProperty(exports, "__esModule", { value: true });
17
14
  exports.processCSSPropertiesUnit = exports.processCSSProperties2Rem = exports.processCommonStyle2CSSProperties = exports.removeInvalidStyleFormValue = void 0;
18
15
  const common_1 = require("./common");
19
- const map_1 = __importDefault(require("lodash/map"));
20
- const uniq_1 = __importDefault(require("lodash/uniq"));
16
+ const lodash_1 = require("lodash");
21
17
  const utils_1 = require("../../../utils");
22
18
  const DISTANCE_KEY_LIST = ['top', 'right', 'bottom', 'left'];
23
19
  function removeInvalidStyleFormValue(styleForm = {}) {
@@ -68,7 +64,7 @@ function _handleStyleNumValue(styleVal, addPXUnit) {
68
64
  function setDistanceStyle(style, distance, attr, addPXUnit) {
69
65
  const attributeKey = (0, common_1.camelcase)(`${attr}`);
70
66
  if (Object.keys(distance).length === 4) {
71
- if ((0, uniq_1.default)((0, map_1.default)(distance, (val) => val)).length === 1) {
67
+ if ((0, lodash_1.uniq)((0, lodash_1.map)(distance, (val) => val)).length === 1) {
72
68
  // 4个值全相等的情况
73
69
  setStyleValue(style, attributeKey, _handleStyleNumValue(distance.top, addPXUnit));
74
70
  }
@@ -284,7 +280,7 @@ function processCommonStyle2CSSProperties(commonStyle = {}, options = { toRem: t
284
280
  bottomLeft = '0';
285
281
  }
286
282
  }
287
- if ((0, uniq_1.default)((0, map_1.default)(radiusInfo, (val) => val)).length === 1) {
283
+ if ((0, lodash_1.uniq)((0, lodash_1.map)(radiusInfo, (val) => val)).length === 1) {
288
284
  // 4个值全相等的情况
289
285
  setStyleValue(style, 'borderRadius', _handleStyleNumValue(topLeft, !!options.addPXUnit));
290
286
  }
@@ -1,6 +1,6 @@
1
- import { ECodeType } from '../../../types';
2
- export declare function generateDefaultCode(ctx: {
3
- id: string;
4
- version?: string;
5
- }, type: ECodeType, scope: 'component' | 'page' | 'app'): string;
1
+ import { ECodeType } from '../../../types';
2
+ export declare function generateDefaultCode(ctx: {
3
+ id: string;
4
+ version?: string;
5
+ }, type: ECodeType, scope: 'component' | 'page' | 'app'): string;
6
6
  //# sourceMappingURL=template.d.ts.map
File without changes
File without changes
@@ -1,5 +1,5 @@
1
- export declare function beforeCommonParse(comp: any): void;
2
- export declare function afterCommonParse(comp: any): void;
3
- export declare function addFormItem(comp: any, key: any, parent: any, isOnlySlot?: boolean): void;
4
- export declare function renameRepeatId(json: any): void;
1
+ export declare function beforeCommonParse(comp: any): void;
2
+ export declare function afterCommonParse(comp: any): void;
3
+ export declare function addFormItem(comp: any, key: any, parent: any, isOnlySlot?: boolean): void;
4
+ export declare function renameRepeatId(json: any): void;
5
5
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/version/common.ts"],"names":[],"mappings":"AAiBA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,QAE1C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,QAYzC;AA2LD,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,UAAQ,QAiJ/E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,QAsCvC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/version/common.ts"],"names":[],"mappings":"AAcA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,QAE1C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,QAYzC;AA2LD,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,UAAQ,QAiJ/E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,QAsCvC"}
@@ -1,14 +1,31 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.renameRepeatId = exports.addFormItem = exports.afterCommonParse = exports.beforeCommonParse = void 0;
7
27
  const utils_1 = require("./utils");
8
- const get_1 = __importDefault(require("lodash/get"));
9
- const set_1 = __importDefault(require("lodash/set"));
10
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
11
- const merge_1 = __importDefault(require("lodash/merge"));
28
+ const lodash_1 = __importStar(require("lodash"));
12
29
  const index_1 = require("./index");
13
30
  const common_1 = require("../common");
14
31
  const utils_2 = require("../../../../utils");
@@ -179,7 +196,7 @@ function translateStyleToCommonStyle(comp) {
179
196
  if (xProps === null || xProps === void 0 ? void 0 : xProps.style) {
180
197
  xProps.commonStyle = xProps.commonStyle || {};
181
198
  xProps.commonStyle.self = xProps.commonStyle.self || {};
182
- xProps.commonStyle.self = (0, merge_1.default)(xProps.style, xProps.commonStyle.self);
199
+ xProps.commonStyle.self = (0, lodash_1.merge)(xProps.style, xProps.commonStyle.self);
183
200
  delete xProps.style;
184
201
  }
185
202
  }
@@ -201,12 +218,12 @@ function addDefaultXIndex(comp) {
201
218
  }
202
219
  function addFormItem(comp, key, parent, isOnlySlot = false) {
203
220
  const { properties, xIndex, xProps } = comp;
204
- const defaultValue = (0, get_1.default)(xProps, 'data.defaultValue');
221
+ const defaultValue = lodash_1.default.get(xProps, 'data.defaultValue');
205
222
  if (defaultValue) {
206
- (0, set_1.default)(xProps, 'data.value', defaultValue);
223
+ lodash_1.default.set(xProps, 'data.value', defaultValue);
207
224
  delete xProps.data.defaultValue;
208
225
  }
209
- const rulesValue = (0, get_1.default)(xProps, 'data.rules') || {
226
+ const rulesValue = lodash_1.default.get(xProps, 'data.rules') || {
210
227
  value: [],
211
228
  };
212
229
  if (!rulesValue.type || rulesValue.type === 'static') {
@@ -222,19 +239,19 @@ function addFormItem(comp, key, parent, isOnlySlot = false) {
222
239
  rulesValue.value = [rulesValue.value];
223
240
  }
224
241
  }
225
- const layoutValue = (0, get_1.default)(xProps, 'data.layout') || {
242
+ const layoutValue = lodash_1.default.get(xProps, 'data.layout') || {
226
243
  value: 'vertical',
227
244
  };
228
- const requireValue = (0, get_1.default)(xProps, 'data.required') || {
245
+ const requireValue = lodash_1.default.get(xProps, 'data.required') || {
229
246
  value: false,
230
247
  };
231
248
  const requiredTextValue = {
232
249
  value: (requireValue === null || requireValue === void 0 ? void 0 : requireValue.value) ? '该项为必填项' : false,
233
250
  };
234
- const nameValue = (0, get_1.default)(xProps, 'data.name') || {
251
+ const nameValue = lodash_1.default.get(xProps, 'data.name') || {
235
252
  value: 'uniqueFormKey',
236
253
  };
237
- let labelText = (0, get_1.default)(xProps, 'data.label.value') || '';
254
+ let labelText = lodash_1.default.get(xProps, 'data.label.value') || '';
238
255
  let isShowTitleSlot = false;
239
256
  if (properties) {
240
257
  Object.keys(properties).map((subKey) => {
@@ -244,8 +261,8 @@ function addFormItem(comp, key, parent, isOnlySlot = false) {
244
261
  if (subKey === 'label') {
245
262
  const targetLabelSlot = properties[subKey];
246
263
  (0, utils_1.getComponentChildren)(targetLabelSlot).map(([key, item]) => {
247
- labelText = (0, get_1.default)(item, 'xProps.data.text.value');
248
- const cloneItem = (0, cloneDeep_1.default)(item);
264
+ labelText = lodash_1.default.get(item, 'xProps.data.text.value');
265
+ const cloneItem = lodash_1.default.cloneDeep(item);
249
266
  (0, index_1.deepParse)(cloneItem, key, comp);
250
267
  isShowTitleSlot = true;
251
268
  });
@@ -1,16 +1,16 @@
1
- /**
2
- 备注:登录 WeApps v2,在任一页面控制台输入以下代码(需要修改相应的分类名称),以获取指定分类的 COMPLEX_COMPONENT_KEYS
1
+ /**
2
+ 备注:登录 WeApps v2,在任一页面控制台输入以下代码(需要修改相应的分类名称),以获取指定分类的 COMPLEX_COMPONENT_KEYS
3
3
 
4
- fetch(`http://dev.weapps.woa.com/api/compositeComp/list?pageIndex=0&category=${encodeURI('审批系统')}&keyword=&pageSize=500`).then(function(response) {
5
- return response.json();
6
- }).then(function(json) {
7
- console.log(JSON.stringify(json.data.rows.map(item => item.name), null, 2))
8
- });
4
+ fetch(`http://dev.weapps.woa.com/api/compositeComp/list?pageIndex=0&category=${encodeURI('审批系统')}&keyword=&pageSize=500`).then(function(response) {
5
+ return response.json();
6
+ }).then(function(json) {
7
+ console.log(JSON.stringify(json.data.rows.map(item => item.name), null, 2))
8
+ });
9
9
 
10
- */
11
- export declare const COMPLEX_COMPONENT_KEYS: string[];
12
- export declare const FORM_COMPONENT_KEYS: string[];
13
- export declare const GSD_H5_REACT_COMPONENT_KEYS: string[];
14
- export declare const COMPONENT_SELECTABLEBLOCK_WHITELIST: string[];
15
- export declare const MODULE_SELECTABLEBLOCK_REGEX: RegExp;
10
+ */
11
+ export declare const COMPLEX_COMPONENT_KEYS: string[];
12
+ export declare const FORM_COMPONENT_KEYS: string[];
13
+ export declare const GSD_H5_REACT_COMPONENT_KEYS: string[];
14
+ export declare const COMPONENT_SELECTABLEBLOCK_WHITELIST: string[];
15
+ export declare const MODULE_SELECTABLEBLOCK_REGEX: RegExp;
16
16
  //# sourceMappingURL=config.d.ts.map
File without changes
File without changes
@@ -1,3 +1,3 @@
1
- export declare function upgrageToVersion2(app: any): any;
2
- export declare function deepParse(comp: any, key: any, parent: any): void;
1
+ export declare function upgrageToVersion2(app: any): any;
2
+ export declare function deepParse(comp: any, key: any, parent: any): void;
3
3
  //# sourceMappingURL=index.d.ts.map
File without changes
File without changes
@@ -1,16 +1,16 @@
1
- export declare function parseGsdKboneFooter(comp: any): void;
2
- export declare function parseGsdKboneButton(comp: any): void;
3
- export declare function parseGsdKbonePopLayer(comp: any): void;
4
- export declare function parseGsdKboneAgree(comp: any, key: any, parent: any): void;
5
- export declare function parseGsdKboneSwiper(comp: any): void;
6
- export declare function parseGsdKboneRichText(comp: any): void;
7
- export declare function parseGsdKboneText(comp: any): void;
8
- export declare function parseGsdKboneInput(comp: any, key: any, parent: any): void;
9
- export declare function parseGsdKboneSwitch(comp: any, key: any, parent: any): void;
10
- export declare function parseGsdKbonePicker(comp: any, key: any, parent: any): void;
11
- export declare function parseGsdKboneDateTimePicker(comp: any, key: any, parent: any): void;
12
- export declare function parseGsdKboneUpload(comp: any, key: any, parent: any): void;
13
- export declare function addFormWrapperComp(pageInstance: any): void;
14
- export declare function parseGsdKboneTabs(comp: any): void;
15
- export declare function parseComplexComponentInstance(instance: any): void;
1
+ export declare function parseGsdKboneFooter(comp: any): void;
2
+ export declare function parseGsdKboneButton(comp: any): void;
3
+ export declare function parseGsdKbonePopLayer(comp: any): void;
4
+ export declare function parseGsdKboneAgree(comp: any, key: any, parent: any): void;
5
+ export declare function parseGsdKboneSwiper(comp: any): void;
6
+ export declare function parseGsdKboneRichText(comp: any): void;
7
+ export declare function parseGsdKboneText(comp: any): void;
8
+ export declare function parseGsdKboneInput(comp: any, key: any, parent: any): void;
9
+ export declare function parseGsdKboneSwitch(comp: any, key: any, parent: any): void;
10
+ export declare function parseGsdKbonePicker(comp: any, key: any, parent: any): void;
11
+ export declare function parseGsdKboneDateTimePicker(comp: any, key: any, parent: any): void;
12
+ export declare function parseGsdKboneUpload(comp: any, key: any, parent: any): void;
13
+ export declare function addFormWrapperComp(pageInstance: any): void;
14
+ export declare function parseGsdKboneTabs(comp: any): void;
15
+ export declare function parseComplexComponentInstance(instance: any): void;
16
16
  //# sourceMappingURL=parses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parses.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/version/parses.ts"],"names":[],"mappings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AG,QAmC5C;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,QA4G5C;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,QA4B9C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAuBlE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,QAoF5C;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,QAM9C;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,QAc1C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAmDlE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAanE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAGnE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAQ3E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QA6CnE;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,GAAG,QAgDnD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,QAwD1C;AAGD,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,GAAG,QAuB1D"}
@@ -1,13 +1,31 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.parseComplexComponentInstance = exports.parseGsdKboneTabs = exports.addFormWrapperComp = exports.parseGsdKboneUpload = exports.parseGsdKboneDateTimePicker = exports.parseGsdKbonePicker = exports.parseGsdKboneSwitch = exports.parseGsdKboneInput = exports.parseGsdKboneText = exports.parseGsdKboneRichText = exports.parseGsdKboneSwiper = exports.parseGsdKboneAgree = exports.parseGsdKbonePopLayer = exports.parseGsdKboneButton = exports.parseGsdKboneFooter = void 0;
7
27
  const utils_1 = require("./utils");
8
- const get_1 = __importDefault(require("lodash/get"));
9
- const set_1 = __importDefault(require("lodash/set"));
10
- const merge_1 = __importDefault(require("lodash/merge"));
28
+ const lodash_1 = __importStar(require("lodash"));
11
29
  const common_1 = require("./common");
12
30
  const utils_2 = require("../../../../utils");
13
31
  function parseGsdKboneFooter(comp) {
@@ -265,7 +283,7 @@ function parseGsdKboneSwiper(comp) {
265
283
  else {
266
284
  const newSwiperItemId = (0, utils_1.getId)();
267
285
  const newSubComp = JSON.parse(JSON.stringify(subComp).replace(new RegExp(`forItems\\.${subKey}`, 'g'), `forItems.${newSwiperItemId}`));
268
- const waFor = (0, get_1.default)(newSubComp, 'xProps.directives.waFor');
286
+ const waFor = lodash_1.default.get(newSubComp, 'xProps.directives.waFor');
269
287
  try {
270
288
  delete newSubComp.xProps.directives.waFor;
271
289
  delete comp.properties[subKey];
@@ -312,7 +330,7 @@ function parseGsdKboneText(comp) {
312
330
  comp.xProps = comp.xProps || {};
313
331
  comp.xProps.commonStyle = comp.xProps.commonStyle || {};
314
332
  // v1 版本 text 为 block
315
- comp.xProps.commonStyle = (0, merge_1.default)({
333
+ comp.xProps.commonStyle = (0, lodash_1.merge)({
316
334
  display: 'block',
317
335
  self: {
318
336
  display: 'block',
@@ -365,20 +383,20 @@ function parseGsdKboneInput(comp, key, parent) {
365
383
  },
366
384
  };
367
385
  (0, utils_1.addDefaultData)(defaultData, comp);
368
- const append = (0, get_1.default)(comp, 'properties.append');
386
+ const append = lodash_1.default.get(comp, 'properties.append');
369
387
  if (append) {
370
- (0, set_1.default)(comp, 'properties.suffix', append);
371
- (0, set_1.default)(comp, 'xProps.data.isSuffix.value', true);
388
+ lodash_1.default.set(comp, 'properties.suffix', append);
389
+ lodash_1.default.set(comp, 'xProps.data.isSuffix.value', true);
372
390
  delete comp.properties.append;
373
391
  }
374
392
  }
375
393
  exports.parseGsdKboneInput = parseGsdKboneInput;
376
394
  function parseGsdKboneSwitch(comp, key, parent) {
377
395
  (0, common_1.addFormItem)(comp, key, parent, true);
378
- const defaultValue = (0, get_1.default)(comp, 'xProps.data.defaultValue');
379
- defaultValue && (0, set_1.default)(comp, 'xProps.data.value', defaultValue);
380
- const originStyle = (0, get_1.default)(comp, 'xProps.commonStyle.margin');
381
- (0, set_1.default)(comp, 'xProps.commonStyle.margin', Object.assign(Object.assign({}, originStyle), { top: '30', right: '40', bottom: '30', left: '40' }));
396
+ const defaultValue = lodash_1.default.get(comp, 'xProps.data.defaultValue');
397
+ defaultValue && lodash_1.default.set(comp, 'xProps.data.value', defaultValue);
398
+ const originStyle = lodash_1.default.get(comp, 'xProps.commonStyle.margin');
399
+ lodash_1.default.set(comp, 'xProps.commonStyle.margin', Object.assign(Object.assign({}, originStyle), { top: '30', right: '40', bottom: '30', left: '40' }));
382
400
  }
383
401
  exports.parseGsdKboneSwitch = parseGsdKboneSwitch;
384
402
  function parseGsdKbonePicker(comp, key, parent) {
@@ -388,7 +406,7 @@ function parseGsdKbonePicker(comp, key, parent) {
388
406
  exports.parseGsdKbonePicker = parseGsdKbonePicker;
389
407
  function parseGsdKboneDateTimePicker(comp, key, parent) {
390
408
  (0, common_1.addFormItem)(comp, key, parent);
391
- const modeValue = (0, get_1.default)(comp, 'xProps.data.mode.value');
409
+ const modeValue = lodash_1.default.get(comp, 'xProps.data.mode.value');
392
410
  if (modeValue === 'date') {
393
411
  comp.xComponent.name = 'Date';
394
412
  }
@@ -456,10 +474,10 @@ function addFormWrapperComp(pageInstance) {
456
474
  let comp = _comp;
457
475
  const { xComponent, xProps } = comp;
458
476
  if (xComponent && xComponent.name === 'Button') {
459
- const target = (0, get_1.default)(xProps, 'listeners[0]');
477
+ const target = lodash_1.default.get(xProps, 'listeners[0]');
460
478
  if (target && target.trigger && target.trigger === 'click') {
461
479
  listeners = xProps.listeners;
462
- (0, set_1.default)(xProps, 'data.formType', {
480
+ lodash_1.default.set(xProps, 'data.formType', {
463
481
  value: 'submit',
464
482
  });
465
483
  target.trigger = 'submit';
@@ -511,7 +529,7 @@ function parseGsdKboneTabs(comp) {
511
529
  }
512
530
  let tabItems; // [{key, title, content}]
513
531
  if (xProps.data) {
514
- tabItems = (0, get_1.default)(xProps.data, 'TabItems.value', []);
532
+ tabItems = lodash_1.default.get(xProps.data, 'TabItems.value', []);
515
533
  // 只保留 activeKey
516
534
  Object.keys(xProps.data).forEach((key) => {
517
535
  if (key !== 'activeKey')
@@ -1,14 +1,14 @@
1
- export declare function init(json: any): void;
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;
6
- export declare function addDefaultData(defaultData: any, comp: any): void;
7
- export declare function isComplexJSON(json: any): any;
8
- export declare function getComponentChildren(component: any): [string, unknown][];
9
- export declare function isWeAppId(key?: string): RegExpMatchArray | null;
10
- export declare function isEmptyObject(obj?: {}): boolean;
11
- export declare function isPlainObject(src: any): boolean;
12
- export declare function checkIsNeedAddFormWrapper(tree: any): boolean;
13
- export declare function findComponentInTree(tree: any, cb: (cmp: any, path: string) => any, path?: string): any;
1
+ export declare function init(json: any): void;
2
+ export declare function getId(): string;
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
+ export declare function addDefaultData(defaultData: any, comp: any): void;
7
+ export declare function isComplexJSON(json: any): any;
8
+ export declare function getComponentChildren(component: any): [string, unknown][];
9
+ export declare function isWeAppId(key?: string): RegExpMatchArray;
10
+ export declare function isEmptyObject(obj?: {}): boolean;
11
+ export declare function isPlainObject(src: any): boolean;
12
+ export declare function checkIsNeedAddFormWrapper(tree: any): boolean;
13
+ export declare function findComponentInTree(tree: any, cb: (cmp: any, path: string) => any, path?: string): any;
14
14
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/version/utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,IAAI,CAAC,IAAI,EAAE,GAAG,QA2B7B;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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AAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,GAAG,EAAE,IAAI,SAAK,GAAG,GAAG,CAmBlG"}
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.findComponentInTree = exports.checkIsNeedAddFormWrapper = exports.isPlainObject = exports.isEmptyObject = exports.isWeAppId = exports.getComponentChildren = exports.isComplexJSON = exports.addDefaultData = exports.addDefaultSlot = exports.isGsdH5ReactComponent = exports.isComplexComponent = exports.getId = exports.init = void 0;
7
4
  const config_1 = require("./config");
8
- const merge_1 = __importDefault(require("lodash/merge"));
5
+ const lodash_1 = require("lodash");
9
6
  const ids = [];
10
7
  let maxId = 10000;
11
8
  function init(json) {
@@ -74,7 +71,7 @@ function addDefaultData(defaultData, comp) {
74
71
  // @ts-ignore
75
72
  comp.xProps = comp.xProps || {};
76
73
  comp.xProps.data = comp.xProps.data || {};
77
- comp.xProps.data = (0, merge_1.default)(defaultData, comp.xProps.data);
74
+ comp.xProps.data = (0, lodash_1.merge)(defaultData, comp.xProps.data);
78
75
  }
79
76
  exports.addDefaultData = addDefaultData;
80
77
  function isComplexJSON(json) {
@@ -0,0 +1,2 @@
1
+ export declare const OFFICIAL_LIB_KEY = "gsd-h5-react";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/parser/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OFFICIAL_LIB_KEY = void 0;
4
+ exports.OFFICIAL_LIB_KEY = 'gsd-h5-react';