@ifsworld/granite-components 11.5.0 → 11.6.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 (33) hide show
  1. package/esm2022/index.mjs +5 -1
  2. package/esm2022/lib/collapsible-group/collapsible-group-body.directive.mjs +17 -0
  3. package/esm2022/lib/collapsible-group/collapsible-group-header.directive.mjs +17 -0
  4. package/esm2022/lib/collapsible-group/collapsible-group.component.mjs +39 -0
  5. package/esm2022/lib/collapsible-group/collapsible-group.module.mjs +33 -0
  6. package/esm2022/table/index.mjs +1 -2
  7. package/esm2022/table/lib/cell/cell-align/cell-align-classes.directive.mjs +10 -31
  8. package/esm2022/table/lib/cell/table-data-cell.component.mjs +2 -2
  9. package/esm2022/table/lib/cell/table-header-cell.component.mjs +2 -2
  10. package/esm2022/table/lib/column/table-column.directive.mjs +10 -2
  11. package/esm2022/table/lib/column-size/column-size.directive.mjs +34 -0
  12. package/esm2022/table/lib/table-constants.library.mjs +4 -6
  13. package/esm2022/table/lib/table.component.mjs +26 -19
  14. package/esm2022/table/lib/table.module.mjs +8 -4
  15. package/fesm2022/ifsworld-granite-components-table.mjs +80 -53
  16. package/fesm2022/ifsworld-granite-components-table.mjs.map +1 -1
  17. package/fesm2022/ifsworld-granite-components.mjs +91 -2
  18. package/fesm2022/ifsworld-granite-components.mjs.map +1 -1
  19. package/index.d.ts +4 -0
  20. package/lib/collapsible-group/collapsible-group-body.directive.d.ts +7 -0
  21. package/lib/collapsible-group/collapsible-group-header.directive.d.ts +7 -0
  22. package/lib/collapsible-group/collapsible-group.component.d.ts +15 -0
  23. package/lib/collapsible-group/collapsible-group.module.d.ts +11 -0
  24. package/package.json +1 -1
  25. package/table/index.d.ts +0 -1
  26. package/table/lib/cell/cell-align/cell-align-classes.directive.d.ts +5 -6
  27. package/table/lib/column/table-column.directive.d.ts +7 -1
  28. package/table/lib/column-size/column-size.directive.d.ts +11 -0
  29. package/table/lib/table-constants.library.d.ts +2 -4
  30. package/table/lib/table.component.d.ts +9 -7
  31. package/table/lib/table.module.d.ts +6 -4
  32. package/esm2022/table/lib/table.types.mjs +0 -2
  33. package/table/lib/table.types.d.ts +0 -1
@@ -7,6 +7,8 @@ import { GraniteTableColumnDirective } from './column/table-column.directive';
7
7
  import { GraniteTableHeaderCellComponent } from './cell/table-header-cell.component';
8
8
  import { GraniteTableDataCellComponent } from './cell/table-data-cell.component';
9
9
  import { GraniteCellAlignClassesDirective } from './cell/cell-align/cell-align-classes.directive';
10
+ import { CdkTableModule } from '@angular/cdk/table';
11
+ import { GraniteColumnSizeDirective } from './column-size/column-size.directive';
10
12
  import * as i0 from "@angular/core";
11
13
  export class GraniteTableModule {
12
14
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -14,21 +16,23 @@ export class GraniteTableModule {
14
16
  GraniteTableColumnDirective,
15
17
  GraniteTableHeaderCellComponent,
16
18
  GraniteTableDataCellComponent,
17
- GraniteCellAlignClassesDirective], imports: [CommonModule, TableModule, PurePipesModule], exports: [GraniteTableComponent, GraniteTableColumnDirective] }); }
18
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, imports: [CommonModule, TableModule, PurePipesModule] }); }
19
+ GraniteCellAlignClassesDirective,
20
+ GraniteColumnSizeDirective], imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule], exports: [GraniteTableComponent, GraniteTableColumnDirective] }); }
21
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule] }); }
19
22
  }
20
23
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, decorators: [{
21
24
  type: NgModule,
22
25
  args: [{
23
- imports: [CommonModule, TableModule, PurePipesModule],
26
+ imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule],
24
27
  declarations: [
25
28
  GraniteTableComponent,
26
29
  GraniteTableColumnDirective,
27
30
  GraniteTableHeaderCellComponent,
28
31
  GraniteTableDataCellComponent,
29
32
  GraniteCellAlignClassesDirective,
33
+ GraniteColumnSizeDirective,
30
34
  ],
31
35
  exports: [GraniteTableComponent, GraniteTableColumnDirective],
32
36
  }]
33
37
  }] });
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9ncmFuaXRlLWNvbXBvbmVudHMvdGFibGUvc3JjL2xpYi90YWJsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUU1QyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFL0QsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDMUQsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDOUUsT0FBTyxFQUFFLCtCQUErQixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDckYsT0FBTyxFQUFFLDZCQUE2QixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDakYsT0FBTyxFQUFFLGdDQUFnQyxFQUFFLE1BQU0sZ0RBQWdELENBQUM7O0FBYWxHLE1BQU0sT0FBTyxrQk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2xhc3Nlc0RpcmVjdGl2ZSB9IGZyb20gJy4vY2VsbC9jZWxsLWFsaWduL2NlbGwtYWxpZ24tY2xhc3Nlcy5kaXJlY3RpdmUnO1xuaW1wb3J0IHsgQ2RrVGFibGVNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jZGsvdGFibGUnO1xuaW1wb3J0IHsgR3Jhbml0ZUNvbHVtblNpemVEaXJlY3RpdmUgfSBmcm9tICcuL2NvbHVtbi1zaXplL2NvbHVtbi1zaXplLmRpcmVjdGl2ZSc7XG5cbkBOZ01vZHVsZSh7XG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIFRhYmxlTW9kdWxlLCBQdXJlUGlwZXNNb2R1bGUsIENka1RhYmxlTW9kdWxlXSxcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgR3Jhbml0ZVRhYmxlQ29tcG9uZW50LFxuICAgIEdyYW5pdGVUYWJsZUNvbHVtbkRpcmVjdGl2ZSxcbiAgICBHcmFuaXRlVGFibGVIZWFkZXJDZWxsQ29tcG9uZW50LFxuICAgIEdyYW5pdGVUYWJsZURhdGFDZWxsQ29tcG9uZW50LFxuICAgIEdyYW5pdGVDZWxsQWxpZ25DbGFzc2VzRGlyZWN0aXZlLFxuICAgIEdyYW5pdGVDb2x1bW5TaXplRGlyZWN0aXZlLFxuICBdLFxuICBleHBvcnRzOiBbR3Jhbml0ZVRhYmxlQ29tcG9uZW50LCBHcmFuaXRlVGFibGVDb2x1bW5EaXJlY3RpdmVdLFxufSlcbmV4cG9ydCBjbGFzcyBHcmFuaXRlVGFibGVNb2R1bGUge31cbiJdfQ==
@@ -2,15 +2,19 @@ import * as i0 from '@angular/core';
2
2
  import { Directive, Input, ContentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, ContentChildren, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i2 from 'primeng/table';
6
5
  import { TableModule } from 'primeng/table';
7
6
  import * as i7 from '@ifsworld/granite-components';
8
7
  import { PurePipesModule } from '@ifsworld/granite-components';
9
- import * as i3 from 'primeng/api';
8
+ import * as i2 from '@angular/cdk/table';
9
+ import { CdkTableModule } from '@angular/cdk/table';
10
10
 
11
11
  class GraniteTableColumnDirective {
12
+ constructor() {
13
+ this.textAlign = 'center';
14
+ this.size = 'small';
15
+ }
12
16
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableColumnDirective, selector: "granite-table-column", inputs: { name: "name", title: "title", class: "class", headerClass: "headerClass" }, queries: [{ propertyName: "tableCellTemplateRef", first: true, predicate: ["graniteTableCellTemplate"], descendants: true }], ngImport: i0 }); }
17
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableColumnDirective, selector: "granite-table-column", inputs: { name: "name", title: "title", class: "class", headerClass: "headerClass", textAlign: "textAlign", size: "size" }, queries: [{ propertyName: "tableCellTemplateRef", first: true, predicate: ["graniteTableCellTemplate"], descendants: true }], ngImport: i0 }); }
14
18
  }
