@byteluck-fe/model-driven-engine 2.4.1-beta.12 → 2.4.1-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.
@@ -1171,7 +1171,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1171
1171
  Object.keys(dataSet).map(function(dataCode) {
1172
1172
  var entity = dataSet[dataCode];
1173
1173
  if (Array.isArray(entity)) {
1174
- var mapping = _this.store.dataBindMapping[dataCode];
1174
+ var mapping = _this.getDataBindMapping(dataCode);
1175
1175
  if (!mapping) {
1176
1176
  return;
1177
1177
  }
@@ -37,6 +37,21 @@ function _instanceof(left, right) {
37
37
  return left instanceof right;
38
38
  }
39
39
  }
40
+ function _objectSpread(target) {
41
+ for(var i = 1; i < arguments.length; i++){
42
+ var source = arguments[i] != null ? arguments[i] : {};
43
+ var ownKeys = Object.keys(source);
44
+ if (typeof Object.getOwnPropertySymbols === "function") {
45
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
46
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
47
+ }));
48
+ }
49
+ ownKeys.forEach(function(key) {
50
+ _defineProperty(target, key, source[key]);
51
+ });
52
+ }
53
+ return target;
54
+ }
40
55
  import { DataBind, ObjectDataBind } from "@byteluck-fe/model-driven-core";
41
56
  import { loopFormSchema, JSONCopy, warn, CONTROL_TYPE, CONTROL_BASE_TYPE } from "@byteluck-fe/model-driven-shared";
42
57
  import { loopDataViewControl, loopFormControl, buildUUID } from "../utils/runtimeUtils";
@@ -258,7 +273,9 @@ item) {
258
273
  });
259
274
  var _item_props_defaultRows;
260
275
  dataViewState[item.id] = new Array((_item_props_defaultRows = item.props.defaultRows) !== null && _item_props_defaultRows !== void 0 ? _item_props_defaultRows : 1).fill(0).map(function() {
261
- return JSONCopy(emptyTemplate);
276
+ return _objectSpread({
277
+ uid: "new:" + buildUUID("uid")
278
+ }, JSONCopy(emptyTemplate));
262
279
  });
263
280
  emptyDataViewState[item.id] = emptyTemplate;
264
281
  }