@seniorsistemas/angular-components 17.3.12 → 17.3.13

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.
@@ -7616,22 +7616,24 @@ var TableColumnsComponent = /** @class */ (function () {
7616
7616
  };
7617
7617
  TableColumnsComponent.prototype.validateComponentAttributes = function (changes) {
7618
7618
  var _a, _b, _c;
7619
- if (!((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue)) {
7619
+ if (!this.columns && !((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue)) {
7620
7620
  throw new Error("The 'columns' attribute must be informed!");
7621
7621
  }
7622
- if (!((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue)) {
7622
+ if (!this.rowValue && !((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue)) {
7623
7623
  throw new Error("The 'rowValue' attribute must be informed!");
7624
7624
  }
7625
- if (!((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue)) {
7625
+ if (!this.locale && !((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue)) {
7626
7626
  throw new Error("The 'locale' attribute must be informed!");
7627
7627
  }
7628
7628
  };
7629
7629
  TableColumnsComponent.prototype.createColumnsTemplate = function (changes) {
7630
7630
  var _this = this;
7631
+ var _a, _b, _c;
7631
7632
  this.viewContainerRef.clear();
7632
- var columns = changes.columns.currentValue;
7633
- var rowValue = changes.rowValue.currentValue;
7634
- var locale = changes.locale.currentValue;
7633
+ var columns = ((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue) || this.columns;
7634
+ var rowValue = ((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue) || this.rowValue;
7635
+ var locale = ((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue) || this.locale;
7636
+ this.formattedColumns = [];
7635
7637
  columns.forEach(function (column) { return _this.formattedColumns.push(_this.getColumnValue(column, rowValue, locale)); });
7636
7638
  this.viewContainerRef.createEmbeddedView(this.columnsTemplate);
7637
7639
  };