15
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableColumnDirective, decorators: [{
16
20
  type: Directive,
@@ -26,6 +30,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
26
30
  type: Input
27
31
  }], headerClass: [{
28
32
  type: Input
33
+ }], textAlign: [{
34
+ type: Input
35
+ }], size: [{
36
+ type: Input
29
37
  }], tableCellTemplateRef: [{
30
38
  type: ContentChild,
31
39
  args: ['graniteTableCellTemplate', { static: false }]
@@ -33,11 +41,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
33
41
 
34
42
  class GraniteTableCellConstants {
35
43
  static { this.CELL_ID_PREFIX = 'granite-cell'; }
36
- static { this.RIGHT_ALIGN = 'granite-right-align'; }
37
- static { this.CENTER_ALIGN = 'granite-center-align'; }
38
- }
39
- class GraniteTableConstants {
40
- static { this.STYLE_CLASS = 'granite-table'; }
44
+ static { this.START_ALIGN = 'granite-table-cell-start-align'; }
45
+ static { this.CENTER_ALIGN = 'granite-table-cell-center-align'; }
46
+ static { this.END_ALIGN = 'granite-table-cell-end-align'; }
41
47
  }
42
48
 
43
49
  class GraniteCell {
@@ -54,24 +60,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
54
60
 
55
61
  class GraniteTableHeaderCellComponent extends GraniteCell {
56
62
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableHeaderCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
57
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableHeaderCellComponent, selector: "th[graniteTableHeaderCell]", host: { classAttribute: "granite-table-header-cell" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".granite-table.p-datatable .p-datatable-thead>tr>th.granite-table-header-cell{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;color:var(--granite-color-text-weak);background:var(--granite-color-background-variant)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
63
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableHeaderCellComponent, selector: "th[graniteTableHeaderCell]", host: { classAttribute: "granite-table-header-cell" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".granite-table th.granite-table-header-cell{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text-weak);background:var(--granite-color-background-page)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
58
64
  }
59
65
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableHeaderCellComponent, decorators: [{
60
66
  type: Component,
61
67
  args: [{ selector: 'th[graniteTableHeaderCell]', template: '<ng-content></ng-content>', host: {
62
68
  class: 'granite-table-header-cell',
63
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".granite-table.p-datatable .p-datatable-thead>tr>th.granite-table-header-cell{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;color:var(--granite-color-text-weak);background:var(--granite-color-background-variant)}\n"] }]
69
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".granite-table th.granite-table-header-cell{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text-weak);background:var(--granite-color-background-page)}\n"] }]
64
70
  }] });
65
71
 
66
72
  class GraniteTableDataCellComponent extends GraniteCell {
67
73
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableDataCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
68
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableDataCellComponent, selector: "granite-table-data-cell", inputs: { value: "value", rowIndex: "rowIndex", columnIndex: "columnIndex", row: "row", tableCellTemplateRef: "tableCellTemplateRef" }, host: { classAttribute: "granite-table-data-cell" }, usesInheritance: true, ngImport: i0, template: "<ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }\"\n></ng-template>\n\n<ng-template #defaultTableCellTemplate>\n {{ value }}\n</ng-template>\n", styles: [".granite-table.p-datatable .p-datatable-tbody>tr>td{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);color:var(--granite-color-text);border-top:1px solid var(--granite-color-border-soft)}@media only screen and (max-width: 960px){.granite-table.p-datatable.p-datatable-responsive-stack .p-datatable-tbody>tr td{border:none}}@media only screen and (max-width: 960px){.granite-table.p-datatable.p-datatable-responsive-stack .p-datatable-tbody>tr:not(.granite-table.p-datatable.p-datatable-responsive-stack .p-datatable-tbody>tr:last-child) td{border-bottom:1px solid var(--granite-color-border-soft)}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
74
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableDataCellComponent, selector: "granite-table-data-cell", inputs: { value: "value", rowIndex: "rowIndex", columnIndex: "columnIndex", row: "row", tableCellTemplateRef: "tableCellTemplateRef" }, host: { classAttribute: "granite-table-data-cell" }, usesInheritance: true, ngImport: i0, template: "<ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }\"\n></ng-template>\n\n<ng-template #defaultTableCellTemplate>\n {{ value }}\n</ng-template>\n", styles: [".granite-table tr>td{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-body-medium);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);border-top:1px solid var(--granite-color-border-soft)}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
69
75
  }
70
76
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableDataCellComponent, decorators: [{
71
77
  type: Component,
72
78
  args: [{ selector: 'granite-table-data-cell', host: {
73
79
  class: 'granite-table-data-cell',
74
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }\"\n></ng-template>\n\n<ng-template #defaultTableCellTemplate>\n {{ value }}\n</ng-template>\n", styles: [".granite-table.p-datatable .p-datatable-tbody>tr>td{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);color:var(--granite-color-text);border-top:1px solid var(--granite-color-border-soft)}@media only screen and (max-width: 960px){.granite-table.p-datatable.p-datatable-responsive-stack .p-datatable-tbody>tr td{border:none}}@media only screen and (max-width: 960px){.granite-table.p-datatable.p-datatable-responsive-stack .p-datatable-tbody>tr:not(.granite-table.p-datatable.p-datatable-responsive-stack .p-datatable-tbody>tr:last-child) td{border-bottom:1px solid var(--granite-color-border-soft)}}\n"] }]
80
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }\"\n></ng-template>\n\n<ng-template #defaultTableCellTemplate>\n {{ value }}\n</ng-template>\n", styles: [".granite-table tr>td{padding:var(--granite-spacing-8);font-size:var(--granite-font-size-body-medium);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);border-top:1px solid var(--granite-color-border-soft)}\n"] }]
75
81
  }], propDecorators: { value: [{
76
82
  type: Input
77
83
  }], rowIndex: [{
@@ -86,32 +92,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
86
92
 
87
93
  class GraniteCellAlignClassesDirective {
88
94
  constructor() {
89
- this.rightAlign = false;
90
- this.centerAlign = false;
95
+ this.textAlign = 'center';
91
96
  }
92
- ngOnChanges(changes) {
93
- if (changes.graniteCellAlignClasses &&
94
- changes.graniteCellAlignClasses.currentValue != null) {
95
- if (this.graniteCellAlignClasses.includes(GraniteTableCellConstants.RIGHT_ALIGN) ||
96
- (Array.isArray(this.graniteCellAlignClasses) &&
97
- this.graniteCellAlignClasses.includes(GraniteTableCellConstants.RIGHT_ALIGN))) {
98
- this.rightAlign = true;
99
- this.centerAlign = false;
100
- }
101
- else if (this.graniteCellAlignClasses.includes(GraniteTableCellConstants.CENTER_ALIGN) ||
102
- (Array.isArray(this.graniteCellAlignClasses) &&
103
- this.graniteCellAlignClasses.includes(GraniteTableCellConstants.CENTER_ALIGN))) {
104
- this.centerAlign = true;
105
- this.rightAlign = false;
106
- }
107
- else {
108
- this.centerAlign = false;
109
- this.rightAlign = false;
110
- }
111
- }
97
+ get alignmentClass() {
98
+ return `granite-table-cell-${this.textAlign ? this.textAlign : 'center'}-align`;
112
99
  }
113
100
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCellAlignClassesDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
114
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteCellAlignClassesDirective, selector: "[graniteCellAlignClasses]", inputs: { graniteCellAlignClasses: "graniteCellAlignClasses" }, host: { properties: { "class.granite-table-cell-right-align": "this.rightAlign", "class.granite-table-cell-center-align": "this.centerAlign" } }, usesOnChanges: true, ngImport: i0 }); }
101
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteCellAlignClassesDirective, selector: "[graniteCellAlignClasses]", inputs: { graniteCellAlignClasses: "graniteCellAlignClasses", textAlign: "textAlign" }, host: { properties: { "class": "this.alignmentClass" } }, ngImport: i0 }); }
115
102
  }
116
103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCellAlignClassesDirective, decorators: [{
117
104
  type: Directive,
@@ -120,38 +107,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
120
107
  }]
121
108
  }], propDecorators: { graniteCellAlignClasses: [{
122
109
  type: Input
123
- }], rightAlign: [{
110
+ }], textAlign: [{
111
+ type: Input
112
+ }], alignmentClass: [{
124
113
  type: HostBinding,
125
- args: ['class.granite-table-cell-right-align']
126
- }], centerAlign: [{
114
+ args: ['class']
115
+ }] } });
116
+
117
+ class GraniteColumnSizeDirective {
118
+ constructor() {
119
+ this.graniteColumnSize = 'medium';
120
+ this.sizeMap = {
121
+ small: 'sm',
122
+ medium: 'md',
123
+ large: 'lg',
124
+ };
125
+ }
126
+ get columnSizeClass() {
127
+ return `column-size-${this.sizeMap[this.graniteColumnSize]}`;
128
+ }
129
+ ngOnChanges() {
130
+ if (!this.graniteColumnSize || !this.sizeMap[this.graniteColumnSize]) {
131
+ this.graniteColumnSize = 'small';
132
+ }
133
+ }
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteColumnSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
135
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteColumnSizeDirective, selector: "[graniteColumnSize]", inputs: { graniteColumnSize: "graniteColumnSize" }, host: { properties: { "class": "this.columnSizeClass" } }, usesOnChanges: true, ngImport: i0 }); }
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteColumnSizeDirective, decorators: [{
138
+ type: Directive,
139
+ args: [{
140
+ selector: '[graniteColumnSize]',
141
+ }]
142
+ }], propDecorators: { graniteColumnSize: [{
143
+ type: Input
144
+ }], columnSizeClass: [{
127
145
  type: HostBinding,
128
- args: ['class.granite-table-cell-center-align']
146
+ args: ['class']
129
147
  }] } });
