ngx-mat-table-multi-sort 18.3.0 → 18.4.1

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.
package/README.md CHANGED
@@ -22,7 +22,7 @@ An Angular library that adds multi-sort capability to the Angular Material table
22
22
 
23
23
  **Prerequisite:** You have created an application using a supported version of Angular and Angular Material
24
24
 
25
- 1. In your Angular application run `npm install ngx-mat-table-multi-sort` to add the library to your dependencies
25
+ 1. In your Angular application run `pnpm install ngx-mat-table-multi-sort` to add the library to your dependencies
26
26
  1. As this library is using Material, add the following to the `head` element of your `index.html`:
27
27
 
28
28
  ```html
@@ -55,8 +55,8 @@ Enjoy multi-sorting your Angular Material data table!
55
55
  The demo application is hosted on [GitHub pages](https://pgerke.github.io/ngx-mat-table-multi-sort/). You can also clone the repository and run the demo locally.
56
56
 
57
57
  1. Clone the repository to your local machine
58
- 1. Run `npm install` to restore the dependencies
59
- 1. Start the demo application by running `npm run start:demo`
58
+ 1. Run `pnpm install` to restore the dependencies
59
+ 1. Start the demo application by running `pnpm run start:demo`
60
60
  1. When compilation is completed, the application is running on `http://localhost:4200`
61
61
 
62
62
  ## License
@@ -1,11 +1,15 @@
1
1
  import { CdkDrag, CdkDropList, moveItemInArray, } from "@angular/cdk/drag-drop";
2
2
  import { Component } from "@angular/core";
3
+ import { MatButtonModule } from "@angular/material/button";
3
4
  import { MatCheckboxModule } from "@angular/material/checkbox";
4
5
  import { MatIconModule } from "@angular/material/icon";
6
+ import { MatTooltipModule } from "@angular/material/tooltip";
5
7
  import * as i0 from "@angular/core";
6
8
  import * as i1 from "../mat-table-column-config-persistence.service";
7
- import * as i2 from "@angular/material/checkbox";
8
- import * as i3 from "@angular/material/icon";
9
+ import * as i2 from "@angular/material/button";
10
+ import * as i3 from "@angular/material/checkbox";
11
+ import * as i4 from "@angular/material/icon";
12
+ import * as i5 from "@angular/material/tooltip";
9
13
  export class MatTableColumnConfigComponent {
10
14
  persistenceService;
11
15
  subscription;
@@ -46,11 +50,56 @@ export class MatTableColumnConfigComponent {
46
50
  this.columns[index].visible = !this.columns[index].visible;
47
51
  this.persistenceService.columns = this.columns;
48
52
  }
53
+ /**
54
+ * Sets all columns in the table to visible and updates the persisted column configuration.
55
+ *
56
+ * Iterates through the `columns` array, setting each column's `visible` property to `true`.
57
+ * Then, updates the `persistenceService.columns` property to reflect the new visibility state.
58
+ */
59
+ selectAllColumns() {
60
+ for (const column of this.columns) {
61
+ column.visible = true;
62
+ }
63
+ this.persistenceService.columns = this.columns;
64
+ }
65
+ /**
66
+ * Deselects all columns by setting their `visible` property to `false`.
67
+ * Updates the persisted columns state via the `persistenceService`.
68
+ *
69
+ * @remarks
70
+ * This method iterates through all columns in the `columns` array and hides each one.
71
+ * After updating the visibility, it synchronizes the state with the persistence service.
72
+ */
73
+ deselectAllColumns() {
74
+ for (const column of this.columns) {
75
+ column.visible = false;
76
+ }
77
+ this.persistenceService.columns = this.columns;
78
+ }
79
+ /**
80
+ * Inverts the visibility state of all columns in the `columns` array.
81
+ * Each column's `visible` property is toggled between `true` and `false`.
82
+ * After updating the visibility, the modified columns array is assigned to the persistence service
83
+ * to persist the new visibility state.
84
+ */
85
+ invertColumnSelection() {
86
+ for (const column of this.columns) {
87
+ column.visible = !column.visible;
88
+ }
89
+ this.persistenceService.columns = this.columns;
90
+ }
49
91
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatTableColumnConfigComponent, deps: [{ token: i1.MatTableColumnConfigPersistenceService }], target: i0.ɵɵFactoryTarget.Component });
50
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatTableColumnConfigComponent, isStandalone: true, selector: "mat-table-column-config", ngImport: i0, template: "<div\n cdkDropList\n class=\"table-column-list mat-elevation-z4\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87));max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
92
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatTableColumnConfigComponent, isStandalone: true, selector: "mat-table-column-config", ngImport: i0, template: "<div class=\"container mat-elevation-z4\">\n <div class=\"toolbar\">\n <button\n mat-icon-button\n matTooltip=\"Select all columns\"\n (click)=\"selectAllColumns()\">\n <mat-icon>select_all</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Deselect all columns\"\n (click)=\"deselectAllColumns()\">\n <mat-icon>deselect</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Invert selection\"\n (click)=\"invertColumnSelection()\">\n <mat-icon>flip</mat-icon>\n </button>\n </div>\n <hr />\n <div\n cdkDropList\n class=\"table-column-list\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </div>\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}div.container{background:var(--mat-sys-surface, #ffffff);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87))}div.container>hr{border-color:var(--mat-inverse-on-surface, rgba(0, 0, 0, .87))}div.container>div.toolbar{display:inline}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
51
93
  }
52
94
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatTableColumnConfigComponent, decorators: [{
53
95
  type: Component,
54
- args: [{ selector: "mat-table-column-config", imports: [CdkDropList, CdkDrag, MatCheckboxModule, MatIconModule], standalone: true, template: "<div\n cdkDropList\n class=\"table-column-list mat-elevation-z4\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87));max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"] }]
96
+ args: [{ selector: "mat-table-column-config", imports: [
97
+ CdkDropList,
98
+ CdkDrag,
99
+ MatButtonModule,
100
+ MatCheckboxModule,
101
+ MatIconModule,
102
+ MatTooltipModule,
103
+ ], standalone: true, template: "<div class=\"container mat-elevation-z4\">\n <div class=\"toolbar\">\n <button\n mat-icon-button\n matTooltip=\"Select all columns\"\n (click)=\"selectAllColumns()\">\n <mat-icon>select_all</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Deselect all columns\"\n (click)=\"deselectAllColumns()\">\n <mat-icon>deselect</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Invert selection\"\n (click)=\"invertColumnSelection()\">\n <mat-icon>flip</mat-icon>\n </button>\n </div>\n <hr />\n <div\n cdkDropList\n class=\"table-column-list\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </div>\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}div.container{background:var(--mat-sys-surface, #ffffff);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87))}div.container>hr{border-color:var(--mat-inverse-on-surface, rgba(0, 0, 0, .87))}div.container>div.toolbar{display:inline}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"] }]
55
104
  }], ctorParameters: () => [{ type: i1.MatTableColumnConfigPersistenceService }] });
56
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0LXRhYmxlLWNvbHVtbi1jb25maWcuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9tYXQtdGFibGUtY29sdW1uLWNvbmZpZy9tYXQtdGFibGUtY29sdW1uLWNvbmZpZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL21hdC10YWJsZS1jb2x1bW4tY29uZmlnL21hdC10YWJsZS1jb2x1bW4tY29uZmlnLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxPQUFPLEVBRVAsV0FBVyxFQUNYLGVBQWUsR0FDaEIsTUFBTSx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7Ozs7O0FBWXZELE1BQU0sT0FBTyw2QkFBNkI7SUFLckI7SU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q2hhbmdlZChjb2x1bW4uaWQpXCJcbiAgICAgICAgICA+e3sgY29sdW1uLmxhYmVsIH19PC9tYXQtY2hlY2tib3hcbiAgICAgICAgPlxuICAgICAgPC9kaXY+XG4gICAgfVxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
@@ -1,12 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, EventEmitter, signal, effect, Directive, Optional, Inject, Output, Injectable, Component, HostListener, inject, ViewEncapsulation, ANIMATION_MODULE_TYPE, Input } from '@angular/core';
2
+ import { InjectionToken, EventEmitter, signal, effect, Output, Optional, Inject, Directive, Injectable, Component, HostListener, inject, ViewEncapsulation, ANIMATION_MODULE_TYPE, Input } from '@angular/core';
3
3
  import { moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
4
4
  import { MatSort, MAT_SORT_DEFAULT_OPTIONS, MatSortHeader } from '@angular/material/sort';
5
5
  import { ComponentPortal } from '@angular/cdk/portal';
6
- import * as i2 from '@angular/material/checkbox';
6
+ import * as i2 from '@angular/material/button';
7
+ import { MatButtonModule } from '@angular/material/button';
8
+ import * as i3 from '@angular/material/checkbox';
7
9
  import { MatCheckboxModule } from '@angular/material/checkbox';
8
- import * as i3 from '@angular/material/icon';
10
+ import * as i4 from '@angular/material/icon';
9
11
  import { MatIconModule } from '@angular/material/icon';
12
+ import * as i5 from '@angular/material/tooltip';
13
+ import { MatTooltipModule } from '@angular/material/tooltip';
10
14
  import { BehaviorSubject } from 'rxjs';
11
15
  import * as i1 from '@angular/cdk/overlay';
12
16
  import { MatTableDataSource } from '@angular/material/table';
@@ -419,12 +423,57 @@ class MatTableColumnConfigComponent {
419
423
  this.columns[index].visible = !this.columns[index].visible;
420
424
  this.persistenceService.columns = this.columns;
421
425
  }
426
+ /**
427
+ * Sets all columns in the table to visible and updates the persisted column configuration.
428
+ *
429
+ * Iterates through the `columns` array, setting each column's `visible` property to `true`.
430
+ * Then, updates the `persistenceService.columns` property to reflect the new visibility state.
431
+ */
432
+ selectAllColumns() {
433
+ for (const column of this.columns) {
434
+ column.visible = true;
435
+ }
436
+ this.persistenceService.columns = this.columns;
437
+ }
438
+ /**
439
+ * Deselects all columns by setting their `visible` property to `false`.
440
+ * Updates the persisted columns state via the `persistenceService`.
441
+ *
442
+ * @remarks
443
+ * This method iterates through all columns in the `columns` array and hides each one.
444
+ * After updating the visibility, it synchronizes the state with the persistence service.
445
+ */
446
+ deselectAllColumns() {
447
+ for (const column of this.columns) {
448
+ column.visible = false;
449
+ }
450
+ this.persistenceService.columns = this.columns;
451
+ }
452
+ /**
453
+ * Inverts the visibility state of all columns in the `columns` array.
454
+ * Each column's `visible` property is toggled between `true` and `false`.
455
+ * After updating the visibility, the modified columns array is assigned to the persistence service
456
+ * to persist the new visibility state.
457
+ */
458
+ invertColumnSelection() {
459
+ for (const column of this.columns) {
460
+ column.visible = !column.visible;
461
+ }
462
+ this.persistenceService.columns = this.columns;
463
+ }
422
464
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatTableColumnConfigComponent, deps: [{ token: MatTableColumnConfigPersistenceService }], target: i0.ɵɵFactoryTarget.Component });
423
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatTableColumnConfigComponent, isStandalone: true, selector: "mat-table-column-config", ngImport: i0, template: "<div\n cdkDropList\n class=\"table-column-list mat-elevation-z4\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87));max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
465
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatTableColumnConfigComponent, isStandalone: true, selector: "mat-table-column-config", ngImport: i0, template: "<div class=\"container mat-elevation-z4\">\n <div class=\"toolbar\">\n <button\n mat-icon-button\n matTooltip=\"Select all columns\"\n (click)=\"selectAllColumns()\">\n <mat-icon>select_all</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Deselect all columns\"\n (click)=\"deselectAllColumns()\">\n <mat-icon>deselect</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Invert selection\"\n (click)=\"invertColumnSelection()\">\n <mat-icon>flip</mat-icon>\n </button>\n </div>\n <hr />\n <div\n cdkDropList\n class=\"table-column-list\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </div>\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}div.container{background:var(--mat-sys-surface, #ffffff);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87))}div.container>hr{border-color:var(--mat-inverse-on-surface, rgba(0, 0, 0, .87))}div.container>div.toolbar{display:inline}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
424
466
  }
