tuain-ng-forms-lib 12.0.11 → 12.0.12
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 +17 -8
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/element.js +7 -1
- package/esm2015/lib/classes/forms/form.js +3 -3
- package/esm2015/lib/components/elements/layout/element.component.js +5 -7
- package/esm2015/lib/components/forms/basic-form.js +2 -1
- package/fesm2015/tuain-ng-forms-lib.js +13 -8
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/element.d.ts +2 -0
- package/lib/classes/forms/form.d.ts +2 -2
- package/lib/components/elements/layout/element.component.d.ts +1 -1
- package/lib/components/forms/basic-form.d.ts +1 -0
- package/package.json +1 -1
|
@@ -445,18 +445,16 @@
|
|
|
445
445
|
ElementComponent.prototype.start = function () { };
|
|
446
446
|
Object.defineProperty(ElementComponent.prototype, "visible", {
|
|
447
447
|
get: function () {
|
|
448
|
-
var _a, _b
|
|
449
|
-
|
|
450
|
-
return visible && ((_c = this.formElement) === null || _c === void 0 ? void 0 : _c.viewOnState((_d = this.formManager) === null || _d === void 0 ? void 0 : _d.currentState));
|
|
448
|
+
var _a, _b;
|
|
449
|
+
return (_a = this.formElement) === null || _a === void 0 ? void 0 : _a.visibleOn((_b = this.formManager) === null || _b === void 0 ? void 0 : _b.currentState);
|
|
451
450
|
},
|
|
452
451
|
enumerable: false,
|
|
453
452
|
configurable: true
|
|
454
453
|
});
|
|
455
454
|
Object.defineProperty(ElementComponent.prototype, "disabled", {
|
|
456
455
|
get: function () {
|
|
457
|
-
var _a, _b
|
|
458
|
-
|
|
459
|
-
return disabled || !((_c = this.formElement) === null || _c === void 0 ? void 0 : _c.enabledOnState((_d = this.formManager) === null || _d === void 0 ? void 0 : _d.currentState));
|
|
456
|
+
var _a, _b;
|
|
457
|
+
return !((_a = this.formElement) === null || _a === void 0 ? void 0 : _a.enabledOn((_b = this.formManager) === null || _b === void 0 ? void 0 : _b.currentState));
|
|
460
458
|
},
|
|
461
459
|
enumerable: false,
|
|
462
460
|
configurable: true
|
|
@@ -638,6 +636,12 @@
|
|
|
638
636
|
enumerable: false,
|
|
639
637
|
configurable: true
|
|
640
638
|
});
|
|
639
|
+
FormElement.prototype.visibleOn = function (state) {
|
|
640
|
+
return this.visible && this.viewOnState(state);
|
|
641
|
+
};
|
|
642
|
+
FormElement.prototype.enabledOn = function (state) {
|
|
643
|
+
return !this.disabled && this.enabledOnState(state);
|
|
644
|
+
};
|
|
641
645
|
FormElement.prototype.setVisibility = function (visible, forced) {
|
|
642
646
|
if (forced === void 0) { forced = null; }
|
|
643
647
|
this._visible = visible && true;
|
|
@@ -2601,7 +2605,7 @@
|
|
|
2601
2605
|
return (section) ? section.getSubsection(subsectionCode) : null;
|
|
2602
2606
|
};
|
|
2603
2607
|
Object.defineProperty(FormStructureAndData.prototype, "actions", {
|
|
2604
|
-
get: function () { return this.
|
|
2608
|
+
get: function () { return this._actionsObj; },
|
|
2605
2609
|
enumerable: false,
|
|
2606
2610
|
configurable: true
|
|
2607
2611
|
});
|
|
@@ -2790,7 +2794,7 @@
|
|
|
2790
2794
|
actionNames.forEach(function (actionCode) { return _this.disableAction(actionCode); });
|
|
2791
2795
|
};
|
|
2792
2796
|
Object.defineProperty(FormStructureAndData.prototype, "fields", {
|
|
2793
|
-
get: function () { return this.
|
|
2797
|
+
get: function () { return this._fieldsObj; },
|
|
2794
2798
|
enumerable: false,
|
|
2795
2799
|
configurable: true
|
|
2796
2800
|
});
|
|
@@ -3305,6 +3309,11 @@
|
|
|
3305
3309
|
this.tableGetDataStart = {};
|
|
3306
3310
|
this.tableGetDataFinish = {};
|
|
3307
3311
|
};
|
|
3312
|
+
Object.defineProperty(BasicFormComponent.prototype, "form", {
|
|
3313
|
+
get: function () { return this.formStructure; },
|
|
3314
|
+
enumerable: false,
|
|
3315
|
+
configurable: true
|
|
3316
|
+
});
|
|
3308
3317
|
Object.defineProperty(BasicFormComponent.prototype, "currentState", {
|
|
3309
3318
|
get: function () { return this.formStructure.state; },
|
|
3310
3319
|
set: function (state) { this.formStructure.changeState(state); },
|