130
148
 
131
149
  class GraniteTableComponent {
132
- constructor() {
150
+ constructor(cd) {
151
+ this.cd = cd;
133
152
  this.dataSource = [];
134
- this.layout = 'stack';
135
- this.styleClass = GraniteTableConstants.STYLE_CLASS;
153
+ this.horizontalScroll = false;
136
154
  this.cellIdPrefix = GraniteTableCellConstants.CELL_ID_PREFIX;
137
155
  }
138
- ngAfterContentInit() {
139
- this._columns = this.tableColumnsComponent.toArray();
156
+ ngAfterContentChecked() {
157
+ this.refreshData();
158
+ this.cd.markForCheck();
140
159
  }
141
160
  _trackColumnName(index, column) {
142
161
  return column.name;
143
162
  }
144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
145
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableComponent, selector: "granite-table", inputs: { dataSource: "dataSource", trackBy: "trackBy", layout: "layout" }, queries: [{ propertyName: "tableColumnsComponent", predicate: GraniteTableColumnDirective }], ngImport: i0, template: "<!-- [tableStyle]=\"{ width: '100%' }\" given to have equal width column -->\n<p-table\n [value]=\"dataSource\"\n [rowTrackBy]=\"trackBy\"\n [responsiveLayout]=\"layout\"\n [tableStyle]=\"{ width: '100%' }\"\n [styleClass]=\"styleClass\"\n>\n <ng-template pTemplate=\"header\">\n <tr data-granite-table-header-row>\n <ng-container *ngFor=\"let column of _columns; trackBy: _trackColumnName\"\n ><th\n [attr.data-granite-table-header-cell]=\"column.name\"\n graniteTableHeaderCell\n [graniteCellAlignClasses]=\"column.headerClass\"\n >\n {{ column.title ?? column.name | graniteTitle }}\n </th></ng-container\n >\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\">\n <tr data-granite-table-row>\n <ng-container\n *ngFor=\"\n let column of _columns;\n trackBy: _trackColumnName;\n let columnIndex = index\n \"\n >\n <td\n [attr.data-granite-table-cell]=\"column.name\"\n [graniteCellAlignClasses]=\"column.class\"\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n >\n <granite-table-data-cell\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n [value]=\"row[column.name]\"\n [row]=\"row\"\n [column]=\"column\"\n [rowIndex]=\"rowIndex\"\n [columnIndex]=\"columnIndex\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n ></granite-table-data-cell>\n </td>\n </ng-container>\n </tr>\n </ng-template>\n</p-table>\n", styles: [".granite-table.p-datatable .p-datatable-tbody>tr>td.granite-table-cell-right-align,.granite-table.p-datatable .p-datatable-thead>tr>th.granite-table-cell-right-align{text-align:end}.granite-table.p-datatable .p-datatable-tbody>tr>td.granite-table-cell-center-align,.granite-table.p-datatable .p-datatable-thead>tr>th.granite-table-cell-center-align{text-align:center}.granite-table.p-datatable.p-component{font-family:inherit;font-weight:inherit;font-size:inherit}.granite-table.p-datatable .p-datatable-tbody>tr{background:var(--granite-color-background-variant)}.granite-table.p-datatable .p-datatable-thead>tr,.granite-table.p-datatable .p-datatable-tbody>tr{height:2.5rem}.granite-table.p-datatable .p-datatable-thead>tr>th,.granite-table.p-datatable .p-datatable-tbody>tr>td{border:none;border-width:0}.granite-table .p-datatable-table{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: GraniteTableHeaderCellComponent, selector: "th[graniteTableHeaderCell]" }, { kind: "component", type: GraniteTableDataCellComponent, selector: "granite-table-data-cell", inputs: ["value", "rowIndex", "columnIndex", "row", "tableCellTemplateRef"] }, { kind: "directive", type: GraniteCellAlignClassesDirective, selector: "[graniteCellAlignClasses]", inputs: ["graniteCellAlignClasses"] }, { kind: "pipe", type: i7.GraniteTitlePipe, name: "graniteTitle" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
163
+ refreshData() {
164
+ this._columns = this.tableColumnsComponent.toArray();
165
+ this._displayedColumns = this.tableColumnsComponent
166
+ .toArray()
167
+ .map((c) => c.name);
168
+ }
169
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
170
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteTableComponent, selector: "granite-table", inputs: { dataSource: "dataSource", horizontalScroll: "horizontalScroll", trackBy: "trackBy" }, queries: [{ propertyName: "tableColumnsComponent", predicate: GraniteTableColumnDirective }], ngImport: i0, template: "<div\n class=\"cdk-table-wrapper\"\n data-fnd=\"granite-table-wrapper\"\n [class.horizontal-scroll]=\"horizontalScroll\"\n>\n <table\n class=\"granite-table\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackBy\"\n >\n <ng-container\n *ngFor=\"\n let column of _columns;\n trackBy: _trackColumnName;\n let columnIndex = index\n \"\n [cdkColumnDef]=\"column.name\"\n >\n <th\n tabindex=\"0\"\n cdk-header-cell\n *cdkHeaderCellDef\n data-fnd=\"data-granite-table-header-cell\"\n [graniteColumnSize]=\"column.size\"\n [attr.data-granite-table-header-cell]=\"column.name\"\n graniteTableHeaderCell\n graniteCellAlignClasses\n [textAlign]=\"column.textAlign\"\n [class]=\"column.headerClass\"\n >\n {{ column.title ?? column.name | graniteTitle }}\n </th>\n\n <td\n tabindex=\"0\"\n cdk-cell\n *cdkCellDef=\"let row; let rowIndex = index\"\n data-fnd=\"data-granite-table-row-cell\"\n [attr.data-granite-table-cell]=\"column.name\"\n [graniteColumnSize]=\"column.size\"\n graniteCellAlignClasses\n [textAlign]=\"column.textAlign\"\n [class]=\"column.class\"\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n >\n <granite-table-data-cell\n [value]=\"row[column.name]\"\n [row]=\"row\"\n [column]=\"column\"\n [rowIndex]=\"rowIndex\"\n [columnIndex]=\"columnIndex\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n ></granite-table-data-cell>\n </td>\n </ng-container>\n\n <tr\n tabindex=\"0\"\n cdk-header-row\n *cdkHeaderRowDef=\"_displayedColumns\"\n data-fnd=\"data-granite-table-header\"\n ></tr>\n <tr\n tabindex=\"0\"\n cdk-row\n *cdkRowDef=\"let row; columns: _displayedColumns\"\n data-fnd=\"data-granite-table-row\"\n ></tr>\n </table>\n</div>\n", styles: [".granite-table tr>td.granite-table-cell-center-align,.granite-table tr>th.granite-table-cell-center-align{text-align:center}.granite-table tr>td.granite-table-cell-start-align,.granite-table tr>th.granite-table-cell-start-align{text-align:start}.granite-table tr>td.granite-table-cell-end-align,.granite-table tr>th.granite-table-cell-end-align{text-align:end}.granite-table [cdk-header-cell].column-size-sm,.granite-table [cdk-cell].column-size-sm{padding:.375rem .5rem}.granite-table [cdk-header-cell].column-size-md,.granite-table [cdk-cell].column-size-md{padding:.75rem 1rem}.granite-table [cdk-header-cell].column-size-lg,.granite-table [cdk-cell].column-size-lg{padding:.9375rem 1.25rem}.cdk-table-wrapper{width:100%;overflow-x:hidden}.cdk-table-wrapper .cdk-table{width:100%;border-spacing:0;white-space:nowrap}.cdk-table-wrapper .cdk-table .cdk-header-row,.cdk-table-wrapper .cdk-table cdk-cell{height:2.5rem}.cdk-table-wrapper .cdk-table .cdk-cell{background:var(--granite-color-background-variant)}.cdk-table-wrapper .cdk-table .cdk-header-cell,.cdk-table-wrapper .cdk-table cdk-cell{border:none;border-width:0}.cdk-table-wrapper .cdk-table .cdk-row,.cdk-table-wrapper .cdk-table .cdk-header-row{background:var(--granite-color-background-variant);height:2.5rem}.horizontal-scroll{overflow-x:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: i2.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { kind: "directive", type: i2.CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "component", type: i2.CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: i2.CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "component", type: i2.CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: i2.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "component", type: GraniteTableHeaderCellComponent, selector: "th[graniteTableHeaderCell]" }, { kind: "component", type: GraniteTableDataCellComponent, selector: "granite-table-data-cell", inputs: ["value", "rowIndex", "columnIndex", "row", "tableCellTemplateRef"] }, { kind: "directive", type: GraniteCellAlignClassesDirective, selector: "[graniteCellAlignClasses]", inputs: ["graniteCellAlignClasses", "textAlign"] }, { kind: "directive", type: GraniteColumnSizeDirective, selector: "[graniteColumnSize]", inputs: ["graniteColumnSize"] }, { kind: "pipe", type: i7.GraniteTitlePipe, name: "graniteTitle" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
146
171
  }
147
172
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableComponent, decorators: [{
148
173
  type: Component,
149
- args: [{ selector: 'granite-table', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- [tableStyle]=\"{ width: '100%' }\" given to have equal width column -->\n<p-table\n [value]=\"dataSource\"\n [rowTrackBy]=\"trackBy\"\n [responsiveLayout]=\"layout\"\n [tableStyle]=\"{ width: '100%' }\"\n [styleClass]=\"styleClass\"\n>\n <ng-template pTemplate=\"header\">\n <tr data-granite-table-header-row>\n <ng-container *ngFor=\"let column of _columns; trackBy: _trackColumnName\"\n ><th\n [attr.data-granite-table-header-cell]=\"column.name\"\n graniteTableHeaderCell\n [graniteCellAlignClasses]=\"column.headerClass\"\n >\n {{ column.title ?? column.name | graniteTitle }}\n </th></ng-container\n >\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\">\n <tr data-granite-table-row>\n <ng-container\n *ngFor=\"\n let column of _columns;\n trackBy: _trackColumnName;\n let columnIndex = index\n \"\n >\n <td\n [attr.data-granite-table-cell]=\"column.name\"\n [graniteCellAlignClasses]=\"column.class\"\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n >\n <granite-table-data-cell\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n [value]=\"row[column.name]\"\n [row]=\"row\"\n [column]=\"column\"\n [rowIndex]=\"rowIndex\"\n [columnIndex]=\"columnIndex\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n ></granite-table-data-cell>\n </td>\n </ng-container>\n </tr>\n </ng-template>\n</p-table>\n", styles: [".granite-table.p-datatable .p-datatable-tbody>tr>td.granite-table-cell-right-align,.granite-table.p-datatable .p-datatable-thead>tr>th.granite-table-cell-right-align{text-align:end}.granite-table.p-datatable .p-datatable-tbody>tr>td.granite-table-cell-center-align,.granite-table.p-datatable .p-datatable-thead>tr>th.granite-table-cell-center-align{text-align:center}.granite-table.p-datatable.p-component{font-family:inherit;font-weight:inherit;font-size:inherit}.granite-table.p-datatable .p-datatable-tbody>tr{background:var(--granite-color-background-variant)}.granite-table.p-datatable .p-datatable-thead>tr,.granite-table.p-datatable .p-datatable-tbody>tr{height:2.5rem}.granite-table.p-datatable .p-datatable-thead>tr>th,.granite-table.p-datatable .p-datatable-tbody>tr>td{border:none;border-width:0}.granite-table .p-datatable-table{overflow:hidden}\n"] }]
150
- }], propDecorators: { dataSource: [{
174
+ args: [{ selector: 'granite-table', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"cdk-table-wrapper\"\n data-fnd=\"granite-table-wrapper\"\n [class.horizontal-scroll]=\"horizontalScroll\"\n>\n <table\n class=\"granite-table\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackBy\"\n >\n <ng-container\n *ngFor=\"\n let column of _columns;\n trackBy: _trackColumnName;\n let columnIndex = index\n \"\n [cdkColumnDef]=\"column.name\"\n >\n <th\n tabindex=\"0\"\n cdk-header-cell\n *cdkHeaderCellDef\n data-fnd=\"data-granite-table-header-cell\"\n [graniteColumnSize]=\"column.size\"\n [attr.data-granite-table-header-cell]=\"column.name\"\n graniteTableHeaderCell\n graniteCellAlignClasses\n [textAlign]=\"column.textAlign\"\n [class]=\"column.headerClass\"\n >\n {{ column.title ?? column.name | graniteTitle }}\n </th>\n\n <td\n tabindex=\"0\"\n cdk-cell\n *cdkCellDef=\"let row; let rowIndex = index\"\n data-fnd=\"data-granite-table-row-cell\"\n [attr.data-granite-table-cell]=\"column.name\"\n [graniteColumnSize]=\"column.size\"\n graniteCellAlignClasses\n [textAlign]=\"column.textAlign\"\n [class]=\"column.class\"\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n >\n <granite-table-data-cell\n [value]=\"row[column.name]\"\n [row]=\"row\"\n [column]=\"column\"\n [rowIndex]=\"rowIndex\"\n [columnIndex]=\"columnIndex\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n ></granite-table-data-cell>\n </td>\n </ng-container>\n\n <tr\n tabindex=\"0\"\n cdk-header-row\n *cdkHeaderRowDef=\"_displayedColumns\"\n data-fnd=\"data-granite-table-header\"\n ></tr>\n <tr\n tabindex=\"0\"\n cdk-row\n *cdkRowDef=\"let row; columns: _displayedColumns\"\n data-fnd=\"data-granite-table-row\"\n ></tr>\n </table>\n</div>\n", styles: [".granite-table tr>td.granite-table-cell-center-align,.granite-table tr>th.granite-table-cell-center-align{text-align:center}.granite-table tr>td.granite-table-cell-start-align,.granite-table tr>th.granite-table-cell-start-align{text-align:start}.granite-table tr>td.granite-table-cell-end-align,.granite-table tr>th.granite-table-cell-end-align{text-align:end}.granite-table [cdk-header-cell].column-size-sm,.granite-table [cdk-cell].column-size-sm{padding:.375rem .5rem}.granite-table [cdk-header-cell].column-size-md,.granite-table [cdk-cell].column-size-md{padding:.75rem 1rem}.granite-table [cdk-header-cell].column-size-lg,.granite-table [cdk-cell].column-size-lg{padding:.9375rem 1.25rem}.cdk-table-wrapper{width:100%;overflow-x:hidden}.cdk-table-wrapper .cdk-table{width:100%;border-spacing:0;white-space:nowrap}.cdk-table-wrapper .cdk-table .cdk-header-row,.cdk-table-wrapper .cdk-table cdk-cell{height:2.5rem}.cdk-table-wrapper .cdk-table .cdk-cell{background:var(--granite-color-background-variant)}.cdk-table-wrapper .cdk-table .cdk-header-cell,.cdk-table-wrapper .cdk-table cdk-cell{border:none;border-width:0}.cdk-table-wrapper .cdk-table .cdk-row,.cdk-table-wrapper .cdk-table .cdk-header-row{background:var(--granite-color-background-variant);height:2.5rem}.horizontal-scroll{overflow-x:auto}\n"] }]
175
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { dataSource: [{
151
176
  type: Input
152
- }], trackBy: [{
177
+ }], horizontalScroll: [{
153
178
  type: Input
154
- }], layout: [{
179
+ }], trackBy: [{
155
180
  type: Input
156
181
  }], tableColumnsComponent: [{
157
182
  type: ContentChildren,
@@ -164,19 +189,21 @@ class GraniteTableModule {
164
189
  GraniteTableColumnDirective,
165
190
  GraniteTableHeaderCellComponent,
166
191
  GraniteTableDataCellComponent,
167
- GraniteCellAlignClassesDirective], imports: [CommonModule, TableModule, PurePipesModule], exports: [GraniteTableComponent, GraniteTableColumnDirective] }); }
168
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, imports: [CommonModule, TableModule, PurePipesModule] }); }
192
+ GraniteCellAlignClassesDirective,
193
+ GraniteColumnSizeDirective], imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule], exports: [GraniteTableComponent, GraniteTableColumnDirective] }); }
194
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule] }); }
169
195
  }
