tuain-ng-forms-lib 12.0.76 → 12.0.80

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.
@@ -360,7 +360,12 @@ class LibTableComponent {
360
360
  }
361
361
  }
362
362
  filterHasChanged(column, values) {
363
- this.table.addColumnFilter(column.fieldCode, values);
363
+ if (!values || values.length === 0) {
364
+ this.table.removeColumnFilter(column.fieldCode);
365
+ }
366
+ else {
367
+ this.table.addColumnFilter(column.fieldCode, values);
368
+ }
364
369
  }
365
370
  }
366
371
  LibTableComponent.decorators = [
@@ -483,7 +488,7 @@ class FormElement {
483
488
  const HEADER = 'HEADER';
484
489
  class FormAction extends FormElement {
485
490
  constructor(actionDefinition, formConfig) {
486
- var _a;
491
+ var _a, _b;
487
492
  super(actionDefinition, formConfig);
488
493
  this._actionActivated = new Subject();
489
494
  this.inProgress = false;
@@ -496,7 +501,7 @@ class FormAction extends FormElement {
496
501
  this.newState = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.newState;
497
502
  this.restrictedOnField = actionDefinition.fieldRestrictedCode ? actionDefinition.fieldRestrictedCode.toString() : '';
498
503
  this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
499
- this.restrictedOnValue = actionDefinition.valueRestricted || '';
504
+ this.restrictedOnValue = (_b = actionDefinition.valueRestricted) !== null && _b !== void 0 ? _b : '';
500
505
  this.customValidation = () => true;
501
506
  }
502
507
  get actionActivated() { return this._actionActivated; }
@@ -751,7 +756,7 @@ class FieldDescriptor extends FormElement {
751
756
  }
752
757
  setFieldOptions(newOptions) {
753
758
  var _a;
754
- if ((this.captureType !== 'LIST' && this.captureType !== 'RADIO')
759
+ if ((!this._formConfig.captureTypesWithOptions.includes(this.captureType))
755
760
  || typeof newOptions === UNDEFINED || !newOptions
756
761
  || !Array.isArray(newOptions)) {
757
762
  return;
@@ -886,7 +891,7 @@ class RecordTableColumn {
886
891
 
887
892
  class TableAction {
888
893
  constructor(actionDefinition) {
889
- var _a, _b;
894
+ var _a, _b, _c;
890
895
  this.actionCode = actionDefinition.actionCode;
891
896
  this.actionTitle = actionDefinition.actionTitle;
892
897
  this.iconName = actionDefinition.iconName || this.actionCode;
@@ -898,9 +903,9 @@ class TableAction {
898
903
  this.enabledStates = actionDefinition.enabledStates || [];
899
904
  this.backend = (_a = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.serverAction) !== null && _a !== void 0 ? _a : false;
900
905
  this.restrictedOnField = actionDefinition.fieldRestrictedCode || '';
901
- this.restrictedOnValue = actionDefinition.valueRestricted || '';
906
+ this.restrictedOnValue = (_b = actionDefinition.valueRestricted) !== null && _b !== void 0 ? _b : '';
902
907
  this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
903
- this.customAttributes = (_b = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.customAttributes) !== null && _b !== void 0 ? _b : {};
908
+ this.customAttributes = (_c = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.customAttributes) !== null && _c !== void 0 ? _c : {};
904
909
  }
905
910
  supportMode(state) { return this.viewOnState(state); }
906
911
  viewOnState(state) { return this.visibleStates.includes(state); }
@@ -1097,7 +1102,7 @@ class RecordTable extends FormElement {
1097
1102
  get recordSelectionTrigger() { return this._recordSelectionTrigger; }
1098
1103
  get getDataTrigger() { return this._getDataTrigger; }
1099
1104
  get attributeChange() { return this._attributeChange; }
1100
- getLayout(layout) { return this.layout; }
1105
+ getLayout() { return this.layout; }
1101
1106
  setLayout(layout) { this.setAttr('layout', layout); }
1102
1107
  hasActions() { return (this._actions.length > 0); }
1103
1108
  getSelectedRecords() { return this.tableRecords.filter(rec => rec.selected).map(rec => rec.recordId); }