tuain-ng-forms-lib 12.0.20 → 12.0.24
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/README.md +3 -3
- package/bundles/tuain-ng-forms-lib.umd.js +484 -632
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/action.js +3 -4
- package/esm2015/lib/classes/forms/element.js +12 -2
- package/esm2015/lib/classes/forms/field.js +9 -21
- package/esm2015/lib/classes/forms/form.js +153 -236
- package/esm2015/lib/classes/forms/section.js +7 -1
- package/esm2015/lib/classes/forms/table/row-data.js +6 -26
- package/esm2015/lib/classes/forms/table/table.js +3 -4
- package/esm2015/lib/components/elements/layout/element.component.js +9 -8
- package/esm2015/lib/components/elements/tables/table.component.js +31 -31
- package/esm2015/lib/components/forms/basic-form.js +141 -138
- package/fesm2015/tuain-ng-forms-lib.js +363 -512
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/action.d.ts +0 -2
- package/lib/classes/forms/element.d.ts +10 -0
- package/lib/classes/forms/field.d.ts +0 -3
- package/lib/classes/forms/form.d.ts +53 -55
- package/lib/classes/forms/section.d.ts +5 -0
- package/lib/classes/forms/table/row-data.d.ts +0 -1
- package/lib/classes/forms/table/table.d.ts +0 -1
- package/lib/components/elements/layout/element.component.d.ts +3 -2
- package/lib/components/elements/tables/table.component.d.ts +1 -1
- package/lib/components/forms/basic-form.d.ts +130 -93
- package/package.json +1 -1
- package/tuain-ng-forms-lib.metadata.json +1 -1
- package/esm2015/lib/classes/utilities.js +0 -54
- package/lib/classes/utilities.d.ts +0 -1
|
@@ -485,22 +485,22 @@
|
|
|
485
485
|
}
|
|
486
486
|
ElementComponent.prototype.ngOnInit = function () {
|
|
487
487
|
var _a;
|
|
488
|
-
this.formConfig = (_a = this.
|
|
488
|
+
this.formConfig = (_a = this.element) === null || _a === void 0 ? void 0 : _a._formConfig;
|
|
489
489
|
this.start();
|
|
490
490
|
};
|
|
491
491
|
ElementComponent.prototype.start = function () { };
|
|
492
492
|
Object.defineProperty(ElementComponent.prototype, "visible", {
|
|
493
493
|
get: function () {
|
|
494
|
-
var _a
|
|
495
|
-
return (_a = this.
|
|
494
|
+
var _a;
|
|
495
|
+
return (_a = this.element) === null || _a === void 0 ? void 0 : _a.visibleOn(this.currentState);
|
|
496
496
|
},
|
|
497
497
|
enumerable: false,
|
|
498
498
|
configurable: true
|
|
499
499
|
});
|
|
500
500
|
Object.defineProperty(ElementComponent.prototype, "disabled", {
|
|
501
501
|
get: function () {
|
|
502
|
-
var _a
|
|
503
|
-
return !((_a = this.
|
|
502
|
+
var _a;
|
|
503
|
+
return !((_a = this.element) === null || _a === void 0 ? void 0 : _a.enabledOn(this.currentState));
|
|
504
504
|
},
|
|
505
505
|
enumerable: false,
|
|
506
506
|
configurable: true
|
|
@@ -514,8 +514,9 @@
|
|
|
514
514
|
},] }
|
|
515
515
|
];
|
|
516
516
|
ElementComponent.propDecorators = {
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
element: [{ type: core.Input }],
|
|
518
|
+
form: [{ type: core.Input }],
|
|
519
|
+
currentState: [{ type: core.Input }]
|
|
519
520
|
};
|
|
520
521
|
|
|
521
522
|
var FormErrorComponent = /** @class */ (function () {
|
|
@@ -647,7 +648,7 @@
|
|
|
647
648
|
|
|
648
649
|
var FormElement = /** @class */ (function () {
|
|
649
650
|
function FormElement(elementDefinition, formConfig) {
|
|
650
|
-
var _a, _b;
|
|
651
|
+
var _a, _b, _c;
|
|
651
652
|
this._formConfig = formConfig;
|
|
652
653
|
this._isForced = false;
|
|
653
654
|
this.setVisibleStates(elementDefinition.visibleStates);
|
|
@@ -656,7 +657,11 @@
|
|
|
656
657
|
this.disabled = (_a = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.disabled) !== null && _a !== void 0 ? _a : false;
|
|
657
658
|
this.setVisibility((_b = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.visible) !== null && _b !== void 0 ? _b : true);
|
|
658
659
|
this.widget = null;
|
|
660
|
+
this.customAttributes = (_c = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.customAttributes) !== null && _c !== void 0 ? _c : null;
|
|
659
661
|
}
|
|
662
|
+
FormElement.prototype.getCustomAttribute = function (name) { var _a, _b; return (_b = (_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null; };
|
|
663
|
+
FormElement.prototype.setCustomAttribute = function (name, value) { return name && (this.customAttributes[name] = value); };
|
|
664
|
+
FormElement.prototype.matchAttribute = function (name, value) { var _a; return ((_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) === value; };
|
|
660
665
|
FormElement.prototype.isField = function () { return this.elementType === elementTypes.field; };
|
|
661
666
|
FormElement.prototype.isAction = function () { return this.elementType === elementTypes.action; };
|
|
662
667
|
FormElement.prototype.isTable = function () { return this.elementType === elementTypes.table; };
|
|
@@ -674,7 +679,13 @@
|
|
|
674
679
|
};
|
|
675
680
|
FormElement.prototype.viewOnState = function (state) { return (this.visibleStates && state) ? this.visibleStates.includes(state) : false; };
|
|
676
681
|
FormElement.prototype.enabledOnState = function (state) { return (this.enabledStates && state) ? this.enabledStates.includes(state) : false; };
|
|
682
|
+
/**
|
|
683
|
+
* @deprecated Utilizar viewOnState
|
|
684
|
+
*/
|
|
677
685
|
FormElement.prototype.supportState = function (state) { return this.viewOnState(state); };
|
|
686
|
+
/**
|
|
687
|
+
* @deprecated Utilizar viewOnState
|
|
688
|
+
*/
|
|
678
689
|
FormElement.prototype.supportMode = function (state) { return this.viewOnState(state); };
|
|
679
690
|
Object.defineProperty(FormElement.prototype, "visible", {
|
|
680
691
|
get: function () { return (this._isForced) ? this._visibleForced : this._visible; },
|
|
@@ -767,62 +778,6 @@
|
|
|
767
778
|
return TableAction;
|
|
768
779
|
}());
|
|
769
780
|
|
|
770
|
-
function formatCurrency(inputValue) {
|
|
771
|
-
if (!inputValue) {
|
|
772
|
-
return null;
|
|
773
|
-
}
|
|
774
|
-
var numeralDecimalMark = '.';
|
|
775
|
-
var numeralPositiveOnly = false;
|
|
776
|
-
var stripLeadingZeroes = true;
|
|
777
|
-
var numeralIntegerScale = 12;
|
|
778
|
-
var numeralDecimalScale = 2;
|
|
779
|
-
var delimiter = ',';
|
|
780
|
-
var parts;
|
|
781
|
-
var partInteger;
|
|
782
|
-
var partDecimal = '';
|
|
783
|
-
// Se eliminan los caracteres alfabéticos
|
|
784
|
-
var outputValue = inputValue.toString();
|
|
785
|
-
if (!outputValue) {
|
|
786
|
-
return;
|
|
787
|
-
}
|
|
788
|
-
/**
|
|
789
|
-
* Se remplaza el primer caracter de marca decimal con el marcador reservado
|
|
790
|
-
* Se eliminan los caractertes no numéricos excepto el signo menos y 'M'
|
|
791
|
-
* utilizado como separador decimal en este punto, eliminando los prefijos
|
|
792
|
-
* Se remplaza el caracter menos por un marcador resertvado
|
|
793
|
-
* Se eliminan todos los demás caracteres menos en caso de estar presentes
|
|
794
|
-
* Se remplaza el marcador de caracter menos (si está presente)
|
|
795
|
-
* Se remplaza el marcador de separación decimal
|
|
796
|
-
*/
|
|
797
|
-
var value = outputValue.replace(/[A-Za-z]/g, '')
|
|
798
|
-
.replace(numeralDecimalMark, 'M')
|
|
799
|
-
.replace(/[^\dM-]/g, '')
|
|
800
|
-
.replace(/^\-/, 'N')
|
|
801
|
-
.replace(/\-/g, '')
|
|
802
|
-
.replace('N', numeralPositiveOnly ? '' : '-')
|
|
803
|
-
.replace('M', numeralDecimalMark);
|
|
804
|
-
// Se eliminan los ceros a la izquierda
|
|
805
|
-
if (stripLeadingZeroes) {
|
|
806
|
-
value = value.replace(/^(-)?0+(?=\d)/, '$1');
|
|
807
|
-
}
|
|
808
|
-
// Se separa la parte entera de la parte decimal
|
|
809
|
-
partInteger = value;
|
|
810
|
-
if (value.indexOf(numeralDecimalMark) >= 0) {
|
|
811
|
-
parts = value.split(numeralDecimalMark);
|
|
812
|
-
partInteger = parts[0];
|
|
813
|
-
partDecimal = numeralDecimalMark + parts[1].slice(0, numeralDecimalScale);
|
|
814
|
-
}
|
|
815
|
-
if (numeralIntegerScale > 0) {
|
|
816
|
-
partInteger = partInteger.slice(0, numeralIntegerScale + (value.slice(0, 1) === '-' ? 1 : 0));
|
|
817
|
-
}
|
|
818
|
-
// Se separan los digitos de acuerdo a la configuraciñon de agrupación
|
|
819
|
-
partInteger = partInteger.replace(/(\d)(?=(\d{3})+$)/g, '$1' + delimiter);
|
|
820
|
-
outputValue = partInteger.toString() + (numeralDecimalScale > 0 ? partDecimal.toString() : '');
|
|
821
|
-
return outputValue;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
var DATE_TYPE = 'DATE';
|
|
825
|
-
var CURRENCY_TYPE = 'CURRENCY';
|
|
826
781
|
var TableRecordData = /** @class */ (function () {
|
|
827
782
|
function TableRecordData(recordReceived, recordDefinition, selectionFieldName) {
|
|
828
783
|
var _this = this;
|
|
@@ -841,8 +796,7 @@
|
|
|
841
796
|
rawRecordData.forEach(function (fieldData) {
|
|
842
797
|
var fieldCode = fieldData.fieldCode, fieldValue = fieldData.fieldValue;
|
|
843
798
|
var fieldDef = recordDefinition.find(function (column) { return column.fieldCode === fieldCode; });
|
|
844
|
-
|
|
845
|
-
_this.recordData[fieldCode] = formattedFieldValue;
|
|
799
|
+
_this.recordData[fieldCode] = fieldValue !== null && fieldValue !== void 0 ? fieldValue : '';
|
|
846
800
|
if (fieldCode === selectionFieldName) {
|
|
847
801
|
_this.selected = fieldValue;
|
|
848
802
|
}
|
|
@@ -853,29 +807,13 @@
|
|
|
853
807
|
fields.forEach(function (fieldCode) {
|
|
854
808
|
var fieldValue = recordData[fieldCode];
|
|
855
809
|
var fieldDef = recordDefinition.find(function (column) { return column.fieldCode === fieldCode; });
|
|
856
|
-
|
|
857
|
-
_this.recordData[fieldCode] = formattedFieldValue;
|
|
810
|
+
_this.recordData[fieldCode] = fieldValue !== null && fieldValue !== void 0 ? fieldValue : '';
|
|
858
811
|
});
|
|
859
812
|
}
|
|
860
813
|
}
|
|
861
|
-
TableRecordData.prototype.
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
}
|
|
865
|
-
else if (fieldType === DATE_TYPE && fieldValue) {
|
|
866
|
-
return new Date(fieldValue).toISOString().split('T')[0];
|
|
867
|
-
}
|
|
868
|
-
return fieldValue || '';
|
|
869
|
-
};
|
|
870
|
-
TableRecordData.prototype.toggleSelect = function () {
|
|
871
|
-
this.selected = !this.selected;
|
|
872
|
-
};
|
|
873
|
-
TableRecordData.prototype.select = function () {
|
|
874
|
-
this.selected = true;
|
|
875
|
-
};
|
|
876
|
-
TableRecordData.prototype.unselect = function () {
|
|
877
|
-
this.selected = false;
|
|
878
|
-
};
|
|
814
|
+
TableRecordData.prototype.toggleSelect = function () { this.selected = !this.selected; };
|
|
815
|
+
TableRecordData.prototype.select = function () { this.selected = true; };
|
|
816
|
+
TableRecordData.prototype.unselect = function () { this.selected = false; };
|
|
879
817
|
Object.defineProperty(TableRecordData.prototype, "recordIdKey", {
|
|
880
818
|
get: function () {
|
|
881
819
|
return (typeof this.recordId === 'object')
|
|
@@ -984,9 +922,9 @@
|
|
|
984
922
|
var RecordTable = /** @class */ (function (_super) {
|
|
985
923
|
__extends(RecordTable, _super);
|
|
986
924
|
function RecordTable(tableReceived, formConfig) {
|
|
987
|
-
var e_1,
|
|
925
|
+
var e_1, _g, e_2, _h, e_3, _j;
|
|
988
926
|
var _this = this;
|
|
989
|
-
var _a, _b, _c, _d, _e, _f
|
|
927
|
+
var _a, _b, _c, _d, _e, _f;
|
|
990
928
|
_this = _super.call(this, tableReceived, formConfig) || this;
|
|
991
929
|
_this._inlineActionTrigger = new rxjs.Subject();
|
|
992
930
|
_this._globalActionTrigger = new rxjs.Subject();
|
|
@@ -1019,15 +957,14 @@
|
|
|
1019
957
|
_this._appendPages = (_c = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.append) !== null && _c !== void 0 ? _c : false;
|
|
1020
958
|
_this.selectable = (_d = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.selectable) !== null && _d !== void 0 ? _d : false;
|
|
1021
959
|
_this.setAttr('selectionBackend', (_e = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.selectionBackend) !== null && _e !== void 0 ? _e : false);
|
|
1022
|
-
_this.
|
|
1023
|
-
_this.setAttr('sortable', (_g = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.sortable) !== null && _g !== void 0 ? _g : false);
|
|
960
|
+
_this.setAttr('sortable', (_f = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.sortable) !== null && _f !== void 0 ? _f : false);
|
|
1024
961
|
_this.setAttr('sorting', { columnName: '', direction: '' });
|
|
1025
962
|
_this.setAttr('recordsPerPage', formConfig.defaultRecordsPerPage);
|
|
1026
963
|
if (tableReceived.fields) {
|
|
1027
964
|
var columns = [];
|
|
1028
965
|
try {
|
|
1029
|
-
for (var
|
|
1030
|
-
var columnReceived =
|
|
966
|
+
for (var _k = __values(tableReceived.fields), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
967
|
+
var columnReceived = _l.value;
|
|
1031
968
|
var columnDefinition = new RecordTableColumn(columnReceived, _this._formConfig);
|
|
1032
969
|
columns.push(columnDefinition);
|
|
1033
970
|
_this._tableColumnObj[columnDefinition.fieldCode] = columnDefinition;
|
|
@@ -1036,7 +973,7 @@
|
|
|
1036
973
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1037
974
|
finally {
|
|
1038
975
|
try {
|
|
1039
|
-
if (
|
|
976
|
+
if (_l && !_l.done && (_g = _k.return)) _g.call(_k);
|
|
1040
977
|
}
|
|
1041
978
|
finally { if (e_1) throw e_1.error; }
|
|
1042
979
|
}
|
|
@@ -1067,7 +1004,7 @@
|
|
|
1067
1004
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1068
1005
|
finally {
|
|
1069
1006
|
try {
|
|
1070
|
-
if (tableActions_1_1 && !tableActions_1_1.done && (
|
|
1007
|
+
if (tableActions_1_1 && !tableActions_1_1.done && (_h = tableActions_1.return)) _h.call(tableActions_1);
|
|
1071
1008
|
}
|
|
1072
1009
|
finally { if (e_2) throw e_2.error; }
|
|
1073
1010
|
}
|
|
@@ -1076,8 +1013,8 @@
|
|
|
1076
1013
|
_this.setAttr('complexFilter', true);
|
|
1077
1014
|
var filterConfig = _this.filterConfig;
|
|
1078
1015
|
try {
|
|
1079
|
-
for (var
|
|
1080
|
-
var filterReceived =
|
|
1016
|
+
for (var _m = __values(tableReceived.filters), _o = _m.next(); !_o.done; _o = _m.next()) {
|
|
1017
|
+
var filterReceived = _o.value;
|
|
1081
1018
|
var filterItem = new FieldSearch(filterReceived);
|
|
1082
1019
|
filterConfig.push(filterItem);
|
|
1083
1020
|
}
|
|
@@ -1085,7 +1022,7 @@
|
|
|
1085
1022
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1086
1023
|
finally {
|
|
1087
1024
|
try {
|
|
1088
|
-
if (
|
|
1025
|
+
if (_o && !_o.done && (_j = _m.return)) _j.call(_m);
|
|
1089
1026
|
}
|
|
1090
1027
|
finally { if (e_3) throw e_3.error; }
|
|
1091
1028
|
}
|
|
@@ -1237,7 +1174,7 @@
|
|
|
1237
1174
|
this.tableRecords.forEach(function (record) { return record.unselect(); });
|
|
1238
1175
|
};
|
|
1239
1176
|
RecordTable.prototype.setTableRecords = function (tableRecords, append) {
|
|
1240
|
-
var e_4,
|
|
1177
|
+
var e_4, _g;
|
|
1241
1178
|
var _a;
|
|
1242
1179
|
if (!append) {
|
|
1243
1180
|
this.clean();
|
|
@@ -1256,7 +1193,7 @@
|
|
|
1256
1193
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1257
1194
|
finally {
|
|
1258
1195
|
try {
|
|
1259
|
-
if (tableRecords_1_1 && !tableRecords_1_1.done && (
|
|
1196
|
+
if (tableRecords_1_1 && !tableRecords_1_1.done && (_g = tableRecords_1.return)) _g.call(tableRecords_1);
|
|
1260
1197
|
}
|
|
1261
1198
|
finally { if (e_4) throw e_4.error; }
|
|
1262
1199
|
}
|
|
@@ -1573,23 +1510,23 @@
|
|
|
1573
1510
|
LibTableComponent.prototype.ngOnInit = function () {
|
|
1574
1511
|
var _this = this;
|
|
1575
1512
|
var _a, _b;
|
|
1576
|
-
if (this.
|
|
1577
|
-
this.formConfig = (_a = this.
|
|
1513
|
+
if (this.table) {
|
|
1514
|
+
this.formConfig = (_a = this.table) === null || _a === void 0 ? void 0 : _a._formConfig;
|
|
1578
1515
|
this.tableFieldStyles = this.formConfig.tableFieldStyles;
|
|
1579
|
-
this.selectable = this.
|
|
1580
|
-
this.hasActions = this.
|
|
1581
|
-
this.
|
|
1582
|
-
this.inlineActions = this.
|
|
1583
|
-
this.globalActions = this.
|
|
1584
|
-
this.selectionActions = this.
|
|
1516
|
+
this.selectable = this.table.selectable;
|
|
1517
|
+
this.hasActions = this.table.hasActions;
|
|
1518
|
+
this.table.widget = this;
|
|
1519
|
+
this.inlineActions = this.table.getActions(this.formConfig.tableActions.inline);
|
|
1520
|
+
this.globalActions = this.table.getActions(this.formConfig.tableActions.global);
|
|
1521
|
+
this.selectionActions = this.table.getActions(this.formConfig.tableActions.selection);
|
|
1585
1522
|
// Inicialización de campos mapeados del objeto
|
|
1586
1523
|
var mapping = Object.entries(this.formConfig.componentTableAttrMap);
|
|
1587
1524
|
for (var index = 0; index < mapping.length; index++) {
|
|
1588
1525
|
var _c = __read(mapping[index], 2), tableAttr = _c[0], compAttr = _c[1];
|
|
1589
|
-
this[compAttr.toString()] = (_b = this.
|
|
1526
|
+
this[compAttr.toString()] = (_b = this.table) === null || _b === void 0 ? void 0 : _b[tableAttr.toString()];
|
|
1590
1527
|
}
|
|
1591
1528
|
// Subscripción a cambios en atributos
|
|
1592
|
-
this.
|
|
1529
|
+
this.table.attributeChange.subscribe(function (event) {
|
|
1593
1530
|
var tableAttr = event.name, value = event.value;
|
|
1594
1531
|
var compAttr = _this.formConfig.componentTableAttrMap[tableAttr];
|
|
1595
1532
|
_this.hasOwnProperty(compAttr) && (_this[compAttr] = value);
|
|
@@ -1599,24 +1536,24 @@
|
|
|
1599
1536
|
};
|
|
1600
1537
|
LibTableComponent.prototype.start = function () { };
|
|
1601
1538
|
LibTableComponent.prototype.tableGlobalAction = function (actionCode) {
|
|
1602
|
-
this.
|
|
1539
|
+
this.table.notifyGlobalAction(actionCode);
|
|
1603
1540
|
};
|
|
1604
1541
|
LibTableComponent.prototype.tableSelectionAction = function (actionCode) {
|
|
1605
|
-
this.
|
|
1542
|
+
this.table.notifySelectionAction(actionCode);
|
|
1606
1543
|
};
|
|
1607
1544
|
LibTableComponent.prototype.tableActionSelected = function (actionEvent) {
|
|
1608
|
-
this.
|
|
1545
|
+
this.table.notifyInlineAction(actionEvent);
|
|
1609
1546
|
};
|
|
1610
1547
|
LibTableComponent.prototype.tableColumnSort = function (columnFieldCode) {
|
|
1611
|
-
this.
|
|
1548
|
+
this.table.setRequiredOrder(columnFieldCode);
|
|
1612
1549
|
if (this.clientPaging) {
|
|
1613
|
-
return this.
|
|
1550
|
+
return this.table.localSortData();
|
|
1614
1551
|
}
|
|
1615
|
-
this.
|
|
1552
|
+
this.table.notifyGetDataAction();
|
|
1616
1553
|
};
|
|
1617
1554
|
LibTableComponent.prototype.changePage = function (requestedPage) {
|
|
1618
1555
|
if (!this.clientPaging) {
|
|
1619
|
-
this.
|
|
1556
|
+
this.table.notifyGetDataAction(requestedPage);
|
|
1620
1557
|
}
|
|
1621
1558
|
};
|
|
1622
1559
|
Object.defineProperty(LibTableComponent.prototype, "records", {
|
|
@@ -1636,50 +1573,50 @@
|
|
|
1636
1573
|
var eventType = tableFilterEvent.eventType;
|
|
1637
1574
|
var triggerDataUpdate = false;
|
|
1638
1575
|
if (eventType === TABLE_FILTER_TYPES.simpleFilterChange || eventType === TABLE_FILTER_TYPES.simpleFilterFinish) {
|
|
1639
|
-
this.
|
|
1576
|
+
this.table.simpleFilterText = tableFilterEvent.simpleFilterString.trim();
|
|
1640
1577
|
if (this.clientPaging) {
|
|
1641
|
-
this.
|
|
1642
|
-
this.
|
|
1578
|
+
this.table.setAttr('currentPage', 1);
|
|
1579
|
+
this.table.updateVisibleRecords();
|
|
1643
1580
|
}
|
|
1644
1581
|
else if (eventType === TABLE_FILTER_TYPES.simpleFilterFinish) {
|
|
1645
1582
|
triggerDataUpdate = true;
|
|
1646
1583
|
}
|
|
1647
1584
|
}
|
|
1648
1585
|
if (eventType === TABLE_FILTER_TYPES.complexFilterAdd) {
|
|
1649
|
-
this.
|
|
1586
|
+
this.table.addFilterRestriction(tableFilterEvent.complexFilterItem);
|
|
1650
1587
|
}
|
|
1651
1588
|
if (eventType === TABLE_FILTER_TYPES.complexFilterRemove) {
|
|
1652
|
-
this.
|
|
1589
|
+
this.table.removeFilterRestriction(tableFilterEvent.itemName);
|
|
1653
1590
|
}
|
|
1654
1591
|
if (triggerDataUpdate) {
|
|
1655
1592
|
var tableGetDataEvent = {
|
|
1656
|
-
tableCode: this.
|
|
1593
|
+
tableCode: this.table.tableCode,
|
|
1657
1594
|
requestedPage: 1,
|
|
1658
1595
|
};
|
|
1659
|
-
this.
|
|
1596
|
+
this.table.notifyGetDataAction(tableGetDataEvent);
|
|
1660
1597
|
}
|
|
1661
1598
|
};
|
|
1662
1599
|
LibTableComponent.prototype.tableSelectionToggle = function (recordId) {
|
|
1663
|
-
this.
|
|
1600
|
+
this.table.notifyRecordSelection(recordId);
|
|
1664
1601
|
};
|
|
1665
1602
|
LibTableComponent.prototype.toggleSelectAll = function () {
|
|
1666
1603
|
if (this.allSelected) {
|
|
1667
|
-
this.
|
|
1604
|
+
this.table.unSelectAll();
|
|
1668
1605
|
}
|
|
1669
1606
|
else {
|
|
1670
|
-
this.
|
|
1607
|
+
this.table.selectAll();
|
|
1671
1608
|
}
|
|
1672
1609
|
};
|
|
1673
1610
|
Object.defineProperty(LibTableComponent.prototype, "availableFilters", {
|
|
1674
1611
|
get: function () {
|
|
1675
|
-
return this.
|
|
1612
|
+
return this.table.availableFilters;
|
|
1676
1613
|
},
|
|
1677
1614
|
enumerable: false,
|
|
1678
1615
|
configurable: true
|
|
1679
1616
|
});
|
|
1680
1617
|
Object.defineProperty(LibTableComponent.prototype, "selectedRecords", {
|
|
1681
1618
|
get: function () {
|
|
1682
|
-
return this.
|
|
1619
|
+
return this.table.selectedRecords;
|
|
1683
1620
|
},
|
|
1684
1621
|
enumerable: false,
|
|
1685
1622
|
configurable: true
|
|
@@ -1694,7 +1631,7 @@
|
|
|
1694
1631
|
},] }
|
|
1695
1632
|
];
|
|
1696
1633
|
LibTableComponent.propDecorators = {
|
|
1697
|
-
|
|
1634
|
+
table: [{ type: core.Input }],
|
|
1698
1635
|
tableRecords: [{ type: core.Input }],
|
|
1699
1636
|
disabled: [{ type: core.Input }],
|
|
1700
1637
|
currentState: [{ type: core.Input }],
|
|
@@ -1782,8 +1719,9 @@
|
|
|
1782
1719
|
|
|
1783
1720
|
var RecordFormSection = /** @class */ (function () {
|
|
1784
1721
|
function RecordFormSection(sectionReceived, formObject) {
|
|
1785
|
-
var e_1,
|
|
1722
|
+
var e_1, _c;
|
|
1786
1723
|
var _this = this;
|
|
1724
|
+
var _a;
|
|
1787
1725
|
this._activation = new rxjs.Subject();
|
|
1788
1726
|
this._inactivation = new rxjs.Subject();
|
|
1789
1727
|
this.active = false;
|
|
@@ -1827,12 +1765,21 @@
|
|
|
1827
1765
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1828
1766
|
finally {
|
|
1829
1767
|
try {
|
|
1830
|
-
if (subsections_1_1 && !subsections_1_1.done && (
|
|
1768
|
+
if (subsections_1_1 && !subsections_1_1.done && (_c = subsections_1.return)) _c.call(subsections_1);
|
|
1831
1769
|
}
|
|
1832
1770
|
finally { if (e_1) throw e_1.error; }
|
|
1833
1771
|
}
|
|
1834
1772
|
}
|
|
1773
|
+
this.customAttributes = (_a = sectionReceived === null || sectionReceived === void 0 ? void 0 : sectionReceived.customAttributes) !== null && _a !== void 0 ? _a : null;
|
|
1835
1774
|
}
|
|
1775
|
+
RecordFormSection.prototype.getCustomAttribute = function (name) { var _a, _b; return (_b = (_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null; };
|
|
1776
|
+
RecordFormSection.prototype.setCustomAttribute = function (name, value) { return name && (this.customAttributes[name] = value); };
|
|
1777
|
+
RecordFormSection.prototype.matchAttribute = function (name, value) { var _a; return ((_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) === value; };
|
|
1778
|
+
Object.defineProperty(RecordFormSection.prototype, "code", {
|
|
1779
|
+
get: function () { return this.sectionCode; },
|
|
1780
|
+
enumerable: false,
|
|
1781
|
+
configurable: true
|
|
1782
|
+
});
|
|
1836
1783
|
Object.defineProperty(RecordFormSection.prototype, "activation", {
|
|
1837
1784
|
get: function () { return this._activation; },
|
|
1838
1785
|
enumerable: false,
|
|
@@ -1873,19 +1820,19 @@
|
|
|
1873
1820
|
? this.subSectionsObj[subSectionCode] : null;
|
|
1874
1821
|
};
|
|
1875
1822
|
RecordFormSection.prototype.getFields = function () {
|
|
1876
|
-
var e_2,
|
|
1823
|
+
var e_2, _c;
|
|
1877
1824
|
var fieldsArray = [];
|
|
1878
1825
|
if (this.subSections && this.subSections.length > 0) {
|
|
1879
1826
|
try {
|
|
1880
|
-
for (var
|
|
1881
|
-
var subSection =
|
|
1827
|
+
for (var _d = __values(this.subSections), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
1828
|
+
var subSection = _e.value;
|
|
1882
1829
|
fieldsArray = fieldsArray.concat(subSection.getFields());
|
|
1883
1830
|
}
|
|
1884
1831
|
}
|
|
1885
1832
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1886
1833
|
finally {
|
|
1887
1834
|
try {
|
|
1888
|
-
if (
|
|
1835
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
1889
1836
|
}
|
|
1890
1837
|
finally { if (e_2) throw e_2.error; }
|
|
1891
1838
|
}
|
|
@@ -1893,19 +1840,19 @@
|
|
|
1893
1840
|
return fieldsArray;
|
|
1894
1841
|
};
|
|
1895
1842
|
RecordFormSection.prototype.getFieldNames = function () {
|
|
1896
|
-
var e_3,
|
|
1843
|
+
var e_3, _c;
|
|
1897
1844
|
var fieldsArray = [];
|
|
1898
1845
|
if (this.subSections && this.subSections.length > 0) {
|
|
1899
1846
|
try {
|
|
1900
|
-
for (var
|
|
1901
|
-
var subSection =
|
|
1847
|
+
for (var _d = __values(this.subSections), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
1848
|
+
var subSection = _e.value;
|
|
1902
1849
|
fieldsArray = fieldsArray.concat(subSection.getFieldNames());
|
|
1903
1850
|
}
|
|
1904
1851
|
}
|
|
1905
1852
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1906
1853
|
finally {
|
|
1907
1854
|
try {
|
|
1908
|
-
if (
|
|
1855
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
1909
1856
|
}
|
|
1910
1857
|
finally { if (e_3) throw e_3.error; }
|
|
1911
1858
|
}
|
|
@@ -1913,12 +1860,12 @@
|
|
|
1913
1860
|
return fieldsArray;
|
|
1914
1861
|
};
|
|
1915
1862
|
RecordFormSection.prototype.getField = function (name) {
|
|
1916
|
-
var e_4,
|
|
1863
|
+
var e_4, _c;
|
|
1917
1864
|
var field = null;
|
|
1918
1865
|
if (this.subSections && this.subSections.length > 0) {
|
|
1919
1866
|
try {
|
|
1920
|
-
for (var
|
|
1921
|
-
var subSection =
|
|
1867
|
+
for (var _d = __values(this.subSections), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
1868
|
+
var subSection = _e.value;
|
|
1922
1869
|
field = subSection.getField(name);
|
|
1923
1870
|
if (field) {
|
|
1924
1871
|
return field;
|
|
@@ -1928,7 +1875,7 @@
|
|
|
1928
1875
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1929
1876
|
finally {
|
|
1930
1877
|
try {
|
|
1931
|
-
if (
|
|
1878
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
1932
1879
|
}
|
|
1933
1880
|
finally { if (e_4) throw e_4.error; }
|
|
1934
1881
|
}
|
|
@@ -1946,7 +1893,7 @@
|
|
|
1946
1893
|
__extends(FormAction, _super);
|
|
1947
1894
|
function FormAction(actionDefinition, formConfig) {
|
|
1948
1895
|
var _this = this;
|
|
1949
|
-
var _a
|
|
1896
|
+
var _a;
|
|
1950
1897
|
_this = _super.call(this, actionDefinition, formConfig) || this;
|
|
1951
1898
|
_this._actionActivated = new rxjs.Subject();
|
|
1952
1899
|
_this.inProgress = false;
|
|
@@ -1954,10 +1901,9 @@
|
|
|
1954
1901
|
_this.actionCode = actionDefinition.actionCode ? actionDefinition.actionCode.toString() : '';
|
|
1955
1902
|
_this.actionName = actionDefinition.actionTitle;
|
|
1956
1903
|
_this.iconName = actionDefinition.iconName || _this.actionCode;
|
|
1957
|
-
_this.location
|
|
1904
|
+
_this.setCustomAttribute('location', actionDefinition.position || HEADER);
|
|
1958
1905
|
_this.backend = (_a = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.serverAction) !== null && _a !== void 0 ? _a : false;
|
|
1959
1906
|
_this.newState = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.newState;
|
|
1960
|
-
_this.customAttributes = (_b = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.customAttributes) !== null && _b !== void 0 ? _b : null;
|
|
1961
1907
|
_this.restrictedOnField = actionDefinition.fieldRestrictedCode ? actionDefinition.fieldRestrictedCode.toString() : '';
|
|
1962
1908
|
_this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
|
|
1963
1909
|
_this.restrictedOnValue = actionDefinition.valueRestricted || '';
|
|
@@ -2001,7 +1947,6 @@
|
|
|
2001
1947
|
info: 'fieldInfo',
|
|
2002
1948
|
defaultValue: 'defaultValue',
|
|
2003
1949
|
defaultEditable: 'defaultEditable',
|
|
2004
|
-
customAttributes: 'customAttributes',
|
|
2005
1950
|
visibleLabel: 'visibleLabel',
|
|
2006
1951
|
required: 'fieldRequired',
|
|
2007
1952
|
hasChanged: 'hasChanged',
|
|
@@ -2022,7 +1967,7 @@
|
|
|
2022
1967
|
__extends(FieldDescriptor, _super);
|
|
2023
1968
|
function FieldDescriptor(inputFieldReceived, formConfig) {
|
|
2024
1969
|
var _this = this;
|
|
2025
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
1970
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
2026
1971
|
_this = _super.call(this, inputFieldReceived, formConfig) || this;
|
|
2027
1972
|
_this._editionFinish = new rxjs.Subject();
|
|
2028
1973
|
_this._editionPartial = new rxjs.Subject();
|
|
@@ -2048,18 +1993,17 @@
|
|
|
2048
1993
|
}
|
|
2049
1994
|
_this.setAttr(fldAttr.format, fieldFormat);
|
|
2050
1995
|
_this.setAttr(fldAttr.validateOnServer, (_d = fld.serverAction) !== null && _d !== void 0 ? _d : false);
|
|
2051
|
-
_this.setAttr(fldAttr.customAttributes, (_e = fld.customAttributes) !== null && _e !== void 0 ? _e : {});
|
|
2052
1996
|
_this.setAttr(fldAttr.tooltipText, fld.tooltip || '');
|
|
2053
1997
|
_this.setAttr(fldAttr.defaultEditable, _this.enabled);
|
|
2054
|
-
_this.setAttr(fldAttr.required, (
|
|
2055
|
-
_this.setError(fld.errorCode, fld.errorMessage, (
|
|
2056
|
-
_this.setAttr(fldAttr.outputOnly, (
|
|
2057
|
-
var maxLength = (
|
|
1998
|
+
_this.setAttr(fldAttr.required, (_e = fld.required) !== null && _e !== void 0 ? _e : false);
|
|
1999
|
+
_this.setError(fld.errorCode, fld.errorMessage, (_f = fld.errorType) !== null && _f !== void 0 ? _f : DEFAULT_ERROR_TYPE);
|
|
2000
|
+
_this.setAttr(fldAttr.outputOnly, (_g = fld.outputOnly) !== null && _g !== void 0 ? _g : false);
|
|
2001
|
+
var maxLength = (_h = fld.maxLength) !== null && _h !== void 0 ? _h : (_this.captureType === 'TEXTAREA' ? BIG_MAX_LENGTH : STD_MAX_LENGTH);
|
|
2058
2002
|
_this.setAttr(fldAttr.maxLength, maxLength);
|
|
2059
|
-
_this.setAttr(fldAttr.intrinsicErrorMessage, (
|
|
2003
|
+
_this.setAttr(fldAttr.intrinsicErrorMessage, (_j = _this._formConfig.fieldTypeErrMsg[_this.fieldType]) !== null && _j !== void 0 ? _j : _this._formConfig.fieldTypeErrMsg.DEFAULT);
|
|
2060
2004
|
_this.setFieldType(fld.fieldTypeCode);
|
|
2061
|
-
_this.setEditable((
|
|
2062
|
-
_this.setVisibleLabel((
|
|
2005
|
+
_this.setEditable((_k = fld.editable) !== null && _k !== void 0 ? _k : true);
|
|
2006
|
+
_this.setVisibleLabel((_l = fld.visibleLabel) !== null && _l !== void 0 ? _l : true);
|
|
2063
2007
|
_this.setVisibility(fld.visible);
|
|
2064
2008
|
_this.setFieldOptions(fld.fieldOptions);
|
|
2065
2009
|
_this.setValue(fld.fieldValue || _this.defaultValue || '');
|
|
@@ -2159,7 +2103,6 @@
|
|
|
2159
2103
|
FieldDescriptor.prototype.notifyEditionDetailRequest = function () {
|
|
2160
2104
|
this._detailRequest.next(this.fieldCode);
|
|
2161
2105
|
};
|
|
2162
|
-
FieldDescriptor.prototype.getCustomAttribute = function (name) { var _a, _b; return (_b = (_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null; };
|
|
2163
2106
|
FieldDescriptor.prototype.setVisibleLabel = function (visibleLabel) { this.setAttr(fldAttr.visibleLabel, visibleLabel); };
|
|
2164
2107
|
FieldDescriptor.prototype.showLabel = function () { this.setVisibleLabel(true); };
|
|
2165
2108
|
FieldDescriptor.prototype.hideLabel = function () { this.setVisibleLabel(false); };
|
|
@@ -2251,11 +2194,6 @@
|
|
|
2251
2194
|
FieldDescriptor.prototype.setFieldType = function (inputFieldType) {
|
|
2252
2195
|
this.setAttr(fldAttr.type, inputFieldType);
|
|
2253
2196
|
};
|
|
2254
|
-
FieldDescriptor.prototype.format = function () {
|
|
2255
|
-
if (this.fieldType === this._formConfig.fieldTypes.currency) {
|
|
2256
|
-
this.setAttr(fldAttr.value, formatCurrency(this._fieldValue));
|
|
2257
|
-
}
|
|
2258
|
-
};
|
|
2259
2197
|
FieldDescriptor.prototype.setMinValue = function (minValue) {
|
|
2260
2198
|
var _a, _b, _c;
|
|
2261
2199
|
if (this.fieldType === this._formConfig.fieldTypes.date
|
|
@@ -2367,9 +2305,6 @@
|
|
|
2367
2305
|
(_a = this.widget) === null || _a === void 0 ? void 0 : _a.setLocation(latitude, longitude);
|
|
2368
2306
|
}
|
|
2369
2307
|
break;
|
|
2370
|
-
case this._formConfig.fieldTypes.currency:
|
|
2371
|
-
newFinalValue = formatCurrency(newValue);
|
|
2372
|
-
break;
|
|
2373
2308
|
default:
|
|
2374
2309
|
newFinalValue = newValue;
|
|
2375
2310
|
break;
|
|
@@ -2383,22 +2318,29 @@
|
|
|
2383
2318
|
return FieldDescriptor;
|
|
2384
2319
|
}(FormElement));
|
|
2385
2320
|
|
|
2321
|
+
var ACTIVE = 'active';
|
|
2322
|
+
var SHOW = 'show';
|
|
2323
|
+
var HIDE = 'hide';
|
|
2324
|
+
var ENABLE = 'enable';
|
|
2325
|
+
var DISABLE = 'disable';
|
|
2326
|
+
var CLEAN = 'clean';
|
|
2386
2327
|
var FormStructureAndData = /** @class */ (function () {
|
|
2387
2328
|
function FormStructureAndData(definitionReceived, formConfig) {
|
|
2388
2329
|
var e_1, _d, e_2, _e, e_3, _f, e_4, _g;
|
|
2389
2330
|
var _this = this;
|
|
2390
|
-
this.
|
|
2391
|
-
this.
|
|
2392
|
-
this.
|
|
2393
|
-
this.
|
|
2331
|
+
this._fields = {};
|
|
2332
|
+
this._actions = {};
|
|
2333
|
+
this._tables = {};
|
|
2334
|
+
this._sections = {};
|
|
2394
2335
|
this._immutableData = {};
|
|
2395
2336
|
this._extraInfo = {};
|
|
2337
|
+
this._exclusiveSectionsByAttr = {};
|
|
2396
2338
|
this._formConfig = formConfig;
|
|
2397
2339
|
this.state = '';
|
|
2398
|
-
this.
|
|
2399
|
-
this.
|
|
2400
|
-
this.
|
|
2401
|
-
this.
|
|
2340
|
+
this._actionArray = [];
|
|
2341
|
+
this._fieldArray = [];
|
|
2342
|
+
this._tableArray = [];
|
|
2343
|
+
this._sectionArray = [];
|
|
2402
2344
|
this._stateFlow = {
|
|
2403
2345
|
defaultState: '',
|
|
2404
2346
|
states: [],
|
|
@@ -2432,8 +2374,8 @@
|
|
|
2432
2374
|
var globalAction = new FormAction(actionReceived, this._formConfig);
|
|
2433
2375
|
var globalActionCode = globalAction.actionCode;
|
|
2434
2376
|
if (globalActionCode) {
|
|
2435
|
-
this.
|
|
2436
|
-
this.
|
|
2377
|
+
this._actionArray.push(globalAction);
|
|
2378
|
+
this._actions[globalActionCode] = globalAction;
|
|
2437
2379
|
}
|
|
2438
2380
|
}
|
|
2439
2381
|
}
|
|
@@ -2463,8 +2405,8 @@
|
|
|
2463
2405
|
var fieldToAdd = new FieldDescriptor(fieldReceived, this._formConfig);
|
|
2464
2406
|
var fieldCode = fieldToAdd.fieldCode;
|
|
2465
2407
|
if (fieldCode) {
|
|
2466
|
-
this.
|
|
2467
|
-
this.
|
|
2408
|
+
this._fieldArray.push(fieldToAdd);
|
|
2409
|
+
this._fields[fieldCode] = fieldToAdd;
|
|
2468
2410
|
}
|
|
2469
2411
|
}
|
|
2470
2412
|
}
|
|
@@ -2497,8 +2439,8 @@
|
|
|
2497
2439
|
var tableToAdd = new RecordTable(tableReceived, this._formConfig);
|
|
2498
2440
|
var tableCode = tableToAdd.tableCode;
|
|
2499
2441
|
if (tableCode) {
|
|
2500
|
-
this.
|
|
2501
|
-
this.
|
|
2442
|
+
this._tableArray.push(tableToAdd);
|
|
2443
|
+
this._tables[tableCode] = tableToAdd;
|
|
2502
2444
|
}
|
|
2503
2445
|
}
|
|
2504
2446
|
}
|
|
@@ -2526,8 +2468,8 @@
|
|
|
2526
2468
|
var sectionToAdd = new RecordFormSection(sectionReceived, this);
|
|
2527
2469
|
var sectionCode = sectionToAdd.sectionCode;
|
|
2528
2470
|
if (sectionCode) {
|
|
2529
|
-
this.
|
|
2530
|
-
this.
|
|
2471
|
+
this._sectionArray.push(sectionToAdd);
|
|
2472
|
+
this._sections[sectionCode] = sectionToAdd;
|
|
2531
2473
|
}
|
|
2532
2474
|
}
|
|
2533
2475
|
}
|
|
@@ -2540,51 +2482,28 @@
|
|
|
2540
2482
|
}
|
|
2541
2483
|
}
|
|
2542
2484
|
}
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
var name = objectNames[index];
|
|
2549
|
-
data[name] = this.getImmutableElement(name);
|
|
2550
|
-
}
|
|
2551
|
-
return data;
|
|
2552
|
-
},
|
|
2553
|
-
set: function (immutableData) { Object.assign(this._immutableData, immutableData); },
|
|
2554
|
-
enumerable: false,
|
|
2555
|
-
configurable: true
|
|
2556
|
-
});
|
|
2557
|
-
Object.defineProperty(FormStructureAndData.prototype, "extraInfo", {
|
|
2558
|
-
get: function () {
|
|
2559
|
-
var data = {};
|
|
2560
|
-
var objectNames = Object.keys(this._extraInfo);
|
|
2561
|
-
for (var index = 0; index < objectNames.length; index++) {
|
|
2562
|
-
var name = objectNames[index];
|
|
2563
|
-
data[name] = this.getExtraInfo(name);
|
|
2564
|
-
}
|
|
2565
|
-
return data;
|
|
2566
|
-
},
|
|
2567
|
-
set: function (extraInfo) { Object.assign(this._extraInfo, extraInfo); },
|
|
2485
|
+
FormStructureAndData.prototype.getTitle = function () { return this._title; };
|
|
2486
|
+
FormStructureAndData.prototype.setTitle = function (title) { this._title = title; };
|
|
2487
|
+
Object.defineProperty(FormStructureAndData.prototype, "name", {
|
|
2488
|
+
get: function () { return this._name; },
|
|
2489
|
+
set: function (name) { this._name = name; },
|
|
2568
2490
|
enumerable: false,
|
|
2569
2491
|
configurable: true
|
|
2570
2492
|
});
|
|
2571
2493
|
Object.defineProperty(FormStructureAndData.prototype, "defaultState", {
|
|
2494
|
+
// Estados
|
|
2572
2495
|
get: function () { return this._stateFlow.defaultState; },
|
|
2573
2496
|
enumerable: false,
|
|
2574
2497
|
configurable: true
|
|
2575
2498
|
});
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
configurable: true
|
|
2581
|
-
});
|
|
2582
|
-
Object.defineProperty(FormStructureAndData.prototype, "name", {
|
|
2583
|
-
get: function () { return this._name; },
|
|
2584
|
-
set: function (name) { this._name = name; },
|
|
2499
|
+
FormStructureAndData.prototype.supportState = function (state) { var _a; return (_a = this._stateFlow.states) === null || _a === void 0 ? void 0 : _a.includes(state); };
|
|
2500
|
+
FormStructureAndData.prototype.supportMode = function (state) { return this.supportState(state); };
|
|
2501
|
+
Object.defineProperty(FormStructureAndData.prototype, "states", {
|
|
2502
|
+
get: function () { return this._stateFlow.states; },
|
|
2585
2503
|
enumerable: false,
|
|
2586
2504
|
configurable: true
|
|
2587
2505
|
});
|
|
2506
|
+
FormStructureAndData.prototype.getCurrentState = function () { return this.state; };
|
|
2588
2507
|
FormStructureAndData.prototype.changeState = function (newState) {
|
|
2589
2508
|
var _this = this;
|
|
2590
2509
|
if (!newState || !this.supportState(newState)) {
|
|
@@ -2616,244 +2535,41 @@
|
|
|
2616
2535
|
return { name: name, source: source, destination: destination };
|
|
2617
2536
|
}).filter(function (item) { return item.name && item.source && item.destination; });
|
|
2618
2537
|
};
|
|
2619
|
-
|
|
2620
|
-
FormStructureAndData.prototype.supportMode = function (state) { return this.supportState(state); };
|
|
2538
|
+
// immutable Data
|
|
2621
2539
|
FormStructureAndData.prototype.getImmutableElement = function (name) { var _a, _b, _c; return (_c = (_b = (_a = this._immutableData) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null; };
|
|
2622
|
-
FormStructureAndData.prototype
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
return this._stateFlow.states;
|
|
2626
|
-
};
|
|
2627
|
-
FormStructureAndData.prototype.getFieldNames = function () {
|
|
2628
|
-
return this._fields.map(function (field) { return field.fieldCode; });
|
|
2629
|
-
};
|
|
2630
|
-
FormStructureAndData.prototype.getActions = function () {
|
|
2631
|
-
return this._actions;
|
|
2632
|
-
};
|
|
2633
|
-
FormStructureAndData.prototype.getHeaderActions = function () {
|
|
2634
|
-
return this._actions.filter(function (actionItem) { return actionItem.location === HEADER$1; });
|
|
2635
|
-
};
|
|
2636
|
-
FormStructureAndData.prototype.getFieldObject = function (elementId) {
|
|
2637
|
-
return (this._fieldsObj && elementId && this._fieldsObj[elementId])
|
|
2638
|
-
? this._fieldsObj[elementId] : null;
|
|
2639
|
-
};
|
|
2640
|
-
FormStructureAndData.prototype.getTableObject = function (elementId) {
|
|
2641
|
-
return (this._tableObj && elementId && this._tableObj[elementId])
|
|
2642
|
-
? this._tableObj[elementId] : null;
|
|
2643
|
-
};
|
|
2644
|
-
FormStructureAndData.prototype.getActionObject = function (elementId) {
|
|
2645
|
-
return (this._actionsObj && elementId && this._actionsObj[elementId])
|
|
2646
|
-
? this._actionsObj[elementId] : null;
|
|
2647
|
-
};
|
|
2648
|
-
FormStructureAndData.prototype.getSubSection = function (sectionCode, subsectionCode) {
|
|
2649
|
-
var section = (this._sectionsObj && this._sectionsObj[sectionCode])
|
|
2650
|
-
? this._sectionsObj[sectionCode] : null;
|
|
2651
|
-
return (section) ? section.getSubsection(subsectionCode) : null;
|
|
2652
|
-
};
|
|
2653
|
-
Object.defineProperty(FormStructureAndData.prototype, "actions", {
|
|
2654
|
-
get: function () { return this._actionsObj; },
|
|
2540
|
+
Object.defineProperty(FormStructureAndData.prototype, "immutableData", {
|
|
2541
|
+
get: function () { return JSON.parse(JSON.stringify(this._immutableData)); },
|
|
2542
|
+
set: function (immutableData) { Object.assign(this._immutableData, immutableData); },
|
|
2655
2543
|
enumerable: false,
|
|
2656
2544
|
configurable: true
|
|
2657
2545
|
});
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
FormStructureAndData.prototype.sectionTitles = function () { return this.getSectionsTitles(); };
|
|
2664
|
-
FormStructureAndData.prototype.getSections = function () {
|
|
2665
|
-
return this._sections;
|
|
2666
|
-
};
|
|
2667
|
-
Object.defineProperty(FormStructureAndData.prototype, "visibleSections", {
|
|
2668
|
-
get: function () {
|
|
2669
|
-
return this._sections.filter(function (sec) { return sec.visible; });
|
|
2670
|
-
},
|
|
2546
|
+
// extra Info
|
|
2547
|
+
FormStructureAndData.prototype.getExtraInfo = function (name) { var _a, _b, _c; return (_c = (_b = (_a = this._extraInfo) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null; };
|
|
2548
|
+
Object.defineProperty(FormStructureAndData.prototype, "extraInfo", {
|
|
2549
|
+
get: function () { return JSON.parse(JSON.stringify(this._extraInfo)); },
|
|
2550
|
+
set: function (extraInfo) { Object.assign(this._extraInfo, extraInfo); },
|
|
2671
2551
|
enumerable: false,
|
|
2672
2552
|
configurable: true
|
|
2673
2553
|
});
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
};
|
|
2677
|
-
FormStructureAndData.prototype.
|
|
2678
|
-
return this._sections.map(function (formSection) { return formSection.sectionTitle; });
|
|
2679
|
-
};
|
|
2680
|
-
FormStructureAndData.prototype.getSectionObject = function (elementId) {
|
|
2681
|
-
return (this._sectionsObj && elementId && this._sectionsObj[elementId])
|
|
2682
|
-
? this._sectionsObj[elementId] : null;
|
|
2683
|
-
};
|
|
2684
|
-
FormStructureAndData.prototype.tables = function () { return this.getTables(); };
|
|
2685
|
-
FormStructureAndData.prototype.getTables = function () {
|
|
2686
|
-
return this._tables;
|
|
2687
|
-
};
|
|
2688
|
-
FormStructureAndData.prototype.cleanData = function () {
|
|
2689
|
-
var e_5, _d, e_6, _e;
|
|
2690
|
-
if (this._fields) {
|
|
2691
|
-
try {
|
|
2692
|
-
for (var _f = __values(this._fields), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
2693
|
-
var recordField = _g.value;
|
|
2694
|
-
recordField.setValue(recordField.defaultValue);
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
2698
|
-
finally {
|
|
2699
|
-
try {
|
|
2700
|
-
if (_g && !_g.done && (_d = _f.return)) _d.call(_f);
|
|
2701
|
-
}
|
|
2702
|
-
finally { if (e_5) throw e_5.error; }
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
if (this._tables) {
|
|
2706
|
-
try {
|
|
2707
|
-
for (var _h = __values(this._tables), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
2708
|
-
var formTable = _j.value;
|
|
2709
|
-
formTable.clean();
|
|
2710
|
-
}
|
|
2711
|
-
}
|
|
2712
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
2713
|
-
finally {
|
|
2714
|
-
try {
|
|
2715
|
-
if (_j && !_j.done && (_e = _h.return)) _e.call(_h);
|
|
2716
|
-
}
|
|
2717
|
-
finally { if (e_6) throw e_6.error; }
|
|
2718
|
-
}
|
|
2719
|
-
}
|
|
2720
|
-
};
|
|
2721
|
-
FormStructureAndData.prototype.showSection = function (sectionCode) {
|
|
2722
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2723
|
-
return (sectionObject) ? sectionObject.show() : null;
|
|
2724
|
-
};
|
|
2725
|
-
FormStructureAndData.prototype.hideSection = function (sectionCode) {
|
|
2726
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2727
|
-
return (sectionObject) ? sectionObject.hide() : null;
|
|
2728
|
-
};
|
|
2729
|
-
FormStructureAndData.prototype.activeSection = function () {
|
|
2730
|
-
var activeSection = this._sections.find(function (sectionObj) { return sectionObj.active; });
|
|
2731
|
-
return activeSection.sectionCode;
|
|
2732
|
-
};
|
|
2733
|
-
FormStructureAndData.prototype.activateSection = function (sectionCode) {
|
|
2734
|
-
this._sections.forEach(function (sectionObj) {
|
|
2735
|
-
if (sectionObj) {
|
|
2736
|
-
sectionObj.inactivate();
|
|
2737
|
-
}
|
|
2738
|
-
});
|
|
2739
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2740
|
-
return (sectionObject) ? sectionObject.activate() : null;
|
|
2741
|
-
};
|
|
2742
|
-
FormStructureAndData.prototype.showSections = function (sectionArray) {
|
|
2743
|
-
var _this = this;
|
|
2744
|
-
var sectionNames = (Array.isArray(sectionArray)) ? sectionArray : [sectionArray];
|
|
2745
|
-
sectionNames.forEach(function (sectionCode) { return _this.showSection(sectionCode); });
|
|
2746
|
-
};
|
|
2747
|
-
FormStructureAndData.prototype.hideSections = function (sectionArray) {
|
|
2748
|
-
var _this = this;
|
|
2749
|
-
var sectionNames = (Array.isArray(sectionArray)) ? sectionArray : [sectionArray];
|
|
2750
|
-
sectionNames.forEach(function (sectionCode) { return _this.hideSection(sectionCode); });
|
|
2751
|
-
};
|
|
2752
|
-
FormStructureAndData.prototype.showSubSection = function (sectionCode, subSectionCode) {
|
|
2753
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2754
|
-
var subSectionObject = (sectionObject) ? sectionObject.getSubsection(subSectionCode) : null;
|
|
2755
|
-
return (subSectionObject) ? subSectionObject.show() : null;
|
|
2756
|
-
};
|
|
2757
|
-
FormStructureAndData.prototype.hideSubSection = function (sectionCode, subSectionCode) {
|
|
2758
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2759
|
-
var subSectionObject = (sectionObject) ? sectionObject.getSubsection(subSectionCode) : null;
|
|
2760
|
-
return (subSectionObject) ? subSectionObject.hide() : null;
|
|
2761
|
-
};
|
|
2762
|
-
FormStructureAndData.prototype.showSubSections = function (sectionCode, subSectionArray) {
|
|
2763
|
-
var e_7, _d;
|
|
2764
|
-
if (subSectionArray && subSectionArray.length > 0) {
|
|
2765
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2766
|
-
try {
|
|
2767
|
-
for (var subSectionArray_1 = __values(subSectionArray), subSectionArray_1_1 = subSectionArray_1.next(); !subSectionArray_1_1.done; subSectionArray_1_1 = subSectionArray_1.next()) {
|
|
2768
|
-
var subSectionCode = subSectionArray_1_1.value;
|
|
2769
|
-
var subSectionObject = (sectionObject) ? sectionObject.getSubsection(subSectionCode) : null;
|
|
2770
|
-
if (subSectionObject) {
|
|
2771
|
-
subSectionObject.show();
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
2776
|
-
finally {
|
|
2777
|
-
try {
|
|
2778
|
-
if (subSectionArray_1_1 && !subSectionArray_1_1.done && (_d = subSectionArray_1.return)) _d.call(subSectionArray_1);
|
|
2779
|
-
}
|
|
2780
|
-
finally { if (e_7) throw e_7.error; }
|
|
2781
|
-
}
|
|
2782
|
-
}
|
|
2783
|
-
};
|
|
2784
|
-
FormStructureAndData.prototype.hideSubSections = function (sectionCode, subSectionArray) {
|
|
2785
|
-
var e_8, _d;
|
|
2786
|
-
if (subSectionArray && subSectionArray.length > 0) {
|
|
2787
|
-
var sectionObject = this.getSectionObject(sectionCode);
|
|
2788
|
-
try {
|
|
2789
|
-
for (var subSectionArray_2 = __values(subSectionArray), subSectionArray_2_1 = subSectionArray_2.next(); !subSectionArray_2_1.done; subSectionArray_2_1 = subSectionArray_2.next()) {
|
|
2790
|
-
var subSectionCode = subSectionArray_2_1.value;
|
|
2791
|
-
var subSectionObject = (sectionObject) ? sectionObject.getSubsection(subSectionCode) : null;
|
|
2792
|
-
if (subSectionObject) {
|
|
2793
|
-
subSectionObject.hide();
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
2798
|
-
finally {
|
|
2799
|
-
try {
|
|
2800
|
-
if (subSectionArray_2_1 && !subSectionArray_2_1.done && (_d = subSectionArray_2.return)) _d.call(subSectionArray_2);
|
|
2801
|
-
}
|
|
2802
|
-
finally { if (e_8) throw e_8.error; }
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
2805
|
-
};
|
|
2806
|
-
FormStructureAndData.prototype.showAction = function (actionCode) {
|
|
2807
|
-
var actionObject = this.getActionObject(actionCode);
|
|
2808
|
-
return (actionObject) ? actionObject.show() : null;
|
|
2809
|
-
};
|
|
2810
|
-
FormStructureAndData.prototype.hideAction = function (actionCode) {
|
|
2811
|
-
var actionObject = this.getActionObject(actionCode);
|
|
2812
|
-
return (actionObject) ? actionObject.hide() : null;
|
|
2813
|
-
};
|
|
2814
|
-
FormStructureAndData.prototype.showActions = function (actionArray) {
|
|
2815
|
-
var _this = this;
|
|
2816
|
-
var actionNames = (Array.isArray(actionArray)) ? actionArray : [actionArray];
|
|
2817
|
-
actionNames.forEach(function (actionCode) { return _this.showAction(actionCode); });
|
|
2818
|
-
};
|
|
2819
|
-
FormStructureAndData.prototype.hideActions = function (actionArray) {
|
|
2820
|
-
var _this = this;
|
|
2821
|
-
var actionNames = (Array.isArray(actionArray)) ? actionArray : [actionArray];
|
|
2822
|
-
actionNames.forEach(function (actionCode) { return _this.hideAction(actionCode); });
|
|
2823
|
-
};
|
|
2824
|
-
FormStructureAndData.prototype.enableAction = function (actionCode) {
|
|
2825
|
-
var actionObject = this.getActionObject(actionCode);
|
|
2826
|
-
return (actionObject) ? actionObject.enable() : null;
|
|
2827
|
-
};
|
|
2828
|
-
FormStructureAndData.prototype.disableAction = function (actionCode) {
|
|
2829
|
-
var actionObject = this.getActionObject(actionCode);
|
|
2830
|
-
return (actionObject) ? actionObject.disable() : null;
|
|
2831
|
-
};
|
|
2832
|
-
FormStructureAndData.prototype.enableActions = function (actionArray) {
|
|
2833
|
-
var _this = this;
|
|
2834
|
-
var actionNames = (Array.isArray(actionArray)) ? actionArray : [actionArray];
|
|
2835
|
-
actionNames.forEach(function (actionCode) { return _this.enableAction(actionCode); });
|
|
2836
|
-
};
|
|
2837
|
-
FormStructureAndData.prototype.disableActions = function (actionArray) {
|
|
2838
|
-
var _this = this;
|
|
2839
|
-
var actionNames = (Array.isArray(actionArray)) ? actionArray : [actionArray];
|
|
2840
|
-
actionNames.forEach(function (actionCode) { return _this.disableAction(actionCode); });
|
|
2841
|
-
};
|
|
2554
|
+
// Fields
|
|
2555
|
+
FormStructureAndData.prototype.getFields = function () { return this._fieldArray; };
|
|
2556
|
+
FormStructureAndData.prototype.getFieldNames = function () { return this._fieldArray.map(function (field) { return field.fieldCode; }); };
|
|
2557
|
+
FormStructureAndData.prototype.getField = function (elementId) { var _a; return (elementId && ((_a = this._fields) === null || _a === void 0 ? void 0 : _a[elementId])) ? this._fields[elementId] : null; };
|
|
2842
2558
|
Object.defineProperty(FormStructureAndData.prototype, "fields", {
|
|
2843
|
-
get: function () { return this.
|
|
2559
|
+
get: function () { return this._fields; },
|
|
2844
2560
|
enumerable: false,
|
|
2845
2561
|
configurable: true
|
|
2846
2562
|
});
|
|
2847
2563
|
FormStructureAndData.prototype.enableField = function (fieldCode) {
|
|
2848
|
-
var fieldObject = this.
|
|
2564
|
+
var fieldObject = this.getField(fieldCode);
|
|
2849
2565
|
return (fieldObject) ? fieldObject.enable() : null;
|
|
2850
2566
|
};
|
|
2851
2567
|
FormStructureAndData.prototype.disableField = function (fieldCode) {
|
|
2852
|
-
var fieldObject = this.
|
|
2568
|
+
var fieldObject = this.getField(fieldCode);
|
|
2853
2569
|
return (fieldObject) ? fieldObject.disable() : null;
|
|
2854
2570
|
};
|
|
2855
2571
|
FormStructureAndData.prototype.getFieldValue = function (fieldCode) {
|
|
2856
|
-
var fieldObject = this.
|
|
2572
|
+
var fieldObject = this.getField(fieldCode);
|
|
2857
2573
|
return (fieldObject) ? fieldObject.getValue() : null;
|
|
2858
2574
|
};
|
|
2859
2575
|
FormStructureAndData.prototype.getFieldsValues = function (fieldCodesArray) {
|
|
@@ -2865,39 +2581,39 @@
|
|
|
2865
2581
|
for (var index = 0; index < fieldCodesArray.length; index++) {
|
|
2866
2582
|
var fieldCode = fieldCodesArray[index];
|
|
2867
2583
|
if (fieldCode) {
|
|
2868
|
-
resultObject[fieldCode] = (_c = (_b = (_a = this.
|
|
2584
|
+
resultObject[fieldCode] = (_c = (_b = (_a = this._fields) === null || _a === void 0 ? void 0 : _a[fieldCode]) === null || _b === void 0 ? void 0 : _b.getValue()) !== null && _c !== void 0 ? _c : null;
|
|
2869
2585
|
}
|
|
2870
2586
|
}
|
|
2871
2587
|
return resultObject;
|
|
2872
2588
|
};
|
|
2873
2589
|
FormStructureAndData.prototype.getFieldOptions = function (fieldCode) {
|
|
2874
|
-
var fieldObject = this.
|
|
2590
|
+
var fieldObject = this.getField(fieldCode);
|
|
2875
2591
|
return (fieldObject) ? fieldObject.getFieldOptions() : null;
|
|
2876
2592
|
};
|
|
2877
2593
|
FormStructureAndData.prototype.setFieldValue = function (fieldCode, fieldValue) {
|
|
2878
|
-
var fieldObject = this.
|
|
2594
|
+
var fieldObject = this.getField(fieldCode);
|
|
2879
2595
|
return (fieldObject) ? fieldObject.setValue(fieldValue) : null;
|
|
2880
2596
|
};
|
|
2881
2597
|
FormStructureAndData.prototype.setFieldError = function (code, message, type) {
|
|
2882
2598
|
if (type === void 0) { type = 'error'; }
|
|
2883
|
-
var fieldObject = this.
|
|
2599
|
+
var fieldObject = this.getField(code);
|
|
2884
2600
|
return (fieldObject) ? fieldObject.setError(code, message, type) : null;
|
|
2885
2601
|
};
|
|
2886
2602
|
FormStructureAndData.prototype.setFieldIntrinsicErrorMessage = function (code, message) {
|
|
2887
|
-
var fieldObject = this.
|
|
2603
|
+
var fieldObject = this.getField(code);
|
|
2888
2604
|
return (fieldObject) ? fieldObject.setIntrinsicErrorMessage(message) : null;
|
|
2889
2605
|
};
|
|
2890
2606
|
FormStructureAndData.prototype.setFieldRequired = function (fieldCode, required) {
|
|
2891
|
-
var fieldObject = this.
|
|
2607
|
+
var fieldObject = this.getField(fieldCode);
|
|
2892
2608
|
return (fieldObject) ? fieldObject.required = required : null;
|
|
2893
2609
|
};
|
|
2894
2610
|
FormStructureAndData.prototype.setFieldErrorMessage = function (fieldCode, errorMessage) {
|
|
2895
|
-
var fieldObject = this.
|
|
2611
|
+
var fieldObject = this.getField(fieldCode);
|
|
2896
2612
|
return (fieldObject) ? fieldObject.setErrorMessage(errorMessage) : null;
|
|
2897
2613
|
};
|
|
2898
2614
|
FormStructureAndData.prototype.setFieldOptions = function (fieldCode, optionsArray, idAttribute, nameAttribute) {
|
|
2899
|
-
var
|
|
2900
|
-
var fieldObject = this.
|
|
2615
|
+
var e_5, _d;
|
|
2616
|
+
var fieldObject = this.getField(fieldCode);
|
|
2901
2617
|
if (fieldObject && optionsArray && optionsArray.length > 0) {
|
|
2902
2618
|
var fieldOptions = [];
|
|
2903
2619
|
try {
|
|
@@ -2910,12 +2626,12 @@
|
|
|
2910
2626
|
fieldOptions.push(fieldOption);
|
|
2911
2627
|
}
|
|
2912
2628
|
}
|
|
2913
|
-
catch (
|
|
2629
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
2914
2630
|
finally {
|
|
2915
2631
|
try {
|
|
2916
2632
|
if (optionsArray_1_1 && !optionsArray_1_1.done && (_d = optionsArray_1.return)) _d.call(optionsArray_1);
|
|
2917
2633
|
}
|
|
2918
|
-
finally { if (
|
|
2634
|
+
finally { if (e_5) throw e_5.error; }
|
|
2919
2635
|
}
|
|
2920
2636
|
fieldObject.setFieldOptions(fieldOptions);
|
|
2921
2637
|
}
|
|
@@ -2930,7 +2646,7 @@
|
|
|
2930
2646
|
fieldUniverse = fieldArray;
|
|
2931
2647
|
}
|
|
2932
2648
|
else if (sectionCode && !subSectionCode) {
|
|
2933
|
-
var sectionObject = this.
|
|
2649
|
+
var sectionObject = this.getSection(sectionCode);
|
|
2934
2650
|
fieldUniverse = sectionObject === null || sectionObject === void 0 ? void 0 : sectionObject.getFieldNames();
|
|
2935
2651
|
}
|
|
2936
2652
|
else if (sectionCode && subSectionCode) {
|
|
@@ -2944,12 +2660,12 @@
|
|
|
2944
2660
|
return fieldUniverse;
|
|
2945
2661
|
}
|
|
2946
2662
|
return fieldUniverse.filter(function (fld) {
|
|
2947
|
-
var fieldObject = _this.
|
|
2663
|
+
var fieldObject = _this.getField(fld);
|
|
2948
2664
|
return (fieldObject && filterFunc(fieldObject));
|
|
2949
2665
|
});
|
|
2950
2666
|
};
|
|
2951
2667
|
FormStructureAndData.prototype.applyProcessToFieldSet = function (processFunc, fieldArray, sectionCode, subSectionCode) {
|
|
2952
|
-
var
|
|
2668
|
+
var e_6, _d;
|
|
2953
2669
|
if (fieldArray === void 0) { fieldArray = null; }
|
|
2954
2670
|
if (sectionCode === void 0) { sectionCode = null; }
|
|
2955
2671
|
if (subSectionCode === void 0) { subSectionCode = null; }
|
|
@@ -2959,7 +2675,7 @@
|
|
|
2959
2675
|
try {
|
|
2960
2676
|
for (var fieldUniverse_1 = __values(fieldUniverse), fieldUniverse_1_1 = fieldUniverse_1.next(); !fieldUniverse_1_1.done; fieldUniverse_1_1 = fieldUniverse_1.next()) {
|
|
2961
2677
|
var fieldCode = fieldUniverse_1_1.value;
|
|
2962
|
-
var fieldObject = this.
|
|
2678
|
+
var fieldObject = this.getField(fieldCode);
|
|
2963
2679
|
if (fieldObject) {
|
|
2964
2680
|
try {
|
|
2965
2681
|
processFunc(fieldObject);
|
|
@@ -2971,12 +2687,12 @@
|
|
|
2971
2687
|
}
|
|
2972
2688
|
}
|
|
2973
2689
|
}
|
|
2974
|
-
catch (
|
|
2690
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
2975
2691
|
finally {
|
|
2976
2692
|
try {
|
|
2977
2693
|
if (fieldUniverse_1_1 && !fieldUniverse_1_1.done && (_d = fieldUniverse_1.return)) _d.call(fieldUniverse_1);
|
|
2978
2694
|
}
|
|
2979
|
-
finally { if (
|
|
2695
|
+
finally { if (e_6) throw e_6.error; }
|
|
2980
2696
|
}
|
|
2981
2697
|
}
|
|
2982
2698
|
return fieldSetSize;
|
|
@@ -3086,35 +2802,163 @@
|
|
|
3086
2802
|
}
|
|
3087
2803
|
return false;
|
|
3088
2804
|
};
|
|
3089
|
-
FormStructureAndData.prototype
|
|
3090
|
-
|
|
3091
|
-
|
|
2805
|
+
Object.defineProperty(FormStructureAndData.prototype, "actions", {
|
|
2806
|
+
// Acciones
|
|
2807
|
+
get: function () { return this._actions; },
|
|
2808
|
+
enumerable: false,
|
|
2809
|
+
configurable: true
|
|
2810
|
+
});
|
|
2811
|
+
FormStructureAndData.prototype.getActionsByAttribute = function (name, value) { return this._actionArray.filter(function (actionItem) { return actionItem.matchAttribute(name, value); }); };
|
|
2812
|
+
FormStructureAndData.prototype.getActions = function () { return this._actionArray; };
|
|
2813
|
+
FormStructureAndData.prototype.getAction = function (code) { var _a; return (code && ((_a = this._actions) === null || _a === void 0 ? void 0 : _a[code])) ? this._actions[code] : null; };
|
|
2814
|
+
FormStructureAndData.prototype.showActions = function (codes) { return this.execOnActions(codes, SHOW); };
|
|
2815
|
+
FormStructureAndData.prototype.hideActions = function (codes) { return this.execOnActions(codes, HIDE); };
|
|
2816
|
+
FormStructureAndData.prototype.enableActions = function (codes) { return this.execOnActions(codes, ENABLE); };
|
|
2817
|
+
FormStructureAndData.prototype.disableActions = function (codes) { return this.execOnActions(codes, DISABLE); };
|
|
2818
|
+
FormStructureAndData.prototype.execOnActions = function (codes, functionName) {
|
|
2819
|
+
var _this = this;
|
|
2820
|
+
var actionCodes = (Array.isArray(codes)) ? codes : (codes ? [codes] : []);
|
|
2821
|
+
if (!functionName || actionCodes.length === 0) {
|
|
2822
|
+
return;
|
|
2823
|
+
}
|
|
2824
|
+
actionCodes.forEach(function (code) {
|
|
2825
|
+
var _a;
|
|
2826
|
+
var action = _this.getAction(code);
|
|
2827
|
+
(_a = action === null || action === void 0 ? void 0 : action[functionName]) === null || _a === void 0 ? void 0 : _a.call(action);
|
|
2828
|
+
});
|
|
2829
|
+
};
|
|
2830
|
+
// Tablas
|
|
2831
|
+
FormStructureAndData.prototype.tables = function () { return this.getTables(); };
|
|
2832
|
+
FormStructureAndData.prototype.getTables = function () { return this._tableArray; };
|
|
2833
|
+
FormStructureAndData.prototype.getTable = function (code) { var _a; return (code && ((_a = this._tables) === null || _a === void 0 ? void 0 : _a[code])) ? this._tables[code] : null; };
|
|
2834
|
+
FormStructureAndData.prototype.enableTables = function (codes) { return this.execOnTables(codes, ENABLE); };
|
|
2835
|
+
FormStructureAndData.prototype.disableTables = function (codes) { return this.execOnTables(codes, DISABLE); };
|
|
2836
|
+
FormStructureAndData.prototype.showTables = function (codes) { return this.execOnTables(codes, SHOW); };
|
|
2837
|
+
FormStructureAndData.prototype.hideTables = function (codes) { return this.execOnTables(codes, HIDE); };
|
|
2838
|
+
FormStructureAndData.prototype.cleanTables = function (codes) { return this.execOnTables(codes, CLEAN); };
|
|
2839
|
+
FormStructureAndData.prototype.execOnTables = function (codes, functionName) {
|
|
2840
|
+
var _this = this;
|
|
2841
|
+
var tableCodes = (Array.isArray(codes)) ? codes : (codes ? [codes] : []);
|
|
2842
|
+
if (!functionName || tableCodes.length === 0) {
|
|
2843
|
+
return;
|
|
2844
|
+
}
|
|
2845
|
+
tableCodes.forEach(function (code) {
|
|
2846
|
+
var _a;
|
|
2847
|
+
var table = _this.getTable(code);
|
|
2848
|
+
(_a = table === null || table === void 0 ? void 0 : table[functionName]) === null || _a === void 0 ? void 0 : _a.call(table);
|
|
2849
|
+
});
|
|
3092
2850
|
};
|
|
3093
2851
|
FormStructureAndData.prototype.getTableRecord = function (tableCode, recordId) {
|
|
3094
|
-
var tableObject = this.
|
|
2852
|
+
var tableObject = this.getTable(tableCode);
|
|
3095
2853
|
return (tableObject) ? tableObject.getTableRecord(recordId) : null;
|
|
3096
2854
|
};
|
|
3097
|
-
FormStructureAndData.prototype
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
2855
|
+
Object.defineProperty(FormStructureAndData.prototype, "sections", {
|
|
2856
|
+
// Secciones
|
|
2857
|
+
get: function () { return this._sectionArray; },
|
|
2858
|
+
enumerable: false,
|
|
2859
|
+
configurable: true
|
|
2860
|
+
});
|
|
2861
|
+
FormStructureAndData.prototype.getSectionsByAttribute = function (name, value) { return this._sectionArray.filter(function (item) { return item.matchAttribute(name, value); }); };
|
|
2862
|
+
Object.defineProperty(FormStructureAndData.prototype, "sectionTitles", {
|
|
2863
|
+
get: function () { return this._sectionArray.map(function (formSection) { return formSection.sectionTitle; }); },
|
|
2864
|
+
enumerable: false,
|
|
2865
|
+
configurable: true
|
|
2866
|
+
});
|
|
2867
|
+
Object.defineProperty(FormStructureAndData.prototype, "visibleSections", {
|
|
2868
|
+
get: function () { return this._sectionArray.filter(function (sec) { return sec.visible; }); },
|
|
2869
|
+
enumerable: false,
|
|
2870
|
+
configurable: true
|
|
2871
|
+
});
|
|
2872
|
+
FormStructureAndData.prototype.getSection = function (code) { var _a; return (code && ((_a = this._sections) === null || _a === void 0 ? void 0 : _a[code])) ? this._sections[code] : null; };
|
|
2873
|
+
FormStructureAndData.prototype.showSections = function (names) { this.execOnSections(names, SHOW); };
|
|
2874
|
+
FormStructureAndData.prototype.hideSections = function (names) { this.execOnSections(names, HIDE); };
|
|
2875
|
+
FormStructureAndData.prototype.activeSection = function () { return this._exclusiveSectionsByAttr[ACTIVE]; };
|
|
2876
|
+
FormStructureAndData.prototype.getSubSection = function (code, subCode) { var _a, _b; return (_b = (_a = this.getSection(code)) === null || _a === void 0 ? void 0 : _a.getSubsection(subCode)) !== null && _b !== void 0 ? _b : null; };
|
|
2877
|
+
FormStructureAndData.prototype.showSubSections = function (code, subCodes) { return this.execOnSubSections(code, subCodes, SHOW); };
|
|
2878
|
+
FormStructureAndData.prototype.hideSubSections = function (code, subCodes) { return this.execOnSubSections(code, subCodes, HIDE); };
|
|
2879
|
+
FormStructureAndData.prototype.activateSection = function (code) {
|
|
2880
|
+
var _a, _b;
|
|
2881
|
+
if (code === this._exclusiveSectionsByAttr[ACTIVE]) {
|
|
2882
|
+
return;
|
|
2883
|
+
}
|
|
2884
|
+
(_a = this.getSection(this.activeSection())) === null || _a === void 0 ? void 0 : _a.inactivate();
|
|
2885
|
+
(_b = this.getSection(code)) === null || _b === void 0 ? void 0 : _b.activate();
|
|
2886
|
+
this._exclusiveSectionsByAttr[ACTIVE] = code;
|
|
3104
2887
|
};
|
|
3105
|
-
FormStructureAndData.prototype.
|
|
2888
|
+
FormStructureAndData.prototype.execOnSections = function (codes, functionName) {
|
|
3106
2889
|
var _this = this;
|
|
3107
|
-
var
|
|
3108
|
-
|
|
2890
|
+
var sectionCodes = (Array.isArray(codes)) ? codes : (codes ? [codes] : []);
|
|
2891
|
+
if (!functionName || sectionCodes.length === 0) {
|
|
2892
|
+
return;
|
|
2893
|
+
}
|
|
2894
|
+
sectionCodes.forEach(function (code) {
|
|
2895
|
+
var _a;
|
|
2896
|
+
var section = _this.getSection(code);
|
|
2897
|
+
(_a = section === null || section === void 0 ? void 0 : section[functionName]) === null || _a === void 0 ? void 0 : _a.call(section);
|
|
2898
|
+
});
|
|
3109
2899
|
};
|
|
3110
|
-
FormStructureAndData.prototype.
|
|
3111
|
-
var
|
|
3112
|
-
var
|
|
3113
|
-
|
|
2900
|
+
FormStructureAndData.prototype.execOnSubSections = function (code, subNames, functionName) {
|
|
2901
|
+
var e_7, _d;
|
|
2902
|
+
var _a;
|
|
2903
|
+
var subCodes = (Array.isArray(subNames)) ? subNames : (subNames ? [subNames] : []);
|
|
2904
|
+
var section = this.getSection(code);
|
|
2905
|
+
if (!functionName || !section || subCodes.length === 0) {
|
|
2906
|
+
return;
|
|
2907
|
+
}
|
|
2908
|
+
try {
|
|
2909
|
+
for (var subCodes_1 = __values(subCodes), subCodes_1_1 = subCodes_1.next(); !subCodes_1_1.done; subCodes_1_1 = subCodes_1.next()) {
|
|
2910
|
+
var subCode = subCodes_1_1.value;
|
|
2911
|
+
var subSection = this.getSubSection(code, subCode);
|
|
2912
|
+
(_a = subSection === null || subSection === void 0 ? void 0 : subSection[functionName]) === null || _a === void 0 ? void 0 : _a.call(subSection);
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
2916
|
+
finally {
|
|
2917
|
+
try {
|
|
2918
|
+
if (subCodes_1_1 && !subCodes_1_1.done && (_d = subCodes_1.return)) _d.call(subCodes_1);
|
|
2919
|
+
}
|
|
2920
|
+
finally { if (e_7) throw e_7.error; }
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
/**
|
|
2924
|
+
* Métodos propios de gestión del formulario
|
|
2925
|
+
*/
|
|
2926
|
+
FormStructureAndData.prototype.cleanData = function () {
|
|
2927
|
+
var e_8, _d, e_9, _e;
|
|
2928
|
+
if (this._fieldArray) {
|
|
2929
|
+
try {
|
|
2930
|
+
for (var _f = __values(this._fieldArray), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
2931
|
+
var recordField = _g.value;
|
|
2932
|
+
recordField.setValue(recordField.defaultValue);
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
2936
|
+
finally {
|
|
2937
|
+
try {
|
|
2938
|
+
if (_g && !_g.done && (_d = _f.return)) _d.call(_f);
|
|
2939
|
+
}
|
|
2940
|
+
finally { if (e_8) throw e_8.error; }
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
if (this._tableArray) {
|
|
2944
|
+
try {
|
|
2945
|
+
for (var _h = __values(this._tableArray), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
2946
|
+
var formTable = _j.value;
|
|
2947
|
+
formTable.clean();
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
2951
|
+
finally {
|
|
2952
|
+
try {
|
|
2953
|
+
if (_j && !_j.done && (_e = _h.return)) _e.call(_h);
|
|
2954
|
+
}
|
|
2955
|
+
finally { if (e_9) throw e_9.error; }
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
3114
2958
|
};
|
|
3115
2959
|
/** payload para servicios Tuain */
|
|
3116
2960
|
FormStructureAndData.prototype.getPayload = function () {
|
|
3117
|
-
var
|
|
2961
|
+
var e_10, _d, e_11, _e;
|
|
3118
2962
|
var formData = {
|
|
3119
2963
|
fields: [],
|
|
3120
2964
|
tables: [],
|
|
@@ -3137,12 +2981,12 @@
|
|
|
3137
2981
|
}
|
|
3138
2982
|
}
|
|
3139
2983
|
}
|
|
3140
|
-
catch (
|
|
2984
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
3141
2985
|
finally {
|
|
3142
2986
|
try {
|
|
3143
2987
|
if (formFields_2_1 && !formFields_2_1.done && (_d = formFields_2.return)) _d.call(formFields_2);
|
|
3144
2988
|
}
|
|
3145
|
-
finally { if (
|
|
2989
|
+
finally { if (e_10) throw e_10.error; }
|
|
3146
2990
|
}
|
|
3147
2991
|
}
|
|
3148
2992
|
var tables = this.getTables();
|
|
@@ -3163,12 +3007,12 @@
|
|
|
3163
3007
|
formData.tables.push(formTable);
|
|
3164
3008
|
}
|
|
3165
3009
|
}
|
|
3166
|
-
catch (
|
|
3010
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
3167
3011
|
finally {
|
|
3168
3012
|
try {
|
|
3169
3013
|
if (tables_2_1 && !tables_2_1.done && (_e = tables_2.return)) _e.call(tables_2);
|
|
3170
3014
|
}
|
|
3171
|
-
finally { if (
|
|
3015
|
+
finally { if (e_11) throw e_11.error; }
|
|
3172
3016
|
}
|
|
3173
3017
|
}
|
|
3174
3018
|
return formData;
|
|
@@ -3324,11 +3168,87 @@
|
|
|
3324
3168
|
this.cleanStart();
|
|
3325
3169
|
this.customPreProcessing();
|
|
3326
3170
|
}
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3171
|
+
BasicFormComponent.prototype.assignFunctions = function () {
|
|
3172
|
+
var _a;
|
|
3173
|
+
var functionsMapped = [
|
|
3174
|
+
['getCurrentState', 'getCurrentState'],
|
|
3175
|
+
['getCurrentMode', 'getCurrentState'],
|
|
3176
|
+
['getTitle', 'getTitle'],
|
|
3177
|
+
['setTitle', 'setTitle'],
|
|
3178
|
+
['getAction', 'getAction'],
|
|
3179
|
+
['supportState', 'supportState'],
|
|
3180
|
+
['getImmutableElement', 'getImmutableElement'],
|
|
3181
|
+
['getExtraInfo', 'getExtraInfo'],
|
|
3182
|
+
['cleanData', 'cleanData'],
|
|
3183
|
+
['getFields', 'getFields'],
|
|
3184
|
+
['getFieldNames', 'getFieldNames'],
|
|
3185
|
+
['getField', 'getField'],
|
|
3186
|
+
['enableField', 'enableField'],
|
|
3187
|
+
['disableField', 'disableField'],
|
|
3188
|
+
['getFieldValue', 'getFieldValue'],
|
|
3189
|
+
['getFieldsValues', 'getFieldsValues'],
|
|
3190
|
+
['getFieldOptions', 'getFieldOptions'],
|
|
3191
|
+
['setFieldValue', 'setFieldValue'],
|
|
3192
|
+
['setFieldRequired', 'setFieldRequired'],
|
|
3193
|
+
['setFieldErrorMessage', 'setFieldErrorMessage'],
|
|
3194
|
+
['setFieldError', 'setFieldError'],
|
|
3195
|
+
['setFieldIntrinsicErrorMessage', 'setFieldIntrinsicErrorMessage'],
|
|
3196
|
+
['setFieldOptions', 'setFieldOptions'],
|
|
3197
|
+
['getFieldSet', 'getFieldSet'],
|
|
3198
|
+
['applyProcessToFieldSet', 'applyProcessToFieldSet'],
|
|
3199
|
+
['applyProcessToAllFields', 'applyProcessToFieldSet'],
|
|
3200
|
+
['cleanFields', 'cleanFields'],
|
|
3201
|
+
['getRequiredFields', 'getRequiredFields'],
|
|
3202
|
+
['getRequiredEmptyFields', 'getRequiredEmptyFields'],
|
|
3203
|
+
['getChangedFields', 'getChangedFields'],
|
|
3204
|
+
['getFieldsWithValidationIssues', 'getFieldsWithValidationIssues'],
|
|
3205
|
+
['tagFieldsWithError', 'tagFieldsWithError'],
|
|
3206
|
+
['cleanErrorFields', 'cleanErrorFields'],
|
|
3207
|
+
['showLabelFields', 'showLabelFields'],
|
|
3208
|
+
['hideLabelFields', 'hideLabelFields'],
|
|
3209
|
+
['enableFields', 'enableFields'],
|
|
3210
|
+
['disableFields', 'disableFields'],
|
|
3211
|
+
['enableEditFields', 'enableEditFields'],
|
|
3212
|
+
['disableEditFields', 'disableEditFields'],
|
|
3213
|
+
['showFields', 'showFields'],
|
|
3214
|
+
['hideFields', 'hideFields'],
|
|
3215
|
+
['getActionsByAttribute', 'getActionsByAttribute'],
|
|
3216
|
+
['getAction', 'getAction'],
|
|
3217
|
+
['showActions', 'showActions'],
|
|
3218
|
+
['hideActions', 'hideActions'],
|
|
3219
|
+
['enableActions', 'enableActions'],
|
|
3220
|
+
['disableActions', 'disableActions'],
|
|
3221
|
+
['showAction', 'showActions'],
|
|
3222
|
+
['hideAction', 'hideActions'],
|
|
3223
|
+
['enableAction', 'enableActions'],
|
|
3224
|
+
['disableAction', 'disableActions'],
|
|
3225
|
+
['activateSection', 'activateSection'],
|
|
3226
|
+
['getSubSection', 'getSubSection'],
|
|
3227
|
+
['getSection', 'getSection'],
|
|
3228
|
+
['showSection', 'showSections'],
|
|
3229
|
+
['hideSection', 'hideSections'],
|
|
3230
|
+
['showSections', 'showSections'],
|
|
3231
|
+
['hideSections', 'hideSections'],
|
|
3232
|
+
['showSubSection', 'showSubSections'],
|
|
3233
|
+
['hideSubSection', 'hideSubSections'],
|
|
3234
|
+
['showSubSections', 'showSubSections'],
|
|
3235
|
+
['hideSubSections', 'hideSubSections'],
|
|
3236
|
+
['getTables', 'getTables'],
|
|
3237
|
+
['getTable', 'getTable'],
|
|
3238
|
+
['showTables', 'showTables'],
|
|
3239
|
+
['hideTables', 'hideTables'],
|
|
3240
|
+
['showTable', 'showTables'],
|
|
3241
|
+
['hideTable', 'hideTables'],
|
|
3242
|
+
['cleanTables', 'cleanTables'],
|
|
3243
|
+
['cleanTable', 'cleanTables'],
|
|
3244
|
+
['getTableRecord', 'getTableRecord'],
|
|
3245
|
+
['changeState', 'changeState'],
|
|
3246
|
+
];
|
|
3247
|
+
for (var index = 0; index < functionsMapped.length; index++) {
|
|
3248
|
+
var _j = __read(functionsMapped[index], 2), name = _j[0], structureName = _j[1];
|
|
3249
|
+
this[name] = (_a = this.formStructure) === null || _a === void 0 ? void 0 : _a[structureName];
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3332
3252
|
BasicFormComponent.prototype.setConfig = function (formConfig) {
|
|
3333
3253
|
this.formConfig = formConfig;
|
|
3334
3254
|
};
|
|
@@ -3360,11 +3280,32 @@
|
|
|
3360
3280
|
this.tableGetDataStart = {};
|
|
3361
3281
|
this.tableGetDataFinish = {};
|
|
3362
3282
|
};
|
|
3283
|
+
Object.defineProperty(BasicFormComponent.prototype, "formManager", {
|
|
3284
|
+
get: function () { return this; },
|
|
3285
|
+
enumerable: false,
|
|
3286
|
+
configurable: true
|
|
3287
|
+
});
|
|
3288
|
+
Object.defineProperty(BasicFormComponent.prototype, "formCode", {
|
|
3289
|
+
get: function () { return this.name; },
|
|
3290
|
+
set: function (name) { this.name = name; },
|
|
3291
|
+
enumerable: false,
|
|
3292
|
+
configurable: true
|
|
3293
|
+
});
|
|
3294
|
+
Object.defineProperty(BasicFormComponent.prototype, "inServerProcess", {
|
|
3295
|
+
get: function () { return this.busy; },
|
|
3296
|
+
enumerable: false,
|
|
3297
|
+
configurable: true
|
|
3298
|
+
});
|
|
3363
3299
|
Object.defineProperty(BasicFormComponent.prototype, "form", {
|
|
3364
3300
|
get: function () { return this.formStructure; },
|
|
3365
3301
|
enumerable: false,
|
|
3366
3302
|
configurable: true
|
|
3367
3303
|
});
|
|
3304
|
+
Object.defineProperty(BasicFormComponent.prototype, "visibleSections", {
|
|
3305
|
+
get: function () { return this.formStructure.visibleSections; },
|
|
3306
|
+
enumerable: false,
|
|
3307
|
+
configurable: true
|
|
3308
|
+
});
|
|
3368
3309
|
Object.defineProperty(BasicFormComponent.prototype, "currentState", {
|
|
3369
3310
|
get: function () { return this.formStructure.state; },
|
|
3370
3311
|
set: function (state) { this.formStructure.changeState(state); },
|
|
@@ -3386,128 +3327,23 @@
|
|
|
3386
3327
|
enumerable: false,
|
|
3387
3328
|
configurable: true
|
|
3388
3329
|
});
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
BasicFormComponent.prototype
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
BasicFormComponent.prototype
|
|
3401
|
-
|
|
3402
|
-
BasicFormComponent.prototype.disableField = function (fieldCode) { return this.formStructure.disableField(fieldCode); };
|
|
3403
|
-
BasicFormComponent.prototype.getFieldValue = function (fieldCode) { return this.formStructure.getFieldValue(fieldCode); };
|
|
3404
|
-
BasicFormComponent.prototype.getFieldsValues = function (fieldCodesArray) { return this.formStructure.getFieldsValues(fieldCodesArray); };
|
|
3405
|
-
BasicFormComponent.prototype.getFieldOptions = function (fieldCode) { return this.formStructure.getFieldOptions(fieldCode); };
|
|
3406
|
-
BasicFormComponent.prototype.setFieldValue = function (fieldCode, fieldValue) { return this.formStructure.setFieldValue(fieldCode, fieldValue); };
|
|
3407
|
-
BasicFormComponent.prototype.setFieldRequired = function (fieldCode, required) { return this.formStructure.setFieldRequired(fieldCode, required); };
|
|
3408
|
-
BasicFormComponent.prototype.setFieldErrorMessage = function (fieldCode, errorMessage) { return this.formStructure.setFieldErrorMessage(fieldCode, errorMessage); };
|
|
3409
|
-
BasicFormComponent.prototype.setFieldError = function (code, message, type) {
|
|
3410
|
-
if (type === void 0) { type = 'error'; }
|
|
3411
|
-
return this.formStructure.setFieldError(code, message, type);
|
|
3412
|
-
};
|
|
3413
|
-
BasicFormComponent.prototype.setFieldIntrinsicErrorMessage = function (code, message) { return this.formStructure.setFieldIntrinsicErrorMessage(code, message); };
|
|
3414
|
-
BasicFormComponent.prototype.setFieldOptions = function (fieldCode, optionsArray, idAttribute, nameAttribute) {
|
|
3415
|
-
return this.formStructure.setFieldOptions(fieldCode, optionsArray, idAttribute, nameAttribute);
|
|
3416
|
-
};
|
|
3417
|
-
BasicFormComponent.prototype.getFieldSet = function (filterFunc, fieldArray, sectionCode, subSectionCode) {
|
|
3418
|
-
return this.formStructure.getFieldSet(filterFunc, fieldArray, sectionCode, subSectionCode);
|
|
3419
|
-
};
|
|
3420
|
-
BasicFormComponent.prototype.applyProcessToFieldSet = function (processFunc, fieldArray, sectionCode, subSectionCode) {
|
|
3421
|
-
return this.formStructure.applyProcessToFieldSet(processFunc, fieldArray, sectionCode, subSectionCode);
|
|
3422
|
-
};
|
|
3423
|
-
BasicFormComponent.prototype.applyProcessToAllFields = function (processFunc) { return this.formStructure.applyProcessToFieldSet(processFunc); };
|
|
3424
|
-
BasicFormComponent.prototype.cleanFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3425
|
-
return this.formStructure.cleanFields(fieldArray, sectionCode, subSectionCode);
|
|
3426
|
-
};
|
|
3427
|
-
BasicFormComponent.prototype.getRequiredFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3428
|
-
return this.formStructure.getRequiredFields(fieldArray, sectionCode, subSectionCode);
|
|
3429
|
-
};
|
|
3430
|
-
BasicFormComponent.prototype.getRequiredEmptyFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3431
|
-
return this.formStructure.getRequiredEmptyFields(fieldArray, sectionCode, subSectionCode);
|
|
3432
|
-
};
|
|
3433
|
-
BasicFormComponent.prototype.getChangedFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3434
|
-
return this.formStructure.getChangedFields(fieldArray, sectionCode, subSectionCode);
|
|
3435
|
-
};
|
|
3436
|
-
BasicFormComponent.prototype.getFieldsWithValidationIssues = function (fieldArray, sectionCode, subSectionCode) {
|
|
3437
|
-
return this.formStructure.getFieldsWithValidationIssues(fieldArray, sectionCode, subSectionCode);
|
|
3438
|
-
};
|
|
3439
|
-
BasicFormComponent.prototype.tagFieldsWithError = function (errorMessage, fieldArray, sectionCode, subSectionCode) {
|
|
3440
|
-
return this.formStructure.tagFieldsWithError(errorMessage, fieldArray, sectionCode, subSectionCode);
|
|
3441
|
-
};
|
|
3442
|
-
BasicFormComponent.prototype.cleanErrorFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3443
|
-
return this.formStructure.cleanErrorFields(fieldArray, sectionCode, subSectionCode);
|
|
3444
|
-
};
|
|
3445
|
-
BasicFormComponent.prototype.showLabelFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3446
|
-
return this.formStructure.showLabelFields(fieldArray, sectionCode, subSectionCode);
|
|
3447
|
-
};
|
|
3448
|
-
BasicFormComponent.prototype.hideLabelFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3449
|
-
return this.formStructure.hideLabelFields(fieldArray, sectionCode, subSectionCode);
|
|
3450
|
-
};
|
|
3451
|
-
BasicFormComponent.prototype.enableFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3452
|
-
return this.formStructure.enableFields(fieldArray, sectionCode, subSectionCode);
|
|
3453
|
-
};
|
|
3454
|
-
BasicFormComponent.prototype.disableFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3455
|
-
return this.formStructure.disableFields(fieldArray, sectionCode, subSectionCode);
|
|
3456
|
-
};
|
|
3457
|
-
BasicFormComponent.prototype.enableEditFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3458
|
-
return this.formStructure.enableEditFields(fieldArray, sectionCode, subSectionCode);
|
|
3459
|
-
};
|
|
3460
|
-
BasicFormComponent.prototype.disableEditFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3461
|
-
return this.formStructure.disableEditFields(fieldArray, sectionCode, subSectionCode);
|
|
3462
|
-
};
|
|
3463
|
-
BasicFormComponent.prototype.showFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3464
|
-
return this.formStructure.showFields(fieldArray, sectionCode, subSectionCode);
|
|
3465
|
-
};
|
|
3466
|
-
BasicFormComponent.prototype.hideFields = function (fieldArray, sectionCode, subSectionCode) {
|
|
3467
|
-
return this.formStructure.hideFields(fieldArray, sectionCode, subSectionCode);
|
|
3468
|
-
};
|
|
3469
|
-
BasicFormComponent.prototype.getHeaderActions = function () { return this.formStructure.getHeaderActions(); };
|
|
3470
|
-
BasicFormComponent.prototype.getActionObject = function (elementId) { return this.formStructure.getActionObject(elementId); };
|
|
3471
|
-
BasicFormComponent.prototype.getAction = function (actionCode) { return this.getActionObject(actionCode); };
|
|
3472
|
-
BasicFormComponent.prototype.getActionDefinition = function (actionCode) { return this.getActionObject(actionCode); };
|
|
3473
|
-
BasicFormComponent.prototype.showAction = function (actionCode) { return this.formStructure.showAction(actionCode); };
|
|
3474
|
-
BasicFormComponent.prototype.hideAction = function (actionCode) { return this.formStructure.hideAction(actionCode); };
|
|
3475
|
-
BasicFormComponent.prototype.showActions = function (actionArray) { return this.formStructure.showActions(actionArray); };
|
|
3476
|
-
BasicFormComponent.prototype.hideActions = function (actionArray) { return this.formStructure.hideActions(actionArray); };
|
|
3477
|
-
BasicFormComponent.prototype.enableAction = function (actionCode) { return this.formStructure.enableAction(actionCode); };
|
|
3478
|
-
BasicFormComponent.prototype.disableAction = function (actionCode) { return this.formStructure.disableAction(actionCode); };
|
|
3479
|
-
BasicFormComponent.prototype.enableActions = function (actionArray) { return this.formStructure.enableActions(actionArray); };
|
|
3480
|
-
BasicFormComponent.prototype.disableActions = function (actionArray) { return this.formStructure.disableActions(actionArray); };
|
|
3481
|
-
BasicFormComponent.prototype.getStates = function () { return this.formStructure.getStates(); };
|
|
3482
|
-
BasicFormComponent.prototype.getSections = function () { return this.formStructure.getSections(); };
|
|
3483
|
-
Object.defineProperty(BasicFormComponent.prototype, "visibleSections", {
|
|
3484
|
-
get: function () { return this.formStructure.visibleSections; },
|
|
3330
|
+
Object.defineProperty(BasicFormComponent.prototype, "state", {
|
|
3331
|
+
get: function () { return this.getCurrentState(); },
|
|
3332
|
+
enumerable: false,
|
|
3333
|
+
configurable: true
|
|
3334
|
+
});
|
|
3335
|
+
Object.defineProperty(BasicFormComponent.prototype, "formRoute", {
|
|
3336
|
+
get: function () { return this._formRoute; },
|
|
3337
|
+
set: function (route) { this._formRoute = route; },
|
|
3338
|
+
enumerable: false,
|
|
3339
|
+
configurable: true
|
|
3340
|
+
});
|
|
3341
|
+
Object.defineProperty(BasicFormComponent.prototype, "subject", {
|
|
3342
|
+
get: function () { return this.formSubject; },
|
|
3485
3343
|
enumerable: false,
|
|
3486
3344
|
configurable: true
|
|
3487
3345
|
});
|
|
3488
|
-
|
|
3489
|
-
BasicFormComponent.prototype.activateSection = function (sectionCode) { return this.formStructure.activateSection(sectionCode); };
|
|
3490
|
-
BasicFormComponent.prototype.getSubSection = function (sectionCode, subsectionCode) { return this.formStructure.getSubSection(sectionCode, subsectionCode); };
|
|
3491
|
-
BasicFormComponent.prototype.numSections = function () { return this.formStructure.numSections(); };
|
|
3492
|
-
BasicFormComponent.prototype.getSectionsTitles = function () { return this.formStructure.getSectionsTitles(); };
|
|
3493
|
-
BasicFormComponent.prototype.getSectionObject = function (elementId) { return this.formStructure.getSectionObject(elementId); };
|
|
3494
|
-
BasicFormComponent.prototype.showSection = function (sectionCode) { return this.formStructure.showSection(sectionCode); };
|
|
3495
|
-
BasicFormComponent.prototype.hideSection = function (sectionCode) { return this.formStructure.hideSection(sectionCode); };
|
|
3496
|
-
BasicFormComponent.prototype.showSections = function (sectionArray) { return this.formStructure.showSections(sectionArray); };
|
|
3497
|
-
BasicFormComponent.prototype.hideSections = function (sectionArray) { return this.formStructure.hideSections(sectionArray); };
|
|
3498
|
-
BasicFormComponent.prototype.showSubSection = function (sectionCode, subSectionCode) { return this.formStructure.showSubSection(sectionCode, subSectionCode); };
|
|
3499
|
-
BasicFormComponent.prototype.hideSubSection = function (sectionCode, subSectionCode) { return this.formStructure.hideSubSection(sectionCode, subSectionCode); };
|
|
3500
|
-
BasicFormComponent.prototype.showSubSections = function (sectionCode, subSectionArray) { return this.formStructure.showSubSections(sectionCode, subSectionArray); };
|
|
3501
|
-
BasicFormComponent.prototype.hideSubSections = function (sectionCode, subSectionArray) { return this.formStructure.hideSubSections(sectionCode, subSectionArray); };
|
|
3502
|
-
BasicFormComponent.prototype.getTables = function () { return this.formStructure.getTables(); };
|
|
3503
|
-
BasicFormComponent.prototype.getTableObject = function (elementId) { return this.formStructure.getTableObject(elementId); };
|
|
3504
|
-
BasicFormComponent.prototype.getTable = function (tableName) { return this.getTableObject(tableName); };
|
|
3505
|
-
BasicFormComponent.prototype.showTable = function (tableName) { return this.formStructure.showTable(tableName); };
|
|
3506
|
-
BasicFormComponent.prototype.hideTable = function (tableName) { return this.formStructure.hideTable(tableName); };
|
|
3507
|
-
BasicFormComponent.prototype.showTables = function (tableArray) { return this.formStructure.showTables(tableArray); };
|
|
3508
|
-
BasicFormComponent.prototype.hideTables = function (tableArray) { return this.formStructure.hideTables(tableArray); };
|
|
3509
|
-
BasicFormComponent.prototype.cleanTable = function (tableName) { return this.formStructure.cleanTable(tableName); };
|
|
3510
|
-
BasicFormComponent.prototype.getTableRecord = function (tableName, recordId) { return this.formStructure.getTableRecord(tableName, recordId); };
|
|
3346
|
+
// Métodos virtuales
|
|
3511
3347
|
BasicFormComponent.prototype.customPreProcessing = function () { };
|
|
3512
3348
|
BasicFormComponent.prototype.customFormStart = function () { };
|
|
3513
3349
|
BasicFormComponent.prototype.displayActionServerError = function () { };
|
|
@@ -3516,6 +3352,43 @@
|
|
|
3516
3352
|
BasicFormComponent.prototype.showFieldInfo = function (fieldCode) { };
|
|
3517
3353
|
BasicFormComponent.prototype.showModalDialog = function (title, body, options, callback, params) { };
|
|
3518
3354
|
BasicFormComponent.prototype.openUploadDialog = function (title, body, options, callback, params) { };
|
|
3355
|
+
/**
|
|
3356
|
+
* @deprecated Use supportState
|
|
3357
|
+
*/
|
|
3358
|
+
BasicFormComponent.prototype.supportMode = function (state) { return this.supportState(state); };
|
|
3359
|
+
/**
|
|
3360
|
+
* @deprecated Use getField
|
|
3361
|
+
*/
|
|
3362
|
+
BasicFormComponent.prototype.getFieldObject = function (code) { return this.getField(code); };
|
|
3363
|
+
/**
|
|
3364
|
+
* @deprecated Use getAction
|
|
3365
|
+
*/
|
|
3366
|
+
BasicFormComponent.prototype.getActionObject = function (code) { return this.getAction(code); };
|
|
3367
|
+
/**
|
|
3368
|
+
* @deprecated Use getTable
|
|
3369
|
+
*/
|
|
3370
|
+
BasicFormComponent.prototype.getTableObject = function (code) { return this.getTable(code); };
|
|
3371
|
+
/**
|
|
3372
|
+
* @deprecated Use getSection
|
|
3373
|
+
*/
|
|
3374
|
+
BasicFormComponent.prototype.getSectionObject = function (code) { return this.getSection(code); };
|
|
3375
|
+
/**
|
|
3376
|
+
* @deprecated Use changeState
|
|
3377
|
+
*/
|
|
3378
|
+
BasicFormComponent.prototype.changeFormMode = function (state) { return this.changeState(state); };
|
|
3379
|
+
/**
|
|
3380
|
+
* @deprecated Use subject
|
|
3381
|
+
*/
|
|
3382
|
+
BasicFormComponent.prototype.getFormSubject = function () { return this.subject; };
|
|
3383
|
+
/**
|
|
3384
|
+
* @deprecated Use subject
|
|
3385
|
+
*/
|
|
3386
|
+
BasicFormComponent.prototype.getSubject = function () { return this.formSubject; };
|
|
3387
|
+
/**
|
|
3388
|
+
* @deprecated Use subject
|
|
3389
|
+
*/
|
|
3390
|
+
BasicFormComponent.prototype.getformSubject = function () { return this.getSubject(); };
|
|
3391
|
+
BasicFormComponent.prototype.numSections = function () { return this.formStructure.sections.length; };
|
|
3519
3392
|
BasicFormComponent.prototype.subscribeAppEvent = function (eventName, callback) {
|
|
3520
3393
|
this._eventEmiter.subscribe(eventName, callback);
|
|
3521
3394
|
};
|
|
@@ -3548,37 +3421,15 @@
|
|
|
3548
3421
|
this.errorMessage = errorMessage || '';
|
|
3549
3422
|
this.errorDetail = errorDetail || '';
|
|
3550
3423
|
};
|
|
3551
|
-
Object.defineProperty(BasicFormComponent.prototype, "formManager", {
|
|
3552
|
-
get: function () { return this; },
|
|
3553
|
-
enumerable: false,
|
|
3554
|
-
configurable: true
|
|
3555
|
-
});
|
|
3556
3424
|
BasicFormComponent.prototype.resetError = function () { this.setError(null, null, null); };
|
|
3557
3425
|
BasicFormComponent.prototype.getErrorType = function () { return this._errorType; };
|
|
3558
3426
|
BasicFormComponent.prototype.getErrorMessage = function () { return this.errorMessage; };
|
|
3559
3427
|
BasicFormComponent.prototype.getErrorDetail = function () { return this.errorDetail; };
|
|
3560
3428
|
BasicFormComponent.prototype.getErrorCode = function () { return this._errorType; };
|
|
3561
|
-
Object.defineProperty(BasicFormComponent.prototype, "formRoute", {
|
|
3562
|
-
get: function () { return this._formRoute; },
|
|
3563
|
-
set: function (route) { this._formRoute = route; },
|
|
3564
|
-
enumerable: false,
|
|
3565
|
-
configurable: true
|
|
3566
|
-
});
|
|
3567
|
-
BasicFormComponent.prototype.defineFormCode = function (name) { this.name = name; };
|
|
3568
|
-
BasicFormComponent.prototype.getCurrentState = function () { return this.formStructure.state; };
|
|
3569
|
-
BasicFormComponent.prototype.getCurrentMode = function () { return this.formStructure.state; };
|
|
3570
|
-
Object.defineProperty(BasicFormComponent.prototype, "formCode", {
|
|
3571
|
-
get: function () { return this.name; },
|
|
3572
|
-
set: function (name) { this.name = name; },
|
|
3573
|
-
enumerable: false,
|
|
3574
|
-
configurable: true
|
|
3575
|
-
});
|
|
3576
3429
|
BasicFormComponent.prototype.getFormParameter = function (name) {
|
|
3577
3430
|
var _a, _b;
|
|
3578
3431
|
return (name) ? ((_b = (_a = this.extraData) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null) : null;
|
|
3579
3432
|
};
|
|
3580
|
-
BasicFormComponent.prototype.getSubject = function () { return this.formSubject; };
|
|
3581
|
-
BasicFormComponent.prototype.getformSubject = function () { return this.getSubject(); };
|
|
3582
3433
|
BasicFormComponent.prototype.preocessInputParams = function (params) {
|
|
3583
3434
|
var _a, _b, _c;
|
|
3584
3435
|
this.controlToken = (_a = params === null || params === void 0 ? void 0 : params[TOKEN]) !== null && _a !== void 0 ? _a : null;
|
|
@@ -3594,7 +3445,7 @@
|
|
|
3594
3445
|
};
|
|
3595
3446
|
BasicFormComponent.prototype.subscribeSectionActivation = function () {
|
|
3596
3447
|
var _this = this;
|
|
3597
|
-
var formSections = this.formStructure.
|
|
3448
|
+
var formSections = this.formStructure.sections;
|
|
3598
3449
|
if (Array.isArray(formSections)) {
|
|
3599
3450
|
formSections.forEach(function (section) {
|
|
3600
3451
|
section.activation.subscribe(function (code) { return _this.launchSectionActivation(code); });
|
|
@@ -3703,8 +3554,9 @@
|
|
|
3703
3554
|
BasicFormComponent.prototype.errorOccured = function () {
|
|
3704
3555
|
return (this.errorCode !== NO_ERROR);
|
|
3705
3556
|
};
|
|
3706
|
-
|
|
3707
|
-
|
|
3557
|
+
/**
|
|
3558
|
+
* Soporte manejo de eventos de formulario
|
|
3559
|
+
*/
|
|
3708
3560
|
BasicFormComponent.prototype.requestFormAction = function (actionCode, actionSubject) {
|
|
3709
3561
|
if (actionSubject === void 0) { actionSubject = {}; }
|
|
3710
3562
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -3757,7 +3609,7 @@
|
|
|
3757
3609
|
try {
|
|
3758
3610
|
for (var actions_1 = __values(actions), actions_1_1 = actions_1.next(); !actions_1_1.done; actions_1_1 = actions_1.next()) {
|
|
3759
3611
|
var changedAction = actions_1_1.value;
|
|
3760
|
-
var actionObject = this.
|
|
3612
|
+
var actionObject = this.getAction(changedAction.actionCode);
|
|
3761
3613
|
if (actionObject) {
|
|
3762
3614
|
actionObject.updateFromServer(changedAction);
|
|
3763
3615
|
}
|
|
@@ -3775,7 +3627,7 @@
|
|
|
3775
3627
|
try {
|
|
3776
3628
|
for (var fields_1 = __values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
|
|
3777
3629
|
var changedField = fields_1_1.value;
|
|
3778
|
-
var fieldObject = this.
|
|
3630
|
+
var fieldObject = this.getField(changedField.fieldCode);
|
|
3779
3631
|
if (fieldObject) {
|
|
3780
3632
|
fieldObject.updateFromServer(changedField);
|
|
3781
3633
|
}
|
|
@@ -3793,7 +3645,7 @@
|
|
|
3793
3645
|
try {
|
|
3794
3646
|
for (var recordTables_1 = __values(recordTables), recordTables_1_1 = recordTables_1.next(); !recordTables_1_1.done; recordTables_1_1 = recordTables_1.next()) {
|
|
3795
3647
|
var changedTable = recordTables_1_1.value;
|
|
3796
|
-
var tableObject = this.
|
|
3648
|
+
var tableObject = this.getTable(changedTable.tableCode);
|
|
3797
3649
|
if (tableObject) {
|
|
3798
3650
|
tableObject.updateFromServer(changedTable);
|
|
3799
3651
|
}
|
|
@@ -3861,7 +3713,7 @@
|
|
|
3861
3713
|
var sectionObject, clientSectionMethods, clientSectionMethods_1, clientSectionMethods_1_1, clientSectionMethod;
|
|
3862
3714
|
var e_4, _j;
|
|
3863
3715
|
return __generator(this, function (_k) {
|
|
3864
|
-
sectionObject = this.formStructure.
|
|
3716
|
+
sectionObject = this.formStructure.getSection(sectionCode);
|
|
3865
3717
|
if (!sectionObject) {
|
|
3866
3718
|
return [2 /*return*/];
|
|
3867
3719
|
}
|
|
@@ -3890,7 +3742,7 @@
|
|
|
3890
3742
|
var sectionObject, clientSectionMethods, clientSectionMethods_2, clientSectionMethods_2_1, clientSectionMethod;
|
|
3891
3743
|
var e_5, _j;
|
|
3892
3744
|
return __generator(this, function (_k) {
|
|
3893
|
-
sectionObject = this.formStructure.
|
|
3745
|
+
sectionObject = this.formStructure.getSection(sectionCode);
|
|
3894
3746
|
if (!sectionObject) {
|
|
3895
3747
|
return [2 /*return*/];
|
|
3896
3748
|
}
|
|
@@ -4069,7 +3921,7 @@
|
|
|
4069
3921
|
return __generator(this, function (_k) {
|
|
4070
3922
|
switch (_k.label) {
|
|
4071
3923
|
case 0:
|
|
4072
|
-
fieldToValidate = this.
|
|
3924
|
+
fieldToValidate = this.getField(fieldCode);
|
|
4073
3925
|
if (!fieldToValidate) {
|
|
4074
3926
|
return [2 /*return*/, false];
|
|
4075
3927
|
}
|
|
@@ -4228,7 +4080,7 @@
|
|
|
4228
4080
|
if (!tableObject) {
|
|
4229
4081
|
return;
|
|
4230
4082
|
}
|
|
4231
|
-
var inlineActionObject = tableObject.
|
|
4083
|
+
var inlineActionObject = tableObject.getAction(actionCode);
|
|
4232
4084
|
if (!inlineActionObject) {
|
|
4233
4085
|
return;
|
|
4234
4086
|
}
|
|
@@ -4250,7 +4102,7 @@
|
|
|
4250
4102
|
if (!tableObject) {
|
|
4251
4103
|
return;
|
|
4252
4104
|
}
|
|
4253
|
-
var inlineActionObject = tableObject.
|
|
4105
|
+
var inlineActionObject = tableObject.getAction(actionCode);
|
|
4254
4106
|
if (!inlineActionObject) {
|
|
4255
4107
|
return;
|
|
4256
4108
|
}
|