@byteluck-fe/model-driven-engine 2.23.0-beta.12 → 2.23.0-beta.14

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 (32) hide show
  1. package/README.md +30 -30
  2. package/dist/esm/common/ActionManager.js +4 -4
  3. package/dist/esm/common/Engine.js +93 -66
  4. package/dist/esm/common/Runtime.js +30 -14
  5. package/dist/esm/common/Store.js +4 -7
  6. package/dist/esm/common/checkerValue.js +37 -17
  7. package/dist/esm/common/proxyState.js +18 -18
  8. package/dist/esm/plugins/CalcPlugin.js +43 -43
  9. package/dist/esm/plugins/ControlsEventPlugin.js +2 -2
  10. package/dist/esm/plugins/LifecycleEventPlugin.js +2 -2
  11. package/dist/esm/plugins/StylePlugin.js +6 -6
  12. package/dist/index.umd.js +7 -7
  13. package/dist/types/common/ActionManager.d.ts +14 -14
  14. package/dist/types/common/DataManager.d.ts +10 -10
  15. package/dist/types/common/Engine.d.ts +201 -201
  16. package/dist/types/common/OkWorker.d.ts +13 -13
  17. package/dist/types/common/Plugin.d.ts +6 -6
  18. package/dist/types/common/Runtime.d.ts +31 -31
  19. package/dist/types/common/Store.d.ts +54 -54
  20. package/dist/types/common/checkerValue.d.ts +3 -3
  21. package/dist/types/common/index.d.ts +2 -2
  22. package/dist/types/common/proxyState.d.ts +30 -30
  23. package/dist/types/index.d.ts +3 -3
  24. package/dist/types/plugins/CalcPlugin.d.ts +121 -121
  25. package/dist/types/plugins/ControlsEventPlugin.d.ts +17 -17
  26. package/dist/types/plugins/ES6ModulePlugin.d.ts +27 -27
  27. package/dist/types/plugins/LifecycleEventPlugin.d.ts +15 -15
  28. package/dist/types/plugins/StylePlugin.d.ts +13 -13
  29. package/dist/types/plugins/index.d.ts +5 -5
  30. package/dist/types/utils/index.d.ts +1 -1
  31. package/dist/types/utils/runtimeUtils.d.ts +5 -5
  32. package/package.json +4 -4
package/README.md CHANGED
@@ -1,30 +1,30 @@
1
- # Engine
2
- 运行态引擎
3
-
4
- ```
5
- │ index.ts // 入口文件
6
-
7
- ├─common // 引擎相关
8
- │ ActionManager.ts // utils操作管理
9
- │ checkerValue.ts // 表单值校验器
10
- │ DataManager.ts // 数据源容器
11
- │ Engine.ts // 引擎
12
- │ index.ts // 入口
13
- │ OkWorker.ts // 无用
14
- │ Plugin.ts // 插件
15
- │ proxyState.ts // 劫持引擎表单数据
16
- │ Runtime.ts // 控件注册和创建
17
- │ Store.ts // 数据管理
18
-
19
- ├─plugins
20
- │ CalcPlugin.ts // 计算公式插件
21
- │ ControlsEventPlugin.ts // 控件二开事件插件
22
- │ ES6ModulePlugin.ts //
23
- │ index.ts
24
- │ LifecycleEventPlugin.ts // 页面生命周期事件
25
- │ StylePlugin.ts // css二开
26
-
27
- └─utils
28
- index.ts
29
- runtimeUtils.ts // 工具函数
30
- ```
1
+ # Engine
2
+ 运行态引擎
3
+
4
+ ```
5
+ │ index.ts // 入口文件
6
+
7
+ ├─common // 引擎相关
8
+ │ ActionManager.ts // utils操作管理
9
+ │ checkerValue.ts // 表单值校验器
10
+ │ DataManager.ts // 数据源容器
11
+ │ Engine.ts // 引擎
12
+ │ index.ts // 入口
13
+ │ OkWorker.ts // 无用
14
+ │ Plugin.ts // 插件
15
+ │ proxyState.ts // 劫持引擎表单数据
16
+ │ Runtime.ts // 控件注册和创建
17
+ │ Store.ts // 数据管理
18
+
19
+ ├─plugins
20
+ │ CalcPlugin.ts // 计算公式插件
21
+ │ ControlsEventPlugin.ts // 控件二开事件插件
22
+ │ ES6ModulePlugin.ts //
23
+ │ index.ts
24
+ │ LifecycleEventPlugin.ts // 页面生命周期事件
25
+ │ StylePlugin.ts // css二开
26
+
27
+ └─utils
28
+ index.ts
29
+ runtimeUtils.ts // 工具函数
30
+ ```
@@ -186,11 +186,11 @@ export var ActionManager = /*#__PURE__*/ function() {
186
186
  _class_call_check(this, ActionManager);
187
187
  _define_property(this, "actionMap", new Map());
188
188
  _define_property(this, "buildinActions", {});
189
- /**
190
- * 执行action的时候,作为第二个参数传递给方法,可以通过外部挂载
189
+ /**
190
+ * 执行action的时候,作为第二个参数传递给方法,可以通过外部挂载
191
191
  */ _define_property(this, "actionUtils", {});
192
- /**
193
- * 用于存储es module解析出来的源码,CustomVueControlPlugin
192
+ /**
193
+ * 用于存储es module解析出来的源码,CustomVueControlPlugin
194
194
  */ _define_property(this, "sources", {});
195
195
  }
