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