tuain-ng-forms-lib 12.0.38 → 12.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tuain-ng-forms-lib.umd.js +48 -91
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/field.js +19 -3
- package/esm2015/lib/classes/forms/form.js +2 -1
- package/esm2015/lib/classes/forms/table/table.js +2 -2
- package/esm2015/lib/components/elements/field.component.js +3 -3
- package/esm2015/lib/components/forms/basic-form.js +25 -87
- package/fesm2015/tuain-ng-forms-lib.js +46 -91
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/field.d.ts +10 -5
- package/lib/classes/forms/form.d.ts +1 -0
- package/lib/classes/forms/table/table.d.ts +4 -4
- package/lib/components/elements/field.component.d.ts +3 -1
- package/lib/components/forms/basic-form.d.ts +2 -1
- package/package.json +1 -1
- package/tuain-ng-forms-lib.metadata.json +1 -1
|
@@ -454,9 +454,10 @@
|
|
|
454
454
|
var _this = this;
|
|
455
455
|
setTimeout(function () { return _this.field.notifyEditionFinish(); }, 50);
|
|
456
456
|
};
|
|
457
|
-
FieldComponent.prototype.onShowInfo = function () {
|
|
457
|
+
FieldComponent.prototype.onShowInfo = function (detail) {
|
|
458
458
|
var _this = this;
|
|
459
|
-
|
|
459
|
+
if (detail === void 0) { detail = null; }
|
|
460
|
+
setTimeout(function () { return _this.field.notifyEditionDetailRequest(detail); }, 50);
|
|
460
461
|
};
|
|
461
462
|
FieldComponent.prototype.numberInputValidation = function (event) {
|
|
462
463
|
var k = event.charCode;
|
|
@@ -946,9 +947,9 @@
|
|
|
946
947
|
_this._selectionActionTrigger = new rxjs.Subject();
|
|
947
948
|
_this._getDataTrigger = new rxjs.Subject();
|
|
948
949
|
_this._attributeChange = new rxjs.Subject();
|
|
949
|
-
_this.tableRecordObj = {};
|
|
950
950
|
_this._tableColumnObj = {};
|
|
951
951
|
_this._actionsObj = {};
|
|
952
|
+
_this.tableRecordObj = {};
|
|
952
953
|
_this.allSelected = false;
|
|
953
954
|
_this.elementType = elementTypes.table;
|
|
954
955
|
_this.waiting = false;
|
|
@@ -1864,6 +1865,14 @@
|
|
|
1864
1865
|
this.setError('99', this._intrinsicErrorMessage);
|
|
1865
1866
|
}
|
|
1866
1867
|
}
|
|
1868
|
+
if (intrinsicValidation && fieldValue && this._minValue && fieldValue < this._minValue) {
|
|
1869
|
+
intrinsicValidation = false;
|
|
1870
|
+
this.setError('99', 'Campo con valor inferior al mínimo');
|
|
1871
|
+
}
|
|
1872
|
+
if (intrinsicValidation && fieldValue && this._maxValue && fieldValue > this._maxValue) {
|
|
1873
|
+
intrinsicValidation = false;
|
|
1874
|
+
this.setError('99', 'Campo con valor superior al máximo');
|
|
1875
|
+
}
|
|
1867
1876
|
this._editionFinish.next({ code: this.fieldCode, intrinsicValidation: intrinsicValidation });
|
|
1868
1877
|
};
|
|
1869
1878
|
FieldDescriptor.prototype.setAttr = function (name, value) {
|
|
@@ -1872,8 +1881,12 @@
|
|
|
1872
1881
|
this._attributeChange.next({ name: name, value: value });
|
|
1873
1882
|
}
|
|
1874
1883
|
};
|
|
1875
|
-
FieldDescriptor.prototype.notifyEditionDetailRequest = function () {
|
|
1876
|
-
|
|
1884
|
+
FieldDescriptor.prototype.notifyEditionDetailRequest = function (detail) {
|
|
1885
|
+
var detailEvent = {
|
|
1886
|
+
code: this.fieldCode,
|
|
1887
|
+
detail: detail,
|
|
1888
|
+
};
|
|
1889
|
+
this._detailRequest.next(detailEvent);
|
|
1877
1890
|
};
|
|
1878
1891
|
FieldDescriptor.prototype.setVisibleLabel = function (visibleLabel) { this.setAttr(fldAttr.visibleLabel, visibleLabel); };
|
|
1879
1892
|
FieldDescriptor.prototype.showLabel = function () { this.setVisibleLabel(true); };
|
|
@@ -1934,6 +1947,11 @@
|
|
|
1934
1947
|
}
|
|
1935
1948
|
return this._value;
|
|
1936
1949
|
};
|
|
1950
|
+
FieldDescriptor.prototype.getOptionText = function () {
|
|
1951
|
+
var _this = this;
|
|
1952
|
+
var _a, _b, _c;
|
|
1953
|
+
return (_c = (_b = (_a = this.fieldOptions) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.fieldOptionId === _this._value; })) === null || _b === void 0 ? void 0 : _b.fieldOptionValue) !== null && _c !== void 0 ? _c : null;
|
|
1954
|
+
};
|
|
1937
1955
|
FieldDescriptor.prototype.updateFromServer = function (fld) {
|
|
1938
1956
|
var _a;
|
|
1939
1957
|
var fieldKeys = Object.keys(fld);
|
|
@@ -2550,6 +2568,7 @@
|
|
|
2550
2568
|
FormStructureAndData.prototype.enableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.enable(); };
|
|
2551
2569
|
FormStructureAndData.prototype.disableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.disable(); };
|
|
2552
2570
|
FormStructureAndData.prototype.getFieldValue = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getValue(); };
|
|
2571
|
+
FormStructureAndData.prototype.getFieldOptionText = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getOptionText(); };
|
|
2553
2572
|
FormStructureAndData.prototype.getFieldOptions = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getFieldOptions(); };
|
|
2554
2573
|
FormStructureAndData.prototype.setFieldValue = function (code, value) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.setValue(value); };
|
|
2555
2574
|
FormStructureAndData.prototype.setFieldError = function (code, message, type) {
|
|
@@ -3014,90 +3033,28 @@
|
|
|
3014
3033
|
this.cleanStart();
|
|
3015
3034
|
this.customPreProcessing();
|
|
3016
3035
|
}
|
|
3017
|
-
BasicFormComponent.prototype.getTitle = function () {
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
};
|
|
3021
|
-
BasicFormComponent.prototype.
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
};
|
|
3025
|
-
BasicFormComponent.prototype.
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
};
|
|
3029
|
-
BasicFormComponent.prototype.
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
};
|
|
3033
|
-
BasicFormComponent.prototype.
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
};
|
|
3037
|
-
BasicFormComponent.prototype.
|
|
3038
|
-
|
|
3039
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.changeState(state);
|
|
3040
|
-
};
|
|
3041
|
-
BasicFormComponent.prototype.getStates = function () {
|
|
3042
|
-
var _a;
|
|
3043
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.states;
|
|
3044
|
-
};
|
|
3045
|
-
BasicFormComponent.prototype.getImmutableElement = function (name) {
|
|
3046
|
-
var _a;
|
|
3047
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getImmutableElement(name);
|
|
3048
|
-
};
|
|
3049
|
-
BasicFormComponent.prototype.getExtraInfo = function (name) {
|
|
3050
|
-
var _a;
|
|
3051
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getExtraInfo(name);
|
|
3052
|
-
};
|
|
3053
|
-
BasicFormComponent.prototype.getFields = function () {
|
|
3054
|
-
var _a;
|
|
3055
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFields();
|
|
3056
|
-
};
|
|
3057
|
-
BasicFormComponent.prototype.getFieldNames = function () {
|
|
3058
|
-
var _a;
|
|
3059
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldNames();
|
|
3060
|
-
};
|
|
3061
|
-
BasicFormComponent.prototype.getField = function (code) {
|
|
3062
|
-
var _a;
|
|
3063
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getField(code);
|
|
3064
|
-
};
|
|
3065
|
-
BasicFormComponent.prototype.enableField = function (code) {
|
|
3066
|
-
var _a;
|
|
3067
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.enableField(code);
|
|
3068
|
-
};
|
|
3069
|
-
BasicFormComponent.prototype.disableField = function (code) {
|
|
3070
|
-
var _a;
|
|
3071
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.disableField(code);
|
|
3072
|
-
};
|
|
3073
|
-
BasicFormComponent.prototype.getFieldValue = function (code) {
|
|
3074
|
-
var _a;
|
|
3075
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldValue(code);
|
|
3076
|
-
};
|
|
3077
|
-
BasicFormComponent.prototype.getFieldsValues = function (codes) {
|
|
3078
|
-
var _a;
|
|
3079
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldsValues(codes);
|
|
3080
|
-
};
|
|
3081
|
-
BasicFormComponent.prototype.getFieldOptions = function (code) {
|
|
3082
|
-
var _a;
|
|
3083
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptions(code);
|
|
3084
|
-
};
|
|
3085
|
-
BasicFormComponent.prototype.setFieldValue = function (code, value) {
|
|
3086
|
-
var _a;
|
|
3087
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldValue(code, value);
|
|
3088
|
-
};
|
|
3089
|
-
BasicFormComponent.prototype.setFieldRequired = function (code, required) {
|
|
3090
|
-
var _a;
|
|
3091
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldRequired(code, required);
|
|
3092
|
-
};
|
|
3093
|
-
BasicFormComponent.prototype.setFieldErrorMessage = function (code, errorMessage) {
|
|
3094
|
-
var _a;
|
|
3095
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldErrorMessage(code, errorMessage);
|
|
3096
|
-
};
|
|
3097
|
-
BasicFormComponent.prototype.setFieldError = function (code, message, type) {
|
|
3098
|
-
var _a;
|
|
3099
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldError(code, message, type);
|
|
3100
|
-
};
|
|
3036
|
+
BasicFormComponent.prototype.getTitle = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getTitle(); };
|
|
3037
|
+
BasicFormComponent.prototype.setTitle = function (title) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setTitle(title); };
|
|
3038
|
+
BasicFormComponent.prototype.cleanData = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.cleanData(); };
|
|
3039
|
+
BasicFormComponent.prototype.getCurrentState = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getCurrentState(); };
|
|
3040
|
+
BasicFormComponent.prototype.supportState = function (state) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.supportState(state); };
|
|
3041
|
+
BasicFormComponent.prototype.changeState = function (state) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.changeState(state); };
|
|
3042
|
+
BasicFormComponent.prototype.getStates = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.states; };
|
|
3043
|
+
BasicFormComponent.prototype.getImmutableElement = function (name) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getImmutableElement(name); };
|
|
3044
|
+
BasicFormComponent.prototype.getExtraInfo = function (name) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getExtraInfo(name); };
|
|
3045
|
+
BasicFormComponent.prototype.getFields = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFields(); };
|
|
3046
|
+
BasicFormComponent.prototype.getFieldNames = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldNames(); };
|
|
3047
|
+
BasicFormComponent.prototype.getField = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getField(code); };
|
|
3048
|
+
BasicFormComponent.prototype.enableField = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.enableField(code); };
|
|
3049
|
+
BasicFormComponent.prototype.disableField = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.disableField(code); };
|
|
3050
|
+
BasicFormComponent.prototype.getFieldValue = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldValue(code); };
|
|
3051
|
+
BasicFormComponent.prototype.getFieldOptionText = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptionText(code); };
|
|
3052
|
+
BasicFormComponent.prototype.getFieldsValues = function (codes) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldsValues(codes); };
|
|
3053
|
+
BasicFormComponent.prototype.getFieldOptions = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptions(code); };
|
|
3054
|
+
BasicFormComponent.prototype.setFieldValue = function (code, value) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldValue(code, value); };
|
|
3055
|
+
BasicFormComponent.prototype.setFieldRequired = function (code, required) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldRequired(code, required); };
|
|
3056
|
+
BasicFormComponent.prototype.setFieldErrorMessage = function (code, errorMessage) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldErrorMessage(code, errorMessage); };
|
|
3057
|
+
BasicFormComponent.prototype.setFieldError = function (code, message, type) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldError(code, message, type); };
|
|
3101
3058
|
BasicFormComponent.prototype.setFieldIntrinsicErrorMessage = function (code, message) {
|
|
3102
3059
|
var _a;
|
|
3103
3060
|
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldIntrinsicErrorMessage(code, message);
|
|
@@ -3414,7 +3371,7 @@
|
|
|
3414
3371
|
BasicFormComponent.prototype.displayActionServerError = function () { };
|
|
3415
3372
|
BasicFormComponent.prototype.displayValidationServerError = function () { };
|
|
3416
3373
|
BasicFormComponent.prototype.displayTableServerError = function () { };
|
|
3417
|
-
BasicFormComponent.prototype.showFieldInfo = function (fieldCode) { };
|
|
3374
|
+
BasicFormComponent.prototype.showFieldInfo = function (fieldCode, detail) { };
|
|
3418
3375
|
BasicFormComponent.prototype.showModalDialog = function (title, body, options, callback, params) { };
|
|
3419
3376
|
BasicFormComponent.prototype.openUploadDialog = function (title, body, options, callback, params) { };
|
|
3420
3377
|
/**
|
|
@@ -3531,7 +3488,7 @@
|
|
|
3531
3488
|
var code = event.code, intrinsicValidation = event.intrinsicValidation;
|
|
3532
3489
|
_this.startFieldInputValidation(code, intrinsicValidation);
|
|
3533
3490
|
});
|
|
3534
|
-
field.detailRequest.subscribe(function (
|
|
3491
|
+
field.detailRequest.subscribe(function (event) { return _this.showFieldInfo(event.code, event.detail); });
|
|
3535
3492
|
});
|
|
3536
3493
|
}
|
|
3537
3494
|
};
|