170
196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteTableModule, decorators: [{
171
197
  type: NgModule,
172
198
  args: [{
173
- imports: [CommonModule, TableModule, PurePipesModule],
199
+ imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule],
174
200
  declarations: [
175
201
  GraniteTableComponent,
176
202
  GraniteTableColumnDirective,
177
203
  GraniteTableHeaderCellComponent,
178
204
  GraniteTableDataCellComponent,
179
205
  GraniteCellAlignClassesDirective,
206
+ GraniteColumnSizeDirective,
180
207
  ],
181
208
  exports: [GraniteTableComponent, GraniteTableColumnDirective],
182
209
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"ifsworld-granite-components-table.mjs","sources":["../../../../libs/granite-components/table/src/lib/column/table-column.directive.ts","../../../../libs/granite-components/table/src/lib/table-constants.library.ts","../../../../libs/granite-components/table/src/lib/cell/cell.ts","../../../../libs/granite-components/table/src/lib/cell/table-header-cell.component.ts","../../../../libs/granite-components/table/src/lib/cell/table-data-cell.component.ts","../../../../libs/granite-components/table/src/lib/cell/table-data-cell.component.html","../../../../libs/granite-components/table/src/lib/cell/cell-align/cell-align-classes.directive.ts","../../../../libs/granite-components/table/src/lib/table.component.ts","../../../../libs/granite-components/table/src/lib/table.component.html","../../../../libs/granite-components/table/src/lib/table.module.ts","../../../../libs/granite-components/table/src/ifsworld-granite-components-table.ts"],"sourcesContent":["import { ContentChild, Directive, Input, TemplateRef } from '@angular/core';\n\nexport interface GraniteTableColumnInterface {\n name: string;\n title?: string;\n class?: string | string[];\n headerClass?: string | string[];\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'granite-table-column',\n})\nexport class GraniteTableColumnDirective\n implements GraniteTableColumnInterface\n{\n @Input()\n name: string;\n\n @Input()\n title?: string;\n\n @Input()\n class?: string | string[];\n\n @Input()\n headerClass?: string | string[];\n\n @ContentChild('graniteTableCellTemplate', { static: false })\n tableCellTemplateRef: TemplateRef<any>;\n}\n","export class GraniteTableCellConstants {\n static readonly CELL_ID_PREFIX: string = 'granite-cell';\n static readonly RIGHT_ALIGN: string = 'granite-right-align';\n static readonly CENTER_ALIGN: string = 'granite-center-align';\n}\n\nexport class GraniteTableConstants {\n static readonly STYLE_CLASS: string = 'granite-table';\n}\n","import { Directive, Input } from '@angular/core';\n\nimport { GraniteTableColumnDirective } from '../column/table-column.directive';\n\n@Directive()\nexport abstract class GraniteCell {\n @Input()\n id: string;\n\n @Input()\n column: GraniteTableColumnDirective;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { GraniteCell } from './cell';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'th[graniteTableHeaderCell]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./table-header-cell.component.scss'],\n host: {\n class: 'granite-table-header-cell',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteTableHeaderCellComponent extends GraniteCell {}\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { GraniteCell } from './cell';\n\n@Component({\n selector: 'granite-table-data-cell',\n templateUrl: './table-data-cell.component.html',\n styleUrls: ['./table-data-cell.component.scss'],\n host: {\n class: 'granite-table-data-cell',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteTableDataCellComponent extends GraniteCell {\n @Input()\n value: any;\n\n @Input()\n rowIndex: number;\n\n @Input()\n columnIndex: number;\n\n @Input()\n row: any;\n\n // Custom template provided by the consumer\n @Input()\n tableCellTemplateRef: TemplateRef<any>;\n}\n","<ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }\"\n></ng-template>\n\n<ng-template #defaultTableCellTemplate>\n {{ value }}\n</ng-template>\n","import {\n Directive,\n HostBinding,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\n\nimport { GraniteTableCellConstants } from '../../table-constants.library';\n\n@Directive({\n selector: '[graniteCellAlignClasses]',\n})\nexport class GraniteCellAlignClassesDirective implements OnChanges {\n @Input()\n graniteCellAlignClasses?: string | string[];\n\n @HostBinding('class.granite-table-cell-right-align')\n rightAlign: boolean = false;\n\n @HostBinding('class.granite-table-cell-center-align')\n centerAlign: boolean = false;\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n changes.graniteCellAlignClasses &&\n changes.graniteCellAlignClasses.currentValue != null\n ) {\n if (\n this.graniteCellAlignClasses.includes(\n GraniteTableCellConstants.RIGHT_ALIGN\n ) ||\n (Array.isArray(this.graniteCellAlignClasses) &&\n this.graniteCellAlignClasses.includes(\n GraniteTableCellConstants.RIGHT_ALIGN\n ))\n ) {\n this.rightAlign = true;\n this.centerAlign = false;\n } else if (\n this.graniteCellAlignClasses.includes(\n GraniteTableCellConstants.CENTER_ALIGN\n ) ||\n (Array.isArray(this.graniteCellAlignClasses) &&\n this.graniteCellAlignClasses.includes(\n GraniteTableCellConstants.CENTER_ALIGN\n ))\n ) {\n this.centerAlign = true;\n this.rightAlign = false;\n } else {\n this.centerAlign = false;\n this.rightAlign = false;\n }\n }\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Input,\n QueryList,\n TrackByFunction,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { GraniteTableColumnDirective } from './column/table-column.directive';\nimport {\n GraniteTableCellConstants,\n GraniteTableConstants,\n} from './table-constants.library';\nimport { ResponsiveLayout } from './table.types';\n\n@Component({\n selector: 'granite-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteTableComponent<T> implements AfterContentInit {\n @Input()\n dataSource: any[] = [];\n\n @Input()\n trackBy: TrackByFunction<T>;\n\n @Input()\n layout: ResponsiveLayout = 'stack';\n\n @ContentChildren(GraniteTableColumnDirective)\n tableColumnsComponent: QueryList<GraniteTableColumnDirective>;\n\n readonly styleClass = GraniteTableConstants.STYLE_CLASS;\n readonly cellIdPrefix = GraniteTableCellConstants.CELL_ID_PREFIX;\n\n _columns: GraniteTableColumnDirective[];\n\n ngAfterContentInit(): void {\n this._columns = this.tableColumnsComponent.toArray();\n }\n\n _trackColumnName(index: number, column: GraniteTableColumnDirective): string {\n return column.name;\n }\n}\n","<!-- [tableStyle]=\"{ width: '100%' }\" given to have equal width column -->\n<p-table\n [value]=\"dataSource\"\n [rowTrackBy]=\"trackBy\"\n [responsiveLayout]=\"layout\"\n [tableStyle]=\"{ width: '100%' }\"\n [styleClass]=\"styleClass\"\n>\n <ng-template pTemplate=\"header\">\n <tr data-granite-table-header-row>\n <ng-container *ngFor=\"let column of _columns; trackBy: _trackColumnName\"\n ><th\n [attr.data-granite-table-header-cell]=\"column.name\"\n graniteTableHeaderCell\n [graniteCellAlignClasses]=\"column.headerClass\"\n >\n {{ column.title ?? column.name | graniteTitle }}\n </th></ng-container\n >\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\">\n <tr data-granite-table-row>\n <ng-container\n *ngFor=\"\n let column of _columns;\n trackBy: _trackColumnName;\n let columnIndex = index\n \"\n >\n <td\n [attr.data-granite-table-cell]=\"column.name\"\n [graniteCellAlignClasses]=\"column.class\"\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n >\n <granite-table-data-cell\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n [value]=\"row[column.name]\"\n [row]=\"row\"\n [column]=\"column\"\n [rowIndex]=\"rowIndex\"\n [columnIndex]=\"columnIndex\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n ></granite-table-data-cell>\n </td>\n </ng-container>\n </tr>\n </ng-template>\n</p-table>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableModule } from 'primeng/table';\n\nimport { PurePipesModule } from '@ifsworld/granite-components';\n\nimport { GraniteTableComponent } from './table.component';\nimport { GraniteTableColumnDirective } from './column/table-column.directive';\nimport { GraniteTableHeaderCellComponent } from './cell/table-header-cell.component';\nimport { GraniteTableDataCellComponent } from './cell/table-data-cell.component';\nimport { GraniteCellAlignClassesDirective } from './cell/cell-align/cell-align-classes.directive';\n\n@NgModule({\n imports: [CommonModule, TableModule, PurePipesModule],\n declarations: [\n GraniteTableComponent,\n GraniteTableColumnDirective,\n GraniteTableHeaderCellComponent,\n GraniteTableDataCellComponent,\n GraniteCellAlignClassesDirective,\n ],\n exports: [GraniteTableComponent, GraniteTableColumnDirective],\n})\nexport class GraniteTableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.GraniteTableHeaderCellComponent","i5.GraniteTableDataCellComponent","i6.GraniteCellAlignClassesDirective"],"mappings":";;;;;;;;;;MAaa,2BAA2B,CAAA;+GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAA3B,2BAA2B,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,KAAA,EAAA,OAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAJvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,sBAAsB;AACjC,iBAAA,CAAA;8BAKC,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAIN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAIN,WAAW,EAAA,CAAA;sBADV,KAAK;gBAIN,oBAAoB,EAAA,CAAA;sBADnB,YAAY;AAAC,gBAAA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xB,YAAY,EAAE,WAAW,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAQ1C,qBAAqB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;AAEjD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAVnB,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAUzC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,eAAe,CAAC;AACrD,oBAAA,YAAY,EAAE;wBACZ,qBAAqB;wBACrB,2BAA2B;wBAC3B,+BAA+B;wBAC/B,6BAA6B;wBAC7B,gCAAgC;AACjC,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;AAC9D,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ifsworld-granite-components-table.mjs","sources":["../../../../libs/granite-components/table/src/lib/column/table-column.directive.ts","../../../../libs/granite-components/table/src/lib/table-constants.library.ts","../../../../libs/granite-components/table/src/lib/cell/cell.ts","../../../../libs/granite-components/table/src/lib/cell/table-header-cell.component.ts","../../../../libs/granite-components/table/src/lib/cell/table-data-cell.component.ts","../../../../libs/granite-components/table/src/lib/cell/table-data-cell.component.html","../../../../libs/granite-components/table/src/lib/cell/cell-align/cell-align-classes.directive.ts","../../../../libs/granite-components/table/src/lib/column-size/column-size.directive.ts","../../../../libs/granite-components/table/src/lib/table.component.ts","../../../../libs/granite-components/table/src/lib/table.component.html","../../../../libs/granite-components/table/src/lib/table.module.ts","../../../../libs/granite-components/table/src/ifsworld-granite-components-table.ts"],"sourcesContent":["import { ContentChild, Directive, Input, TemplateRef } from '@angular/core';\n\nexport type GranitTableColumnAlign = 'start' | 'center' | 'end';\nexport type GranitTableColumnSize = 'small' | 'medium' | 'large';\n\nexport interface GraniteTableColumnInterface {\n name: string;\n title?: string;\n class?: string | string[];\n headerClass?: string | string[];\n textAlign?: GranitTableColumnAlign;\n size?: GranitTableColumnSize;\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'granite-table-column',\n})\nexport class GraniteTableColumnDirective\n implements GraniteTableColumnInterface\n{\n @Input()\n name: string;\n\n @Input()\n title?: string;\n\n @Input()\n class?: string | string[];\n\n @Input()\n headerClass?: string | string[];\n\n @Input() textAlign: GranitTableColumnAlign = 'center';\n\n @Input() size: GranitTableColumnSize = 'small';\n\n @ContentChild('graniteTableCellTemplate', { static: false })\n tableCellTemplateRef: TemplateRef<any>;\n}\n","export class GraniteTableCellConstants {\n static readonly CELL_ID_PREFIX: string = 'granite-cell';\n static readonly START_ALIGN: string = 'granite-table-cell-start-align';\n static readonly CENTER_ALIGN: string = 'granite-table-cell-center-align';\n static readonly END_ALIGN: string = 'granite-table-cell-end-align';\n}\n","import { Directive, Input } from '@angular/core';\n\nimport { GraniteTableColumnDirective } from '../column/table-column.directive';\n\n@Directive()\nexport abstract class GraniteCell {\n @Input()\n id: string;\n\n @Input()\n column: GraniteTableColumnDirective;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { GraniteCell } from './cell';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'th[graniteTableHeaderCell]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./table-header-cell.component.scss'],\n host: {\n class: 'granite-table-header-cell',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteTableHeaderCellComponent extends GraniteCell {}\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { GraniteCell } from './cell';\n\n@Component({\n selector: 'granite-table-data-cell',\n templateUrl: './table-data-cell.component.html',\n styleUrls: ['./table-data-cell.component.scss'],\n host: {\n class: 'granite-table-data-cell',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteTableDataCellComponent extends GraniteCell {\n @Input()\n value: any;\n\n @Input()\n rowIndex: number;\n\n @Input()\n columnIndex: number;\n\n @Input()\n row: any;\n\n // Custom template provided by the consumer\n @Input()\n tableCellTemplateRef: TemplateRef<any>;\n}\n","<ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }\"\n></ng-template>\n\n<ng-template #defaultTableCellTemplate>\n {{ value }}\n</ng-template>\n","import { Directive, HostBinding, Input } from '@angular/core';\nimport { GranitTableColumnAlign } from '../../column/table-column.directive';\n\n@Directive({\n selector: '[graniteCellAlignClasses]',\n})\nexport class GraniteCellAlignClassesDirective {\n @Input() graniteCellAlignClasses?: string | string[];\n @Input() textAlign: GranitTableColumnAlign = 'center';\n\n @HostBinding('class') get alignmentClass(): string {\n return `granite-table-cell-${\n this.textAlign ? this.textAlign : 'center'\n }-align`;\n }\n}\n","import { Directive, HostBinding, Input, OnChanges } from '@angular/core';\nimport { GranitTableColumnSize } from '../column/table-column.directive';\n\n@Directive({\n selector: '[graniteColumnSize]',\n})\nexport class GraniteColumnSizeDirective implements OnChanges {\n @Input() graniteColumnSize: GranitTableColumnSize = 'medium';\n\n @HostBinding('class') get columnSizeClass(): string {\n return `column-size-${this.sizeMap[this.graniteColumnSize]}`;\n }\n\n private readonly sizeMap: Record<GranitTableColumnSize, string> = {\n small: 'sm',\n medium: 'md',\n large: 'lg',\n } as const;\n\n ngOnChanges(): void {\n if (!this.graniteColumnSize || !this.sizeMap[this.graniteColumnSize]) {\n this.graniteColumnSize = 'small';\n }\n }\n}\n","import {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Input,\n QueryList,\n TrackByFunction,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { GraniteTableColumnDirective } from './column/table-column.directive';\nimport { GraniteTableCellConstants } from './table-constants.library';\n\n@Component({\n selector: 'granite-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteTableComponent<T> implements AfterContentChecked {\n @Input()\n dataSource: any[] = [];\n\n @Input()\n horizontalScroll = false;\n\n @Input()\n trackBy: TrackByFunction<T>;\n\n @ContentChildren(GraniteTableColumnDirective)\n tableColumnsComponent: QueryList<GraniteTableColumnDirective>;\n\n readonly cellIdPrefix = GraniteTableCellConstants.CELL_ID_PREFIX;\n\n _columns: GraniteTableColumnDirective[];\n _displayedColumns: string[];\n\n constructor(private cd: ChangeDetectorRef) {}\n\n ngAfterContentChecked(): void {\n this.refreshData();\n this.cd.markForCheck();\n }\n\n _trackColumnName(index: number, column: GraniteTableColumnDirective): string {\n return column.name;\n }\n\n private refreshData(): void {\n this._columns = this.tableColumnsComponent.toArray();\n this._displayedColumns = this.tableColumnsComponent\n .toArray()\n .map((c) => c.name);\n }\n}\n","<div\n class=\"cdk-table-wrapper\"\n data-fnd=\"granite-table-wrapper\"\n [class.horizontal-scroll]=\"horizontalScroll\"\n>\n <table\n class=\"granite-table\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackBy\"\n >\n <ng-container\n *ngFor=\"\n let column of _columns;\n trackBy: _trackColumnName;\n let columnIndex = index\n \"\n [cdkColumnDef]=\"column.name\"\n >\n <th\n tabindex=\"0\"\n cdk-header-cell\n *cdkHeaderCellDef\n data-fnd=\"data-granite-table-header-cell\"\n [graniteColumnSize]=\"column.size\"\n [attr.data-granite-table-header-cell]=\"column.name\"\n graniteTableHeaderCell\n graniteCellAlignClasses\n [textAlign]=\"column.textAlign\"\n [class]=\"column.headerClass\"\n >\n {{ column.title ?? column.name | graniteTitle }}\n </th>\n\n <td\n tabindex=\"0\"\n cdk-cell\n *cdkCellDef=\"let row; let rowIndex = index\"\n data-fnd=\"data-granite-table-row-cell\"\n [attr.data-granite-table-cell]=\"column.name\"\n [graniteColumnSize]=\"column.size\"\n graniteCellAlignClasses\n [textAlign]=\"column.textAlign\"\n [class]=\"column.class\"\n [id]=\"cellIdPrefix + '-' + rowIndex + '-' + columnIndex\"\n >\n <granite-table-data-cell\n [value]=\"row[column.name]\"\n [row]=\"row\"\n [column]=\"column\"\n [rowIndex]=\"rowIndex\"\n [columnIndex]=\"columnIndex\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n ></granite-table-data-cell>\n </td>\n </ng-container>\n\n <tr\n tabindex=\"0\"\n cdk-header-row\n *cdkHeaderRowDef=\"_displayedColumns\"\n data-fnd=\"data-granite-table-header\"\n ></tr>\n <tr\n tabindex=\"0\"\n cdk-row\n *cdkRowDef=\"let row; columns: _displayedColumns\"\n data-fnd=\"data-granite-table-row\"\n ></tr>\n </table>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableModule } from 'primeng/table';\n\nimport { PurePipesModule } from '@ifsworld/granite-components';\n\nimport { GraniteTableComponent } from './table.component';\nimport { GraniteTableColumnDirective } from './column/table-column.directive';\nimport { GraniteTableHeaderCellComponent } from './cell/table-header-cell.component';\nimport { GraniteTableDataCellComponent } from './cell/table-data-cell.component';\nimport { GraniteCellAlignClassesDirective } from './cell/cell-align/cell-align-classes.directive';\nimport { CdkTableModule } from '@angular/cdk/table';\nimport { GraniteColumnSizeDirective } from './column-size/column-size.directive';\n\n@NgModule({\n imports: [CommonModule, TableModule, PurePipesModule, CdkTableModule],\n declarations: [\n GraniteTableComponent,\n GraniteTableColumnDirective,\n GraniteTableHeaderCellComponent,\n GraniteTableDataCellComponent,\n GraniteCellAlignClassesDirective,\n GraniteColumnSizeDirective,\n ],\n exports: [GraniteTableComponent, GraniteTableColumnDirective],\n})\nexport class GraniteTableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.GraniteTableHeaderCellComponent","i4.GraniteTableDataCellComponent","i5.GraniteCellAlignClassesDirective","i6.GraniteColumnSizeDirective"],"mappings":";;;;;;;;;;MAkBa,2BAA2B,CAAA;AAJxC,IAAA,WAAA,GAAA;QAmBW,IAAS,CAAA,SAAA,GAA2B,QAAQ,CAAC;QAE7C,IAAI,CAAA,IAAA,GAA0B,OAAO,CAAC;AAIhD,KAAA;+GArBY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAA3B,2BAA2B,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,KAAA,EAAA,OAAA,EAAA,WAAA,EAAA,aAAA,EAAA,SAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAJvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,sBAAsB;AACjC,iBAAA,CAAA;8BAKC,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAIN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAIN,WAAW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AC;AAC9D,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, HostBinding, ContentChildren, NgModule, InjectionToken, Attribute, Inject, Optional, EventEmitter, QueryList, TemplateRef, Directive, ViewChild, Output, Self, HostListener, ViewEncapsulation, Pipe } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, HostBinding, ContentChildren, NgModule, InjectionToken, Attribute, Inject, Optional, EventEmitter, QueryList, TemplateRef, Directive, ViewChild, Output, Self, HostListener, ViewEncapsulation, Pipe, inject, ContentChild } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT } from '@angular/common';
5
5
  import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
@@ -4404,6 +4404,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4404
4404
  }]
4405
4405
  }] });
