tuain-ng-forms-lib 12.0.75 → 12.0.79

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.
@@ -875,7 +875,7 @@
875
875
  __extends(FormAction, _super);
876
876
  function FormAction(actionDefinition, formConfig) {
877
877
  var _this = this;
878
- var _a;
878
+ var _a, _b;
879
879
  _this = _super.call(this, actionDefinition, formConfig) || this;
880
880
  _this._actionActivated = new rxjs.Subject();
881
881
  _this.inProgress = false;
@@ -888,7 +888,7 @@
888
888
  _this.newState = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.newState;
889
889
  _this.restrictedOnField = actionDefinition.fieldRestrictedCode ? actionDefinition.fieldRestrictedCode.toString() : '';
890
890
  _this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
891
- _this.restrictedOnValue = actionDefinition.valueRestricted || '';
891
+ _this.restrictedOnValue = (_b = actionDefinition.valueRestricted) !== null && _b !== void 0 ? _b : '';
892
892
  _this.customValidation = function () { return true; };
893
893
  return _this;
894
894
  }
@@ -1218,7 +1218,7 @@
1218
1218
  FieldDescriptor.prototype.setFieldOptions = function (newOptions) {
1219
1219
  var _this = this;
1220
1220
  var _a;
1221
- if ((this.captureType !== 'LIST' && this.captureType !== 'RADIO')
1221
+ if ((!this._formConfig.captureTypesWithOptions.includes(this.captureType))
1222
1222
  || typeof newOptions === UNDEFINED || !newOptions
1223
1223
  || !Array.isArray(newOptions)) {
1224
1224
  return;
@@ -1368,7 +1368,7 @@
1368
1368
 
1369
1369
  var TableAction = /** @class */ (function () {
1370
1370
  function TableAction(actionDefinition) {
1371
- var _a, _b;
1371
+ var _a, _b, _c;
1372
1372
  this.actionCode = actionDefinition.actionCode;
1373
1373
  this.actionTitle = actionDefinition.actionTitle;
1374
1374
  this.iconName = actionDefinition.iconName || this.actionCode;
@@ -1380,9 +1380,9 @@
1380
1380
  this.enabledStates = actionDefinition.enabledStates || [];
1381
1381
  this.backend = (_a = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.serverAction) !== null && _a !== void 0 ? _a : false;
1382
1382
  this.restrictedOnField = actionDefinition.fieldRestrictedCode || '';
1383
- this.restrictedOnValue = actionDefinition.valueRestricted || '';
1383
+ this.restrictedOnValue = (_b = actionDefinition.valueRestricted) !== null && _b !== void 0 ? _b : '';
1384
1384
  this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
1385
- this.customAttributes = (_b = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.customAttributes) !== null && _b !== void 0 ? _b : {};
1385
+ this.customAttributes = (_c = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.customAttributes) !== null && _c !== void 0 ? _c : {};
1386
1386
  }
1387
1387
  TableAction.prototype.supportMode = function (state) { return this.viewOnState(state); };
1388
1388
  TableAction.prototype.viewOnState = function (state) { return this.visibleStates.includes(state); };
@@ -1661,6 +1661,7 @@
1661
1661
  enumerable: false,
1662
1662
  configurable: true
1663
1663
  });
1664
+ RecordTable.prototype.getLayout = function () { return this.layout; };
1664
1665
  RecordTable.prototype.setLayout = function (layout) { this.setAttr('layout', layout); };
1665
1666
  RecordTable.prototype.hasActions = function () { return (this._actions.length > 0); };
1666
1667
  RecordTable.prototype.getSelectedRecords = function () { return this.tableRecords.filter(function (rec) { return rec.selected; }).map(function (rec) { return rec.recordId; }); };