@igo2/common 21.0.0-next.2 → 21.0.0-next.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/fesm2022/igo2-common-action.mjs +46 -61
  2. package/fesm2022/igo2-common-action.mjs.map +1 -1
  3. package/fesm2022/igo2-common-backdrop.mjs +11 -19
  4. package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
  5. package/fesm2022/igo2-common-badge.mjs +7 -7
  6. package/fesm2022/igo2-common-badge.mjs.map +1 -1
  7. package/fesm2022/igo2-common-clickout.mjs +7 -7
  8. package/fesm2022/igo2-common-clone.mjs +7 -7
  9. package/fesm2022/igo2-common-collapsible.mjs +15 -23
  10. package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
  11. package/fesm2022/igo2-common-color.mjs +8 -8
  12. package/fesm2022/igo2-common-color.mjs.map +1 -1
  13. package/fesm2022/igo2-common-confirm-dialog.mjs +12 -11
  14. package/fesm2022/igo2-common-confirm-dialog.mjs.map +1 -1
  15. package/fesm2022/igo2-common-context-menu.mjs +15 -13
  16. package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
  17. package/fesm2022/igo2-common-custom-html.mjs +10 -10
  18. package/fesm2022/igo2-common-datepicker.mjs +23 -17
  19. package/fesm2022/igo2-common-datepicker.mjs.map +1 -1
  20. package/fesm2022/igo2-common-dom.mjs +10 -8
  21. package/fesm2022/igo2-common-dom.mjs.map +1 -1
  22. package/fesm2022/igo2-common-drag-drop.mjs +69 -37
  23. package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
  24. package/fesm2022/igo2-common-dynamic-component.mjs +23 -17
  25. package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
  26. package/fesm2022/igo2-common-entity.mjs +161 -128
  27. package/fesm2022/igo2-common-entity.mjs.map +1 -1
  28. package/fesm2022/igo2-common-flexible.mjs +25 -77
  29. package/fesm2022/igo2-common-flexible.mjs.map +1 -1
  30. package/fesm2022/igo2-common-form.mjs +417 -116
  31. package/fesm2022/igo2-common-form.mjs.map +1 -1
  32. package/fesm2022/igo2-common-home-button.mjs +7 -7
  33. package/fesm2022/igo2-common-icon.mjs +7 -7
  34. package/fesm2022/igo2-common-icon.mjs.map +1 -1
  35. package/fesm2022/igo2-common-image.mjs +10 -10
  36. package/fesm2022/igo2-common-image.mjs.map +1 -1
  37. package/fesm2022/igo2-common-interactive-tour.mjs +53 -30
  38. package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
  39. package/fesm2022/igo2-common-json-dialog.mjs +11 -11
  40. package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
  41. package/fesm2022/igo2-common-keyvalue.mjs +10 -8
  42. package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
  43. package/fesm2022/igo2-common-list.mjs +21 -16
  44. package/fesm2022/igo2-common-list.mjs.map +1 -1
  45. package/fesm2022/igo2-common-panel.mjs +8 -8
  46. package/fesm2022/igo2-common-panel.mjs.map +1 -1
  47. package/fesm2022/igo2-common-resizable-bar.mjs +8 -10
  48. package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
  49. package/fesm2022/igo2-common-select-value-dialog.mjs +23 -13
  50. package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
  51. package/fesm2022/igo2-common-sidenav.mjs +7 -7
  52. package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
  53. package/fesm2022/igo2-common-spinner.mjs +11 -11
  54. package/fesm2022/igo2-common-spinner.mjs.map +1 -1
  55. package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
  56. package/fesm2022/igo2-common-table.mjs +59 -66
  57. package/fesm2022/igo2-common-table.mjs.map +1 -1
  58. package/fesm2022/igo2-common-timepicker.mjs +11 -12
  59. package/fesm2022/igo2-common-timepicker.mjs.map +1 -1
  60. package/fesm2022/igo2-common-tool.mjs +32 -29
  61. package/fesm2022/igo2-common-tool.mjs.map +1 -1
  62. package/fesm2022/igo2-common-widget.mjs +17 -17
  63. package/fesm2022/igo2-common-widget.mjs.map +1 -1
  64. package/fesm2022/igo2-common-workspace.mjs +28 -32
  65. package/fesm2022/igo2-common-workspace.mjs.map +1 -1
  66. package/package.json +3 -3
  67. package/style/style.css +1 -1
  68. package/types/igo2-common-action.d.ts +2 -5
  69. package/types/igo2-common-backdrop.d.ts +2 -4
  70. package/types/igo2-common-badge.d.ts +4 -4
  71. package/types/igo2-common-collapsible.d.ts +2 -4
  72. package/types/igo2-common-confirm-dialog.d.ts +1 -1
  73. package/types/igo2-common-context-menu.d.ts +2 -2
  74. package/types/igo2-common-datepicker.d.ts +9 -9
  75. package/types/igo2-common-drag-drop.d.ts +14 -12
  76. package/types/igo2-common-dynamic-component.d.ts +3 -3
  77. package/types/igo2-common-entity.d.ts +63 -59
  78. package/types/igo2-common-flexible.d.ts +14 -28
  79. package/types/igo2-common-form.d.ts +213 -74
  80. package/types/igo2-common-icon.d.ts +1 -1
  81. package/types/igo2-common-interactive-tour.d.ts +6 -6
  82. package/types/igo2-common-json-dialog.d.ts +4 -4
  83. package/types/igo2-common-keyvalue.d.ts +4 -1
  84. package/types/igo2-common-list.d.ts +7 -7
  85. package/types/igo2-common-panel.d.ts +1 -1
  86. package/types/igo2-common-resizable-bar.d.ts +4 -5
  87. package/types/igo2-common-select-value-dialog.d.ts +2 -2
  88. package/types/igo2-common-sidenav.d.ts +2 -2
  89. package/types/igo2-common-spinner.d.ts +1 -1
  90. package/types/igo2-common-table.d.ts +16 -17
  91. package/types/igo2-common-timepicker.d.ts +3 -3
  92. package/types/igo2-common-tool.d.ts +7 -8
  93. package/types/igo2-common-widget.d.ts +7 -7
  94. package/types/igo2-common-workspace.d.ts +12 -12