4406
4406
 
4407
+ class GraniteCollapsibleConditionalBodyDirective {
4408
+ constructor() {
4409
+ this.template = inject(TemplateRef);
4410
+ }
4411
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleConditionalBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4412
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteCollapsibleConditionalBodyDirective, selector: "[graniteCollapsibleGroupBody]", exportAs: ["graniteCollapsibleGroupBody"], ngImport: i0 }); }
4413
+ }
4414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleConditionalBodyDirective, decorators: [{
4415
+ type: Directive,
4416
+ args: [{
4417
+ selector: '[graniteCollapsibleGroupBody]',
4418
+ exportAs: 'graniteCollapsibleGroupBody',
4419
+ }]
4420
+ }] });
4421
+
4422
+ class GraniteCollapsibleConditionalHeaderDirective {
4423
+ constructor() {
4424
+ this.template = inject(TemplateRef);
4425
+ }
4426
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleConditionalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4427
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GraniteCollapsibleConditionalHeaderDirective, selector: "[graniteCollapsibleGroupHeader]", exportAs: ["graniteCollapsibleGroupHeader"], ngImport: i0 }); }
4428
+ }
4429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleConditionalHeaderDirective, decorators: [{
4430
+ type: Directive,
4431
+ args: [{
4432
+ selector: '[graniteCollapsibleGroupHeader]',
4433
+ exportAs: 'graniteCollapsibleGroupHeader',
4434
+ }]
4435
+ }] });
4436
+
4437
+ class GraniteCollapsibleGroupComponent {
4438
+ constructor() {
4439
+ this.collapsed = true;
4440
+ this.id = '';
4441
+ this.arialabel = null;
4442
+ this.collapsedChanged = new EventEmitter();
4443
+ }
4444
+ toggleCollapsibleGroup() {
4445
+ this.collapsed = !this.collapsed;
4446
+ this.collapsedChanged.emit(this.collapsed);
4447
+ }
4448
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4449
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GraniteCollapsibleGroupComponent, selector: "granite-collapsible-group", inputs: { collapsed: "collapsed", id: "id", arialabel: "arialabel" }, outputs: { collapsedChanged: "collapsedChanged" }, queries: [{ propertyName: "conditionalBodyContentRef", first: true, predicate: GraniteCollapsibleConditionalBodyDirective, descendants: true }, { propertyName: "conditionalHeaderContentRef", first: true, predicate: GraniteCollapsibleConditionalHeaderDirective, descendants: true }], ngImport: i0, template: "<div class=\"collapsible-wrapper\">\n <div\n class=\"collapsible-group-header\"\n role=\"button\"\n (click)=\"toggleCollapsibleGroup()\"\n [attr.id]=\"id ? 'collapsible-group-header-' + id : null\"\n [attr.aria-label]=\"arialabel\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"id ? 'collapsible-group-body-' + id : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"\n conditionalHeaderContentRef\n ? conditionalHeaderContentRef.template\n : null\n \"\n ></ng-container>\n\n <div class=\"collapse-icon\">\n <granite-icon *ngIf=\"collapsed; else caretUp\">caret-down</granite-icon>\n <ng-template #caretUp>\n <granite-icon>caret-up</granite-icon>\n </ng-template>\n </div>\n </div>\n <div\n class=\"collapsible-group-body\"\n [class]=\"collapsed ? 'collapse' : 'expand'\"\n role=\"region\"\n [attr.id]=\"id ? 'collapsible-group-body-' + id : null\"\n [attr.aria-labelledby]=\"id ? 'collapsible-group-header-' + id : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"\n !collapsed && conditionalBodyContentRef\n ? conditionalBodyContentRef.template\n : null\n \"\n >\n </ng-container>\n </div>\n</div>\n", styles: [".collapsible-wrapper{background-color:var(--granite-color-background-variant);width:100%;font-family:var(--granite-font-family-default)}.collapsible-wrapper .collapsible-group-header{display:flex;flex-direction:row;justify-content:space-between;cursor:pointer;font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-semibold);padding:0 var(--granite-spacing-8);transition:background-color .2s ease-out;color:var(--granite-color-text);background-color:var(--granite-color-background-variant);align-items:center}.collapsible-wrapper .collapsible-group-header:hover{opacity:.7}.collapsible-wrapper .collapsible-group-header .collapse-icon{align-self:center;font-size:var(--granite-font-size-display-small)}.collapsible-wrapper .collapsible-group-body{padding:var(--granite-spacing-2) var(--granite-spacing-16) var(--granite-spacing-2) var(--granite-spacing-16);transition:all .3s ease-in-out}.collapsible-wrapper .collapsible-group-body.expand{display:block;background-color:var(--granite-color-background)}.collapsible-wrapper .collapsible-group-body.collapse{display:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }] }); }
4450
+ }
4451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleGroupComponent, decorators: [{
4452
+ type: Component,
4453
+ args: [{ selector: 'granite-collapsible-group', template: "<div class=\"collapsible-wrapper\">\n <div\n class=\"collapsible-group-header\"\n role=\"button\"\n (click)=\"toggleCollapsibleGroup()\"\n [attr.id]=\"id ? 'collapsible-group-header-' + id : null\"\n [attr.aria-label]=\"arialabel\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"id ? 'collapsible-group-body-' + id : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"\n conditionalHeaderContentRef\n ? conditionalHeaderContentRef.template\n : null\n \"\n ></ng-container>\n\n <div class=\"collapse-icon\">\n <granite-icon *ngIf=\"collapsed; else caretUp\">caret-down</granite-icon>\n <ng-template #caretUp>\n <granite-icon>caret-up</granite-icon>\n </ng-template>\n </div>\n </div>\n <div\n class=\"collapsible-group-body\"\n [class]=\"collapsed ? 'collapse' : 'expand'\"\n role=\"region\"\n [attr.id]=\"id ? 'collapsible-group-body-' + id : null\"\n [attr.aria-labelledby]=\"id ? 'collapsible-group-header-' + id : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"\n !collapsed && conditionalBodyContentRef\n ? conditionalBodyContentRef.template\n : null\n \"\n >\n </ng-container>\n </div>\n</div>\n", styles: [".collapsible-wrapper{background-color:var(--granite-color-background-variant);width:100%;font-family:var(--granite-font-family-default)}.collapsible-wrapper .collapsible-group-header{display:flex;flex-direction:row;justify-content:space-between;cursor:pointer;font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-semibold);padding:0 var(--granite-spacing-8);transition:background-color .2s ease-out;color:var(--granite-color-text);background-color:var(--granite-color-background-variant);align-items:center}.collapsible-wrapper .collapsible-group-header:hover{opacity:.7}.collapsible-wrapper .collapsible-group-header .collapse-icon{align-self:center;font-size:var(--granite-font-size-display-small)}.collapsible-wrapper .collapsible-group-body{padding:var(--granite-spacing-2) var(--granite-spacing-16) var(--granite-spacing-2) var(--granite-spacing-16);transition:all .3s ease-in-out}.collapsible-wrapper .collapsible-group-body.expand{display:block;background-color:var(--granite-color-background)}.collapsible-wrapper .collapsible-group-body.collapse{display:none}\n"] }]
4454
+ }], propDecorators: { collapsed: [{
4455
+ type: Input
4456
+ }], id: [{
4457
+ type: Input
4458
+ }], arialabel: [{
4459
+ type: Input
4460
+ }], collapsedChanged: [{
4461
+ type: Output
4462
+ }], conditionalBodyContentRef: [{
4463
+ type: ContentChild,
4464
+ args: [GraniteCollapsibleConditionalBodyDirective]
4465
+ }], conditionalHeaderContentRef: [{
4466
+ type: ContentChild,
4467
+ args: [GraniteCollapsibleConditionalHeaderDirective]
4468
+ }] } });
4469
+
4470
+ class GraniteCollapsibleGroupModule {
4471
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4472
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleGroupModule, declarations: [GraniteCollapsibleGroupComponent,
4473
+ GraniteCollapsibleConditionalHeaderDirective,
4474
+ GraniteCollapsibleConditionalBodyDirective], imports: [CommonModule, GraniteIconModule], exports: [GraniteCollapsibleGroupComponent,
4475
+ GraniteCollapsibleConditionalHeaderDirective,
4476
+ GraniteCollapsibleConditionalBodyDirective] }); }
4477
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleGroupModule, imports: [CommonModule, GraniteIconModule] }); }
4478
+ }
4479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GraniteCollapsibleGroupModule, decorators: [{
4480
+ type: NgModule,
4481
+ args: [{
4482
+ imports: [CommonModule, GraniteIconModule],
4483
+ declarations: [
4484
+ GraniteCollapsibleGroupComponent,
4485
+ GraniteCollapsibleConditionalHeaderDirective,
4486
+ GraniteCollapsibleConditionalBodyDirective,
4487
+ ],
4488
+ exports: [
4489
+ GraniteCollapsibleGroupComponent,
4490
+ GraniteCollapsibleConditionalHeaderDirective,
4491
+ GraniteCollapsibleConditionalBodyDirective,
4492
+ ],
4493
+ }]
4494
+ }] });
4495
+
4407
4496
  /*
4408
4497
  * Public API Surface of ui
4409
4498
  */
