@dmlibs/dm-cmps 0.1.14 → 0.1.16

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.
@@ -1413,11 +1413,11 @@ class DmIcon {
1413
1413
  }, ...(ngDevMode ? [{ debugName: "sizeString" }] : []));
1414
1414
  constructor() { }
1415
1415
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
1416
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmIcon, isStandalone: true, selector: "dm-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [ngStyle]=\"{\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i11.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1416
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmIcon, isStandalone: true, selector: "dm-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [ngStyle]=\"{\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i11.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1417
1417
  }
1418
1418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmIcon, decorators: [{
1419
1419
  type: Component,
1420
- args: [{ selector: 'dm-icon', imports: [MatIcon, CommonModule], standalone: true, template: "<div\n [ngStyle]=\"{\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n" }]
1420
+ args: [{ selector: 'dm-icon', imports: [MatIcon, CommonModule], standalone: true, template: "<div\n [ngStyle]=\"{\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n" }]
1421
1421
  }], ctorParameters: () => [], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
1422
1422
 
1423
1423
  class DmTable {
@@ -1639,10 +1639,24 @@ class DmTable {
1639
1639
  }));
1640
1640
  }
1641
1641
  normalizeColumns(cols) {
1642
- return cols.map((col, index) => ({
1643
- ...col,
1644
- id: col.id || `dm_table_col_${col.field ?? col.type}__${index}`,
1645
- }));
1642
+ return cols
1643
+ .map((col, index) => {
1644
+ if (col.hidden != undefined && col.hidden != null) {
1645
+ if (typeof col.hidden === 'boolean') {
1646
+ if (col.hidden)
1647
+ return null;
1648
+ }
1649
+ else if (typeof col.hidden === 'function') {
1650
+ if (col.hidden(this.datasource()))
1651
+ return null;
1652
+ }
1653
+ }
1654
+ return {
1655
+ ...col,
1656
+ id: col.id || `dm_table_col_${col.field ?? col.type}__${index}`,
1657
+ };
1658
+ })
1659
+ .filter((col) => col != null);
1646
1660
  }
1647
1661
  isSameColumnDefinition(a, b) {
1648
1662
  return (a.field === b.field &&