@igo2/common 20.1.1 → 21.0.0-next.2

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 (104) hide show
  1. package/fesm2022/igo2-common-action.mjs +32 -32
  2. package/fesm2022/igo2-common-action.mjs.map +1 -1
  3. package/fesm2022/igo2-common-backdrop.mjs +8 -9
  4. package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
  5. package/fesm2022/igo2-common-badge.mjs +7 -8
  6. package/fesm2022/igo2-common-badge.mjs.map +1 -1
  7. package/fesm2022/igo2-common-clickout.mjs +11 -11
  8. package/fesm2022/igo2-common-clickout.mjs.map +1 -1
  9. package/fesm2022/igo2-common-clone.mjs +8 -9
  10. package/fesm2022/igo2-common-clone.mjs.map +1 -1
  11. package/fesm2022/igo2-common-collapsible.mjs +13 -14
  12. package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
  13. package/fesm2022/igo2-common-color.mjs +9 -9
  14. package/fesm2022/igo2-common-color.mjs.map +1 -1
  15. package/fesm2022/igo2-common-confirm-dialog.mjs +10 -10
  16. package/fesm2022/igo2-common-context-menu.mjs +20 -26
  17. package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
  18. package/fesm2022/igo2-common-custom-html.mjs +11 -12
  19. package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
  20. package/fesm2022/igo2-common-datepicker.mjs +13 -13
  21. package/fesm2022/igo2-common-datepicker.mjs.map +1 -1
  22. package/fesm2022/igo2-common-dom.mjs +7 -7
  23. package/fesm2022/igo2-common-drag-drop.mjs +24 -28
  24. package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
  25. package/fesm2022/igo2-common-dynamic-component.mjs +19 -19
  26. package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
  27. package/fesm2022/igo2-common-entity.mjs +61 -61
  28. package/fesm2022/igo2-common-entity.mjs.map +1 -1
  29. package/fesm2022/igo2-common-flexible.mjs +9 -9
  30. package/fesm2022/igo2-common-flexible.mjs.map +1 -1
  31. package/fesm2022/igo2-common-form.mjs +75 -75
  32. package/fesm2022/igo2-common-form.mjs.map +1 -1
  33. package/fesm2022/igo2-common-home-button.mjs +7 -7
  34. package/fesm2022/igo2-common-icon.mjs +8 -8
  35. package/fesm2022/igo2-common-icon.mjs.map +1 -1
  36. package/fesm2022/igo2-common-image.mjs +14 -16
  37. package/fesm2022/igo2-common-image.mjs.map +1 -1
  38. package/fesm2022/igo2-common-interactive-tour.mjs +16 -16
  39. package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
  40. package/fesm2022/igo2-common-json-dialog.mjs +10 -10
  41. package/fesm2022/igo2-common-keyvalue.mjs +8 -9
  42. package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
  43. package/fesm2022/igo2-common-list.mjs +17 -25
  44. package/fesm2022/igo2-common-list.mjs.map +1 -1
  45. package/fesm2022/igo2-common-panel.mjs +12 -13
  46. package/fesm2022/igo2-common-panel.mjs.map +1 -1
  47. package/fesm2022/igo2-common-resizable-bar.mjs +9 -13
  48. package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
  49. package/fesm2022/igo2-common-select-value-dialog.mjs +10 -10
  50. package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
  51. package/fesm2022/igo2-common-sidenav.mjs +14 -19
  52. package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
  53. package/fesm2022/igo2-common-spinner.mjs +13 -14
  54. package/fesm2022/igo2-common-spinner.mjs.map +1 -1
  55. package/fesm2022/igo2-common-stop-propagation.mjs +12 -14
  56. package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
  57. package/fesm2022/igo2-common-table.mjs +12 -12
  58. package/fesm2022/igo2-common-table.mjs.map +1 -1
  59. package/fesm2022/igo2-common-timepicker.mjs +9 -9
  60. package/fesm2022/igo2-common-timepicker.mjs.map +1 -1
  61. package/fesm2022/igo2-common-tool.mjs +19 -19
  62. package/fesm2022/igo2-common-tool.mjs.map +1 -1
  63. package/fesm2022/igo2-common-widget.mjs +17 -17
  64. package/fesm2022/igo2-common-widget.mjs.map +1 -1
  65. package/fesm2022/igo2-common-workspace.mjs +21 -21
  66. package/fesm2022/igo2-common-workspace.mjs.map +1 -1
  67. package/package.json +60 -59
  68. package/{clickout/index.d.ts → types/igo2-common-clickout.d.ts} +1 -1
  69. package/{drag-drop/index.d.ts → types/igo2-common-drag-drop.d.ts} +1 -1
  70. package/{entity/index.d.ts → types/igo2-common-entity.d.ts} +1 -1
  71. package/{table/index.d.ts → types/igo2-common-table.d.ts} +2 -2
  72. /package/{action/index.d.ts → types/igo2-common-action.d.ts} +0 -0
  73. /package/{backdrop/index.d.ts → types/igo2-common-backdrop.d.ts} +0 -0
  74. /package/{badge/index.d.ts → types/igo2-common-badge.d.ts} +0 -0
  75. /package/{clone/index.d.ts → types/igo2-common-clone.d.ts} +0 -0
  76. /package/{collapsible/index.d.ts → types/igo2-common-collapsible.d.ts} +0 -0
  77. /package/{color/index.d.ts → types/igo2-common-color.d.ts} +0 -0
  78. /package/{confirm-dialog/index.d.ts → types/igo2-common-confirm-dialog.d.ts} +0 -0
  79. /package/{context-menu/index.d.ts → types/igo2-common-context-menu.d.ts} +0 -0
  80. /package/{custom-html/index.d.ts → types/igo2-common-custom-html.d.ts} +0 -0
  81. /package/{datepicker/index.d.ts → types/igo2-common-datepicker.d.ts} +0 -0
  82. /package/{dom/index.d.ts → types/igo2-common-dom.d.ts} +0 -0
  83. /package/{dynamic-component/index.d.ts → types/igo2-common-dynamic-component.d.ts} +0 -0
  84. /package/{environment/index.d.ts → types/igo2-common-environment.d.ts} +0 -0
  85. /package/{flexible/index.d.ts → types/igo2-common-flexible.d.ts} +0 -0
  86. /package/{form/index.d.ts → types/igo2-common-form.d.ts} +0 -0
  87. /package/{home-button/index.d.ts → types/igo2-common-home-button.d.ts} +0 -0
  88. /package/{icon/index.d.ts → types/igo2-common-icon.d.ts} +0 -0
  89. /package/{image/index.d.ts → types/igo2-common-image.d.ts} +0 -0
  90. /package/{interactive-tour/index.d.ts → types/igo2-common-interactive-tour.d.ts} +0 -0
  91. /package/{json-dialog/index.d.ts → types/igo2-common-json-dialog.d.ts} +0 -0
  92. /package/{keyvalue/index.d.ts → types/igo2-common-keyvalue.d.ts} +0 -0
  93. /package/{list/index.d.ts → types/igo2-common-list.d.ts} +0 -0
  94. /package/{panel/index.d.ts → types/igo2-common-panel.d.ts} +0 -0
  95. /package/{resizable-bar/index.d.ts → types/igo2-common-resizable-bar.d.ts} +0 -0
  96. /package/{select-value-dialog/index.d.ts → types/igo2-common-select-value-dialog.d.ts} +0 -0
  97. /package/{sidenav/index.d.ts → types/igo2-common-sidenav.d.ts} +0 -0
  98. /package/{spinner/index.d.ts → types/igo2-common-spinner.d.ts} +0 -0
  99. /package/{stop-propagation/index.d.ts → types/igo2-common-stop-propagation.d.ts} +0 -0
  100. /package/{timepicker/index.d.ts → types/igo2-common-timepicker.d.ts} +0 -0
  101. /package/{tool/index.d.ts → types/igo2-common-tool.d.ts} +0 -0
  102. /package/{widget/index.d.ts → types/igo2-common-widget.d.ts} +0 -0
  103. /package/{workspace/index.d.ts → types/igo2-common-workspace.d.ts} +0 -0
  104. /package/{index.d.ts → types/igo2-common.d.ts} +0 -0
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Input, Component, inject, Directive, NgModule } from '@angular/core';
3
3
  import { ActivityService } from '@igo2/core/activity';
