@byteluck-fe/model-driven-engine 2.3.8 → 2.3.9
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.
- package/dist/esm/common/Engine.js +7 -4
- package/dist/index.umd.js +5 -5
- package/package.json +2 -2
|
@@ -901,7 +901,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
901
901
|
*/ key: "setStates",
|
|
902
902
|
value: function setStates(states, rowIndex, options) {
|
|
903
903
|
var _this = this;
|
|
904
|
-
var newStates = states;
|
|
904
|
+
var newStates = states !== null && states !== void 0 ? states : {};
|
|
905
905
|
Object.keys(newStates).forEach(function(stateId) {
|
|
906
906
|
Object.entries(_this.store.controlIdMapping).forEach(function(param) {
|
|
907
907
|
var _param = _slicedToArray(param, 2), controlId = _param[0], controlIdMapping = _param[1];
|
|
@@ -1217,7 +1217,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1217
1217
|
newState = JSONCopy(emptyState);
|
|
1218
1218
|
var _this_getDataBindMapping_controlId;
|
|
1219
1219
|
var dataViewControlId = (_this_getDataBindMapping_controlId = (_this_getDataBindMapping = _this.getDataBindMapping(dataCode)) === null || _this_getDataBindMapping === void 0 ? void 0 : _this_getDataBindMapping.controlId) !== null && _this_getDataBindMapping_controlId !== void 0 ? _this_getDataBindMapping_controlId : "";
|
|
1220
|
-
var
|
|
1220
|
+
var _emptyState_dataViewControlId;
|
|
1221
|
+
var state = (_emptyState_dataViewControlId = emptyState[dataViewControlId]) !== null && _emptyState_dataViewControlId !== void 0 ? _emptyState_dataViewControlId : {};
|
|
1221
1222
|
Object.keys(state).map(function(key) {
|
|
1222
1223
|
if (_this.getControlIdMapping()[key].children !== undefined) {
|
|
1223
1224
|
newState[dataViewControlId][key] = [];
|
|
@@ -1335,7 +1336,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1335
1336
|
}
|
|
1336
1337
|
}
|
|
1337
1338
|
} else {
|
|
1338
|
-
var
|
|
1339
|
+
var _this_getControlIdMapping;
|
|
1340
|
+
var controlIdMapping = (_this_getControlIdMapping = this.getControlIdMapping()) !== null && _this_getControlIdMapping !== void 0 ? _this_getControlIdMapping : {};
|
|
1339
1341
|
var _Object_entries_find;
|
|
1340
1342
|
var _ref = _slicedToArray((_Object_entries_find = Object.entries(controlIdMapping).find(function(param) {
|
|
1341
1343
|
var _param = _slicedToArray(param, 2), _ = _param[0], mapping = _param[1];
|
|
@@ -1560,7 +1562,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1560
1562
|
{
|
|
1561
1563
|
key: "inList",
|
|
1562
1564
|
value: function inList(controlId) {
|
|
1563
|
-
var
|
|
1565
|
+
var _this_store_controlIdMapping;
|
|
1566
|
+
var mapping = (_this_store_controlIdMapping = this.store.controlIdMapping) !== null && _this_store_controlIdMapping !== void 0 ? _this_store_controlIdMapping : {};
|
|
1564
1567
|
var result = Object.keys(mapping).some(function(key) {
|
|
1565
1568
|
var _mapping_key, _mapping_key_children;
|
|
1566
1569
|
return (_mapping_key = mapping[key]) === null || _mapping_key === void 0 ? void 0 : (_mapping_key_children = _mapping_key.children) === null || _mapping_key_children === void 0 ? void 0 : _mapping_key_children.hasOwnProperty(controlId);
|