@seniorsistemas/angular-components 16.1.0 → 16.2.0

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.
Files changed (25) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +18 -3
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/table/index.d.ts +1 -0
  6. package/components/table/table-paging/index.d.ts +1 -0
  7. package/components/table/table-paging/models/custom-action.interface.d.ts +4 -0
  8. package/components/table/table-paging/models/index.d.ts +1 -0
  9. package/components/table/table-paging/table-paging.component.d.ts +2 -0
  10. package/esm2015/components/table/index.js +1 -1
  11. package/esm2015/components/table/table-paging/index.js +1 -0
  12. package/esm2015/components/table/table-paging/models/custom-action.interface.js +1 -0
  13. package/esm2015/components/table/table-paging/models/index.js +1 -0
  14. package/esm2015/components/table/table-paging/table-paging.component.js +19 -4
  15. package/esm5/components/table/index.js +1 -1
  16. package/esm5/components/table/table-paging/index.js +1 -0
  17. package/esm5/components/table/table-paging/models/custom-action.interface.js +1 -0
  18. package/esm5/components/table/table-paging/models/index.js +1 -0
  19. package/esm5/components/table/table-paging/table-paging.component.js +19 -4
  20. package/fesm2015/seniorsistemas-angular-components.js +18 -3
  21. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  22. package/fesm5/seniorsistemas-angular-components.js +18 -3
  23. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  24. package/package.json +1 -1
  25. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -4738,9 +4738,12 @@ var TablePagingComponent = /** @class */ (function () {
4738
4738
  this.enableExportSelectedRecords = true;
4739
4739
  }
4740
4740
  TablePagingComponent.prototype.ngOnChanges = function (changes) {
4741
- this.totalRecordsText = this.translate.instant(this.getTranslatePrefix() + "total_records", {
4742
- value: changes.totalRecords.currentValue
4743
- });
4741
+ var _a;
4742
+ if ((_a = changes.totalRecords) === null || _a === void 0 ? void 0 : _a.currentValue) {
4743
+ this.totalRecordsText = this.translate.instant(this.getTranslatePrefix() + "total_records", {
4744
+ value: changes.totalRecords.currentValue
4745
+ });
4746
+ }
4744
4747
  };
4745
4748
  TablePagingComponent.prototype.getTranslatePrefix = function () {
4746
4749
  return this.hostProjectConfigs.domain + "." + this.hostProjectConfigs.service + ".";
@@ -4750,6 +4753,7 @@ var TablePagingComponent = /** @class */ (function () {
4750
4753
  };
4751
4754
  TablePagingComponent.prototype.getActions = function () {
4752
4755
  var _this = this;
4756
+ var _a;
4753
4757
  var actions = [
4754
4758
  {
4755
4759
  id: "exportCurrentPage",
@@ -4771,6 +4775,14 @@ var TablePagingComponent = /** @class */ (function () {
4771
4775
  command: function () { return _this.exportAllRecords(); }
4772
4776
  });
4773
4777
  }
4778
+ if ((_a = this.customActions) === null || _a === void 0 ? void 0 : _a.length) {
4779
+ var customMenus = this.customActions.map(function (p, index) { return ({
4780
+ id: "customAction_" + index,
4781
+ label: p.label,
4782
+ command: p.command
4783
+ }); });
4784
+ actions.push.apply(actions, __spread(customMenus));
4785
+ }
4774
4786
  return actions;
4775
4787
  };
4776
4788
  TablePagingComponent.prototype.validateComponent = function () {
@@ -4917,6 +4929,9 @@ var TablePagingComponent = /** @class */ (function () {
4917
4929
  __decorate([
4918
4930
  Input()
4919
4931
  ], TablePagingComponent.prototype, "enableExportSelectedRecords", void 0);
4932
+ __decorate([
4933
+ Input()
4934
+ ], TablePagingComponent.prototype, "customActions", void 0);
4920
4935
  __decorate([
4921
4936
  Output()
4922
4937
  ], TablePagingComponent.prototype, "totalRecordsText", void 0);