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.
@@ -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, _c, _d;
449
- var visible = (_b = (_a = this.formElement) === null || _a === void 0 ? void 0 : _a.visible) !== null && _b !== void 0 ? _b : true;
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, _c, _d;
458
- var disabled = (_b = (_a = this.formElement) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : false;
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.getActions(); },
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.getFields(); },
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); },