@byteluck-fe/model-driven-controls 1.8.0-beta.6 → 1.8.0-beta.8
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.
|
@@ -4,6 +4,35 @@ function _assertThisInitialized(self) {
|
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
8
|
+
try {
|
|
9
|
+
var info = gen[key](arg);
|
|
10
|
+
var value = info.value;
|
|
11
|
+
} catch (error) {
|
|
12
|
+
reject(error);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (info.done) {
|
|
16
|
+
resolve(value);
|
|
17
|
+
} else {
|
|
18
|
+
Promise.resolve(value).then(_next, _throw);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function _asyncToGenerator(fn) {
|
|
22
|
+
return function() {
|
|
23
|
+
var self = this, args = arguments;
|
|
24
|
+
return new Promise(function(resolve, reject) {
|
|
25
|
+
var gen = fn.apply(self, args);
|
|
26
|
+
function _next(value) {
|
|
27
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
28
|
+
}
|
|
29
|
+
function _throw(err) {
|
|
30
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
31
|
+
}
|
|
32
|
+
_next(undefined);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
}
|
|
7
36
|
function _classCallCheck(instance, Constructor) {
|
|
8
37
|
if (!(instance instanceof Constructor)) {
|
|
9
38
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -151,6 +180,101 @@ function _createSuper(Derived) {
|
|
|
151
180
|
return _possibleConstructorReturn(this, result);
|
|
152
181
|
};
|
|
153
182
|
}
|
|
183
|
+
var __generator = this && this.__generator || function(thisArg, body) {
|
|
184
|
+
var f, y, t, g, _ = {
|
|
185
|
+
label: 0,
|
|
186
|
+
sent: function() {
|
|
187
|
+
if (t[0] & 1) throw t[1];
|
|
188
|
+
return t[1];
|
|
189
|
+
},
|
|
190
|
+
trys: [],
|
|
191
|
+
ops: []
|
|
192
|
+
};
|
|
193
|
+
return g = {
|
|
194
|
+
next: verb(0),
|
|
195
|
+
"throw": verb(1),
|
|
196
|
+
"return": verb(2)
|
|
197
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
198
|
+
return this;
|
|
199
|
+
}), g;
|
|
200
|
+
function verb(n) {
|
|
201
|
+
return function(v) {
|
|
202
|
+
return step([
|
|
203
|
+
n,
|
|
204
|
+
v
|
|
205
|
+
]);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function step(op) {
|
|
209
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
210
|
+
while(_)try {
|
|
211
|
+
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;
|
|
212
|
+
if (y = 0, t) op = [
|
|
213
|
+
op[0] & 2,
|
|
214
|
+
t.value
|
|
215
|
+
];
|
|
216
|
+
switch(op[0]){
|
|
217
|
+
case 0:
|
|
218
|
+
case 1:
|
|
219
|
+
t = op;
|
|
220
|
+
break;
|
|
221
|
+
case 4:
|
|
222
|
+
_.label++;
|
|
223
|
+
return {
|
|
224
|
+
value: op[1],
|
|
225
|
+
done: false
|
|
226
|
+
};
|
|
227
|
+
case 5:
|
|
228
|
+
_.label++;
|
|
229
|
+
y = op[1];
|
|
230
|
+
op = [
|
|
231
|
+
0
|
|
232
|
+
];
|
|
233
|
+
continue;
|
|
234
|
+
case 7:
|
|
235
|
+
op = _.ops.pop();
|
|
236
|
+
_.trys.pop();
|
|
237
|
+
continue;
|
|
238
|
+
default:
|
|
239
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
240
|
+
_ = 0;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
244
|
+
_.label = op[1];
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
248
|
+
_.label = t[1];
|
|
249
|
+
t = op;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
if (t && _.label < t[2]) {
|
|
253
|
+
_.label = t[2];
|
|
254
|
+
_.ops.push(op);
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
if (t[2]) _.ops.pop();
|
|
258
|
+
_.trys.pop();
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
op = body.call(thisArg, _);
|
|
262
|
+
} catch (e) {
|
|
263
|
+
op = [
|
|
264
|
+
6,
|
|
265
|
+
e
|
|
266
|
+
];
|
|
267
|
+
y = 0;
|
|
268
|
+
} finally{
|
|
269
|
+
f = t = 0;
|
|
270
|
+
}
|
|
271
|
+
if (op[0] & 5) throw op[1];
|
|
272
|
+
return {
|
|
273
|
+
value: op[0] ? op[1] : void 0,
|
|
274
|
+
done: true
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
};
|
|
154
278
|
import { DesignerColumnControl, COMMON_SETTING_TYPE, defineControlArrayToProperty } from "@byteluck-fe/model-driven-core";
|
|
155
279
|
import { DesignerOperationButtonControl } from "../../baseControls/OperationButton";
|
|
156
280
|
import OperationColumnControlProperty from "./property";
|
|
@@ -188,6 +312,37 @@ var OperationColumnControl = /*#__PURE__*/ function(DesignerColumnControl) {
|
|
|
188
312
|
})
|
|
189
313
|
});
|
|
190
314
|
};
|
|
315
|
+
_proto.validate = function validate(messages, ignore) {
|
|
316
|
+
var _this = this;
|
|
317
|
+
var _this1 = this, _superprop_get_validate = function() {
|
|
318
|
+
return _get(_getPrototypeOf(OperationColumnControl.prototype), "validate", _this);
|
|
319
|
+
};
|
|
320
|
+
return _asyncToGenerator(function() {
|
|
321
|
+
return __generator(this, function(_state) {
|
|
322
|
+
switch(_state.label){
|
|
323
|
+
case 0:
|
|
324
|
+
return [
|
|
325
|
+
4,
|
|
326
|
+
_superprop_get_validate().call(_this1, messages, ignore)
|
|
327
|
+
];
|
|
328
|
+
case 1:
|
|
329
|
+
_state.sent();
|
|
330
|
+
return [
|
|
331
|
+
4,
|
|
332
|
+
Promise.all(_this1.children.map(function(child) {
|
|
333
|
+
return child.validate(messages, ignore);
|
|
334
|
+
}))
|
|
335
|
+
];
|
|
336
|
+
case 2:
|
|
337
|
+
_state.sent();
|
|
338
|
+
return [
|
|
339
|
+
2,
|
|
340
|
+
true
|
|
341
|
+
];
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
})();
|
|
345
|
+
};
|
|
191
346
|
return OperationColumnControl;
|
|
192
347
|
}(DesignerColumnControl);
|
|
193
348
|
OperationColumnControl.controlType = "operation-column";
|