tuain-ng-forms-lib 12.0.40 → 12.0.44
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 +40 -91
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/field.js +11 -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 +38 -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 +1 -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;
|
|
@@ -1880,8 +1881,12 @@
|
|
|
1880
1881
|
this._attributeChange.next({ name: name, value: value });
|
|
1881
1882
|
}
|
|
1882
1883
|
};
|
|
1883
|
-
FieldDescriptor.prototype.notifyEditionDetailRequest = function () {
|
|
1884
|
-
|
|
1884
|
+
FieldDescriptor.prototype.notifyEditionDetailRequest = function (detail) {
|
|
1885
|
+
var detailEvent = {
|
|
1886
|
+
code: this.fieldCode,
|
|
1887
|
+
detail: detail,
|
|
1888
|
+
};
|
|
1889
|
+
this._detailRequest.next(detailEvent);
|
|
1885
1890
|
};
|
|
1886
1891
|
FieldDescriptor.prototype.setVisibleLabel = function (visibleLabel) { this.setAttr(fldAttr.visibleLabel, visibleLabel); };
|
|
1887
1892
|
FieldDescriptor.prototype.showLabel = function () { this.setVisibleLabel(true); };
|
|
@@ -1942,6 +1947,11 @@
|
|
|
1942
1947
|
}
|
|
1943
1948
|
return this._value;
|
|
1944
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
|
+
};
|
|
1945
1955
|
FieldDescriptor.prototype.updateFromServer = function (fld) {
|
|
1946
1956
|
var _a;
|
|
1947
1957
|
var fieldKeys = Object.keys(fld);
|
|
@@ -2558,6 +2568,7 @@
|
|
|
2558
2568
|
FormStructureAndData.prototype.enableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.enable(); };
|
|
2559
2569
|
FormStructureAndData.prototype.disableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.disable(); };
|
|
2560
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(); };
|
|
2561
2572
|
FormStructureAndData.prototype.getFieldOptions = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getFieldOptions(); };
|
|
2562
2573
|
FormStructureAndData.prototype.setFieldValue = function (code, value) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.setValue(value); };
|
|
2563
2574
|
FormStructureAndData.prototype.setFieldError = function (code, message, type) {
|
|
@@ -3022,90 +3033,28 @@
|
|
|
3022
3033
|
this.cleanStart();
|
|
3023
3034
|
this.customPreProcessing();
|
|
3024
3035
|
}
|
|
3025
|
-
BasicFormComponent.prototype.getTitle = function () {
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
};
|
|
3029
|
-
BasicFormComponent.prototype.
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
};
|
|
3033
|
-
BasicFormComponent.prototype.
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
};
|
|
3037
|
-
BasicFormComponent.prototype.
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
};
|
|
3041
|
-
BasicFormComponent.prototype.
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
};
|
|
3045
|
-
BasicFormComponent.prototype.
|
|
3046
|
-
|
|
3047
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.changeState(state);
|
|
3048
|
-
};
|
|
3049
|
-
BasicFormComponent.prototype.getStates = function () {
|
|
3050
|
-
var _a;
|
|
3051
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.states;
|
|
3052
|
-
};
|
|
3053
|
-
BasicFormComponent.prototype.getImmutableElement = function (name) {
|
|
3054
|
-
var _a;
|
|
3055
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getImmutableElement(name);
|
|
3056
|
-
};
|
|
3057
|
-
BasicFormComponent.prototype.getExtraInfo = function (name) {
|
|
3058
|
-
var _a;
|
|
3059
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getExtraInfo(name);
|
|
3060
|
-
};
|
|
3061
|
-
BasicFormComponent.prototype.getFields = function () {
|
|
3062
|
-
var _a;
|
|
3063
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFields();
|
|
3064
|
-
};
|
|
3065
|
-
BasicFormComponent.prototype.getFieldNames = function () {
|
|
3066
|
-
var _a;
|
|
3067
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldNames();
|
|
3068
|
-
};
|
|
3069
|
-
BasicFormComponent.prototype.getField = function (code) {
|
|
3070
|
-
var _a;
|
|
3071
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getField(code);
|
|
3072
|
-
};
|
|
3073
|
-
BasicFormComponent.prototype.enableField = function (code) {
|
|
3074
|
-
var _a;
|
|
3075
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.enableField(code);
|
|
3076
|
-
};
|
|
3077
|
-
BasicFormComponent.prototype.disableField = function (code) {
|
|
3078
|
-
var _a;
|
|
3079
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.disableField(code);
|
|
3080
|
-
};
|
|
3081
|
-
BasicFormComponent.prototype.getFieldValue = function (code) {
|
|
3082
|
-
var _a;
|
|
3083
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldValue(code);
|
|
3084
|
-
};
|
|
3085
|
-
BasicFormComponent.prototype.getFieldsValues = function (codes) {
|
|
3086
|
-
var _a;
|
|
3087
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldsValues(codes);
|
|
3088
|
-
};
|
|
3089
|
-
BasicFormComponent.prototype.getFieldOptions = function (code) {
|
|
3090
|
-
var _a;
|
|
3091
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptions(code);
|
|
3092
|
-
};
|
|
3093
|
-
BasicFormComponent.prototype.setFieldValue = function (code, value) {
|
|
3094
|
-
var _a;
|
|
3095
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldValue(code, value);
|
|
3096
|
-
};
|
|
3097
|
-
BasicFormComponent.prototype.setFieldRequired = function (code, required) {
|
|
3098
|
-
var _a;
|
|
3099
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldRequired(code, required);
|
|
3100
|
-
};
|
|
3101
|
-
BasicFormComponent.prototype.setFieldErrorMessage = function (code, errorMessage) {
|
|
3102
|
-
var _a;
|
|
3103
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldErrorMessage(code, errorMessage);
|
|
3104
|
-
};
|
|
3105
|
-
BasicFormComponent.prototype.setFieldError = function (code, message, type) {
|
|
3106
|
-
var _a;
|
|
3107
|
-
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldError(code, message, type);
|
|
3108
|
-
};
|
|
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); };
|
|
3109
3058
|
BasicFormComponent.prototype.setFieldIntrinsicErrorMessage = function (code, message) {
|
|
3110
3059
|
var _a;
|
|
3111
3060
|
return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldIntrinsicErrorMessage(code, message);
|
|
@@ -3422,7 +3371,7 @@
|
|
|
3422
3371
|
BasicFormComponent.prototype.displayActionServerError = function () { };
|
|
3423
3372
|
BasicFormComponent.prototype.displayValidationServerError = function () { };
|
|
3424
3373
|
BasicFormComponent.prototype.displayTableServerError = function () { };
|
|
3425
|
-
BasicFormComponent.prototype.showFieldInfo = function (fieldCode) { };
|
|
3374
|
+
BasicFormComponent.prototype.showFieldInfo = function (fieldCode, detail) { };
|
|
3426
3375
|
BasicFormComponent.prototype.showModalDialog = function (title, body, options, callback, params) { };
|
|
3427
3376
|
BasicFormComponent.prototype.openUploadDialog = function (title, body, options, callback, params) { };
|
|
3428
3377
|
/**
|
|
@@ -3539,7 +3488,7 @@
|
|
|
3539
3488
|
var code = event.code, intrinsicValidation = event.intrinsicValidation;
|
|
3540
3489
|
_this.startFieldInputValidation(code, intrinsicValidation);
|
|
3541
3490
|
});
|
|
3542
|
-
field.detailRequest.subscribe(function (
|
|
3491
|
+
field.detailRequest.subscribe(function (event) { return _this.showFieldInfo(event.code, event.detail); });
|
|
3543
3492
|
});
|
|
3544
3493
|
}
|
|
3545
3494
|
};
|