tuain-ng-forms-lib 12.0.28 → 12.0.32
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 +16 -21
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/form.js +2 -2
- package/esm2015/lib/classes/forms/subsection.js +4 -4
- package/esm2015/lib/components/elements/action.component.js +4 -4
- package/esm2015/lib/components/elements/field.component.js +4 -4
- package/esm2015/lib/components/elements/layout/element.component.js +4 -4
- package/esm2015/lib/components/elements/tables/table.component.js +2 -2
- package/esm2015/lib/components/forms/basic-form.js +3 -4
- package/fesm2015/tuain-ng-forms-lib.js +16 -17
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/components/elements/action.component.d.ts +1 -1
- package/lib/components/elements/field.component.d.ts +1 -1
- package/lib/components/elements/layout/element.component.d.ts +1 -1
- package/lib/components/elements/tables/table.component.d.ts +1 -1
- package/lib/components/forms/basic-form.d.ts +0 -1
- package/package.json +1 -1
- package/tuain-ng-forms-lib.metadata.json +1 -1
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
Object.defineProperty(ActionComponent.prototype, "visible", {
|
|
37
37
|
get: function () {
|
|
38
38
|
var _a;
|
|
39
|
-
return ((_a = this.action) === null || _a === void 0 ? void 0 : _a.visibleOn(this.
|
|
39
|
+
return ((_a = this.action) === null || _a === void 0 ? void 0 : _a.visibleOn(this.state)) && this.visibleOnRestriction();
|
|
40
40
|
},
|
|
41
41
|
enumerable: false,
|
|
42
42
|
configurable: true
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
Object.defineProperty(ActionComponent.prototype, "disabled", {
|
|
45
45
|
get: function () {
|
|
46
46
|
var _a;
|
|
47
|
-
return !((_a = this.action) === null || _a === void 0 ? void 0 : _a.enabledOn(this.
|
|
47
|
+
return !((_a = this.action) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
|
|
48
48
|
},
|
|
49
49
|
enumerable: false,
|
|
50
50
|
configurable: true
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
action: [{ type: core.Input }],
|
|
62
62
|
busy: [{ type: core.Input }],
|
|
63
63
|
relatedField: [{ type: core.Input }],
|
|
64
|
-
|
|
64
|
+
state: [{ type: core.Input }],
|
|
65
65
|
style: [{ type: core.Input }],
|
|
66
66
|
showLabel: [{ type: core.Input }]
|
|
67
67
|
};
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
Object.defineProperty(FieldComponent.prototype, "visible", {
|
|
455
455
|
get: function () {
|
|
456
456
|
var _a;
|
|
457
|
-
return (_a = this.field) === null || _a === void 0 ? void 0 : _a.visibleOn(this.
|
|
457
|
+
return (_a = this.field) === null || _a === void 0 ? void 0 : _a.visibleOn(this.state);
|
|
458
458
|
},
|
|
459
459
|
enumerable: false,
|
|
460
460
|
configurable: true
|
|
@@ -462,7 +462,7 @@
|
|
|
462
462
|
Object.defineProperty(FieldComponent.prototype, "disabled", {
|
|
463
463
|
get: function () {
|
|
464
464
|
var _a;
|
|
465
|
-
return !((_a = this.field) === null || _a === void 0 ? void 0 : _a.enabledOn(this.
|
|
465
|
+
return !((_a = this.field) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
|
|
466
466
|
},
|
|
467
467
|
enumerable: false,
|
|
468
468
|
configurable: true
|
|
@@ -477,7 +477,7 @@
|
|
|
477
477
|
];
|
|
478
478
|
FieldComponent.propDecorators = {
|
|
479
479
|
field: [{ type: core.Input }],
|
|
480
|
-
|
|
480
|
+
state: [{ type: core.Input }]
|
|
481
481
|
};
|
|
482
482
|
|
|
483
483
|
var ElementComponent = /** @class */ (function () {
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
Object.defineProperty(ElementComponent.prototype, "visible", {
|
|
493
493
|
get: function () {
|
|
494
494
|
var _a;
|
|
495
|
-
return (_a = this.element) === null || _a === void 0 ? void 0 : _a.visibleOn(this.
|
|
495
|
+
return (_a = this.element) === null || _a === void 0 ? void 0 : _a.visibleOn(this.state);
|
|
496
496
|
},
|
|
497
497
|
enumerable: false,
|
|
498
498
|
configurable: true
|
|
@@ -500,7 +500,7 @@
|
|
|
500
500
|
Object.defineProperty(ElementComponent.prototype, "disabled", {
|
|
501
501
|
get: function () {
|
|
502
502
|
var _a;
|
|
503
|
-
return !((_a = this.element) === null || _a === void 0 ? void 0 : _a.enabledOn(this.
|
|
503
|
+
return !((_a = this.element) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
|
|
504
504
|
},
|
|
505
505
|
enumerable: false,
|
|
506
506
|
configurable: true
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
ElementComponent.propDecorators = {
|
|
517
517
|
element: [{ type: core.Input }],
|
|
518
518
|
form: [{ type: core.Input }],
|
|
519
|
-
|
|
519
|
+
state: [{ type: core.Input }]
|
|
520
520
|
};
|
|
521
521
|
|
|
522
522
|
var FormErrorComponent = /** @class */ (function () {
|
|
@@ -1638,7 +1638,7 @@
|
|
|
1638
1638
|
table: [{ type: core.Input }],
|
|
1639
1639
|
tableRecords: [{ type: core.Input }],
|
|
1640
1640
|
disabled: [{ type: core.Input }],
|
|
1641
|
-
|
|
1641
|
+
state: [{ type: core.Input }],
|
|
1642
1642
|
waiting: [{ type: core.Input }]
|
|
1643
1643
|
};
|
|
1644
1644
|
|
|
@@ -2110,15 +2110,15 @@
|
|
|
2110
2110
|
var type = receivedElement.type, code = receivedElement.code;
|
|
2111
2111
|
switch (type) {
|
|
2112
2112
|
case elementTypes.field:
|
|
2113
|
-
elementObject = formObject.
|
|
2113
|
+
elementObject = formObject.getField(code);
|
|
2114
2114
|
arrayToAdd = this.subSectionFields;
|
|
2115
2115
|
break;
|
|
2116
2116
|
case elementTypes.table:
|
|
2117
|
-
elementObject = formObject.
|
|
2117
|
+
elementObject = formObject.getTable(code);
|
|
2118
2118
|
arrayToAdd = this.subSectionTables;
|
|
2119
2119
|
break;
|
|
2120
2120
|
case elementTypes.action:
|
|
2121
|
-
elementObject = formObject.
|
|
2121
|
+
elementObject = formObject.getAction(code);
|
|
2122
2122
|
arrayToAdd = this.subSectionActions;
|
|
2123
2123
|
break;
|
|
2124
2124
|
}
|
|
@@ -2583,7 +2583,7 @@
|
|
|
2583
2583
|
FormStructureAndData.prototype.getField = function (code) { var _a; return (code && ((_a = this._fields) === null || _a === void 0 ? void 0 : _a[code])) ? this._fields[code] : null; };
|
|
2584
2584
|
FormStructureAndData.prototype.enableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.enable(); };
|
|
2585
2585
|
FormStructureAndData.prototype.disableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.disable(); };
|
|
2586
|
-
FormStructureAndData.prototype.getFieldValue = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getValue(); };
|
|
2586
|
+
FormStructureAndData.prototype.getFieldValue = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getValue(); };
|
|
2587
2587
|
FormStructureAndData.prototype.getFieldOptions = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getFieldOptions(); };
|
|
2588
2588
|
FormStructureAndData.prototype.setFieldValue = function (code, value) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.setValue(value); };
|
|
2589
2589
|
FormStructureAndData.prototype.setFieldError = function (code, message, type) {
|
|
@@ -3406,7 +3406,7 @@
|
|
|
3406
3406
|
configurable: true
|
|
3407
3407
|
});
|
|
3408
3408
|
Object.defineProperty(BasicFormComponent.prototype, "state", {
|
|
3409
|
-
get: function () { return this.
|
|
3409
|
+
get: function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.state; },
|
|
3410
3410
|
enumerable: false,
|
|
3411
3411
|
configurable: true
|
|
3412
3412
|
});
|
|
@@ -3416,11 +3416,6 @@
|
|
|
3416
3416
|
enumerable: false,
|
|
3417
3417
|
configurable: true
|
|
3418
3418
|
});
|
|
3419
|
-
Object.defineProperty(BasicFormComponent.prototype, "currentMode", {
|
|
3420
|
-
get: function () { return this.currentState; },
|
|
3421
|
-
enumerable: false,
|
|
3422
|
-
configurable: true
|
|
3423
|
-
});
|
|
3424
3419
|
Object.defineProperty(BasicFormComponent.prototype, "immutableData", {
|
|
3425
3420
|
get: function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.immutableData; },
|
|
3426
3421
|
enumerable: false,
|
|
@@ -3505,7 +3500,7 @@
|
|
|
3505
3500
|
if (!cleanStack) {
|
|
3506
3501
|
origin = Object.assign(Object.assign({}, backData), { name: this.name, url: this._formRoute, token: this._controlToken });
|
|
3507
3502
|
origin.subject = (_a = origin === null || origin === void 0 ? void 0 : origin.subject) !== null && _a !== void 0 ? _a : this.formSubject;
|
|
3508
|
-
origin.state = (_b = origin === null || origin === void 0 ? void 0 : origin.state) !== null && _b !== void 0 ? _b : this.
|
|
3503
|
+
origin.state = (_b = origin === null || origin === void 0 ? void 0 : origin.state) !== null && _b !== void 0 ? _b : this.state;
|
|
3509
3504
|
origin.fields = (_c = origin === null || origin === void 0 ? void 0 : origin.fields) !== null && _c !== void 0 ? _c : {};
|
|
3510
3505
|
origin.extra = (_d = origin === null || origin === void 0 ? void 0 : origin.extra) !== null && _d !== void 0 ? _d : {};
|
|
3511
3506
|
}
|