tuain-ng-forms-lib 0.12.32 → 12.0.1

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.
@@ -2128,11 +2128,14 @@
2128
2128
  return fieldCurrentValue === '';
2129
2129
  };
2130
2130
  FieldDescriptor.prototype.getValue = function () {
2131
- var _a;
2131
+ var _a, _b;
2132
2132
  switch (this.fieldType) {
2133
- case this._formConfig.fieldTypes.check:
2133
+ case this._formConfig.fieldTypes.boolean:
2134
2134
  return (_a = this._fieldValue) !== null && _a !== void 0 ? _a : false;
2135
2135
  break;
2136
+ case this._formConfig.fieldTypes.check:
2137
+ return (_b = this._fieldValue) !== null && _b !== void 0 ? _b : false;
2138
+ break;
2136
2139
  case this._formConfig.fieldTypes.currency:
2137
2140
  return this._fieldValue.replace(',', '');
2138
2141
  break;
@@ -2254,6 +2257,9 @@
2254
2257
  case 'BOOLEAN':
2255
2258
  newFinalValue = !!newValue;
2256
2259
  break;
2260
+ case this._formConfig.fieldTypes.boolean:
2261
+ newFinalValue = !!newValue;
2262
+ break;
2257
2263
  case this._formConfig.fieldTypes.check:
2258
2264
  newFinalValue = !!newValue;
2259
2265
  break;
@@ -3077,71 +3083,79 @@
3077
3083
  function LibFormManagerService() {
3078
3084
  this.cleanStack();
3079
3085
  }
3080
- /**
3081
- * Métodos virtuales de manejo de formularios
3082
- */
3086
+ // Métodos virtuales para las aplicaciones
3083
3087
  LibFormManagerService.prototype.getFormDefinition = function (formCode) { };
3088
+ LibFormManagerService.prototype.getFormRoute = function (formCode) { };
3089
+ LibFormManagerService.prototype.getRouteForm = function (path) { };
3084
3090
  LibFormManagerService.prototype.execServerAction = function (actionDetail) { };
3085
- LibFormManagerService.prototype.goToRoute = function (navigationArray) { };
3086
- /**
3087
- * Manejo del stack de navegación con atributos estados y parámetros
3088
- */
3089
- LibFormManagerService.prototype.resetPageStack = function () { this.cleanStack(); };
3090
- LibFormManagerService.prototype.cleanStack = function () {
3091
- this.pageStack = [];
3092
- };
3091
+ LibFormManagerService.prototype.goToForm = function (formCode, token, subject) { };
3093
3092
  LibFormManagerService.prototype.loadStack = function () { };
3094
3093
  LibFormManagerService.prototype.saveStack = function () { };
3095
- LibFormManagerService.prototype.stack = function (data) {
3096
- var id = nanoid.nanoid(6);
3097
- this.pageStack.push({ id: id, data: data });
3098
- this.saveStack();
3099
- return id;
3100
- };
3101
- LibFormManagerService.prototype.unstack = function (id) {
3102
- var stackIdx = this.pageStack.findIndex(function (item) { return item.id === id; });
3103
- if (stackIdx >= 0) {
3104
- var formData = this.pageStack[stackIdx].data;
3105
- // Se eliminan los formularios posteriores al solicitado
3106
- this.pageStack.splice(stackIdx + 1);
3094
+ LibFormManagerService.prototype.cleanStack = function () { this.pageStack = []; };
3095
+ LibFormManagerService.prototype.resetPageStack = function () { this.cleanStack(); };
3096
+ LibFormManagerService.prototype.findFormInStack = function (token) {
3097
+ var index = this.pageStack.findIndex(function (item) { return (item === null || item === void 0 ? void 0 : item.token) === token; });
3098
+ var data = (index >= 0) ? this.pageStack[index] : null;
3099
+ return { index: index, data: data };
3100
+ };
3101
+ LibFormManagerService.prototype.replaceItem = function (token, formInfo) {
3102
+ var _a, _b;
3103
+ if (!token || !formInfo) {
3104
+ return;
3105
+ }
3106
+ var _c = this.findFormInStack(token), index = _c.index, storedForm = _c.data;
3107
+ var updatedForm = null;
3108
+ if (index >= 0) {
3109
+ updatedForm = Object.assign({}, storedForm);
3110
+ updatedForm.subject = (_a = formInfo === null || formInfo === void 0 ? void 0 : formInfo.subject) !== null && _a !== void 0 ? _a : storedForm.subject;
3111
+ updatedForm.state = (_b = formInfo === null || formInfo === void 0 ? void 0 : formInfo.state) !== null && _b !== void 0 ? _b : storedForm.state;
3112
+ Object.assign(updatedForm.fields, formInfo.fields);
3113
+ Object.assign(updatedForm.extra, formInfo.extra);
3114
+ this.pageStack[index] = updatedForm;
3107
3115
  this.saveStack();
3108
- return formData;
3109
3116
  }
3110
3117
  };
3111
- LibFormManagerService.prototype.getInputData = function (id) {
3112
- var stackIdx = (id) ? this.pageStack.findIndex(function (item) { return item.id === id; }) : -1;
3113
- if (stackIdx >= 0) {
3114
- var predefinedFields = this.pageStack[stackIdx].data.target.predefinedFields;
3115
- return predefinedFields;
3118
+ LibFormManagerService.prototype.stack = function (origin, target) {
3119
+ var token = nanoid.nanoid(6);
3120
+ this.replaceItem(target.originToken, origin);
3121
+ this.pageStack.push(Object.assign({ token: token }, target));
3122
+ this.saveStack();
3123
+ return token;
3124
+ };
3125
+ LibFormManagerService.prototype.unstack = function (token) {
3126
+ if (token === void 0) { token = null; }
3127
+ var index = (token) ? this.findFormInStack(token).index : this.pageStack.length - 2;
3128
+ var formInfo = null;
3129
+ if (index >= 0) {
3130
+ formInfo = this.pageStack[index];
3131
+ this.pageStack.splice(index + 1);
3132
+ this.saveStack();
3116
3133
  }
3117
- return null;
3134
+ return formInfo;
3118
3135
  };
3119
- LibFormManagerService.prototype.getOriginInfo = function (id) {
3120
- var stackIdx = (id) ? this.pageStack.findIndex(function (item) { return item.id === id; }) : -1;
3121
- if (stackIdx >= 0) {
3122
- var origin = this.pageStack[stackIdx].data.origin;
3123
- return JSON.parse(JSON.stringify(origin));
3124
- }
3125
- return null;
3136
+ LibFormManagerService.prototype.getFormInfo = function (token) {
3137
+ var _a, _b;
3138
+ var data = this.findFormInStack(token).data;
3139
+ return {
3140
+ token: data === null || data === void 0 ? void 0 : data.token,
3141
+ subject: data === null || data === void 0 ? void 0 : data.subject,
3142
+ state: data === null || data === void 0 ? void 0 : data.state,
3143
+ originToken: data === null || data === void 0 ? void 0 : data.originToken,
3144
+ fields: (_a = data === null || data === void 0 ? void 0 : data.fields) !== null && _a !== void 0 ? _a : {},
3145
+ extra: (_b = data === null || data === void 0 ? void 0 : data.extra) !== null && _b !== void 0 ? _b : {}
3146
+ };
3126
3147
  };
3127
- LibFormManagerService.prototype.changeForm = function (origin, target) {
3128
- if (!origin) {
3129
- this.cleanStack();
3130
- }
3131
- var url = target.url, params = target.params;
3132
- var newToken = this.stack({ origin: origin, target: target });
3133
- var navigationArray = __spreadArray(__spreadArray([url], __read(params)), [newToken]);
3134
- this.goToRoute(navigationArray);
3148
+ LibFormManagerService.prototype.openForm = function (origin, target) {
3149
+ var _a;
3150
+ (!origin) && this.cleanStack();
3151
+ target.originToken = (_a = origin === null || origin === void 0 ? void 0 : origin.token) !== null && _a !== void 0 ? _a : null;
3152
+ var token = this.stack(origin, target);
3153
+ this.goToForm(target.name, token, target.subject);
3135
3154
  };
3136
- LibFormManagerService.prototype.changePreviousForm = function (transitionToken) {
3137
- var prevForm = this.unstack(transitionToken);
3138
- if (!prevForm) {
3139
- return;
3140
- }
3141
- var _a = prevForm.origin, url = _a.url, params = _a.params, token = _a.token;
3142
- var navigationArray = __spreadArray([url], __read(params));
3143
- token && navigationArray.push(token);
3144
- this.goToRoute(navigationArray);
3155
+ LibFormManagerService.prototype.backTo = function (targetToken) {
3156
+ if (targetToken === void 0) { targetToken = null; }
3157
+ var formInfo = this.unstack(targetToken);
3158
+ formInfo && formInfo.name && this.goToForm(formInfo.name, formInfo.token, formInfo.subject);
3145
3159
  };
3146
3160
  return LibFormManagerService;
3147
3161
  }());
@@ -3180,11 +3194,8 @@
3180
3194
  var INLINE_ACTION = 'INLINE';
3181
3195
  var GLOBAL_ACTION = 'GLOBAL';
3182
3196
  var GET_DATA_ACTION = 'GETDATA';
3183
- var FORM_CODE = 'form';
3184
- var FORM_SUBJECT = 'formSubject';
3185
- var ORIGIN_PARAM = 'origin';
3186
- var STATE_PARAM = 'mode';
3187
- var REQUIRED_FIELD_MESSAGE = 'Campo requerido';
3197
+ var SUBJECT = 'subject';
3198
+ var TOKEN = 'token';
3188
3199
  var BasicFormComponent = /** @class */ (function () {
3189
3200
  function BasicFormComponent(formManagerService, _eventManager, fileMgmtServices) {
3190
3201
  this.formManagerService = formManagerService;
@@ -3194,9 +3205,9 @@
3194
3205
  this.errorMessage = '';
3195
3206
  this.errorDetail = '';
3196
3207
  this.formStructure = null;
3197
- this.transitionToken = null;
3198
- this.inputDataFields = [];
3199
- this.extraData = null;
3208
+ this.controlToken = null;
3209
+ this.inputDataFields = {};
3210
+ this.extraData = {};
3200
3211
  this.definitionObtained = false;
3201
3212
  this.formVisible = false;
3202
3213
  this.inServerProcess = false;
@@ -3227,8 +3238,8 @@
3227
3238
  this.errorMessage = '';
3228
3239
  this.errorDetail = '';
3229
3240
  this.formStructure = null;
3230
- this.transitionToken = null;
3231
- this.inputDataFields = [];
3241
+ this.controlToken = null;
3242
+ this.inputDataFields = {};
3232
3243
  this.definitionObtained = false;
3233
3244
  // Se limpian los manejadores de eventos
3234
3245
  this.formVisible = false;
@@ -3396,36 +3407,64 @@
3396
3407
  BasicFormComponent.prototype.subscribeAppEvent = function (eventName, callback) {
3397
3408
  this._eventEmiter.subscribe(eventName, callback);
3398
3409
  };
3410
+ BasicFormComponent.prototype.openForm = function (name, data, backData, cleanStack) {
3411
+ if (backData === void 0) { backData = null; }
3412
+ if (cleanStack === void 0) { cleanStack = false; }
3413
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3414
+ var origin = null;
3415
+ if (!cleanStack) {
3416
+ origin = Object.assign(Object.assign({}, backData), { name: this.name, url: this._formRoute, token: this.controlToken });
3417
+ origin.subject = (_a = origin === null || origin === void 0 ? void 0 : origin.subject) !== null && _a !== void 0 ? _a : this.formSubject;
3418
+ origin.state = (_b = origin === null || origin === void 0 ? void 0 : origin.state) !== null && _b !== void 0 ? _b : this.currentState;
3419
+ origin.fields = (_c = origin === null || origin === void 0 ? void 0 : origin.fields) !== null && _c !== void 0 ? _c : {};
3420
+ origin.extra = (_d = origin === null || origin === void 0 ? void 0 : origin.extra) !== null && _d !== void 0 ? _d : {};
3421
+ }
3422
+ var target = Object.assign(Object.assign({}, data), { name: name });
3423
+ target.subject = (_e = target === null || target === void 0 ? void 0 : target.subject) !== null && _e !== void 0 ? _e : null;
3424
+ target.state = (_f = target === null || target === void 0 ? void 0 : target.state) !== null && _f !== void 0 ? _f : null;
3425
+ target.fields = (_g = target === null || target === void 0 ? void 0 : target.fields) !== null && _g !== void 0 ? _g : {};
3426
+ target.extra = (_h = target === null || target === void 0 ? void 0 : target.extra) !== null && _h !== void 0 ? _h : {};
3427
+ this.formManagerService.openForm(origin, target);
3428
+ };
3429
+ /**
3430
+ * @deprecated Este método ya no debería ser utilizado. Use openForm con el nombre del formulario
3431
+ */
3399
3432
  BasicFormComponent.prototype.goToPage = function (navigationArray, predefinedFields, options) {
3400
3433
  if (options === void 0) { options = null; }
3401
- var _a, _b;
3434
+ var _a;
3402
3435
  var origin = null;
3403
3436
  var cleanStack = (_a = options === null || options === void 0 ? void 0 : options.cleanStack) !== null && _a !== void 0 ? _a : false;
3404
- var params = [];
3405
- this.currentState && params.push(this.currentState);
3406
- this.formSubject && params.push(this.formSubject);
3407
3437
  if (!cleanStack) {
3408
3438
  origin = {
3409
- code: this.name,
3439
+ name: this.name,
3410
3440
  url: this._formRoute,
3411
- params: params,
3412
- token: this.transitionToken,
3413
- predefinedFields: this.inputDataFields
3441
+ token: this.controlToken,
3442
+ fields: this.inputDataFields,
3443
+ extra: this.extraData
3414
3444
  };
3415
3445
  }
3416
3446
  var target = {
3447
+ name: this.formManagerService.getRouteForm(navigationArray === null || navigationArray === void 0 ? void 0 : navigationArray[0]),
3417
3448
  url: navigationArray === null || navigationArray === void 0 ? void 0 : navigationArray[0],
3418
- params: (_b = navigationArray.splice(1)) !== null && _b !== void 0 ? _b : [],
3419
- predefinedFields: predefinedFields,
3449
+ state: navigationArray === null || navigationArray === void 0 ? void 0 : navigationArray[1],
3450
+ subject: navigationArray === null || navigationArray === void 0 ? void 0 : navigationArray[2],
3451
+ fields: predefinedFields,
3452
+ extra: null,
3420
3453
  };
3421
- this.formManagerService.changeForm(origin, target);
3454
+ this.formManagerService.openForm(origin, target);
3422
3455
  };
3456
+ /**
3457
+ * @deprecated Este método ya no debería ser utilizado. Use openForm con el nombre del formulario
3458
+ */
3423
3459
  BasicFormComponent.prototype.goToNewPage = function (nav, flds) { return this.goToPage(nav, flds, { cleanStack: true }); };
3460
+ /**
3461
+ * @deprecated Este método ya no debería ser utilizado. Use openForm con el nombre del formulario
3462
+ */
3424
3463
  BasicFormComponent.prototype.goToSubPage = function (nav, flds) { return this.goToPage(nav, flds, { cleanStack: false }); };
3425
- BasicFormComponent.prototype.canGoBack = function () { return this.transitionToken !== null; };
3426
- BasicFormComponent.prototype.goBack = function () { return this.formManagerService.changePreviousForm(this.transitionToken); };
3464
+ BasicFormComponent.prototype.canGoBack = function () { return this.originToken !== null; };
3465
+ BasicFormComponent.prototype.goBack = function () { return this.formManagerService.backTo(); };
3427
3466
  BasicFormComponent.prototype.goBackForm = function () { return this.goBack(); };
3428
- BasicFormComponent.prototype.getOriginDetail = function () { return this.formManagerService.getOriginInfo(this.transitionToken); };
3467
+ BasicFormComponent.prototype.getOriginDetail = function () { return this.formManagerService.getFormInfo(this.originToken); };
3429
3468
  BasicFormComponent.prototype.setError = function (errorType, errorMessage, errorDetail) {
3430
3469
  this._errorType = errorType || '';
3431
3470
  this.errorMessage = errorMessage || '';
@@ -3457,44 +3496,23 @@
3457
3496
  configurable: true
3458
3497
  });
3459
3498
  BasicFormComponent.prototype.getFormParameter = function (name) {
3460
- return (this.extraData && name && this.extraData[name]) ? this.extraData[name] : null;
3499
+ var _a, _b;
3500
+ return (name) ? ((_b = (_a = this.extraData) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null) : null;
3461
3501
  };
3462
3502
  BasicFormComponent.prototype.getSubject = function () { return this.formSubject; };
3463
3503
  BasicFormComponent.prototype.getformSubject = function () { return this.getSubject(); };
3464
3504
  BasicFormComponent.prototype.preocessInputParams = function (params) {
3465
- var e_1, _g;
3466
- var _a, _b, _c, _d, _e, _f;
3467
- var allParams = Object.keys(params !== null && params !== void 0 ? params : {});
3468
- if (!allParams || !Array.isArray(allParams) || allParams.length === 0) {
3469
- return;
3470
- }
3471
- this.extraData = [];
3472
- try {
3473
- for (var allParams_1 = __values(allParams), allParams_1_1 = allParams_1.next(); !allParams_1_1.done; allParams_1_1 = allParams_1.next()) {
3474
- var paramName = allParams_1_1.value;
3475
- this.extraData[paramName] = params[paramName].toString();
3476
- }
3477
- }
3478
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3479
- finally {
3480
- try {
3481
- if (allParams_1_1 && !allParams_1_1.done && (_g = allParams_1.return)) _g.call(allParams_1);
3482
- }
3483
- finally { if (e_1) throw e_1.error; }
3484
- }
3485
- var formName = (_b = (_a = this.extraData) === null || _a === void 0 ? void 0 : _a[FORM_CODE]) !== null && _b !== void 0 ? _b : this.name;
3486
- if (formName !== this.name) {
3487
- this.cleanStart();
3488
- this.name = formName;
3489
- }
3490
- this.formSubject = (_d = (_c = this.extraData) === null || _c === void 0 ? void 0 : _c[FORM_SUBJECT]) !== null && _d !== void 0 ? _d : null;
3491
- var initialState = this.extraData[STATE_PARAM];
3492
- this.transitionToken = (_e = this.extraData[ORIGIN_PARAM]) !== null && _e !== void 0 ? _e : null;
3493
- this.inputDataFields = (_f = this.formManagerService.getInputData(this.transitionToken)) !== null && _f !== void 0 ? _f : [];
3494
- if (!this.transitionToken) {
3495
- this.formManagerService.cleanStack();
3505
+ var _a, _b;
3506
+ this.controlToken = (_a = params === null || params === void 0 ? void 0 : params[TOKEN].toString()) !== null && _a !== void 0 ? _a : null;
3507
+ var _j = this.formManagerService.getFormInfo(this.controlToken), token = _j.token, subject = _j.subject, state = _j.state, fields = _j.fields, extra = _j.extra, originToken = _j.originToken;
3508
+ if (!this.controlToken || this.controlToken !== token) {
3509
+ console.log("No se obtuvo un token v\u00E1lido para abrir el formulario " + this.controlToken + "->" + token);
3496
3510
  }
3497
- return initialState;
3511
+ this.formSubject = (_b = params === null || params === void 0 ? void 0 : params[SUBJECT].toString()) !== null && _b !== void 0 ? _b : subject;
3512
+ this.inputDataFields = fields;
3513
+ this.extraData = extra;
3514
+ this.originToken = originToken;
3515
+ return state;
3498
3516
  };
3499
3517
  BasicFormComponent.prototype.subscribeSectionActivation = function () {
3500
3518
  var _this = this;
@@ -3546,12 +3564,10 @@
3546
3564
  }
3547
3565
  };
3548
3566
  BasicFormComponent.prototype.formInit = function (params) {
3549
- var _a;
3550
3567
  return __awaiter(this, void 0, void 0, function () {
3551
- var initialState, formDefinition, _g, _h, inputFieldData, fieldCode, fieldValue, fieldCodes, index, fieldCode, fieldValue, recordResponse;
3552
- var e_2, _j;
3553
- return __generator(this, function (_k) {
3554
- switch (_k.label) {
3568
+ var initialState, formDefinition, inputFieldNames, index, fieldCode, fieldValue, recordResponse;
3569
+ return __generator(this, function (_j) {
3570
+ switch (_j.label) {
3555
3571
  case 0:
3556
3572
  initialState = this.preocessInputParams(params);
3557
3573
  if (!this.name) {
@@ -3561,48 +3577,28 @@
3561
3577
  this.inServerProcess = true;
3562
3578
  return [4 /*yield*/, this.formManagerService.getFormDefinition(this.name)];
3563
3579
  case 1:
3564
- formDefinition = _k.sent();
3580
+ formDefinition = _j.sent();
3565
3581
  this.inServerProcess = false;
3566
3582
  this.formStructure = new FormStructureAndData(formDefinition, this.formConfig);
3567
3583
  this.definitionObtained = true;
3568
3584
  return [3 /*break*/, 3];
3569
3585
  case 2:
3570
3586
  this.cleanData();
3571
- _k.label = 3;
3587
+ _j.label = 3;
3572
3588
  case 3:
3573
3589
  if (!this.supportState(initialState)) {
3574
3590
  initialState = this.formStructure.defaultState;
3575
3591
  }
3576
3592
  this.formStructure.changeState(initialState || this.formStructure.defaultState);
3577
- if (Array.isArray(this.inputDataFields)) {
3578
- try {
3579
- for (_g = __values(this.inputDataFields), _h = _g.next(); !_h.done; _h = _g.next()) {
3580
- inputFieldData = _h.value;
3581
- fieldCode = inputFieldData.fieldCode, fieldValue = inputFieldData.fieldValue;
3582
- if (fieldCode) {
3583
- this.setFieldValue(fieldCode, fieldValue);
3584
- }
3585
- }
3586
- }
3587
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
3588
- finally {
3589
- try {
3590
- if (_h && !_h.done && (_j = _g.return)) _j.call(_g);
3591
- }
3592
- finally { if (e_2) throw e_2.error; }
3593
- }
3594
- }
3595
- else {
3596
- fieldCodes = Object.keys((_a = this.inputDataFields) !== null && _a !== void 0 ? _a : {});
3597
- for (index = 0; index < fieldCodes.length; index++) {
3598
- fieldCode = fieldCodes[index];
3599
- fieldValue = this.inputDataFields[fieldCode];
3600
- this.setFieldValue(fieldCode, fieldValue);
3601
- }
3593
+ inputFieldNames = Object.keys(this.inputDataFields);
3594
+ for (index = 0; index < inputFieldNames.length; index++) {
3595
+ fieldCode = inputFieldNames[index];
3596
+ fieldValue = this.inputDataFields[fieldCode];
3597
+ this.setFieldValue(fieldCode, fieldValue);
3602
3598
  }
3603
3599
  return [4 /*yield*/, this.requestFormAction(formActions.getData)];
3604
3600
  case 4:
3605
- recordResponse = _k.sent();
3601
+ recordResponse = _j.sent();
3606
3602
  this.checkErrorRecordReceived(recordResponse);
3607
3603
  this.formVisible = true;
3608
3604
  this.subscribeSectionActivation();
@@ -3633,8 +3629,8 @@
3633
3629
  if (actionSubject === void 0) { actionSubject = {}; }
3634
3630
  return __awaiter(this, void 0, void 0, function () {
3635
3631
  var actionDetail, formActionResponse, error, formResponseData;
3636
- return __generator(this, function (_g) {
3637
- switch (_g.label) {
3632
+ return __generator(this, function (_j) {
3633
+ switch (_j.label) {
3638
3634
  case 0:
3639
3635
  actionDetail = {
3640
3636
  formCode: this.name,
@@ -3652,7 +3648,7 @@
3652
3648
  this.inServerProcess = true;
3653
3649
  return [4 /*yield*/, this.formManagerService.execServerAction(actionDetail)];
3654
3650
  case 1:
3655
- formActionResponse = _g.sent();
3651
+ formActionResponse = _j.sent();
3656
3652
  this.inServerProcess = false;
3657
3653
  if (formActionResponse && formActionResponse.error.errorType) {
3658
3654
  console.log('Excepción no soportada');
@@ -3671,7 +3667,7 @@
3671
3667
  });
3672
3668
  };
3673
3669
  BasicFormComponent.prototype.updateFormWithServerData = function (formContent) {
3674
- var e_3, _g, e_4, _h, e_5, _j;
3670
+ var e_1, _j, e_2, _k, e_3, _l;
3675
3671
  var currentMode = formContent.currentMode, formSubject = formContent.formSubject, actions = formContent.actions, fields = formContent.fields, recordTables = formContent.recordTables, returnedFile = formContent.returnedFile, immutableData = formContent.immutableData, extraInfo = formContent.extraInfo;
3676
3672
  this.changeState(currentMode !== null && currentMode !== void 0 ? currentMode : this.formStructure.state);
3677
3673
  if (formSubject) {
@@ -3687,12 +3683,12 @@
3687
3683
  }
3688
3684
  }
3689
3685
  }
3690
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
3686
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3691
3687
  finally {
3692
3688
  try {
3693
- if (actions_1_1 && !actions_1_1.done && (_g = actions_1.return)) _g.call(actions_1);
3689
+ if (actions_1_1 && !actions_1_1.done && (_j = actions_1.return)) _j.call(actions_1);
3694
3690
  }
3695
- finally { if (e_3) throw e_3.error; }
3691
+ finally { if (e_1) throw e_1.error; }
3696
3692
  }
3697
3693
  }
3698
3694
  if (fields && fields.length > 0) {
@@ -3705,12 +3701,12 @@
3705
3701
  }
3706
3702
  }
3707
3703
  }
3708
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
3704
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
3709
3705
  finally {
3710
3706
  try {
3711
- if (fields_1_1 && !fields_1_1.done && (_h = fields_1.return)) _h.call(fields_1);
3707
+ if (fields_1_1 && !fields_1_1.done && (_k = fields_1.return)) _k.call(fields_1);
3712
3708
  }
3713
- finally { if (e_4) throw e_4.error; }
3709
+ finally { if (e_2) throw e_2.error; }
3714
3710
  }
3715
3711
  }
3716
3712
  if (recordTables && recordTables.length > 0) {
@@ -3723,12 +3719,12 @@
3723
3719
  }
3724
3720
  }
3725
3721
  }
3726
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
3722
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
3727
3723
  finally {
3728
3724
  try {
3729
- if (recordTables_1_1 && !recordTables_1_1.done && (_j = recordTables_1.return)) _j.call(recordTables_1);
3725
+ if (recordTables_1_1 && !recordTables_1_1.done && (_l = recordTables_1.return)) _l.call(recordTables_1);
3730
3726
  }
3731
- finally { if (e_5) throw e_5.error; }
3727
+ finally { if (e_3) throw e_3.error; }
3732
3728
  }
3733
3729
  }
3734
3730
  if (returnedFile && returnedFile.file) {
@@ -3783,8 +3779,8 @@
3783
3779
  BasicFormComponent.prototype.launchSectionActivation = function (sectionCode) {
3784
3780
  return __awaiter(this, void 0, void 0, function () {
3785
3781
  var sectionObject, clientSectionMethods, clientSectionMethods_1, clientSectionMethods_1_1, clientSectionMethod;
3786
- var e_6, _g;
3787
- return __generator(this, function (_h) {
3782
+ var e_4, _j;
3783
+ return __generator(this, function (_k) {
3788
3784
  sectionObject = this.formStructure.getSectionObject(sectionCode);
3789
3785
  if (!sectionObject) {
3790
3786
  return [2 /*return*/];
@@ -3797,12 +3793,12 @@
3797
3793
  clientSectionMethod(sectionObject);
3798
3794
  }
3799
3795
  }
3800
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
3796
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
3801
3797
  finally {
3802
3798
  try {
3803
- if (clientSectionMethods_1_1 && !clientSectionMethods_1_1.done && (_g = clientSectionMethods_1.return)) _g.call(clientSectionMethods_1);
3799
+ if (clientSectionMethods_1_1 && !clientSectionMethods_1_1.done && (_j = clientSectionMethods_1.return)) _j.call(clientSectionMethods_1);
3804
3800
  }
3805
- finally { if (e_6) throw e_6.error; }
3801
+ finally { if (e_4) throw e_4.error; }
3806
3802
  }
3807
3803
  }
3808
3804
  return [2 /*return*/];
@@ -3812,8 +3808,8 @@
3812
3808
  BasicFormComponent.prototype.launchSectionInactivation = function (sectionCode) {
3813
3809
  return __awaiter(this, void 0, void 0, function () {
3814
3810
  var sectionObject, clientSectionMethods, clientSectionMethods_2, clientSectionMethods_2_1, clientSectionMethod;
3815
- var e_7, _g;
3816
- return __generator(this, function (_h) {
3811
+ var e_5, _j;
3812
+ return __generator(this, function (_k) {
3817
3813
  sectionObject = this.formStructure.getSectionObject(sectionCode);
3818
3814
  if (!sectionObject) {
3819
3815
  return [2 /*return*/];
@@ -3826,12 +3822,12 @@
3826
3822
  clientSectionMethod(sectionObject);
3827
3823
  }
3828
3824
  }
3829
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
3825
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
3830
3826
  finally {
3831
3827
  try {
3832
- if (clientSectionMethods_2_1 && !clientSectionMethods_2_1.done && (_g = clientSectionMethods_2.return)) _g.call(clientSectionMethods_2);
3828
+ if (clientSectionMethods_2_1 && !clientSectionMethods_2_1.done && (_j = clientSectionMethods_2.return)) _j.call(clientSectionMethods_2);
3833
3829
  }
3834
- finally { if (e_7) throw e_7.error; }
3830
+ finally { if (e_5) throw e_5.error; }
3835
3831
  }
3836
3832
  }
3837
3833
  return [2 /*return*/];
@@ -3841,9 +3837,9 @@
3841
3837
  BasicFormComponent.prototype.startAction = function (actionCode) {
3842
3838
  return __awaiter(this, void 0, void 0, function () {
3843
3839
  var actionObject, clientActionMethods, clientActionPromises, clientActionMethods_1, clientActionMethods_1_1, clientActionMethod, continueActionPromise, clientActionResults, continueAction;
3844
- var e_8, _g;
3845
- return __generator(this, function (_h) {
3846
- switch (_h.label) {
3840
+ var e_6, _j;
3841
+ return __generator(this, function (_k) {
3842
+ switch (_k.label) {
3847
3843
  case 0:
3848
3844
  actionObject = this.getAction(actionCode);
3849
3845
  if (!actionObject) {
@@ -3861,22 +3857,22 @@
3861
3857
  clientActionPromises.push(continueActionPromise);
3862
3858
  }
3863
3859
  }
3864
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
3860
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
3865
3861
  finally {
3866
3862
  try {
3867
- if (clientActionMethods_1_1 && !clientActionMethods_1_1.done && (_g = clientActionMethods_1.return)) _g.call(clientActionMethods_1);
3863
+ if (clientActionMethods_1_1 && !clientActionMethods_1_1.done && (_j = clientActionMethods_1.return)) _j.call(clientActionMethods_1);
3868
3864
  }
3869
- finally { if (e_8) throw e_8.error; }
3865
+ finally { if (e_6) throw e_6.error; }
3870
3866
  }
3871
3867
  return [4 /*yield*/, Promise.all(clientActionPromises)];
3872
3868
  case 1:
3873
- clientActionResults = _h.sent();
3869
+ clientActionResults = _k.sent();
3874
3870
  continueAction = clientActionResults.reduce(function (total, curr) { return (total && curr); }, true);
3875
3871
  if (!continueAction) {
3876
3872
  actionObject.stop();
3877
3873
  return [2 /*return*/];
3878
3874
  }
3879
- _h.label = 2;
3875
+ _k.label = 2;
3880
3876
  case 2:
3881
3877
  this.startServerAction(actionObject);
3882
3878
  return [2 /*return*/];
@@ -3887,8 +3883,8 @@
3887
3883
  BasicFormComponent.prototype.startServerAction = function (actionInput) {
3888
3884
  return __awaiter(this, void 0, void 0, function () {
3889
3885
  var action, finish, actionResult;
3890
- return __generator(this, function (_g) {
3891
- switch (_g.label) {
3886
+ return __generator(this, function (_j) {
3887
+ switch (_j.label) {
3892
3888
  case 0:
3893
3889
  action = (typeof actionInput === 'string')
3894
3890
  ? this.getAction(actionInput) : actionInput;
@@ -3897,19 +3893,19 @@
3897
3893
  if (!action.backend) return [3 /*break*/, 2];
3898
3894
  return [4 /*yield*/, this.requestFormAction(action.actionCode)];
3899
3895
  case 1:
3900
- actionResult = _g.sent();
3896
+ actionResult = _j.sent();
3901
3897
  finish = !this.errorOccured();
3902
- _g.label = 2;
3898
+ _j.label = 2;
3903
3899
  case 2:
3904
3900
  if (!finish) return [3 /*break*/, 4];
3905
3901
  return [4 /*yield*/, this.finishAction(action, actionResult)];
3906
3902
  case 3:
3907
- _g.sent();
3903
+ _j.sent();
3908
3904
  this.changeState(action.newState);
3909
3905
  return [3 /*break*/, 5];
3910
3906
  case 4:
3911
3907
  this.displayActionServerError();
3912
- _g.label = 5;
3908
+ _j.label = 5;
3913
3909
  case 5:
3914
3910
  action.stop();
3915
3911
  return [2 /*return*/];
@@ -3920,9 +3916,9 @@
3920
3916
  BasicFormComponent.prototype.finishAction = function (actionObject, actionResult) {
3921
3917
  return __awaiter(this, void 0, void 0, function () {
3922
3918
  var finishActionMethods, clientActionPromises, finishActionMethods_1, finishActionMethods_1_1, clientActionMethod;
3923
- var e_9, _g;
3924
- return __generator(this, function (_h) {
3925
- switch (_h.label) {
3919
+ var e_7, _j;
3920
+ return __generator(this, function (_k) {
3921
+ switch (_k.label) {
3926
3922
  case 0:
3927
3923
  finishActionMethods = this.formActionsFinish[actionObject.actionCode];
3928
3924
  if (!finishActionMethods) return [3 /*break*/, 2];
@@ -3933,17 +3929,17 @@
3933
3929
  clientActionPromises.push(clientActionMethod(actionObject, actionResult));
3934
3930
  }
3935
3931
  }
3936
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
3932
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
3937
3933
  finally {
3938
3934
  try {
3939
- if (finishActionMethods_1_1 && !finishActionMethods_1_1.done && (_g = finishActionMethods_1.return)) _g.call(finishActionMethods_1);
3935
+ if (finishActionMethods_1_1 && !finishActionMethods_1_1.done && (_j = finishActionMethods_1.return)) _j.call(finishActionMethods_1);
3940
3936
  }
3941
- finally { if (e_9) throw e_9.error; }
3937
+ finally { if (e_7) throw e_7.error; }
3942
3938
  }
3943
3939
  return [4 /*yield*/, Promise.all(clientActionPromises)];
3944
3940
  case 1:
3945
- _h.sent();
3946
- _h.label = 2;
3941
+ _k.sent();
3942
+ _k.label = 2;
3947
3943
  case 2: return [2 /*return*/];
3948
3944
  }
3949
3945
  });
@@ -3989,9 +3985,9 @@
3989
3985
  if (intrinsicValidation === void 0) { intrinsicValidation = true; }
3990
3986
  return __awaiter(this, void 0, void 0, function () {
3991
3987
  var fieldToValidate, validationCallbacks, clientValidationPromises, validationCallbacks_1, validationCallbacks_1_1, validationMethod, continueValidationPromise;
3992
- var e_10, _g;
3993
- return __generator(this, function (_h) {
3994
- switch (_h.label) {
3988
+ var e_8, _j;
3989
+ return __generator(this, function (_k) {
3990
+ switch (_k.label) {
3995
3991
  case 0:
3996
3992
  fieldToValidate = this.getFieldObject(fieldCode);
3997
3993
  if (!fieldToValidate) {
@@ -4009,17 +4005,17 @@
4009
4005
  clientValidationPromises.push(continueValidationPromise);
4010
4006
  }
4011
4007
  }
4012
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
4008
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
4013
4009
  finally {
4014
4010
  try {
4015
- if (validationCallbacks_1_1 && !validationCallbacks_1_1.done && (_g = validationCallbacks_1.return)) _g.call(validationCallbacks_1);
4011
+ if (validationCallbacks_1_1 && !validationCallbacks_1_1.done && (_j = validationCallbacks_1.return)) _j.call(validationCallbacks_1);
4016
4012
  }
4017
- finally { if (e_10) throw e_10.error; }
4013
+ finally { if (e_8) throw e_8.error; }
4018
4014
  }
4019
4015
  return [4 /*yield*/, Promise.all(clientValidationPromises)];
4020
4016
  case 1:
4021
- _h.sent();
4022
- _h.label = 2;
4017
+ _k.sent();
4018
+ _k.label = 2;
4023
4019
  case 2: return [2 /*return*/];
4024
4020
  }
4025
4021
  });
@@ -4029,9 +4025,9 @@
4029
4025
  if (intrinsicValidation === void 0) { intrinsicValidation = true; }
4030
4026
  return __awaiter(this, void 0, void 0, function () {
4031
4027
  var fieldToValidate, validationCallbacks, clientValidationPromises, validationCallbacks_2, validationCallbacks_2_1, validationMethod, clientValidationPromise, clientValidationResults, continueValidation;
4032
- var e_11, _g;
4033
- return __generator(this, function (_h) {
4034
- switch (_h.label) {
4028
+ var e_9, _j;
4029
+ return __generator(this, function (_k) {
4030
+ switch (_k.label) {
4035
4031
  case 0:
4036
4032
  fieldToValidate = this.getField(fieldCode);
4037
4033
  if (!fieldToValidate || !intrinsicValidation) {
@@ -4049,21 +4045,21 @@
4049
4045
  clientValidationPromises.push(clientValidationPromise);
4050
4046
  }
4051
4047
  }
4052
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
4048
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
4053
4049
  finally {
4054
4050
  try {
4055
- if (validationCallbacks_2_1 && !validationCallbacks_2_1.done && (_g = validationCallbacks_2.return)) _g.call(validationCallbacks_2);
4051
+ if (validationCallbacks_2_1 && !validationCallbacks_2_1.done && (_j = validationCallbacks_2.return)) _j.call(validationCallbacks_2);
4056
4052
  }
4057
- finally { if (e_11) throw e_11.error; }
4053
+ finally { if (e_9) throw e_9.error; }
4058
4054
  }
4059
4055
  return [4 /*yield*/, Promise.all(clientValidationPromises)];
4060
4056
  case 1:
4061
- clientValidationResults = _h.sent();
4057
+ clientValidationResults = _k.sent();
4062
4058
  continueValidation = clientValidationResults.reduce(function (total, curr) { return (total && curr); }, true);
4063
4059
  if (!continueValidation) {
4064
4060
  return [2 /*return*/];
4065
4061
  }
4066
- _h.label = 2;
4062
+ _k.label = 2;
4067
4063
  case 2:
4068
4064
  this.startServerFieldValidation(fieldToValidate);
4069
4065
  return [2 /*return*/];
@@ -4074,8 +4070,8 @@
4074
4070
  BasicFormComponent.prototype.startServerFieldValidation = function (inputField) {
4075
4071
  return __awaiter(this, void 0, void 0, function () {
4076
4072
  var fieldObj, finish, validationResult;
4077
- return __generator(this, function (_g) {
4078
- switch (_g.label) {
4073
+ return __generator(this, function (_j) {
4074
+ switch (_j.label) {
4079
4075
  case 0:
4080
4076
  fieldObj = (typeof inputField === 'string')
4081
4077
  ? this.getField(inputField) : inputField;
@@ -4086,20 +4082,20 @@
4086
4082
  return [4 /*yield*/, this
4087
4083
  .requestFormAction(formActions.validate, fieldObj.fieldCode)];
4088
4084
  case 1:
4089
- validationResult = _g.sent();
4085
+ validationResult = _j.sent();
4090
4086
  finish = !this.errorOccured();
4091
- _g.label = 2;
4087
+ _j.label = 2;
4092
4088
  case 2:
4093
4089
  if (!finish) return [3 /*break*/, 4];
4094
4090
  return [4 /*yield*/, this.finishFieldValidation(fieldObj, validationResult)];
4095
4091
  case 3:
4096
- _g.sent();
4092
+ _j.sent();
4097
4093
  return [3 /*break*/, 5];
4098
4094
  case 4:
4099
4095
  fieldObj.setErrorCode(this.errorCode);
4100
4096
  fieldObj.setErrorMessage(this.errorMessage);
4101
4097
  this.displayValidationServerError();
4102
- _g.label = 5;
4098
+ _j.label = 5;
4103
4099
  case 5:
4104
4100
  fieldObj.validating = false;
4105
4101
  return [2 /*return*/];
@@ -4110,9 +4106,9 @@
4110
4106
  BasicFormComponent.prototype.finishFieldValidation = function (fieldObject, validationResult) {
4111
4107
  return __awaiter(this, void 0, void 0, function () {
4112
4108
  var validationCallbacks, clientActionPromises, validationCallbacks_3, validationCallbacks_3_1, validationMethod;
4113
- var e_12, _g;
4114
- return __generator(this, function (_h) {
4115
- switch (_h.label) {
4109
+ var e_10, _j;
4110
+ return __generator(this, function (_k) {
4111
+ switch (_k.label) {
4116
4112
  case 0:
4117
4113
  validationCallbacks = this.fieldValidationsFinish[fieldObject.fieldCode];
4118
4114
  if (!validationCallbacks) return [3 /*break*/, 2];
@@ -4123,17 +4119,17 @@
4123
4119
  clientActionPromises.push(validationMethod(fieldObject, validationResult));
4124
4120
  }
4125
4121
  }
4126
- catch (e_12_1) { e_12 = { error: e_12_1 }; }
4122
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
4127
4123
  finally {
4128
4124
  try {
4129
- if (validationCallbacks_3_1 && !validationCallbacks_3_1.done && (_g = validationCallbacks_3.return)) _g.call(validationCallbacks_3);
4125
+ if (validationCallbacks_3_1 && !validationCallbacks_3_1.done && (_j = validationCallbacks_3.return)) _j.call(validationCallbacks_3);
4130
4126
  }
4131
- finally { if (e_12) throw e_12.error; }
4127
+ finally { if (e_10) throw e_10.error; }
4132
4128
  }
4133
4129
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4134
4130
  case 1:
4135
- _h.sent();
4136
- _h.label = 2;
4131
+ _k.sent();
4132
+ _k.label = 2;
4137
4133
  case 2: return [2 /*return*/];
4138
4134
  }
4139
4135
  });
@@ -4141,7 +4137,7 @@
4141
4137
  };
4142
4138
  BasicFormComponent.prototype.continueFieldValidation = function (fieldCode) {
4143
4139
  return __awaiter(this, void 0, void 0, function () {
4144
- return __generator(this, function (_g) {
4140
+ return __generator(this, function (_j) {
4145
4141
  return [2 /*return*/, this.startServerFieldValidation(fieldCode)];
4146
4142
  });
4147
4143
  });
@@ -4256,9 +4252,9 @@
4256
4252
  BasicFormComponent.prototype.startTableGlobalAction = function (tableActionEvent) {
4257
4253
  return __awaiter(this, void 0, void 0, function () {
4258
4254
  var tableCode, actionCode, tableObject, action, tableActionDetail, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_1, tableActionMethods_1_1, tableActionMethod, clientActionPromise, clientActionResults, continueAction;
4259
- var e_13, _g;
4260
- return __generator(this, function (_h) {
4261
- switch (_h.label) {
4255
+ var e_11, _j;
4256
+ return __generator(this, function (_k) {
4257
+ switch (_k.label) {
4262
4258
  case 0:
4263
4259
  tableCode = tableActionEvent.tableCode, actionCode = tableActionEvent.actionCode;
4264
4260
  tableObject = this.getTable(tableCode);
@@ -4287,21 +4283,21 @@
4287
4283
  clientActionPromises.push(clientActionPromise);
4288
4284
  }
4289
4285
  }
4290
- catch (e_13_1) { e_13 = { error: e_13_1 }; }
4286
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
4291
4287
  finally {
4292
4288
  try {
4293
- if (tableActionMethods_1_1 && !tableActionMethods_1_1.done && (_g = tableActionMethods_1.return)) _g.call(tableActionMethods_1);
4289
+ if (tableActionMethods_1_1 && !tableActionMethods_1_1.done && (_j = tableActionMethods_1.return)) _j.call(tableActionMethods_1);
4294
4290
  }
4295
- finally { if (e_13) throw e_13.error; }
4291
+ finally { if (e_11) throw e_11.error; }
4296
4292
  }
4297
4293
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4298
4294
  case 1:
4299
- clientActionResults = _h.sent();
4295
+ clientActionResults = _k.sent();
4300
4296
  continueAction = clientActionResults.reduce(function (total, curr) { return (total && curr); }, true);
4301
4297
  if (!continueAction) {
4302
4298
  return [2 /*return*/];
4303
4299
  }
4304
- _h.label = 2;
4300
+ _k.label = 2;
4305
4301
  case 2:
4306
4302
  this.startTableServerGlobalAction(tableActionDetail);
4307
4303
  return [2 /*return*/];
@@ -4312,8 +4308,8 @@
4312
4308
  BasicFormComponent.prototype.startTableServerGlobalAction = function (tableActionDetail) {
4313
4309
  return __awaiter(this, void 0, void 0, function () {
4314
4310
  var tableObject, action, tableCode, actionCode, finish, actionResult, actionSubject;
4315
- return __generator(this, function (_g) {
4316
- switch (_g.label) {
4311
+ return __generator(this, function (_j) {
4312
+ switch (_j.label) {
4317
4313
  case 0:
4318
4314
  tableObject = tableActionDetail.tableObject, action = tableActionDetail.action, tableCode = tableActionDetail.tableCode, actionCode = tableActionDetail.actionCode;
4319
4315
  if (!tableObject || !action) {
@@ -4331,19 +4327,19 @@
4331
4327
  return [4 /*yield*/, this
4332
4328
  .requestFormAction(formActions.tableAction, actionSubject)];
4333
4329
  case 1:
4334
- actionResult = _g.sent();
4330
+ actionResult = _j.sent();
4335
4331
  finish = !this.errorOccured();
4336
- _g.label = 2;
4332
+ _j.label = 2;
4337
4333
  case 2:
4338
4334
  if (!finish) return [3 /*break*/, 4];
4339
4335
  return [4 /*yield*/, this.finishTableGlobalAction(tableActionDetail, actionResult)];
4340
4336
  case 3:
4341
- _g.sent();
4337
+ _j.sent();
4342
4338
  this.changeState(action.newState);
4343
4339
  return [3 /*break*/, 5];
4344
4340
  case 4:
4345
4341
  this.displayTableServerError();
4346
- _g.label = 5;
4342
+ _j.label = 5;
4347
4343
  case 5:
4348
4344
  tableObject.freeWaiting();
4349
4345
  return [2 /*return*/];
@@ -4354,9 +4350,9 @@
4354
4350
  BasicFormComponent.prototype.finishTableGlobalAction = function (tableActionDetail, actionResult) {
4355
4351
  return __awaiter(this, void 0, void 0, function () {
4356
4352
  var tableCode, actionCode, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_2, tableActionMethods_2_1, tableActionMethod;
4357
- var e_14, _g;
4358
- return __generator(this, function (_h) {
4359
- switch (_h.label) {
4353
+ var e_12, _j;
4354
+ return __generator(this, function (_k) {
4355
+ switch (_k.label) {
4360
4356
  case 0:
4361
4357
  tableCode = tableActionDetail.tableCode, actionCode = tableActionDetail.actionCode;
4362
4358
  tableEventHandlers = this.tableActionsFinish[tableCode];
@@ -4369,17 +4365,17 @@
4369
4365
  clientActionPromises.push(tableActionMethod(tableActionDetail, actionResult));
4370
4366
  }
4371
4367
  }
4372
- catch (e_14_1) { e_14 = { error: e_14_1 }; }
4368
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
4373
4369
  finally {
4374
4370
  try {
4375
- if (tableActionMethods_2_1 && !tableActionMethods_2_1.done && (_g = tableActionMethods_2.return)) _g.call(tableActionMethods_2);
4371
+ if (tableActionMethods_2_1 && !tableActionMethods_2_1.done && (_j = tableActionMethods_2.return)) _j.call(tableActionMethods_2);
4376
4372
  }
4377
- finally { if (e_14) throw e_14.error; }
4373
+ finally { if (e_12) throw e_12.error; }
4378
4374
  }
4379
4375
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4380
4376
  case 1:
4381
- _h.sent();
4382
- _h.label = 2;
4377
+ _k.sent();
4378
+ _k.label = 2;
4383
4379
  case 2: return [2 /*return*/];
4384
4380
  }
4385
4381
  });
@@ -4388,9 +4384,9 @@
4388
4384
  BasicFormComponent.prototype.startTableAction = function (tableActionEvent) {
4389
4385
  return __awaiter(this, void 0, void 0, function () {
4390
4386
  var tableCode, actionCode, actionDetail, tableObject, recordId, recordData, action, tableActionDetail, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_3, tableActionMethods_3_1, tableActionMethod, clientActionPromise, clientActionResults, continueAction;
4391
- var e_15, _g;
4392
- return __generator(this, function (_h) {
4393
- switch (_h.label) {
4387
+ var e_13, _j;
4388
+ return __generator(this, function (_k) {
4389
+ switch (_k.label) {
4394
4390
  case 0:
4395
4391
  tableCode = tableActionEvent.tableCode, actionCode = tableActionEvent.actionCode, actionDetail = tableActionEvent.actionDetail;
4396
4392
  tableObject = this.getTable(tableCode);
@@ -4422,21 +4418,21 @@
4422
4418
  clientActionPromises.push(clientActionPromise);
4423
4419
  }
4424
4420
  }
4425
- catch (e_15_1) { e_15 = { error: e_15_1 }; }
4421
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
4426
4422
  finally {
4427
4423
  try {
4428
- if (tableActionMethods_3_1 && !tableActionMethods_3_1.done && (_g = tableActionMethods_3.return)) _g.call(tableActionMethods_3);
4424
+ if (tableActionMethods_3_1 && !tableActionMethods_3_1.done && (_j = tableActionMethods_3.return)) _j.call(tableActionMethods_3);
4429
4425
  }
4430
- finally { if (e_15) throw e_15.error; }
4426
+ finally { if (e_13) throw e_13.error; }
4431
4427
  }
4432
4428
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4433
4429
  case 1:
4434
- clientActionResults = _h.sent();
4430
+ clientActionResults = _k.sent();
4435
4431
  continueAction = clientActionResults.reduce(function (total, curr) { return (total && curr); }, true);
4436
4432
  if (!continueAction) {
4437
4433
  return [2 /*return*/];
4438
4434
  }
4439
- _h.label = 2;
4435
+ _k.label = 2;
4440
4436
  case 2:
4441
4437
  this.startTableServerAction(tableActionDetail);
4442
4438
  return [2 /*return*/];
@@ -4447,8 +4443,8 @@
4447
4443
  BasicFormComponent.prototype.startTableServerAction = function (tableActionDetail) {
4448
4444
  return __awaiter(this, void 0, void 0, function () {
4449
4445
  var tableObject, action, tableCode, actionCode, recordId, recordData, finish, actionResult, actionSubject;
4450
- return __generator(this, function (_g) {
4451
- switch (_g.label) {
4446
+ return __generator(this, function (_j) {
4447
+ switch (_j.label) {
4452
4448
  case 0:
4453
4449
  tableObject = tableActionDetail.tableObject, action = tableActionDetail.action, tableCode = tableActionDetail.tableCode, actionCode = tableActionDetail.actionCode, recordId = tableActionDetail.recordId, recordData = tableActionDetail.recordData;
4454
4450
  if (!tableObject || !action) {
@@ -4468,9 +4464,9 @@
4468
4464
  return [4 /*yield*/, this
4469
4465
  .requestFormAction(formActions.tableAction, actionSubject)];
4470
4466
  case 1:
4471
- actionResult = _g.sent();
4467
+ actionResult = _j.sent();
4472
4468
  finish = !this.errorOccured();
4473
- _g.label = 2;
4469
+ _j.label = 2;
4474
4470
  case 2:
4475
4471
  if (finish) {
4476
4472
  this.finishTableAction(tableActionDetail, actionResult);
@@ -4491,9 +4487,9 @@
4491
4487
  BasicFormComponent.prototype.finishTableAction = function (tableActionDetail, actionResult) {
4492
4488
  return __awaiter(this, void 0, void 0, function () {
4493
4489
  var tableCode, actionCode, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_4, tableActionMethods_4_1, tableActionMethod;
4494
- var e_16, _g;
4495
- return __generator(this, function (_h) {
4496
- switch (_h.label) {
4490
+ var e_14, _j;
4491
+ return __generator(this, function (_k) {
4492
+ switch (_k.label) {
4497
4493
  case 0:
4498
4494
  tableCode = tableActionDetail.tableCode, actionCode = tableActionDetail.actionCode;
4499
4495
  tableEventHandlers = this.tableActionsFinish[tableCode];
@@ -4506,17 +4502,17 @@
4506
4502
  clientActionPromises.push(tableActionMethod(tableActionDetail, actionResult));
4507
4503
  }
4508
4504
  }
4509
- catch (e_16_1) { e_16 = { error: e_16_1 }; }
4505
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
4510
4506
  finally {
4511
4507
  try {
4512
- if (tableActionMethods_4_1 && !tableActionMethods_4_1.done && (_g = tableActionMethods_4.return)) _g.call(tableActionMethods_4);
4508
+ if (tableActionMethods_4_1 && !tableActionMethods_4_1.done && (_j = tableActionMethods_4.return)) _j.call(tableActionMethods_4);
4513
4509
  }
4514
- finally { if (e_16) throw e_16.error; }
4510
+ finally { if (e_14) throw e_14.error; }
4515
4511
  }
4516
4512
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4517
4513
  case 1:
4518
- _h.sent();
4519
- _h.label = 2;
4514
+ _k.sent();
4515
+ _k.label = 2;
4520
4516
  case 2: return [2 /*return*/];
4521
4517
  }
4522
4518
  });
@@ -4525,9 +4521,9 @@
4525
4521
  BasicFormComponent.prototype.startTableRecordSelection = function (tableActionEvent) {
4526
4522
  return __awaiter(this, void 0, void 0, function () {
4527
4523
  var tableCode, actionDetail, tableObject, recordId, recordData, tableSelectionDetail, tableEventHandlers, clientActionPromises, tableEventHandlers_1, tableEventHandlers_1_1, tableSelectionMethod, clientActionPromise, clientActionResults, continueAction;
4528
- var e_17, _g;
4529
- return __generator(this, function (_h) {
4530
- switch (_h.label) {
4524
+ var e_15, _j;
4525
+ return __generator(this, function (_k) {
4526
+ switch (_k.label) {
4531
4527
  case 0:
4532
4528
  tableCode = tableActionEvent.tableCode, actionDetail = tableActionEvent.actionDetail;
4533
4529
  tableObject = this.getTable(tableCode);
@@ -4552,21 +4548,21 @@
4552
4548
  clientActionPromises.push(clientActionPromise);
4553
4549
  }
4554
4550
  }
4555
- catch (e_17_1) { e_17 = { error: e_17_1 }; }
4551
+ catch (e_15_1) { e_15 = { error: e_15_1 }; }
4556
4552
  finally {
4557
4553
  try {
4558
- if (tableEventHandlers_1_1 && !tableEventHandlers_1_1.done && (_g = tableEventHandlers_1.return)) _g.call(tableEventHandlers_1);
4554
+ if (tableEventHandlers_1_1 && !tableEventHandlers_1_1.done && (_j = tableEventHandlers_1.return)) _j.call(tableEventHandlers_1);
4559
4555
  }
4560
- finally { if (e_17) throw e_17.error; }
4556
+ finally { if (e_15) throw e_15.error; }
4561
4557
  }
4562
4558
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4563
4559
  case 1:
4564
- clientActionResults = _h.sent();
4560
+ clientActionResults = _k.sent();
4565
4561
  continueAction = clientActionResults.reduce(function (total, curr) { return (total && curr); }, true);
4566
4562
  if (!continueAction) {
4567
4563
  return [2 /*return*/];
4568
4564
  }
4569
- _h.label = 2;
4565
+ _k.label = 2;
4570
4566
  case 2:
4571
4567
  this.startTableServerRecordSelection(tableSelectionDetail);
4572
4568
  return [2 /*return*/];
@@ -4577,8 +4573,8 @@
4577
4573
  BasicFormComponent.prototype.startTableServerRecordSelection = function (tableSelectionDetail) {
4578
4574
  return __awaiter(this, void 0, void 0, function () {
4579
4575
  var tableObject, tableCode, recordId, recordData, finish, actionResult, actionSubject;
4580
- return __generator(this, function (_g) {
4581
- switch (_g.label) {
4576
+ return __generator(this, function (_j) {
4577
+ switch (_j.label) {
4582
4578
  case 0:
4583
4579
  tableObject = tableSelectionDetail.tableObject, tableCode = tableSelectionDetail.tableCode, recordId = tableSelectionDetail.recordId, recordData = tableSelectionDetail.recordData;
4584
4580
  if (!tableObject) {
@@ -4598,9 +4594,9 @@
4598
4594
  return [4 /*yield*/, this
4599
4595
  .requestFormAction(formActions.tableAction, actionSubject)];
4600
4596
  case 1:
4601
- actionResult = _g.sent();
4597
+ actionResult = _j.sent();
4602
4598
  finish = !this.errorOccured();
4603
- _g.label = 2;
4599
+ _j.label = 2;
4604
4600
  case 2:
4605
4601
  if (finish) {
4606
4602
  this.finishTableRecordSelection(tableSelectionDetail, actionResult);
@@ -4617,9 +4613,9 @@
4617
4613
  BasicFormComponent.prototype.finishTableRecordSelection = function (tableSelectionDetail, actionResult) {
4618
4614
  return __awaiter(this, void 0, void 0, function () {
4619
4615
  var tableCode, tableEventHandlers, clientActionPromises, tableEventHandlers_2, tableEventHandlers_2_1, tableSelectionMethod;
4620
- var e_18, _g;
4621
- return __generator(this, function (_h) {
4622
- switch (_h.label) {
4616
+ var e_16, _j;
4617
+ return __generator(this, function (_k) {
4618
+ switch (_k.label) {
4623
4619
  case 0:
4624
4620
  tableCode = tableSelectionDetail.tableCode;
4625
4621
  tableEventHandlers = this.tableSelectionsFinish[tableCode];
@@ -4631,17 +4627,17 @@
4631
4627
  clientActionPromises.push(tableSelectionMethod(tableSelectionDetail, actionResult));
4632
4628
  }
4633
4629
  }
4634
- catch (e_18_1) { e_18 = { error: e_18_1 }; }
4630
+ catch (e_16_1) { e_16 = { error: e_16_1 }; }
4635
4631
  finally {
4636
4632
  try {
4637
- if (tableEventHandlers_2_1 && !tableEventHandlers_2_1.done && (_g = tableEventHandlers_2.return)) _g.call(tableEventHandlers_2);
4633
+ if (tableEventHandlers_2_1 && !tableEventHandlers_2_1.done && (_j = tableEventHandlers_2.return)) _j.call(tableEventHandlers_2);
4638
4634
  }
4639
- finally { if (e_18) throw e_18.error; }
4635
+ finally { if (e_16) throw e_16.error; }
4640
4636
  }
4641
4637
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4642
4638
  case 1:
4643
- _h.sent();
4644
- _h.label = 2;
4639
+ _k.sent();
4640
+ _k.label = 2;
4645
4641
  case 2: return [2 /*return*/];
4646
4642
  }
4647
4643
  });
@@ -4650,9 +4646,9 @@
4650
4646
  BasicFormComponent.prototype.startTableSelectionAction = function (tableActionEvent) {
4651
4647
  return __awaiter(this, void 0, void 0, function () {
4652
4648
  var tableCode, actionCode, actionDetail, tableObject, selectedRecords, action, tableActionDetail, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_5, tableActionMethods_5_1, tableActionMethod, clientActionPromise, clientActionResults, continueAction;
4653
- var e_19, _g;
4654
- return __generator(this, function (_h) {
4655
- switch (_h.label) {
4649
+ var e_17, _j;
4650
+ return __generator(this, function (_k) {
4651
+ switch (_k.label) {
4656
4652
  case 0:
4657
4653
  tableCode = tableActionEvent.tableCode, actionCode = tableActionEvent.actionCode, actionDetail = tableActionEvent.actionDetail;
4658
4654
  tableObject = this.getTable(tableCode);
@@ -4683,21 +4679,21 @@
4683
4679
  clientActionPromises.push(clientActionPromise);
4684
4680
  }
4685
4681
  }
4686
- catch (e_19_1) { e_19 = { error: e_19_1 }; }
4682
+ catch (e_17_1) { e_17 = { error: e_17_1 }; }
4687
4683
  finally {
4688
4684
  try {
4689
- if (tableActionMethods_5_1 && !tableActionMethods_5_1.done && (_g = tableActionMethods_5.return)) _g.call(tableActionMethods_5);
4685
+ if (tableActionMethods_5_1 && !tableActionMethods_5_1.done && (_j = tableActionMethods_5.return)) _j.call(tableActionMethods_5);
4690
4686
  }
4691
- finally { if (e_19) throw e_19.error; }
4687
+ finally { if (e_17) throw e_17.error; }
4692
4688
  }
4693
4689
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4694
4690
  case 1:
4695
- clientActionResults = _h.sent();
4691
+ clientActionResults = _k.sent();
4696
4692
  continueAction = clientActionResults.reduce(function (total, curr) { return (total && curr); }, true);
4697
4693
  if (!continueAction) {
4698
4694
  return [2 /*return*/];
4699
4695
  }
4700
- _h.label = 2;
4696
+ _k.label = 2;
4701
4697
  case 2:
4702
4698
  this.startTableServerSelectionAction(tableActionDetail);
4703
4699
  return [2 /*return*/];
@@ -4708,8 +4704,8 @@
4708
4704
  BasicFormComponent.prototype.startTableServerSelectionAction = function (tableActionDetail) {
4709
4705
  return __awaiter(this, void 0, void 0, function () {
4710
4706
  var tableObject, action, tableCode, actionCode, selectedRecords, finish, actionResult, actionSubject;
4711
- return __generator(this, function (_g) {
4712
- switch (_g.label) {
4707
+ return __generator(this, function (_j) {
4708
+ switch (_j.label) {
4713
4709
  case 0:
4714
4710
  tableObject = tableActionDetail.tableObject, action = tableActionDetail.action, tableCode = tableActionDetail.tableCode, actionCode = tableActionDetail.actionCode, selectedRecords = tableActionDetail.selectedRecords;
4715
4711
  if (!tableObject || !action) {
@@ -4728,9 +4724,9 @@
4728
4724
  return [4 /*yield*/, this
4729
4725
  .requestFormAction(formActions.tableAction, actionSubject)];
4730
4726
  case 1:
4731
- actionResult = _g.sent();
4727
+ actionResult = _j.sent();
4732
4728
  finish = !this.errorOccured();
4733
- _g.label = 2;
4729
+ _j.label = 2;
4734
4730
  case 2:
4735
4731
  if (finish) {
4736
4732
  this.finishTableSelectionAction(tableActionDetail, actionResult);
@@ -4748,9 +4744,9 @@
4748
4744
  BasicFormComponent.prototype.finishTableSelectionAction = function (tableActionDetail, actionResult) {
4749
4745
  return __awaiter(this, void 0, void 0, function () {
4750
4746
  var tableCode, actionCode, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_6, tableActionMethods_6_1, tableActionMethod;
4751
- var e_20, _g;
4752
- return __generator(this, function (_h) {
4753
- switch (_h.label) {
4747
+ var e_18, _j;
4748
+ return __generator(this, function (_k) {
4749
+ switch (_k.label) {
4754
4750
  case 0:
4755
4751
  tableCode = tableActionDetail.tableCode, actionCode = tableActionDetail.actionCode;
4756
4752
  tableEventHandlers = this.tableActionsFinish[tableCode];
@@ -4763,17 +4759,17 @@
4763
4759
  clientActionPromises.push(tableActionMethod(tableActionDetail, actionResult));
4764
4760
  }
4765
4761
  }
4766
- catch (e_20_1) { e_20 = { error: e_20_1 }; }
4762
+ catch (e_18_1) { e_18 = { error: e_18_1 }; }
4767
4763
  finally {
4768
4764
  try {
4769
- if (tableActionMethods_6_1 && !tableActionMethods_6_1.done && (_g = tableActionMethods_6.return)) _g.call(tableActionMethods_6);
4765
+ if (tableActionMethods_6_1 && !tableActionMethods_6_1.done && (_j = tableActionMethods_6.return)) _j.call(tableActionMethods_6);
4770
4766
  }
4771
- finally { if (e_20) throw e_20.error; }
4767
+ finally { if (e_18) throw e_18.error; }
4772
4768
  }
4773
4769
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4774
4770
  case 1:
4775
- _h.sent();
4776
- _h.label = 2;
4771
+ _k.sent();
4772
+ _k.label = 2;
4777
4773
  case 2: return [2 /*return*/];
4778
4774
  }
4779
4775
  });
@@ -4782,9 +4778,9 @@
4782
4778
  BasicFormComponent.prototype.startTableGetData = function (tableActionEvent) {
4783
4779
  return __awaiter(this, void 0, void 0, function () {
4784
4780
  var tableCode, tableObject, tableActionDetail, tableEventHandlers, clientActionPromises, tableEventHandlers_3, tableEventHandlers_3_1, tableActionMethod, clientActionPromise, clientActionResults, continueAction;
4785
- var e_21, _g;
4786
- return __generator(this, function (_h) {
4787
- switch (_h.label) {
4781
+ var e_19, _j;
4782
+ return __generator(this, function (_k) {
4783
+ switch (_k.label) {
4788
4784
  case 0:
4789
4785
  tableCode = tableActionEvent.tableCode;
4790
4786
  tableObject = this.getTable(tableCode);
@@ -4803,21 +4799,21 @@
4803
4799
  clientActionPromises.push(clientActionPromise);
4804
4800
  }
4805
4801
  }
4806
- catch (e_21_1) { e_21 = { error: e_21_1 }; }
4802
+ catch (e_19_1) { e_19 = { error: e_19_1 }; }
4807
4803
  finally {
4808
4804
  try {
4809
- if (tableEventHandlers_3_1 && !tableEventHandlers_3_1.done && (_g = tableEventHandlers_3.return)) _g.call(tableEventHandlers_3);
4805
+ if (tableEventHandlers_3_1 && !tableEventHandlers_3_1.done && (_j = tableEventHandlers_3.return)) _j.call(tableEventHandlers_3);
4810
4806
  }
4811
- finally { if (e_21) throw e_21.error; }
4807
+ finally { if (e_19) throw e_19.error; }
4812
4808
  }
4813
4809
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4814
4810
  case 1:
4815
- clientActionResults = _h.sent();
4811
+ clientActionResults = _k.sent();
4816
4812
  continueAction = clientActionResults.reduce(function (total, curr) { return (total && curr); }, true);
4817
4813
  if (!continueAction) {
4818
4814
  return [2 /*return*/];
4819
4815
  }
4820
- _h.label = 2;
4816
+ _k.label = 2;
4821
4817
  case 2:
4822
4818
  this.startTableServerGetData(tableActionDetail);
4823
4819
  return [2 /*return*/];
@@ -4828,8 +4824,8 @@
4828
4824
  BasicFormComponent.prototype.startTableServerGetData = function (tableActionDetail) {
4829
4825
  return __awaiter(this, void 0, void 0, function () {
4830
4826
  var tableObject, tableCode, actionSubject, actionResult;
4831
- return __generator(this, function (_g) {
4832
- switch (_g.label) {
4827
+ return __generator(this, function (_j) {
4828
+ switch (_j.label) {
4833
4829
  case 0:
4834
4830
  tableObject = tableActionDetail.tableObject, tableCode = tableActionDetail.tableCode;
4835
4831
  tableObject.putOnWait();
@@ -4837,7 +4833,7 @@
4837
4833
  return [4 /*yield*/, this
4838
4834
  .requestFormAction(formActions.getTableData, actionSubject)];
4839
4835
  case 1:
4840
- actionResult = _g.sent();
4836
+ actionResult = _j.sent();
4841
4837
  if (this.errorOccured()) {
4842
4838
  this.displayTableServerError();
4843
4839
  }
@@ -4853,9 +4849,9 @@
4853
4849
  BasicFormComponent.prototype.finishTableGetData = function (tableActionDetail, actionResult) {
4854
4850
  return __awaiter(this, void 0, void 0, function () {
4855
4851
  var tableCode, tableActionCode, tableEventHandlers, tableActionMethods, clientActionPromises, tableActionMethods_7, tableActionMethods_7_1, tableActionMethod;
4856
- var e_22, _g;
4857
- return __generator(this, function (_h) {
4858
- switch (_h.label) {
4852
+ var e_20, _j;
4853
+ return __generator(this, function (_k) {
4854
+ switch (_k.label) {
4859
4855
  case 0:
4860
4856
  tableCode = tableActionDetail.tableCode, tableActionCode = tableActionDetail.tableActionCode;
4861
4857
  tableEventHandlers = this.tableActionsFinish[tableCode];
@@ -4868,17 +4864,17 @@
4868
4864
  clientActionPromises.push(tableActionMethod(tableActionDetail, actionResult));
4869
4865
  }
4870
4866
  }
4871
- catch (e_22_1) { e_22 = { error: e_22_1 }; }
4867
+ catch (e_20_1) { e_20 = { error: e_20_1 }; }
4872
4868
  finally {
4873
4869
  try {
4874
- if (tableActionMethods_7_1 && !tableActionMethods_7_1.done && (_g = tableActionMethods_7.return)) _g.call(tableActionMethods_7);
4870
+ if (tableActionMethods_7_1 && !tableActionMethods_7_1.done && (_j = tableActionMethods_7.return)) _j.call(tableActionMethods_7);
4875
4871
  }
4876
- finally { if (e_22) throw e_22.error; }
4872
+ finally { if (e_20) throw e_20.error; }
4877
4873
  }
4878
4874
  return [4 /*yield*/, Promise.all(clientActionPromises)];
4879
4875
  case 1:
4880
- _h.sent();
4881
- _h.label = 2;
4876
+ _k.sent();
4877
+ _k.label = 2;
4882
4878
  case 2: return [2 /*return*/];
4883
4879
  }
4884
4880
  });
@@ -4886,12 +4882,12 @@
4886
4882
  };
4887
4883
  BasicFormComponent.prototype.checkSectionRequiredFields = function (sectionCode, reqFieldMessage) {
4888
4884
  this.cleanErrorFields(null, sectionCode);
4889
- var requiredFieldMessage = reqFieldMessage || REQUIRED_FIELD_MESSAGE;
4885
+ var requiredFieldMessage = reqFieldMessage !== null && reqFieldMessage !== void 0 ? reqFieldMessage : this.formConfig.formStandardErrors.requiredField;
4890
4886
  var numErrors = this.tagFieldsWithError(this.getRequiredEmptyFields(null, sectionCode), null, requiredFieldMessage);
4891
4887
  return (numErrors === 0);
4892
4888
  };
4893
4889
  BasicFormComponent.prototype.validateSectionConsistency = function (sectionCode, reqFieldMessage) {
4894
- var e_23, _g, e_24, _h;
4890
+ var e_21, _j, e_22, _k;
4895
4891
  this.resetError();
4896
4892
  var completeFields = this.checkSectionRequiredFields(sectionCode, reqFieldMessage);
4897
4893
  if (!completeFields) {
@@ -4915,12 +4911,12 @@
4915
4911
  }
4916
4912
  }
4917
4913
  }
4918
- catch (e_23_1) { e_23 = { error: e_23_1 }; }
4914
+ catch (e_21_1) { e_21 = { error: e_21_1 }; }
4919
4915
  finally {
4920
4916
  try {
4921
- if (requiredEmptyFields_1_1 && !requiredEmptyFields_1_1.done && (_g = requiredEmptyFields_1.return)) _g.call(requiredEmptyFields_1);
4917
+ if (requiredEmptyFields_1_1 && !requiredEmptyFields_1_1.done && (_j = requiredEmptyFields_1.return)) _j.call(requiredEmptyFields_1);
4922
4918
  }
4923
- finally { if (e_23) throw e_23.error; }
4919
+ finally { if (e_21) throw e_21.error; }
4924
4920
  }
4925
4921
  }
4926
4922
  var validationIssueFields = this.getFieldsWithValidationIssues(null, sectionCode);
@@ -4938,18 +4934,18 @@
4938
4934
  }
4939
4935
  }
4940
4936
  }
4941
- catch (e_24_1) { e_24 = { error: e_24_1 }; }
4937
+ catch (e_22_1) { e_22 = { error: e_22_1 }; }
4942
4938
  finally {
4943
4939
  try {
4944
- if (validationIssueFields_1_1 && !validationIssueFields_1_1.done && (_h = validationIssueFields_1.return)) _h.call(validationIssueFields_1);
4940
+ if (validationIssueFields_1_1 && !validationIssueFields_1_1.done && (_k = validationIssueFields_1.return)) _k.call(validationIssueFields_1);
4945
4941
  }
4946
- finally { if (e_24) throw e_24.error; }
4942
+ finally { if (e_22) throw e_22.error; }
4947
4943
  }
4948
4944
  }
4949
4945
  return validationError;
4950
4946
  };
4951
4947
  BasicFormComponent.prototype.copyTableRecordToFields = function (tableObj, mappingTable) {
4952
- var e_25, _g;
4948
+ var e_23, _j;
4953
4949
  if (mappingTable === void 0) { mappingTable = null; }
4954
4950
  var _a, _b;
4955
4951
  var tableObject = this.getTable(tableObj.tableCode);
@@ -4963,12 +4959,12 @@
4963
4959
  this.setFieldValue(fieldCode, columnValue);
4964
4960
  }
4965
4961
  }
4966
- catch (e_25_1) { e_25 = { error: e_25_1 }; }
4962
+ catch (e_23_1) { e_23 = { error: e_23_1 }; }
4967
4963
  finally {
4968
4964
  try {
4969
- if (columnNames_1_1 && !columnNames_1_1.done && (_g = columnNames_1.return)) _g.call(columnNames_1);
4965
+ if (columnNames_1_1 && !columnNames_1_1.done && (_j = columnNames_1.return)) _j.call(columnNames_1);
4970
4966
  }
4971
- finally { if (e_25) throw e_25.error; }
4967
+ finally { if (e_23) throw e_23.error; }
4972
4968
  }
4973
4969
  return true;
4974
4970
  };
@@ -4976,7 +4972,7 @@
4976
4972
  * Soporte registros en tablas que se editan en campos del formulario
4977
4973
  */
4978
4974
  BasicFormComponent.prototype.defineEditionTable = function (tableEditionDef) {
4979
- var e_26, _g;
4975
+ var e_24, _j;
4980
4976
  var _this = this;
4981
4977
  var columnFieldMapping = tableEditionDef.columnFieldMapping, recordCaptureFields = tableEditionDef.recordCaptureFields, startCollapsed = tableEditionDef.startCollapsed;
4982
4978
  tableEditionDef.startCollapsed = (typeof startCollapsed !== 'undefined')
@@ -4986,17 +4982,17 @@
4986
4982
  try {
4987
4983
  for (var columnFieldMapping_1 = __values(columnFieldMapping), columnFieldMapping_1_1 = columnFieldMapping_1.next(); !columnFieldMapping_1_1.done; columnFieldMapping_1_1 = columnFieldMapping_1.next()) {
4988
4984
  var columnMap = columnFieldMapping_1_1.value;
4989
- var _h = __read(columnMap, 2), columnName = _h[0], formField = _h[1];
4985
+ var _k = __read(columnMap, 2), columnName = _k[0], formField = _k[1];
4990
4986
  fieldsMappingTable[columnName] = formField;
4991
4987
  fieldsToClear.push(formField);
4992
4988
  }
4993
4989
  }
4994
- catch (e_26_1) { e_26 = { error: e_26_1 }; }
4990
+ catch (e_24_1) { e_24 = { error: e_24_1 }; }
4995
4991
  finally {
4996
4992
  try {
4997
- if (columnFieldMapping_1_1 && !columnFieldMapping_1_1.done && (_g = columnFieldMapping_1.return)) _g.call(columnFieldMapping_1);
4993
+ if (columnFieldMapping_1_1 && !columnFieldMapping_1_1.done && (_j = columnFieldMapping_1.return)) _j.call(columnFieldMapping_1);
4998
4994
  }
4999
- finally { if (e_26) throw e_26.error; }
4995
+ finally { if (e_24) throw e_24.error; }
5000
4996
  }
5001
4997
  tableEditionDef.fieldsMappingTable = fieldsMappingTable;
5002
4998
  tableEditionDef.fieldsToClear = fieldsToClear;
@@ -5047,7 +5043,7 @@
5047
5043
  }
5048
5044
  };
5049
5045
  BasicFormComponent.prototype.enableRecordEdition = function (tableEditionDef, tableActionObject) {
5050
- var e_27, _g;
5046
+ var e_25, _j;
5051
5047
  if (tableActionObject === void 0) { tableActionObject = null; }
5052
5048
  if (tableActionObject) {
5053
5049
  this.copyTableRecordToFields(tableActionObject, tableEditionDef.fieldsMappingTable);
@@ -5059,17 +5055,17 @@
5059
5055
  if (tableEditionDef.fieldsToTriggerValidation
5060
5056
  && tableEditionDef.fieldsToTriggerValidation.length > 0) {
5061
5057
  try {
5062
- for (var _h = __values(tableEditionDef.fieldsToTriggerValidation), _j = _h.next(); !_j.done; _j = _h.next()) {
5063
- var fieldName = _j.value;
5058
+ for (var _k = __values(tableEditionDef.fieldsToTriggerValidation), _l = _k.next(); !_l.done; _l = _k.next()) {
5059
+ var fieldName = _l.value;
5064
5060
  this.startFieldValidation(fieldName);
5065
5061
  }
5066
5062
  }
5067
- catch (e_27_1) { e_27 = { error: e_27_1 }; }
5063
+ catch (e_25_1) { e_25 = { error: e_25_1 }; }
5068
5064
  finally {
5069
5065
  try {
5070
- if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
5066
+ if (_l && !_l.done && (_j = _k.return)) _j.call(_k);
5071
5067
  }
5072
- finally { if (e_27) throw e_27.error; }
5068
+ finally { if (e_25) throw e_25.error; }
5073
5069
  }
5074
5070
  }
5075
5071
  return true;