4
4
  import { debounceTime } from 'rxjs/operators';
5
- import { NgClass, AsyncPipe } from '@angular/common';
5
+ import { AsyncPipe } from '@angular/common';
6
6
  import { MatProgressSpinner } from '@angular/material/progress-spinner';
7
7
  import { BehaviorSubject } from 'rxjs';
8
8
 
@@ -20,12 +20,12 @@ class SpinnerComponent {
20
20
  hide() {
21
21
  this.shown = false;
22
22
  }
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: SpinnerComponent, isStandalone: true, selector: "igo-spinner", inputs: { shown: "shown" }, ngImport: i0, template: "<div\n [ngClass]=\"{\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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.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" }] });
25
25
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinnerComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SpinnerComponent, decorators: [{
27
27
  type: Component,
28
- args: [{ selector: 'igo-spinner', imports: [NgClass, MatProgressSpinner, AsyncPipe], template: "<div\n [ngClass]=\"{\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"] }]
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: [{
30
30
  type: Input
31
31
  }] } });
@@ -62,14 +62,13 @@ class SpinnerActivityDirective {
62
62
  ngOnDestroy() {
63
63
  this.counter$$.unsubscribe();
64
64
  }
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinnerActivityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
66
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.19", type: SpinnerActivityDirective, isStandalone: true, selector: "[igoSpinnerActivity]", ngImport: i0 });
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 });
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpinnerActivityDirective, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SpinnerActivityDirective, decorators: [{
69
69
  type: Directive,
70
70
  args: [{
71
- selector: '[igoSpinnerActivity]',
72
- standalone: true
71
+ selector: '[igoSpinnerActivity]'
73
72
  }]
74
73
  }] });