425
467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatTableColumnConfigComponent, decorators: [{
426
468
  type: Component,
427
- args: [{ selector: "mat-table-column-config", imports: [CdkDropList, CdkDrag, MatCheckboxModule, MatIconModule], standalone: true, template: "<div\n cdkDropList\n class=\"table-column-list mat-elevation-z4\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87));max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"] }]
469
+ args: [{ selector: "mat-table-column-config", imports: [
470
+ CdkDropList,
471
+ CdkDrag,
472
+ MatButtonModule,
473
+ MatCheckboxModule,
474
+ MatIconModule,
475
+ MatTooltipModule,
476
+ ], standalone: true, template: "<div class=\"container mat-elevation-z4\">\n <div class=\"toolbar\">\n <button\n mat-icon-button\n matTooltip=\"Select all columns\"\n (click)=\"selectAllColumns()\">\n <mat-icon>select_all</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Deselect all columns\"\n (click)=\"deselectAllColumns()\">\n <mat-icon>deselect</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Invert selection\"\n (click)=\"invertColumnSelection()\">\n <mat-icon>flip</mat-icon>\n </button>\n </div>\n <hr />\n <div\n cdkDropList\n class=\"table-column-list\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </div>\n</div>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}div.container{background:var(--mat-sys-surface, #ffffff);color:var(--mat-sys-on-surface, rgba(0, 0, 0, .87))}div.container>hr{border-color:var(--mat-inverse-on-surface, rgba(0, 0, 0, .87))}div.container>div.toolbar{display:inline}.table-column-list{background-color:var(--mat-sys-surface-container, #eeeeee);max-height:65vh;overflow:auto}.table-column{background:var(--mat-sys-surface, #ffffff);display:flex;justify-content:flex-start;align-items:center;height:48px;padding:0 16px 0 8px}.table-column mat-icon{margin-right:16px}.table-column mat-checkbox{line-height:48px;color:#000000de;font-size:14px;font-weight:400}.table-column:last-child{border:none}.cdk-drop-list-dragging .table-column:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}\n"] }]
428
477
  }], ctorParameters: () => [{ type: MatTableColumnConfigPersistenceService }] });
429
478
 
