tnx-shared 5.3.374 → 5.3.375
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/bundles/tnx-shared.umd.js +348 -315
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/components/crud/crud-form/crud-form.component.d.ts.map +1 -1
- package/esm2015/components/crud/crud-form/crud-form.component.js +29 -5
- package/fesm2015/tnx-shared.js +28 -4
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
|
@@ -14869,15 +14869,15 @@
|
|
|
14869
14869
|
return PasswordValidator;
|
|
14870
14870
|
}());
|
|
14871
14871
|
|
|
14872
|
-
var
|
|
14872
|
+
var _g;
|
|
14873
14873
|
// fix for build prod
|
|
14874
14874
|
var jQuery$1 = jQuery___default["default"];
|
|
14875
|
-
var operatorContrast = (
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14875
|
+
var operatorContrast = (_g = {},
|
|
14876
|
+
_g[exports.Operator.greater] = exports.Operator.lower,
|
|
14877
|
+
_g[exports.Operator.greaterThanEqual] = exports.Operator.lowerThanEqual,
|
|
14878
|
+
_g[exports.Operator.lower] = exports.Operator.greater,
|
|
14879
|
+
_g[exports.Operator.lowerThanEqual] = exports.Operator.greaterThanEqual,
|
|
14880
|
+
_g);
|
|
14881
14881
|
var CrudFormComponent = /** @class */ (function (_super) {
|
|
14882
14882
|
__extends(CrudFormComponent, _super);
|
|
14883
14883
|
function CrudFormComponent(_injector, _commonService, _crudService, _deviceDetectorService, _dropdownService, _sanitizer, _entityPickerService, _moduleConfig) {
|
|
@@ -14939,8 +14939,8 @@
|
|
|
14939
14939
|
_this.fieldParentField = 'parentField';
|
|
14940
14940
|
_this.handleKeyUp = function (control, event, eventType, parentModel, parentPath, sourceNode) { return __awaiter(_this, void 0, void 0, function () {
|
|
14941
14941
|
var parentNode, currentNode, value, eventData, _a_1;
|
|
14942
|
-
return __generator(this, function (
|
|
14943
|
-
switch (
|
|
14942
|
+
return __generator(this, function (_g) {
|
|
14943
|
+
switch (_g.label) {
|
|
14944
14944
|
case 0:
|
|
14945
14945
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
14946
14946
|
// row in table
|
|
@@ -14961,7 +14961,7 @@
|
|
|
14961
14961
|
return [4 /*yield*/, this.validate(currentNode)];
|
|
14962
14962
|
case 1:
|
|
14963
14963
|
// validate value
|
|
14964
|
-
|
|
14964
|
+
_g.sent();
|
|
14965
14965
|
eventData = new EventData({
|
|
14966
14966
|
currentNode: currentNode,
|
|
14967
14967
|
sourceEvent: event,
|
|
@@ -14970,15 +14970,15 @@
|
|
|
14970
14970
|
crudForm: this
|
|
14971
14971
|
});
|
|
14972
14972
|
if (!control.onKeyUp) return [3 /*break*/, 5];
|
|
14973
|
-
|
|
14973
|
+
_g.label = 2;
|
|
14974
14974
|
case 2:
|
|
14975
|
-
|
|
14975
|
+
_g.trys.push([2, 4, , 5]);
|
|
14976
14976
|
return [4 /*yield*/, control.onKeyUp(eventData)];
|
|
14977
14977
|
case 3:
|
|
14978
|
-
|
|
14978
|
+
_g.sent();
|
|
14979
14979
|
return [3 /*break*/, 5];
|
|
14980
14980
|
case 4:
|
|
14981
|
-
_a_1 =
|
|
14981
|
+
_a_1 = _g.sent();
|
|
14982
14982
|
return [3 /*break*/, 5];
|
|
14983
14983
|
case 5: return [2 /*return*/];
|
|
14984
14984
|
}
|
|
@@ -14990,8 +14990,8 @@
|
|
|
14990
14990
|
_this.handleFieldValueChange = function (control, event, eventType, parentModel, parentPath, sourceNode, bubble) { return __awaiter(_this, void 0, void 0, function () {
|
|
14991
14991
|
var parentNode, currentNode, value, eventData, _b_1, _c_1;
|
|
14992
14992
|
var _this = this;
|
|
14993
|
-
return __generator(this, function (
|
|
14994
|
-
switch (
|
|
14993
|
+
return __generator(this, function (_g) {
|
|
14994
|
+
switch (_g.label) {
|
|
14995
14995
|
case 0:
|
|
14996
14996
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
14997
14997
|
// row in table
|
|
@@ -15012,7 +15012,7 @@
|
|
|
15012
15012
|
return [4 /*yield*/, this.validate(currentNode)];
|
|
15013
15013
|
case 1:
|
|
15014
15014
|
// validate value
|
|
15015
|
-
|
|
15015
|
+
_g.sent();
|
|
15016
15016
|
if (!bubble) {
|
|
15017
15017
|
this.fireModelChanged();
|
|
15018
15018
|
}
|
|
@@ -15024,15 +15024,15 @@
|
|
|
15024
15024
|
crudForm: this
|
|
15025
15025
|
});
|
|
15026
15026
|
if (!control.onChanged) return [3 /*break*/, 5];
|
|
15027
|
-
|
|
15027
|
+
_g.label = 2;
|
|
15028
15028
|
case 2:
|
|
15029
|
-
|
|
15029
|
+
_g.trys.push([2, 4, , 5]);
|
|
15030
15030
|
return [4 /*yield*/, control.onChanged(eventData)];
|
|
15031
15031
|
case 3:
|
|
15032
|
-
|
|
15032
|
+
_g.sent();
|
|
15033
15033
|
return [3 /*break*/, 5];
|
|
15034
15034
|
case 4:
|
|
15035
|
-
_b_1 =
|
|
15035
|
+
_b_1 = _g.sent();
|
|
15036
15036
|
return [3 /*break*/, 5];
|
|
15037
15037
|
case 5:
|
|
15038
15038
|
if (!bubble) {
|
|
@@ -15047,15 +15047,15 @@
|
|
|
15047
15047
|
});
|
|
15048
15048
|
}
|
|
15049
15049
|
if (!control.onAfterChanged) return [3 /*break*/, 9];
|
|
15050
|
-
|
|
15050
|
+
_g.label = 6;
|
|
15051
15051
|
case 6:
|
|
15052
|
-
|
|
15052
|
+
_g.trys.push([6, 8, , 9]);
|
|
15053
15053
|
return [4 /*yield*/, control.onAfterChanged(eventData)];
|
|
15054
15054
|
case 7:
|
|
15055
|
-
|
|
15055
|
+
_g.sent();
|
|
15056
15056
|
return [3 /*break*/, 9];
|
|
15057
15057
|
case 8:
|
|
15058
|
-
_c_1 =
|
|
15058
|
+
_c_1 = _g.sent();
|
|
15059
15059
|
return [3 /*break*/, 9];
|
|
15060
15060
|
case 9:
|
|
15061
15061
|
this.onChange.emit(eventData);
|
|
@@ -15064,17 +15064,17 @@
|
|
|
15064
15064
|
});
|
|
15065
15065
|
}); };
|
|
15066
15066
|
_this.updateModelFromExternal = function () {
|
|
15067
|
-
var e_1,
|
|
15067
|
+
var e_1, _g;
|
|
15068
15068
|
try {
|
|
15069
|
-
for (var
|
|
15070
|
-
var control =
|
|
15069
|
+
for (var _h = __values(_this.setting.schema), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
15070
|
+
var control = _j.value;
|
|
15071
15071
|
_this.initControlModel(_this._modelData, control);
|
|
15072
15072
|
}
|
|
15073
15073
|
}
|
|
15074
15074
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
15075
15075
|
finally {
|
|
15076
15076
|
try {
|
|
15077
|
-
if (
|
|
15077
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
15078
15078
|
}
|
|
15079
15079
|
finally { if (e_1) throw e_1.error; }
|
|
15080
15080
|
}
|
|
@@ -15142,25 +15142,25 @@
|
|
|
15142
15142
|
this.initLoad();
|
|
15143
15143
|
};
|
|
15144
15144
|
CrudFormComponent.prototype.switchViewMode = function (readonlyView) {
|
|
15145
|
-
var e_2,
|
|
15145
|
+
var e_2, _g;
|
|
15146
15146
|
if (readonlyView === void 0) { readonlyView = true; }
|
|
15147
15147
|
this.isViewMode = readonlyView;
|
|
15148
15148
|
try {
|
|
15149
|
-
for (var
|
|
15150
|
-
var control =
|
|
15149
|
+
for (var _h = __values(this.setting.schema), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
15150
|
+
var control = _j.value;
|
|
15151
15151
|
this.disableControlSchema(control, this.isViewMode);
|
|
15152
15152
|
}
|
|
15153
15153
|
}
|
|
15154
15154
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
15155
15155
|
finally {
|
|
15156
15156
|
try {
|
|
15157
|
-
if (
|
|
15157
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
15158
15158
|
}
|
|
15159
15159
|
finally { if (e_2) throw e_2.error; }
|
|
15160
15160
|
}
|
|
15161
15161
|
};
|
|
15162
15162
|
CrudFormComponent.prototype.switchFormStateForUserpicker = function (isFormAddNew) {
|
|
15163
|
-
var e_3,
|
|
15163
|
+
var e_3, _g;
|
|
15164
15164
|
if (isFormAddNew === void 0) { isFormAddNew = false; }
|
|
15165
15165
|
var keys = Object.keys(this.formControls);
|
|
15166
15166
|
if (keys.length == 0)
|
|
@@ -15177,7 +15177,7 @@
|
|
|
15177
15177
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
15178
15178
|
finally {
|
|
15179
15179
|
try {
|
|
15180
|
-
if (keys_1_1 && !keys_1_1.done && (
|
|
15180
|
+
if (keys_1_1 && !keys_1_1.done && (_g = keys_1.return)) _g.call(keys_1);
|
|
15181
15181
|
}
|
|
15182
15182
|
finally { if (e_3) throw e_3.error; }
|
|
15183
15183
|
}
|
|
@@ -15189,7 +15189,7 @@
|
|
|
15189
15189
|
this.cleanModel(this._modelData);
|
|
15190
15190
|
};
|
|
15191
15191
|
CrudFormComponent.prototype.cleanModel = function (model) {
|
|
15192
|
-
var e_4,
|
|
15192
|
+
var e_4, _g;
|
|
15193
15193
|
if (isLiteralObject(model)) {
|
|
15194
15194
|
for (var key in model) {
|
|
15195
15195
|
if (key == '_status') {
|
|
@@ -15217,25 +15217,25 @@
|
|
|
15217
15217
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
15218
15218
|
finally {
|
|
15219
15219
|
try {
|
|
15220
|
-
if (model_1_1 && !model_1_1.done && (
|
|
15220
|
+
if (model_1_1 && !model_1_1.done && (_g = model_1.return)) _g.call(model_1);
|
|
15221
15221
|
}
|
|
15222
15222
|
finally { if (e_4) throw e_4.error; }
|
|
15223
15223
|
}
|
|
15224
15224
|
}
|
|
15225
15225
|
};
|
|
15226
15226
|
CrudFormComponent.prototype.reInitControlModelAndRootNode = function () {
|
|
15227
|
-
var e_5,
|
|
15227
|
+
var e_5, _g;
|
|
15228
15228
|
var _this = this;
|
|
15229
15229
|
try {
|
|
15230
|
-
for (var
|
|
15231
|
-
var control =
|
|
15230
|
+
for (var _h = __values(this.setting.schema), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
15231
|
+
var control = _j.value;
|
|
15232
15232
|
this.initControlModel(this._modelData, control);
|
|
15233
15233
|
}
|
|
15234
15234
|
}
|
|
15235
15235
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
15236
15236
|
finally {
|
|
15237
15237
|
try {
|
|
15238
|
-
if (
|
|
15238
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
15239
15239
|
}
|
|
15240
15240
|
finally { if (e_5) throw e_5.error; }
|
|
15241
15241
|
}
|
|
@@ -15258,7 +15258,7 @@
|
|
|
15258
15258
|
this.onModelChanged.emit(event);
|
|
15259
15259
|
};
|
|
15260
15260
|
CrudFormComponent.prototype.getMinimizeData = function (model) {
|
|
15261
|
-
var e_6,
|
|
15261
|
+
var e_6, _g;
|
|
15262
15262
|
if (isLiteralObject(model)) {
|
|
15263
15263
|
if (model._dropdownvalue != null && model._dropdownvalue !== '') {
|
|
15264
15264
|
return model[model._dropdownvalue] == null ? model['value'] : model[model._dropdownvalue];
|
|
@@ -15286,7 +15286,7 @@
|
|
|
15286
15286
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
15287
15287
|
finally {
|
|
15288
15288
|
try {
|
|
15289
|
-
if (model_2_1 && !model_2_1.done && (
|
|
15289
|
+
if (model_2_1 && !model_2_1.done && (_g = model_2.return)) _g.call(model_2);
|
|
15290
15290
|
}
|
|
15291
15291
|
finally { if (e_6) throw e_6.error; }
|
|
15292
15292
|
}
|
|
@@ -15328,23 +15328,23 @@
|
|
|
15328
15328
|
});
|
|
15329
15329
|
};
|
|
15330
15330
|
CrudFormComponent.prototype.initSchema = function () {
|
|
15331
|
-
var e_7,
|
|
15331
|
+
var e_7, _g, e_8, _h;
|
|
15332
15332
|
try {
|
|
15333
|
-
for (var
|
|
15334
|
-
var control =
|
|
15333
|
+
for (var _j = __values(this.setting.schema), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
15334
|
+
var control = _k.value;
|
|
15335
15335
|
this.initControlSchema(control);
|
|
15336
15336
|
}
|
|
15337
15337
|
}
|
|
15338
15338
|
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
15339
15339
|
finally {
|
|
15340
15340
|
try {
|
|
15341
|
-
if (
|
|
15341
|
+
if (_k && !_k.done && (_g = _j.return)) _g.call(_j);
|
|
15342
15342
|
}
|
|
15343
15343
|
finally { if (e_7) throw e_7.error; }
|
|
15344
15344
|
}
|
|
15345
15345
|
try {
|
|
15346
|
-
for (var
|
|
15347
|
-
var control =
|
|
15346
|
+
for (var _l = __values(this.setting.schema), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
15347
|
+
var control = _m.value;
|
|
15348
15348
|
this.initControlModel(this._modelData, control);
|
|
15349
15349
|
this.initValidatorAndCorrector(control);
|
|
15350
15350
|
this.initBindingControlSchema(control);
|
|
@@ -15353,7 +15353,7 @@
|
|
|
15353
15353
|
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
15354
15354
|
finally {
|
|
15355
15355
|
try {
|
|
15356
|
-
if (
|
|
15356
|
+
if (_m && !_m.done && (_h = _l.return)) _h.call(_l);
|
|
15357
15357
|
}
|
|
15358
15358
|
finally { if (e_8) throw e_8.error; }
|
|
15359
15359
|
}
|
|
@@ -15361,7 +15361,7 @@
|
|
|
15361
15361
|
this._rootNode.setCrudForm(this);
|
|
15362
15362
|
};
|
|
15363
15363
|
CrudFormComponent.prototype.initControlModel = function (parentModel, control, parentPath) {
|
|
15364
|
-
var e_9,
|
|
15364
|
+
var e_9, _g, e_10, _h, e_11, _j;
|
|
15365
15365
|
var _this = this;
|
|
15366
15366
|
this.initPrivateData(parentModel, control.field);
|
|
15367
15367
|
var _parentPath = control.field;
|
|
@@ -15383,18 +15383,18 @@
|
|
|
15383
15383
|
}
|
|
15384
15384
|
var i = 0;
|
|
15385
15385
|
try {
|
|
15386
|
-
for (var
|
|
15387
|
-
var item =
|
|
15386
|
+
for (var _k = __values(parentModel[control.field]), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
15387
|
+
var item = _l.value;
|
|
15388
15388
|
try {
|
|
15389
|
-
for (var
|
|
15390
|
-
var subControl =
|
|
15389
|
+
for (var _m = (e_10 = void 0, __values(control.rowTemplate)), _o = _m.next(); !_o.done; _o = _m.next()) {
|
|
15390
|
+
var subControl = _o.value;
|
|
15391
15391
|
this.initControlModel(item, subControl, _parentPath + '[' + i + ']');
|
|
15392
15392
|
}
|
|
15393
15393
|
}
|
|
15394
15394
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
15395
15395
|
finally {
|
|
15396
15396
|
try {
|
|
15397
|
-
if (
|
|
15397
|
+
if (_o && !_o.done && (_h = _m.return)) _h.call(_m);
|
|
15398
15398
|
}
|
|
15399
15399
|
finally { if (e_10) throw e_10.error; }
|
|
15400
15400
|
}
|
|
@@ -15404,7 +15404,7 @@
|
|
|
15404
15404
|
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
15405
15405
|
finally {
|
|
15406
15406
|
try {
|
|
15407
|
-
if (
|
|
15407
|
+
if (_l && !_l.done && (_g = _k.return)) _g.call(_k);
|
|
15408
15408
|
}
|
|
15409
15409
|
finally { if (e_9) throw e_9.error; }
|
|
15410
15410
|
}
|
|
@@ -15414,15 +15414,15 @@
|
|
|
15414
15414
|
parentModel[control.field] = {};
|
|
15415
15415
|
}
|
|
15416
15416
|
try {
|
|
15417
|
-
for (var
|
|
15418
|
-
var subControl =
|
|
15417
|
+
for (var _p = __values(control.controls), _q = _p.next(); !_q.done; _q = _p.next()) {
|
|
15418
|
+
var subControl = _q.value;
|
|
15419
15419
|
this.initControlModel(parentModel[control.field], subControl, _parentPath);
|
|
15420
15420
|
}
|
|
15421
15421
|
}
|
|
15422
15422
|
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
15423
15423
|
finally {
|
|
15424
15424
|
try {
|
|
15425
|
-
if (
|
|
15425
|
+
if (_q && !_q.done && (_j = _p.return)) _j.call(_p);
|
|
15426
15426
|
}
|
|
15427
15427
|
finally { if (e_11) throw e_11.error; }
|
|
15428
15428
|
}
|
|
@@ -15434,11 +15434,11 @@
|
|
|
15434
15434
|
// }
|
|
15435
15435
|
};
|
|
15436
15436
|
CrudFormComponent.prototype.initControlDefaultValueFromExternal = function () {
|
|
15437
|
-
var e_12,
|
|
15437
|
+
var e_12, _g;
|
|
15438
15438
|
try {
|
|
15439
15439
|
// const schemaDynamics = [];
|
|
15440
|
-
for (var
|
|
15441
|
-
var control =
|
|
15440
|
+
for (var _h = __values(this.setting.schema), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
15441
|
+
var control = _j.value;
|
|
15442
15442
|
this.initControlDefaultValue(this._modelData, control);
|
|
15443
15443
|
// if (control instanceof CustomControlSchema
|
|
15444
15444
|
// && this.checkIsDynamicControl(control)
|
|
@@ -15450,7 +15450,7 @@
|
|
|
15450
15450
|
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
15451
15451
|
finally {
|
|
15452
15452
|
try {
|
|
15453
|
-
if (
|
|
15453
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
15454
15454
|
}
|
|
15455
15455
|
finally { if (e_12) throw e_12.error; }
|
|
15456
15456
|
}
|
|
@@ -15461,10 +15461,10 @@
|
|
|
15461
15461
|
};
|
|
15462
15462
|
CrudFormComponent.prototype.initControlDefaultValue = function (parentModel, control, parentPath) {
|
|
15463
15463
|
return __awaiter(this, void 0, void 0, function () {
|
|
15464
|
-
var _parentPath, addMore, i,
|
|
15465
|
-
var e_13,
|
|
15466
|
-
return __generator(this, function (
|
|
15467
|
-
switch (
|
|
15464
|
+
var _parentPath, addMore, i, _g, _h, item, _j, _k, subControl, _l, _m, subControl, _o;
|
|
15465
|
+
var e_13, _p, e_14, _q, e_15, _r;
|
|
15466
|
+
return __generator(this, function (_s) {
|
|
15467
|
+
switch (_s.label) {
|
|
15468
15468
|
case 0:
|
|
15469
15469
|
this.initPrivateData(parentModel, control.field);
|
|
15470
15470
|
_parentPath = control.field;
|
|
@@ -15480,18 +15480,18 @@
|
|
|
15480
15480
|
}
|
|
15481
15481
|
i = 0;
|
|
15482
15482
|
try {
|
|
15483
|
-
for (
|
|
15484
|
-
item =
|
|
15483
|
+
for (_g = __values(parentModel[control.field]), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
15484
|
+
item = _h.value;
|
|
15485
15485
|
try {
|
|
15486
|
-
for (
|
|
15487
|
-
subControl =
|
|
15486
|
+
for (_j = (e_14 = void 0, __values(control.rowTemplate)), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
15487
|
+
subControl = _k.value;
|
|
15488
15488
|
this.initControlDefaultValue(item, subControl, _parentPath + '[' + i + ']');
|
|
15489
15489
|
}
|
|
15490
15490
|
}
|
|
15491
15491
|
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
15492
15492
|
finally {
|
|
15493
15493
|
try {
|
|
15494
|
-
if (
|
|
15494
|
+
if (_k && !_k.done && (_q = _j.return)) _q.call(_j);
|
|
15495
15495
|
}
|
|
15496
15496
|
finally { if (e_14) throw e_14.error; }
|
|
15497
15497
|
}
|
|
@@ -15501,7 +15501,7 @@
|
|
|
15501
15501
|
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
15502
15502
|
finally {
|
|
15503
15503
|
try {
|
|
15504
|
-
if (
|
|
15504
|
+
if (_h && !_h.done && (_p = _g.return)) _p.call(_g);
|
|
15505
15505
|
}
|
|
15506
15506
|
finally { if (e_13) throw e_13.error; }
|
|
15507
15507
|
}
|
|
@@ -15512,26 +15512,26 @@
|
|
|
15512
15512
|
parentModel[control.field] = {};
|
|
15513
15513
|
}
|
|
15514
15514
|
try {
|
|
15515
|
-
for (
|
|
15516
|
-
subControl =
|
|
15515
|
+
for (_l = __values(control.controls), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
15516
|
+
subControl = _m.value;
|
|
15517
15517
|
this.initControlDefaultValue(parentModel[control.field], subControl, _parentPath);
|
|
15518
15518
|
}
|
|
15519
15519
|
}
|
|
15520
15520
|
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
15521
15521
|
finally {
|
|
15522
15522
|
try {
|
|
15523
|
-
if (
|
|
15523
|
+
if (_m && !_m.done && (_r = _l.return)) _r.call(_l);
|
|
15524
15524
|
}
|
|
15525
15525
|
finally { if (e_15) throw e_15.error; }
|
|
15526
15526
|
}
|
|
15527
15527
|
return [3 /*break*/, 5];
|
|
15528
15528
|
case 2:
|
|
15529
15529
|
if (!control.funcSetDefaultValue) return [3 /*break*/, 4];
|
|
15530
|
-
|
|
15530
|
+
_o = control;
|
|
15531
15531
|
return [4 /*yield*/, control.funcSetDefaultValue()];
|
|
15532
15532
|
case 3:
|
|
15533
|
-
|
|
15534
|
-
|
|
15533
|
+
_o.defaultValue = _s.sent();
|
|
15534
|
+
_s.label = 4;
|
|
15535
15535
|
case 4:
|
|
15536
15536
|
if (!parentModel.hasOwnProperty(control.field) && control.field != null) {
|
|
15537
15537
|
if (control.defaultValue !== null && control.defaultValue !== undefined) {
|
|
@@ -15546,7 +15546,7 @@
|
|
|
15546
15546
|
}
|
|
15547
15547
|
}
|
|
15548
15548
|
}
|
|
15549
|
-
|
|
15549
|
+
_s.label = 5;
|
|
15550
15550
|
case 5: return [2 /*return*/];
|
|
15551
15551
|
}
|
|
15552
15552
|
});
|
|
@@ -15565,18 +15565,18 @@
|
|
|
15565
15565
|
parentModel._errors[field] = [];
|
|
15566
15566
|
};
|
|
15567
15567
|
CrudFormComponent.prototype.reInitControlSchema = function () {
|
|
15568
|
-
var e_16,
|
|
15568
|
+
var e_16, _g;
|
|
15569
15569
|
var _this = this;
|
|
15570
15570
|
try {
|
|
15571
|
-
for (var
|
|
15572
|
-
var control =
|
|
15571
|
+
for (var _h = __values(this.setting.schema), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
15572
|
+
var control = _j.value;
|
|
15573
15573
|
this.initControlSchema(control);
|
|
15574
15574
|
}
|
|
15575
15575
|
}
|
|
15576
15576
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
15577
15577
|
finally {
|
|
15578
15578
|
try {
|
|
15579
|
-
if (
|
|
15579
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
15580
15580
|
}
|
|
15581
15581
|
finally { if (e_16) throw e_16.error; }
|
|
15582
15582
|
}
|
|
@@ -15592,7 +15592,7 @@
|
|
|
15592
15592
|
});
|
|
15593
15593
|
};
|
|
15594
15594
|
CrudFormComponent.prototype.initControlSchema = function (schema, parentId) {
|
|
15595
|
-
var e_17,
|
|
15595
|
+
var e_17, _g, e_18, _h;
|
|
15596
15596
|
var _this = this;
|
|
15597
15597
|
if (schema.disabled != true) {
|
|
15598
15598
|
schema.disabled = null;
|
|
@@ -15651,8 +15651,8 @@
|
|
|
15651
15651
|
}
|
|
15652
15652
|
}
|
|
15653
15653
|
try {
|
|
15654
|
-
for (var
|
|
15655
|
-
var subControl =
|
|
15654
|
+
for (var _j = __values(control.rowTemplate), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
15655
|
+
var subControl = _k.value;
|
|
15656
15656
|
subControl[this.fieldParentField] = control.uniqueField;
|
|
15657
15657
|
this.initControlSchema(subControl, schema.uniqueField);
|
|
15658
15658
|
}
|
|
@@ -15660,7 +15660,7 @@
|
|
|
15660
15660
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
15661
15661
|
finally {
|
|
15662
15662
|
try {
|
|
15663
|
-
if (
|
|
15663
|
+
if (_k && !_k.done && (_g = _j.return)) _g.call(_j);
|
|
15664
15664
|
}
|
|
15665
15665
|
finally { if (e_17) throw e_17.error; }
|
|
15666
15666
|
}
|
|
@@ -15698,8 +15698,8 @@
|
|
|
15698
15698
|
else if (schema instanceof ContainerSchema) {
|
|
15699
15699
|
var control = schema;
|
|
15700
15700
|
try {
|
|
15701
|
-
for (var
|
|
15702
|
-
var subControl =
|
|
15701
|
+
for (var _l = __values(control.controls), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
15702
|
+
var subControl = _m.value;
|
|
15703
15703
|
subControl[this.fieldParentField] = control.uniqueField;
|
|
15704
15704
|
this.initControlSchema(subControl, control.uniqueField);
|
|
15705
15705
|
}
|
|
@@ -15707,7 +15707,7 @@
|
|
|
15707
15707
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
15708
15708
|
finally {
|
|
15709
15709
|
try {
|
|
15710
|
-
if (
|
|
15710
|
+
if (_m && !_m.done && (_h = _l.return)) _h.call(_l);
|
|
15711
15711
|
}
|
|
15712
15712
|
finally { if (e_18) throw e_18.error; }
|
|
15713
15713
|
}
|
|
@@ -15741,7 +15741,7 @@
|
|
|
15741
15741
|
}
|
|
15742
15742
|
};
|
|
15743
15743
|
CrudFormComponent.prototype.disableControlSchema = function (schema, disabled) {
|
|
15744
|
-
var e_19,
|
|
15744
|
+
var e_19, _g, e_20, _h;
|
|
15745
15745
|
if (disabled === void 0) { disabled = true; }
|
|
15746
15746
|
if (!schema.disabled) {
|
|
15747
15747
|
schema.disabled = disabled;
|
|
@@ -15749,15 +15749,15 @@
|
|
|
15749
15749
|
if (schema instanceof TableSchema) {
|
|
15750
15750
|
var control = schema;
|
|
15751
15751
|
try {
|
|
15752
|
-
for (var
|
|
15753
|
-
var subControl =
|
|
15752
|
+
for (var _j = __values(control.rowTemplate), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
15753
|
+
var subControl = _k.value;
|
|
15754
15754
|
this.disableControlSchema(subControl, disabled);
|
|
15755
15755
|
}
|
|
15756
15756
|
}
|
|
15757
15757
|
catch (e_19_1) { e_19 = { error: e_19_1 }; }
|
|
15758
15758
|
finally {
|
|
15759
15759
|
try {
|
|
15760
|
-
if (
|
|
15760
|
+
if (_k && !_k.done && (_g = _j.return)) _g.call(_j);
|
|
15761
15761
|
}
|
|
15762
15762
|
finally { if (e_19) throw e_19.error; }
|
|
15763
15763
|
}
|
|
@@ -15765,15 +15765,15 @@
|
|
|
15765
15765
|
else if (schema instanceof ContainerSchema) {
|
|
15766
15766
|
var control = schema;
|
|
15767
15767
|
try {
|
|
15768
|
-
for (var
|
|
15769
|
-
var subControl =
|
|
15768
|
+
for (var _l = __values(control.controls), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
15769
|
+
var subControl = _m.value;
|
|
15770
15770
|
this.disableControlSchema(subControl, disabled);
|
|
15771
15771
|
}
|
|
15772
15772
|
}
|
|
15773
15773
|
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
15774
15774
|
finally {
|
|
15775
15775
|
try {
|
|
15776
|
-
if (
|
|
15776
|
+
if (_m && !_m.done && (_h = _l.return)) _h.call(_l);
|
|
15777
15777
|
}
|
|
15778
15778
|
finally { if (e_20) throw e_20.error; }
|
|
15779
15779
|
}
|
|
@@ -15792,19 +15792,19 @@
|
|
|
15792
15792
|
schema.data.tenCongViec = templateText;
|
|
15793
15793
|
};
|
|
15794
15794
|
CrudFormComponent.prototype.initBindingControlSchema = function (schema) {
|
|
15795
|
-
var e_21,
|
|
15795
|
+
var e_21, _g, e_22, _h;
|
|
15796
15796
|
if (schema instanceof TableSchema) {
|
|
15797
15797
|
var control = schema;
|
|
15798
15798
|
try {
|
|
15799
|
-
for (var
|
|
15800
|
-
var subControl =
|
|
15799
|
+
for (var _j = __values(control.rowTemplate), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
15800
|
+
var subControl = _k.value;
|
|
15801
15801
|
this.initBindingControlSchema(subControl);
|
|
15802
15802
|
}
|
|
15803
15803
|
}
|
|
15804
15804
|
catch (e_21_1) { e_21 = { error: e_21_1 }; }
|
|
15805
15805
|
finally {
|
|
15806
15806
|
try {
|
|
15807
|
-
if (
|
|
15807
|
+
if (_k && !_k.done && (_g = _j.return)) _g.call(_j);
|
|
15808
15808
|
}
|
|
15809
15809
|
finally { if (e_21) throw e_21.error; }
|
|
15810
15810
|
}
|
|
@@ -15824,15 +15824,15 @@
|
|
|
15824
15824
|
else if (schema instanceof ContainerSchema) {
|
|
15825
15825
|
var control = schema;
|
|
15826
15826
|
try {
|
|
15827
|
-
for (var
|
|
15828
|
-
var subControl =
|
|
15827
|
+
for (var _l = __values(control.controls), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
15828
|
+
var subControl = _m.value;
|
|
15829
15829
|
this.initBindingControlSchema(subControl);
|
|
15830
15830
|
}
|
|
15831
15831
|
}
|
|
15832
15832
|
catch (e_22_1) { e_22 = { error: e_22_1 }; }
|
|
15833
15833
|
finally {
|
|
15834
15834
|
try {
|
|
15835
|
-
if (
|
|
15835
|
+
if (_m && !_m.done && (_h = _l.return)) _h.call(_l);
|
|
15836
15836
|
}
|
|
15837
15837
|
finally { if (e_22) throw e_22.error; }
|
|
15838
15838
|
}
|
|
@@ -15842,7 +15842,7 @@
|
|
|
15842
15842
|
return __awaiter(this, void 0, void 0, function () {
|
|
15843
15843
|
var markedControl;
|
|
15844
15844
|
var _this = this;
|
|
15845
|
-
return __generator(this, function (
|
|
15845
|
+
return __generator(this, function (_g) {
|
|
15846
15846
|
dropdownControlSchema.bindingFilters.forEach(function (filter) {
|
|
15847
15847
|
var sourceField = filter.sourceField;
|
|
15848
15848
|
var schema = _this.setting.schema.find(function (q) { return q.field == sourceField; });
|
|
@@ -15858,7 +15858,7 @@
|
|
|
15858
15858
|
});
|
|
15859
15859
|
};
|
|
15860
15860
|
CrudFormComponent.prototype.bindOnChangeToDropdownRecursive = function (childDropdown, tmpFilters, markedControl) {
|
|
15861
|
-
var e_23,
|
|
15861
|
+
var e_23, _g;
|
|
15862
15862
|
var _this = this;
|
|
15863
15863
|
if (tmpFilters instanceof Array) {
|
|
15864
15864
|
var _loop_1 = function (filter) {
|
|
@@ -15920,7 +15920,7 @@
|
|
|
15920
15920
|
catch (e_23_1) { e_23 = { error: e_23_1 }; }
|
|
15921
15921
|
finally {
|
|
15922
15922
|
try {
|
|
15923
|
-
if (tmpFilters_1_1 && !tmpFilters_1_1.done && (
|
|
15923
|
+
if (tmpFilters_1_1 && !tmpFilters_1_1.done && (_g = tmpFilters_1.return)) _g.call(tmpFilters_1);
|
|
15924
15924
|
}
|
|
15925
15925
|
finally { if (e_23) throw e_23.error; }
|
|
15926
15926
|
}
|
|
@@ -15931,14 +15931,14 @@
|
|
|
15931
15931
|
if (control.triggerLoadChild) {
|
|
15932
15932
|
var oldTriggerLoadChild_1 = control.triggerLoadChild;
|
|
15933
15933
|
control.triggerLoadChild = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
15934
|
-
return __generator(this, function (
|
|
15935
|
-
switch (
|
|
15934
|
+
return __generator(this, function (_g) {
|
|
15935
|
+
switch (_g.label) {
|
|
15936
15936
|
case 0: return [4 /*yield*/, oldTriggerLoadChild_1(event)];
|
|
15937
15937
|
case 1:
|
|
15938
|
-
|
|
15938
|
+
_g.sent();
|
|
15939
15939
|
return [4 /*yield*/, newOnChange(event)];
|
|
15940
15940
|
case 2:
|
|
15941
|
-
|
|
15941
|
+
_g.sent();
|
|
15942
15942
|
return [2 /*return*/];
|
|
15943
15943
|
}
|
|
15944
15944
|
});
|
|
@@ -15946,11 +15946,11 @@
|
|
|
15946
15946
|
}
|
|
15947
15947
|
else {
|
|
15948
15948
|
control.triggerLoadChild = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
15949
|
-
return __generator(this, function (
|
|
15950
|
-
switch (
|
|
15949
|
+
return __generator(this, function (_g) {
|
|
15950
|
+
switch (_g.label) {
|
|
15951
15951
|
case 0: return [4 /*yield*/, newOnChange(event)];
|
|
15952
15952
|
case 1:
|
|
15953
|
-
|
|
15953
|
+
_g.sent();
|
|
15954
15954
|
return [2 /*return*/];
|
|
15955
15955
|
}
|
|
15956
15956
|
});
|
|
@@ -15962,14 +15962,14 @@
|
|
|
15962
15962
|
var oldOnChange_1 = control.onChanged;
|
|
15963
15963
|
control[tmpFieldOldOnChange] = oldOnChange_1;
|
|
15964
15964
|
control.onChanged = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
15965
|
-
return __generator(this, function (
|
|
15966
|
-
switch (
|
|
15965
|
+
return __generator(this, function (_g) {
|
|
15966
|
+
switch (_g.label) {
|
|
15967
15967
|
case 0: return [4 /*yield*/, oldOnChange_1(event)];
|
|
15968
15968
|
case 1:
|
|
15969
|
-
|
|
15969
|
+
_g.sent();
|
|
15970
15970
|
return [4 /*yield*/, control.triggerLoadChild(event)];
|
|
15971
15971
|
case 2:
|
|
15972
|
-
|
|
15972
|
+
_g.sent();
|
|
15973
15973
|
return [2 /*return*/];
|
|
15974
15974
|
}
|
|
15975
15975
|
});
|
|
@@ -15984,14 +15984,14 @@
|
|
|
15984
15984
|
if (control[tmpFieldOldOnChange]) {
|
|
15985
15985
|
var oldOnChange_2 = control[tmpFieldOldOnChange];
|
|
15986
15986
|
control.onChanged = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
15987
|
-
return __generator(this, function (
|
|
15988
|
-
switch (
|
|
15987
|
+
return __generator(this, function (_g) {
|
|
15988
|
+
switch (_g.label) {
|
|
15989
15989
|
case 0: return [4 /*yield*/, oldOnChange_2(event)];
|
|
15990
15990
|
case 1:
|
|
15991
|
-
|
|
15991
|
+
_g.sent();
|
|
15992
15992
|
return [4 /*yield*/, control.triggerLoadChild(event)];
|
|
15993
15993
|
case 2:
|
|
15994
|
-
|
|
15994
|
+
_g.sent();
|
|
15995
15995
|
return [2 /*return*/];
|
|
15996
15996
|
}
|
|
15997
15997
|
});
|
|
@@ -16005,14 +16005,14 @@
|
|
|
16005
16005
|
if (control.onAdjustedValue) {
|
|
16006
16006
|
var oldEvent_1 = control.onAdjustedValue;
|
|
16007
16007
|
control.onAdjustedValue = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
16008
|
-
return __generator(this, function (
|
|
16009
|
-
switch (
|
|
16008
|
+
return __generator(this, function (_g) {
|
|
16009
|
+
switch (_g.label) {
|
|
16010
16010
|
case 0: return [4 /*yield*/, oldEvent_1(event)];
|
|
16011
16011
|
case 1:
|
|
16012
|
-
|
|
16012
|
+
_g.sent();
|
|
16013
16013
|
return [4 /*yield*/, newOnChange(event)];
|
|
16014
16014
|
case 2:
|
|
16015
|
-
|
|
16015
|
+
_g.sent();
|
|
16016
16016
|
return [2 /*return*/];
|
|
16017
16017
|
}
|
|
16018
16018
|
});
|
|
@@ -16020,11 +16020,11 @@
|
|
|
16020
16020
|
}
|
|
16021
16021
|
else {
|
|
16022
16022
|
control.onAdjustedValue = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
16023
|
-
return __generator(this, function (
|
|
16024
|
-
switch (
|
|
16023
|
+
return __generator(this, function (_g) {
|
|
16024
|
+
switch (_g.label) {
|
|
16025
16025
|
case 0: return [4 /*yield*/, newOnChange(event)];
|
|
16026
16026
|
case 1:
|
|
16027
|
-
|
|
16027
|
+
_g.sent();
|
|
16028
16028
|
return [2 /*return*/];
|
|
16029
16029
|
}
|
|
16030
16030
|
});
|
|
@@ -16033,7 +16033,7 @@
|
|
|
16033
16033
|
}
|
|
16034
16034
|
};
|
|
16035
16035
|
CrudFormComponent.prototype.initValidatorAndCorrector = function (schema) {
|
|
16036
|
-
var e_24,
|
|
16036
|
+
var e_24, _g, e_25, _h;
|
|
16037
16037
|
var _this = this;
|
|
16038
16038
|
if (!schema.correctors)
|
|
16039
16039
|
schema.correctors = [];
|
|
@@ -16079,15 +16079,15 @@
|
|
|
16079
16079
|
else if (schema instanceof TableSchema) {
|
|
16080
16080
|
var control = schema;
|
|
16081
16081
|
try {
|
|
16082
|
-
for (var
|
|
16083
|
-
var subControl =
|
|
16082
|
+
for (var _j = __values(control.rowTemplate), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
16083
|
+
var subControl = _k.value;
|
|
16084
16084
|
this.initValidatorAndCorrector(subControl);
|
|
16085
16085
|
}
|
|
16086
16086
|
}
|
|
16087
16087
|
catch (e_24_1) { e_24 = { error: e_24_1 }; }
|
|
16088
16088
|
finally {
|
|
16089
16089
|
try {
|
|
16090
|
-
if (
|
|
16090
|
+
if (_k && !_k.done && (_g = _j.return)) _g.call(_j);
|
|
16091
16091
|
}
|
|
16092
16092
|
finally { if (e_24) throw e_24.error; }
|
|
16093
16093
|
}
|
|
@@ -16105,15 +16105,15 @@
|
|
|
16105
16105
|
else if (schema instanceof ContainerSchema) {
|
|
16106
16106
|
var control = schema;
|
|
16107
16107
|
try {
|
|
16108
|
-
for (var
|
|
16109
|
-
var subControl =
|
|
16108
|
+
for (var _l = __values(control.controls), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
16109
|
+
var subControl = _m.value;
|
|
16110
16110
|
this.initValidatorAndCorrector(subControl);
|
|
16111
16111
|
}
|
|
16112
16112
|
}
|
|
16113
16113
|
catch (e_25_1) { e_25 = { error: e_25_1 }; }
|
|
16114
16114
|
finally {
|
|
16115
16115
|
try {
|
|
16116
|
-
if (
|
|
16116
|
+
if (_m && !_m.done && (_h = _l.return)) _h.call(_l);
|
|
16117
16117
|
}
|
|
16118
16118
|
finally { if (e_25) throw e_25.error; }
|
|
16119
16119
|
}
|
|
@@ -16220,14 +16220,14 @@
|
|
|
16220
16220
|
}
|
|
16221
16221
|
};
|
|
16222
16222
|
CrudFormComponent.prototype.setDataDefault = function () {
|
|
16223
|
-
var e_26,
|
|
16223
|
+
var e_26, _g;
|
|
16224
16224
|
var stringDataDefault = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.DEFAULT_DATA);
|
|
16225
16225
|
var getSettingDataDefault = this._moduleConfig.getConfig().environment.settingDataDefault;
|
|
16226
16226
|
if (stringDataDefault && (this._modelData && !this._modelData.id)) {
|
|
16227
16227
|
var dataCache = JSON.parse(stringDataDefault);
|
|
16228
16228
|
try {
|
|
16229
|
-
for (var
|
|
16230
|
-
var item =
|
|
16229
|
+
for (var _h = __values(this.setting.schema), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
16230
|
+
var item = _j.value;
|
|
16231
16231
|
if (item instanceof DropdownControlSchema) {
|
|
16232
16232
|
var control = item;
|
|
16233
16233
|
var key = (control.field + (control.valueField == 'id' ? '' : control.valueField));
|
|
@@ -16257,7 +16257,7 @@
|
|
|
16257
16257
|
catch (e_26_1) { e_26 = { error: e_26_1 }; }
|
|
16258
16258
|
finally {
|
|
16259
16259
|
try {
|
|
16260
|
-
if (
|
|
16260
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
16261
16261
|
}
|
|
16262
16262
|
finally { if (e_26) throw e_26.error; }
|
|
16263
16263
|
}
|
|
@@ -16271,7 +16271,7 @@
|
|
|
16271
16271
|
this.setCachedValueToModel(this._modelData);
|
|
16272
16272
|
};
|
|
16273
16273
|
CrudFormComponent.prototype.setCachedValueToModel = function (model, uniqueKeyControl, path) {
|
|
16274
|
-
var e_27,
|
|
16274
|
+
var e_27, _g;
|
|
16275
16275
|
for (var field in model) {
|
|
16276
16276
|
if (field != '_errors' && field != '_status' && field != '_source') {
|
|
16277
16277
|
var subUniqueKeyControl = void 0;
|
|
@@ -16304,7 +16304,7 @@
|
|
|
16304
16304
|
catch (e_27_1) { e_27 = { error: e_27_1 }; }
|
|
16305
16305
|
finally {
|
|
16306
16306
|
try {
|
|
16307
|
-
if (subModel_1_1 && !subModel_1_1.done && (
|
|
16307
|
+
if (subModel_1_1 && !subModel_1_1.done && (_g = subModel_1.return)) _g.call(subModel_1);
|
|
16308
16308
|
}
|
|
16309
16309
|
finally { if (e_27) throw e_27.error; }
|
|
16310
16310
|
}
|
|
@@ -16561,14 +16561,14 @@
|
|
|
16561
16561
|
var _a;
|
|
16562
16562
|
return __awaiter(this, void 0, void 0, function () {
|
|
16563
16563
|
var _this = this;
|
|
16564
|
-
return __generator(this, function (
|
|
16565
|
-
switch (
|
|
16564
|
+
return __generator(this, function (_g) {
|
|
16565
|
+
switch (_g.label) {
|
|
16566
16566
|
case 0:
|
|
16567
16567
|
if (!(setValidateForm || ((_a = this.setting.arrFieldMustValidate) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 2];
|
|
16568
16568
|
this._inValidForm = false;
|
|
16569
16569
|
return [4 /*yield*/, this.validateModel(this._rootNode, setValidateForm)];
|
|
16570
16570
|
case 1:
|
|
16571
|
-
|
|
16571
|
+
_g.sent();
|
|
16572
16572
|
if (this._inValidForm) {
|
|
16573
16573
|
setTimeout(function () {
|
|
16574
16574
|
_this.focusToFirstErrorControl();
|
|
@@ -16578,7 +16578,7 @@
|
|
|
16578
16578
|
return [3 /*break*/, 3];
|
|
16579
16579
|
case 2:
|
|
16580
16580
|
this.removeAllError();
|
|
16581
|
-
|
|
16581
|
+
_g.label = 3;
|
|
16582
16582
|
case 3: return [2 /*return*/, true];
|
|
16583
16583
|
}
|
|
16584
16584
|
});
|
|
@@ -16588,17 +16588,17 @@
|
|
|
16588
16588
|
if (setValidateForm === void 0) { setValidateForm = true; }
|
|
16589
16589
|
var _a;
|
|
16590
16590
|
return __awaiter(this, void 0, void 0, function () {
|
|
16591
|
-
var
|
|
16592
|
-
var e_28,
|
|
16593
|
-
return __generator(this, function (
|
|
16594
|
-
switch (
|
|
16591
|
+
var _g, _h, childNode, e_28_1;
|
|
16592
|
+
var e_28, _j;
|
|
16593
|
+
return __generator(this, function (_k) {
|
|
16594
|
+
switch (_k.label) {
|
|
16595
16595
|
case 0:
|
|
16596
|
-
|
|
16597
|
-
|
|
16598
|
-
|
|
16596
|
+
_k.trys.push([0, 6, 7, 8]);
|
|
16597
|
+
_g = __values(currentNode.childNodes), _h = _g.next();
|
|
16598
|
+
_k.label = 1;
|
|
16599
16599
|
case 1:
|
|
16600
|
-
if (!!
|
|
16601
|
-
childNode =
|
|
16600
|
+
if (!!_h.done) return [3 /*break*/, 5];
|
|
16601
|
+
childNode = _h.value;
|
|
16602
16602
|
if (!setValidateForm && ((_a = this.setting.arrFieldMustValidate) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
16603
16603
|
if (!this.setting.arrFieldMustValidate.includes(childNode.field)) {
|
|
16604
16604
|
this.removeAllErrorByNodes(childNode);
|
|
@@ -16616,24 +16616,24 @@
|
|
|
16616
16616
|
}
|
|
16617
16617
|
return [4 /*yield*/, this.validate(childNode, true)];
|
|
16618
16618
|
case 2:
|
|
16619
|
-
if (!(
|
|
16619
|
+
if (!(_k.sent())) {
|
|
16620
16620
|
this._inValidForm = true;
|
|
16621
16621
|
}
|
|
16622
16622
|
return [4 /*yield*/, this.validateModel(childNode)];
|
|
16623
16623
|
case 3:
|
|
16624
|
-
|
|
16625
|
-
|
|
16624
|
+
_k.sent();
|
|
16625
|
+
_k.label = 4;
|
|
16626
16626
|
case 4:
|
|
16627
|
-
|
|
16627
|
+
_h = _g.next();
|
|
16628
16628
|
return [3 /*break*/, 1];
|
|
16629
16629
|
case 5: return [3 /*break*/, 8];
|
|
16630
16630
|
case 6:
|
|
16631
|
-
e_28_1 =
|
|
16631
|
+
e_28_1 = _k.sent();
|
|
16632
16632
|
e_28 = { error: e_28_1 };
|
|
16633
16633
|
return [3 /*break*/, 8];
|
|
16634
16634
|
case 7:
|
|
16635
16635
|
try {
|
|
16636
|
-
if (
|
|
16636
|
+
if (_h && !_h.done && (_j = _g.return)) _j.call(_g);
|
|
16637
16637
|
}
|
|
16638
16638
|
finally { if (e_28) throw e_28.error; }
|
|
16639
16639
|
return [7 /*endfinally*/];
|
|
@@ -16645,17 +16645,17 @@
|
|
|
16645
16645
|
CrudFormComponent.prototype.validateFormControl = function (fieldPath) {
|
|
16646
16646
|
return __awaiter(this, void 0, void 0, function () {
|
|
16647
16647
|
var controlNode;
|
|
16648
|
-
return __generator(this, function (
|
|
16649
|
-
switch (
|
|
16648
|
+
return __generator(this, function (_g) {
|
|
16649
|
+
switch (_g.label) {
|
|
16650
16650
|
case 0:
|
|
16651
16651
|
controlNode = this._rootNode.getNodeByPath(fieldPath);
|
|
16652
16652
|
if (!controlNode) return [3 /*break*/, 2];
|
|
16653
16653
|
return [4 /*yield*/, this.validate(controlNode)];
|
|
16654
16654
|
case 1:
|
|
16655
|
-
if (!(
|
|
16655
|
+
if (!(_g.sent())) {
|
|
16656
16656
|
return [2 /*return*/, false];
|
|
16657
16657
|
}
|
|
16658
|
-
|
|
16658
|
+
_g.label = 2;
|
|
16659
16659
|
case 2: return [2 /*return*/, true];
|
|
16660
16660
|
}
|
|
16661
16661
|
});
|
|
@@ -16663,20 +16663,20 @@
|
|
|
16663
16663
|
};
|
|
16664
16664
|
CrudFormComponent.prototype.handleChangeDropdown = function (control, event, eventType, parentModel, parentPath, sourceNode, bubble) {
|
|
16665
16665
|
return __awaiter(this, void 0, void 0, function () {
|
|
16666
|
-
return __generator(this, function (
|
|
16667
|
-
switch (
|
|
16666
|
+
return __generator(this, function (_g) {
|
|
16667
|
+
switch (_g.label) {
|
|
16668
16668
|
case 0:
|
|
16669
16669
|
if (!control.multiple) return [3 /*break*/, 3];
|
|
16670
16670
|
if (!(eventType == this.eventType.HIDE)) return [3 /*break*/, 2];
|
|
16671
16671
|
return [4 /*yield*/, this.handleFieldValueChange(control, event, this.eventType.CHANGE, parentModel, parentPath, sourceNode, bubble)];
|
|
16672
16672
|
case 1:
|
|
16673
|
-
|
|
16674
|
-
|
|
16673
|
+
_g.sent();
|
|
16674
|
+
_g.label = 2;
|
|
16675
16675
|
case 2: return [3 /*break*/, 5];
|
|
16676
16676
|
case 3: return [4 /*yield*/, this.handleFieldValueChange(control, event, eventType, parentModel, parentPath, sourceNode, bubble)];
|
|
16677
16677
|
case 4:
|
|
16678
|
-
|
|
16679
|
-
|
|
16678
|
+
_g.sent();
|
|
16679
|
+
_g.label = 5;
|
|
16680
16680
|
case 5: return [2 /*return*/];
|
|
16681
16681
|
}
|
|
16682
16682
|
});
|
|
@@ -16690,8 +16690,8 @@
|
|
|
16690
16690
|
CrudFormComponent.prototype.handleAdjustValueDropdownEvent = function (control, parentPath) {
|
|
16691
16691
|
return __awaiter(this, void 0, void 0, function () {
|
|
16692
16692
|
var parentNode, currentNode, eventData, _a_2;
|
|
16693
|
-
return __generator(this, function (
|
|
16694
|
-
switch (
|
|
16693
|
+
return __generator(this, function (_g) {
|
|
16694
|
+
switch (_g.label) {
|
|
16695
16695
|
case 0:
|
|
16696
16696
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
16697
16697
|
currentNode = parentNode.getChildNode(control.field);
|
|
@@ -16701,15 +16701,15 @@
|
|
|
16701
16701
|
crudForm: this
|
|
16702
16702
|
});
|
|
16703
16703
|
if (!control.onAdjustedValue) return [3 /*break*/, 4];
|
|
16704
|
-
|
|
16704
|
+
_g.label = 1;
|
|
16705
16705
|
case 1:
|
|
16706
|
-
|
|
16706
|
+
_g.trys.push([1, 3, , 4]);
|
|
16707
16707
|
return [4 /*yield*/, control.onAdjustedValue(eventData)];
|
|
16708
16708
|
case 2:
|
|
16709
|
-
|
|
16709
|
+
_g.sent();
|
|
16710
16710
|
return [3 /*break*/, 4];
|
|
16711
16711
|
case 3:
|
|
16712
|
-
_a_2 =
|
|
16712
|
+
_a_2 = _g.sent();
|
|
16713
16713
|
return [3 /*break*/, 4];
|
|
16714
16714
|
case 4: return [2 /*return*/];
|
|
16715
16715
|
}
|
|
@@ -16718,7 +16718,7 @@
|
|
|
16718
16718
|
};
|
|
16719
16719
|
CrudFormComponent.prototype.handleDataSourceLoadComplete = function (control, parentPath, dataSource) {
|
|
16720
16720
|
return __awaiter(this, void 0, void 0, function () {
|
|
16721
|
-
return __generator(this, function (
|
|
16721
|
+
return __generator(this, function (_g) {
|
|
16722
16722
|
return [2 /*return*/];
|
|
16723
16723
|
});
|
|
16724
16724
|
});
|
|
@@ -16726,8 +16726,8 @@
|
|
|
16726
16726
|
CrudFormComponent.prototype.handleDataSourceLoaded = function (control, parentPath, dataFromDropdown) {
|
|
16727
16727
|
return __awaiter(this, void 0, void 0, function () {
|
|
16728
16728
|
var parentNode, currentNode, eventData, _a_3;
|
|
16729
|
-
return __generator(this, function (
|
|
16730
|
-
switch (
|
|
16729
|
+
return __generator(this, function (_g) {
|
|
16730
|
+
switch (_g.label) {
|
|
16731
16731
|
case 0:
|
|
16732
16732
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
16733
16733
|
currentNode = parentNode.getChildNode(control.field);
|
|
@@ -16753,15 +16753,15 @@
|
|
|
16753
16753
|
}
|
|
16754
16754
|
}
|
|
16755
16755
|
if (!control.callbackDataFinish) return [3 /*break*/, 4];
|
|
16756
|
-
|
|
16756
|
+
_g.label = 1;
|
|
16757
16757
|
case 1:
|
|
16758
|
-
|
|
16758
|
+
_g.trys.push([1, 3, , 4]);
|
|
16759
16759
|
return [4 /*yield*/, control.callbackDataFinish(eventData)];
|
|
16760
16760
|
case 2:
|
|
16761
|
-
|
|
16761
|
+
_g.sent();
|
|
16762
16762
|
return [3 /*break*/, 4];
|
|
16763
16763
|
case 3:
|
|
16764
|
-
_a_3 =
|
|
16764
|
+
_a_3 = _g.sent();
|
|
16765
16765
|
return [3 /*break*/, 4];
|
|
16766
16766
|
case 4:
|
|
16767
16767
|
this.fireModelChanged();
|
|
@@ -16773,8 +16773,8 @@
|
|
|
16773
16773
|
CrudFormComponent.prototype.handleReadyControlPicker = function (control, parentPath) {
|
|
16774
16774
|
return __awaiter(this, void 0, void 0, function () {
|
|
16775
16775
|
var parentNode, currentNode, eventData, _a_4;
|
|
16776
|
-
return __generator(this, function (
|
|
16777
|
-
switch (
|
|
16776
|
+
return __generator(this, function (_g) {
|
|
16777
|
+
switch (_g.label) {
|
|
16778
16778
|
case 0:
|
|
16779
16779
|
this.handleControlReadyEvent(control, parentPath);
|
|
16780
16780
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
@@ -16785,15 +16785,15 @@
|
|
|
16785
16785
|
crudForm: this
|
|
16786
16786
|
});
|
|
16787
16787
|
if (!control.onReady) return [3 /*break*/, 4];
|
|
16788
|
-
|
|
16788
|
+
_g.label = 1;
|
|
16789
16789
|
case 1:
|
|
16790
|
-
|
|
16790
|
+
_g.trys.push([1, 3, , 4]);
|
|
16791
16791
|
return [4 /*yield*/, control.onReady(eventData)];
|
|
16792
16792
|
case 2:
|
|
16793
|
-
|
|
16793
|
+
_g.sent();
|
|
16794
16794
|
return [3 /*break*/, 4];
|
|
16795
16795
|
case 3:
|
|
16796
|
-
_a_4 =
|
|
16796
|
+
_a_4 = _g.sent();
|
|
16797
16797
|
return [3 /*break*/, 4];
|
|
16798
16798
|
case 4: return [2 /*return*/];
|
|
16799
16799
|
}
|
|
@@ -16811,7 +16811,7 @@
|
|
|
16811
16811
|
CrudFormComponent.prototype.handleControlReadyEvent = function (control, parentPath) {
|
|
16812
16812
|
return __awaiter(this, void 0, void 0, function () {
|
|
16813
16813
|
var parentNode;
|
|
16814
|
-
return __generator(this, function (
|
|
16814
|
+
return __generator(this, function (_g) {
|
|
16815
16815
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
16816
16816
|
parentNode.model._status[control.field].ready = true;
|
|
16817
16817
|
this.onControlReady.emit(control.field);
|
|
@@ -16867,10 +16867,10 @@
|
|
|
16867
16867
|
return this._modelData[controlTable.field];
|
|
16868
16868
|
};
|
|
16869
16869
|
CrudFormComponent.prototype.checkReadyAll = function () {
|
|
16870
|
-
var e_29,
|
|
16870
|
+
var e_29, _g;
|
|
16871
16871
|
try {
|
|
16872
|
-
for (var
|
|
16873
|
-
var control =
|
|
16872
|
+
for (var _h = __values(this.controlNeedCheckReady), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
16873
|
+
var control = _j.value;
|
|
16874
16874
|
if (control.hidden || !this._modelData[control.field]) {
|
|
16875
16875
|
continue;
|
|
16876
16876
|
}
|
|
@@ -16894,7 +16894,7 @@
|
|
|
16894
16894
|
catch (e_29_1) { e_29 = { error: e_29_1 }; }
|
|
16895
16895
|
finally {
|
|
16896
16896
|
try {
|
|
16897
|
-
if (
|
|
16897
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
16898
16898
|
}
|
|
16899
16899
|
finally { if (e_29) throw e_29.error; }
|
|
16900
16900
|
}
|
|
@@ -16939,8 +16939,8 @@
|
|
|
16939
16939
|
if (force === void 0) { force = false; }
|
|
16940
16940
|
return __awaiter(this, void 0, void 0, function () {
|
|
16941
16941
|
var parentNode, control, errors, i, validator, eventData, err, _a_5;
|
|
16942
|
-
return __generator(this, function (
|
|
16943
|
-
switch (
|
|
16942
|
+
return __generator(this, function (_g) {
|
|
16943
|
+
switch (_g.label) {
|
|
16944
16944
|
case 0:
|
|
16945
16945
|
parentNode = currentNode.parentNode;
|
|
16946
16946
|
control = currentNode.control;
|
|
@@ -16959,7 +16959,7 @@
|
|
|
16959
16959
|
errors.splice(0, errors.length);
|
|
16960
16960
|
if (!(control.validators && control.validators.length > 0)) return [3 /*break*/, 7];
|
|
16961
16961
|
i = 0;
|
|
16962
|
-
|
|
16962
|
+
_g.label = 1;
|
|
16963
16963
|
case 1:
|
|
16964
16964
|
if (!(i < control.validators.length)) return [3 /*break*/, 6];
|
|
16965
16965
|
validator = control.validators[i];
|
|
@@ -16968,12 +16968,12 @@
|
|
|
16968
16968
|
eventType: this.eventType.VALIDATE,
|
|
16969
16969
|
crudForm: this
|
|
16970
16970
|
});
|
|
16971
|
-
|
|
16971
|
+
_g.label = 2;
|
|
16972
16972
|
case 2:
|
|
16973
|
-
|
|
16973
|
+
_g.trys.push([2, 4, , 5]);
|
|
16974
16974
|
return [4 /*yield*/, validator.validate(eventData)];
|
|
16975
16975
|
case 3:
|
|
16976
|
-
if ((
|
|
16976
|
+
if ((_g.sent()) === false) {
|
|
16977
16977
|
err = validator.getError();
|
|
16978
16978
|
if (errors.indexOf(err) == -1) {
|
|
16979
16979
|
errors.push(err);
|
|
@@ -16981,7 +16981,7 @@
|
|
|
16981
16981
|
}
|
|
16982
16982
|
return [3 /*break*/, 5];
|
|
16983
16983
|
case 4:
|
|
16984
|
-
_a_5 =
|
|
16984
|
+
_a_5 = _g.sent();
|
|
16985
16985
|
return [3 /*break*/, 5];
|
|
16986
16986
|
case 5:
|
|
16987
16987
|
i++;
|
|
@@ -16990,7 +16990,7 @@
|
|
|
16990
16990
|
if (errors.length > 0) {
|
|
16991
16991
|
return [2 /*return*/, false];
|
|
16992
16992
|
}
|
|
16993
|
-
|
|
16993
|
+
_g.label = 7;
|
|
16994
16994
|
case 7: return [2 /*return*/, true];
|
|
16995
16995
|
}
|
|
16996
16996
|
});
|
|
@@ -17032,23 +17032,23 @@
|
|
|
17032
17032
|
}
|
|
17033
17033
|
};
|
|
17034
17034
|
CrudFormComponent.prototype.removeAllError = function () {
|
|
17035
|
-
var e_30,
|
|
17035
|
+
var e_30, _g;
|
|
17036
17036
|
try {
|
|
17037
|
-
for (var
|
|
17038
|
-
var childNode =
|
|
17037
|
+
for (var _h = __values(this._rootNode.childNodes), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
17038
|
+
var childNode = _j.value;
|
|
17039
17039
|
this.removeAllErrorByNodes(childNode);
|
|
17040
17040
|
}
|
|
17041
17041
|
}
|
|
17042
17042
|
catch (e_30_1) { e_30 = { error: e_30_1 }; }
|
|
17043
17043
|
finally {
|
|
17044
17044
|
try {
|
|
17045
|
-
if (
|
|
17045
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
17046
17046
|
}
|
|
17047
17047
|
finally { if (e_30) throw e_30.error; }
|
|
17048
17048
|
}
|
|
17049
17049
|
};
|
|
17050
17050
|
CrudFormComponent.prototype.removeAllErrorByNodes = function (currentNode) {
|
|
17051
|
-
var e_31,
|
|
17051
|
+
var e_31, _g, e_32, _h;
|
|
17052
17052
|
var _a, _b;
|
|
17053
17053
|
if (!currentNode.parentNode.model._errors) {
|
|
17054
17054
|
currentNode.parentNode.model._errors = {};
|
|
@@ -17058,22 +17058,22 @@
|
|
|
17058
17058
|
return;
|
|
17059
17059
|
}
|
|
17060
17060
|
try {
|
|
17061
|
-
for (var
|
|
17062
|
-
var childNode =
|
|
17061
|
+
for (var _j = __values(currentNode.childNodes), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
17062
|
+
var childNode = _k.value;
|
|
17063
17063
|
if (!((_b = childNode.childNodes) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
17064
17064
|
this.removeAllErrorByNodes(childNode);
|
|
17065
17065
|
continue;
|
|
17066
17066
|
}
|
|
17067
17067
|
try {
|
|
17068
|
-
for (var
|
|
17069
|
-
var node =
|
|
17068
|
+
for (var _l = (e_32 = void 0, __values(childNode.childNodes)), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
17069
|
+
var node = _m.value;
|
|
17070
17070
|
this.removeAllErrorByNodes(node);
|
|
17071
17071
|
}
|
|
17072
17072
|
}
|
|
17073
17073
|
catch (e_32_1) { e_32 = { error: e_32_1 }; }
|
|
17074
17074
|
finally {
|
|
17075
17075
|
try {
|
|
17076
|
-
if (
|
|
17076
|
+
if (_m && !_m.done && (_h = _l.return)) _h.call(_l);
|
|
17077
17077
|
}
|
|
17078
17078
|
finally { if (e_32) throw e_32.error; }
|
|
17079
17079
|
}
|
|
@@ -17082,7 +17082,7 @@
|
|
|
17082
17082
|
catch (e_31_1) { e_31 = { error: e_31_1 }; }
|
|
17083
17083
|
finally {
|
|
17084
17084
|
try {
|
|
17085
|
-
if (
|
|
17085
|
+
if (_k && !_k.done && (_g = _j.return)) _g.call(_j);
|
|
17086
17086
|
}
|
|
17087
17087
|
finally { if (e_31) throw e_31.error; }
|
|
17088
17088
|
}
|
|
@@ -17166,7 +17166,7 @@
|
|
|
17166
17166
|
* @param options
|
|
17167
17167
|
*/
|
|
17168
17168
|
CrudFormComponent.prototype.focusFirstControl = function () {
|
|
17169
|
-
var e_33,
|
|
17169
|
+
var e_33, _g;
|
|
17170
17170
|
var formElement = this.formElement.nativeElement;
|
|
17171
17171
|
var divs = formElement.querySelectorAll('div.crud-form-control');
|
|
17172
17172
|
if (divs) {
|
|
@@ -17204,7 +17204,7 @@
|
|
|
17204
17204
|
catch (e_33_1) { e_33 = { error: e_33_1 }; }
|
|
17205
17205
|
finally {
|
|
17206
17206
|
try {
|
|
17207
|
-
if (divs_1_1 && !divs_1_1.done && (
|
|
17207
|
+
if (divs_1_1 && !divs_1_1.done && (_g = divs_1.return)) _g.call(divs_1);
|
|
17208
17208
|
}
|
|
17209
17209
|
finally { if (e_33) throw e_33.error; }
|
|
17210
17210
|
}
|
|
@@ -17289,8 +17289,8 @@
|
|
|
17289
17289
|
var _this = this;
|
|
17290
17290
|
this._notifierService.showDeleteConfirm().then(function (rs) { return __awaiter(_this, void 0, void 0, function () {
|
|
17291
17291
|
var tableNode, toDeleteRowNode, toDelete, _a_6, _b_2, _c_2;
|
|
17292
|
-
return __generator(this, function (
|
|
17293
|
-
switch (
|
|
17292
|
+
return __generator(this, function (_g) {
|
|
17293
|
+
switch (_g.label) {
|
|
17294
17294
|
case 0:
|
|
17295
17295
|
if (!rs)
|
|
17296
17296
|
return [2 /*return*/];
|
|
@@ -17310,9 +17310,9 @@
|
|
|
17310
17310
|
tableNode.reinitChildNodes();
|
|
17311
17311
|
this.fireModelChanged();
|
|
17312
17312
|
if (!control.onChanged) return [3 /*break*/, 4];
|
|
17313
|
-
|
|
17313
|
+
_g.label = 1;
|
|
17314
17314
|
case 1:
|
|
17315
|
-
|
|
17315
|
+
_g.trys.push([1, 3, , 4]);
|
|
17316
17316
|
return [4 /*yield*/, control.onChanged(new EventData({
|
|
17317
17317
|
currentNode: tableNode,
|
|
17318
17318
|
sourceNode: toDeleteRowNode,
|
|
@@ -17320,16 +17320,16 @@
|
|
|
17320
17320
|
crudForm: this
|
|
17321
17321
|
}))];
|
|
17322
17322
|
case 2:
|
|
17323
|
-
|
|
17323
|
+
_g.sent();
|
|
17324
17324
|
return [3 /*break*/, 4];
|
|
17325
17325
|
case 3:
|
|
17326
|
-
_a_6 =
|
|
17326
|
+
_a_6 = _g.sent();
|
|
17327
17327
|
return [3 /*break*/, 4];
|
|
17328
17328
|
case 4:
|
|
17329
17329
|
if (!control.onAfterChanged) return [3 /*break*/, 8];
|
|
17330
|
-
|
|
17330
|
+
_g.label = 5;
|
|
17331
17331
|
case 5:
|
|
17332
|
-
|
|
17332
|
+
_g.trys.push([5, 7, , 8]);
|
|
17333
17333
|
return [4 /*yield*/, control.onAfterChanged(new EventData({
|
|
17334
17334
|
currentNode: tableNode,
|
|
17335
17335
|
sourceNode: toDeleteRowNode,
|
|
@@ -17337,16 +17337,16 @@
|
|
|
17337
17337
|
crudForm: this
|
|
17338
17338
|
}))];
|
|
17339
17339
|
case 6:
|
|
17340
|
-
|
|
17340
|
+
_g.sent();
|
|
17341
17341
|
return [3 /*break*/, 8];
|
|
17342
17342
|
case 7:
|
|
17343
|
-
_b_2 =
|
|
17343
|
+
_b_2 = _g.sent();
|
|
17344
17344
|
return [3 /*break*/, 8];
|
|
17345
17345
|
case 8:
|
|
17346
17346
|
if (!control.onDeleted) return [3 /*break*/, 12];
|
|
17347
|
-
|
|
17347
|
+
_g.label = 9;
|
|
17348
17348
|
case 9:
|
|
17349
|
-
|
|
17349
|
+
_g.trys.push([9, 11, , 12]);
|
|
17350
17350
|
return [4 /*yield*/, control.onDeleted(new EventData({
|
|
17351
17351
|
currentNode: tableNode,
|
|
17352
17352
|
sourceNode: toDeleteRowNode,
|
|
@@ -17354,10 +17354,10 @@
|
|
|
17354
17354
|
crudForm: this
|
|
17355
17355
|
}))];
|
|
17356
17356
|
case 10:
|
|
17357
|
-
|
|
17357
|
+
_g.sent();
|
|
17358
17358
|
return [3 /*break*/, 12];
|
|
17359
17359
|
case 11:
|
|
17360
|
-
_c_2 =
|
|
17360
|
+
_c_2 = _g.sent();
|
|
17361
17361
|
return [3 /*break*/, 12];
|
|
17362
17362
|
case 12: return [2 /*return*/];
|
|
17363
17363
|
}
|
|
@@ -17388,10 +17388,10 @@
|
|
|
17388
17388
|
if (initData === void 0) { initData = {}; }
|
|
17389
17389
|
if (fireEventFinish === void 0) { fireEventFinish = true; }
|
|
17390
17390
|
return __awaiter(this, void 0, void 0, function () {
|
|
17391
|
-
var tableNode, index, parentPath, data,
|
|
17392
|
-
var e_34,
|
|
17393
|
-
return __generator(this, function (
|
|
17394
|
-
switch (
|
|
17391
|
+
var tableNode, index, parentPath, data, _g, _h, subControl, toAdd, dicComponent, newRowNode, _b_3, _c_3, _d_1;
|
|
17392
|
+
var e_34, _j;
|
|
17393
|
+
return __generator(this, function (_k) {
|
|
17394
|
+
switch (_k.label) {
|
|
17395
17395
|
case 0:
|
|
17396
17396
|
if (control.showEdit && !disableOpenDialog) {
|
|
17397
17397
|
this.tableFormDialogModel.header = "Th\u00EAm m\u1EDBi " + control.label;
|
|
@@ -17416,15 +17416,15 @@
|
|
|
17416
17416
|
data.id = this._commonService.guid();
|
|
17417
17417
|
}
|
|
17418
17418
|
try {
|
|
17419
|
-
for (
|
|
17420
|
-
subControl =
|
|
17419
|
+
for (_g = __values(control.rowTemplate), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
17420
|
+
subControl = _h.value;
|
|
17421
17421
|
this.initControlDefaultValue(data, subControl, parentPath);
|
|
17422
17422
|
}
|
|
17423
17423
|
}
|
|
17424
17424
|
catch (e_34_1) { e_34 = { error: e_34_1 }; }
|
|
17425
17425
|
finally {
|
|
17426
17426
|
try {
|
|
17427
|
-
if (
|
|
17427
|
+
if (_h && !_h.done && (_j = _g.return)) _j.call(_g);
|
|
17428
17428
|
}
|
|
17429
17429
|
finally { if (e_34) throw e_34.error; }
|
|
17430
17430
|
}
|
|
@@ -17452,9 +17452,9 @@
|
|
|
17452
17452
|
}
|
|
17453
17453
|
newRowNode = this._rootNode.getNodeByPath(parentPath);
|
|
17454
17454
|
if (!control.onChanged) return [3 /*break*/, 4];
|
|
17455
|
-
|
|
17455
|
+
_k.label = 1;
|
|
17456
17456
|
case 1:
|
|
17457
|
-
|
|
17457
|
+
_k.trys.push([1, 3, , 4]);
|
|
17458
17458
|
return [4 /*yield*/, control.onChanged(new EventData({
|
|
17459
17459
|
currentNode: tableNode,
|
|
17460
17460
|
sourceNode: newRowNode,
|
|
@@ -17462,16 +17462,16 @@
|
|
|
17462
17462
|
crudForm: this
|
|
17463
17463
|
}))];
|
|
17464
17464
|
case 2:
|
|
17465
|
-
|
|
17465
|
+
_k.sent();
|
|
17466
17466
|
return [3 /*break*/, 4];
|
|
17467
17467
|
case 3:
|
|
17468
|
-
_b_3 =
|
|
17468
|
+
_b_3 = _k.sent();
|
|
17469
17469
|
return [3 /*break*/, 4];
|
|
17470
17470
|
case 4:
|
|
17471
17471
|
if (!control.onAfterChanged) return [3 /*break*/, 8];
|
|
17472
|
-
|
|
17472
|
+
_k.label = 5;
|
|
17473
17473
|
case 5:
|
|
17474
|
-
|
|
17474
|
+
_k.trys.push([5, 7, , 8]);
|
|
17475
17475
|
return [4 /*yield*/, control.onAfterChanged(new EventData({
|
|
17476
17476
|
currentNode: tableNode,
|
|
17477
17477
|
sourceNode: newRowNode,
|
|
@@ -17479,16 +17479,16 @@
|
|
|
17479
17479
|
crudForm: this
|
|
17480
17480
|
}))];
|
|
17481
17481
|
case 6:
|
|
17482
|
-
|
|
17482
|
+
_k.sent();
|
|
17483
17483
|
return [3 /*break*/, 8];
|
|
17484
17484
|
case 7:
|
|
17485
|
-
_c_3 =
|
|
17485
|
+
_c_3 = _k.sent();
|
|
17486
17486
|
return [3 /*break*/, 8];
|
|
17487
17487
|
case 8:
|
|
17488
17488
|
if (!control.onAdded) return [3 /*break*/, 12];
|
|
17489
|
-
|
|
17489
|
+
_k.label = 9;
|
|
17490
17490
|
case 9:
|
|
17491
|
-
|
|
17491
|
+
_k.trys.push([9, 11, , 12]);
|
|
17492
17492
|
return [4 /*yield*/, control.onAdded(new EventData({
|
|
17493
17493
|
currentNode: tableNode,
|
|
17494
17494
|
sourceNode: newRowNode,
|
|
@@ -17496,10 +17496,10 @@
|
|
|
17496
17496
|
crudForm: this
|
|
17497
17497
|
}))];
|
|
17498
17498
|
case 10:
|
|
17499
|
-
|
|
17499
|
+
_k.sent();
|
|
17500
17500
|
return [3 /*break*/, 12];
|
|
17501
17501
|
case 11:
|
|
17502
|
-
_d_1 =
|
|
17502
|
+
_d_1 = _k.sent();
|
|
17503
17503
|
return [3 /*break*/, 12];
|
|
17504
17504
|
case 12: return [2 /*return*/];
|
|
17505
17505
|
}
|
|
@@ -17533,33 +17533,66 @@
|
|
|
17533
17533
|
};
|
|
17534
17534
|
CrudFormComponent.prototype.handleSavedTableRow = function (data) {
|
|
17535
17535
|
return __awaiter(this, void 0, void 0, function () {
|
|
17536
|
-
var control, tablePath, eventType, tableNode, index, parentPath,
|
|
17537
|
-
var e_35,
|
|
17538
|
-
return __generator(this, function (
|
|
17539
|
-
switch (
|
|
17536
|
+
var control, tablePath, eventType, tableNode, _a_7, _b_4, index, parentPath, _g, _h, subControl, toAdd, newRowNode, _d_2, _e_1, _f_1;
|
|
17537
|
+
var e_35, _j;
|
|
17538
|
+
return __generator(this, function (_k) {
|
|
17539
|
+
switch (_k.label) {
|
|
17540
17540
|
case 0:
|
|
17541
17541
|
this.tableFormDialogModel.showEditForm = false;
|
|
17542
17542
|
control = this.tableFormCurrentInfo.control;
|
|
17543
17543
|
tablePath = this.tableFormCurrentInfo.tablePath;
|
|
17544
17544
|
eventType = this.tableFormCurrentInfo.eventType;
|
|
17545
17545
|
tableNode = this._rootNode.getNodeByPath(tablePath);
|
|
17546
|
-
if (!(this.tableFormCurrentRow > -1)) return [3 /*break*/,
|
|
17546
|
+
if (!(this.tableFormCurrentRow > -1)) return [3 /*break*/, 9];
|
|
17547
17547
|
tableNode.model[this.tableFormCurrentRow] = Object.assign(Object.assign({}, tableNode.model[this.tableFormCurrentRow]), data);
|
|
17548
17548
|
this.fireModelChanged();
|
|
17549
|
-
return [3 /*break*/,
|
|
17549
|
+
if (!control.onChanged) return [3 /*break*/, 4];
|
|
17550
|
+
_k.label = 1;
|
|
17550
17551
|
case 1:
|
|
17552
|
+
_k.trys.push([1, 3, , 4]);
|
|
17553
|
+
return [4 /*yield*/, control.onChanged(new EventData({
|
|
17554
|
+
currentNode: tableNode,
|
|
17555
|
+
sourceNode: null,
|
|
17556
|
+
eventType: eventType || this.eventType.TABLE_CHANGED,
|
|
17557
|
+
crudForm: this
|
|
17558
|
+
}))];
|
|
17559
|
+
case 2:
|
|
17560
|
+
_k.sent();
|
|
17561
|
+
return [3 /*break*/, 4];
|
|
17562
|
+
case 3:
|
|
17563
|
+
_a_7 = _k.sent();
|
|
17564
|
+
return [3 /*break*/, 4];
|
|
17565
|
+
case 4:
|
|
17566
|
+
if (!control.onAfterChanged) return [3 /*break*/, 8];
|
|
17567
|
+
_k.label = 5;
|
|
17568
|
+
case 5:
|
|
17569
|
+
_k.trys.push([5, 7, , 8]);
|
|
17570
|
+
return [4 /*yield*/, control.onAfterChanged(new EventData({
|
|
17571
|
+
currentNode: tableNode,
|
|
17572
|
+
sourceNode: null,
|
|
17573
|
+
eventType: eventType || this.eventType.TABLE_CHANGED,
|
|
17574
|
+
crudForm: this
|
|
17575
|
+
}))];
|
|
17576
|
+
case 6:
|
|
17577
|
+
_k.sent();
|
|
17578
|
+
return [3 /*break*/, 8];
|
|
17579
|
+
case 7:
|
|
17580
|
+
_b_4 = _k.sent();
|
|
17581
|
+
return [3 /*break*/, 8];
|
|
17582
|
+
case 8: return [3 /*break*/, 21];
|
|
17583
|
+
case 9:
|
|
17551
17584
|
index = tableNode.childNodes.length;
|
|
17552
17585
|
parentPath = tablePath + '[' + index + ']';
|
|
17553
17586
|
try {
|
|
17554
|
-
for (
|
|
17555
|
-
subControl =
|
|
17587
|
+
for (_g = __values(control.rowTemplate), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
17588
|
+
subControl = _h.value;
|
|
17556
17589
|
this.initControlModel(data, subControl, parentPath);
|
|
17557
17590
|
}
|
|
17558
17591
|
}
|
|
17559
17592
|
catch (e_35_1) { e_35 = { error: e_35_1 }; }
|
|
17560
17593
|
finally {
|
|
17561
17594
|
try {
|
|
17562
|
-
if (
|
|
17595
|
+
if (_h && !_h.done && (_j = _g.return)) _j.call(_g);
|
|
17563
17596
|
}
|
|
17564
17597
|
finally { if (e_35) throw e_35.error; }
|
|
17565
17598
|
}
|
|
@@ -17573,68 +17606,68 @@
|
|
|
17573
17606
|
crudForm: this
|
|
17574
17607
|
}));
|
|
17575
17608
|
}
|
|
17576
|
-
catch (
|
|
17609
|
+
catch (_c) {
|
|
17577
17610
|
toAdd = false;
|
|
17578
17611
|
}
|
|
17579
17612
|
}
|
|
17580
|
-
if (!(toAdd !== false)) return [3 /*break*/,
|
|
17613
|
+
if (!(toAdd !== false)) return [3 /*break*/, 21];
|
|
17581
17614
|
tableNode.model.push(data);
|
|
17582
17615
|
tableNode.reinitChildNodes();
|
|
17583
17616
|
if (eventType != this.eventType.INIT) {
|
|
17584
17617
|
this.fireModelChanged();
|
|
17585
17618
|
}
|
|
17586
17619
|
newRowNode = this._rootNode.getNodeByPath(parentPath);
|
|
17587
|
-
if (!control.onChanged) return [3 /*break*/,
|
|
17588
|
-
|
|
17589
|
-
case
|
|
17590
|
-
|
|
17620
|
+
if (!control.onChanged) return [3 /*break*/, 13];
|
|
17621
|
+
_k.label = 10;
|
|
17622
|
+
case 10:
|
|
17623
|
+
_k.trys.push([10, 12, , 13]);
|
|
17591
17624
|
return [4 /*yield*/, control.onChanged(new EventData({
|
|
17592
17625
|
currentNode: tableNode,
|
|
17593
17626
|
sourceNode: newRowNode,
|
|
17594
17627
|
eventType: eventType || this.eventType.TABLE_CHANGED,
|
|
17595
17628
|
crudForm: this
|
|
17596
17629
|
}))];
|
|
17597
|
-
case
|
|
17598
|
-
|
|
17599
|
-
return [3 /*break*/,
|
|
17600
|
-
case
|
|
17601
|
-
|
|
17602
|
-
return [3 /*break*/,
|
|
17603
|
-
case
|
|
17604
|
-
if (!control.onAfterChanged) return [3 /*break*/,
|
|
17605
|
-
|
|
17606
|
-
case
|
|
17607
|
-
|
|
17630
|
+
case 11:
|
|
17631
|
+
_k.sent();
|
|
17632
|
+
return [3 /*break*/, 13];
|
|
17633
|
+
case 12:
|
|
17634
|
+
_d_2 = _k.sent();
|
|
17635
|
+
return [3 /*break*/, 13];
|
|
17636
|
+
case 13:
|
|
17637
|
+
if (!control.onAfterChanged) return [3 /*break*/, 17];
|
|
17638
|
+
_k.label = 14;
|
|
17639
|
+
case 14:
|
|
17640
|
+
_k.trys.push([14, 16, , 17]);
|
|
17608
17641
|
return [4 /*yield*/, control.onAfterChanged(new EventData({
|
|
17609
17642
|
currentNode: tableNode,
|
|
17610
17643
|
sourceNode: newRowNode,
|
|
17611
17644
|
eventType: eventType || this.eventType.TABLE_CHANGED,
|
|
17612
17645
|
crudForm: this
|
|
17613
17646
|
}))];
|
|
17614
|
-
case
|
|
17615
|
-
|
|
17616
|
-
return [3 /*break*/,
|
|
17617
|
-
case
|
|
17618
|
-
|
|
17619
|
-
return [3 /*break*/,
|
|
17620
|
-
case
|
|
17621
|
-
if (!control.onAdded) return [3 /*break*/,
|
|
17622
|
-
|
|
17623
|
-
case
|
|
17624
|
-
|
|
17647
|
+
case 15:
|
|
17648
|
+
_k.sent();
|
|
17649
|
+
return [3 /*break*/, 17];
|
|
17650
|
+
case 16:
|
|
17651
|
+
_e_1 = _k.sent();
|
|
17652
|
+
return [3 /*break*/, 17];
|
|
17653
|
+
case 17:
|
|
17654
|
+
if (!control.onAdded) return [3 /*break*/, 21];
|
|
17655
|
+
_k.label = 18;
|
|
17656
|
+
case 18:
|
|
17657
|
+
_k.trys.push([18, 20, , 21]);
|
|
17625
17658
|
return [4 /*yield*/, control.onAdded(new EventData({
|
|
17626
17659
|
currentNode: tableNode,
|
|
17627
17660
|
sourceNode: newRowNode,
|
|
17628
17661
|
eventType: eventType || this.eventType.ADDED,
|
|
17629
17662
|
crudForm: this
|
|
17630
17663
|
}))];
|
|
17631
|
-
case
|
|
17632
|
-
|
|
17633
|
-
return [3 /*break*/,
|
|
17634
|
-
case
|
|
17635
|
-
|
|
17636
|
-
return [3 /*break*/,
|
|
17637
|
-
case
|
|
17664
|
+
case 19:
|
|
17665
|
+
_k.sent();
|
|
17666
|
+
return [3 /*break*/, 21];
|
|
17667
|
+
case 20:
|
|
17668
|
+
_f_1 = _k.sent();
|
|
17669
|
+
return [3 /*break*/, 21];
|
|
17670
|
+
case 21: return [2 /*return*/];
|
|
17638
17671
|
}
|
|
17639
17672
|
});
|
|
17640
17673
|
});
|
|
@@ -17672,8 +17705,8 @@
|
|
|
17672
17705
|
CrudFormComponent.prototype.handleRowOrdered = function (control, evt, eventType, parentModel, parentPath, sourceNode, bubble) {
|
|
17673
17706
|
return __awaiter(this, void 0, void 0, function () {
|
|
17674
17707
|
var parentNode, currentNode, value, eventData;
|
|
17675
|
-
return __generator(this, function (
|
|
17676
|
-
switch (
|
|
17708
|
+
return __generator(this, function (_g) {
|
|
17709
|
+
switch (_g.label) {
|
|
17677
17710
|
case 0:
|
|
17678
17711
|
parentNode = this._rootNode.getNodeByPath(parentPath);
|
|
17679
17712
|
// row in table
|
|
@@ -17700,8 +17733,8 @@
|
|
|
17700
17733
|
if (!control.onReordered) return [3 /*break*/, 2];
|
|
17701
17734
|
return [4 /*yield*/, control.onReordered(eventData)];
|
|
17702
17735
|
case 1:
|
|
17703
|
-
|
|
17704
|
-
|
|
17736
|
+
_g.sent();
|
|
17737
|
+
_g.label = 2;
|
|
17705
17738
|
case 2:
|
|
17706
17739
|
if (!bubble) {
|
|
17707
17740
|
this.fireModelChanged();
|
|
@@ -17714,15 +17747,15 @@
|
|
|
17714
17747
|
};
|
|
17715
17748
|
CrudFormComponent.prototype.showContextMenu = function (evt, rowData, control) {
|
|
17716
17749
|
return __awaiter(this, void 0, void 0, function () {
|
|
17717
|
-
var
|
|
17718
|
-
return __generator(this, function (
|
|
17719
|
-
switch (
|
|
17750
|
+
var _g;
|
|
17751
|
+
return __generator(this, function (_h) {
|
|
17752
|
+
switch (_h.label) {
|
|
17720
17753
|
case 0:
|
|
17721
17754
|
this.rowDataCurrent = rowData;
|
|
17722
|
-
|
|
17755
|
+
_g = this;
|
|
17723
17756
|
return [4 /*yield*/, control.rowButtons(rowData)];
|
|
17724
17757
|
case 1:
|
|
17725
|
-
|
|
17758
|
+
_g.buttonContexts = _h.sent();
|
|
17726
17759
|
if (!this.buttonContexts || this.buttonContexts.length == 0) {
|
|
17727
17760
|
return [2 /*return*/];
|
|
17728
17761
|
}
|
|
@@ -17996,7 +18029,7 @@
|
|
|
17996
18029
|
}
|
|
17997
18030
|
};
|
|
17998
18031
|
ControlTreeNode.prototype.initChildNodes = function (model, schemas, keysPlus) {
|
|
17999
|
-
var e_36,
|
|
18032
|
+
var e_36, _g, e_37, _h;
|
|
18000
18033
|
if (isLiteralObject(model)) {
|
|
18001
18034
|
var allKey = new Set(__spreadArray(__spreadArray([], __read(keysPlus)), __read(Object.keys(model))));
|
|
18002
18035
|
try {
|
|
@@ -18012,7 +18045,7 @@
|
|
|
18012
18045
|
catch (e_36_1) { e_36 = { error: e_36_1 }; }
|
|
18013
18046
|
finally {
|
|
18014
18047
|
try {
|
|
18015
|
-
if (allKey_1_1 && !allKey_1_1.done && (
|
|
18048
|
+
if (allKey_1_1 && !allKey_1_1.done && (_g = allKey_1.return)) _g.call(allKey_1);
|
|
18016
18049
|
}
|
|
18017
18050
|
finally { if (e_36) throw e_36.error; }
|
|
18018
18051
|
}
|
|
@@ -18049,7 +18082,7 @@
|
|
|
18049
18082
|
catch (e_37_1) { e_37 = { error: e_37_1 }; }
|
|
18050
18083
|
finally {
|
|
18051
18084
|
try {
|
|
18052
|
-
if (model_3_1 && !model_3_1.done && (
|
|
18085
|
+
if (model_3_1 && !model_3_1.done && (_h = model_3.return)) _h.call(model_3);
|
|
18053
18086
|
}
|
|
18054
18087
|
finally { if (e_37) throw e_37.error; }
|
|
18055
18088
|
}
|
|
@@ -18197,14 +18230,14 @@
|
|
|
18197
18230
|
return this.findSchemaInTree(this.rootNode, schemaPath.toLowerCase());
|
|
18198
18231
|
};
|
|
18199
18232
|
ControlTreeNode.prototype.findInTree = function (node, modelPath) {
|
|
18200
|
-
var e_38,
|
|
18233
|
+
var e_38, _g;
|
|
18201
18234
|
if (node.modelPath != null && node.modelPath.toLowerCase() == modelPath.toLowerCase()) {
|
|
18202
18235
|
return node;
|
|
18203
18236
|
}
|
|
18204
18237
|
else {
|
|
18205
18238
|
try {
|
|
18206
|
-
for (var
|
|
18207
|
-
var childNode =
|
|
18239
|
+
for (var _h = __values(node.childNodes), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
18240
|
+
var childNode = _j.value;
|
|
18208
18241
|
if (childNode.modelPath != null && modelPath.startsWith(childNode.modelPath.toLowerCase())) {
|
|
18209
18242
|
var re = this.findInTree(childNode, modelPath);
|
|
18210
18243
|
if (re)
|
|
@@ -18215,7 +18248,7 @@
|
|
|
18215
18248
|
catch (e_38_1) { e_38 = { error: e_38_1 }; }
|
|
18216
18249
|
finally {
|
|
18217
18250
|
try {
|
|
18218
|
-
if (
|
|
18251
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
18219
18252
|
}
|
|
18220
18253
|
finally { if (e_38) throw e_38.error; }
|
|
18221
18254
|
}
|
|
@@ -18223,14 +18256,14 @@
|
|
|
18223
18256
|
return null;
|
|
18224
18257
|
};
|
|
18225
18258
|
ControlTreeNode.prototype.findSchemaInTree = function (node, schemaPath) {
|
|
18226
|
-
var e_39,
|
|
18259
|
+
var e_39, _g;
|
|
18227
18260
|
if (node.schemaPath != null && node.schemaPath.toLowerCase() == schemaPath.toLowerCase()) {
|
|
18228
18261
|
return node;
|
|
18229
18262
|
}
|
|
18230
18263
|
else {
|
|
18231
18264
|
try {
|
|
18232
|
-
for (var
|
|
18233
|
-
var childNode =
|
|
18265
|
+
for (var _h = __values(node.childNodes), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
18266
|
+
var childNode = _j.value;
|
|
18234
18267
|
if (childNode.schemaPath != null && schemaPath.startsWith(childNode.schemaPath.toLowerCase())) {
|
|
18235
18268
|
var re = this.findSchemaInTree(childNode, schemaPath);
|
|
18236
18269
|
if (re)
|
|
@@ -18241,7 +18274,7 @@
|
|
|
18241
18274
|
catch (e_39_1) { e_39 = { error: e_39_1 }; }
|
|
18242
18275
|
finally {
|
|
18243
18276
|
try {
|
|
18244
|
-
if (
|
|
18277
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
18245
18278
|
}
|
|
18246
18279
|
finally { if (e_39) throw e_39.error; }
|
|
18247
18280
|
}
|