@byteluck-fe/model-driven-engine 6.2.0-2-beta.2 → 6.2.0-beta.13
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/ActionManager.js +11 -3
- package/dist/esm/common/DataManager.js +11 -3
- package/dist/esm/common/Engine.js +42 -8
- package/dist/esm/common/Store.js +5 -5
- package/dist/esm/common/checkerValue.js +6 -6
- package/dist/esm/common/proxyState.js +3 -3
- package/dist/esm/plugins/CalcPlugin.js +5 -6
- package/dist/esm/plugins/ControlsEventPlugin.js +11 -3
- package/dist/esm/plugins/LifecycleEventPlugin.js +11 -3
- package/dist/esm/plugins/StylePlugin.js +2 -2
- package/dist/index.umd.js +24 -24
- package/dist/types/common/Engine.d.ts +9 -2
- package/package.json +4 -4
|
@@ -93,9 +93,17 @@ function _ts_generator(thisArg, body) {
|
|
|
93
93
|
},
|
|
94
94
|
trys: [],
|
|
95
95
|
ops: []
|
|
96
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
97
|
-
return
|
|
98
|
-
|
|
96
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
97
|
+
return d(g, "next", {
|
|
98
|
+
value: verb(0)
|
|
99
|
+
}), d(g, "throw", {
|
|
100
|
+
value: verb(1)
|
|
101
|
+
}), d(g, "return", {
|
|
102
|
+
value: verb(2)
|
|
103
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
104
|
+
value: function() {
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
99
107
|
}), g;
|
|
100
108
|
function verb(n) {
|
|
101
109
|
return function(v) {
|
|
@@ -68,9 +68,17 @@ function _ts_generator(thisArg, body) {
|
|
|
68
68
|
},
|
|
69
69
|
trys: [],
|
|
70
70
|
ops: []
|
|
71
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
72
|
-
return
|
|
73
|
-
|
|
71
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
72
|
+
return d(g, "next", {
|
|
73
|
+
value: verb(0)
|
|
74
|
+
}), d(g, "throw", {
|
|
75
|
+
value: verb(1)
|
|
76
|
+
}), d(g, "return", {
|
|
77
|
+
value: verb(2)
|
|
78
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
79
|
+
value: function() {
|
|
80
|
+
return this;
|
|
81
|
+
}
|
|
74
82
|
}), g;
|
|
75
83
|
function verb(n) {
|
|
76
84
|
return function(v) {
|
|
@@ -242,9 +242,17 @@ function _ts_generator(thisArg, body) {
|
|
|
242
242
|
},
|
|
243
243
|
trys: [],
|
|
244
244
|
ops: []
|
|
245
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
246
|
-
return
|
|
247
|
-
|
|
245
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
246
|
+
return d(g, "next", {
|
|
247
|
+
value: verb(0)
|
|
248
|
+
}), d(g, "throw", {
|
|
249
|
+
value: verb(1)
|
|
250
|
+
}), d(g, "return", {
|
|
251
|
+
value: verb(2)
|
|
252
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
253
|
+
value: function() {
|
|
254
|
+
return this;
|
|
255
|
+
}
|
|
248
256
|
}), g;
|
|
249
257
|
function verb(n) {
|
|
250
258
|
return function(v) {
|
|
@@ -326,7 +334,7 @@ function _ts_generator(thisArg, body) {
|
|
|
326
334
|
}
|
|
327
335
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
328
336
|
import { isDataBind } from '@byteluck-fe/model-driven-core';
|
|
329
|
-
import { CONTROL_BASE_TYPE, CONTROL_TYPE, DEFAULT_LOCALE, error, genNonDuplicateId, isString, JSONCopy, log, updateValueFromKeys, warn, Watcher, isBuiltInControls } from '@byteluck-fe/model-driven-shared';
|
|
337
|
+
import { CONTROL_BASE_TYPE, CONTROL_TYPE, DEFAULT_LOCALE, error, genNonDuplicateId, isString, JSONCopy, log, updateValueFromKeys, warn, Watcher, deepFreeze, isBuiltInControls } from '@byteluck-fe/model-driven-shared';
|
|
330
338
|
import { Runtime } from './Runtime';
|
|
331
339
|
import { Store } from './Store';
|
|
332
340
|
import { findItem, proxyState } from './proxyState';
|
|
@@ -494,7 +502,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
494
502
|
// if (!(subtable instanceof RuntimeListControl)) return
|
|
495
503
|
if (!((subtable === null || subtable === void 0 ? void 0 : subtable.controlType) === CONTROL_BASE_TYPE.LIST)) return;
|
|
496
504
|
// 新增多行方法
|
|
497
|
-
var createRows = function(len) {
|
|
505
|
+
var createRows = function createRows(len) {
|
|
498
506
|
// @ts-ignore
|
|
499
507
|
var newRows = [];
|
|
500
508
|
for(var i = 0; i < len; i++){
|
|
@@ -777,7 +785,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
777
785
|
value: // payload应该是runtimeSchema和value,然后通过runTimeSchema去找需要修改的data里边的key
|
|
778
786
|
function emit(eventKey, payload) {
|
|
779
787
|
var _this = this;
|
|
780
|
-
var _this1 = this, _superprop_get_emit = function() {
|
|
788
|
+
var _this1 = this, _superprop_get_emit = function _superprop_get_emit() {
|
|
781
789
|
return _get(_get_prototype_of(Engine.prototype), "emit", _this);
|
|
782
790
|
};
|
|
783
791
|
return _async_to_generator(function() {
|
|
@@ -1371,13 +1379,13 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1371
1379
|
}
|
|
1372
1380
|
var newMapping = _this.getDataBindMapping(dataCode);
|
|
1373
1381
|
if (newMapping) {
|
|
1382
|
+
var _ref;
|
|
1374
1383
|
var _newMapping_fields;
|
|
1375
1384
|
var mappingKeys = newMapping === null || newMapping === void 0 ? void 0 : (_newMapping_fields = newMapping.fields) === null || _newMapping_fields === void 0 ? void 0 : _newMapping_fields.map(function(item) {
|
|
1376
1385
|
return item === null || item === void 0 ? void 0 : item.controlId;
|
|
1377
1386
|
});
|
|
1378
1387
|
var mappingValue = _this.getEmptyState(newMapping === null || newMapping === void 0 ? void 0 : newMapping.controlId);
|
|
1379
|
-
var
|
|
1380
|
-
var mainStateKeys = Object.keys((_newState_newMapping_controlId = newState === null || newState === void 0 ? void 0 : newState[newMapping === null || newMapping === void 0 ? void 0 : newMapping.controlId]) !== null && _newState_newMapping_controlId !== void 0 ? _newState_newMapping_controlId : {});
|
|
1388
|
+
var mainStateKeys = Object.keys((_ref = newState === null || newState === void 0 ? void 0 : newState[newMapping === null || newMapping === void 0 ? void 0 : newMapping.controlId]) !== null && _ref !== void 0 ? _ref : {});
|
|
1381
1389
|
mappingKeys === null || mappingKeys === void 0 ? void 0 : mappingKeys.forEach(function(key) {
|
|
1382
1390
|
if (!mainStateKeys.includes(key) && key !== 'uid' && newState[newMapping === null || newMapping === void 0 ? void 0 : newMapping.controlId]) {
|
|
1383
1391
|
if (Object.keys(newState).length) {
|
|
@@ -1571,6 +1579,32 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1571
1579
|
return this.store.controlIdMapping;
|
|
1572
1580
|
}
|
|
1573
1581
|
},
|
|
1582
|
+
{
|
|
1583
|
+
/**
|
|
1584
|
+
* 根据字段获取组件实例,传入rowIndex代表获取明细表内的控件实例,rowIndex传入-1代表获取表头内的实例
|
|
1585
|
+
* @param dataCode 模型code
|
|
1586
|
+
* @param fieldCode 字段code
|
|
1587
|
+
*/ key: "getFieldInstance",
|
|
1588
|
+
value: function getFieldInstance(dataCode, fieldCode, rowIndex) {
|
|
1589
|
+
var dataBindMapping = this.getDataBindMapping(dataCode, fieldCode);
|
|
1590
|
+
if (dataBindMapping) {
|
|
1591
|
+
var _instance = this.getInstance(dataBindMapping.controlId, rowIndex);
|
|
1592
|
+
return _instance;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
key: "setFieldInstance",
|
|
1598
|
+
value: function setFieldInstance(dataCode, fieldCode, props, value, rowIndex) {
|
|
1599
|
+
var dataBindMapping = this.getDataBindMapping(dataCode, fieldCode);
|
|
1600
|
+
if (dataBindMapping) {
|
|
1601
|
+
var _instance = this.getInstance(dataBindMapping.controlId, rowIndex);
|
|
1602
|
+
this.debugLog("调用了setFieldInstance[%o]: 修改instance: %o的%o属性,修改的值为%o。", _instance.id, _instance, props, value);
|
|
1603
|
+
this.setInstance(_instance.id, props, value, rowIndex);
|
|
1604
|
+
return deepFreeze(_instance);
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1574
1608
|
{
|
|
1575
1609
|
key: "getDataBindMapping",
|
|
1576
1610
|
value: function getDataBindMapping(dataCode, fieldCode) {
|
package/dist/esm/common/Store.js
CHANGED
|
@@ -135,10 +135,10 @@ var Store = /*#__PURE__*/ function() {
|
|
|
135
135
|
} else {
|
|
136
136
|
var controlInfo = this.controlIdMapping[controlId];
|
|
137
137
|
if (controlInfo !== undefined) {
|
|
138
|
+
var _ref;
|
|
138
139
|
var data = this.state[controlInfo.dataView][controlId];
|
|
139
|
-
var _controlInfo_children;
|
|
140
140
|
// 只有明细表key,再通过rowIndex获取行数据
|
|
141
|
-
if (rowIndex !== undefined && Object.keys((
|
|
141
|
+
if (rowIndex !== undefined && Object.keys((_ref = controlInfo === null || controlInfo === void 0 ? void 0 : controlInfo.children) !== null && _ref !== void 0 ? _ref : {}).length > 0) {
|
|
142
142
|
return data[rowIndex];
|
|
143
143
|
} else {
|
|
144
144
|
return data;
|
|
@@ -287,11 +287,11 @@ item) {
|
|
|
287
287
|
dataViewState[item.id] = JSONCopy(item.props.defaultValue);
|
|
288
288
|
emptyDataViewState[item.id] = JSONCopy(item.props.defaultValue);
|
|
289
289
|
} else {
|
|
290
|
+
var _fill_map, _item_props_defaultRows;
|
|
290
291
|
var emptyTemplate = {};
|
|
291
292
|
loopFormSchema(item.props.headers, function(headerItem) {
|
|
292
293
|
emptyTemplate[headerItem.id] = JSONCopy(headerItem.props.defaultValue);
|
|
293
294
|
});
|
|
294
|
-
var _item_props_defaultRows, _fill_map;
|
|
295
295
|
dataViewState[item.id] = (_fill_map = new Array((_item_props_defaultRows = item.props.defaultRows) !== null && _item_props_defaultRows !== void 0 ? _item_props_defaultRows : 1).fill(0).map(function() {
|
|
296
296
|
return _object_spread({
|
|
297
297
|
uid: 'new:' + buildUUID('uid')
|
|
@@ -419,9 +419,9 @@ item) {
|
|
|
419
419
|
options: []
|
|
420
420
|
};
|
|
421
421
|
loopFormSchema(item.props.headers, function(formControl) {
|
|
422
|
+
var _ref;
|
|
422
423
|
var _data_item_id;
|
|
423
|
-
|
|
424
|
-
Object.assign((_data_item_id_children = (_data_item_id = data[item.id]) === null || _data_item_id === void 0 ? void 0 : _data_item_id.children) !== null && _data_item_id_children !== void 0 ? _data_item_id_children : {}, _define_property({}, formControl.id, {
|
|
424
|
+
Object.assign((_ref = (_data_item_id = data[item.id]) === null || _data_item_id === void 0 ? void 0 : _data_item_id.children) !== null && _ref !== void 0 ? _ref : {}, _define_property({}, formControl.id, {
|
|
425
425
|
dataBind: formControl.props.dataBind
|
|
426
426
|
}));
|
|
427
427
|
});
|
|
@@ -249,7 +249,7 @@ var StringArrayValueChecker = /*#__PURE__*/ function(ValueChecker) {
|
|
|
249
249
|
if (Array.isArray(newValue)) {
|
|
250
250
|
return getStringValueArray(newValue);
|
|
251
251
|
}
|
|
252
|
-
} catch (
|
|
252
|
+
} catch (unused) {}
|
|
253
253
|
}
|
|
254
254
|
return [
|
|
255
255
|
String(value)
|
|
@@ -295,7 +295,7 @@ var NumberArrayValueChecker = /*#__PURE__*/ function(ValueChecker) {
|
|
|
295
295
|
if (isArray(newValue)) {
|
|
296
296
|
return getNumberValueArray(newValue);
|
|
297
297
|
}
|
|
298
|
-
} catch (
|
|
298
|
+
} catch (unused) {}
|
|
299
299
|
}
|
|
300
300
|
var newValue1 = Number(value);
|
|
301
301
|
if (Number.isNaN(newValue1)) {
|
|
@@ -340,7 +340,7 @@ var MoneyValueChecker = /*#__PURE__*/ function(ValueChecker) {
|
|
|
340
340
|
try {
|
|
341
341
|
var newValue = JSON.parse(value);
|
|
342
342
|
result = new AmountValue(_object_spread({}, oldValue, newValue));
|
|
343
|
-
} catch (
|
|
343
|
+
} catch (unused) {}
|
|
344
344
|
}
|
|
345
345
|
if (result) {
|
|
346
346
|
var numberChecker = new NumberValueChecker();
|
|
@@ -388,7 +388,7 @@ var TimeScopeValueChecker = /*#__PURE__*/ function(ValueChecker) {
|
|
|
388
388
|
try {
|
|
389
389
|
var newValue = JSON.parse(value);
|
|
390
390
|
result = new RangeDateValue(_object_spread({}, oldValue, newValue));
|
|
391
|
-
} catch (
|
|
391
|
+
} catch (unused) {}
|
|
392
392
|
}
|
|
393
393
|
if (result) {
|
|
394
394
|
var stringChecker = new StringValueChecker();
|
|
@@ -437,7 +437,7 @@ var CalcValueChecker = /*#__PURE__*/ function(ValueChecker) {
|
|
|
437
437
|
try {
|
|
438
438
|
var newValue = JSON.parse(value);
|
|
439
439
|
result = new CalcValue(_object_spread({}, oldValue, newValue));
|
|
440
|
-
} catch (
|
|
440
|
+
} catch (unused) {}
|
|
441
441
|
}
|
|
442
442
|
if (result) {
|
|
443
443
|
var numberChecker = new NumberValueChecker();
|
|
@@ -495,7 +495,7 @@ var AddressValueChecker = /*#__PURE__*/ function(ValueChecker) {
|
|
|
495
495
|
try {
|
|
496
496
|
var newValue = JSON.parse(value);
|
|
497
497
|
result = new AddressValue(_object_spread({}, oldValue, camelizeKeys(newValue)));
|
|
498
|
-
} catch (
|
|
498
|
+
} catch (unused) {}
|
|
499
499
|
}
|
|
500
500
|
if (result) {
|
|
501
501
|
var stringChecker = new StringValueChecker();
|
|
@@ -129,6 +129,7 @@ function ArrayHandler(target, propertyKey, value, thisKey, callback) {
|
|
|
129
129
|
return Reflect.get(target, propertyKey, receiver);
|
|
130
130
|
},
|
|
131
131
|
set: function set(target, propertyKey, value, receiver) {
|
|
132
|
+
var _reProxyState;
|
|
132
133
|
var newValue = JSONCopy(value);
|
|
133
134
|
// @ts-ignore
|
|
134
135
|
var oldValue = target[propertyKey];
|
|
@@ -145,7 +146,6 @@ function ArrayHandler(target, propertyKey, value, thisKey, callback) {
|
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
|
-
var _reProxyState;
|
|
149
149
|
newValue = (_reProxyState = reProxyState(newValue)) !== null && _reProxyState !== void 0 ? _reProxyState : newValue;
|
|
150
150
|
// 先设置值,然后再进行触发回调,确保回调内拿到的是最新的值
|
|
151
151
|
var setResult;
|
|
@@ -248,10 +248,10 @@ function flatInstanceForChildren(controls) {
|
|
|
248
248
|
// 最后一个key可能是值对象上边的key,比如金额的amount和currency,计算公式的result和unit,所以需要判断前一个控件是不是一个表单控件,是的话就返回最后一个表单控件
|
|
249
249
|
return findEndItem ? findEndItem : prevItem.controlType === CONTROL_BASE_TYPE.FORM ? prevItem : undefined;
|
|
250
250
|
} else {
|
|
251
|
+
var _ref;
|
|
251
252
|
var _prevItem_children;
|
|
252
|
-
var _prevItem_children_index;
|
|
253
253
|
// 如果有children,则取children中对应的下标,没有的话一直返回prevItem
|
|
254
|
-
return (
|
|
254
|
+
return (_ref = prevItem === null || prevItem === void 0 ? void 0 : (_prevItem_children = prevItem.children) === null || _prevItem_children === void 0 ? void 0 : _prevItem_children[index]) !== null && _ref !== void 0 ? _ref : prevItem;
|
|
255
255
|
}
|
|
256
256
|
}, initInstance);
|
|
257
257
|
}
|
|
@@ -296,19 +296,18 @@ export var CalcPlugin = /*#__PURE__*/ function() {
|
|
|
296
296
|
* */ function watchSubtableChange() {
|
|
297
297
|
var _this = this;
|
|
298
298
|
this.engine.on('list-change', function(payload) {
|
|
299
|
+
var _ref, _this_dependenciesTriggerMap_get;
|
|
299
300
|
var _payload_options;
|
|
300
301
|
// 初始化前是批量操作。不做处理
|
|
301
302
|
if (_this.engine.isMounted === false) return;
|
|
302
303
|
_this.resetDependencies();
|
|
303
|
-
var
|
|
304
|
-
var changedRows = (_payload_options_changed = (_payload_options = payload.options) === null || _payload_options === void 0 ? void 0 : _payload_options.changed) !== null && _payload_options_changed !== void 0 ? _payload_options_changed : [];
|
|
304
|
+
var changedRows = (_ref = (_payload_options = payload.options) === null || _payload_options === void 0 ? void 0 : _payload_options.changed) !== null && _ref !== void 0 ? _ref : [];
|
|
305
305
|
// 对发生改变的行进行重新计算
|
|
306
306
|
var changedCalc = _this.getCalcControlsFromSubtableRows(changedRows);
|
|
307
307
|
// @ts-ignore
|
|
308
308
|
changedCalc.forEach(function(calcControl) {
|
|
309
309
|
_this.computedCalcValue(calcControl);
|
|
310
310
|
});
|
|
311
|
-
var _this_dependenciesTriggerMap_get;
|
|
312
311
|
var calcControls = (_this_dependenciesTriggerMap_get = _this.dependenciesTriggerMap.get(payload.instance.id)) !== null && _this_dependenciesTriggerMap_get !== void 0 ? _this_dependenciesTriggerMap_get : [];
|
|
313
312
|
// @ts-ignore
|
|
314
313
|
calcControls.forEach(function(calcControl) {
|
|
@@ -324,13 +323,13 @@ export var CalcPlugin = /*#__PURE__*/ function() {
|
|
|
324
323
|
* */ function watchControlChange() {
|
|
325
324
|
var _this = this;
|
|
326
325
|
this.engine.on('change', function(payload) {
|
|
326
|
+
var _this_dependenciesTriggerMap_get;
|
|
327
327
|
// 初始化前是批量操作。不做处理
|
|
328
328
|
if (_this.engine.isMounted === false) return;
|
|
329
329
|
var instance = payload.instance;
|
|
330
330
|
if (!_this.dependenciesTriggerMap.has(instance.id)) {
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
|
-
var _this_dependenciesTriggerMap_get;
|
|
334
333
|
var calcControls = (_this_dependenciesTriggerMap_get = _this.dependenciesTriggerMap.get(instance.id)) !== null && _this_dependenciesTriggerMap_get !== void 0 ? _this_dependenciesTriggerMap_get : [];
|
|
335
334
|
// 在明细子表中的控件,如果计算公式也在明细子表,那只触发同一行的计算公式的计算
|
|
336
335
|
if (payload.rowIndex !== undefined && payload.rowIndex > -1) {
|
|
@@ -369,6 +368,7 @@ export var CalcPlugin = /*#__PURE__*/ function() {
|
|
|
369
368
|
* */ // @ts-ignore
|
|
370
369
|
function computedCalcValue(control) {
|
|
371
370
|
var _this = this;
|
|
371
|
+
var _ref;
|
|
372
372
|
var scriptEcho = control.props.scriptEcho;
|
|
373
373
|
if (!scriptEcho || scriptEcho.length === 0) {
|
|
374
374
|
return;
|
|
@@ -446,10 +446,9 @@ export var CalcPlugin = /*#__PURE__*/ function() {
|
|
|
446
446
|
if (result === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.result)) {
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
|
-
var _oldValue_unit;
|
|
450
449
|
this.engine.setState(control.id, {
|
|
451
450
|
result: result,
|
|
452
|
-
unit: (
|
|
451
|
+
unit: (_ref = oldValue === null || oldValue === void 0 ? void 0 : oldValue.unit) !== null && _ref !== void 0 ? _ref : ''
|
|
453
452
|
}, rowIndex);
|
|
454
453
|
}
|
|
455
454
|
},
|
|
@@ -68,9 +68,17 @@ function _ts_generator(thisArg, body) {
|
|
|
68
68
|
},
|
|
69
69
|
trys: [],
|
|
70
70
|
ops: []
|
|
71
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
72
|
-
return
|
|
73
|
-
|
|
71
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
72
|
+
return d(g, "next", {
|
|
73
|
+
value: verb(0)
|
|
74
|
+
}), d(g, "throw", {
|
|
75
|
+
value: verb(1)
|
|
76
|
+
}), d(g, "return", {
|
|
77
|
+
value: verb(2)
|
|
78
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
79
|
+
value: function() {
|
|
80
|
+
return this;
|
|
81
|
+
}
|
|
74
82
|
}), g;
|
|
75
83
|
function verb(n) {
|
|
76
84
|
return function(v) {
|
|
@@ -114,9 +114,17 @@ function _ts_generator(thisArg, body) {
|
|
|
114
114
|
},
|
|
115
115
|
trys: [],
|
|
116
116
|
ops: []
|
|
117
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
118
|
-
return
|
|
119
|
-
|
|
117
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
118
|
+
return d(g, "next", {
|
|
119
|
+
value: verb(0)
|
|
120
|
+
}), d(g, "throw", {
|
|
121
|
+
value: verb(1)
|
|
122
|
+
}), d(g, "return", {
|
|
123
|
+
value: verb(2)
|
|
124
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
125
|
+
value: function() {
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
120
128
|
}), g;
|
|
121
129
|
function verb(n) {
|
|
122
130
|
return function(v) {
|
|
@@ -54,10 +54,10 @@ export var StylePlugin = /*#__PURE__*/ function() {
|
|
|
54
54
|
{
|
|
55
55
|
key: "apply",
|
|
56
56
|
value: function apply(engine) {
|
|
57
|
+
var _ref;
|
|
57
58
|
var _this_config;
|
|
58
59
|
this.engine = engine;
|
|
59
|
-
var
|
|
60
|
-
var compiledStyle = (_this_config_source = (_this_config = this.config) === null || _this_config === void 0 ? void 0 : _this_config.source) !== null && _this_config_source !== void 0 ? _this_config_source : '';
|
|
60
|
+
var compiledStyle = (_ref = (_this_config = this.config) === null || _this_config === void 0 ? void 0 : _this_config.source) !== null && _ref !== void 0 ? _ref : '';
|
|
61
61
|
var style = document.createElement('style');
|
|
62
62
|
style.className = 'edit-css-' + engine.id;
|
|
63
63
|
var dom = document.querySelector('head');
|