196
196
  _create_class(ActionManager, [
@@ -44,10 +44,6 @@ function _async_to_generator(fn) {
44
44
  });
45
45
  };
46
46
  }
47
- function _call_super(_this, derived, args) {
48
- derived = _get_prototype_of(derived);
49
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
50
- }
51
47
  function _class_call_check(instance, Constructor) {
52
48
  if (!(instance instanceof Constructor)) {
53
49
  throw new TypeError("Cannot call a class as a function");
@@ -226,12 +222,28 @@ function _unsupported_iterable_to_array(o, minLen) {
226
222
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
227
223
  }
228
224
  function _is_native_reflect_construct() {
225
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
226
+ if (Reflect.construct.sham) return false;
227
+ if (typeof Proxy === "function") return true;
229
228
  try {
230
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
231
- } catch (_) {}
232
- return (_is_native_reflect_construct = function() {
233
- return !!result;
234
- })();
229
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
230
+ return true;
231
+ } catch (e) {
232
+ return false;
233
+ }
234
+ }
235
+ function _create_super(Derived) {
236
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
237
+ return function _createSuperInternal() {
238
+ var Super = _get_prototype_of(Derived), result;
239
+ if (hasNativeReflectConstruct) {
240
+ var NewTarget = _get_prototype_of(this).constructor;
241
+ result = Reflect.construct(Super, arguments, NewTarget);
242
+ } else {
243
+ result = Super.apply(this, arguments);
244
+ }
245
+ return _possible_constructor_return(this, result);
246
+ };
235
247
  }
236
248
  function _ts_generator(thisArg, body) {
237
249
  var f, y, t, g, _ = {
@@ -349,14 +361,30 @@ var applyingPluginName = '';
349
361
  var Engine = /*#__PURE__*/ function(Watcher) {
350
362
  "use strict";
351
363
  _inherits(Engine, Watcher);
364
+ var _super = _create_super(Engine);
352
365
  function Engine(props) {
353
366
  _class_call_check(this, Engine);
354
367
  var _this;
355
- _this = _call_super(this, Engine), _define_property(_this, "store", void 0), _define_property(_this, "rawStore", {}), _define_property(_this, "parent", void 0), // 提供注册运行态控件以及实例化控件的能力
356
- _define_property(_this, "runtime", void 0), // 提供子线程处理脚本以及修改数据的能力
368
+ _this = _super.call(this);
369
+ _define_property(_assert_this_initialized(_this), "store", void 0);
370
+ _define_property(_assert_this_initialized(_this), "rawStore", {});
371
+ _define_property(_assert_this_initialized(_this), "parent", void 0);
372
+ // 提供注册运行态控件以及实例化控件的能力
373
+ _define_property(_assert_this_initialized(_this), "runtime", void 0);
374
+ // 提供子线程处理脚本以及修改数据的能力
357
375
  // public worker: OkWorker
358
- _define_property(_this, "isMounted", false), _define_property(_this, "id", genNonDuplicateId(8)), _define_property(_this, "externalParams", void 0), _define_property(_this, "children", void 0), // 提供外部注册插件,在不同的hooks触发时执行固定函数的能力
359
- _define_property(_this, "__plugins", void 0), _define_property(_this, "__pluginsApplied", false), _define_property(_this, "$options", void 0), _define_property(_this, "actionManager", new ActionManager()), _define_property(_this, "dataManager", void 0), _define_property(_this, "_jobTasks", []), _define_property(_this, "createControlInstance", _this.createInstance);
376
+ _define_property(_assert_this_initialized(_this), "isMounted", false);
377
+ _define_property(_assert_this_initialized(_this), "id", genNonDuplicateId(8));
378
+ _define_property(_assert_this_initialized(_this), "externalParams", void 0);
379
+ _define_property(_assert_this_initialized(_this), "children", void 0);
380
+ // 提供外部注册插件,在不同的hooks触发时执行固定函数的能力
381
+ _define_property(_assert_this_initialized(_this), "__plugins", void 0);
382
+ _define_property(_assert_this_initialized(_this), "__pluginsApplied", false);
383
+ _define_property(_assert_this_initialized(_this), "$options", void 0);
384
+ _define_property(_assert_this_initialized(_this), "actionManager", new ActionManager());
385
+ _define_property(_assert_this_initialized(_this), "dataManager", void 0);
386
+ _define_property(_assert_this_initialized(_this), "_jobTasks", []);
387
+ _define_property(_assert_this_initialized(_this), "createControlInstance", _this.createInstance);
360
388
  _this.$options = Object.freeze(props);
361
389
  var _this_$options = _this.$options, _this_$options_autoMount = _this_$options.autoMount, autoMount = _this_$options_autoMount === void 0 ? true : _this_$options_autoMount, schema = _this_$options.schema, beforeCreateInstance = _this_$options.beforeCreateInstance, externalParams = _this_$options.externalParams, _this_$options_language = _this_$options.// fieldModel,
362
390
  language, language = _this_$options_language === void 0 ? DEFAULT_LOCALE : _this_$options_language, _this_$options_debug = _this_$options.debug, debug = _this_$options_debug === void 0 ? false : _this_$options_debug, messagesI18n = _this_$options.messagesI18n, children = _this_$options.children;
@@ -596,7 +624,6 @@ var Engine = /*#__PURE__*/ function(Watcher) {
596
624
  {
597
625
  key: "_handlerSubtableUpdateUid",
598
626
  value: function _handlerSubtableUpdateUid(subtableData) {
599
- ;
600
627
  subtableData.forEach(function(item) {
601
628
  if (!item.uid) {
602
629
  Object.assign(item, {
@@ -950,9 +977,9 @@ var Engine = /*#__PURE__*/ function(Watcher) {
950
977
  }
951
978
  },
952
979
  {
953
- /**
954
- * 设置payload的options,提供在不是使用标准api修改state的时候可以传递options,会在本次任务执行完成之后清空
955
- * @param options 需要携带的options
980
+ /**
981
+ * 设置payload的options,提供在不是使用标准api修改state的时候可以传递options,会在本次任务执行完成之后清空
982
+ * @param options 需要携带的options
956
983
  * */ key: "setPayloadOptions",
957
984
  value: function setPayloadOptions(options) {
958
985
  eventOptionsTemp = options;
@@ -969,9 +996,9 @@ var Engine = /*#__PURE__*/ function(Watcher) {
969
996
  }
970
997
  },
971
998
  {
972
- /**
973
- * 向Store设置一组值,明细表必须全量赋值,并触发事件(触发事件是根据组件在页面中的顺序逐个触发)
974
- * @param states
999
+ /**
1000
+ * 向Store设置一组值,明细表必须全量赋值,并触发事件(触发事件是根据组件在页面中的顺序逐个触发)
1001
+ * @param states
975
1002
  */ key: "setStates",
976
1003
  value: function setStates(states, rowIndex, options) {
977
1004
  var _this = this;
@@ -998,11 +1025,11 @@ var Engine = /*#__PURE__*/ function(Watcher) {
998
1025
  }
999
1026
  },
1000
1027
  {
1001
- /**
1002
- * 通过dataCode和fieldCode来获取控件的值
1003
- * @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
1004
- * @param fieldCode 字段编码 - 控件绑定的数据项的编码
1005
- * @param rowIndex 行下标 - 如果是明细子表中的控件需要提供
1028
+ /**
1029
+ * 通过dataCode和fieldCode来获取控件的值
1030
+ * @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
1031
+ * @param fieldCode 字段编码 - 控件绑定的数据项的编码
1032
+ * @param rowIndex 行下标 - 如果是明细子表中的控件需要提供
1006
1033
  * */ key: "getField",
1007
1034
  value: function getField(dataCode, fieldCode, rowIndex) {
1008
1035
  if (!fieldCode) {
@@ -1117,13 +1144,13 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1117
1144
  }
1118
1145
  },
1119
1146
  {
1120
- /**
1121
- * 通过dataCode和fieldCode来设置控件的值
1122
- * @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
1123
- * @param fieldCode 字段编码 - 控件绑定的数据项的编码
1124
- * @param value 修改的值
1125
- * @param rowIndex 行下标 - 如果是明细子表中的控件需要提供
1126
- * @param options 触发事件携带的参数
1147
+ /**
1148
+ * 通过dataCode和fieldCode来设置控件的值
1149
+ * @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
1150
+ * @param fieldCode 字段编码 - 控件绑定的数据项的编码
1151
+ * @param value 修改的值
1152
+ * @param rowIndex 行下标 - 如果是明细子表中的控件需要提供
1153
+ * @param options 触发事件携带的参数
1127
1154
  * */ key: "setField",
1128
1155
  value: function setField(dataCode, fieldCode, value, rowIndex, options) {
1129
1156
  var dataBindMapping = this.getDataBindMapping(dataCode, fieldCode);
@@ -1151,12 +1178,12 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1151
1178
  }
1152
1179
  },
1153
1180
  {
1154
- /**
1155
- * 通过dataCode和 state来给一组控件赋值,并触发事件携带options
1156
- * @param dataCode 需要赋值的目标模型
1157
- * @param state 赋值对象,以fieldCode为key组成的对象
1158
- * @param rowIndex 行下标,给明细子表赋值时指定赋值某行
1159
- * @param options 触发事件携带的参数
1181
+ /**
1182
+ * 通过dataCode和 state来给一组控件赋值,并触发事件携带options
1183
+ * @param dataCode 需要赋值的目标模型
1184
+ * @param state 赋值对象,以fieldCode为key组成的对象
1185
+ * @param rowIndex 行下标,给明细子表赋值时指定赋值某行
1186
+ * @param options 触发事件携带的参数
1160
1187
  * */ key: "setFields",
1161
1188
  value: function setFields(dataCode, state, rowIndex, options) {
1162
1189
  var _this = this;
@@ -1197,10 +1224,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1197
1224
  }
1198
1225
  },
1199
1226
  {
1200
- /**
1201
- * 通过dataCode来将state转化为标准的state结构
1202
- * @param dataCode 需要转换的目标模型code
1203
- * @param state 值对象,以fieldCode为key组成的对象
1227
+ /**
1228
+ * 通过dataCode来将state转化为标准的state结构
1229
+ * @param dataCode 需要转换的目标模型code
1230
+ * @param state 值对象,以fieldCode为key组成的对象
1204
1231
  * */ key: "buildFields",
1205
1232
  value: function buildFields(dataCode, state) {
1206
1233
  var _this = this;
@@ -1241,10 +1268,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1241
1268
  }
1242
1269
  },
1243
1270
  {
1244
- /**
1245
- * 向Store设置一组值,并触发事件携带options
1246
- * @param dataSet
1247
- * @options 传递给关联事件中 EventPayload中的options,一般在plugin中监听使用
1271
+ /**
1272
+ * 向Store设置一组值,并触发事件携带options
1273
+ * @param dataSet
1274
+ * @options 传递给关联事件中 EventPayload中的options,一般在plugin中监听使用
1248
1275
  */ key: "setData",
1249
1276
  value: function setData(dataSet, options) {
1250
1277
  var _this = this;
@@ -1382,19 +1409,19 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1382
1409
  }
1383
1410
  },
1384
1411
  {
1385
- /**
1386
- * 获取控件的dataBind
1387
- * @param controlId
1412
+ /**
1413
+ * 获取控件的dataBind
1414
+ * @param controlId
1388
1415
  * */ key: "getDataBind",
1389
1416
  value: function getDataBind(controlId) {
1390
1417
  return this.store.getDataBind(controlId);
1391
1418
  }
1392
1419
  },
1393
1420
  {
1394
- /**
1395
- * 获取组件实例,传入rowIndex代表获取明细表内的控件实例,rowIndex传入-1代表获取表头内的实例
1396
- * @param controlId
1397
- * @param rowIndex
1421
+ /**
1422
+ * 获取组件实例,传入rowIndex代表获取明细表内的控件实例,rowIndex传入-1代表获取表头内的实例
1423
+ * @param controlId
1424
+ * @param rowIndex
1398
1425
  */ key: "getInstance",
1399
1426
  value: function getInstance(controlId, rowIndex) {
1400
1427
  var instances = this.getInstances(controlId, rowIndex === -1);
@@ -1413,10 +1440,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1413
1440
  }
1414
1441
  },
1415
1442
  {
1416
- /**
1417
- * 获取组件实例,明细表中的组件将会得到数组, 第二个参数为(false/不传入)则获取到的是明细表内不包含表头内实例的所有控件实例,传入true则获取到包含表头内实例的所有控件实例,表头内实例永远在下标0的位置
1418
- * @param controlId
1419
- * @param header 明细表内是否获取表头的控件
1443
+ /**
1444
+ * 获取组件实例,明细表中的组件将会得到数组, 第二个参数为(false/不传入)则获取到的是明细表内不包含表头内实例的所有控件实例,传入true则获取到包含表头内实例的所有控件实例,表头内实例永远在下标0的位置
1445
+ * @param controlId
1446
+ * @param header 明细表内是否获取表头的控件
1420
1447
  */ // getInstances(
1421
1448
  // controlId?: string,
1422
1449
  // header: boolean = false
@@ -1592,27 +1619,27 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1592
1619
  },
1593
1620
  {
1594
1621
  key: "assertInstance",
1595
- value: /**
1596
- * 判断控件的类型,返回当前控件的正确类型
1622
+ value: /**
1623
+ * 判断控件的类型,返回当前控件的正确类型
1597
1624
  * */ function assertInstance(instance, types) {
1598
1625
  return isString(types) ? instance.type === types : types.includes(instance.type);
1599
1626
  }
1600
1627
  },
1601
1628
  {
1602
1629
  key: "assertInstanceIsCustomControl",
1603
- value: /**
1604
- * 判断控件或控件类型是一个自定义控件
1630
+ value: /**
1631
+ * 判断控件或控件类型是一个自定义控件
1605
1632
  * */ function assertInstanceIsCustomControl(instance) {
1606
1633
  return !isBuiltInControls(isString(instance) ? instance : instance.type);
1607
1634
  }
1608
1635
  },
1609
1636
  {
1610
1637
  key: "getInstanceRowIndex",
1611
- value: /**
1612
- * 获取控件在明细子表中的行下标,
1613
- * 如果控件在表头内,则返回-1
1614
- * 如果控件在表内,则返回行下标
1615
- * 如果控件不在明细表内,则返回undefined
1638
+ value: /**
1639
+ * 获取控件在明细子表中的行下标,
1640
+ * 如果控件在表头内,则返回-1
1641
+ * 如果控件在表内,则返回行下标
1642
+ * 如果控件不在明细表内,则返回undefined
1616
1643
  * */ // public getInstanceRowIndex(
1617
1644
  // instance: ControlRuntimeInstance<ControlsKeys> | RuntimeControl
1618
1645
  // ) {
@@ -4,10 +4,6 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
- function _call_super(_this, derived, args) {
8
- derived = _get_prototype_of(derived);
9
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
- }
11
7
  function _class_call_check(instance, Constructor) {
12
8
  if (!(instance instanceof Constructor)) {
13
9
  throw new TypeError("Cannot call a class as a function");
@@ -77,12 +73,28 @@ function _type_of(obj) {
77
73
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
78
74
  }
79
75
  function _is_native_reflect_construct() {
76
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
77
+ if (Reflect.construct.sham) return false;
78
+ if (typeof Proxy === "function") return true;
80
79
  try {
81
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
82
- } catch (_) {}
83
- return (_is_native_reflect_construct = function() {
84
- return !!result;
85
- })();
80
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
81
+ return true;
82
+ } catch (e) {
83
+ return false;
84
+ }
85
+ }
86
+ function _create_super(Derived) {
87
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
88
+ return function _createSuperInternal() {
89
+ var Super = _get_prototype_of(Derived), result;
90
+ if (hasNativeReflectConstruct) {
91
+ var NewTarget = _get_prototype_of(this).constructor;
92
+ result = Reflect.construct(Super, arguments, NewTarget);
93
+ } else {
94
+ result = Super.apply(this, arguments);
95
+ }
96
+ return _possible_constructor_return(this, result);
97
+ };
86
98
  }
87
99
  import { RegisterControls, isDataBind } from '@byteluck-fe/model-driven-core';
88
100
  import { CONTROL_BASE_TYPE, CONTROL_TYPE, JSONCopy, loopFormSchema, isArray } from '@byteluck-fe/model-driven-shared';
@@ -90,12 +102,16 @@ import { hasChildrenControl, loopDataViewControl, loopFormControl } from '../uti
90
102
  export var Runtime = /*#__PURE__*/ function(RegisterControls) {
91
103
  "use strict";
92
104
  _inherits(Runtime, RegisterControls);
105
+ var _super = _create_super(Runtime);
93
106
  function Runtime(props) {
94
107
  _class_call_check(this, Runtime);
95
108
  var _this;
96
- _this = _call_super(this, Runtime, [
97
- 'Runtime'
98
- ]), _define_property(_this, "_schema", void 0), _define_property(_this, "_instance", void 0), _define_property(_this, "_flatInstances", []), _define_property(_this, "_instanceMap", {}), _define_property(_this, "_controlParentIdMap", {});
109
+ _this = _super.call(this, 'Runtime');
110
+ _define_property(_assert_this_initialized(_this), "_schema", void 0);
111
+ _define_property(_assert_this_initialized(_this), "_instance", void 0);
112
+ _define_property(_assert_this_initialized(_this), "_flatInstances", []);
113
+ _define_property(_assert_this_initialized(_this), "_instanceMap", {});
114
+ _define_property(_assert_this_initialized(_this), "_controlParentIdMap", {});
99
115
  var schema = props.schema;
100
116
  _this._schema = schema;
101
117
  _this._instance = _this.createControl(schema, props.beforeCreateInstance);
@@ -289,8 +305,8 @@ function loop(control, parentId, callback) {
289
305
  function hasHeaderOrFooterControl(control, checkType) {
290
306
  return checkType in control.props && isArray(control.props[checkType]);
291
307
  }
292
- /**
293
- * 控件是否在视图中隐藏,遍历查找所有parent
308
+ /**
309
+ * 控件是否在视图中隐藏,遍历查找所有parent
294
310
  * */ function getControlIsHide(control) {
295
311
  if (control.props.isHide) {
296
312
  return true;
@@ -69,10 +69,10 @@ var Store = /*#__PURE__*/ function() {
69
69
  }
70
70
  _create_class(Store, [
71
71
  {
72
- /**
73
- * 使用该方法仅改变数据,不会表单触发事件。明细表可全量赋值也可根据rowIndex进行单独设置
74
- * @param controlId 组件ID
75
- * @param value
72
+ /**
73
+ * 使用该方法仅改变数据,不会表单触发事件。明细表可全量赋值也可根据rowIndex进行单独设置
74
+ * @param controlId 组件ID
75
+ * @param value
76
76
  */ key: "setState",
77
77
  value: function setState(controlId, value, rowIndex) {
78
78
  var _this = this;
@@ -81,7 +81,6 @@ var Store = /*#__PURE__*/ function() {
81
81
  if (controlInfo !== undefined) {
82
82
  //明细表
83
83
  if (controlInfo.children) {
84
- ;
85
84
  value.forEach(function(item) {
86
85
  if (!item.uid) {
87
86
  Object.assign(item, {
@@ -110,7 +109,6 @@ var Store = /*#__PURE__*/ function() {
110
109
  Object.keys(children).map(function(childControlId) {
111
110
  if (childControlId === controlId) {
112
111
  if (_this.state[dataView][subtableId][rowIndex]) {
113
- ;
114
112
  _this.state[dataView][subtableId][rowIndex][controlId] = noProxyValue;
115
113
  }
116
114
  }
@@ -169,7 +167,6 @@ var Store = /*#__PURE__*/ function() {
169
167
  if (children !== undefined) {
170
168
  Object.keys(children).map(function(childControlId) {
171
169
  if (childControlId === controlId) {
172
- ;
173
170
  _this.state[dataViewId][subtableId].map(function(item) {
174
171
  states.push(item[controlId]);
175
172
  });
@@ -12,10 +12,6 @@ function _assert_this_initialized(self) {
12
12
  }
13
13
  return self;
14
14
  }
15
- function _call_super(_this, derived, args) {
16
- derived = _get_prototype_of(derived);
17
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
18
- }
19
15
  function _class_call_check(instance, Constructor) {
20
16
  if (!(instance instanceof Constructor)) {
21
17
  throw new TypeError("Cannot call a class as a function");
@@ -138,12 +134,28 @@ function _unsupported_iterable_to_array(o, minLen) {
138
134
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
139
135
  }
140
136
  function _is_native_reflect_construct() {
137
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
138
+ if (Reflect.construct.sham) return false;
139
+ if (typeof Proxy === "function") return true;
141
140
  try {
142
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
143
- } catch (_) {}
144
- return (_is_native_reflect_construct = function() {
145
- return !!result;
146
- })();
141
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
142
+ return true;
143
+ } catch (e) {
144
+ return false;
145
+ }
146
+ }
147
+ function _create_super(Derived) {
148
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
149
+ return function _createSuperInternal() {
150
+ var Super = _get_prototype_of(Derived), result;
151
+ if (hasNativeReflectConstruct) {
152
+ var NewTarget = _get_prototype_of(this).constructor;
153
+ result = Reflect.construct(Super, arguments, NewTarget);
154
+ } else {
155
+ result = Super.apply(this, arguments);
156
+ }
157
+ return _possible_constructor_return(this, result);
158
+ };
147
159
  }
148
160
  import { isArray, isFunction, isString, isJSONArray, isJSONObject, isNumber, isNumberAndEmptyStringArray, isPlainObject, isStringArray, FieldTypes, isObject } from '@byteluck-fe/model-driven-shared';
149
161
  import { AddressValue, AmountValue, CalcValue, RangeDateValue } from '@byteluck-fe/model-driven-core';
@@ -155,9 +167,10 @@ var ValueChecker = function ValueChecker() {
155
167
  var StringValueChecker = /*#__PURE__*/ function(ValueChecker) {
156
168
  "use strict";
157
169
  _inherits(StringValueChecker, ValueChecker);
170
+ var _super = _create_super(StringValueChecker);
158
171
  function StringValueChecker() {
159
172
  _class_call_check(this, StringValueChecker);
160
- return _call_super(this, StringValueChecker, arguments);
173
+ return _super.apply(this, arguments);
161
174
  }
162
175
  _create_class(StringValueChecker, [
163
176
  {
@@ -187,9 +200,10 @@ var StringValueChecker = /*#__PURE__*/ function(ValueChecker) {
187
200
  var NumberValueChecker = /*#__PURE__*/ function(ValueChecker) {
188
201
  "use strict";
189
202
  _inherits(NumberValueChecker, ValueChecker);
203
+ var _super = _create_super(NumberValueChecker);
190
204
  function NumberValueChecker() {
191
205
  _class_call_check(this, NumberValueChecker);
192
- return _call_super(this, NumberValueChecker, arguments);
206
+ return _super.apply(this, arguments);
193
207
  }
194
208
  _create_class(NumberValueChecker, [
195
209
  {
@@ -218,9 +232,10 @@ var NumberValueChecker = /*#__PURE__*/ function(ValueChecker) {
218
232
  var StringArrayValueChecker = /*#__PURE__*/ function(ValueChecker) {
219
233
  "use strict";
220
234
  _inherits(StringArrayValueChecker, ValueChecker);
235
+ var _super = _create_super(StringArrayValueChecker);
221
236
  function StringArrayValueChecker() {
222
237
  _class_call_check(this, StringArrayValueChecker);
223
- return _call_super(this, StringArrayValueChecker, arguments);
238
+ return _super.apply(this, arguments);
224
239
  }
225
240
  _create_class(StringArrayValueChecker, [
226
241
  {
@@ -262,9 +277,10 @@ var StringArrayValueChecker = /*#__PURE__*/ function(ValueChecker) {
262
277
  var NumberArrayValueChecker = /*#__PURE__*/ function(ValueChecker) {
263
278
  "use strict";
264
279
  _inherits(NumberArrayValueChecker, ValueChecker);
280
+ var _super = _create_super(NumberArrayValueChecker);
265
281
  function NumberArrayValueChecker() {
266
282
  _class_call_check(this, NumberArrayValueChecker);
267
- return _call_super(this, NumberArrayValueChecker, arguments);
283
+ return _super.apply(this, arguments);
268
284
  }
269
285
  _create_class(NumberArrayValueChecker, [
270
286
  {
@@ -312,9 +328,10 @@ var NumberArrayValueChecker = /*#__PURE__*/ function(ValueChecker) {
312
328
  var MoneyValueChecker = /*#__PURE__*/ function(ValueChecker) {
313
329
  "use strict";
314
330
  _inherits(MoneyValueChecker, ValueChecker);
331
+ var _super = _create_super(MoneyValueChecker);
315
332
  function MoneyValueChecker() {
316
333
  _class_call_check(this, MoneyValueChecker);
317
- return _call_super(this, MoneyValueChecker, arguments);
334
+ return _super.apply(this, arguments);
318
335
  }
319
336
  _create_class(MoneyValueChecker, [
320
337
  {
@@ -362,9 +379,10 @@ var MoneyValueChecker = /*#__PURE__*/ function(ValueChecker) {
362
379
  var TimeScopeValueChecker = /*#__PURE__*/ function(ValueChecker) {
363
380
  "use strict";
364
381
  _inherits(TimeScopeValueChecker, ValueChecker);
382
+ var _super = _create_super(TimeScopeValueChecker);
365
383
  function TimeScopeValueChecker() {
366
384
  _class_call_check(this, TimeScopeValueChecker);
367
- return _call_super(this, TimeScopeValueChecker, arguments);
385
+ return _super.apply(this, arguments);
368
386
  }
369
387
  _create_class(TimeScopeValueChecker, [
370
388
  {
@@ -409,9 +427,10 @@ var TimeScopeValueChecker = /*#__PURE__*/ function(ValueChecker) {
409
427
  var CalcValueChecker = /*#__PURE__*/ function(ValueChecker) {
410
428
  "use strict";
411
429
  _inherits(CalcValueChecker, ValueChecker);
430
+ var _super = _create_super(CalcValueChecker);
412
431
  function CalcValueChecker() {
413
432
  _class_call_check(this, CalcValueChecker);
414
- return _call_super(this, CalcValueChecker, arguments);
433
+ return _super.apply(this, arguments);
415
434
  }
416
435
  _create_class(CalcValueChecker, [
417
436
  {
@@ -459,9 +478,10 @@ var CalcValueChecker = /*#__PURE__*/ function(ValueChecker) {
459
478
  var AddressValueChecker = /*#__PURE__*/ function(ValueChecker) {
460
479
  "use strict";
461
480
  _inherits(AddressValueChecker, ValueChecker);
481
+ var _super = _create_super(AddressValueChecker);
462
482
  function AddressValueChecker() {
463
483
  _class_call_check(this, AddressValueChecker);
464
- return _call_super(this, AddressValueChecker, arguments);
484
+ return _super.apply(this, arguments);
465
485
  }
466
486
  _create_class(AddressValueChecker, [
467
487
  {