75
74
 
@@ -81,13 +80,13 @@ const SPINNER_DIRECTIVES = [
81
80
  * @deprecated import the components/directives directly or SPINNER_DIRECTIVES for every components/directives
82
81
  */
83
82
  class IgoSpinnerModule {
84
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
85
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerActivityDirective,
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,
86
85
  SpinnerComponent], exports: [SpinnerActivityDirective,
87
86
  SpinnerComponent] });
88
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerComponent] });
87
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSpinnerModule, imports: [SpinnerComponent] });
89
88
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoSpinnerModule, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoSpinnerModule, decorators: [{
91
90
  type: NgModule,
92
91
  args: [{
93
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, NgClass } 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: [NgClass, 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 [ngClass]=\"{\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 standalone: true\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,GAA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ACxB,YAAA,gBAAgB,aADhB,wBAAwB;YACxB,gBAAgB,CAAA,EAAA,CAAA;AAUL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAV3B,gBAAgB,CAAA,EAAA,CAAA;;4FAUL,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,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,C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B,CAAA,EAAA,CAAA;;4FAUL,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB;AAChC,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -6,14 +6,13 @@ class StopDropPropagationDirective {
6
6
  event.preventDefault();
7
7
  event.stopPropagation();
8
8
  }
9
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StopDropPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.19", 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.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 });
11
11
  }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StopDropPropagationDirective, decorators: [{
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: StopDropPropagationDirective, decorators: [{
13
13
  type: Directive,
14
14
  args: [{
15
- selector: '[igoStopDropPropagation]',
16
- standalone: true
15
+ selector: '[igoStopDropPropagation]'
17
16
  }]
18
17
  }], propDecorators: { onDrop: [{
19
18
  type: HostListener,
@@ -24,14 +23,13 @@ class StopPropagationDirective {
24
23
  onClick(event) {
25
24
  event.stopPropagation();
26
25
  }
27
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.19", 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.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 });
29
28
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StopPropagationDirective, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: StopPropagationDirective, decorators: [{
31
30
  type: Directive,
32
31
  args: [{
33
- selector: '[igoStopPropagation]',
34
- standalone: true
32
+ selector: '[igoStopPropagation]'
35
33
  }]
36
34
  }], propDecorators: { onClick: [{
37
35
  type: HostListener,
@@ -48,11 +46,11 @@ class IgoStopPropagationModule {
48
46
  providers: []
49
47
  };
50
48
  }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoStopPropagationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
52
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoStopPropagationModule, imports: [StopDropPropagationDirective, StopPropagationDirective], exports: [StopDropPropagationDirective, StopPropagationDirective] });
53
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoStopPropagationModule });
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 });
54
52
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoStopPropagationModule, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoStopPropagationModule, decorators: [{
56
54
  type: NgModule,
57
55
  args: [{
58
56
  imports: [StopDropPropagationDirective, StopPropagationDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-stop-propagation.mjs","sources":["../../../packages/common/stop-propagation/src/stop-drop-propagation.directive.ts","../../../packages/common/stop-propagation/src/stop-propagation.directive.ts","../../../packages/common/stop-propagation/src/stop-propagation.module.ts","../../../packages/common/stop-propagation/src/public_api.ts","../../../packages/common/stop-propagation/src/igo2-common-stop-propagation.ts"],"sourcesContent":["import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[igoStopDropPropagation]',\n standalone: true\n})\nexport class StopDropPropagationDirective {\n @HostListener('drop', ['$event'])\n public onDrop(event: any): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[igoStopPropagation]',\n standalone: true\n})\nexport class StopPropagationDirective {\n @HostListener('click', ['$event'])\n public onClick(event: any): void {\n event.stopPropagation();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { StopDropPropagationDirective } from './stop-drop-propagation.directive';\nimport { StopPropagationDirective } from './stop-propagation.directive';\n\n/**\n * @deprecated import the components/directives directly or STOP_PROPAGATION_DIRECTIVES for the set\n */\n@NgModule({\n imports: [StopDropPropagationDirective, StopPropagationDirective],\n exports: [StopDropPropagationDirective, StopPropagationDirective]\n})\nexport class IgoStopPropagationModule {\n static forRoot(): ModuleWithProviders<IgoStopPropagationModule> {\n return {\n ngModule: IgoStopPropagationModule,\n providers: []\n };\n }\n}\n","import { StopDropPropagationDirective } from './stop-drop-propagation.directive';\nimport { StopPropagationDirective } from './stop-propagation.directive';\n\nexport * from './stop-propagation.module';\nexport * from './stop-propagation.directive';\nexport * from './stop-drop-propagation.directive';\n\nexport const STOP_PROPAGATION_DIRECTIVES = [\n StopDropPropagationDirective,\n StopPropagationDirective\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAMa,4BAA4B,CAAA;AAEhC,IAAA,MAAM,CAAC,KAAU,EAAA;QACtB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;IACzB;wGALW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,MAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAJxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE;AACb,iBAAA;;sBAEE,YAAY;uBAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;;;MCDrB,wBA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wBAAwB,CAAC;AACjE,oBAAA,OAAO,EAAE,CAAC,4BAA4B,EAAE,wBAAwB;AACjE,iBAAA;;;ACJM,MAAM,2BAA2B,GAAG;IACzC,4BAA4B;IAC5B;;;ACTF;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-stop-propagation.mjs","sources":["../../../packages/common/stop-propagation/src/stop-drop-propagation.directive.ts","../../../packages/common/stop-propagation/src/stop-propagation.directive.ts","../../../packages/common/stop-propagation/src/stop-propagation.module.ts","../../../packages/common/stop-propagation/src/public_api.ts","../../../packages/common/stop-propagation/src/igo2-common-stop-propagation.ts"],"sourcesContent":["import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[igoStopDropPropagation]'\n})\nexport class StopDropPropagationDirective {\n @HostListener('drop', ['$event'])\n public onDrop(event: any): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[igoStopPropagation]'\n})\nexport class StopPropagationDirective {\n @HostListener('click', ['$event'])\n public onClick(event: any): void {\n event.stopPropagation();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { StopDropPropagationDirective } from './stop-drop-propagation.directive';\nimport { StopPropagationDirective } from './stop-propagation.directive';\n\n/**\n * @deprecated import the components/directives directly or STOP_PROPAGATION_DIRECTIVES for the set\n */\n@NgModule({\n imports: [StopDropPropagationDirective, StopPropagationDirective],\n exports: [StopDropPropagationDirective, StopPropagationDirective]\n})\nexport class IgoStopPropagationModule {\n static forRoot(): ModuleWithProviders<IgoStopPropagationModule> {\n return {\n ngModule: IgoStopPropagationModule,\n providers: []\n };\n }\n}\n","import { StopDropPropagationDirective } from './stop-drop-propagation.directive';\nimport { StopPropagationDirective } from './stop-propagation.directive';\n\nexport * from './stop-propagation.module';\nexport * from './stop-propagation.directive';\nexport * from './stop-drop-propagation.directive';\n\nexport const STOP_PROPAGATION_DIRECTIVES = [\n StopDropPropagationDirective,\n StopPropagationDirective\n] as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ACnC,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,wBAAwB;AAClC,YAAA,SAAS,EAAE;SACZ;IACH;wGANW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAHzB,4BAA4B,EAAE,wBAAwB,CAAA,EAAA,OAAA,EAAA,CACtD,4BAA4B,EAAE,wBAAwB,CAAA,EAAA,CAAA;yGAErD,wBAAwB,EAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,4BAA4B,EAAE,wBAAwB,CAAC;AACjE,oBAAA,OAAO,EAAE,CAAC,4BAA4B,EAAE,wBAAwB;AACjE,iBAAA;;;ACJM,MAAM,2BAA2B,GAAG;IACzC,4BAA4B;IAC5B;;;ACTF;;AAEG;;;;"}
@@ -93,15 +93,15 @@ class TableDataSource extends DataSource {
93
93
  }
94
94
 
95
95
  class TableComponent {
96
- database = input(undefined, ...(ngDevMode ? [{ debugName: "database" }] : []));
97
- model = input(undefined, ...(ngDevMode ? [{ debugName: "model" }] : []));
98
- hasFilterInput = input(true, ...(ngDevMode ? [{ debugName: "hasFilterInput" }] : []));
96
+ database = input(undefined, ...(ngDevMode ? [{ debugName: "database" }] : /* istanbul ignore next */ []));
97
+ model = input(undefined, ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
98
+ hasFilterInput = input(true, ...(ngDevMode ? [{ debugName: "hasFilterInput" }] : /* istanbul ignore next */ []));
99
99
  displayedColumns;
100
100
  dataSource;
101
101
  selection = new SelectionModel(true, []);
102
102
  select = output();
103
- filter = viewChild('filter', ...(ngDevMode ? [{ debugName: "filter" }] : []));
104
- sort = viewChild(MatSort, ...(ngDevMode ? [{ debugName: "sort" }] : []));
103
+ filter = viewChild('filter', ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
104
+ sort = viewChild(MatSort, ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
105
105
  ngOnInit() {
106
106
  const model = this.model();
107
107
  this.dataSource = new TableDataSource(this.database(), model, this.sort());
@@ -159,10 +159,10 @@ class TableComponent {
159
159
  event.stopPropagation();
160
160
  action.click(row);
161
161
  }
162
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
163
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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" }] });
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" }] });
164
164
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: TableComponent, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TableComponent, decorators: [{
166
166
  type: Component,
167
167
  args: [{ selector: 'igo-table', imports: [
168
168
  MatFormFieldModule,
@@ -187,11 +187,11 @@ class IgoTableModule {
187
187
  providers: []
188
188
  };
189
189
  }
190
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
191
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoTableModule, imports: [TableComponent], exports: [TableComponent] });
192
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoTableModule, imports: [TableComponent] });
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] });
193
193
  }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoTableModule, decorators: [{
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoTableModule, decorators: [{
195
195
  type: NgModule,
196
196
  args: [{
197
197
  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[] {\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 );\n const propertyB: number | string = ObjectUtils.resolve(\n b,\n this._sort.active\n );\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,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;AAUxC,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,KAAA;AAXV,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK;IACjC;IACA,IAAI,MAAM,CAAC,MAAc,EAAA;AACvB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;IACjC;AACQ,IAAA,aAAa,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC;AAE/C,IAAA,WAAA,CACU,SAAwB,EACxB,MAAkB,EAClB,KAAc,EAAA;AAEtB,QAAA,KAAK,EAAE;QAJC,IAAA,CAAA,SAAS,GAA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AAA,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK;IAC9B;AAEA,IAAA,WAAA,CAAY,IAAK,EAAA;QACf,IAAI,IAAI,EAAE;AACR,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B;IACF;AAEA,IAAA,GAAG,CAAC,IAAI,EAAA;AACN,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B;AAEA,IAAA,GAAG,CAAC,IAAI,EAAA;QACN,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACpC,QAAA,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;AACrB,QAAA,IAAI,CAAC,GAAG,CAAC,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, 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;AA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,GAAG,CAAC,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;;;;"}
@@ -11,11 +11,11 @@ import { combineLatest } from 'rxjs';
11
11
  import { startWith } from 'rxjs/operators';
12
12
 
13
13
  class TimepickerComponent {
14
- value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
15
- hourInputLabel = input('Hour', ...(ngDevMode ? [{ debugName: "hourInputLabel" }] : []));
16
- minuteInputLabel = input('Minute', ...(ngDevMode ? [{ debugName: "minuteInputLabel" }] : []));
17
- minHour = input(undefined, ...(ngDevMode ? [{ debugName: "minHour" }] : []));
18
- maxHour = input(undefined, ...(ngDevMode ? [{ debugName: "maxHour" }] : []));
14
+ value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
15
+ hourInputLabel = input('Hour', ...(ngDevMode ? [{ debugName: "hourInputLabel" }] : /* istanbul ignore next */ []));
16
+ minuteInputLabel = input('Minute', ...(ngDevMode ? [{ debugName: "minuteInputLabel" }] : /* istanbul ignore next */ []));
17
+ minHour = input(undefined, ...(ngDevMode ? [{ debugName: "minHour" }] : /* istanbul ignore next */ []));
18
+ maxHour = input(undefined, ...(ngDevMode ? [{ debugName: "maxHour" }] : /* istanbul ignore next */ []));
19
19
  set disabled(value) {
20
20
  this._disabled = value;
21
21
  this.setDisabledState();
@@ -25,7 +25,7 @@ class TimepickerComponent {
25
25
  }
26
26
  _disabled = false;
27
27
  /** interval in minutes*/
28
- interval = input(1, ...(ngDevMode ? [{ debugName: "interval" }] : []));
28
+ interval = input(1, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
29
29
  valueChange = output();
30
30
  hourFormControl;
31
31
  minuteFormControl;
@@ -82,10 +82,10 @@ class TimepickerComponent {
82
82
  ? control.disable({ emitEvent: false })
83
83
  : control.enable({ emitEvent: false });
84
84
  }
85
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: TimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
86
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: TimepickerComponent, isStandalone: true, selector: "igo-timepicker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourInputLabel: { classPropertyName: "hourInputLabel", publicName: "hourInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minuteInputLabel: { classPropertyName: "minuteInputLabel", publicName: "minuteInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{display:flex;gap:8px;align-items:center}:host .hour-input,:host .minute-input{width:84px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
86
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: TimepickerComponent, isStandalone: true, selector: "igo-timepicker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourInputLabel: { classPropertyName: "hourInputLabel", publicName: "hourInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minuteInputLabel: { classPropertyName: "minuteInputLabel", publicName: "minuteInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{display:flex;gap:8px;align-items:center}:host .hour-input,:host .minute-input{width:84px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
87
87
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: TimepickerComponent, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TimepickerComponent, decorators: [{
89
89
  type: Component,
90
90
  args: [{ selector: 'igo-timepicker', imports: [
91
91
  FormsModule,
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-timepicker.mjs","sources":["../../../packages/common/timepicker/src/timepicker.component.ts","../../../packages/common/timepicker/src/timepicker.component.html","../../../packages/common/timepicker/src/igo2-common-timepicker.ts"],"sourcesContent":["import { Component, Input, OnInit, input, output } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { TimeFrame, isTimeFrame, resolveDate } from '@igo2/utils';\n\nimport { combineLatest } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\n@Component({\n selector: 'igo-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n imports: [\n FormsModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatSelectModule\n ]\n})\nexport class TimepickerComponent implements OnInit {\n readonly value = input<Date | TimeFrame>(undefined);\n readonly hourInputLabel = input<string>('Hour');\n readonly minuteInputLabel = input<string>('Minute');\n\n readonly minHour = input<number | undefined>(undefined);\n readonly maxHour = input<number | undefined>(undefined);\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = value;\n this.setDisabledState();\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /** interval in minutes*/\n readonly interval = input<number>(1);\n readonly valueChange = output<{\n hour: number;\n minute: number;\n }>();\n\n hourFormControl: FormControl<number>;\n minuteFormControl: FormControl<number>;\n\n get hours(): number[] {\n const step = this.interval() >= 60 ? this.interval() / 60 : 1;\n const fullHours = Array.from(\n { length: Math.ceil(24 / step) },\n (_, i) => i * step\n );\n\n return fullHours.filter((hour) => {\n const minHour = this.minHour();\n if (minHour !== undefined && hour < minHour) return false;\n const maxHour = this.maxHour();\n if (maxHour !== undefined && hour > maxHour) return false;\n return true;\n });\n }\n\n get minutes(): number[] {\n const minuteStep = this.interval() < 60 ? this.interval() : 0;\n return minuteStep > 0\n ? Array.from(\n { length: Math.ceil(60 / minuteStep) },\n (_, i) => i * minuteStep\n )\n : [0];\n }\n\n ngOnInit(): void {\n const date = resolveDate(this.value() ?? new Date());\n const hours = date.getHours();\n const minutes = date.getMinutes();\n this.hourFormControl = new FormControl({\n value: hours,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n this.minuteFormControl = new FormControl({\n value: minutes,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n\n combineLatest([\n this.hourFormControl.valueChanges.pipe(startWith(hours)),\n this.minuteFormControl.valueChanges.pipe(startWith(minutes))\n ]).subscribe(([hour, minute]) => this.valueChange.emit({ hour, minute }));\n }\n\n reset(value: Date | TimeFrame): void {\n const date = resolveDate(value);\n this.hourFormControl.setValue(date.getHours(), { emitEvent: false });\n this.minuteFormControl.setValue(date.getMinutes(), { emitEvent: false });\n }\n\n private setDisabledState(): void {\n if (!this.hourFormControl || !this.minuteFormControl) return;\n const disabled = this.disabled || isTimeFrame(this.value());\n this.toggleDisabled(this.hourFormControl, disabled);\n this.toggleDisabled(this.minuteFormControl, disabled);\n }\n\n private toggleDisabled(control: FormControl, disabled: boolean): void {\n disabled\n ? control.disable({ emitEvent: false })\n : control.enable({ emitEvent: false });\n }\n}\n","<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,mBAAmB,CAAA;AACrB,IAAA,KAAK,GAAG,KAAK,CAAmB,SAAS,iDAAC;AAC1C,IAAA,cAAc,GAAG,KAAK,CAAS,MAAM,0DAAC;AACtC,IAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,4DAAC;AAE1C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,mDAAC;AAC9C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,mDAAC;IAEvD,IACI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;QACtB,IAAI,CAAC,gBAAgB,EAAE;IACzB;AACA,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACQ,SAAS,GAAG,KAAK;;AAGhB,IAAA,QAAQ,GAAG,KAAK,CAAS,CAAC,oDAAC;IAC3B,WAAW,GAAG,MAAM,EAGzB;AAEJ,IAAA,eAAe;AACf,IAAA,iBAAiB;AAEjB,IAAA,IAAI,KAAK,GAAA;QACP,MAA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,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACnB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,kBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,eAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,aAAA,EAAA,OAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,2BAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,YAAA,EAAA,0BAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGN,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EAGjB;wBACP,WAAW;wBACX,kBAAkB;wBAClB,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,8rBAAA,EAAA,MAAA,EAAA,CAAA,mGAAA,CAAA,EAAA;;sBAUA;;;AE7BH;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-timepicker.mjs","sources":["../../../packages/common/timepicker/src/timepicker.component.ts","../../../packages/common/timepicker/src/timepicker.component.html","../../../packages/common/timepicker/src/igo2-common-timepicker.ts"],"sourcesContent":["import { Component, Input, OnInit, input, output } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { TimeFrame, isTimeFrame, resolveDate } from '@igo2/utils';\n\nimport { combineLatest } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\n@Component({\n selector: 'igo-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n imports: [\n FormsModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatSelectModule\n ]\n})\nexport class TimepickerComponent implements OnInit {\n readonly value = input<Date | TimeFrame>(undefined);\n readonly hourInputLabel = input<string>('Hour');\n readonly minuteInputLabel = input<string>('Minute');\n\n readonly minHour = input<number | undefined>(undefined);\n readonly maxHour = input<number | undefined>(undefined);\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = value;\n this.setDisabledState();\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /** interval in minutes*/\n readonly interval = input<number>(1);\n readonly valueChange = output<{\n hour: number;\n minute: number;\n }>();\n\n hourFormControl: FormControl<number>;\n minuteFormControl: FormControl<number>;\n\n get hours(): number[] {\n const step = this.interval() >= 60 ? this.interval() / 60 : 1;\n const fullHours = Array.from(\n { length: Math.ceil(24 / step) },\n (_, i) => i * step\n );\n\n return fullHours.filter((hour) => {\n const minHour = this.minHour();\n if (minHour !== undefined && hour < minHour) return false;\n const maxHour = this.maxHour();\n if (maxHour !== undefined && hour > maxHour) return false;\n return true;\n });\n }\n\n get minutes(): number[] {\n const minuteStep = this.interval() < 60 ? this.interval() : 0;\n return minuteStep > 0\n ? Array.from(\n { length: Math.ceil(60 / minuteStep) },\n (_, i) => i * minuteStep\n )\n : [0];\n }\n\n ngOnInit(): void {\n const date = resolveDate(this.value() ?? new Date());\n const hours = date.getHours();\n const minutes = date.getMinutes();\n this.hourFormControl = new FormControl({\n value: hours,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n this.minuteFormControl = new FormControl({\n value: minutes,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n\n combineLatest([\n this.hourFormControl.valueChanges.pipe(startWith(hours)),\n this.minuteFormControl.valueChanges.pipe(startWith(minutes))\n ]).subscribe(([hour, minute]) => this.valueChange.emit({ hour, minute }));\n }\n\n reset(value: Date | TimeFrame): void {\n const date = resolveDate(value);\n this.hourFormControl.setValue(date.getHours(), { emitEvent: false });\n this.minuteFormControl.setValue(date.getMinutes(), { emitEvent: false });\n }\n\n private setDisabledState(): void {\n if (!this.hourFormControl || !this.minuteFormControl) return;\n const disabled = this.disabled || isTimeFrame(this.value());\n this.toggleDisabled(this.hourFormControl, disabled);\n this.toggleDisabled(this.minuteFormControl, disabled);\n }\n\n private toggleDisabled(control: FormControl, disabled: boolean): void {\n disabled\n ? control.disable({ emitEvent: false })\n : control.enable({ emitEvent: false });\n }\n}\n","<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,mBAAmB,CAAA;AACrB,IAAA,KAAK,GAAG,KAAK,CAAmB,SAAS,4EAAC;AAC1C,IAAA,cAAc,GAAG,KAAK,CAAS,MAAM,qFAAC;AACtC,IAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,uFA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