@@ -4412,5 +4501,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4412
4501
  * Generated bundle index. Do not edit.
4413
4502
  */
4414
4503
 
4415
- export { ButtonSelectors, ClientInputDesktopDirective, ClientInputTouchDirective, ClientOutputDesktopDirective, ClientOutputTouchDirective, GRANITE_CLIENT_INPUT, GRANITE_CLIENT_OUTPUT, GraniteAnchorComponent, GraniteArrangeGridComponent, GraniteArrangeGridItemComponent, GraniteArrangeGridModule, GraniteArrangeGridOrientation, GraniteBadgeComponent, GraniteBadgeHarness, GraniteBadgeModule, GraniteButtonComponent, GraniteButtonModule, GraniteCardActionsComponent, GraniteCardAvatarComponent, GraniteCardBodyComponent, GraniteCardComponent, GraniteCardContentComponent, GraniteCardFooterComponent, GraniteCardHeaderComponent, GraniteCardHeaderSubTitleComponent, GraniteCardHeaderTitleComponent, GraniteCardListComponent, GraniteCardListModule, GraniteCheckboxComponent, GraniteCheckboxGroupComponent, GraniteCheckboxModule, GraniteChipComponent, GraniteChipInputDirective, GraniteChipListComponent, GraniteChipSelectionChangeEvent, GraniteChipsModule, GraniteCoreModule, GraniteDividerDirective, GraniteGridComponent, GraniteGridItemComponent, GraniteGridModule, GraniteHideOnOverflowDirective, GraniteIconComponent, GraniteIconModule, GraniteInputFieldComponent, GraniteInputFieldModule, GraniteLabelComponent, GraniteLabelModule, GraniteMenuComponent, GraniteMenuHarness, GraniteMenuItemComponent, GraniteMenuItemHarness, GraniteMenuModule, GraniteMenuTouchCloseComponent, GraniteMenuTouchTitleItemComponent, GraniteMenuTriggerForDirective, GraniteProgressBarComponent, GraniteProgressBarModule, GraniteRadioButtonComponent, GraniteRadioButtonModule, GraniteRadioGroupComponent, GraniteTitleDirective, GraniteTitlePipe, GraniteToggleSwitchComponent, GraniteToggleSwitchModule, PurePipesModule, deviceDesktop, deviceTouch, disabledMixin, graniteMenuDesktopAnimations, graniteMenuTouchAnimations };
4504
+ export { ButtonSelectors, ClientInputDesktopDirective, ClientInputTouchDirective, ClientOutputDesktopDirective, ClientOutputTouchDirective, GRANITE_CLIENT_INPUT, GRANITE_CLIENT_OUTPUT, GraniteAnchorComponent, GraniteArrangeGridComponent, GraniteArrangeGridItemComponent, GraniteArrangeGridModule, GraniteArrangeGridOrientation, GraniteBadgeComponent, GraniteBadgeHarness, GraniteBadgeModule, GraniteButtonComponent, GraniteButtonModule, GraniteCardActionsComponent, GraniteCardAvatarComponent, GraniteCardBodyComponent, GraniteCardComponent, GraniteCardContentComponent, GraniteCardFooterComponent, GraniteCardHeaderComponent, GraniteCardHeaderSubTitleComponent, GraniteCardHeaderTitleComponent, GraniteCardListComponent, GraniteCardListModule, GraniteCheckboxComponent, GraniteCheckboxGroupComponent, GraniteCheckboxModule, GraniteChipComponent, GraniteChipInputDirective, GraniteChipListComponent, GraniteChipSelectionChangeEvent, GraniteChipsModule, GraniteCollapsibleConditionalBodyDirective, GraniteCollapsibleConditionalHeaderDirective, GraniteCollapsibleGroupComponent, GraniteCollapsibleGroupModule, GraniteCoreModule, GraniteDividerDirective, GraniteGridComponent, GraniteGridItemComponent, GraniteGridModule, GraniteHideOnOverflowDirective, GraniteIconComponent, GraniteIconModule, GraniteInputFieldComponent, GraniteInputFieldModule, GraniteLabelComponent, GraniteLabelModule, GraniteMenuComponent, GraniteMenuHarness, GraniteMenuItemComponent, GraniteMenuItemHarness, GraniteMenuModule, GraniteMenuTouchCloseComponent, GraniteMenuTouchTitleItemComponent, GraniteMenuTriggerForDirective, GraniteProgressBarComponent, GraniteProgressBarModule, GraniteRadioButtonComponent, GraniteRadioButtonModule, GraniteRadioGroupComponent, GraniteTitleDirective, GraniteTitlePipe, GraniteToggleSwitchComponent, GraniteToggleSwitchModule, PurePipesModule, deviceDesktop, deviceTouch, disabledMixin, graniteMenuDesktopAnimations, graniteMenuTouchAnimations };
4416
4505
  //# sourceMappingURL=ifsworld-granite-components.mjs.map