@@ -30,10 +30,10 @@ class SidenavShimDirective {
30
30
  this.blurElement = undefined;
31
31
  this.focusedElement = undefined;
32
32
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SidenavShimDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: SidenavShimDirective, isStandalone: true, selector: "[igoSidenavShim]", host: { listeners: { "opened": "onOpen()", "closedStart": "onCloseStart()", "closed": "onClose()" } }, ngImport: i0 });
33
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SidenavShimDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
34
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.19", type: SidenavShimDirective, isStandalone: true, selector: "[igoSidenavShim]", host: { listeners: { "opened": "onOpen()", "closedStart": "onCloseStart()", "closed": "onClose()" } }, ngImport: i0 });
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SidenavShimDirective, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SidenavShimDirective, decorators: [{
37
37
  type: Directive,
38
38
  args: [{
39
39
  selector: '[igoSidenavShim]',
@@ -55,11 +55,11 @@ class IgoSidenavModule {
55
55
  providers: []
56
56
  };
57
57
  }
58
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
59
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoSidenavModule, imports: [SidenavShimDirective], exports: [SidenavShimDirective] });
60
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSidenavModule });
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
59
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoSidenavModule, imports: [SidenavShimDirective], exports: [SidenavShimDirective] });
60
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoSidenavModule });
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSidenavModule, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoSidenavModule, decorators: [{
63
63
  type: NgModule,
64
64
  args: [{
65
65
  imports: [SidenavShimDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-sidenav.mjs","sources":["../../../packages/common/sidenav/src/sidenav-shim.directive.ts","../../../packages/common/sidenav/src/sidenav.module.ts","../../../packages/common/sidenav/src/igo2-common-sidenav.ts"],"sourcesContent":["import { Directive, Renderer2, inject } from '@angular/core';\n\n/**\n * <igoSidenavShim> directive.\n *\n * This directive prevents a material sidenav with mode=\"side\"\n * from focusing an element after it's closed\n */\n@Directive({\n selector: '[igoSidenavShim]',\n host: {\n '(opened)': 'onOpen()',\n '(closedStart)': 'onCloseStart()',\n '(closed)': 'onClose()'\n }\n})\nexport class SidenavShimDirective {\n private renderer = inject(Renderer2);\n\n private focusedElement: HTMLElement;\n private blurElement: HTMLElement;\n\n onOpen() {\n this.focusedElement = document.activeElement as HTMLElement;\n }\n\n onCloseStart() {\n const focusedElement = document.activeElement as HTMLElement;\n if (focusedElement !== this.focusedElement) {\n this.blurElement = this.focusedElement;\n } else {\n this.blurElement = undefined;\n }\n }\n\n onClose() {\n if (this.blurElement) {\n this.renderer.selectRootElement(this.blurElement).blur();\n }\n\n this.blurElement = undefined;\n this.focusedElement = undefined;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { SidenavShimDirective } from './sidenav-shim.directive';\n\n/**\n * @deprecated import the SidenavShimDirective directly\n */\n@NgModule({\n imports: [SidenavShimDirective],\n exports: [SidenavShimDirective]\n})\nexport class IgoSidenavModule {\n static forRoot(): ModuleWithProviders<IgoSidenavModule> {\n return {\n ngModule: IgoSidenavModule,\n providers: []\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAEA;;;;;AAKG;MASU,oBAAoB,CAAA;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAE5B,IAAA,cAAc;AACd,IAAA,WAAW;IAEnB,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,aAA4B;IAC7D;IAEA,YAAY,GAAA;AACV,QAAA,MAAM,cAAc,GAAG,QAAQ,CAAC,aAA4B;AAC5D,QAAA,IAAI,cAAc,KAAK,IAAI,CAAC,cAAc,EAAE;AAC1C,YAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc;QACxC;aAAO;AACL,YAAA,IAAI,CAAC,WAAW,GAAG,SAAS;QAC9B;IACF;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AACpB,YAAA,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE;QAC1D;AAEA,QAAA,IAAI,CAAC,WAAW,GAAG,SAAS;AAC5B,QAAA,IAAI,CAAC,cAAc,GAAG,SAAS;IACjC;wGA1BW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACJ,wBAAA,UAAU,EAAE,UAAU;AACtB,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,UAAU,EAAE;AACb;AACF,iBAAA;;;ACXD;;AAEG;MAKU,gBAAgB,CAAA;AAC3B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,gBAAgB;AAC1B,YAAA,SAAS,EAAE;SACZ;IACH;wGANW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAhB,gBAAgB,EAAA,OAAA,EAAA,CAHjB,oBAAoB,CAAA,EAAA,OAAA,EAAA,CACpB,oBAAoB,CAAA,EAAA,CAAA;yGAEnB,gBAAgB,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB;AAC/B,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-sidenav.mjs","sources":["../../../packages/common/sidenav/src/sidenav-shim.directive.ts","../../../packages/common/sidenav/src/sidenav.module.ts","../../../packages/common/sidenav/src/igo2-common-sidenav.ts"],"sourcesContent":["import { Directive, Renderer2, inject } from '@angular/core';\n\n/**\n * <igoSidenavShim> directive.\n *\n * This directive prevents a material sidenav with mode=\"side\"\n * from focusing an element after it's closed\n */\n@Directive({\n selector: '[igoSidenavShim]',\n host: {\n '(opened)': 'onOpen()',\n '(closedStart)': 'onCloseStart()',\n '(closed)': 'onClose()'\n }\n})\nexport class SidenavShimDirective {\n private renderer = inject(Renderer2);\n\n private focusedElement?: HTMLElement;\n private blurElement?: HTMLElement;\n\n onOpen() {\n this.focusedElement = document.activeElement as HTMLElement;\n }\n\n onCloseStart() {\n const focusedElement = document.activeElement as HTMLElement;\n if (focusedElement !== this.focusedElement) {\n this.blurElement = this.focusedElement;\n } else {\n this.blurElement = undefined;\n }\n }\n\n onClose() {\n if (this.blurElement) {\n this.renderer.selectRootElement(this.blurElement).blur();\n }\n\n this.blurElement = undefined;\n this.focusedElement = undefined;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { SidenavShimDirective } from './sidenav-shim.directive';\n\n/**\n * @deprecated import the SidenavShimDirective directly\n */\n@NgModule({\n imports: [SidenavShimDirective],\n exports: [SidenavShimDirective]\n})\nexport class IgoSidenavModule {\n static forRoot(): ModuleWithProviders<IgoSidenavModule> {\n return {\n ngModule: IgoSidenavModule,\n providers: []\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAEA;;;;;AAKG;MASU,oBAAoB,CAAA;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAE5B,IAAA,cAAc;AACd,IAAA,WAAW;IAEnB,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,aAA4B;IAC7D;IAEA,YAAY,GAAA;AACV,QAAA,MAAM,cAAc,GAAG,QAAQ,CAAC,aAA4B;AAC5D,QAAA,IAAI,cAAc,KAAK,IAAI,CAAC,cAAc,EAAE;AAC1C,YAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc;QACxC;aAAO;AACL,YAAA,IAAI,CAAC,WAAW,GAAG,SAAS;QAC9B;IACF;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AACpB,YAAA,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI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,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -20,10 +20,10 @@ class SpinnerComponent {
20
20
  hide() {
21
21
  this.shown = false;
22
22
  }
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", type: SpinnerComponent, isStandalone: true, selector: "igo-spinner", inputs: { shown: "shown" }, ngImport: i0, template: "<div\n [class]=\"{\n 'igo-spinner-container': true,\n 'igo-spinner-shown': (shown$ | async)\n }\"\n>\n <div class=\"igo-spinner-background\"></div>\n <mat-progress-spinner diameter=\"40\" mode=\"indeterminate\" />\n</div>\n", styles: [":host .igo-spinner-container{display:none;position:relative;pointer-events:none}:host .igo-spinner-container.igo-spinner-shown{display:block}:host mat-progress-spinner{height:40px;width:40px;border-radius:50%}:host .igo-spinner-background{height:36px;width:36px;border-radius:50%;border:4px solid #ffffff;position:absolute;top:2px;left:2px}\n"], dependencies: [{ kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: SpinnerComponent, isStandalone: true, selector: "igo-spinner", inputs: { shown: "shown" }, ngImport: i0, template: "<div\n [class]=\"{\n 'igo-spinner-container': true,\n 'igo-spinner-shown': (shown$ | async)\n }\"\n>\n <div class=\"igo-spinner-background\"></div>\n <mat-progress-spinner diameter=\"40\" mode=\"indeterminate\" />\n</div>\n", styles: [":host .igo-spinner-container{display:none;position:relative;pointer-events:none}:host .igo-spinner-container.igo-spinner-shown{display:block}:host mat-progress-spinner{height:40px;width:40px;border-radius:50%}:host .igo-spinner-background{height:36px;width:36px;border-radius:50%;border:4px solid #ffffff;position:absolute;top:2px;left:2px}\n"], dependencies: [{ kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
25
25
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SpinnerComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SpinnerComponent, decorators: [{
27
27
  type: Component,
28
28
  args: [{ selector: 'igo-spinner', imports: [MatProgressSpinner, AsyncPipe], template: "<div\n [class]=\"{\n 'igo-spinner-container': true,\n 'igo-spinner-shown': (shown$ | async)\n }\"\n>\n <div class=\"igo-spinner-background\"></div>\n <mat-progress-spinner diameter=\"40\" mode=\"indeterminate\" />\n</div>\n", styles: [":host .igo-spinner-container{display:none;position:relative;pointer-events:none}:host .igo-spinner-container.igo-spinner-shown{display:block}:host mat-progress-spinner{height:40px;width:40px;border-radius:50%}:host .igo-spinner-background{height:36px;width:36px;border-radius:50%;border:4px solid #ffffff;position:absolute;top:2px;left:2px}\n"] }]
29
29
  }], propDecorators: { shown: [{
@@ -60,12 +60,12 @@ class SpinnerActivityDirective {
60
60
  * @internal
61
61
  */
62
62
  ngOnDestroy() {
63
- this.counter$$.unsubscribe();
63
+ this.counter$$?.unsubscribe();
64
64
  }
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SpinnerActivityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
66
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: SpinnerActivityDirective, isStandalone: true, selector: "[igoSpinnerActivity]", ngImport: i0 });
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SpinnerActivityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
66
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.19", type: SpinnerActivityDirective, isStandalone: true, selector: "[igoSpinnerActivity]", ngImport: i0 });
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SpinnerActivityDirective, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SpinnerActivityDirective, decorators: [{
69
69
  type: Directive,
70
70
  args: [{
71
71
  selector: '[igoSpinnerActivity]'
@@ -80,13 +80,13 @@ const SPINNER_DIRECTIVES = [
80
80
  * @deprecated import the components/directives directly or SPINNER_DIRECTIVES for every components/directives
81
81
  */
82
82
  class IgoSpinnerModule {
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
84
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerActivityDirective,
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
84
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerActivityDirective,
85
85
  SpinnerComponent], exports: [SpinnerActivityDirective,
86
86
  SpinnerComponent] });
87
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerComponent] });
87
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerComponent] });
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSpinnerModule, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoSpinnerModule, decorators: [{
90
90
  type: NgModule,
91
91
  args: [{
92
92
  imports: [...SPINNER_DIRECTIVES],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-spinner.mjs","sources":["../../../packages/common/spinner/src/spinner.component.ts","../../../packages/common/spinner/src/spinner.component.html","../../../packages/common/spinner/src/spinner-activity.directive.ts","../../../packages/common/spinner/src/spinner.module.ts","../../../packages/common/spinner/src/igo2-common-spinner.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\n\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'igo-spinner',\n templateUrl: './spinner.component.html',\n styleUrls: ['./spinner.component.scss'],\n imports: [MatProgressSpinner, AsyncPipe]\n})\nexport class SpinnerComponent {\n public shown$ = new BehaviorSubject<boolean>(false);\n\n @Input()\n set shown(value: boolean) {\n this.shown$.next(value);\n }\n get shown(): boolean {\n return this.shown$.value;\n }\n\n show() {\n this.shown = true;\n }\n\n hide() {\n this.shown = false;\n }\n}\n","<div\n [class]=\"{\n 'igo-spinner-container': true,\n 'igo-spinner-shown': (shown$ | async)\n }\"\n>\n <div class=\"igo-spinner-background\"></div>\n <mat-progress-spinner diameter=\"40\" mode=\"indeterminate\" />\n</div>\n","import { Directive, OnDestroy, OnInit, inject } from '@angular/core';\n\nimport { ActivityService } from '@igo2/core/activity';\n\nimport { Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { SpinnerComponent } from './spinner.component';\n\n/**\n * A directive to bind a SpinnerComponent to the activity service.\n * The activity service tracks any HTTP request and this directive\n * will display the spinner it's attached to when the activity counter\n * is greater than 0.\n */\n@Directive({\n selector: '[igoSpinnerActivity]'\n})\nexport class SpinnerActivityDirective implements OnInit, OnDestroy {\n private spinner = inject(SpinnerComponent, { self: true });\n private activityService = inject(ActivityService);\n\n /**\n * Subscription to the activity service counter\n */\n private counter$$: Subscription;\n\n /**\n * Subscribe to the activity service counter and display the spinner\n * when it's is greater than 0.\n * @internal\n */\n ngOnInit() {\n this.counter$$ = this.activityService.counter$\n .pipe(debounceTime(50))\n .subscribe((count: number) => {\n count > 0 ? this.spinner.show() : this.spinner.hide();\n });\n }\n\n /**\n * Unsubcribe to the activity service counter.\n * @internal\n */\n ngOnDestroy() {\n this.counter$$.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { SpinnerActivityDirective } from './spinner-activity.directive';\nimport { SpinnerComponent } from './spinner.component';\n\nexport const SPINNER_DIRECTIVES = [\n SpinnerActivityDirective,\n SpinnerComponent\n] as const;\n\n/**\n * @deprecated import the components/directives directly or SPINNER_DIRECTIVES for every components/directives\n */\n@NgModule({\n imports: [...SPINNER_DIRECTIVES],\n exports: [...SPINNER_DIRECTIVES]\n})\nexport class IgoSpinnerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAYa,gBAAgB,CAAA;AACpB,IAAA,MAAM,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;IAEnD,IACI,KAAK,CAAC,KAAc,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IACzB;AACA,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK;IAC1B;IAEA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;IACnB;IAEA,IAAI,GA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AAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB;AAChC,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-spinner.mjs","sources":["../../../packages/common/spinner/src/spinner.component.ts","../../../packages/common/spinner/src/spinner.component.html","../../../packages/common/spinner/src/spinner-activity.directive.ts","../../../packages/common/spinner/src/spinner.module.ts","../../../packages/common/spinner/src/igo2-common-spinner.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\n\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'igo-spinner',\n templateUrl: './spinner.component.html',\n styleUrls: ['./spinner.component.scss'],\n imports: [MatProgressSpinner, AsyncPipe]\n})\nexport class SpinnerComponent {\n public shown$ = new BehaviorSubject<boolean>(false);\n\n @Input()\n set shown(value: boolean) {\n this.shown$.next(value);\n }\n get shown(): boolean {\n return this.shown$.value;\n }\n\n show() {\n this.shown = true;\n }\n\n hide() {\n this.shown = false;\n }\n}\n","<div\n [class]=\"{\n 'igo-spinner-container': true,\n 'igo-spinner-shown': (shown$ | async)\n }\"\n>\n <div class=\"igo-spinner-background\"></div>\n <mat-progress-spinner diameter=\"40\" mode=\"indeterminate\" />\n</div>\n","import { Directive, OnDestroy, OnInit, inject } from '@angular/core';\n\nimport { ActivityService } from '@igo2/core/activity';\n\nimport { Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { SpinnerComponent } from './spinner.component';\n\n/**\n * A directive to bind a SpinnerComponent to the activity service.\n * The activity service tracks any HTTP request and this directive\n * will display the spinner it's attached to when the activity counter\n * is greater than 0.\n */\n@Directive({\n selector: '[igoSpinnerActivity]'\n})\nexport class SpinnerActivityDirective implements OnInit, OnDestroy {\n private spinner = inject(SpinnerComponent, { self: true });\n private activityService = inject(ActivityService);\n\n /**\n * Subscription to the activity service counter\n */\n private counter$$?: Subscription;\n\n /**\n * Subscribe to the activity service counter and display the spinner\n * when it's is greater than 0.\n * @internal\n */\n ngOnInit() {\n this.counter$$ = this.activityService.counter$\n .pipe(debounceTime(50))\n .subscribe((count: number) => {\n count > 0 ? this.spinner.show() : this.spinner.hide();\n });\n }\n\n /**\n * Unsubcribe to the activity service counter.\n * @internal\n */\n ngOnDestroy() {\n this.counter$$?.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { SpinnerActivityDirective } from './spinner-activity.directive';\nimport { SpinnerComponent } from './spinner.component';\n\nexport const SPINNER_DIRECTIVES = [\n SpinnerActivityDirective,\n SpinnerComponent\n] as const;\n\n/**\n * @deprecated import the components/directives directly or SPINNER_DIRECTIVES for every components/directives\n */\n@NgModule({\n imports: [...SPINNER_DIRECTIVES],\n exports: [...SPINNER_DIRECTIVES]\n})\nexport class IgoSpinnerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAYa,gBAAgB,CAAA;AACpB,IAAA,MAAM,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;IAEnD,IACI,KAAK,CAAC,KAAc,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IACzB;AACA,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK;IAC1B;IAEA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;IACnB;IAEA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;wGAjBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA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fac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: StopDropPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: StopDropPropagationDirective, isStandalone: true, selector: "[igoStopDropPropagation]", host: { listeners: { "drop": "onDrop($event)" } }, ngImport: i0 });
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: StopDropPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.19", type: StopDropPropagationDirective, isStandalone: true, selector: "[igoStopDropPropagation]", host: { listeners: { "drop": "onDrop($event)" } }, ngImport: i0 });
11
11
  }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: StopDropPropagationDirective, decorators: [{
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: StopDropPropagationDirective, decorators: [{
13
13
  type: Directive,
14
14
  args: [{
15
15
  selector: '[igoStopDropPropagation]'
@@ -23,10 +23,10 @@ class StopPropagationDirective {
23
23
  onClick(event) {
24
24
  event.stopPropagation();
25
25
  }
26
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: StopPropagationDirective, isStandalone: true, selector: "[igoStopPropagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.19", type: StopPropagationDirective, isStandalone: true, selector: "[igoStopPropagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: StopPropagationDirective, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: StopPropagationDirective, decorators: [{
30
30
  type: Directive,
31
31
  args: [{
32
32
  selector: '[igoStopPropagation]'
@@ -46,11 +46,11 @@ class IgoStopPropagationModule {
46
46
  providers: []
47
47
  };
48
48
  }
49
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoStopPropagationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
50
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoStopPropagationModule, imports: [StopDropPropagationDirective, StopPropagationDirective], exports: [StopDropPropagationDirective, StopPropagationDirective] });
51
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoStopPropagationModule });
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoStopPropagationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
50
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoStopPropagationModule, imports: [StopDropPropagationDirective, StopPropagationDirective], exports: [StopDropPropagationDirective, StopPropagationDirective] });
51
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoStopPropagationModule });
52
52
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoStopPropagationModule, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoStopPropagationModule, decorators: [{
54
54
  type: NgModule,
55
55
  args: [{
56
56
  imports: [StopDropPropagationDirective, StopPropagationDirective],
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, viewChild, Component, NgModule } from '@angular/core';
2
+ import { input, output, viewChild, computed, effect, afterNextRender, Component, NgModule } from '@angular/core';
3
3
  import { SelectionModel } from '@angular/cdk/collections';
4
4
  import { NgClass } from '@angular/common';
5
5
  import * as i6 from '@angular/material/button';
@@ -18,8 +18,8 @@ import * as i3 from '@angular/material/table';
18
18
  import { MatTableModule } from '@angular/material/table';
19
19
  import { IgoLanguageModule } from '@igo2/core/language';
20
20
  import { ObjectUtils } from '@igo2/utils';
21
- import { BehaviorSubject, merge, fromEvent } from 'rxjs';
22
- import { map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
21
+ import { BehaviorSubject, merge, EMPTY, fromEvent } from 'rxjs';
22
+ import { switchMap, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
23
23
  import { DataSource } from '@angular/cdk/table';
24
24
  import * as i8 from '@ngx-translate/core';
25
25
 
@@ -33,7 +33,6 @@ var TableActionColor;
33
33
  class TableDataSource extends DataSource {
34
34
  _database;
35
35
  _model;
36
- _sort;
37
36
  get filter() {
38
37
  return this._filterChange.value;
39
38
  }
@@ -41,11 +40,14 @@ class TableDataSource extends DataSource {
41
40
  this._filterChange.next(filter);
42
41
  }
43
42
  _filterChange = new BehaviorSubject('');
44
- constructor(_database, _model, _sort) {
43
+ _sort$ = new BehaviorSubject(undefined);
44
+ set sort(sort) {
45
+ this._sort$.next(sort);
46
+ }
47
+ constructor(_database, _model) {
45
48
  super();
46
49
  this._database = _database;
47
50
  this._model = _model;
48
- this._sort = _sort;
49
51
  }
50
52
  // Connect function called by the table to retrieve one stream containing
51
53
  // the data to render.
@@ -53,16 +55,8 @@ class TableDataSource extends DataSource {
53
55
  if (!this._database) {
54
56
  return merge([]);
55
57
  }
56
- const displayDataChanges = [
57
- this._database.dataChange,
58
- this._filterChange,
59
- this._sort.sortChange
60
- ];
61
- return merge(...displayDataChanges).pipe(map(() => {
62
- return this.getFilteredData(this._database.data);
63
- }), map((data) => {
64
- return this.getSortedData(data);
65
- }));
58
+ const sortChange$ = this._sort$.pipe(switchMap((sort) => (sort ? sort.sortChange : EMPTY)));
59
+ return merge(this._database.dataChange, this._filterChange, sortChange$).pipe(map(() => this.getFilteredData(this._database.data)), map((data) => this.getSortedData(data)));
66
60
  }
67
61
  disconnect() {
68
62
  // empty
@@ -81,61 +75,55 @@ class TableDataSource extends DataSource {
81
75
  });
82
76
  }
83
77
  getSortedData(data) {
84
- if (!this._sort.active || this._sort.direction === '') {
78
+ const sort = this._sort$.value;
79
+ if (!sort || !sort.active || sort.direction === '') {
85
80
  return data;
86
81
  }
87
82
  return data.sort((a, b) => {
88
- const propertyA = ObjectUtils.resolve(a, this._sort.active);
89
- const propertyB = ObjectUtils.resolve(b, this._sort.active);
90
- return ObjectUtils.naturalCompare(propertyB, propertyA, this._sort.direction);
83
+ const propertyA = ObjectUtils.resolve(a, sort.active);
84
+ const propertyB = ObjectUtils.resolve(b, sort.active);
85
+ return ObjectUtils.naturalCompare(propertyB, propertyA, sort.direction);
91
86
  });
92
87
  }
93
88
  }
94
89
 
95
90
  class TableComponent {
96
- database = input(undefined, ...(ngDevMode ? [{ debugName: "database" }] : /* istanbul ignore next */ []));
97
- model = input(undefined, ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
91
+ database = input.required(...(ngDevMode ? [{ debugName: "database" }] : /* istanbul ignore next */ []));
92
+ model = input.required(...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
98
93
  hasFilterInput = input(true, ...(ngDevMode ? [{ debugName: "hasFilterInput" }] : /* istanbul ignore next */ []));
99
- displayedColumns;
100
- dataSource;
101
94
  selection = new SelectionModel(true, []);
102
95
  select = output();
103
96
  filter = viewChild('filter', ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
104
97
  sort = viewChild(MatSort, ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
105
- ngOnInit() {
98
+ displayedColumns = computed(() => {
106
99
  const model = this.model();
107
- this.dataSource = new TableDataSource(this.database(), model, this.sort());
108
- if (model) {
109
- this.displayedColumns = model.columns
110
- .filter((c) => c.displayed !== false)
111
- .map((c) => c.name);
112
- if (model.selectionCheckbox) {
113
- this.displayedColumns.unshift('selectionCheckbox');
114
- }
115
- if (model.actions && model.actions.length) {
116
- this.displayedColumns.push('action');
117
- }
118
- }
119
- this.selection.changed.subscribe((e) => this.select.emit(e));
120
- }
121
- ngAfterViewInit() {
122
- const filter = this.filter();
123
- if (filter) {
124
- fromEvent(filter.nativeElement, 'keyup')
125
- .pipe(debounceTime(150), distinctUntilChanged())
126
- .subscribe(() => {
127
- if (!this.dataSource) {
128
- return;
129
- }
130
- this.dataSource.filter = this.filter().nativeElement.value;
131
- });
100
+ const cols = model.columns
101
+ .filter((c) => c.displayed !== false)
102
+ .map((c) => c.name);
103
+ if (model.selectionCheckbox) {
104
+ cols.unshift('selectionCheckbox');
132
105
  }
133
- }
134
- ngOnChanges(change) {
135
- if (change.database) {
136
- this.dataSource = new TableDataSource(this.database(), this.model(), this.sort());
137
- this.selection.clear();
106
+ if (model.actions?.length) {
107
+ cols.push('action');
138
108
  }
109
+ return cols;
110
+ }, ...(ngDevMode ? [{ debugName: "displayedColumns" }] : /* istanbul ignore next */ []));
111
+ dataSource = computed(() => new TableDataSource(this.database(), this.model()), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
112
+ constructor() {
113
+ effect(() => {
114
+ this.dataSource().sort = this.sort();
115
+ });
116
+ this.selection.changed.subscribe((e) => this.select.emit(e));
117
+ afterNextRender(() => {
118
+ const filter = this.filter();
119
+ if (filter) {
120
+ fromEvent(filter.nativeElement, 'keyup')
121
+ .pipe(debounceTime(150), distinctUntilChanged())
122
+ .subscribe(() => {
123
+ this.dataSource().filter = filter.nativeElement.value;
124
+ });
125
+ }
126
+ });
139
127
  }
140
128
  getActionColor(colorId) {
141
129
  return TableActionColor[colorId];
@@ -146,23 +134,28 @@ class TableComponent {
146
134
  /** Whether the number of selected elements matches the total number of rows. */
147
135
  isAllSelected() {
148
136
  const numSelected = this.selection.selected.length;
149
- const numRows = this.database().data.length;
137
+ const database = this.database();
138
+ const numRows = database ? database.data.length : 0;
150
139
  return numSelected === numRows;
151
140
  }
152
141
  /** Selects all rows if they are not all selected; otherwise clear selection. */
153
142
  masterToggle() {
143
+ const database = this.database();
144
+ if (!database) {
145
+ return;
146
+ }
154
147
  this.isAllSelected()
155
148
  ? this.selection.clear()
156
- : this.database().data.forEach((row) => this.selection.select(row));
149
+ : database.data.forEach((row) => this.selection.select(row));
157
150
  }
158
151
  handleClickAction(event, action, row) {
159
152
  event.stopPropagation();
160
153
  action.click(row);
161
154
  }
162
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
163
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: TableComponent, isStandalone: true, selector: "igo-table", inputs: { database: { classPropertyName: "database", publicName: "database", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, hasFilterInput: { classPropertyName: "hasFilterInput", publicName: "hasFilterInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, viewQueries: [{ propertyName: "filter", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model().rowClassFunc ? model().rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
156
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TableComponent, isStandalone: true, selector: "igo-table", inputs: { database: { classPropertyName: "database", publicName: "database", isSignal: true, isRequired: true, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null }, hasFilterInput: { classPropertyName: "hasFilterInput", publicName: "hasFilterInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, viewQueries: [{ propertyName: "filter", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource()\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color!)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns()\"\n [ngClass]=\"model().rowClassFunc?.(row)\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
164
157
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TableComponent, decorators: [{
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TableComponent, decorators: [{
166
159
  type: Component,
167
160
  args: [{ selector: 'igo-table', imports: [
168
161
  MatFormFieldModule,
@@ -174,8 +167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
174
167
  MatButtonModule,
175
168
  MatIconModule,
176
169
  IgoLanguageModule
177
- ], template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model().rowClassFunc ? model().rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"] }]
178
- }], propDecorators: { database: [{ type: i0.Input, args: [{ isSignal: true, alias: "database", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], hasFilterInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFilterInput", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], filter: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] } });
170
+ ], template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource()\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color!)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns()\"\n [ngClass]=\"model().rowClassFunc?.(row)\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"] }]
171
+ }], ctorParameters: () => [], propDecorators: { database: [{ type: i0.Input, args: [{ isSignal: true, alias: "database", required: true }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: true }] }], hasFilterInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFilterInput", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], filter: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] } });
179
172
 
180
173
  /**
181
174
  * @deprecated import the TableComponent directly
@@ -187,11 +180,11 @@ class IgoTableModule {
187
180
  providers: []
188
181
  };
189
182
  }
190
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
191
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoTableModule, imports: [TableComponent], exports: [TableComponent] });
192
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoTableModule, imports: [TableComponent] });
183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
184
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoTableModule, imports: [TableComponent], exports: [TableComponent] });
185
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoTableModule, imports: [TableComponent] });
193
186
  }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoTableModule, decorators: [{
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoTableModule, decorators: [{
195
188
  type: NgModule,
196
189
  args: [{
197
190
  imports: [TableComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-table.mjs","sources":["../../../packages/common/table/src/table-action-color.enum.ts","../../../packages/common/table/src/table-datasource.ts","../../../packages/common/table/src/table.component.ts","../../../packages/common/table/src/table.component.html","../../../packages/common/table/src/table.module.ts","../../../packages/common/table/src/table-database.ts","../../../packages/common/table/src/igo2-common-table.ts"],"sourcesContent":["export enum TableActionColor {\n primary,\n accent,\n warn\n}\n","import { DataSource } from '@angular/cdk/table';\nimport { MatSort } from '@angular/material/sort';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, Observable, merge } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { TableDatabase } from './table-database';\nimport { TableModel } from './table-model.interface';\n\nexport class TableDataSource extends DataSource<any> {\n get filter(): string {\n return this._filterChange.value;\n }\n set filter(filter: string) {\n this._filterChange.next(filter);\n }\n private _filterChange = new BehaviorSubject('');\n\n constructor(\n private _database: TableDatabase,\n private _model: TableModel,\n private _sort: MatSort\n ) {\n super();\n }\n\n // Connect function called by the table to retrieve one stream containing\n // the data to render.\n connect(): Observable<any[]> {\n if (!this._database) {\n return merge([]);\n }\n const displayDataChanges = [\n this._database.dataChange,\n this._filterChange,\n this._sort.sortChange\n ];\n\n return merge(...displayDataChanges).pipe(\n map(() => {\n return this.getFilteredData(this._database.data);\n }),\n map((data) => {\n return this.getSortedData(data);\n })\n );\n }\n\n disconnect() {\n // empty\n }\n\n getFilteredData(data): any[] {\n if (!this.filter) {\n return data;\n }\n return data.slice().filter((item: any) => {\n const searchStr: string = this._model.columns\n .filter((c) => c.filterable)\n .map((c) => ObjectUtils.resolve(item, c.name))\n .join(' ')\n .toLowerCase();\n\n return searchStr.indexOf(this.filter.toLowerCase()) !== -1;\n });\n }\n\n getSortedData(data: any[]): any[] {\n if (!this._sort.active || this._sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const propertyA: number | string = ObjectUtils.resolve(\n a,\n this._sort.active\n ) as number | string;\n const propertyB: number | string = ObjectUtils.resolve(\n b,\n this._sort.active\n ) as number | string;\n\n return ObjectUtils.naturalCompare(\n propertyB,\n propertyA,\n this._sort.direction\n );\n });\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n OnChanges,\n OnInit,\n input,\n output,\n viewChild\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { TableActionColor } from './table-action-color.enum';\nimport { TableDatabase } from './table-database';\nimport { TableDataSource } from './table-datasource';\nimport { TableModel } from './table-model.interface';\n\n@Component({\n selector: 'igo-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatCheckboxModule,\n NgClass,\n MatButtonModule,\n MatIconModule,\n IgoLanguageModule\n ]\n})\nexport class TableComponent implements OnChanges, OnInit, AfterViewInit {\n readonly database = input<TableDatabase>(undefined);\n readonly model = input<TableModel>(undefined);\n readonly hasFilterInput = input(true);\n\n public displayedColumns;\n public dataSource: TableDataSource | null;\n public selection = new SelectionModel<any>(true, []);\n\n readonly select = output<{\n added: any[];\n removed: any[];\n source: SelectionModel<any>;\n }>();\n\n readonly filter = viewChild<ElementRef>('filter');\n readonly sort = viewChild(MatSort);\n\n ngOnInit() {\n const model = this.model();\n this.dataSource = new TableDataSource(this.database(), model, this.sort());\n\n if (model) {\n this.displayedColumns = model.columns\n .filter((c) => c.displayed !== false)\n .map((c) => c.name);\n\n if (model.selectionCheckbox) {\n this.displayedColumns.unshift('selectionCheckbox');\n }\n if (model.actions && model.actions.length) {\n this.displayedColumns.push('action');\n }\n }\n\n this.selection.changed.subscribe((e) => this.select.emit(e));\n }\n\n ngAfterViewInit() {\n const filter = this.filter();\n if (filter) {\n fromEvent(filter.nativeElement, 'keyup')\n .pipe(debounceTime(150), distinctUntilChanged())\n .subscribe(() => {\n if (!this.dataSource) {\n return;\n }\n this.dataSource.filter = this.filter().nativeElement.value;\n });\n }\n }\n\n ngOnChanges(change) {\n if (change.database) {\n this.dataSource = new TableDataSource(\n this.database(),\n this.model(),\n this.sort()\n );\n this.selection.clear();\n }\n }\n\n getActionColor(colorId: number): string {\n return TableActionColor[colorId];\n }\n\n getValue(row, key) {\n return ObjectUtils.resolve(row, key);\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = this.database().data.length;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n this.isAllSelected()\n ? this.selection.clear()\n : this.database().data.forEach((row) => this.selection.select(row));\n }\n\n handleClickAction(event, action, row) {\n event.stopPropagation();\n action.click(row);\n }\n}\n","<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model().rowClassFunc ? model().rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { TableComponent } from './table.component';\n\n/**\n * @deprecated import the TableComponent directly\n */\n@NgModule({\n imports: [TableComponent],\n exports: [TableComponent]\n})\nexport class IgoTableModule {\n static forRoot(): ModuleWithProviders<IgoTableModule> {\n return {\n ngModule: IgoTableModule,\n providers: []\n };\n }\n}\n","import { BehaviorSubject } from 'rxjs';\n\nexport class TableDatabase {\n /** Stream that emits whenever the data has been modified. */\n dataChange: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);\n get data(): any[] {\n return this.dataChange.value;\n }\n\n constructor(data?) {\n if (data) {\n this.dataChange.next(data);\n }\n }\n\n set(data) {\n this.dataChange.next(data);\n }\n\n add(item) {\n const copiedData = this.data.slice();\n copiedData.push(item);\n this.set(copiedData);\n }\n\n remove(item) {\n const copiedData = this.data.slice();\n const index = copiedData.indexOf(item);\n copiedData.splice(index, 1);\n this.set(copiedData);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAA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AAC,UAAU,CAAC;IACtB;AAEA,IAAA,MAAM,CAAC,IAAI,EAAA;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;QACpC,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC;AACtC,QAAA,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC3B,QAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;IACtB;AACD;;AC/BD;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-table.mjs","sources":["../../../packages/common/table/src/table-action-color.enum.ts","../../../packages/common/table/src/table-datasource.ts","../../../packages/common/table/src/table.component.ts","../../../packages/common/table/src/table.component.html","../../../packages/common/table/src/table.module.ts","../../../packages/common/table/src/table-database.ts","../../../packages/common/table/src/igo2-common-table.ts"],"sourcesContent":["export enum TableActionColor {\n primary,\n accent,\n warn\n}\n","import { DataSource } from '@angular/cdk/table';\nimport { MatSort } from '@angular/material/sort';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, EMPTY, Observable, merge } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\n\nimport { TableDatabase } from './table-database';\nimport { TableModel } from './table-model.interface';\n\nexport class TableDataSource extends DataSource<any> {\n get filter(): string {\n return this._filterChange.value;\n }\n set filter(filter: string) {\n this._filterChange.next(filter);\n }\n private _filterChange = new BehaviorSubject('');\n\n private _sort$ = new BehaviorSubject<MatSort | undefined>(undefined);\n\n set sort(sort: MatSort | undefined) {\n this._sort$.next(sort);\n }\n\n constructor(\n private _database: TableDatabase,\n private _model: TableModel\n ) {\n super();\n }\n\n // Connect function called by the table to retrieve one stream containing\n // the data to render.\n connect(): Observable<any[]> {\n if (!this._database) {\n return merge([]);\n }\n const sortChange$ = this._sort$.pipe(\n switchMap((sort) => (sort ? sort.sortChange : EMPTY))\n );\n\n return merge(\n this._database.dataChange,\n this._filterChange,\n sortChange$\n ).pipe(\n map(() => this.getFilteredData(this._database.data)),\n map((data) => this.getSortedData(data))\n );\n }\n\n disconnect() {\n // empty\n }\n\n getFilteredData(data: any[]): any[] {\n if (!this.filter) {\n return data;\n }\n return data.slice().filter((item: any) => {\n const searchStr: string = this._model.columns\n .filter((c) => c.filterable)\n .map((c) => ObjectUtils.resolve(item, c.name))\n .join(' ')\n .toLowerCase();\n\n return searchStr.indexOf(this.filter.toLowerCase()) !== -1;\n });\n }\n\n getSortedData(data: any[]): any[] {\n const sort = this._sort$.value;\n if (!sort || !sort.active || sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const propertyA: number | string = ObjectUtils.resolve(a, sort.active) as\n number | string;\n const propertyB: number | string = ObjectUtils.resolve(b, sort.active) as\n number | string;\n\n return ObjectUtils.naturalCompare(propertyB, propertyA, sort.direction);\n });\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { NgClass } from '@angular/common';\nimport {\n Component,\n ElementRef,\n afterNextRender,\n computed,\n effect,\n input,\n output,\n viewChild\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { TableActionColor } from './table-action-color.enum';\nimport { TableDatabase } from './table-database';\nimport { TableDataSource } from './table-datasource';\nimport { TableModel } from './table-model.interface';\n\n@Component({\n selector: 'igo-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatCheckboxModule,\n NgClass,\n MatButtonModule,\n MatIconModule,\n IgoLanguageModule\n ]\n})\nexport class TableComponent {\n readonly database = input.required<TableDatabase>();\n readonly model = input.required<TableModel>();\n readonly hasFilterInput = input(true);\n\n public selection = new SelectionModel<any>(true, []);\n\n readonly select = output<{\n added: any[];\n removed: any[];\n source: SelectionModel<any>;\n }>();\n\n readonly filter = viewChild<ElementRef>('filter');\n readonly sort = viewChild(MatSort);\n\n readonly displayedColumns = computed(() => {\n const model = this.model();\n const cols = model.columns\n .filter((c) => c.displayed !== false)\n .map((c) => c.name);\n if (model.selectionCheckbox) {\n cols.unshift('selectionCheckbox');\n }\n if (model.actions?.length) {\n cols.push('action');\n }\n return cols;\n });\n\n readonly dataSource = computed(\n () => new TableDataSource(this.database(), this.model())\n );\n\n constructor() {\n effect(() => {\n this.dataSource().sort = this.sort();\n });\n\n this.selection.changed.subscribe((e) => this.select.emit(e));\n\n afterNextRender(() => {\n const filter = this.filter();\n if (filter) {\n fromEvent(filter.nativeElement, 'keyup')\n .pipe(debounceTime(150), distinctUntilChanged())\n .subscribe(() => {\n this.dataSource().filter = filter.nativeElement.value;\n });\n }\n });\n }\n\n getActionColor(colorId: number): string {\n return TableActionColor[colorId];\n }\n\n getValue(row: any, key: string): any {\n return ObjectUtils.resolve(row, key);\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected(): boolean {\n const numSelected = this.selection.selected.length;\n const database = this.database();\n const numRows = database ? database.data.length : 0;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n const database = this.database();\n if (!database) {\n return;\n }\n this.isAllSelected()\n ? this.selection.clear()\n : database.data.forEach((row) => this.selection.select(row));\n }\n\n handleClickAction(event: MouseEvent, action: any, row: any) {\n event.stopPropagation();\n action.click(row);\n }\n}\n","<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource()\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color!)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns()\"\n [ngClass]=\"model().rowClassFunc?.(row)\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { TableComponent } from './table.component';\n\n/**\n * @deprecated import the TableComponent directly\n */\n@NgModule({\n imports: [TableComponent],\n exports: [TableComponent]\n})\nexport class IgoTableModule {\n static forRoot(): ModuleWithProviders<IgoTableModule> {\n return {\n ngModule: IgoTableModule,\n providers: []\n };\n }\n}\n","import { BehaviorSubject } from 'rxjs';\n\nexport class TableDatabase {\n /** Stream that emits whenever the data has been modified. */\n dataChange: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);\n get data(): any[] {\n return this.dataChange.value;\n }\n\n constructor(data?: any[]) {\n if (data) {\n this.dataChange.next(data);\n }\n }\n\n set(data: any[]) {\n this.dataChange.next(data);\n }\n\n add(item: any) {\n const copiedData = this.data.slice();\n copiedData.push(item);\n this.set(copiedData);\n }\n\n remove(item: any) {\n const copiedData = this.data.slice();\n const index = copiedData.indexOf(item);\n copiedData.splice(index, 1);\n this.set(copiedData);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP,IAAA,gBAAA,CAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,gBAAA,CAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;ACWtB,MAAO,eAAgB,SAAQ,UAAe,CAAA;AAgBxC,IAAA,SAAA;AACA,IAAA,MAAA;AAhBV,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC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