@byteluck-fe/model-driven-core 2.3.1-beta.2 → 2.3.1-beta.22
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/api-doc-index.js +4 -0
- package/dist/esm/common/BaseControl/designer.js +174 -68
- 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 +16 -13
- 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 +118 -18
- package/dist/esm/common/ListControl/designer.js +117 -17
- package/dist/esm/common/initOptionAndDataSourceRules.js +8 -8
- package/dist/esm/framework/index.js +279 -261
- package/dist/esm/index.js +0 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +4 -0
- package/dist/types/common/ColumnControl/property.d.ts +39 -0
- package/dist/types/common/FormControl/property.d.ts +52 -0
- 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 +172 -1
- package/dist/types/type.d.ts +23 -23
- package/package.json +3 -3
|
@@ -205,7 +205,101 @@ function _createSuper(Derived) {
|
|
|
205
205
|
return _possibleConstructorReturn(this, result);
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
var __generator = this && this.__generator || function(thisArg, body) {
|
|
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
|
+
};
|
|
209
303
|
import { JSONCopy } from "@byteluck-fe/model-driven-shared";
|
|
210
304
|
import { DesignerControl } from "../BaseControl";
|
|
211
305
|
import LayoutControlProperty from "./property";
|
|
@@ -221,7 +315,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
221
315
|
var _this;
|
|
222
316
|
_this = _super.call(this, props);
|
|
223
317
|
_this.controlType = "layout";
|
|
224
|
-
var
|
|
318
|
+
var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
|
|
225
319
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
226
320
|
defineControlArrayToProperty(_assertThisInitialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
|
|
227
321
|
_this.excludes = JSONCopy(excludes);
|
|
@@ -244,25 +338,31 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
244
338
|
var _this1 = this, _superprop_get_validate = function() {
|
|
245
339
|
return _get(_getPrototypeOf(LayoutControl.prototype), "validate", _this);
|
|
246
340
|
};
|
|
247
|
-
return _asyncToGenerator(
|
|
248
|
-
return
|
|
249
|
-
|
|
341
|
+
return _asyncToGenerator(function() {
|
|
342
|
+
return __generator(this, function(_state) {
|
|
343
|
+
switch(_state.label){
|
|
250
344
|
case 0:
|
|
251
|
-
|
|
252
|
-
|
|
345
|
+
return [
|
|
346
|
+
4,
|
|
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
|
+
];
|
|
253
357
|
case 2:
|
|
254
|
-
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
return _ctx.abrupt("return", true);
|
|
260
|
-
case 5:
|
|
261
|
-
case "end":
|
|
262
|
-
return _ctx.stop();
|
|
358
|
+
_state.sent();
|
|
359
|
+
return [
|
|
360
|
+
2,
|
|
361
|
+
true
|
|
362
|
+
];
|
|
263
363
|
}
|
|
264
|
-
}
|
|
265
|
-
})
|
|
364
|
+
});
|
|
365
|
+
})();
|
|
266
366
|
};
|
|
267
367
|
_proto.toDataBindModel = function toDataBindModel() {
|
|
268
368
|
var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
@@ -198,7 +198,101 @@ function _createSuper(Derived) {
|
|
|
198
198
|
return _possibleConstructorReturn(this, result);
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
var __generator = this && this.__generator || function(thisArg, body) {
|
|
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
|
+
};
|
|
202
296
|
import { DesignerControl } from "../BaseControl";
|
|
203
297
|
import ListControlProperty from "./property";
|
|
204
298
|
import { FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
@@ -220,25 +314,31 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
220
314
|
var _this1 = this, _superprop_get_validate = function() {
|
|
221
315
|
return _get(_getPrototypeOf(ListControl.prototype), "validate", _this);
|
|
222
316
|
};
|
|
223
|
-
return _asyncToGenerator(
|
|
224
|
-
return
|
|
225
|
-
|
|
317
|
+
return _asyncToGenerator(function() {
|
|
318
|
+
return __generator(this, function(_state) {
|
|
319
|
+
switch(_state.label){
|
|
226
320
|
case 0:
|
|
227
|
-
|
|
228
|
-
|
|
321
|
+
return [
|
|
322
|
+
4,
|
|
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
|
+
];
|
|
229
333
|
case 2:
|
|
230
|
-
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return _ctx.abrupt("return", true);
|
|
236
|
-
case 5:
|
|
237
|
-
case "end":
|
|
238
|
-
return _ctx.stop();
|
|
334
|
+
_state.sent();
|
|
335
|
+
return [
|
|
336
|
+
2,
|
|
337
|
+
true
|
|
338
|
+
];
|
|
239
339
|
}
|
|
240
|
-
}
|
|
241
|
-
})
|
|
340
|
+
});
|
|
341
|
+
})();
|
|
242
342
|
};
|
|
243
343
|
_proto.toDataBindModel = function toDataBindModel() {
|
|
244
344
|
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
|
}
|