430
479
  class MatTableColumnConfigTriggerDirective {
@@ -674,7 +723,7 @@ class MatMultiSortControlComponent {
674
723
  this.sort?.reorderSortLevel(event.previousIndex, event.currentIndex);
675
724
  }
676
725
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatMultiSortControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
677
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatMultiSortControlComponent, isStandalone: true, selector: "mat-multi-sort-control", inputs: { orientation: "orientation", sort: "sort" }, ngImport: i0, template: "<mat-chip-listbox\n cdkDropList\n [cdkDropListOrientation]=\"orientation\"\n (cdkDropListDropped)=\"onDrop($event)\">\n <mat-chip\n [disabled]=\"!sorts.length\"\n [highlighted]=\"true\"\n (click)=\"onClearClick()\"\n ><mat-icon matChipAvatar fontIcon=\"clear_all\"></mat-icon>Clear All</mat-chip\n >\n @for (column of sorts; track $index) {\n <mat-chip\n class=\"mat-sort-header\"\n cdkDrag\n (click)=\"onChipClick(column.active)\"\n (removed)=\"onChipRemoved(column.active)\">\n <div\n matChipAvatar\n class=\"mat-sort-header-container mat-sort-header-sorted mat-focus-indicator\"\n [class.mat-sort-header-descending]=\"column.direction === 'desc'\"\n [class.mat-sort-header-ascending]=\"column.direction === 'asc'\"\n [class.mat-sort-header-animations-disabled]=\"\n _animationModule === 'NoopAnimations'\n \">\n <div class=\"mat-sort-header-arrow\">\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\n <path\n d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\" />\n </svg>\n </div>\n </div>\n {{ column.active }}\n <button matChipRemove>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-chip>\n }\n</mat-chip-listbox>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}.mat-mdc-chip-listbox.mat-mdc-chip-set.cdk-drop-list .cdk-drop-list-dragging{transition:transform .15s cubic-bezier(0,0,.2,1)}.mat-mdc-chip.mat-sort-header{background-color:var(--mat-sys-surface, #ffffff);transition:background-color .1s cubic-bezier(0,0,.2,1),box-shadow .1s cubic-bezier(0,0,.2,1)}.mat-mdc-chip.mat-sort-header:hover{cursor:move}.mat-mdc-chip.mat-sort-header:hover:after{opacity:0}.mat-mdc-chip.mat-sort-header:focus:after{opacity:0}.mat-mdc-chip.mat-sort-header:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-sort-header-content{display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}@keyframes _mat-sort-header-recently-cleared-ascending{0%{transform:translateY(0);opacity:1}to{transform:translateY(-25%);opacity:0}}@keyframes _mat-sort-header-recently-cleared-descending{0%{transform:translateY(0) rotate(180deg);opacity:1}to{transform:translateY(25%) rotate(180deg);opacity:0}}.mat-sort-header-arrow{height:12px;width:12px;position:relative;transition:transform 225ms cubic-bezier(.4,0,.2,1),opacity 225ms cubic-bezier(.4,0,.2,1);opacity:0;overflow:visible;color:var(--mat-sort-arrow-color, var(--mat-app-on-surface))}.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow,.mat-sort-header.cdk-program-focused .mat-sort-header-arrow,.mat-sort-header:hover .mat-sort-header-arrow{opacity:.54}.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1}.mat-sort-header-descending .mat-sort-header-arrow{transform:rotate(180deg)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transform:translateY(-25%);transition:none;animation:_mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(.4,0,.2,1) forwards}.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-descending 225ms cubic-bezier(.4,0,.2,1) forwards}.mat-sort-header-animations-disabled .mat-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.mat-sort-header-arrow svg{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.cdk-drop-list-dragging .mat-sort-header:not(.cdk-drag-placeholder){background-color:var(--mat-sys-surface-dim, #ffffff);transition:transform .15s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i1$1.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i1$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i1$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
726
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatMultiSortControlComponent, isStandalone: true, selector: "mat-multi-sort-control", inputs: { orientation: "orientation", sort: "sort" }, ngImport: i0, template: "<mat-chip-listbox\n cdkDropList\n [cdkDropListOrientation]=\"orientation\"\n (cdkDropListDropped)=\"onDrop($event)\">\n <mat-chip\n [disabled]=\"!sorts.length\"\n [highlighted]=\"true\"\n (click)=\"onClearClick()\"\n ><mat-icon matChipAvatar fontIcon=\"clear_all\"></mat-icon>Clear All</mat-chip\n >\n @for (column of sorts; track $index) {\n <mat-chip\n class=\"mat-sort-header\"\n cdkDrag\n (click)=\"onChipClick(column.active)\"\n (removed)=\"onChipRemoved(column.active)\">\n <div\n matChipAvatar\n class=\"mat-sort-header-container mat-sort-header-sorted mat-focus-indicator\"\n [class.mat-sort-header-descending]=\"column.direction === 'desc'\"\n [class.mat-sort-header-ascending]=\"column.direction === 'asc'\"\n [class.mat-sort-header-animations-disabled]=\"\n _animationModule === 'NoopAnimations'\n \">\n <div class=\"mat-sort-header-arrow\">\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\n <path\n d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\" />\n </svg>\n </div>\n </div>\n {{ column.active }}\n <button matChipRemove>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-chip>\n }\n</mat-chip-listbox>\n", styles: [".cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .15s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;overflow:hidden}.mat-mdc-chip-listbox.mat-mdc-chip-set.cdk-drop-list .cdk-drop-list-dragging{transition:transform .15s cubic-bezier(0,0,.2,1)}.mat-mdc-chip.mat-sort-header{background-color:var(--mat-sys-surface, #ffffff);transition:background-color .1s cubic-bezier(0,0,.2,1),box-shadow .1s cubic-bezier(0,0,.2,1)}.mat-mdc-chip.mat-sort-header:hover{cursor:move}.mat-mdc-chip.mat-sort-header:hover:after{opacity:0}.mat-mdc-chip.mat-sort-header:focus:after{opacity:0}.mat-mdc-chip.mat-sort-header:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-sort-header-content{display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}@keyframes _mat-sort-header-recently-cleared-ascending{0%{transform:translateY(0);opacity:1}to{transform:translateY(-25%);opacity:0}}@keyframes _mat-sort-header-recently-cleared-descending{0%{transform:translateY(0) rotate(180deg);opacity:1}to{transform:translateY(25%) rotate(180deg);opacity:0}}.mat-sort-header-arrow{height:12px;width:12px;position:relative;transition:transform 225ms cubic-bezier(.4,0,.2,1),opacity 225ms cubic-bezier(.4,0,.2,1);opacity:0;overflow:visible;color:var(--mat-sort-arrow-color, var(--mat-app-on-surface))}.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow,.mat-sort-header.cdk-program-focused .mat-sort-header-arrow,.mat-sort-header:hover .mat-sort-header-arrow{opacity:.54}.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1}.mat-sort-header-descending .mat-sort-header-arrow{transform:rotate(180deg)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transform:translateY(-25%);transition:none;animation:_mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(.4,0,.2,1) forwards}.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-descending 225ms cubic-bezier(.4,0,.2,1) forwards}.mat-sort-header-animations-disabled .mat-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.mat-sort-header-arrow svg{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.cdk-drop-list-dragging .mat-sort-header:not(.cdk-drag-placeholder){background-color:var(--mat-sys-surface-dim, #ffffff);transition:transform .15s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i1$1.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i1$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i1$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
678
727
  }
679
728
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatMultiSortControlComponent, decorators: [{
680
729
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-mat-table-multi-sort.mjs","sources":["../../../src/lib/mat-table-column-config.ts","../../../src/lib/mat-multi-sort.directive.ts","../../../src/lib/mat-table-column-config-persistence.service.ts","../../../src/lib/mat-table-column-config/mat-table-column-config.component.ts","../../../src/lib/mat-table-column-config/mat-table-column-config.component.html","../../../src/lib/mat-table-column-config-trigger.directive.ts","../../../src/lib/mat-multi-sort-table-data-source.ts","../../../src/lib/mat-multi-sort-header/mat-multi-sort-header.component.ts","../../../src/lib/mat-multi-sort-header/mat-multi-sort-header.component.html","../../../src/lib/mat-multi-sort-control/mat-multi-sort-control.component.ts","../../../src/lib/mat-multi-sort-control/mat-multi-sort-control.component.html","../../../src/public-api.ts","../../../src/ngx-mat-table-multi-sort.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\n/**\n * Represents the configuration for a table column.\n *\n * @template T - The type of the data object that the table displays.\n */\nexport interface TableColumn<T> {\n id: keyof T;\n label: string;\n visible: boolean;\n}\n\n/**\n * Injection token for the storage mechanism used to persist column configuration.\n *\n * This token can be used to provide a custom storage implementation for saving\n * and retrieving the state of table column configurations.\n *\n */\nexport const COLUMN_CONFIG_PERSISTENCE_STORAGE = new InjectionToken<Storage>(\n \"COLUMN_CONFIG_PERSISTENCE_STORAGE\"\n);\n\n/**\n * Injection token used to enable or disable column configuration persistence.\n *\n * This token can be provided with a boolean value to indicate whether the\n * column configurations should be persisted (e.g., in local storage or a database).\n *\n */\nexport const COLUMN_CONFIG_PERSISTENCE_ENABLED = new InjectionToken<boolean>(\n \"COLUMN_CONFIG_PERSISTENCE_ENABLED\"\n);\n\n/**\n * Injection token for the column configuration persistence key.\n * This token is used to provide a unique key for persisting column configurations.\n */\nexport const COLUMN_CONFIG_PERSISTENCE_KEY = new InjectionToken<string>(\n \"COLUMN_CONFIG_PERSISTENCE_KEY\"\n);\n","import { moveItemInArray } from \"@angular/cdk/drag-drop\";\nimport {\n Directive,\n effect,\n EventEmitter,\n Inject,\n InjectionToken,\n Optional,\n Output,\n signal,\n WritableSignal,\n} from \"@angular/core\";\nimport {\n MAT_SORT_DEFAULT_OPTIONS,\n MatSort,\n MatSortable,\n MatSortDefaultOptions,\n Sort,\n SortDirection,\n} from \"@angular/material/sort\";\n\n/**\n * Injection token for the storage mechanism used to persist sorting state.\n *\n * This token can be used to provide a custom storage implementation for persisting\n * the sorting state of a table. By default, it can be set to use localStorage, sessionStorage,\n * or any other storage mechanism that implements the Storage interface.\n *\n */\nexport const SORT_PERSISTENCE_STORAGE = new InjectionToken<Storage>(\n \"SORT_PERSISTENCE_STORAGE\"\n);\n\n/**\n * Injection token used to enable or disable the persistence of sorting state.\n *\n * This token can be provided in the application's dependency injection system\n * to control whether the sorting state of a table should be persisted across\n * sessions or not.\n *\n * @example\n * // To enable sort persistence:\n * providers: [\n * { provide: SORT_PERSISTENCE_ENABLED, useValue: true }\n * ]\n *\n * @example\n * // To disable sort persistence:\n * providers: [\n * { provide: SORT_PERSISTENCE_ENABLED, useValue: false }\n * ]\n */\nexport const SORT_PERSISTENCE_ENABLED = new InjectionToken<boolean>(\n \"SORT_PERSISTENCE_ENABLED\"\n);\n\n/**\n * Injection token for the key used to persist sorting state.\n *\n * This token can be used to provide a custom key for storing\n * the sorting state in a persistence layer, such as local storage\n * or a database.\n */\nexport const SORT_PERSISTENCE_KEY = new InjectionToken<string>(\n \"SORT_PERSISTENCE_KEY\"\n);\n\n@Directive({\n selector: \"[matMultiSort]\",\n exportAs: \"matMultiSort\",\n host: {\n class: \"mat-sort\",\n },\n standalone: true,\n})\nexport class MatMultiSortDirective extends MatSort {\n @Output()\n private readonly persistenceChanged = new EventEmitter<Sort[]>();\n private _key: string;\n\n /**\n * A writable signal that holds an array of Sort objects.\n * This signal is used to manage the sorting state of the table.\n *\n * @readonly\n */\n readonly _sorts: WritableSignal<Sort[]> = signal([]);\n\n /**\n * Gets the key used for column configuration persistence.\n *\n * @returns {string} The key used for column configuration persistence.\n */\n public get key(): string {\n return this._key;\n }\n\n constructor(\n @Optional()\n @Inject(SORT_PERSISTENCE_ENABLED)\n public isPersistenceEnabled: boolean,\n @Optional()\n @Inject(SORT_PERSISTENCE_KEY)\n readonly initialKey: string,\n @Optional()\n @Inject(SORT_PERSISTENCE_STORAGE)\n private readonly storage: Storage,\n @Optional()\n @Inject(MAT_SORT_DEFAULT_OPTIONS)\n defaultOptions?: MatSortDefaultOptions | undefined\n ) {\n super(defaultOptions);\n\n this.isPersistenceEnabled ??= true;\n this._key = initialKey ?? \"mat-table-persistence-sort\";\n this.storage ??= localStorage;\n\n if (this.isPersistenceEnabled) {\n const sortsSerialized = this.storage.getItem(this.key);\n this._sorts.set(sortsSerialized ? JSON.parse(sortsSerialized) : []);\n }\n\n // This is necessary because the sortChange event is not emitted when the _sorts signal is updated directly (e.g., this._sorts.set([])).\n effect(() => {\n const length = this._sorts().length;\n this.sortChange.emit({\n active: length ? this._sorts()[length - 1].active : \"\",\n direction: length ? this._sorts()[length - 1].direction : \"\",\n });\n this.persistSortSettings();\n });\n }\n\n /**\n * Retrieves the sort direction for a given column ID.\n *\n * @param id - The ID of the column to get the sort direction for.\n * @returns The sort direction ('asc', 'desc', or '') for the specified column ID.\n */\n public getSortDirection(id: string): SortDirection {\n const sort = this._sorts().find((e) => e.active === id);\n return sort ? sort.direction : \"\";\n }\n\n /**\n * Gets the sort index of the given column ID.\n *\n * @param id - The ID of the column to get the sort index for.\n * @returns The sort index of the column, or -1 if the column is not active.\n */\n public getSortIndex(id: string): number {\n return this._sorts().findIndex((e) => e.active === id);\n }\n\n override sort(sortable: MatSortable): void {\n this.active = sortable.id;\n this.direction = this.getSortDirection(sortable.id);\n const index = this.getSortIndex(sortable.id);\n\n // If the column is not active, add it to the list of active columns.\n if (index < 0) {\n this.direction = sortable.start ? sortable.start : this.start;\n this._sorts().push({ active: this.active, direction: this.direction });\n } else {\n // If the column is active, update the direction or remove it if the direction is empty.\n this.direction = this.getNextSortDirection(sortable);\n if (!this.direction) {\n this._sorts().splice(index, 1);\n } else {\n this._sorts()[index].direction = this.direction;\n }\n }\n\n this.sortChange.emit({ active: this.active, direction: this.direction });\n this.persistSortSettings();\n }\n\n /**\n * Removes a sort level by its identifier.\n * If the sort level is not found, the method returns without making any changes.\n *\n * @param id - The identifier of the sort level to be removed.\n * @returns void\n */\n public removeSortLevel(id: string): void {\n const index = this.getSortIndex(id);\n if (index < 0) return;\n\n this._sorts().splice(index, 1);\n this.sortChange.emit();\n this.persistSortSettings();\n }\n\n /**\n * Reorders the sort level by moving an item in the sort array from a previous index to a current index.\n * If the previous index is the same as the current index, the function returns without making any changes.\n *\n * @param previousIndex - The index of the item to be moved.\n * @param currentIndex - The index to which the item should be moved.\n */\n public reorderSortLevel(previousIndex: number, currentIndex: number): void {\n if (previousIndex === currentIndex) return;\n\n moveItemInArray(this._sorts(), previousIndex, currentIndex);\n this.sortChange.emit(this._sorts()[currentIndex]);\n this.persistSortSettings();\n }\n\n /**\n * Toggles the sort direction for the given column ID.\n *\n * @param id - The unique identifier of the column to toggle the sort direction for.\n * @returns void\n */\n public toggleSortDirection(id: string): void {\n const index = this.getSortIndex(id);\n if (index < 0) return;\n\n this.active = id;\n // The value of this.direction is used in the getNextSortDirection method. That's why it is necessary for it to be set before the call to getNextSortDirection.\n this.direction = this.getSortDirection(id);\n this.direction = this.getNextSortDirection({\n id: id,\n disableClear: true,\n } as MatSortable);\n this._sorts()[index].direction = this.direction;\n this.sortChange.emit({ active: this.active, direction: this.direction });\n this.persistSortSettings();\n }\n\n /**\n * Clears the current sorting state.\n *\n * @param id - The unique identifier of the column to toggle the sort direction for.\n * @returns void\n */\n public clearSorting(): void {\n this.active = \"\";\n this.direction = \"\";\n this._sorts.set([]);\n this.sortChange.emit();\n this.persistSortSettings();\n }\n\n private persistSortSettings(): void {\n this.persistenceChanged.emit(this._sorts());\n if (this.isPersistenceEnabled)\n this.storage.setItem(this.key, JSON.stringify(this._sorts()));\n }\n\n /**\n * Sets the persistence key for storing sort settings and optionally overwrites the persisted value.\n *\n * @param key - The key to be used for persisting sort settings.\n * @param overwritePersistedValue - If true, the current sort settings will be persisted immediately, overwriting any existing value. Defaults to false.\n *\n * @returns void\n */\n public setPersistenceKey(key: string, overwritePersistedValue = false): void {\n this._key = key;\n if (overwritePersistedValue) {\n this.persistSortSettings();\n return;\n }\n\n const sortsSerialized = this.storage.getItem(this.key);\n this._sorts.set(sortsSerialized ? JSON.parse(sortsSerialized) : []);\n }\n}\n","import { Inject, Injectable, Optional } from \"@angular/core\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport {\n COLUMN_CONFIG_PERSISTENCE_ENABLED,\n COLUMN_CONFIG_PERSISTENCE_KEY,\n COLUMN_CONFIG_PERSISTENCE_STORAGE,\n TableColumn,\n} from \"./mat-table-column-config\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class MatTableColumnConfigPersistenceService<T> {\n private readonly columns$ = new BehaviorSubject<TableColumn<T>[]>([]);\n private _key: string;\n\n /**\n * Gets the current table columns configuration.\n *\n * @returns {TableColumn<T>[]} An array of table columns.\n */\n public get columns(): TableColumn<T>[] {\n return this.columns$.getValue();\n }\n\n /**\n * Sets the columns configuration for the table and persists the configuration.\n *\n * @param value - An array of `TableColumn<T>` representing the new column configuration.\n */\n public set columns(value: TableColumn<T>[]) {\n this.columns$.next(value);\n this.persistColumnConfig(value);\n }\n\n /**\n * Gets the key used for column configuration persistence.\n *\n * @returns {string} The key used for column configuration persistence.\n */\n public get key(): string {\n return this._key;\n }\n\n constructor(\n @Optional()\n @Inject(COLUMN_CONFIG_PERSISTENCE_ENABLED)\n public isPersistenceEnabled: boolean,\n @Optional()\n @Inject(COLUMN_CONFIG_PERSISTENCE_KEY)\n readonly initialKey: string,\n @Optional()\n @Inject(COLUMN_CONFIG_PERSISTENCE_STORAGE)\n private readonly storage: Storage\n ) {\n this.isPersistenceEnabled ??= true;\n this._key = initialKey ?? \"mat-table-persistence-column-config\";\n this.storage ??= localStorage;\n\n if (this.isPersistenceEnabled) {\n const columnsSerialized = this.storage.getItem(this.key);\n this.columns$.next(\n columnsSerialized ? JSON.parse(columnsSerialized) : []\n );\n }\n }\n\n /**\n * Retrieves an observable stream of table columns.\n *\n * @returns {Observable<TableColumn<T>[]>} An observable that emits an array of table columns.\n */\n public getColumns(): Observable<TableColumn<T>[]> {\n return this.columns$.asObservable();\n }\n\n private persistColumnConfig(columns: TableColumn<T>[]): void {\n if (!this.isPersistenceEnabled) return;\n this.storage.setItem(this.key, JSON.stringify(columns));\n }\n\n /**\n * Sets the persistence key for storing column configurations.\n *\n * @param key - The key to be used for persistence.\n * @param overwritePersistedValue - If true, the current column configuration will be persisted immediately overwriting any exising value stored under the new key.\n * If false, the persisted column configuration will be loaded and applied.\n * Defaults to false.\n *\n * @returns void\n */\n public setPersistenceKey(key: string, overwritePersistedValue = false): void {\n this._key = key;\n if (overwritePersistedValue) {\n this.persistColumnConfig(this.columns);\n return;\n }\n\n const columnsSerialized = this.storage.getItem(this.key);\n this.columns$.next(columnsSerialized ? JSON.parse(columnsSerialized) : []);\n }\n}\n","import {\n CdkDrag,\n CdkDragDrop,\n CdkDropList,\n moveItemInArray,\n} from \"@angular/cdk/drag-drop\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { Subscription } from \"rxjs\";\nimport { TableColumn } from \"../mat-table-column-config\";\nimport { MatTableColumnConfigPersistenceService } from \"../mat-table-column-config-persistence.service\";\n\n@Component({\n selector: \"mat-table-column-config\",\n imports: [CdkDropList, CdkDrag, MatCheckboxModule, MatIconModule],\n templateUrl: \"./mat-table-column-config.component.html\",\n styleUrl: \"./mat-table-column-config.component.scss\",\n standalone: true,\n})\nexport class MatTableColumnConfigComponent<T> implements OnInit, OnDestroy {\n private subscription: Subscription | undefined;\n columns: TableColumn<T>[] = [];\n\n constructor(\n private readonly persistenceService: MatTableColumnConfigPersistenceService<T>\n ) {}\n\n ngOnInit(): void {\n this.subscription = this.persistenceService\n .getColumns()\n .subscribe((columns) => {\n this.columns = columns;\n });\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n this.subscription = undefined;\n }\n\n /**\n * Handles the event when a dragged column is dropped.\n * This method updates the order of columns based on the drag and drop action.\n *\n * @param event - The event object containing information about the drag and drop action.\n */\n onColumnDropped(event: CdkDragDrop<T>): void {\n moveItemInArray(this.columns, event.previousIndex, event.currentIndex);\n this.persistenceService.columns = this.columns;\n }\n\n /**\n * Toggles the visibility of a column based on its identifier.\n *\n * @param id - The identifier of the column whose visibility is to be changed.\n */\n onColumnVisibilityChanged(id: keyof T): void {\n const index = this.columns.findIndex((column) => column.id === id);\n if (index < 0) return;\n\n this.columns[index].visible = !this.columns[index].visible;\n this.persistenceService.columns = this.columns;\n }\n}\n","<div\n cdkDropList\n class=\"table-column-list mat-elevation-z4\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n</div>\n","import { Overlay } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n ComponentRef,\n Directive,\n ElementRef,\n HostListener,\n ViewContainerRef,\n} from \"@angular/core\";\nimport { MatTableColumnConfigComponent } from \"./mat-table-column-config/mat-table-column-config.component\";\n\n@Directive({\n selector: \"[matTableColumnConfigTrigger]\",\n exportAs: \"matTableColumnConfigTrigger\",\n standalone: true,\n})\nexport class MatTableColumnConfigTriggerDirective<T> {\n private _componentRef: ComponentRef<MatTableColumnConfigComponent<T>> | null =\n null;\n\n /**\n * Gets the reference to the MatTableColumnConfigComponent.\n *\n * @returns {ComponentRef<MatTableColumnConfigComponent<T>> | null}\n * The reference to the MatTableColumnConfigComponent if it exists, otherwise null.\n */\n get componentRef(): ComponentRef<MatTableColumnConfigComponent<T>> | null {\n return this._componentRef;\n }\n\n constructor(\n private readonly elementRef: ElementRef,\n private readonly overlay: Overlay,\n private readonly viewContainerRef: ViewContainerRef\n ) {}\n\n @HostListener(\"click\")\n onClick(): void {\n // Create the component portal\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef.nativeElement)\n .withFlexibleDimensions(true)\n .withViewportMargin(8)\n .withGrowAfterOpen(true)\n .withPush(true)\n .withPositions([\n {\n originX: \"end\",\n originY: \"bottom\",\n overlayX: \"end\",\n overlayY: \"top\",\n },\n ]);\n const overlayRef = this.overlay.create({\n positionStrategy,\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n });\n const portal = new ComponentPortal(\n MatTableColumnConfigComponent<T>,\n this.viewContainerRef,\n this.viewContainerRef.injector\n );\n this._componentRef = overlayRef.attach(portal);\n\n overlayRef.backdropClick().subscribe(() => {\n overlayRef.detach();\n overlayRef.dispose();\n this._componentRef = null;\n });\n }\n}\n","import { MatPaginator } from \"@angular/material/paginator\";\nimport { Sort } from \"@angular/material/sort\";\nimport { MatTableDataSource } from \"@angular/material/table\";\nimport { MatMultiSortDirective } from \"./mat-multi-sort.directive\";\n\n/**\n * Sorts two items based on multiple sorting criteria.\n *\n * @description To do this, we iterate over each sort level and compare the values of the active column. If the values are equal, we move to the next sort level. If all sort levels are equal, we return 0.\n *\n * @template T - The type of the items being sorted.\n * @param {T} a - The first item to compare.\n * @param {T} b - The second item to compare.\n * @param {Sort[]} sorts - An array of sorting criteria, where each criterion specifies the property to sort by and the direction of sorting.\n * @returns {number} - A negative number if `a` should come before `b`, a positive number if `a` should come after `b`, or 0 if they are considered equal.\n */\nexport function MultiCriterionSort<T>(a: T, b: T, sorts: Sort[]): number {\n for (const { active, direction } of sorts) {\n const aValue = a[active as keyof T];\n const bValue = b[active as keyof T];\n\n const comparison = compareValues(aValue, bValue);\n\n if (comparison !== 0) {\n return direction === \"desc\" ? -comparison : comparison;\n }\n }\n\n return 0; // If all comparisons are equal, preserve original order\n}\n\nfunction compareValues<T>(aValue: T, bValue: T): number {\n if (aValue == null && bValue != null) return 1;\n if (aValue != null && bValue == null) return -1;\n if (aValue == null && bValue == null) return 0;\n\n if (typeof aValue === \"string\" && typeof bValue === \"string\") {\n return aValue.localeCompare(bValue);\n }\n\n if (aValue > bValue) return 1;\n if (aValue < bValue) return -1;\n return 0;\n}\n\n/**\n * A data source class that extends `MatTableDataSource` to support multi-column sorting.\n *\n * @template T The type of data that the table displays.\n * @template P The type of paginator used, defaults to `MatPaginator`.\n *\n * @extends MatTableDataSource<T, P>\n */\nexport class MatMultiSortTableDataSource<\n T,\n P extends MatPaginator = MatPaginator,\n> extends MatTableDataSource<T, P> {\n override get sort(): MatMultiSortDirective | null {\n return super.sort as MatMultiSortDirective;\n }\n override set sort(sort: MatMultiSortDirective | null) {\n super.sort = sort;\n }\n\n constructor(initialData?: T[]) {\n super(initialData);\n // Set the default sort function\n this.sortData = (data): T[] => this.sortDataFunction(data);\n }\n\n private sortDataFunction(data: T[]): T[] {\n // Return the data if there is no sort\n if (!this.sort?._sorts().length) return data;\n\n // Sort the data:\n return data.sort((a, b) => MultiCriterionSort(a, b, this.sort!._sorts()));\n }\n}\n","import { NgIf } from \"@angular/common\";\nimport { Component, inject, OnInit, ViewEncapsulation } from \"@angular/core\";\nimport { MatSort, MatSortHeader, SortDirection } from \"@angular/material/sort\";\nimport { MatMultiSortDirective } from \"../mat-multi-sort.directive\";\n\n@Component({\n selector: \"[mat-multi-sort-header]\", // eslint-disable-line @angular-eslint/component-selector\n exportAs: \"matMultiSortHeader\",\n imports: [NgIf],\n providers: [{ provide: MatSort, useExisting: MatMultiSortDirective }],\n templateUrl: \"./mat-multi-sort-header.component.html\",\n styleUrl: \"./mat-multi-sort-header.component.scss\",\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n})\nexport class MatMultiSortHeaderComponent\n extends MatSortHeader\n implements OnInit\n{\n override readonly _sort: MatMultiSortDirective = inject(\n MatMultiSortDirective,\n {\n optional: true,\n }\n )!;\n\n /**\n * Retrieves the sort direction for the current column.\n *\n * @returns {SortDirection} The sort direction for the column identified by this.id.\n */\n get sortDirection(): SortDirection {\n return this._sort.getSortDirection(this.id);\n }\n\n /**\n * Gets the sort index for the current column.\n *\n * @returns {number} The index of the sort order for this column.\n */\n get sortIndex(): number {\n return this._sort.getSortIndex(this.id);\n }\n\n override _getAriaSortAttribute(): \"none\" | \"ascending\" | \"descending\" {\n if (!this._isSorted()) {\n return \"none\";\n }\n\n return this.sortDirection === \"asc\" ? \"ascending\" : \"descending\";\n }\n\n override _isSorted(): boolean {\n return this.sortIndex > -1;\n }\n\n override _toggleOnInteraction(): void {\n if (this._isDisabled()) return;\n\n super._toggleOnInteraction();\n }\n\n override _updateArrowDirection(): void {\n this._arrowDirection = this._isSorted()\n ? this.sortDirection\n : this.start || this._sort.start;\n }\n}\n","<!--\n We set the `tabindex` on an element inside the table header, rather than the header itself,\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\n will be read out as the user is navigating the table's cell (see #13012).\n\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\n-->\n<div\n class=\"mat-sort-header-container mat-focus-indicator\"\n [class.mat-sort-header-sorted]=\"_isSorted()\"\n [class.mat-sort-header-position-before]=\"arrowPosition === 'before'\"\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\n [attr.role]=\"_isDisabled() ? null : 'button'\">\n <!--\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\n number of screenshot diff failures. It should be removed eventually. Note that the difference\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\n causes it to be center-aligned, whereas removing it will keep the text to the left.\n -->\n <div class=\"mat-sort-header-content\">\n <ng-content></ng-content>\n </div>\n\n <!-- Disable animations while a current animation is running -->\n @if (_renderArrow()) {\n <div\n class=\"mat-sort-header-arrow\"\n [@arrowOpacity]=\"_getArrowViewState()\"\n [@arrowPosition]=\"_getArrowViewState()\"\n [@allowChildren]=\"_getArrowDirectionState()\"\n (@arrowPosition.start)=\"_disableViewStateAnimation = true\"\n (@arrowPosition.done)=\"_disableViewStateAnimation = false\">\n <div class=\"mat-sort-header-stem\"></div>\n <div\n class=\"mat-sort-header-indicator\"\n [@indicator]=\"_getArrowDirectionState()\">\n <div\n class=\"mat-sort-header-pointer-left\"\n [@leftPointer]=\"_getArrowDirectionState()\"></div>\n <div\n class=\"mat-sort-header-pointer-right\"\n [@rightPointer]=\"_getArrowDirectionState()\"></div>\n <div class=\"mat-sort-header-pointer-middle\"></div>\n </div>\n </div>\n }\n <div *ngIf=\"_isSorted()\" class=\"mat-sort-header-counter\">\n {{ sortIndex + 1 }}\n </div>\n</div>\n","import {\n CdkDrag,\n CdkDragDrop,\n CdkDropList,\n DropListOrientation,\n} from \"@angular/cdk/drag-drop\";\nimport { ANIMATION_MODULE_TYPE, Component, inject, Input } from \"@angular/core\";\nimport { MatChipsModule } from \"@angular/material/chips\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { Sort } from \"@angular/material/sort\";\nimport { MatMultiSortDirective } from \"../mat-multi-sort.directive\";\n\n@Component({\n selector: \"mat-multi-sort-control\",\n imports: [CdkDropList, CdkDrag, MatChipsModule, MatIconModule],\n templateUrl: \"./mat-multi-sort-control.component.html\",\n styleUrl: \"./mat-multi-sort-control.component.scss\",\n standalone: true,\n})\nexport class MatMultiSortControlComponent {\n /**\n * Injects the ANIMATION_MODULE_TYPE token, which indicates the type of animation module being used.\n * This is an optional dependency and may be undefined if the animation module is not provided.\n *\n * @readonly\n * @type {ANIMATION_MODULE_TYPE | undefined}\n */\n readonly _animationModule = inject(ANIMATION_MODULE_TYPE, { optional: true });\n\n /**\n * Specifies the orientation of the drop list.\n * Can be either \"horizontal\" or \"vertical\".\n *\n * @type {DropListOrientation}\n * @default \"horizontal\"\n */\n @Input() orientation: DropListOrientation = \"horizontal\";\n\n /**\n * An optional input property that accepts an instance of `MatMultiSortDirective`.\n * This directive is used to control the sorting behavior of the table.\n */\n @Input() sort?: MatMultiSortDirective;\n\n /**\n * Retrieves the array of Sort objects from the current sort instance.\n * If the sort instance is not defined, it returns an empty array.\n *\n * @returns {Sort[]} An array of Sort objects or an empty array if no sorts are defined.\n */\n get sorts(): Sort[] {\n return this.sort?._sorts() || [];\n }\n\n /**\n * Handles the click event on a sort chip.\n * Toggles the sort direction for the given sort ID.\n *\n * @param id - The identifier of the sort field to toggle.\n * @returns void\n */\n onChipClick(id: string): void {\n this.sort?.toggleSortDirection(id);\n }\n\n /**\n * Handles the event when a sort chip is removed.\n *\n * @param id - The identifier of the sort level to be removed.\n * @returns void\n */\n onChipRemoved(id: string): void {\n this.sort?.removeSortLevel(id);\n }\n\n /**\n * Clears the current sorting applied to the table.\n *\n * @param id - The identifier of the sort level to be removed.\n * @returns void\n */\n onClearClick(): void {\n this.sort?.clearSorting();\n }\n\n /**\n * Handles the drop event for drag-and-drop sorting.\n * Reorders the sort levels based on the previous and current indices.\n *\n * @param event - The drag-and-drop event containing the previous and current indices of the sort order.\n */\n onDrop(event: CdkDragDrop<Sort[]>): void {\n this.sort?.reorderSortLevel(event.previousIndex, event.currentIndex);\n }\n}\n","<mat-chip-listbox\n cdkDropList\n [cdkDropListOrientation]=\"orientation\"\n (cdkDropListDropped)=\"onDrop($event)\">\n <mat-chip\n [disabled]=\"!sorts.length\"\n [highlighted]=\"true\"\n (click)=\"onClearClick()\"\n ><mat-icon matChipAvatar fontIcon=\"clear_all\"></mat-icon>Clear All</mat-chip\n >\n @for (column of sorts; track $index) {\n <mat-chip\n class=\"mat-sort-header\"\n cdkDrag\n (click)=\"onChipClick(column.active)\"\n (removed)=\"onChipRemoved(column.active)\">\n <div\n matChipAvatar\n class=\"mat-sort-header-container mat-sort-header-sorted mat-focus-indicator\"\n [class.mat-sort-header-descending]=\"column.direction === 'desc'\"\n [class.mat-sort-header-ascending]=\"column.direction === 'asc'\"\n [class.mat-sort-header-animations-disabled]=\"\n _animationModule === 'NoopAnimations'\n \">\n <div class=\"mat-sort-header-arrow\">\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\n <path\n d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\" />\n </svg>\n </div>\n </div>\n {{ column.active }}\n <button matChipRemove>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-chip>\n }\n</mat-chip-listbox>\n","/*\n * Public API surface of the library\n */\n\nexport * from \"./lib/mat-table-column-config\";\nexport * from \"./lib/mat-multi-sort.directive\";\nexport * from \"./lib/mat-table-column-config-trigger.directive\";\nexport * from \"./lib/mat-multi-sort-table-data-source\";\nexport * from \"./lib/mat-table-column-config-persistence.service\";\nexport * from \"./lib/mat-multi-sort-header/mat-multi-sort-header.component\";\nexport * from \"./lib/mat-multi-sort-control/mat-multi-sort-control.component\";\nexport * from \"./lib/mat-table-column-config/mat-table-column-config.component\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.MatTableColumnConfigPersistenceService","i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAaA;;;;;;AAMG;MACU,iCAAiC,GAAG,IAAI,cAAc,CACjE,mCAAmC,EACnC;AAEF;;;;;;AAMG;MACU,iCAAiC,GAAG,IAAI,cAAc,CACjE,mCAAmC,EACnC;AAEF;;;AAGG;MACU,6BAA6B,GAAG,IAAI,cAAc,CAC7D,+BAA+B;;ACnBjC;;;;;;;AAOG;MACU,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,EAC1B;AAEF;;;;;;;;;;;;;;;;;;AAkBG;MACU,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,EAC1B;AAEF;;;;;;AAMG;MACU,oBAAoB,GAAG,IAAI,cAAc,CACpD,sBAAsB,EACtB;AAUI,MAAO,qBAAsB,SAAQ,OAAO,CAAA;AAyBvC,IAAA,oBAAA,CAAA;AAGE,IAAA,UAAA,CAAA;AAGQ,IAAA,OAAA,CAAA;AA7BF,IAAA,kBAAkB,GAAG,IAAI,YAAY,EAAU,CAAC;AACzD,IAAA,IAAI,CAAS;AAErB;;;;;AAKG;AACM,IAAA,MAAM,GAA2B,MAAM,CAAC,EAAE,CAAC,CAAC;AAErD;;;;AAIG;AACH,IAAA,IAAW,GAAG,GAAA;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;AAED,IAAA,WAAA,CAGS,oBAA6B,E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EAAA,UAAA,EAGlD,IAAI,EAAA,QAAA,EAAA,60CAAA,EAAA,MAAA,EAAA,CAAA,+vFAAA,CAAA,EAAA,CAAA;8BAmBP,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAMG,IAAI,EAAA,CAAA;sBAAZ,KAAK;;;AE1CR;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-mat-table-multi-sort.mjs","sources":["../../../src/lib/mat-table-column-config.ts","../../../src/lib/mat-multi-sort.directive.ts","../../../src/lib/mat-table-column-config-persistence.service.ts","../../../src/lib/mat-table-column-config/mat-table-column-config.component.ts","../../../src/lib/mat-table-column-config/mat-table-column-config.component.html","../../../src/lib/mat-table-column-config-trigger.directive.ts","../../../src/lib/mat-multi-sort-table-data-source.ts","../../../src/lib/mat-multi-sort-header/mat-multi-sort-header.component.ts","../../../src/lib/mat-multi-sort-header/mat-multi-sort-header.component.html","../../../src/lib/mat-multi-sort-control/mat-multi-sort-control.component.ts","../../../src/lib/mat-multi-sort-control/mat-multi-sort-control.component.html","../../../src/public-api.ts","../../../src/ngx-mat-table-multi-sort.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\n/**\n * Represents the configuration for a table column.\n *\n * @template T - The type of the data object that the table displays.\n */\nexport interface TableColumn<T> {\n id: keyof T;\n label: string;\n visible: boolean;\n}\n\n/**\n * Injection token for the storage mechanism used to persist column configuration.\n *\n * This token can be used to provide a custom storage implementation for saving\n * and retrieving the state of table column configurations.\n *\n */\nexport const COLUMN_CONFIG_PERSISTENCE_STORAGE = new InjectionToken<Storage>(\n \"COLUMN_CONFIG_PERSISTENCE_STORAGE\"\n);\n\n/**\n * Injection token used to enable or disable column configuration persistence.\n *\n * This token can be provided with a boolean value to indicate whether the\n * column configurations should be persisted (e.g., in local storage or a database).\n *\n */\nexport const COLUMN_CONFIG_PERSISTENCE_ENABLED = new InjectionToken<boolean>(\n \"COLUMN_CONFIG_PERSISTENCE_ENABLED\"\n);\n\n/**\n * Injection token for the column configuration persistence key.\n * This token is used to provide a unique key for persisting column configurations.\n */\nexport const COLUMN_CONFIG_PERSISTENCE_KEY = new InjectionToken<string>(\n \"COLUMN_CONFIG_PERSISTENCE_KEY\"\n);\n","import { moveItemInArray } from \"@angular/cdk/drag-drop\";\nimport {\n Directive,\n effect,\n EventEmitter,\n Inject,\n InjectionToken,\n Optional,\n Output,\n signal,\n WritableSignal,\n} from \"@angular/core\";\nimport {\n MAT_SORT_DEFAULT_OPTIONS,\n MatSort,\n MatSortable,\n MatSortDefaultOptions,\n Sort,\n SortDirection,\n} from \"@angular/material/sort\";\n\n/**\n * Injection token for the storage mechanism used to persist sorting state.\n *\n * This token can be used to provide a custom storage implementation for persisting\n * the sorting state of a table. By default, it can be set to use localStorage, sessionStorage,\n * or any other storage mechanism that implements the Storage interface.\n *\n */\nexport const SORT_PERSISTENCE_STORAGE = new InjectionToken<Storage>(\n \"SORT_PERSISTENCE_STORAGE\"\n);\n\n/**\n * Injection token used to enable or disable the persistence of sorting state.\n *\n * This token can be provided in the application's dependency injection system\n * to control whether the sorting state of a table should be persisted across\n * sessions or not.\n *\n * @example\n * // To enable sort persistence:\n * providers: [\n * { provide: SORT_PERSISTENCE_ENABLED, useValue: true }\n * ]\n *\n * @example\n * // To disable sort persistence:\n * providers: [\n * { provide: SORT_PERSISTENCE_ENABLED, useValue: false }\n * ]\n */\nexport const SORT_PERSISTENCE_ENABLED = new InjectionToken<boolean>(\n \"SORT_PERSISTENCE_ENABLED\"\n);\n\n/**\n * Injection token for the key used to persist sorting state.\n *\n * This token can be used to provide a custom key for storing\n * the sorting state in a persistence layer, such as local storage\n * or a database.\n */\nexport const SORT_PERSISTENCE_KEY = new InjectionToken<string>(\n \"SORT_PERSISTENCE_KEY\"\n);\n\n@Directive({\n selector: \"[matMultiSort]\",\n exportAs: \"matMultiSort\",\n host: {\n class: \"mat-sort\",\n },\n standalone: true,\n})\nexport class MatMultiSortDirective extends MatSort {\n @Output()\n private readonly persistenceChanged = new EventEmitter<Sort[]>();\n private _key: string;\n\n /**\n * A writable signal that holds an array of Sort objects.\n * This signal is used to manage the sorting state of the table.\n *\n * @readonly\n */\n readonly _sorts: WritableSignal<Sort[]> = signal([]);\n\n /**\n * Gets the key used for column configuration persistence.\n *\n * @returns {string} The key used for column configuration persistence.\n */\n public get key(): string {\n return this._key;\n }\n\n constructor(\n @Optional()\n @Inject(SORT_PERSISTENCE_ENABLED)\n public isPersistenceEnabled: boolean,\n @Optional()\n @Inject(SORT_PERSISTENCE_KEY)\n readonly initialKey: string,\n @Optional()\n @Inject(SORT_PERSISTENCE_STORAGE)\n private readonly storage: Storage,\n @Optional()\n @Inject(MAT_SORT_DEFAULT_OPTIONS)\n defaultOptions?: MatSortDefaultOptions | undefined\n ) {\n super(defaultOptions);\n\n this.isPersistenceEnabled ??= true;\n this._key = initialKey ?? \"mat-table-persistence-sort\";\n this.storage ??= localStorage;\n\n if (this.isPersistenceEnabled) {\n const sortsSerialized = this.storage.getItem(this.key);\n this._sorts.set(sortsSerialized ? JSON.parse(sortsSerialized) : []);\n }\n\n // This is necessary because the sortChange event is not emitted when the _sorts signal is updated directly (e.g., this._sorts.set([])).\n effect(() => {\n const length = this._sorts().length;\n this.sortChange.emit({\n active: length ? this._sorts()[length - 1].active : \"\",\n direction: length ? this._sorts()[length - 1].direction : \"\",\n });\n this.persistSortSettings();\n });\n }\n\n /**\n * Retrieves the sort direction for a given column ID.\n *\n * @param id - The ID of the column to get the sort direction for.\n * @returns The sort direction ('asc', 'desc', or '') for the specified column ID.\n */\n public getSortDirection(id: string): SortDirection {\n const sort = this._sorts().find((e) => e.active === id);\n return sort ? sort.direction : \"\";\n }\n\n /**\n * Gets the sort index of the given column ID.\n *\n * @param id - The ID of the column to get the sort index for.\n * @returns The sort index of the column, or -1 if the column is not active.\n */\n public getSortIndex(id: string): number {\n return this._sorts().findIndex((e) => e.active === id);\n }\n\n override sort(sortable: MatSortable): void {\n this.active = sortable.id;\n this.direction = this.getSortDirection(sortable.id);\n const index = this.getSortIndex(sortable.id);\n\n // If the column is not active, add it to the list of active columns.\n if (index < 0) {\n this.direction = sortable.start ? sortable.start : this.start;\n this._sorts().push({ active: this.active, direction: this.direction });\n } else {\n // If the column is active, update the direction or remove it if the direction is empty.\n this.direction = this.getNextSortDirection(sortable);\n if (!this.direction) {\n this._sorts().splice(index, 1);\n } else {\n this._sorts()[index].direction = this.direction;\n }\n }\n\n this.sortChange.emit({ active: this.active, direction: this.direction });\n this.persistSortSettings();\n }\n\n /**\n * Removes a sort level by its identifier.\n * If the sort level is not found, the method returns without making any changes.\n *\n * @param id - The identifier of the sort level to be removed.\n * @returns void\n */\n public removeSortLevel(id: string): void {\n const index = this.getSortIndex(id);\n if (index < 0) return;\n\n this._sorts().splice(index, 1);\n this.sortChange.emit();\n this.persistSortSettings();\n }\n\n /**\n * Reorders the sort level by moving an item in the sort array from a previous index to a current index.\n * If the previous index is the same as the current index, the function returns without making any changes.\n *\n * @param previousIndex - The index of the item to be moved.\n * @param currentIndex - The index to which the item should be moved.\n */\n public reorderSortLevel(previousIndex: number, currentIndex: number): void {\n if (previousIndex === currentIndex) return;\n\n moveItemInArray(this._sorts(), previousIndex, currentIndex);\n this.sortChange.emit(this._sorts()[currentIndex]);\n this.persistSortSettings();\n }\n\n /**\n * Toggles the sort direction for the given column ID.\n *\n * @param id - The unique identifier of the column to toggle the sort direction for.\n * @returns void\n */\n public toggleSortDirection(id: string): void {\n const index = this.getSortIndex(id);\n if (index < 0) return;\n\n this.active = id;\n // The value of this.direction is used in the getNextSortDirection method. That's why it is necessary for it to be set before the call to getNextSortDirection.\n this.direction = this.getSortDirection(id);\n this.direction = this.getNextSortDirection({\n id: id,\n disableClear: true,\n } as MatSortable);\n this._sorts()[index].direction = this.direction;\n this.sortChange.emit({ active: this.active, direction: this.direction });\n this.persistSortSettings();\n }\n\n /**\n * Clears the current sorting state.\n *\n * @param id - The unique identifier of the column to toggle the sort direction for.\n * @returns void\n */\n public clearSorting(): void {\n this.active = \"\";\n this.direction = \"\";\n this._sorts.set([]);\n this.sortChange.emit();\n this.persistSortSettings();\n }\n\n private persistSortSettings(): void {\n this.persistenceChanged.emit(this._sorts());\n if (this.isPersistenceEnabled)\n this.storage.setItem(this.key, JSON.stringify(this._sorts()));\n }\n\n /**\n * Sets the persistence key for storing sort settings and optionally overwrites the persisted value.\n *\n * @param key - The key to be used for persisting sort settings.\n * @param overwritePersistedValue - If true, the current sort settings will be persisted immediately, overwriting any existing value. Defaults to false.\n *\n * @returns void\n */\n public setPersistenceKey(key: string, overwritePersistedValue = false): void {\n this._key = key;\n if (overwritePersistedValue) {\n this.persistSortSettings();\n return;\n }\n\n const sortsSerialized = this.storage.getItem(this.key);\n this._sorts.set(sortsSerialized ? JSON.parse(sortsSerialized) : []);\n }\n}\n","import { Inject, Injectable, Optional } from \"@angular/core\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport {\n COLUMN_CONFIG_PERSISTENCE_ENABLED,\n COLUMN_CONFIG_PERSISTENCE_KEY,\n COLUMN_CONFIG_PERSISTENCE_STORAGE,\n TableColumn,\n} from \"./mat-table-column-config\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class MatTableColumnConfigPersistenceService<T> {\n private readonly columns$ = new BehaviorSubject<TableColumn<T>[]>([]);\n private _key: string;\n\n /**\n * Gets the current table columns configuration.\n *\n * @returns {TableColumn<T>[]} An array of table columns.\n */\n public get columns(): TableColumn<T>[] {\n return this.columns$.getValue();\n }\n\n /**\n * Sets the columns configuration for the table and persists the configuration.\n *\n * @param value - An array of `TableColumn<T>` representing the new column configuration.\n */\n public set columns(value: TableColumn<T>[]) {\n this.columns$.next(value);\n this.persistColumnConfig(value);\n }\n\n /**\n * Gets the key used for column configuration persistence.\n *\n * @returns {string} The key used for column configuration persistence.\n */\n public get key(): string {\n return this._key;\n }\n\n constructor(\n @Optional()\n @Inject(COLUMN_CONFIG_PERSISTENCE_ENABLED)\n public isPersistenceEnabled: boolean,\n @Optional()\n @Inject(COLUMN_CONFIG_PERSISTENCE_KEY)\n readonly initialKey: string,\n @Optional()\n @Inject(COLUMN_CONFIG_PERSISTENCE_STORAGE)\n private readonly storage: Storage\n ) {\n this.isPersistenceEnabled ??= true;\n this._key = initialKey ?? \"mat-table-persistence-column-config\";\n this.storage ??= localStorage;\n\n if (this.isPersistenceEnabled) {\n const columnsSerialized = this.storage.getItem(this.key);\n this.columns$.next(\n columnsSerialized ? JSON.parse(columnsSerialized) : []\n );\n }\n }\n\n /**\n * Retrieves an observable stream of table columns.\n *\n * @returns {Observable<TableColumn<T>[]>} An observable that emits an array of table columns.\n */\n public getColumns(): Observable<TableColumn<T>[]> {\n return this.columns$.asObservable();\n }\n\n private persistColumnConfig(columns: TableColumn<T>[]): void {\n if (!this.isPersistenceEnabled) return;\n this.storage.setItem(this.key, JSON.stringify(columns));\n }\n\n /**\n * Sets the persistence key for storing column configurations.\n *\n * @param key - The key to be used for persistence.\n * @param overwritePersistedValue - If true, the current column configuration will be persisted immediately overwriting any exising value stored under the new key.\n * If false, the persisted column configuration will be loaded and applied.\n * Defaults to false.\n *\n * @returns void\n */\n public setPersistenceKey(key: string, overwritePersistedValue = false): void {\n this._key = key;\n if (overwritePersistedValue) {\n this.persistColumnConfig(this.columns);\n return;\n }\n\n const columnsSerialized = this.storage.getItem(this.key);\n this.columns$.next(columnsSerialized ? JSON.parse(columnsSerialized) : []);\n }\n}\n","import {\n CdkDrag,\n CdkDragDrop,\n CdkDropList,\n moveItemInArray,\n} from \"@angular/cdk/drag-drop\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatTooltipModule } from \"@angular/material/tooltip\";\nimport { Subscription } from \"rxjs\";\nimport { TableColumn } from \"../mat-table-column-config\";\nimport { MatTableColumnConfigPersistenceService } from \"../mat-table-column-config-persistence.service\";\n\n@Component({\n selector: \"mat-table-column-config\",\n imports: [\n CdkDropList,\n CdkDrag,\n MatButtonModule,\n MatCheckboxModule,\n MatIconModule,\n MatTooltipModule,\n ],\n templateUrl: \"./mat-table-column-config.component.html\",\n styleUrl: \"./mat-table-column-config.component.scss\",\n standalone: true,\n})\nexport class MatTableColumnConfigComponent<T> implements OnInit, OnDestroy {\n private subscription: Subscription | undefined;\n columns: TableColumn<T>[] = [];\n\n constructor(\n private readonly persistenceService: MatTableColumnConfigPersistenceService<T>\n ) {}\n\n ngOnInit(): void {\n this.subscription = this.persistenceService\n .getColumns()\n .subscribe((columns) => {\n this.columns = columns;\n });\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n this.subscription = undefined;\n }\n\n /**\n * Handles the event when a dragged column is dropped.\n * This method updates the order of columns based on the drag and drop action.\n *\n * @param event - The event object containing information about the drag and drop action.\n */\n onColumnDropped(event: CdkDragDrop<T>): void {\n moveItemInArray(this.columns, event.previousIndex, event.currentIndex);\n this.persistenceService.columns = this.columns;\n }\n\n /**\n * Toggles the visibility of a column based on its identifier.\n *\n * @param id - The identifier of the column whose visibility is to be changed.\n */\n onColumnVisibilityChanged(id: keyof T): void {\n const index = this.columns.findIndex((column) => column.id === id);\n if (index < 0) return;\n\n this.columns[index].visible = !this.columns[index].visible;\n this.persistenceService.columns = this.columns;\n }\n\n /**\n * Sets all columns in the table to visible and updates the persisted column configuration.\n *\n * Iterates through the `columns` array, setting each column's `visible` property to `true`.\n * Then, updates the `persistenceService.columns` property to reflect the new visibility state.\n */\n selectAllColumns(): void {\n for (const column of this.columns) {\n column.visible = true;\n }\n this.persistenceService.columns = this.columns;\n }\n\n /**\n * Deselects all columns by setting their `visible` property to `false`.\n * Updates the persisted columns state via the `persistenceService`.\n *\n * @remarks\n * This method iterates through all columns in the `columns` array and hides each one.\n * After updating the visibility, it synchronizes the state with the persistence service.\n */\n deselectAllColumns(): void {\n for (const column of this.columns) {\n column.visible = false;\n }\n this.persistenceService.columns = this.columns;\n }\n\n /**\n * Inverts the visibility state of all columns in the `columns` array.\n * Each column's `visible` property is toggled between `true` and `false`.\n * After updating the visibility, the modified columns array is assigned to the persistence service\n * to persist the new visibility state.\n */\n invertColumnSelection(): void {\n for (const column of this.columns) {\n column.visible = !column.visible;\n }\n this.persistenceService.columns = this.columns;\n }\n}\n","<div class=\"container mat-elevation-z4\">\n <div class=\"toolbar\">\n <button\n mat-icon-button\n matTooltip=\"Select all columns\"\n (click)=\"selectAllColumns()\">\n <mat-icon>select_all</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Deselect all columns\"\n (click)=\"deselectAllColumns()\">\n <mat-icon>deselect</mat-icon>\n </button>\n <button\n mat-icon-button\n matTooltip=\"Invert selection\"\n (click)=\"invertColumnSelection()\">\n <mat-icon>flip</mat-icon>\n </button>\n </div>\n <hr />\n <div\n cdkDropList\n class=\"table-column-list\"\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onColumnDropped($event)\">\n @for (column of columns; track column.id) {\n <div cdkDrag class=\"table-column\">\n <mat-icon cdkDragHandle>drag_indicator</mat-icon>\n <mat-checkbox\n [checked]=\"column.visible\"\n (change)=\"onColumnVisibilityChanged(column.id)\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </div>\n</div>\n","import { Overlay } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n ComponentRef,\n Directive,\n ElementRef,\n HostListener,\n ViewContainerRef,\n} from \"@angular/core\";\nimport { MatTableColumnConfigComponent } from \"./mat-table-column-config/mat-table-column-config.component\";\n\n@Directive({\n selector: \"[matTableColumnConfigTrigger]\",\n exportAs: \"matTableColumnConfigTrigger\",\n standalone: true,\n})\nexport class MatTableColumnConfigTriggerDirective<T> {\n private _componentRef: ComponentRef<MatTableColumnConfigComponent<T>> | null =\n null;\n\n /**\n * Gets the reference to the MatTableColumnConfigComponent.\n *\n * @returns {ComponentRef<MatTableColumnConfigComponent<T>> | null}\n * The reference to the MatTableColumnConfigComponent if it exists, otherwise null.\n */\n get componentRef(): ComponentRef<MatTableColumnConfigComponent<T>> | null {\n return this._componentRef;\n }\n\n constructor(\n private readonly elementRef: ElementRef,\n private readonly overlay: Overlay,\n private readonly viewContainerRef: ViewContainerRef\n ) {}\n\n @HostListener(\"click\")\n onClick(): void {\n // Create the component portal\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef.nativeElement)\n .withFlexibleDimensions(true)\n .withViewportMargin(8)\n .withGrowAfterOpen(true)\n .withPush(true)\n .withPositions([\n {\n originX: \"end\",\n originY: \"bottom\",\n overlayX: \"end\",\n overlayY: \"top\",\n },\n ]);\n const overlayRef = this.overlay.create({\n positionStrategy,\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n });\n const portal = new ComponentPortal(\n MatTableColumnConfigComponent<T>,\n this.viewContainerRef,\n this.viewContainerRef.injector\n );\n this._componentRef = overlayRef.attach(portal);\n\n overlayRef.backdropClick().subscribe(() => {\n overlayRef.detach();\n overlayRef.dispose();\n this._componentRef = null;\n });\n }\n}\n","import { MatPaginator } from \"@angular/material/paginator\";\nimport { Sort } from \"@angular/material/sort\";\nimport { MatTableDataSource } from \"@angular/material/table\";\nimport { MatMultiSortDirective } from \"./mat-multi-sort.directive\";\n\n/**\n * Sorts two items based on multiple sorting criteria.\n *\n * @description To do this, we iterate over each sort level and compare the values of the active column. If the values are equal, we move to the next sort level. If all sort levels are equal, we return 0.\n *\n * @template T - The type of the items being sorted.\n * @param {T} a - The first item to compare.\n * @param {T} b - The second item to compare.\n * @param {Sort[]} sorts - An array of sorting criteria, where each criterion specifies the property to sort by and the direction of sorting.\n * @returns {number} - A negative number if `a` should come before `b`, a positive number if `a` should come after `b`, or 0 if they are considered equal.\n */\nexport function MultiCriterionSort<T>(a: T, b: T, sorts: Sort[]): number {\n for (const { active, direction } of sorts) {\n const aValue = a[active as keyof T];\n const bValue = b[active as keyof T];\n\n const comparison = compareValues(aValue, bValue);\n\n if (comparison !== 0) {\n return direction === \"desc\" ? -comparison : comparison;\n }\n }\n\n return 0; // If all comparisons are equal, preserve original order\n}\n\nfunction compareValues<T>(aValue: T, bValue: T): number {\n if (aValue == null && bValue != null) return 1;\n if (aValue != null && bValue == null) return -1;\n if (aValue == null && bValue == null) return 0;\n\n if (typeof aValue === \"string\" && typeof bValue === \"string\") {\n return aValue.localeCompare(bValue);\n }\n\n if (aValue > bValue) return 1;\n if (aValue < bValue) return -1;\n return 0;\n}\n\n/**\n * A data source class that extends `MatTableDataSource` to support multi-column sorting.\n *\n * @template T The type of data that the table displays.\n * @template P The type of paginator used, defaults to `MatPaginator`.\n *\n * @extends MatTableDataSource<T, P>\n */\nexport class MatMultiSortTableDataSource<\n T,\n P extends MatPaginator = MatPaginator,\n> extends MatTableDataSource<T, P> {\n override get sort(): MatMultiSortDirective | null {\n return super.sort as MatMultiSortDirective;\n }\n override set sort(sort: MatMultiSortDirective | null) {\n super.sort = sort;\n }\n\n constructor(initialData?: T[]) {\n super(initialData);\n // Set the default sort function\n this.sortData = (data): T[] => this.sortDataFunction(data);\n }\n\n private sortDataFunction(data: T[]): T[] {\n // Return the data if there is no sort\n if (!this.sort?._sorts().length) return data;\n\n // Sort the data:\n return data.sort((a, b) => MultiCriterionSort(a, b, this.sort!._sorts()));\n }\n}\n","import { NgIf } from \"@angular/common\";\nimport { Component, inject, OnInit, ViewEncapsulation } from \"@angular/core\";\nimport { MatSort, MatSortHeader, SortDirection } from \"@angular/material/sort\";\nimport { MatMultiSortDirective } from \"../mat-multi-sort.directive\";\n\n@Component({\n selector: \"[mat-multi-sort-header]\", // eslint-disable-line @angular-eslint/component-selector\n exportAs: \"matMultiSortHeader\",\n imports: [NgIf],\n providers: [{ provide: MatSort, useExisting: MatMultiSortDirective }],\n templateUrl: \"./mat-multi-sort-header.component.html\",\n styleUrl: \"./mat-multi-sort-header.component.scss\",\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n})\nexport class MatMultiSortHeaderComponent\n extends MatSortHeader\n implements OnInit\n{\n override readonly _sort: MatMultiSortDirective = inject(\n MatMultiSortDirective,\n {\n optional: true,\n }\n )!;\n\n /**\n * Retrieves the sort direction for the current column.\n *\n * @returns {SortDirection} The sort direction for the column identified by this.id.\n */\n get sortDirection(): SortDirection {\n return this._sort.getSortDirection(this.id);\n }\n\n /**\n * Gets the sort index for the current column.\n *\n * @returns {number} The index of the sort order for this column.\n */\n get sortIndex(): number {\n return this._sort.getSortIndex(this.id);\n }\n\n override _getAriaSortAttribute(): \"none\" | \"ascending\" | \"descending\" {\n if (!this._isSorted()) {\n return \"none\";\n }\n\n return this.sortDirection === \"asc\" ? \"ascending\" : \"descending\";\n }\n\n override _isSorted(): boolean {\n return this.sortIndex > -1;\n }\n\n override _toggleOnInteraction(): void {\n if (this._isDisabled()) return;\n\n super._toggleOnInteraction();\n }\n\n override _updateArrowDirection(): void {\n this._arrowDirection = this._isSorted()\n ? this.sortDirection\n : this.start || this._sort.start;\n }\n}\n","<!--\n We set the `tabindex` on an element inside the table header, rather than the header itself,\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\n will be read out as the user is navigating the table's cell (see #13012).\n\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\n-->\n<div\n class=\"mat-sort-header-container mat-focus-indicator\"\n [class.mat-sort-header-sorted]=\"_isSorted()\"\n [class.mat-sort-header-position-before]=\"arrowPosition === 'before'\"\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\n [attr.role]=\"_isDisabled() ? null : 'button'\">\n <!--\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\n number of screenshot diff failures. It should be removed eventually. Note that the difference\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\n causes it to be center-aligned, whereas removing it will keep the text to the left.\n -->\n <div class=\"mat-sort-header-content\">\n <ng-content></ng-content>\n </div>\n\n <!-- Disable animations while a current animation is running -->\n @if (_renderArrow()) {\n <div\n class=\"mat-sort-header-arrow\"\n [@arrowOpacity]=\"_getArrowViewState()\"\n [@arrowPosition]=\"_getArrowViewState()\"\n [@allowChildren]=\"_getArrowDirectionState()\"\n (@arrowPosition.start)=\"_disableViewStateAnimation = true\"\n (@arrowPosition.done)=\"_disableViewStateAnimation = false\">\n <div class=\"mat-sort-header-stem\"></div>\n <div\n class=\"mat-sort-header-indicator\"\n [@indicator]=\"_getArrowDirectionState()\">\n <div\n class=\"mat-sort-header-pointer-left\"\n [@leftPointer]=\"_getArrowDirectionState()\"></div>\n <div\n class=\"mat-sort-header-pointer-right\"\n [@rightPointer]=\"_getArrowDirectionState()\"></div>\n <div class=\"mat-sort-header-pointer-middle\"></div>\n </div>\n </div>\n }\n <div *ngIf=\"_isSorted()\" class=\"mat-sort-header-counter\">\n {{ sortIndex + 1 }}\n </div>\n</div>\n","import {\n CdkDrag,\n CdkDragDrop,\n CdkDropList,\n DropListOrientation,\n} from \"@angular/cdk/drag-drop\";\nimport { ANIMATION_MODULE_TYPE, Component, inject, Input } from \"@angular/core\";\nimport { MatChipsModule } from \"@angular/material/chips\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { Sort } from \"@angular/material/sort\";\nimport { MatMultiSortDirective } from \"../mat-multi-sort.directive\";\n\n@Component({\n selector: \"mat-multi-sort-control\",\n imports: [CdkDropList, CdkDrag, MatChipsModule, MatIconModule],\n templateUrl: \"./mat-multi-sort-control.component.html\",\n styleUrl: \"./mat-multi-sort-control.component.scss\",\n standalone: true,\n})\nexport class MatMultiSortControlComponent {\n /**\n * Injects the ANIMATION_MODULE_TYPE token, which indicates the type of animation module being used.\n * This is an optional dependency and may be undefined if the animation module is not provided.\n *\n * @readonly\n * @type {ANIMATION_MODULE_TYPE | undefined}\n */\n readonly _animationModule = inject(ANIMATION_MODULE_TYPE, { optional: true });\n\n /**\n * Specifies the orientation of the drop list.\n * Can be either \"horizontal\" or \"vertical\".\n *\n * @type {DropListOrientation}\n * @default \"horizontal\"\n */\n @Input() orientation: DropListOrientation = \"horizontal\";\n\n /**\n * An optional input property that accepts an instance of `MatMultiSortDirective`.\n * This directive is used to control the sorting behavior of the table.\n */\n @Input() sort?: MatMultiSortDirective;\n\n /**\n * Retrieves the array of Sort objects from the current sort instance.\n * If the sort instance is not defined, it returns an empty array.\n *\n * @returns {Sort[]} An array of Sort objects or an empty array if no sorts are defined.\n */\n get sorts(): Sort[] {\n return this.sort?._sorts() || [];\n }\n\n /**\n * Handles the click event on a sort chip.\n * Toggles the sort direction for the given sort ID.\n *\n * @param id - The identifier of the sort field to toggle.\n * @returns void\n */\n onChipClick(id: string): void {\n this.sort?.toggleSortDirection(id);\n }\n\n /**\n * Handles the event when a sort chip is removed.\n *\n * @param id - The identifier of the sort level to be removed.\n * @returns void\n */\n onChipRemoved(id: string): void {\n this.sort?.removeSortLevel(id);\n }\n\n /**\n * Clears the current sorting applied to the table.\n *\n * @param id - The identifier of the sort level to be removed.\n * @returns void\n */\n onClearClick(): void {\n this.sort?.clearSorting();\n }\n\n /**\n * Handles the drop event for drag-and-drop sorting.\n * Reorders the sort levels based on the previous and current indices.\n *\n * @param event - The drag-and-drop event containing the previous and current indices of the sort order.\n */\n onDrop(event: CdkDragDrop<Sort[]>): void {\n this.sort?.reorderSortLevel(event.previousIndex, event.currentIndex);\n }\n}\n","<mat-chip-listbox\n cdkDropList\n [cdkDropListOrientation]=\"orientation\"\n (cdkDropListDropped)=\"onDrop($event)\">\n <mat-chip\n [disabled]=\"!sorts.length\"\n [highlighted]=\"true\"\n (click)=\"onClearClick()\"\n ><mat-icon matChipAvatar fontIcon=\"clear_all\"></mat-icon>Clear All</mat-chip\n >\n @for (column of sorts; track $index) {\n <mat-chip\n class=\"mat-sort-header\"\n cdkDrag\n (click)=\"onChipClick(column.active)\"\n (removed)=\"onChipRemoved(column.active)\">\n <div\n matChipAvatar\n class=\"mat-sort-header-container mat-sort-header-sorted mat-focus-indicator\"\n [class.mat-sort-header-descending]=\"column.direction === 'desc'\"\n [class.mat-sort-header-ascending]=\"column.direction === 'asc'\"\n [class.mat-sort-header-animations-disabled]=\"\n _animationModule === 'NoopAnimations'\n \">\n <div class=\"mat-sort-header-arrow\">\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\n <path\n d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\" />\n </svg>\n </div>\n </div>\n {{ column.active }}\n <button matChipRemove>\n <mat-icon>clear</mat-icon>\n </button>\n </mat-chip>\n }\n</mat-chip-listbox>\n","/*\n * Public API surface of the library\n */\n\nexport * from \"./lib/mat-table-column-config\";\nexport * from \"./lib/mat-multi-sort.directive\";\nexport * from \"./lib/mat-table-column-config-trigger.directive\";\nexport * from \"./lib/mat-multi-sort-table-data-source\";\nexport * from \"./lib/mat-table-column-config-persistence.service\";\nexport * from \"./lib/mat-multi-sort-header/mat-multi-sort-header.component\";\nexport * from \"./lib/mat-multi-sort-control/mat-multi-sort-control.component\";\nexport * from \"./lib/mat-table-column-config/mat-table-column-config.component\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.MatTableColumnConfigPersistenceService","i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA;;;;;;AAMG;MACU,iCAAiC,GAAG,IAAI,cAAc,CACjE,mCAAmC;AAGrC;;;;;;AAMG;MACU,iCAAiC,GAAG,IAAI,cAAc,CACjE,mCAAmC;AAGrC;;;AAGG;MACU,6BAA6B,GAAG,IAAI,cAAc,CAC7D,+BAA+B;;ACnBjC;;;;;;;AAOG;MACU,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B;AAG5B;;;;;;;;;;;;;;;;;;AAkBG;MACU,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B;AAG5B;;;;;;AAMG;MACU,oBAAoB,G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AAA,iBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKlD,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAPxC,SAAS;+BACE,wBAAwB,EAAA,OAAA,EACzB,CAAC,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,CAAC,EAAA,UAAA,EAGlD,IAAI,EAAA,QAAA,EAAA,60CAAA,EAAA,MAAA,EAAA,CAAA,+vFAAA,CAAA,EAAA;8BAmBP,WAAW,EAAA,CAAA;sBAAnB;gBAMQ,IAAI,EAAA,CAAA;sBAAZ;;;AE1CH;;AAEG;;ACFH;;AAEG;;;;"}
@@ -23,6 +23,29 @@ export declare class MatTableColumnConfigComponent<T> implements OnInit, OnDestr
23
23
  * @param id - The identifier of the column whose visibility is to be changed.
24
24
  */
25
25
  onColumnVisibilityChanged(id: keyof T): void;
26
+ /**
27
+ * Sets all columns in the table to visible and updates the persisted column configuration.
28
+ *
29
+ * Iterates through the `columns` array, setting each column's `visible` property to `true`.
30
+ * Then, updates the `persistenceService.columns` property to reflect the new visibility state.
31
+ */
32
+ selectAllColumns(): void;
33
+ /**
34
+ * Deselects all columns by setting their `visible` property to `false`.
35
+ * Updates the persisted columns state via the `persistenceService`.
36
+ *
37
+ * @remarks
38
+ * This method iterates through all columns in the `columns` array and hides each one.
39
+ * After updating the visibility, it synchronizes the state with the persistence service.
40
+ */
41
+ deselectAllColumns(): void;
42
+ /**
43
+ * Inverts the visibility state of all columns in the `columns` array.
44
+ * Each column's `visible` property is toggled between `true` and `false`.
45
+ * After updating the visibility, the modified columns array is assigned to the persistence service
46
+ * to persist the new visibility state.
47
+ */
48
+ invertColumnSelection(): void;
26
49
  static ɵfac: i0.ɵɵFactoryDeclaration<MatTableColumnConfigComponent<any>, never>;
27
50
  static ɵcmp: i0.ɵɵComponentDeclaration<MatTableColumnConfigComponent<any>, "mat-table-column-config", never, {}, {}, never, never, true, never>;
28
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-mat-table-multi-sort",
3
- "version": "18.3.0",
3
+ "version": "18.4.1",
4
4
  "preview": false,
5
5
  "license": "MIT",
6
6
  "author": {
@@ -30,13 +30,14 @@
30
30
  "tslib": "^2.8.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@angular/common": "^18.0.0",
34
- "@angular/core": "^18.0.0",
35
33
  "@angular/animations": "^18.0.0",
36
34
  "@angular/cdk": "^18.0.0",
35
+ "@angular/common": "^18.0.0",
36
+ "@angular/core": "^18.0.0",
37
37
  "@angular/forms": "^18.0.0",
38
38
  "@angular/material": "^18.0.0",
39
- "rxjs": "^7.8.1"
39
+ "rxjs": "^7.8.1",
40
+ "zone.js": "~0.14.10"
40
41
  },
41
42
  "sideEffects": false,
42
43
  "module": "fesm2022/ngx-mat-table-multi-sort.mjs",