@byteluck-fe/model-driven-core 2.2.2-beta.8 → 2.3.1-beta.2
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/BaseControl/designer.js +68 -174
- package/dist/esm/common/BaseControl/property.js +4 -4
- package/dist/esm/common/BaseControl/runtime.js +11 -11
- package/dist/esm/common/ColumnControl/property.js +12 -12
- package/dist/esm/common/ControlArray.js +4 -4
- package/dist/esm/common/FormControl/designer.js +1 -1
- package/dist/esm/common/FormControl/property.js +22 -22
- package/dist/esm/common/LayoutControl/designer.js +18 -118
- package/dist/esm/common/ListControl/designer.js +17 -117
- package/dist/esm/common/initOptionAndDataSourceRules.js +8 -8
- package/dist/esm/framework/index.js +251 -249
- package/dist/index.umd.js +1 -1
- package/dist/types/common/ColumnControl/property.d.ts +1 -1
- package/dist/types/common/Validator.d.ts +1 -1
- package/dist/types/common/controlHooksEmitter.d.ts +1 -1
- package/dist/types/framework/index.d.ts +1 -0
- package/dist/types/type.d.ts +23 -23
- package/package.json +3 -3
|
@@ -205,101 +205,7 @@ function _createSuper(Derived) {
|
|
|
205
205
|
return _possibleConstructorReturn(this, result);
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
-
|
|
209
|
-
var f, y, t, g, _ = {
|
|
210
|
-
label: 0,
|
|
211
|
-
sent: function() {
|
|
212
|
-
if (t[0] & 1) throw t[1];
|
|
213
|
-
return t[1];
|
|
214
|
-
},
|
|
215
|
-
trys: [],
|
|
216
|
-
ops: []
|
|
217
|
-
};
|
|
218
|
-
return g = {
|
|
219
|
-
next: verb(0),
|
|
220
|
-
"throw": verb(1),
|
|
221
|
-
"return": verb(2)
|
|
222
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
223
|
-
return this;
|
|
224
|
-
}), g;
|
|
225
|
-
function verb(n) {
|
|
226
|
-
return function(v) {
|
|
227
|
-
return step([
|
|
228
|
-
n,
|
|
229
|
-
v
|
|
230
|
-
]);
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
function step(op) {
|
|
234
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
235
|
-
while(_)try {
|
|
236
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
237
|
-
if (y = 0, t) op = [
|
|
238
|
-
op[0] & 2,
|
|
239
|
-
t.value
|
|
240
|
-
];
|
|
241
|
-
switch(op[0]){
|
|
242
|
-
case 0:
|
|
243
|
-
case 1:
|
|
244
|
-
t = op;
|
|
245
|
-
break;
|
|
246
|
-
case 4:
|
|
247
|
-
_.label++;
|
|
248
|
-
return {
|
|
249
|
-
value: op[1],
|
|
250
|
-
done: false
|
|
251
|
-
};
|
|
252
|
-
case 5:
|
|
253
|
-
_.label++;
|
|
254
|
-
y = op[1];
|
|
255
|
-
op = [
|
|
256
|
-
0
|
|
257
|
-
];
|
|
258
|
-
continue;
|
|
259
|
-
case 7:
|
|
260
|
-
op = _.ops.pop();
|
|
261
|
-
_.trys.pop();
|
|
262
|
-
continue;
|
|
263
|
-
default:
|
|
264
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
265
|
-
_ = 0;
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
269
|
-
_.label = op[1];
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
273
|
-
_.label = t[1];
|
|
274
|
-
t = op;
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
if (t && _.label < t[2]) {
|
|
278
|
-
_.label = t[2];
|
|
279
|
-
_.ops.push(op);
|
|
280
|
-
break;
|
|
281
|
-
}
|
|
282
|
-
if (t[2]) _.ops.pop();
|
|
283
|
-
_.trys.pop();
|
|
284
|
-
continue;
|
|
285
|
-
}
|
|
286
|
-
op = body.call(thisArg, _);
|
|
287
|
-
} catch (e) {
|
|
288
|
-
op = [
|
|
289
|
-
6,
|
|
290
|
-
e
|
|
291
|
-
];
|
|
292
|
-
y = 0;
|
|
293
|
-
} finally{
|
|
294
|
-
f = t = 0;
|
|
295
|
-
}
|
|
296
|
-
if (op[0] & 5) throw op[1];
|
|
297
|
-
return {
|
|
298
|
-
value: op[0] ? op[1] : void 0,
|
|
299
|
-
done: true
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
};
|
|
208
|
+
import regeneratorRuntime from "regenerator-runtime";
|
|
303
209
|
import { JSONCopy } from "@byteluck-fe/model-driven-shared";
|
|
304
210
|
import { DesignerControl } from "../BaseControl";
|
|
305
211
|
import LayoutControlProperty from "./property";
|
|
@@ -315,7 +221,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
315
221
|
var _this;
|
|
316
222
|
_this = _super.call(this, props);
|
|
317
223
|
_this.controlType = "layout";
|
|
318
|
-
var
|
|
224
|
+
var ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = ref.excludes, childrenMaxLength = ref.childrenMaxLength;
|
|
319
225
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
320
226
|
defineControlArrayToProperty(_assertThisInitialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
|
|
321
227
|
_this.excludes = JSONCopy(excludes);
|
|
@@ -338,31 +244,25 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
338
244
|
var _this1 = this, _superprop_get_validate = function() {
|
|
339
245
|
return _get(_getPrototypeOf(LayoutControl.prototype), "validate", _this);
|
|
340
246
|
};
|
|
341
|
-
return _asyncToGenerator(function() {
|
|
342
|
-
return
|
|
343
|
-
switch(
|
|
247
|
+
return _asyncToGenerator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
|
248
|
+
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
|
249
|
+
while(1)switch(_ctx.prev = _ctx.next){
|
|
344
250
|
case 0:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
_superprop_get_validate().call(_this1, messages, ignore)
|
|
348
|
-
];
|
|
349
|
-
case 1:
|
|
350
|
-
_state.sent();
|
|
351
|
-
return [
|
|
352
|
-
4,
|
|
353
|
-
Promise.all(_this1.children.map(function(child) {
|
|
354
|
-
return child.validate(messages, ignore);
|
|
355
|
-
}))
|
|
356
|
-
];
|
|
251
|
+
_ctx.next = 2;
|
|
252
|
+
return _superprop_get_validate().call(_this1, messages, ignore);
|
|
357
253
|
case 2:
|
|
358
|
-
|
|
359
|
-
return
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
254
|
+
_ctx.next = 4;
|
|
255
|
+
return Promise.all(_this1.children.map(function(child) {
|
|
256
|
+
return child.validate(messages, ignore);
|
|
257
|
+
}));
|
|
258
|
+
case 4:
|
|
259
|
+
return _ctx.abrupt("return", true);
|
|
260
|
+
case 5:
|
|
261
|
+
case "end":
|
|
262
|
+
return _ctx.stop();
|
|
363
263
|
}
|
|
364
|
-
});
|
|
365
|
-
})();
|
|
264
|
+
}, _callee);
|
|
265
|
+
}))();
|
|
366
266
|
};
|
|
367
267
|
_proto.toDataBindModel = function toDataBindModel() {
|
|
368
268
|
var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
@@ -198,101 +198,7 @@ function _createSuper(Derived) {
|
|
|
198
198
|
return _possibleConstructorReturn(this, result);
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
var f, y, t, g, _ = {
|
|
203
|
-
label: 0,
|
|
204
|
-
sent: function() {
|
|
205
|
-
if (t[0] & 1) throw t[1];
|
|
206
|
-
return t[1];
|
|
207
|
-
},
|
|
208
|
-
trys: [],
|
|
209
|
-
ops: []
|
|
210
|
-
};
|
|
211
|
-
return g = {
|
|
212
|
-
next: verb(0),
|
|
213
|
-
"throw": verb(1),
|
|
214
|
-
"return": verb(2)
|
|
215
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
216
|
-
return this;
|
|
217
|
-
}), g;
|
|
218
|
-
function verb(n) {
|
|
219
|
-
return function(v) {
|
|
220
|
-
return step([
|
|
221
|
-
n,
|
|
222
|
-
v
|
|
223
|
-
]);
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
function step(op) {
|
|
227
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
228
|
-
while(_)try {
|
|
229
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
230
|
-
if (y = 0, t) op = [
|
|
231
|
-
op[0] & 2,
|
|
232
|
-
t.value
|
|
233
|
-
];
|
|
234
|
-
switch(op[0]){
|
|
235
|
-
case 0:
|
|
236
|
-
case 1:
|
|
237
|
-
t = op;
|
|
238
|
-
break;
|
|
239
|
-
case 4:
|
|
240
|
-
_.label++;
|
|
241
|
-
return {
|
|
242
|
-
value: op[1],
|
|
243
|
-
done: false
|
|
244
|
-
};
|
|
245
|
-
case 5:
|
|
246
|
-
_.label++;
|
|
247
|
-
y = op[1];
|
|
248
|
-
op = [
|
|
249
|
-
0
|
|
250
|
-
];
|
|
251
|
-
continue;
|
|
252
|
-
case 7:
|
|
253
|
-
op = _.ops.pop();
|
|
254
|
-
_.trys.pop();
|
|
255
|
-
continue;
|
|
256
|
-
default:
|
|
257
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
258
|
-
_ = 0;
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
262
|
-
_.label = op[1];
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
266
|
-
_.label = t[1];
|
|
267
|
-
t = op;
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
if (t && _.label < t[2]) {
|
|
271
|
-
_.label = t[2];
|
|
272
|
-
_.ops.push(op);
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
if (t[2]) _.ops.pop();
|
|
276
|
-
_.trys.pop();
|
|
277
|
-
continue;
|
|
278
|
-
}
|
|
279
|
-
op = body.call(thisArg, _);
|
|
280
|
-
} catch (e) {
|
|
281
|
-
op = [
|
|
282
|
-
6,
|
|
283
|
-
e
|
|
284
|
-
];
|
|
285
|
-
y = 0;
|
|
286
|
-
} finally{
|
|
287
|
-
f = t = 0;
|
|
288
|
-
}
|
|
289
|
-
if (op[0] & 5) throw op[1];
|
|
290
|
-
return {
|
|
291
|
-
value: op[0] ? op[1] : void 0,
|
|
292
|
-
done: true
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
};
|
|
201
|
+
import regeneratorRuntime from "regenerator-runtime";
|
|
296
202
|
import { DesignerControl } from "../BaseControl";
|
|
297
203
|
import ListControlProperty from "./property";
|
|
298
204
|
import { FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
@@ -314,31 +220,25 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
314
220
|
var _this1 = this, _superprop_get_validate = function() {
|
|
315
221
|
return _get(_getPrototypeOf(ListControl.prototype), "validate", _this);
|
|
316
222
|
};
|
|
317
|
-
return _asyncToGenerator(function() {
|
|
318
|
-
return
|
|
319
|
-
switch(
|
|
223
|
+
return _asyncToGenerator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
|
224
|
+
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
|
225
|
+
while(1)switch(_ctx.prev = _ctx.next){
|
|
320
226
|
case 0:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
_superprop_get_validate().call(_this1, messages)
|
|
324
|
-
];
|
|
325
|
-
case 1:
|
|
326
|
-
_state.sent();
|
|
327
|
-
return [
|
|
328
|
-
4,
|
|
329
|
-
Promise.all(_this1.props.headers.map(function(child) {
|
|
330
|
-
return child.validate(messages, ignore);
|
|
331
|
-
}))
|
|
332
|
-
];
|
|
227
|
+
_ctx.next = 2;
|
|
228
|
+
return _superprop_get_validate().call(_this1, messages);
|
|
333
229
|
case 2:
|
|
334
|
-
|
|
335
|
-
return
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
230
|
+
_ctx.next = 4;
|
|
231
|
+
return Promise.all(_this1.props.headers.map(function(child) {
|
|
232
|
+
return child.validate(messages, ignore);
|
|
233
|
+
}));
|
|
234
|
+
case 4:
|
|
235
|
+
return _ctx.abrupt("return", true);
|
|
236
|
+
case 5:
|
|
237
|
+
case "end":
|
|
238
|
+
return _ctx.stop();
|
|
339
239
|
}
|
|
340
|
-
});
|
|
341
|
-
})();
|
|
240
|
+
}, _callee);
|
|
241
|
+
}))();
|
|
342
242
|
};
|
|
343
243
|
_proto.toDataBindModel = function toDataBindModel() {
|
|
344
244
|
var listModel = _get(_getPrototypeOf(ListControl.prototype), "toDataBindModel", this).call(this);
|
|
@@ -63,7 +63,7 @@ export function initOptionAndDataSourceRules(props) {
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
message: RulesMessage.getMessage("optionIdIsRepeat")
|
|
66
|
-
}
|
|
66
|
+
},
|
|
67
67
|
];
|
|
68
68
|
} else if (props.hasOwnProperty("datasourceBind") && (!props.hasOwnProperty("optionConfig") || props.hasOwnProperty("optionConfig") && props.optionConfig === "datasource")) {
|
|
69
69
|
this.datasourceBind = [
|
|
@@ -103,7 +103,7 @@ export function initOptionAndDataSourceRules(props) {
|
|
|
103
103
|
callback();
|
|
104
104
|
},
|
|
105
105
|
message: RulesMessage.getMessage("pleaseBindAtLeastOneDisplayValue")
|
|
106
|
-
}
|
|
106
|
+
},
|
|
107
107
|
],
|
|
108
108
|
orders: [
|
|
109
109
|
{
|
|
@@ -126,10 +126,10 @@ export function initOptionAndDataSourceRules(props) {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
},
|
|
133
133
|
];
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -192,11 +192,11 @@ export function initSuperDataSourceRules(props, attributes) {
|
|
|
192
192
|
callback();
|
|
193
193
|
},
|
|
194
194
|
message: RulesMessage.getMessage(messageInDataSetting ? "pleaseBindAtLeastOneDisplayValueInDataSetting" : "pleaseBindAtLeastOneDisplayValue")
|
|
195
|
-
}
|
|
195
|
+
},
|
|
196
196
|
]
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
}
|
|
199
|
+
},
|
|
200
200
|
],
|
|
201
201
|
orders: [
|
|
202
202
|
{
|
|
@@ -219,9 +219,9 @@ export function initSuperDataSourceRules(props, attributes) {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
}
|
|
222
|
+
},
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
|
-
}
|
|
225
|
+
},
|
|
226
226
|
];
|
|
227
227
|
}
|