@flywheel-io/vision 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/components/dialog/choice-dialog.component.d.ts +8 -5
  2. package/elements/README.md +20 -0
  3. package/elements/package.json +5 -5
  4. package/{esm2015/components/button/button.component.js → esm2020/components/button/button.component.mjs} +6 -11
  5. package/{esm2015/components/button/button.module.js → esm2020/components/button/button.module.mjs} +4 -4
  6. package/{esm2015/components/button-group/button-group.component.js → esm2020/components/button-group/button-group.component.mjs} +6 -12
  7. package/{esm2015/components/button-group/button-group.module.js → esm2020/components/button-group/button-group.module.mjs} +4 -4
  8. package/esm2020/components/dialog/choice-dialog.component.mjs +90 -0
  9. package/{esm2015/components/dialog/confirm-dialog.component.js → esm2020/components/dialog/confirm-dialog.component.mjs} +4 -4
  10. package/{esm2015/components/dialog/dialog.module.js → esm2020/components/dialog/dialog.module.mjs} +4 -4
  11. package/esm2020/components/dialog/dialog.service.mjs +72 -0
  12. package/{esm2015/components/dialog/error-dialog.component.js → esm2020/components/dialog/error-dialog.component.mjs} +4 -4
  13. package/esm2020/components/dialog/portal-dialog.component.mjs +112 -0
  14. package/{esm2015/components/icon/icon.component.js → esm2020/components/icon/icon.component.mjs} +3 -3
  15. package/{esm2015/components/icon/icon.module.js → esm2020/components/icon/icon.module.mjs} +4 -4
  16. package/esm2020/components/notification/notification/notification.component.mjs +69 -0
  17. package/{esm2015/components/notification/notification/notification.model.js → esm2020/components/notification/notification/notification.model.mjs} +0 -0
  18. package/esm2020/components/notification/notification-container/notification-container.component.mjs +86 -0
  19. package/{esm2015/components/notification/notification-timer.service.js → esm2020/components/notification/notification-timer.service.mjs} +0 -0
  20. package/{esm2015/components/notification/notification.module.js → esm2020/components/notification/notification.module.mjs} +4 -4
  21. package/{esm2015/components/notification/notification.service.js → esm2020/components/notification/notification.service.mjs} +3 -3
  22. package/{esm2015/components/popover/popover-trigger.component.js → esm2020/components/popover/popover-trigger.component.mjs} +3 -3
  23. package/esm2020/components/popover/popover-trigger.directive.mjs +133 -0
  24. package/esm2020/components/popover/popover.component.mjs +29 -0
  25. package/{esm2015/components/popover/popover.module.js → esm2020/components/popover/popover.module.mjs} +4 -4
  26. package/{esm2015/components/shared/pipes/pipes.module.js → esm2020/components/shared/pipes/pipes.module.mjs} +4 -4
  27. package/{esm2015/components/shared/pipes/translate.pipe.js → esm2020/components/shared/pipes/translate.pipe.mjs} +3 -3
  28. package/{esm2015/components/shared/pipes/trusthtml.pipe.js → esm2020/components/shared/pipes/trusthtml.pipe.mjs} +3 -3
  29. package/{esm2015/components/shared/translation.service.js → esm2020/components/shared/translation.service.mjs} +3 -3
  30. package/esm2020/components/table/table.component.mjs +179 -0
  31. package/{esm2015/components/table/table.module.js → esm2020/components/table/table.module.mjs} +4 -4
  32. package/{esm2015/elements/elements.js → esm2020/elements/elements.mjs} +4 -4
  33. package/{esm2015/elements/flywheel-io-vision-elements.js → esm2020/elements/flywheel-io-vision-elements.mjs} +0 -0
  34. package/{esm2015/elements/polyfills.js → esm2020/elements/polyfills.mjs} +0 -0
  35. package/{esm2015/elements/public-api.js → esm2020/elements/public-api.mjs} +0 -0
  36. package/{esm2015/flywheel-io-vision.js → esm2020/flywheel-io-vision.mjs} +0 -0
  37. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  38. package/fesm2015/{flywheel-io-vision-elements.js → flywheel-io-vision-elements.mjs} +5 -5
  39. package/fesm2015/flywheel-io-vision-elements.mjs.map +1 -0
  40. package/fesm2015/{flywheel-io-vision.js → flywheel-io-vision.mjs} +148 -165
  41. package/fesm2015/flywheel-io-vision.mjs.map +1 -0
  42. package/fesm2020/flywheel-io-vision-elements.mjs +85 -0
  43. package/fesm2020/flywheel-io-vision-elements.mjs.map +1 -0
  44. package/fesm2020/flywheel-io-vision.mjs +1392 -0
  45. package/fesm2020/flywheel-io-vision.mjs.map +1 -0
  46. package/package.json +43 -18
  47. package/scss/atoms/ghost.scss +30 -0
  48. package/scss/config/theme.scss +6 -6
  49. package/scss/material/overrides.scss +6 -1
  50. package/styles.css +156 -94
  51. package/styles.scss +8 -9
  52. package/bundles/flywheel-io-vision-elements.umd.js +0 -449
  53. package/bundles/flywheel-io-vision-elements.umd.js.map +0 -1
  54. package/bundles/flywheel-io-vision.umd.js +0 -1800
  55. package/bundles/flywheel-io-vision.umd.js.map +0 -1
  56. package/esm2015/components/dialog/choice-dialog.component.js +0 -78
  57. package/esm2015/components/dialog/dialog.service.js +0 -69
  58. package/esm2015/components/dialog/portal-dialog.component.js +0 -113
  59. package/esm2015/components/notification/notification/notification.component.js +0 -78
  60. package/esm2015/components/notification/notification-container/notification-container.component.js +0 -93
  61. package/esm2015/components/popover/popover-trigger.directive.js +0 -135
  62. package/esm2015/components/popover/popover.component.js +0 -35
  63. package/esm2015/components/table/table.component.js +0 -184
  64. package/fesm2015/flywheel-io-vision-elements.js.map +0 -1
  65. package/fesm2015/flywheel-io-vision.js.map +0 -1
@@ -0,0 +1,1392 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewEncapsulation, Input, NgModule, Inject, Pipe, Injectable, SimpleChange, ChangeDetectionStrategy, EventEmitter, Output, HostBinding, Directive, TemplateRef, ViewChild } from '@angular/core';
3
+ import * as i1 from '@angular/material/button';
4
+ import { MatButtonModule } from '@angular/material/button';
5
+ import * as i3 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import * as i4 from '@angular/material/dialog';
8
+ import { MAT_DIALOG_DATA, MatDialogModule, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
9
+ import * as i2 from '@angular/material/icon';
10
+ import { MatIconModule } from '@angular/material/icon';
11
+ import * as i1$1 from '@angular/platform-browser';
12
+ import { of, Subject, BehaviorSubject, Subscription } from 'rxjs';
13
+ import * as i5 from '@angular/cdk/portal';
14
+ import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
15
+ import { takeUntil, debounceTime } from 'rxjs/operators';
16
+ import * as i1$2 from '@angular/cdk/overlay';
17
+ import { Overlay } from '@angular/cdk/overlay';
18
+ import * as i9 from '@angular/forms';
19
+ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
20
+ import * as i6 from '@angular/material/paginator';
21
+ import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
22
+ import * as i5$1 from '@angular/material/sort';
23
+ import { MatSort, MatSortModule } from '@angular/material/sort';
24
+ import * as i1$3 from '@angular/material/table';
25
+ import { MatTableDataSource, MatTableModule } from '@angular/material/table';
26
+ import * as i2$1 from '@angular/material/form-field';
27
+ import * as i3$1 from '@angular/material/select';
28
+ import { MatSelectModule } from '@angular/material/select';
29
+ import * as i4$1 from '@angular/material/core';
30
+ import * as i8 from '@angular/material/input';
31
+ import { MatInputModule } from '@angular/material/input';
32
+
33
+ class FwButtonGroupComponent {
34
+ constructor() {
35
+ this.layout = 'basic';
36
+ this.size = 'medium';
37
+ }
38
+ }
39
+ FwButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
40
+ FwButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwButtonGroupComponent, selector: "fw-button-group", inputs: { layout: "layout", size: "size" }, host: { properties: { "class.small": "size === \"small\"", "class.medium": "size === \"medium\"", "class.large": "size === \"large\"", "class.compact": "layout === \"compact\"" }, classAttribute: "fw-button-group" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: ["fw-button-group.fw-button-group{border-radius:4px;display:inline-flex;align-items:stretch}fw-button-group.fw-button-group.compact button{line-height:24px;height:24px}fw-button-group.fw-button-group.small button{font-size:12px}fw-button-group.fw-button-group.medium button{font-size:14px}fw-button-group.fw-button-group.large button{font-size:18px}fw-button-group.fw-button-group button{min-width:0;margin:0!important;border-radius:0}fw-button-group.fw-button-group>fw-button:first-of-type>button,fw-button-group.fw-button-group>button:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}fw-button-group.fw-button-group>fw-button:last-of-type>button,fw-button-group.fw-button-group>button:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}fw-button-group.fw-button-group>fw-button[ng-reflect-type=stroked]>button,fw-button-group.fw-button-group>fw-button[ng-reflect-type=stroked]+fw-button[ng-reflect-type=stroked]>button,fw-button-group.fw-button-group>fw-button[type=stroked]>button,fw-button-group.fw-button-group>fw-button[type=stroked]+fw-button[type=stroked]>button,fw-button-group.fw-button-group>button.mat-stroked-button,fw-button-group.fw-button-group>button.mat-stroked-button+button.mat-stroke-button{border-right-width:0}fw-button-group.fw-button-group>fw-button[ng-reflect-type=stroked]:last-of-type>button,fw-button-group.fw-button-group>fw-button[type=stroked]:last-of-type>button,fw-button-group.fw-button-group>button.mat-stroked-button:last-of-type{border-right-width:1px!important}fw-button-group.fw-button-group>fw-button:not([ng-reflect-type=stroked])+fw-button[ng-reflect-type=stroked]>button,fw-button-group.fw-button-group>fw-button:not([type=stroked])+fw-button[type=stroked]>button,fw-button-group.fw-button-group>button:not(.mat-stroked-button)+button.mat-stroked-button{border-left-width:0}\n"], encapsulation: i0.ViewEncapsulation.None });
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonGroupComponent, decorators: [{
42
+ type: Component,
43
+ args: [{ host: {
44
+ 'class': 'fw-button-group',
45
+ '[class.small]': 'size === "small"',
46
+ '[class.medium]': 'size === "medium"',
47
+ '[class.large]': 'size === "large"',
48
+ '[class.compact]': 'layout === "compact"',
49
+ }, selector: 'fw-button-group', template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: ["fw-button-group.fw-button-group{border-radius:4px;display:inline-flex;align-items:stretch}fw-button-group.fw-button-group.compact button{line-height:24px;height:24px}fw-button-group.fw-button-group.small button{font-size:12px}fw-button-group.fw-button-group.medium button{font-size:14px}fw-button-group.fw-button-group.large button{font-size:18px}fw-button-group.fw-button-group button{min-width:0;margin:0!important;border-radius:0}fw-button-group.fw-button-group>fw-button:first-of-type>button,fw-button-group.fw-button-group>button:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}fw-button-group.fw-button-group>fw-button:last-of-type>button,fw-button-group.fw-button-group>button:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}fw-button-group.fw-button-group>fw-button[ng-reflect-type=stroked]>button,fw-button-group.fw-button-group>fw-button[ng-reflect-type=stroked]+fw-button[ng-reflect-type=stroked]>button,fw-button-group.fw-button-group>fw-button[type=stroked]>button,fw-button-group.fw-button-group>fw-button[type=stroked]+fw-button[type=stroked]>button,fw-button-group.fw-button-group>button.mat-stroked-button,fw-button-group.fw-button-group>button.mat-stroked-button+button.mat-stroke-button{border-right-width:0}fw-button-group.fw-button-group>fw-button[ng-reflect-type=stroked]:last-of-type>button,fw-button-group.fw-button-group>fw-button[type=stroked]:last-of-type>button,fw-button-group.fw-button-group>button.mat-stroked-button:last-of-type{border-right-width:1px!important}fw-button-group.fw-button-group>fw-button:not([ng-reflect-type=stroked])+fw-button[ng-reflect-type=stroked]>button,fw-button-group.fw-button-group>fw-button:not([type=stroked])+fw-button[type=stroked]>button,fw-button-group.fw-button-group>button:not(.mat-stroked-button)+button.mat-stroked-button{border-left-width:0}\n"] }]
50
+ }], propDecorators: { layout: [{
51
+ type: Input
52
+ }], size: [{
53
+ type: Input
54
+ }] } });
55
+
56
+ class FwButtonGroupModule {
57
+ }
58
+ FwButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
59
+ FwButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonGroupModule, declarations: [FwButtonGroupComponent], exports: [FwButtonGroupComponent] });
60
+ FwButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonGroupModule });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonGroupModule, decorators: [{
62
+ type: NgModule,
63
+ args: [{
64
+ exports: [
65
+ FwButtonGroupComponent,
66
+ ],
67
+ declarations: [
68
+ FwButtonGroupComponent,
69
+ ],
70
+ entryComponents: [
71
+ FwButtonGroupComponent,
72
+ ]
73
+ }]
74
+ }] });
75
+
76
+ class FwButtonComponent {
77
+ constructor() {
78
+ this.layout = 'basic';
79
+ this.size = 'medium';
80
+ this.type = 'basic';
81
+ }
82
+ }
83
+ FwButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
84
+ FwButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwButtonComponent, selector: "fw-button", inputs: { color: "color", layout: "layout", size: "size", type: "type" }, host: { properties: { "class.small": "size === \"small\"", "class.medium": "size === \"medium\"", "class.large": "size === \"large\"", "class.compact": "layout === \"compact\"" }, classAttribute: "fw-button" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <button *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n <button *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n <button *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n <button *ngSwitchDefault mat-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n</ng-container>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host.compact>button{line-height:24px}:host.small{font-size:12px}:host.medium{font-size:14px}:host.large{font-size:18px}button{font-size:inherit}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonComponent, decorators: [{
86
+ type: Component,
87
+ args: [{ host: {
88
+ 'class': 'fw-button',
89
+ '[class.small]': 'size === "small"',
90
+ '[class.medium]': 'size === "medium"',
91
+ '[class.large]': 'size === "large"',
92
+ '[class.compact]': 'layout === "compact"',
93
+ }, selector: 'fw-button', template: "<ng-container [ngSwitch]=\"type\">\n <button *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n <button *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n <button *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n <button *ngSwitchDefault mat-button [color]=\"color\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n</ng-container>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host.compact>button{line-height:24px}:host.small{font-size:12px}:host.medium{font-size:14px}:host.large{font-size:18px}button{font-size:inherit}\n"] }]
94
+ }], propDecorators: { color: [{
95
+ type: Input
96
+ }], layout: [{
97
+ type: Input
98
+ }], size: [{
99
+ type: Input
100
+ }], type: [{
101
+ type: Input
102
+ }] } });
103
+
104
+ class FwButtonModule {
105
+ }
106
+ FwButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
107
+ FwButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonModule, declarations: [FwButtonComponent], imports: [CommonModule,
108
+ MatButtonModule], exports: [FwButtonComponent] });
109
+ FwButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonModule, imports: [[
110
+ CommonModule,
111
+ MatButtonModule,
112
+ ]] });
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwButtonModule, decorators: [{
114
+ type: NgModule,
115
+ args: [{
116
+ imports: [
117
+ CommonModule,
118
+ MatButtonModule,
119
+ ],
120
+ exports: [
121
+ FwButtonComponent,
122
+ ],
123
+ declarations: [
124
+ FwButtonComponent,
125
+ ],
126
+ entryComponents: [
127
+ FwButtonComponent,
128
+ ],
129
+ }]
130
+ }] });
131
+
132
+ class FwChoiceDialog {
133
+ constructor(data) {
134
+ this.data = data;
135
+ this.alignActions = this.data.alignActions
136
+ ? this.data.alignActions === 'start'
137
+ ? null
138
+ : this.data.alignActions
139
+ : 'center';
140
+ this.choices = this.data.choices;
141
+ this.closeValue = this.data.closeValue;
142
+ this.content = this.data.content;
143
+ this.title = this.data.title;
144
+ }
145
+ get showCloseButton() {
146
+ return 'closeValue' in this.data;
147
+ }
148
+ getTestId(choice) {
149
+ return choice.testId || `${String(choice.label ?? choice.value).toLowerCase()}-button`;
150
+ }
151
+ }
152
+ FwChoiceDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwChoiceDialog, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
153
+ FwChoiceDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwChoiceDialog, selector: "fw-choice-dialog", host: { attributes: { "test-id": "choice-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0, template: `
154
+ <h1 mat-dialog-title *ngIf="title">{{ title }}</h1>
155
+ <button *ngIf="showCloseButton" test-id="dialog-close-corner" mat-icon-button
156
+ [mat-dialog-close]="closeValue" [class]="{'mat-dialog-close-button': true, 'no-title': !title}">
157
+ <mat-icon>close</mat-icon>
158
+ </button>
159
+ <div mat-dialog-content>{{ content }}</div>
160
+ <div mat-dialog-actions [align]="alignActions">
161
+ <ng-container *ngFor="let choice of choices" [ngSwitch]="choice.variant">
162
+ <button *ngSwitchCase="'raised'" mat-raised-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
163
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
164
+ <button *ngSwitchCase="'stroked'" mat-stroked-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
165
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
166
+ <button *ngSwitchCase="'flat'" mat-flat-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
167
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
168
+ <ng-container *ngSwitchDefault>
169
+ <button *ngIf="choice.color" mat-flat-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
170
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
171
+ <button *ngIf="!choice.color" mat-stroked-button [attr.test-id]="getTestId(choice)"
172
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
173
+ </ng-container>
174
+ </ng-container>
175
+ </div>
176
+ `, isInline: true, components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwChoiceDialog, decorators: [{
178
+ type: Component,
179
+ args: [{
180
+ host: {
181
+ class: 'mat-dialog-component',
182
+ 'test-id': 'choice-dialog',
183
+ },
184
+ selector: 'fw-choice-dialog',
185
+ template: `
186
+ <h1 mat-dialog-title *ngIf="title">{{ title }}</h1>
187
+ <button *ngIf="showCloseButton" test-id="dialog-close-corner" mat-icon-button
188
+ [mat-dialog-close]="closeValue" [class]="{'mat-dialog-close-button': true, 'no-title': !title}">
189
+ <mat-icon>close</mat-icon>
190
+ </button>
191
+ <div mat-dialog-content>{{ content }}</div>
192
+ <div mat-dialog-actions [align]="alignActions">
193
+ <ng-container *ngFor="let choice of choices" [ngSwitch]="choice.variant">
194
+ <button *ngSwitchCase="'raised'" mat-raised-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
195
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
196
+ <button *ngSwitchCase="'stroked'" mat-stroked-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
197
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
198
+ <button *ngSwitchCase="'flat'" mat-flat-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
199
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
200
+ <ng-container *ngSwitchDefault>
201
+ <button *ngIf="choice.color" mat-flat-button [color]="choice.color" [attr.test-id]="getTestId(choice)"
202
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
203
+ <button *ngIf="!choice.color" mat-stroked-button [attr.test-id]="getTestId(choice)"
204
+ [mat-dialog-close]="choice.value">{{ choice.label }}</button>
205
+ </ng-container>
206
+ </ng-container>
207
+ </div>
208
+ `,
209
+ }]
210
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
211
+ type: Inject,
212
+ args: [MAT_DIALOG_DATA]
213
+ }] }]; } });
214
+
215
+ class TrustHtmlPipe {
216
+ constructor(sanitizer) {
217
+ this.sanitizer = sanitizer;
218
+ }
219
+ transform(html) {
220
+ return this.sanitizer.bypassSecurityTrustHtml(html);
221
+ }
222
+ }
223
+ TrustHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TrustHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
224
+ TrustHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TrustHtmlPipe, name: "trusthtml" });
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TrustHtmlPipe, decorators: [{
226
+ type: Pipe,
227
+ args: [{
228
+ name: 'trusthtml',
229
+ pure: true,
230
+ }]
231
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
232
+
233
+ class TranslationService {
234
+ }
235
+ /**
236
+ * Very basic i18n implementation. Consumer apps can provide their own implementation of TranslationService to override.
237
+ */
238
+ class MinimalTranslationService {
239
+ getMessage(key, silent) {
240
+ return of(MinimalTranslationService.messages[key]);
241
+ }
242
+ }
243
+ MinimalTranslationService.messages = {
244
+ 'common.actions.close': 'Close',
245
+ 'confirmDialog.body': 'Are you sure?',
246
+ 'confirmDialog.no': 'No',
247
+ 'confirmDialog.yes': 'Yes',
248
+ };
249
+ MinimalTranslationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MinimalTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
250
+ MinimalTranslationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MinimalTranslationService });
251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MinimalTranslationService, decorators: [{
252
+ type: Injectable
253
+ }] });
254
+
255
+ /**
256
+ * Translate a message given a nested key to a location in the loaded locale copy.
257
+ */
258
+ class TranslatePipe {
259
+ constructor(cdr, translationService) {
260
+ this.cdr = cdr;
261
+ this.translationService = translationService;
262
+ this.subscriptions = {};
263
+ this.messages = {};
264
+ }
265
+ ngOnDestroy() {
266
+ for (const subscription of Object.values(this.subscriptions)) {
267
+ subscription.unsubscribe();
268
+ }
269
+ }
270
+ transform(key, silent = false) {
271
+ if (!(key in this.subscriptions)) {
272
+ this.subscriptions[key] = this.translationService.getMessage(key, silent).subscribe(message => {
273
+ this.messages[key] = message;
274
+ // trigger change detection to support components with ChangeDetectionStrategy.OnPush
275
+ this.cdr.markForCheck();
276
+ });
277
+ }
278
+ return this.messages[key] || '';
279
+ }
280
+ }
281
+ TranslatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TranslatePipe, deps: [{ token: i0.ChangeDetectorRef }, { token: TranslationService }], target: i0.ɵɵFactoryTarget.Pipe });
282
+ TranslatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TranslatePipe, name: "translate", pure: false });
283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TranslatePipe, decorators: [{
284
+ type: Pipe,
285
+ args: [{
286
+ name: 'translate',
287
+ pure: false,
288
+ }]
289
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TranslationService }]; } });
290
+
291
+ class FwConfirmDialog {
292
+ constructor(data) {
293
+ this.data = data;
294
+ this.title = this.data.title;
295
+ this.content = this.data.content;
296
+ this.html = this.data.html;
297
+ }
298
+ }
299
+ FwConfirmDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwConfirmDialog, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
300
+ FwConfirmDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwConfirmDialog, selector: "fw-confirm-dialog", host: { attributes: { "test-id": "confirm-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0, template: `
301
+ <h1 mat-dialog-title *ngIf="title">{{ title }}</h1>
302
+ <div mat-dialog-content *ngIf="html" class="markup" [innerHTML]="html | trusthtml"></div>
303
+ <div mat-dialog-content *ngIf="!html">{{ content || ('confirmDialog.body' | translate ) }}</div>
304
+ <div mat-dialog-actions align="center">
305
+ <button test-id="no-button" mat-stroked-button [mat-dialog-close]="false">{{ 'confirmDialog.no' | translate }}</button>
306
+ <button test-id="yes-button" mat-flat-button color="primary" [mat-dialog-close]="true">{{ 'confirmDialog.yes' | translate }}</button>
307
+ </div>
308
+ `, isInline: true, styles: ["[mat-dialog-content]{text-align:center}[mat-dialog-content].markup{text-align:inherit}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "trusthtml": TrustHtmlPipe, "translate": TranslatePipe } });
309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwConfirmDialog, decorators: [{
310
+ type: Component,
311
+ args: [{
312
+ host: {
313
+ class: 'mat-dialog-component',
314
+ 'test-id': 'confirm-dialog',
315
+ },
316
+ selector: 'fw-confirm-dialog',
317
+ template: `
318
+ <h1 mat-dialog-title *ngIf="title">{{ title }}</h1>
319
+ <div mat-dialog-content *ngIf="html" class="markup" [innerHTML]="html | trusthtml"></div>
320
+ <div mat-dialog-content *ngIf="!html">{{ content || ('confirmDialog.body' | translate ) }}</div>
321
+ <div mat-dialog-actions align="center">
322
+ <button test-id="no-button" mat-stroked-button [mat-dialog-close]="false">{{ 'confirmDialog.no' | translate }}</button>
323
+ <button test-id="yes-button" mat-flat-button color="primary" [mat-dialog-close]="true">{{ 'confirmDialog.yes' | translate }}</button>
324
+ </div>
325
+ `,
326
+ styles: [`
327
+ [mat-dialog-content] {
328
+ text-align: center;
329
+ }
330
+ [mat-dialog-content].markup {
331
+ text-align: inherit;
332
+ }
333
+ `],
334
+ }]
335
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
336
+ type: Inject,
337
+ args: [MAT_DIALOG_DATA]
338
+ }] }]; } });
339
+
340
+ class FwDialogService {
341
+ constructor(matDialog) {
342
+ this.matDialog = matDialog;
343
+ this.dialogs = [];
344
+ this.config = new Map();
345
+ }
346
+ closeAll(component) {
347
+ if (component) {
348
+ this.dialogs
349
+ .filter((el) => el.component === component)
350
+ .forEach((el) => el.ref.close());
351
+ }
352
+ else {
353
+ this.matDialog.closeAll();
354
+ }
355
+ }
356
+ open(component, config) {
357
+ const index = this.dialogs.findIndex(el => el.component === component);
358
+ let ref = null;
359
+ const baseConfig = {
360
+ multi: 'allow',
361
+ ...this.config.get(component),
362
+ };
363
+ switch (baseConfig.multi) {
364
+ case 'ignore':
365
+ // if an existing dialog of the same type doesn't exist, open one
366
+ if (index === -1) {
367
+ ref = this.matDialog.open(component, { ...baseConfig, ...config });
368
+ this.dialogs.push({ component, ref });
369
+ }
370
+ break;
371
+ case 'replace':
372
+ // if an existing dialog of the same type exists, replace it.
373
+ if (index > -1) {
374
+ this.dialogs[index].ref.close();
375
+ ref = this.matDialog.open(component, { ...baseConfig, ...config });
376
+ this.dialogs.splice(index, 1, { component, ref });
377
+ }
378
+ else {
379
+ ref = this.matDialog.open(component, { ...baseConfig, ...config });
380
+ this.dialogs.push({ component, ref });
381
+ }
382
+ break;
383
+ default:
384
+ ref = this.matDialog.open(component, { ...baseConfig, ...config });
385
+ this.dialogs.push({ component, ref });
386
+ break;
387
+ }
388
+ if (ref) {
389
+ ref.afterClosed().subscribe(() => {
390
+ // clean up open dialog reference
391
+ const index = this.dialogs.findIndex(el => el.ref === ref);
392
+ if (index >= 0) {
393
+ this.dialogs.splice(index, 1);
394
+ }
395
+ });
396
+ }
397
+ return ref;
398
+ }
399
+ registerDialog(component, config) {
400
+ this.config.set(component, config);
401
+ }
402
+ }
403
+ FwDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogService, deps: [{ token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
404
+ FwDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogService });
405
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogService, decorators: [{
406
+ type: Injectable
407
+ }], ctorParameters: function () { return [{ type: i4.MatDialog }]; } });
408
+
409
+ class FwErrorDialog {
410
+ constructor(data, ref) {
411
+ this.data = data;
412
+ this.ref = ref;
413
+ this.message = this.data.message;
414
+ this.ref.disableClose = false;
415
+ }
416
+ }
417
+ FwErrorDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwErrorDialog, deps: [{ token: MAT_DIALOG_DATA }, { token: i4.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
418
+ FwErrorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwErrorDialog, selector: "fw-error-dialog", host: { attributes: { "test-id": "error-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0, template: `
419
+ <div mat-dialog-content>{{ message }}</div>
420
+ <div mat-dialog-actions align="end">
421
+ <button test-id="close-button" mat-stroked-button mat-dialog-close>
422
+ {{ 'common.actions.close' | translate }}
423
+ </button>
424
+ </div>
425
+ `, isInline: true, components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "translate": TranslatePipe } });
426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwErrorDialog, decorators: [{
427
+ type: Component,
428
+ args: [{
429
+ host: {
430
+ class: 'mat-dialog-component',
431
+ 'test-id': 'error-dialog',
432
+ },
433
+ selector: 'fw-error-dialog',
434
+ template: `
435
+ <div mat-dialog-content>{{ message }}</div>
436
+ <div mat-dialog-actions align="end">
437
+ <button test-id="close-button" mat-stroked-button mat-dialog-close>
438
+ {{ 'common.actions.close' | translate }}
439
+ </button>
440
+ </div>
441
+ `,
442
+ }]
443
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
444
+ type: Inject,
445
+ args: [MAT_DIALOG_DATA]
446
+ }] }, { type: i4.MatDialogRef }]; } });
447
+
448
+ class FwPortalDialog {
449
+ constructor(data, viewContainerRef) {
450
+ this.data = data;
451
+ this.viewContainerRef = viewContainerRef;
452
+ this.content = this.data.content;
453
+ this.title = this.data.title;
454
+ this.destroyed$ = new Subject();
455
+ if (this.data.component) {
456
+ this.portal = new ComponentPortal(this.data.component.type, this.viewContainerRef);
457
+ }
458
+ else if (this.data.template) {
459
+ this.portal = new TemplatePortal(this.data.template, this.viewContainerRef);
460
+ }
461
+ else {
462
+ throw new Error('One of [component, template] was not provided.');
463
+ }
464
+ }
465
+ ngOnDestroy() {
466
+ this.destroyed$.next(undefined);
467
+ }
468
+ attached(ref) {
469
+ if (this.data.component) {
470
+ ref = ref;
471
+ if (this.data.component.outputs) {
472
+ for (const [key, observer] of Object.entries(this.data.component.outputs)) {
473
+ const output$ = ref[key];
474
+ if (typeof output$?.pipe === 'function' && typeof output$.subscribe === 'function') {
475
+ output$.pipe(takeUntil(this.destroyed$)).subscribe(observer);
476
+ }
477
+ }
478
+ }
479
+ if (this.data.component.inputs) {
480
+ const changes = {};
481
+ for (const [key, value] of Object.entries(this.data.component.inputs)) {
482
+ ref.instance[key] = value;
483
+ changes[key] = new SimpleChange(value, value, true);
484
+ }
485
+ ref.instance.ngOnChanges?.(changes);
486
+ ref.changeDetectorRef.markForCheck();
487
+ }
488
+ }
489
+ }
490
+ }
491
+ FwPortalDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPortalDialog, deps: [{ token: MAT_DIALOG_DATA }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
492
+ FwPortalDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwPortalDialog, selector: "fw-portal-dialog", host: { attributes: { "test-id": "portal-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0, template: `
493
+ <ng-container *ngIf="title">
494
+ <h1 mat-dialog-title>{{ title }}</h1>
495
+ <button test-id="dialog-close-corner" mat-icon-button mat-dialog-close>
496
+ <mat-icon>close</mat-icon>
497
+ </button>
498
+ </ng-container>
499
+ <mat-dialog-content>
500
+ <p *ngIf="content" class="content">{{ content }}</p>
501
+ <ng-template [cdkPortalOutlet]="portal" (attached)="attached($event)"></ng-template>
502
+ </mat-dialog-content>
503
+ <mat-dialog-actions align="end">
504
+ <button test-id="dialog-close-button" mat-stroked-button mat-dialog-close>
505
+ {{ 'common.actions.close' | translate }}
506
+ </button>
507
+ </mat-dialog-actions>
508
+ `, isInline: true, styles: [":host{min-width:200px}.content{margin-bottom:30px}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], pipes: { "translate": TranslatePipe } });
509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPortalDialog, decorators: [{
510
+ type: Component,
511
+ args: [{
512
+ host: {
513
+ class: 'mat-dialog-component',
514
+ 'test-id': 'portal-dialog',
515
+ },
516
+ selector: 'fw-portal-dialog',
517
+ template: `
518
+ <ng-container *ngIf="title">
519
+ <h1 mat-dialog-title>{{ title }}</h1>
520
+ <button test-id="dialog-close-corner" mat-icon-button mat-dialog-close>
521
+ <mat-icon>close</mat-icon>
522
+ </button>
523
+ </ng-container>
524
+ <mat-dialog-content>
525
+ <p *ngIf="content" class="content">{{ content }}</p>
526
+ <ng-template [cdkPortalOutlet]="portal" (attached)="attached($event)"></ng-template>
527
+ </mat-dialog-content>
528
+ <mat-dialog-actions align="end">
529
+ <button test-id="dialog-close-button" mat-stroked-button mat-dialog-close>
530
+ {{ 'common.actions.close' | translate }}
531
+ </button>
532
+ </mat-dialog-actions>
533
+ `,
534
+ styles: [`
535
+ :host {
536
+ min-width: 200px;
537
+ }
538
+ .content {
539
+ margin-bottom: 30px;
540
+ }
541
+ `],
542
+ }]
543
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
544
+ type: Inject,
545
+ args: [MAT_DIALOG_DATA]
546
+ }] }, { type: i0.ViewContainerRef }]; } });
547
+
548
+ const exports = [
549
+ TranslatePipe,
550
+ TrustHtmlPipe,
551
+ ];
552
+ class PipesModule {
553
+ }
554
+ PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
555
+ PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PipesModule, declarations: [TranslatePipe,
556
+ TrustHtmlPipe], exports: [TranslatePipe,
557
+ TrustHtmlPipe] });
558
+ PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PipesModule, providers: [
559
+ {
560
+ provide: TranslationService,
561
+ useClass: MinimalTranslationService,
562
+ },
563
+ ] });
564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PipesModule, decorators: [{
565
+ type: NgModule,
566
+ args: [{
567
+ declarations: exports,
568
+ exports: exports,
569
+ providers: [
570
+ {
571
+ provide: TranslationService,
572
+ useClass: MinimalTranslationService,
573
+ },
574
+ ],
575
+ }]
576
+ }] });
577
+
578
+ class FwDialogModule {
579
+ }
580
+ FwDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
581
+ FwDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogModule, declarations: [FwChoiceDialog,
582
+ FwConfirmDialog,
583
+ FwErrorDialog,
584
+ FwPortalDialog], imports: [CommonModule,
585
+ MatButtonModule,
586
+ MatDialogModule,
587
+ MatIconModule,
588
+ PipesModule,
589
+ PortalModule] });
590
+ FwDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogModule, providers: [
591
+ FwDialogService,
592
+ {
593
+ provide: MAT_DIALOG_DEFAULT_OPTIONS,
594
+ useValue: {
595
+ disableClose: true,
596
+ hasBackdrop: true,
597
+ }
598
+ }
599
+ ], imports: [[
600
+ CommonModule,
601
+ MatButtonModule,
602
+ MatDialogModule,
603
+ MatIconModule,
604
+ PipesModule,
605
+ PortalModule,
606
+ ]] });
607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwDialogModule, decorators: [{
608
+ type: NgModule,
609
+ args: [{
610
+ declarations: [
611
+ FwChoiceDialog,
612
+ FwConfirmDialog,
613
+ FwErrorDialog,
614
+ FwPortalDialog,
615
+ ],
616
+ imports: [
617
+ CommonModule,
618
+ MatButtonModule,
619
+ MatDialogModule,
620
+ MatIconModule,
621
+ PipesModule,
622
+ PortalModule,
623
+ ],
624
+ providers: [
625
+ FwDialogService,
626
+ {
627
+ provide: MAT_DIALOG_DEFAULT_OPTIONS,
628
+ useValue: {
629
+ disableClose: true,
630
+ hasBackdrop: true,
631
+ }
632
+ }
633
+ ],
634
+ }]
635
+ }] });
636
+
637
+ class FwIconComponent {
638
+ }
639
+ FwIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
640
+ FwIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwIconComponent, selector: "fw-icon", host: { attributes: { "role": "img" }, classAttribute: "vision-icon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwIconComponent, decorators: [{
642
+ type: Component,
643
+ args: [{
644
+ host: {
645
+ 'role': 'img',
646
+ 'class': 'vision-icon', // apply icon font to glyph content
647
+ },
648
+ selector: 'fw-icon',
649
+ template: '<ng-content></ng-content>',
650
+ changeDetection: ChangeDetectionStrategy.OnPush,
651
+ }]
652
+ }] });
653
+
654
+ class FwIconModule {
655
+ }
656
+ FwIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
657
+ FwIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwIconModule, declarations: [FwIconComponent], imports: [CommonModule], exports: [FwIconComponent] });
658
+ FwIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwIconModule, imports: [[
659
+ CommonModule,
660
+ ]] });
661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwIconModule, decorators: [{
662
+ type: NgModule,
663
+ args: [{
664
+ imports: [
665
+ CommonModule,
666
+ ],
667
+ exports: [
668
+ FwIconComponent,
669
+ ],
670
+ declarations: [
671
+ FwIconComponent,
672
+ ],
673
+ }]
674
+ }] });
675
+
676
+ function genId() {
677
+ return String.prototype.padStart(24, Math.floor(Math.random() * Date.now()).toString(16));
678
+ }
679
+ class FwNotificationService {
680
+ constructor() {
681
+ this.notifications$ = new BehaviorSubject([]);
682
+ this.notificationQueue = [];
683
+ }
684
+ show(notification) {
685
+ if (!notification.id) {
686
+ notification.id = genId();
687
+ }
688
+ this.notificationQueue.push(notification);
689
+ this.notifications$.next(this.notificationQueue);
690
+ }
691
+ dismiss(notificationId) {
692
+ this.notificationQueue = this.notificationQueue.filter((v) => v.id !== notificationId);
693
+ this.notifications$.next(this.notificationQueue);
694
+ }
695
+ dismissAll() {
696
+ this.notificationQueue = [];
697
+ this.notifications$.next(this.notificationQueue);
698
+ }
699
+ }
700
+ FwNotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
701
+ FwNotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationService, providedIn: 'root' });
702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationService, decorators: [{
703
+ type: Injectable,
704
+ args: [{
705
+ providedIn: 'root'
706
+ }]
707
+ }] });
708
+
709
+ class FwNotificationTimerService {
710
+ constructor() {
711
+ this.now = 0;
712
+ this.remainingDuration = 0;
713
+ }
714
+ start(duration) {
715
+ return new Promise((resolve) => {
716
+ this.remainingDuration = duration;
717
+ this.resolver = resolve;
718
+ this.continue();
719
+ });
720
+ }
721
+ stop() {
722
+ clearTimeout(this.timerId);
723
+ this.remainingDuration = 0;
724
+ }
725
+ pause() {
726
+ clearTimeout(this.timerId);
727
+ this.remainingDuration =
728
+ this.remainingDuration - new Date().getTime() - this.now;
729
+ }
730
+ continue() {
731
+ this.now = new Date().getTime();
732
+ this.timerId = window.setTimeout(() => {
733
+ this.resolver();
734
+ }, this.remainingDuration);
735
+ }
736
+ }
737
+
738
+ var FwNotificationType;
739
+ (function (FwNotificationType) {
740
+ FwNotificationType["Error"] = "error";
741
+ FwNotificationType["Info"] = "info";
742
+ FwNotificationType["Success"] = "success";
743
+ FwNotificationType["Wait"] = "wait";
744
+ FwNotificationType["Warning"] = "warning";
745
+ })(FwNotificationType || (FwNotificationType = {}));
746
+
747
+ class FwNotificationComponent {
748
+ constructor(cdr, timerService) {
749
+ this.cdr = cdr;
750
+ this.timerService = timerService;
751
+ this.notificationDuration = 9000;
752
+ this.ready = new EventEmitter();
753
+ this.dismiss = new EventEmitter();
754
+ }
755
+ get cssClass() {
756
+ let cssClass = 'fw-notification';
757
+ switch (this.notification?.type) {
758
+ case FwNotificationType.Error:
759
+ return cssClass += ' error';
760
+ case FwNotificationType.Info:
761
+ return cssClass += ' info';
762
+ case FwNotificationType.Success:
763
+ return cssClass += ' success';
764
+ case FwNotificationType.Wait:
765
+ return cssClass += ' wait';
766
+ case FwNotificationType.Warning:
767
+ return cssClass += ' warning';
768
+ default:
769
+ return cssClass;
770
+ }
771
+ }
772
+ ngAfterViewInit() {
773
+ this.ready.emit(this);
774
+ this.cdr.markForCheck();
775
+ }
776
+ startTimer() {
777
+ this.timerService.start(this.notificationDuration).then(() => {
778
+ this.onClickDismiss();
779
+ this.cdr.markForCheck();
780
+ });
781
+ }
782
+ stopTimer() {
783
+ this.timerService.stop();
784
+ this.cdr.markForCheck();
785
+ }
786
+ onClickDismiss() {
787
+ this.dismiss.emit(this.notification.id);
788
+ this.cdr.markForCheck();
789
+ }
790
+ }
791
+ FwNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: FwNotificationTimerService }], target: i0.ɵɵFactoryTarget.Component });
792
+ FwNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwNotificationComponent, selector: "fw-notification", inputs: { notification: "notification", notificationDuration: "notificationDuration" }, outputs: { ready: "ready", dismiss: "dismiss" }, host: { listeners: { "click": "onClickDismiss()" }, properties: { "class": "this.cssClass" } }, providers: [FwNotificationTimerService], ngImport: i0, template: `{{ notification?.message }}`, isInline: true, styles: ["fw-notification{display:block;border-radius:4px;box-sizing:border-box;margin:5px 24px;max-width:33vw;min-width:344px;padding:14px 16px;transform-origin:center;background-color:#2f96b4;border:1px solid rgba(255,255,255,.7019607843);box-shadow:0 0 12px #999;color:#fff;opacity:.99;white-space:pre-wrap}fw-notification.error{background-color:#bd362f}fw-notification.info{background-color:#2f96b4}fw-notification.success{background-color:#51a351}fw-notification.wait{background-color:#2f96b4}fw-notification.warning{background-color:#f89406}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationComponent, decorators: [{
794
+ type: Component,
795
+ args: [{ host: {
796
+ '(click)': 'onClickDismiss()'
797
+ }, selector: 'fw-notification', template: `{{ notification?.message }}`, providers: [FwNotificationTimerService], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["fw-notification{display:block;border-radius:4px;box-sizing:border-box;margin:5px 24px;max-width:33vw;min-width:344px;padding:14px 16px;transform-origin:center;background-color:#2f96b4;border:1px solid rgba(255,255,255,.7019607843);box-shadow:0 0 12px #999;color:#fff;opacity:.99;white-space:pre-wrap}fw-notification.error{background-color:#bd362f}fw-notification.info{background-color:#2f96b4}fw-notification.success{background-color:#51a351}fw-notification.wait{background-color:#2f96b4}fw-notification.warning{background-color:#f89406}\n"] }]
798
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: FwNotificationTimerService }]; }, propDecorators: { notification: [{
799
+ type: Input
800
+ }], notificationDuration: [{
801
+ type: Input
802
+ }], ready: [{
803
+ type: Output
804
+ }], dismiss: [{
805
+ type: Output
806
+ }], cssClass: [{
807
+ type: HostBinding,
808
+ args: ['class']
809
+ }] } });
810
+
811
+ class FwNotificationContainerComponent {
812
+ constructor(cdr, notificationService) {
813
+ this.cdr = cdr;
814
+ this.notificationService = notificationService;
815
+ this.limit = 3;
816
+ this.notifications = [];
817
+ this.expanded = false;
818
+ this.subscriptions = {
819
+ notifications: Subscription.EMPTY,
820
+ };
821
+ this.subscriptions.notifications = this.notificationService.notifications$.subscribe((notifications) => {
822
+ this.notifications = notifications;
823
+ if (notifications.length === 0) {
824
+ this.expanded = false;
825
+ }
826
+ this.cdr.markForCheck();
827
+ });
828
+ }
829
+ ngOnDestroy() {
830
+ for (const subscription of Object.values(this.subscriptions)) {
831
+ subscription.unsubscribe();
832
+ }
833
+ }
834
+ notificationClass(index) {
835
+ let cssClass;
836
+ const level = this.notifications.length > this.limit
837
+ ? index - (this.notifications.length - this.limit)
838
+ : index;
839
+ if (this.expanded) {
840
+ cssClass = 'default';
841
+ }
842
+ else {
843
+ cssClass = level >= 0 ? `level-${level}` : 'hidden';
844
+ }
845
+ return cssClass;
846
+ }
847
+ getEmptyNotification(notification) {
848
+ return { ...notification, message: ' ' }; // take up a line but show no content
849
+ }
850
+ onReady(notification) {
851
+ const currentNotification = this.notifications[this.notifications.length - 1];
852
+ currentNotification.ref = notification;
853
+ notification.startTimer();
854
+ }
855
+ onDismiss(notificationId) {
856
+ const notification = this.notifications.find(currentNotification => currentNotification.id === notificationId);
857
+ if (notification?.ref) {
858
+ notification.ref.stopTimer();
859
+ }
860
+ if (notification?.id) {
861
+ this.notificationService.dismiss(notification.id);
862
+ }
863
+ this.cdr.markForCheck();
864
+ }
865
+ clearAll() {
866
+ this.notificationService.dismissAll();
867
+ this.cdr.markForCheck();
868
+ }
869
+ onShowMore() {
870
+ this.expanded = true;
871
+ this.cdr.markForCheck();
872
+ }
873
+ onShowLess() {
874
+ this.expanded = false;
875
+ this.cdr.markForCheck();
876
+ }
877
+ }
878
+ FwNotificationContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationContainerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: FwNotificationService }], target: i0.ɵɵFactoryTarget.Component });
879
+ FwNotificationContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwNotificationContainerComponent, selector: "fw-notification-container", host: { properties: { "class.duo": "notifications.length === 2", "class.triple": "notifications.length >= 3" }, classAttribute: "fw-notification-container" }, ngImport: i0, template: "<div role=\"list\">\n <fw-notification *ngFor=\"let notification of notifications; index as $index\"\n (ready)=\"onReady($event)\"\n (dismiss)=\"onDismiss($event)\"\n [class]=\"notificationClass($index)\"\n [notification]=\"expanded || $index === notifications.length - 1 ? notification : getEmptyNotification(notification)\"\n [attr.aria-label]=\"notification.type + ' : ' + notification.message\"\n role=\"listitem\"\n ></fw-notification>\n <div class=\"buttons\">\n <fw-button *ngIf=\"expanded\" (click)=\"onShowLess()\" mat-button aria-label=\"show less\" layout=\"compact\" size=\"small\">\n <mat-icon>expand_less</mat-icon>\n </fw-button>\n <fw-button *ngIf=\"!expanded && notifications.length > 1\" (click)=\"onShowMore()\" mat-button aria-label=\"show more\" layout=\"compact\" size=\"small\">\n <mat-icon>expand_more</mat-icon>\n </fw-button>\n <fw-button (click)=\"clearAll()\" mat-button class=\"clear-all\" aria-label=\"clear all\" layout=\"compact\" size=\"small\">\n Clear All\n </fw-button>\n </div>\n</div>\n", styles: ["fw-notification-container{position:absolute;right:0;top:0;margin-top:20px;z-index:999999}fw-notification-container>div{display:flex;flex-direction:column-reverse}fw-notification-container .buttons{display:none;position:absolute;top:-5px;right:25px}fw-notification-container .buttons button{color:#fff;background-color:#919292;margin-left:2px}fw-notification-container .buttons button.mat-button{line-height:24px!important;margin:0 0 0 2px!important}fw-notification-container:hover .buttons{display:flex}fw-notification-container .hidden{display:none}fw-notification-container fw-notification:last-of-type{margin-top:24px}fw-notification-container.duo fw-notification.level-0{transform:scale(.95) translateY(-51px)}fw-notification-container.triple fw-notification.level-1{transform:scale(.95) translateY(-51px)}fw-notification-container.triple fw-notification.level-0{transform:scale(.9) translateY(-108px)}\n"], components: [{ type: FwNotificationComponent, selector: "fw-notification", inputs: ["notification", "notificationDuration"], outputs: ["ready", "dismiss"] }, { type: FwButtonComponent, selector: "fw-button", inputs: ["color", "layout", "size", "type"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationContainerComponent, decorators: [{
881
+ type: Component,
882
+ args: [{ host: {
883
+ 'class': 'fw-notification-container',
884
+ '[class.duo]': 'notifications.length === 2',
885
+ '[class.triple]': 'notifications.length >= 3',
886
+ }, selector: 'fw-notification-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div role=\"list\">\n <fw-notification *ngFor=\"let notification of notifications; index as $index\"\n (ready)=\"onReady($event)\"\n (dismiss)=\"onDismiss($event)\"\n [class]=\"notificationClass($index)\"\n [notification]=\"expanded || $index === notifications.length - 1 ? notification : getEmptyNotification(notification)\"\n [attr.aria-label]=\"notification.type + ' : ' + notification.message\"\n role=\"listitem\"\n ></fw-notification>\n <div class=\"buttons\">\n <fw-button *ngIf=\"expanded\" (click)=\"onShowLess()\" mat-button aria-label=\"show less\" layout=\"compact\" size=\"small\">\n <mat-icon>expand_less</mat-icon>\n </fw-button>\n <fw-button *ngIf=\"!expanded && notifications.length > 1\" (click)=\"onShowMore()\" mat-button aria-label=\"show more\" layout=\"compact\" size=\"small\">\n <mat-icon>expand_more</mat-icon>\n </fw-button>\n <fw-button (click)=\"clearAll()\" mat-button class=\"clear-all\" aria-label=\"clear all\" layout=\"compact\" size=\"small\">\n Clear All\n </fw-button>\n </div>\n</div>\n", styles: ["fw-notification-container{position:absolute;right:0;top:0;margin-top:20px;z-index:999999}fw-notification-container>div{display:flex;flex-direction:column-reverse}fw-notification-container .buttons{display:none;position:absolute;top:-5px;right:25px}fw-notification-container .buttons button{color:#fff;background-color:#919292;margin-left:2px}fw-notification-container .buttons button.mat-button{line-height:24px!important;margin:0 0 0 2px!important}fw-notification-container:hover .buttons{display:flex}fw-notification-container .hidden{display:none}fw-notification-container fw-notification:last-of-type{margin-top:24px}fw-notification-container.duo fw-notification.level-0{transform:scale(.95) translateY(-51px)}fw-notification-container.triple fw-notification.level-1{transform:scale(.95) translateY(-51px)}fw-notification-container.triple fw-notification.level-0{transform:scale(.9) translateY(-108px)}\n"] }]
887
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: FwNotificationService }]; } });
888
+
889
+ class FwNotificationModule {
890
+ }
891
+ FwNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
892
+ FwNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationModule, declarations: [FwNotificationComponent,
893
+ FwNotificationContainerComponent], imports: [CommonModule,
894
+ FwButtonModule,
895
+ FwButtonGroupModule,
896
+ MatButtonModule,
897
+ MatIconModule], exports: [FwNotificationComponent,
898
+ FwNotificationContainerComponent] });
899
+ FwNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationModule, providers: [
900
+ FwNotificationService,
901
+ ], imports: [[
902
+ CommonModule,
903
+ FwButtonModule,
904
+ FwButtonGroupModule,
905
+ MatButtonModule,
906
+ MatIconModule,
907
+ ]] });
908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwNotificationModule, decorators: [{
909
+ type: NgModule,
910
+ args: [{
911
+ imports: [
912
+ CommonModule,
913
+ FwButtonModule,
914
+ FwButtonGroupModule,
915
+ MatButtonModule,
916
+ MatIconModule,
917
+ ],
918
+ exports: [
919
+ FwNotificationComponent,
920
+ FwNotificationContainerComponent
921
+ ],
922
+ declarations: [
923
+ FwNotificationComponent,
924
+ FwNotificationContainerComponent,
925
+ ],
926
+ entryComponents: [
927
+ FwNotificationComponent,
928
+ ],
929
+ providers: [
930
+ FwNotificationService,
931
+ ]
932
+ }]
933
+ }] });
934
+
935
+ class FwPopoverTriggerDirective {
936
+ constructor(element, overlay, viewContainerRef) {
937
+ this.element = element;
938
+ this.overlay = overlay;
939
+ this.viewContainerRef = viewContainerRef;
940
+ this.popoverMargin = 15;
941
+ this.positionMap = {
942
+ 'left': { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },
943
+ 'right': { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },
944
+ 'above': { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },
945
+ 'below': { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },
946
+ };
947
+ this.position = 'below';
948
+ this.subscriptions = {
949
+ positionChanges: Subscription.EMPTY,
950
+ };
951
+ }
952
+ ngOnChanges(changes) {
953
+ if (changes.position && this.overlayRef) {
954
+ this.overlayRef.dispose();
955
+ this.overlayRef = null;
956
+ }
957
+ }
958
+ ngOnDestroy() {
959
+ if (this.overlayRef) {
960
+ this.overlayRef.dispose();
961
+ this.overlayRef = null;
962
+ }
963
+ for (const subscription of Object.values(this.subscriptions)) {
964
+ subscription.unsubscribe();
965
+ }
966
+ }
967
+ showPopover() {
968
+ if (this.popover?.templateRef) {
969
+ this.getOverlay().attach(new TemplatePortal(this.popover.templateRef, this.viewContainerRef));
970
+ }
971
+ }
972
+ hidePopover(e) {
973
+ if (!e.relatedTarget?.classList.contains('fw-popover-panel')) {
974
+ this.getOverlay().detach();
975
+ }
976
+ }
977
+ setPopoverCaretPosition(position) {
978
+ const caret = this.overlayRef.overlayElement.querySelector('.fw-popover-caret');
979
+ const caretRect = this.overlayRef.overlayElement.getBoundingClientRect();
980
+ const triggerRect = this.element.nativeElement.getBoundingClientRect();
981
+ this.overlayRef.overlayElement.querySelector('.fw-popover-content-wrapper').style.margin = `${this.popoverMargin}px`;
982
+ if (['left', 'right', 'before', 'after'].includes(position)) {
983
+ caret.style.top = `${triggerRect.top - caretRect.top - this.popoverMargin + (triggerRect.height / 2)}px`;
984
+ }
985
+ else {
986
+ caret.style.left = `${triggerRect.left - caretRect.left - this.popoverMargin + (triggerRect.width / 2)}px`;
987
+ }
988
+ }
989
+ setPopoverPosition(positionChange) {
990
+ const position = this.positionMap[this.mainPosition] === positionChange.connectionPair
991
+ ? this.mainPosition
992
+ : this.positionMap[this.fallbackPosition] === positionChange.connectionPair
993
+ ? this.fallbackPosition
994
+ : this.mainPosition;
995
+ this.overlayRef.removePanelClass(['fw-popover-above', 'fw-popover-below', 'fw-popover-left', 'fw-popover-right']);
996
+ this.overlayRef.addPanelClass(`fw-popover-${position}`);
997
+ this.setPopoverCaretPosition(position);
998
+ }
999
+ getOverlay() {
1000
+ if (!this.overlayRef) {
1001
+ this.overlayRef = this.overlay.create({
1002
+ positionStrategy: this.overlay.position()
1003
+ .flexibleConnectedTo(this.element)
1004
+ .withPositions(this.getPositions()),
1005
+ panelClass: 'fw-popover-panel',
1006
+ });
1007
+ this.overlayRef.overlayElement.addEventListener('mouseleave', e => this.hidePopover(e));
1008
+ this.subscriptions.positionChanges = this.overlayRef.getConfig().positionStrategy.positionChanges
1009
+ .subscribe(positionChange => this.setPopoverPosition(positionChange));
1010
+ }
1011
+ return this.overlayRef;
1012
+ }
1013
+ getMainPosition() {
1014
+ return this.mainPosition =
1015
+ ['left', 'before'].includes(this.position)
1016
+ ? 'left'
1017
+ : ['right', 'after'].includes(this.position)
1018
+ ? 'right'
1019
+ : this.position === 'above'
1020
+ ? 'above'
1021
+ : 'below';
1022
+ }
1023
+ getFallbackPosition() {
1024
+ return this.fallbackPosition =
1025
+ ['left', 'before'].includes(this.position)
1026
+ ? 'right'
1027
+ : ['right', 'after'].includes(this.position)
1028
+ ? 'left'
1029
+ : this.position === 'above'
1030
+ ? 'below'
1031
+ : 'above';
1032
+ }
1033
+ getPositions() {
1034
+ return [
1035
+ // main position
1036
+ this.positionMap[this.getMainPosition()],
1037
+ // fallback position (inverse of main)
1038
+ this.positionMap[this.getFallbackPosition()],
1039
+ ];
1040
+ }
1041
+ }
1042
+ FwPopoverTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverTriggerDirective, deps: [{ token: i0.ElementRef }, { token: i1$2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1043
+ FwPopoverTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FwPopoverTriggerDirective, selector: "[fwPopoverTriggerFor]", inputs: { popover: ["fwPopoverTriggerFor", "popover"], position: ["fwPopoverPosition", "position"] }, host: { listeners: { "mouseenter": "showPopover()", "mouseleave": "hidePopover($event)" }, classAttribute: "fw-popover-trigger" }, exportAs: ["fwPopoverTrigger"], usesOnChanges: true, ngImport: i0 });
1044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverTriggerDirective, decorators: [{
1045
+ type: Directive,
1046
+ args: [{
1047
+ host: {
1048
+ 'class': 'fw-popover-trigger',
1049
+ '(mouseenter)': 'showPopover()',
1050
+ '(mouseleave)': 'hidePopover($event)',
1051
+ },
1052
+ selector: '[fwPopoverTriggerFor]',
1053
+ exportAs: 'fwPopoverTrigger',
1054
+ }]
1055
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { popover: [{
1056
+ type: Input,
1057
+ args: ['fwPopoverTriggerFor']
1058
+ }], position: [{
1059
+ type: Input,
1060
+ args: ['fwPopoverPosition']
1061
+ }] } });
1062
+
1063
+ class FwPopoverTriggerComponent extends FwPopoverTriggerDirective {
1064
+ constructor(element, overlay, viewContainerRef) {
1065
+ super(element, overlay, viewContainerRef);
1066
+ this.element = element;
1067
+ this.overlay = overlay;
1068
+ this.viewContainerRef = viewContainerRef;
1069
+ this.position = 'below';
1070
+ }
1071
+ showPopover() {
1072
+ const overlay = this.getOverlay();
1073
+ overlay.detach();
1074
+ if (this.popoverId) {
1075
+ // as a web component it is not possible to have a reference to this.popover
1076
+ this.popoverHTML = document.querySelector(`fw-popover#${this.popoverId}`).innerHTML;
1077
+ overlay.attach(new TemplatePortal(this.popoverTemplateRef, this.viewContainerRef));
1078
+ }
1079
+ }
1080
+ }
1081
+ FwPopoverTriggerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverTriggerComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
1082
+ FwPopoverTriggerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwPopoverTriggerComponent, selector: "fw-popover-trigger", inputs: { popoverId: ["trigger-for", "popoverId"], position: "position" }, host: { listeners: { "mouseenter": "showPopover()", "mouseleave": "hidePopover($event)" }, classAttribute: "fw-popover-trigger" }, viewQueries: [{ propertyName: "popoverTemplateRef", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>
1083
+ <!-- for web component support -->
1084
+ <ng-template>
1085
+ <div [innerHTML]="popoverHTML"></div>
1086
+ </ng-template>`, isInline: true });
1087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverTriggerComponent, decorators: [{
1088
+ type: Component,
1089
+ args: [{
1090
+ host: {
1091
+ 'class': 'fw-popover-trigger',
1092
+ '(mouseenter)': 'showPopover()',
1093
+ '(mouseleave)': 'hidePopover($event)',
1094
+ },
1095
+ selector: 'fw-popover-trigger',
1096
+ template: `<ng-content></ng-content>
1097
+ <!-- for web component support -->
1098
+ <ng-template>
1099
+ <div [innerHTML]="popoverHTML"></div>
1100
+ </ng-template>`,
1101
+ }]
1102
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { popoverId: [{
1103
+ type: Input,
1104
+ args: ['trigger-for']
1105
+ }], position: [{
1106
+ type: Input,
1107
+ args: ['position']
1108
+ }], popoverTemplateRef: [{
1109
+ type: ViewChild,
1110
+ args: [TemplateRef]
1111
+ }] } });
1112
+
1113
+ class FwPopoverComponent {
1114
+ }
1115
+ FwPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1116
+ FwPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwPopoverComponent, selector: "fw-popover", host: { classAttribute: "fw-popover" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: `
1117
+ <ng-container *ngTemplateOutlet="content"></ng-container>
1118
+ <ng-template #content>
1119
+ <div class="fw-popover-content-wrapper">
1120
+ <ng-content></ng-content>
1121
+ <div class="fw-popover-caret"></div>
1122
+ </div>
1123
+ </ng-template>`, isInline: true, styles: [".white{color:#fff!important}.fill-white{background-color:#fff!important}.border-white{border-color:#fff!important}.border-top-white{border-top:1px solid;border-color:#fff!important}.border-right-white{border-right:1px solid;border-color:#fff!important}.border-bottom-white{border-bottom:1px solid;border-color:#fff!important}.border-left-white{border-left:1px solid;border-color:#fff!important}.black{color:#000!important}.fill-black{background-color:#000!important}.border-black{border-color:#000!important}.border-top-black{border-top:1px solid;border-color:#000!important}.border-right-black{border-right:1px solid;border-color:#000!important}.border-bottom-black{border-bottom:1px solid;border-color:#000!important}.border-left-black{border-left:1px solid;border-color:#000!important}.green{color:#59b96b!important}.fill-green{background-color:#59b96b!important}.border-green{border-color:#59b96b!important}.border-top-green{border-top:1px solid;border-color:#59b96b!important}.border-right-green{border-right:1px solid;border-color:#59b96b!important}.border-bottom-green{border-bottom:1px solid;border-color:#59b96b!important}.border-left-green{border-left:1px solid;border-color:#59b96b!important}.orange{color:#f7941d!important}.fill-orange{background-color:#f7941d!important}.border-orange{border-color:#f7941d!important}.border-top-orange{border-top:1px solid;border-color:#f7941d!important}.border-right-orange{border-right:1px solid;border-color:#f7941d!important}.border-bottom-orange{border-bottom:1px solid;border-color:#f7941d!important}.border-left-orange{border-left:1px solid;border-color:#f7941d!important}.red{color:#de584c!important}.fill-red{background-color:#de584c!important}.border-red{border-color:#de584c!important}.border-top-red{border-top:1px solid;border-color:#de584c!important}.border-right-red{border-right:1px solid;border-color:#de584c!important}.border-bottom-red{border-bottom:1px solid;border-color:#de584c!important}.border-left-red{border-left:1px solid;border-color:#de584c!important}.light-red{color:#f8e5e4!important}.fill-light-red{background-color:#f8e5e4!important}.border-light-red{border-color:#f8e5e4!important}.border-top-light-red{border-top:1px solid;border-color:#f8e5e4!important}.border-right-light-red{border-right:1px solid;border-color:#f8e5e4!important}.border-bottom-light-red{border-bottom:1px solid;border-color:#f8e5e4!important}.border-left-light-red{border-left:1px solid;border-color:#f8e5e4!important}.blue{color:#5871a2!important}.fill-blue{background-color:#5871a2!important}.border-blue{border-color:#5871a2!important}.border-top-blue{border-top:1px solid;border-color:#5871a2!important}.border-right-blue{border-right:1px solid;border-color:#5871a2!important}.border-bottom-blue{border-bottom:1px solid;border-color:#5871a2!important}.border-left-blue{border-left:1px solid;border-color:#5871a2!important}.focus-blue{color:#23527c!important}.fill-focus-blue{background-color:#23527c!important}.border-focus-blue{border-color:#23527c!important}.border-top-focus-blue{border-top:1px solid;border-color:#23527c!important}.border-right-focus-blue{border-right:1px solid;border-color:#23527c!important}.border-bottom-focus-blue{border-bottom:1px solid;border-color:#23527c!important}.border-left-focus-blue{border-left:1px solid;border-color:#23527c!important}.dark-blue{color:#394256!important}.fill-dark-blue{background-color:#394256!important}.border-dark-blue{border-color:#394256!important}.border-top-dark-blue{border-top:1px solid;border-color:#394256!important}.border-right-dark-blue{border-right:1px solid;border-color:#394256!important}.border-bottom-dark-blue{border-bottom:1px solid;border-color:#394256!important}.border-left-dark-blue{border-left:1px solid;border-color:#394256!important}.light-blue{color:#e7effe!important}.fill-light-blue{background-color:#e7effe!important}.border-light-blue{border-color:#e7effe!important}.border-top-light-blue{border-top:1px solid;border-color:#e7effe!important}.border-right-light-blue{border-right:1px solid;border-color:#e7effe!important}.border-bottom-light-blue{border-bottom:1px solid;border-color:#e7effe!important}.border-left-light-blue{border-left:1px solid;border-color:#e7effe!important}.bright-blue{color:#1b68fa!important}.fill-bright-blue{background-color:#1b68fa!important}.border-bright-blue{border-color:#1b68fa!important}.border-top-bright-blue{border-top:1px solid;border-color:#1b68fa!important}.border-right-bright-blue{border-right:1px solid;border-color:#1b68fa!important}.border-bottom-bright-blue{border-bottom:1px solid;border-color:#1b68fa!important}.border-left-bright-blue{border-left:1px solid;border-color:#1b68fa!important}.admin-black{color:#01010a!important}.fill-admin-black{background-color:#01010a!important}.border-admin-black{border-color:#01010a!important}.border-top-admin-black{border-top:1px solid;border-color:#01010a!important}.border-right-admin-black{border-right:1px solid;border-color:#01010a!important}.border-bottom-admin-black{border-bottom:1px solid;border-color:#01010a!important}.border-left-admin-black{border-left:1px solid;border-color:#01010a!important}.accent-purple{color:#b080fc!important}.fill-accent-purple{background-color:#b080fc!important}.border-accent-purple{border-color:#b080fc!important}.border-top-accent-purple{border-top:1px solid;border-color:#b080fc!important}.border-right-accent-purple{border-right:1px solid;border-color:#b080fc!important}.border-bottom-accent-purple{border-bottom:1px solid;border-color:#b080fc!important}.border-left-accent-purple{border-left:1px solid;border-color:#b080fc!important}.grey{color:#58595b!important}.fill-grey{background-color:#58595b!important}.border-grey{border-color:#58595b!important}.border-top-grey{border-top:1px solid;border-color:#58595b!important}.border-right-grey{border-right:1px solid;border-color:#58595b!important}.border-bottom-grey{border-bottom:1px solid;border-color:#58595b!important}.border-left-grey{border-left:1px solid;border-color:#58595b!important}.soft-grey{color:#dddede!important}.fill-soft-grey{background-color:#dddede!important}.border-soft-grey{border-color:#dddede!important}.border-top-soft-grey{border-top:1px solid;border-color:#dddede!important}.border-right-soft-grey{border-right:1px solid;border-color:#dddede!important}.border-bottom-soft-grey{border-bottom:1px solid;border-color:#dddede!important}.border-left-soft-grey{border-left:1px solid;border-color:#dddede!important}.light-grey{color:#eee!important}.fill-light-grey{background-color:#eee!important}.border-light-grey{border-color:#eee!important}.border-top-light-grey{border-top:1px solid;border-color:#eee!important}.border-right-light-grey{border-right:1px solid;border-color:#eee!important}.border-bottom-light-grey{border-bottom:1px solid;border-color:#eee!important}.border-left-light-grey{border-left:1px solid;border-color:#eee!important}.medium-grey{color:#ccc!important}.fill-medium-grey{background-color:#ccc!important}.border-medium-grey{border-color:#ccc!important}.border-top-medium-grey{border-top:1px solid;border-color:#ccc!important}.border-right-medium-grey{border-right:1px solid;border-color:#ccc!important}.border-bottom-medium-grey{border-bottom:1px solid;border-color:#ccc!important}.border-left-medium-grey{border-left:1px solid;border-color:#ccc!important}.medium-dark-grey{color:#999!important}.fill-medium-dark-grey{background-color:#999!important}.border-medium-dark-grey{border-color:#999!important}.border-top-medium-dark-grey{border-top:1px solid;border-color:#999!important}.border-right-medium-dark-grey{border-right:1px solid;border-color:#999!important}.border-bottom-medium-dark-grey{border-bottom:1px solid;border-color:#999!important}.border-left-medium-dark-grey{border-left:1px solid;border-color:#999!important}.dark-grey{color:#222!important}.fill-dark-grey{background-color:#222!important}.border-dark-grey{border-color:#222!important}.border-top-dark-grey{border-top:1px solid;border-color:#222!important}.border-right-dark-grey{border-right:1px solid;border-color:#222!important}.border-bottom-dark-grey{border-bottom:1px solid;border-color:#222!important}.border-left-dark-grey{border-left:1px solid;border-color:#222!important}.soft-blue{color:#eff1f5!important}.fill-soft-blue{background-color:#eff1f5!important}.border-soft-blue{border-color:#eff1f5!important}.border-top-soft-blue{border-top:1px solid;border-color:#eff1f5!important}.border-right-soft-blue{border-right:1px solid;border-color:#eff1f5!important}.border-bottom-soft-blue{border-bottom:1px solid;border-color:#eff1f5!important}.border-left-soft-blue{border-left:1px solid;border-color:#eff1f5!important}.dark-soft-blue{color:#e9ecf1!important}.fill-dark-soft-blue{background-color:#e9ecf1!important}.border-dark-soft-blue{border-color:#e9ecf1!important}.border-top-dark-soft-blue{border-top:1px solid;border-color:#e9ecf1!important}.border-right-dark-soft-blue{border-right:1px solid;border-color:#e9ecf1!important}.border-bottom-dark-soft-blue{border-bottom:1px solid;border-color:#e9ecf1!important}.border-left-dark-soft-blue{border-left:1px solid;border-color:#e9ecf1!important}.darker-soft-blue{color:#e6e9ef!important}.fill-darker-soft-blue{background-color:#e6e9ef!important}.border-darker-soft-blue{border-color:#e6e9ef!important}.border-top-darker-soft-blue{border-top:1px solid;border-color:#e6e9ef!important}.border-right-darker-soft-blue{border-right:1px solid;border-color:#e6e9ef!important}.border-bottom-darker-soft-blue{border-bottom:1px solid;border-color:#e6e9ef!important}.border-left-darker-soft-blue{border-left:1px solid;border-color:#e6e9ef!important}.light-soft-blue{color:#f5f6f9!important}.fill-light-soft-blue{background-color:#f5f6f9!important}.border-light-soft-blue{border-color:#f5f6f9!important}.border-top-light-soft-blue{border-top:1px solid;border-color:#f5f6f9!important}.border-right-light-soft-blue{border-right:1px solid;border-color:#f5f6f9!important}.border-bottom-light-soft-blue{border-bottom:1px solid;border-color:#f5f6f9!important}.border-left-light-soft-blue{border-left:1px solid;border-color:#f5f6f9!important}.lighter-soft-blue{color:#f8f9fb!important}.fill-lighter-soft-blue{background-color:#f8f9fb!important}.border-lighter-soft-blue{border-color:#f8f9fb!important}.border-top-lighter-soft-blue{border-top:1px solid;border-color:#f8f9fb!important}.border-right-lighter-soft-blue{border-right:1px solid;border-color:#f8f9fb!important}.border-bottom-lighter-soft-blue{border-bottom:1px solid;border-color:#f8f9fb!important}.border-left-lighter-soft-blue{border-left:1px solid;border-color:#f8f9fb!important}:root{--color-gray: var(--color-gray-100);--color-gray-50: #f6f7f8;--color-gray-100: #eff1f4;--color-gray-200: #e3e5e8;--color-gray-300: #d7d9dc;--color-gray-400: #cbcdcf;--color-gray-500: #bfc1c3;--color-primary: var(--color-primary-500);--color-primary-50: #e4edfe;--color-primary-100: #bbd2fe;--color-primary-200: #8db4fd;--color-primary-300: #5f95fc;--color-primary-400: #3d7ffb;--color-primary-500: #1b68fa;--color-primary-600: #1860f9;--color-primary-700: #1455f9;--color-primary-800: #104bf8;--color-primary-900: #083af6;--color-primary-A100: #ffffff;--color-primary-A200: #ebefff;--color-primary-A400: #b8c4ff;--color-primary-A700: #9fafff;--color-secondary: var(--color-secondary-500);--color-secondary-50: #ebf7ed;--color-secondary-100: #cdead3;--color-secondary-200: #acdcb5;--color-secondary-300: #8bce97;--color-secondary-400: #72c481;--color-secondary-500: #59b96b;--color-secondary-600: #51b263;--color-secondary-700: #48aa58;--color-secondary-800: #3ea24e;--color-secondary-900: #2e933c;--color-secondary-A100: #d9ffde;--color-secondary-A200: #a6ffb1;--color-secondary-A400: #73ff84;--color-secondary-A700: #59ff6e}fw-popover{display:none}.fw-popover-panel .fw-popover-content-wrapper{position:relative;background:#ffffff;border-radius:4px;box-shadow:0 1px 4px #00000026!important;border:1px solid #d6dbe5;padding:16px}.fw-popover-panel .fw-popover-content-wrapper .fw-popover-caret{position:absolute;overflow:hidden;width:25px;height:25px}.fw-popover-panel .fw-popover-content-wrapper .fw-popover-caret:after{display:block;content:\"\";width:16px;height:16px;background:#ffffff;box-shadow:0 1px 4px #00000026!important;border:1px solid #d6dbe5;transform:rotate(45deg);position:relative}.fw-popover-panel.fw-popover-above{margin-bottom:-20px;padding-bottom:20px}.fw-popover-panel.fw-popover-above .fw-popover-caret{left:0;bottom:-16px;height:16px}.fw-popover-panel.fw-popover-above .fw-popover-caret:after{margin:-8px auto}.fw-popover-panel.fw-popover-below{margin-top:-20px;padding-top:20px}.fw-popover-panel.fw-popover-below .fw-popover-caret{left:0;top:-16px;height:16px}.fw-popover-panel.fw-popover-below .fw-popover-caret:after{top:16px;margin:-8px auto}.fw-popover-panel.fw-popover-left{margin-right:-20px;padding-right:20px}.fw-popover-panel.fw-popover-left .fw-popover-caret{right:-16px;top:0;width:16px}.fw-popover-panel.fw-popover-left .fw-popover-caret:after{top:calc(50% - 8px);left:-8px}.fw-popover-panel.fw-popover-right{margin-left:-20px;padding-left:20px}.fw-popover-panel.fw-popover-right .fw-popover-caret{left:-16px;top:0;width:16px}.fw-popover-panel.fw-popover-right .fw-popover-caret:after{top:calc(50% - 8px);right:-8px}\n"], directives: [{ type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], encapsulation: i0.ViewEncapsulation.None });
1124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverComponent, decorators: [{
1125
+ type: Component,
1126
+ args: [{ host: { 'class': 'fw-popover' }, selector: 'fw-popover', template: `
1127
+ <ng-container *ngTemplateOutlet="content"></ng-container>
1128
+ <ng-template #content>
1129
+ <div class="fw-popover-content-wrapper">
1130
+ <ng-content></ng-content>
1131
+ <div class="fw-popover-caret"></div>
1132
+ </div>
1133
+ </ng-template>`, encapsulation: ViewEncapsulation.None, styles: [".white{color:#fff!important}.fill-white{background-color:#fff!important}.border-white{border-color:#fff!important}.border-top-white{border-top:1px solid;border-color:#fff!important}.border-right-white{border-right:1px solid;border-color:#fff!important}.border-bottom-white{border-bottom:1px solid;border-color:#fff!important}.border-left-white{border-left:1px solid;border-color:#fff!important}.black{color:#000!important}.fill-black{background-color:#000!important}.border-black{border-color:#000!important}.border-top-black{border-top:1px solid;border-color:#000!important}.border-right-black{border-right:1px solid;border-color:#000!important}.border-bottom-black{border-bottom:1px solid;border-color:#000!important}.border-left-black{border-left:1px solid;border-color:#000!important}.green{color:#59b96b!important}.fill-green{background-color:#59b96b!important}.border-green{border-color:#59b96b!important}.border-top-green{border-top:1px solid;border-color:#59b96b!important}.border-right-green{border-right:1px solid;border-color:#59b96b!important}.border-bottom-green{border-bottom:1px solid;border-color:#59b96b!important}.border-left-green{border-left:1px solid;border-color:#59b96b!important}.orange{color:#f7941d!important}.fill-orange{background-color:#f7941d!important}.border-orange{border-color:#f7941d!important}.border-top-orange{border-top:1px solid;border-color:#f7941d!important}.border-right-orange{border-right:1px solid;border-color:#f7941d!important}.border-bottom-orange{border-bottom:1px solid;border-color:#f7941d!important}.border-left-orange{border-left:1px solid;border-color:#f7941d!important}.red{color:#de584c!important}.fill-red{background-color:#de584c!important}.border-red{border-color:#de584c!important}.border-top-red{border-top:1px solid;border-color:#de584c!important}.border-right-red{border-right:1px solid;border-color:#de584c!important}.border-bottom-red{border-bottom:1px solid;border-color:#de584c!important}.border-left-red{border-left:1px solid;border-color:#de584c!important}.light-red{color:#f8e5e4!important}.fill-light-red{background-color:#f8e5e4!important}.border-light-red{border-color:#f8e5e4!important}.border-top-light-red{border-top:1px solid;border-color:#f8e5e4!important}.border-right-light-red{border-right:1px solid;border-color:#f8e5e4!important}.border-bottom-light-red{border-bottom:1px solid;border-color:#f8e5e4!important}.border-left-light-red{border-left:1px solid;border-color:#f8e5e4!important}.blue{color:#5871a2!important}.fill-blue{background-color:#5871a2!important}.border-blue{border-color:#5871a2!important}.border-top-blue{border-top:1px solid;border-color:#5871a2!important}.border-right-blue{border-right:1px solid;border-color:#5871a2!important}.border-bottom-blue{border-bottom:1px solid;border-color:#5871a2!important}.border-left-blue{border-left:1px solid;border-color:#5871a2!important}.focus-blue{color:#23527c!important}.fill-focus-blue{background-color:#23527c!important}.border-focus-blue{border-color:#23527c!important}.border-top-focus-blue{border-top:1px solid;border-color:#23527c!important}.border-right-focus-blue{border-right:1px solid;border-color:#23527c!important}.border-bottom-focus-blue{border-bottom:1px solid;border-color:#23527c!important}.border-left-focus-blue{border-left:1px solid;border-color:#23527c!important}.dark-blue{color:#394256!important}.fill-dark-blue{background-color:#394256!important}.border-dark-blue{border-color:#394256!important}.border-top-dark-blue{border-top:1px solid;border-color:#394256!important}.border-right-dark-blue{border-right:1px solid;border-color:#394256!important}.border-bottom-dark-blue{border-bottom:1px solid;border-color:#394256!important}.border-left-dark-blue{border-left:1px solid;border-color:#394256!important}.light-blue{color:#e7effe!important}.fill-light-blue{background-color:#e7effe!important}.border-light-blue{border-color:#e7effe!important}.border-top-light-blue{border-top:1px solid;border-color:#e7effe!important}.border-right-light-blue{border-right:1px solid;border-color:#e7effe!important}.border-bottom-light-blue{border-bottom:1px solid;border-color:#e7effe!important}.border-left-light-blue{border-left:1px solid;border-color:#e7effe!important}.bright-blue{color:#1b68fa!important}.fill-bright-blue{background-color:#1b68fa!important}.border-bright-blue{border-color:#1b68fa!important}.border-top-bright-blue{border-top:1px solid;border-color:#1b68fa!important}.border-right-bright-blue{border-right:1px solid;border-color:#1b68fa!important}.border-bottom-bright-blue{border-bottom:1px solid;border-color:#1b68fa!important}.border-left-bright-blue{border-left:1px solid;border-color:#1b68fa!important}.admin-black{color:#01010a!important}.fill-admin-black{background-color:#01010a!important}.border-admin-black{border-color:#01010a!important}.border-top-admin-black{border-top:1px solid;border-color:#01010a!important}.border-right-admin-black{border-right:1px solid;border-color:#01010a!important}.border-bottom-admin-black{border-bottom:1px solid;border-color:#01010a!important}.border-left-admin-black{border-left:1px solid;border-color:#01010a!important}.accent-purple{color:#b080fc!important}.fill-accent-purple{background-color:#b080fc!important}.border-accent-purple{border-color:#b080fc!important}.border-top-accent-purple{border-top:1px solid;border-color:#b080fc!important}.border-right-accent-purple{border-right:1px solid;border-color:#b080fc!important}.border-bottom-accent-purple{border-bottom:1px solid;border-color:#b080fc!important}.border-left-accent-purple{border-left:1px solid;border-color:#b080fc!important}.grey{color:#58595b!important}.fill-grey{background-color:#58595b!important}.border-grey{border-color:#58595b!important}.border-top-grey{border-top:1px solid;border-color:#58595b!important}.border-right-grey{border-right:1px solid;border-color:#58595b!important}.border-bottom-grey{border-bottom:1px solid;border-color:#58595b!important}.border-left-grey{border-left:1px solid;border-color:#58595b!important}.soft-grey{color:#dddede!important}.fill-soft-grey{background-color:#dddede!important}.border-soft-grey{border-color:#dddede!important}.border-top-soft-grey{border-top:1px solid;border-color:#dddede!important}.border-right-soft-grey{border-right:1px solid;border-color:#dddede!important}.border-bottom-soft-grey{border-bottom:1px solid;border-color:#dddede!important}.border-left-soft-grey{border-left:1px solid;border-color:#dddede!important}.light-grey{color:#eee!important}.fill-light-grey{background-color:#eee!important}.border-light-grey{border-color:#eee!important}.border-top-light-grey{border-top:1px solid;border-color:#eee!important}.border-right-light-grey{border-right:1px solid;border-color:#eee!important}.border-bottom-light-grey{border-bottom:1px solid;border-color:#eee!important}.border-left-light-grey{border-left:1px solid;border-color:#eee!important}.medium-grey{color:#ccc!important}.fill-medium-grey{background-color:#ccc!important}.border-medium-grey{border-color:#ccc!important}.border-top-medium-grey{border-top:1px solid;border-color:#ccc!important}.border-right-medium-grey{border-right:1px solid;border-color:#ccc!important}.border-bottom-medium-grey{border-bottom:1px solid;border-color:#ccc!important}.border-left-medium-grey{border-left:1px solid;border-color:#ccc!important}.medium-dark-grey{color:#999!important}.fill-medium-dark-grey{background-color:#999!important}.border-medium-dark-grey{border-color:#999!important}.border-top-medium-dark-grey{border-top:1px solid;border-color:#999!important}.border-right-medium-dark-grey{border-right:1px solid;border-color:#999!important}.border-bottom-medium-dark-grey{border-bottom:1px solid;border-color:#999!important}.border-left-medium-dark-grey{border-left:1px solid;border-color:#999!important}.dark-grey{color:#222!important}.fill-dark-grey{background-color:#222!important}.border-dark-grey{border-color:#222!important}.border-top-dark-grey{border-top:1px solid;border-color:#222!important}.border-right-dark-grey{border-right:1px solid;border-color:#222!important}.border-bottom-dark-grey{border-bottom:1px solid;border-color:#222!important}.border-left-dark-grey{border-left:1px solid;border-color:#222!important}.soft-blue{color:#eff1f5!important}.fill-soft-blue{background-color:#eff1f5!important}.border-soft-blue{border-color:#eff1f5!important}.border-top-soft-blue{border-top:1px solid;border-color:#eff1f5!important}.border-right-soft-blue{border-right:1px solid;border-color:#eff1f5!important}.border-bottom-soft-blue{border-bottom:1px solid;border-color:#eff1f5!important}.border-left-soft-blue{border-left:1px solid;border-color:#eff1f5!important}.dark-soft-blue{color:#e9ecf1!important}.fill-dark-soft-blue{background-color:#e9ecf1!important}.border-dark-soft-blue{border-color:#e9ecf1!important}.border-top-dark-soft-blue{border-top:1px solid;border-color:#e9ecf1!important}.border-right-dark-soft-blue{border-right:1px solid;border-color:#e9ecf1!important}.border-bottom-dark-soft-blue{border-bottom:1px solid;border-color:#e9ecf1!important}.border-left-dark-soft-blue{border-left:1px solid;border-color:#e9ecf1!important}.darker-soft-blue{color:#e6e9ef!important}.fill-darker-soft-blue{background-color:#e6e9ef!important}.border-darker-soft-blue{border-color:#e6e9ef!important}.border-top-darker-soft-blue{border-top:1px solid;border-color:#e6e9ef!important}.border-right-darker-soft-blue{border-right:1px solid;border-color:#e6e9ef!important}.border-bottom-darker-soft-blue{border-bottom:1px solid;border-color:#e6e9ef!important}.border-left-darker-soft-blue{border-left:1px solid;border-color:#e6e9ef!important}.light-soft-blue{color:#f5f6f9!important}.fill-light-soft-blue{background-color:#f5f6f9!important}.border-light-soft-blue{border-color:#f5f6f9!important}.border-top-light-soft-blue{border-top:1px solid;border-color:#f5f6f9!important}.border-right-light-soft-blue{border-right:1px solid;border-color:#f5f6f9!important}.border-bottom-light-soft-blue{border-bottom:1px solid;border-color:#f5f6f9!important}.border-left-light-soft-blue{border-left:1px solid;border-color:#f5f6f9!important}.lighter-soft-blue{color:#f8f9fb!important}.fill-lighter-soft-blue{background-color:#f8f9fb!important}.border-lighter-soft-blue{border-color:#f8f9fb!important}.border-top-lighter-soft-blue{border-top:1px solid;border-color:#f8f9fb!important}.border-right-lighter-soft-blue{border-right:1px solid;border-color:#f8f9fb!important}.border-bottom-lighter-soft-blue{border-bottom:1px solid;border-color:#f8f9fb!important}.border-left-lighter-soft-blue{border-left:1px solid;border-color:#f8f9fb!important}:root{--color-gray: var(--color-gray-100);--color-gray-50: #f6f7f8;--color-gray-100: #eff1f4;--color-gray-200: #e3e5e8;--color-gray-300: #d7d9dc;--color-gray-400: #cbcdcf;--color-gray-500: #bfc1c3;--color-primary: var(--color-primary-500);--color-primary-50: #e4edfe;--color-primary-100: #bbd2fe;--color-primary-200: #8db4fd;--color-primary-300: #5f95fc;--color-primary-400: #3d7ffb;--color-primary-500: #1b68fa;--color-primary-600: #1860f9;--color-primary-700: #1455f9;--color-primary-800: #104bf8;--color-primary-900: #083af6;--color-primary-A100: #ffffff;--color-primary-A200: #ebefff;--color-primary-A400: #b8c4ff;--color-primary-A700: #9fafff;--color-secondary: var(--color-secondary-500);--color-secondary-50: #ebf7ed;--color-secondary-100: #cdead3;--color-secondary-200: #acdcb5;--color-secondary-300: #8bce97;--color-secondary-400: #72c481;--color-secondary-500: #59b96b;--color-secondary-600: #51b263;--color-secondary-700: #48aa58;--color-secondary-800: #3ea24e;--color-secondary-900: #2e933c;--color-secondary-A100: #d9ffde;--color-secondary-A200: #a6ffb1;--color-secondary-A400: #73ff84;--color-secondary-A700: #59ff6e}fw-popover{display:none}.fw-popover-panel .fw-popover-content-wrapper{position:relative;background:#ffffff;border-radius:4px;box-shadow:0 1px 4px #00000026!important;border:1px solid #d6dbe5;padding:16px}.fw-popover-panel .fw-popover-content-wrapper .fw-popover-caret{position:absolute;overflow:hidden;width:25px;height:25px}.fw-popover-panel .fw-popover-content-wrapper .fw-popover-caret:after{display:block;content:\"\";width:16px;height:16px;background:#ffffff;box-shadow:0 1px 4px #00000026!important;border:1px solid #d6dbe5;transform:rotate(45deg);position:relative}.fw-popover-panel.fw-popover-above{margin-bottom:-20px;padding-bottom:20px}.fw-popover-panel.fw-popover-above .fw-popover-caret{left:0;bottom:-16px;height:16px}.fw-popover-panel.fw-popover-above .fw-popover-caret:after{margin:-8px auto}.fw-popover-panel.fw-popover-below{margin-top:-20px;padding-top:20px}.fw-popover-panel.fw-popover-below .fw-popover-caret{left:0;top:-16px;height:16px}.fw-popover-panel.fw-popover-below .fw-popover-caret:after{top:16px;margin:-8px auto}.fw-popover-panel.fw-popover-left{margin-right:-20px;padding-right:20px}.fw-popover-panel.fw-popover-left .fw-popover-caret{right:-16px;top:0;width:16px}.fw-popover-panel.fw-popover-left .fw-popover-caret:after{top:calc(50% - 8px);left:-8px}.fw-popover-panel.fw-popover-right{margin-left:-20px;padding-left:20px}.fw-popover-panel.fw-popover-right .fw-popover-caret{left:-16px;top:0;width:16px}.fw-popover-panel.fw-popover-right .fw-popover-caret:after{top:calc(50% - 8px);right:-8px}\n"] }]
1134
+ }], propDecorators: { templateRef: [{
1135
+ type: ViewChild,
1136
+ args: ['content']
1137
+ }] } });
1138
+
1139
+ class FwPopoverModule {
1140
+ }
1141
+ FwPopoverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1142
+ FwPopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverModule, declarations: [FwPopoverComponent,
1143
+ FwPopoverTriggerComponent,
1144
+ FwPopoverTriggerDirective], imports: [CommonModule], exports: [FwPopoverComponent,
1145
+ FwPopoverTriggerComponent,
1146
+ FwPopoverTriggerDirective] });
1147
+ FwPopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverModule, providers: [
1148
+ Overlay,
1149
+ ], imports: [[
1150
+ CommonModule,
1151
+ ]] });
1152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwPopoverModule, decorators: [{
1153
+ type: NgModule,
1154
+ args: [{
1155
+ imports: [
1156
+ CommonModule,
1157
+ ],
1158
+ exports: [
1159
+ FwPopoverComponent,
1160
+ FwPopoverTriggerComponent,
1161
+ FwPopoverTriggerDirective,
1162
+ ],
1163
+ declarations: [
1164
+ FwPopoverComponent,
1165
+ FwPopoverTriggerComponent,
1166
+ FwPopoverTriggerDirective,
1167
+ ],
1168
+ entryComponents: [
1169
+ FwPopoverComponent,
1170
+ FwPopoverTriggerComponent,
1171
+ ],
1172
+ providers: [
1173
+ Overlay,
1174
+ ],
1175
+ }]
1176
+ }] });
1177
+
1178
+ class FwTableComponent {
1179
+ constructor(changeDetectorRef) {
1180
+ this.changeDetectorRef = changeDetectorRef;
1181
+ this.columns = [];
1182
+ this.dataSource = [];
1183
+ this.layout = 'basic';
1184
+ this.pageSize = null;
1185
+ this.webCompPageSize = null;
1186
+ this.sort = null;
1187
+ this.sortColumn = '';
1188
+ this.sortOrder = 'asc';
1189
+ this.displayedColumns = [];
1190
+ this.filters = new FormGroup({});
1191
+ // to support updating column header labels
1192
+ this.trackByIndex = i => i;
1193
+ }
1194
+ ngOnInit() {
1195
+ this.setDataSource();
1196
+ this.setColumns();
1197
+ this.addFilterControls();
1198
+ this.setFilter();
1199
+ this.matDataSource.filterPredicate = (row, filter) => {
1200
+ const filters = JSON.parse(filter);
1201
+ for (const filter in filters) {
1202
+ const filterValue = filters[filter];
1203
+ const rowValue = row[filter];
1204
+ // multi-select
1205
+ if (Array.isArray(filterValue) && filterValue.length > 0 && !filterValue.includes(rowValue)) {
1206
+ return false;
1207
+ }
1208
+ // input or select
1209
+ if (!Array.isArray(filterValue) && !String(rowValue).toLowerCase().includes(String(filterValue ?? '').toLowerCase())) {
1210
+ return false;
1211
+ }
1212
+ }
1213
+ return true;
1214
+ };
1215
+ this.filters.valueChanges.pipe(debounceTime(200)).subscribe(() => this.setFilter());
1216
+ }
1217
+ ngAfterViewInit() {
1218
+ this.setSort();
1219
+ this.setPaginator();
1220
+ }
1221
+ ngOnChanges(changes) {
1222
+ if (changes.columns) {
1223
+ this.setColumns();
1224
+ }
1225
+ if (changes.dataSource) {
1226
+ this.setDataSource();
1227
+ }
1228
+ if (changes.sort || changes.dataSource) {
1229
+ this.setSort();
1230
+ }
1231
+ if (changes.pageSize || changes['page-size']) {
1232
+ this.setPaginator();
1233
+ }
1234
+ }
1235
+ get isCompact() {
1236
+ return this.layout === 'compact';
1237
+ }
1238
+ get paginationSize() {
1239
+ return this.pageSize || this.webCompPageSize || 0;
1240
+ }
1241
+ get isSortEnabled() {
1242
+ return this.sort !== null;
1243
+ }
1244
+ addFilterControls() {
1245
+ for (const column of this.columns) {
1246
+ this.filters.addControl(column.key, new FormControl());
1247
+ }
1248
+ }
1249
+ setDataSource() {
1250
+ this.matDataSource = new MatTableDataSource(this.dataSource);
1251
+ }
1252
+ setColumns() {
1253
+ this.displayedColumns = this.columns.map(column => column.key);
1254
+ }
1255
+ setFilter() {
1256
+ this.matDataSource.filter = JSON.stringify(this.filters.value);
1257
+ }
1258
+ setSort() {
1259
+ if (!this.matSort || this.sort === null) {
1260
+ return;
1261
+ }
1262
+ const sortSplit = this.sort.split(' ');
1263
+ this.sortColumn = sortSplit[0];
1264
+ if (['asc', 'desc'].includes(sortSplit[1])) {
1265
+ this.sortOrder = sortSplit[1];
1266
+ }
1267
+ else {
1268
+ console.warn(`Sort order '${sortSplit[1]}' is not 'asc' or 'desc', defaulting to 'asc'`);
1269
+ }
1270
+ if (this.sortColumn) {
1271
+ this.matSort.sort({ id: this.sortColumn, start: this.sortOrder, disableClear: false });
1272
+ const sortHeader = this.matSort.sortables.get(this.sortColumn);
1273
+ if (sortHeader) {
1274
+ sortHeader._setAnimationTransitionState({ toState: 'active' });
1275
+ }
1276
+ else {
1277
+ console.warn(`Unable to find sort column '${this.sortColumn}'. Initial sort failed.`);
1278
+ }
1279
+ }
1280
+ this.matDataSource.sort = this.matSort;
1281
+ }
1282
+ setPaginator() {
1283
+ // ensures ui updates correctly when paginator options change
1284
+ this.changeDetectorRef.detectChanges();
1285
+ this.matDataSource.paginator = this.matPaginator;
1286
+ }
1287
+ // necessary for web component to trigger this.filter.valueChanges
1288
+ onInputFilter(event, column) {
1289
+ // defer setting filter control as event.target.value is not set yet
1290
+ setTimeout(() => this.filters.get(column.key).setValue(event.target.value));
1291
+ }
1292
+ // necessary for web component to trigger this.filter.valueChanges
1293
+ onSelectFilter(event, column) {
1294
+ const innerText = event.target.innerText;
1295
+ this.filters.get(column.key).setValue(innerText === '- none -' ? null : innerText);
1296
+ }
1297
+ // necessary for web component to trigger this.filter.valueChanges
1298
+ onMultiSelectFilter(event, column) {
1299
+ let value = this.filters.controls[column.key].value || [];
1300
+ const innerText = event.target.parentElement.innerText;
1301
+ if (value.includes(innerText)) {
1302
+ value = value.filter(v => v !== innerText);
1303
+ }
1304
+ else {
1305
+ value.push(innerText);
1306
+ }
1307
+ this.filters.get(column.key).setValue(value.length === 1 && innerText === ''
1308
+ ? null // when all checboxes have been deselected
1309
+ : value);
1310
+ }
1311
+ }
1312
+ FwTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwTableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1313
+ FwTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FwTableComponent, selector: "fw-table", inputs: { columns: "columns", dataSource: "dataSource", layout: "layout", pageSize: "pageSize", webCompPageSize: ["page-size", "webCompPageSize"], sort: "sort" }, host: { properties: { "class.compact": "isCompact" }, classAttribute: "fw-table" }, viewQueries: [{ propertyName: "matPaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<table mat-table [dataSource]=\"matDataSource\" matSort>\n <ng-container *ngFor=\"let column of columns; trackBy: trackByIndex\">\n <ng-container [matColumnDef]=\"column.key\">\n\n <ng-template #tableHeaders>\n <ng-container [ngSwitch]=\"column.filter?.control\">\n <ng-container *ngSwitchCase=\"'input'\">\n <mat-form-field *ngIf=\"filters.get(column.key) as control\" appearance=\"outline\" (click)=\"$event.stopPropagation()\">\n <mat-label *ngIf=\"!isCompact\">{{ column.label }}</mat-label>\n <input matInput [formControl]=\"control\" [placeholder]=\"column.filter.placeholder\" (keydown)=\"$event.stopPropagation(); onInputFilter($event, column);\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"'select'\">\n <mat-form-field *ngIf=\"filters.get(column.key) as control\" appearance=\"outline\" (click)=\"$event.stopPropagation()\">\n <mat-label *ngIf=\"!isCompact\">{{ column.label }}</mat-label>\n <mat-select [formControl]=\"control\" [placeholder]=\"column.filter.placeholder\">\n <mat-option (click)=\"onSelectFilter($event, column);\">- none -</mat-option>\n <mat-option *ngFor=\"let option of column.filter.options\" [value]=\"option\" (click)=\"onSelectFilter($event, column);\">{{ option }}</mat-option>\n </mat-select>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <mat-form-field *ngIf=\"filters.get(column.key) as control\" appearance=\"outline\" (click)=\"$event.stopPropagation()\">\n <mat-label *ngIf=\"!isCompact\">{{ column.label }}</mat-label>\n <mat-select [formControl]=\"control\" [placeholder]=\"column.filter.placeholder\" multiple=\"true\">\n <mat-option *ngFor=\"let option of column.filter.options\" [value]=\"option\" (click)=\"onMultiSelectFilter($event, column);\">{{ option }}</mat-option>\n </mat-select>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ column.label }}</ng-container>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"isSortEnabled\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container [ngTemplateOutlet]=\"tableHeaders\"></ng-container>\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"!isSortEnabled\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container [ngTemplateOutlet]=\"tableHeaders\"></ng-container>\n </th>\n </ng-container>\n\n <td mat-cell *matCellDef=\"let element\"> {{ element[column.key] }} </td>\n </ng-container>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n<mat-paginator *ngIf=\"paginationSize > 0\" [pageSize]=\"paginationSize\"></mat-paginator>\n\n\n\n", styles: [":host{display:block;width:100%}:host:not(.compact) table.mat-table tr.mat-header-row,:host:not(.compact) table.mat-table tr.mat-row{height:56px}:host.compact table.mat-table tr.mat-header-row,:host.compact table.mat-table tr.mat-row{height:32px}:host.compact mat-paginator.mat-paginator{align-items:center;display:flex;height:32px;justify-content:flex-end}table.mat-table{width:100%}table.mat-table th,table.mat-table td{vertical-align:middle}table.mat-table th.mat-header-cell,table.mat-table th.mat-cell,table.mat-table td.mat-header-cell,table.mat-table td.mat-cell{border-bottom-color:var(--color-gray)}\n"], components: [{ type: i1$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i1$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i1$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i6.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i5$1.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.MatLabel, selector: "mat-label" }, { type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i1$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1$3.MatCellDef, selector: "[matCellDef]" }, { type: i1$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i1$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i1$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }] });
1314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwTableComponent, decorators: [{
1315
+ type: Component,
1316
+ args: [{ host: {
1317
+ 'class': 'fw-table',
1318
+ '[class.compact]': 'isCompact',
1319
+ }, selector: 'fw-table', template: "<table mat-table [dataSource]=\"matDataSource\" matSort>\n <ng-container *ngFor=\"let column of columns; trackBy: trackByIndex\">\n <ng-container [matColumnDef]=\"column.key\">\n\n <ng-template #tableHeaders>\n <ng-container [ngSwitch]=\"column.filter?.control\">\n <ng-container *ngSwitchCase=\"'input'\">\n <mat-form-field *ngIf=\"filters.get(column.key) as control\" appearance=\"outline\" (click)=\"$event.stopPropagation()\">\n <mat-label *ngIf=\"!isCompact\">{{ column.label }}</mat-label>\n <input matInput [formControl]=\"control\" [placeholder]=\"column.filter.placeholder\" (keydown)=\"$event.stopPropagation(); onInputFilter($event, column);\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"'select'\">\n <mat-form-field *ngIf=\"filters.get(column.key) as control\" appearance=\"outline\" (click)=\"$event.stopPropagation()\">\n <mat-label *ngIf=\"!isCompact\">{{ column.label }}</mat-label>\n <mat-select [formControl]=\"control\" [placeholder]=\"column.filter.placeholder\">\n <mat-option (click)=\"onSelectFilter($event, column);\">- none -</mat-option>\n <mat-option *ngFor=\"let option of column.filter.options\" [value]=\"option\" (click)=\"onSelectFilter($event, column);\">{{ option }}</mat-option>\n </mat-select>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"'multi-select'\">\n <mat-form-field *ngIf=\"filters.get(column.key) as control\" appearance=\"outline\" (click)=\"$event.stopPropagation()\">\n <mat-label *ngIf=\"!isCompact\">{{ column.label }}</mat-label>\n <mat-select [formControl]=\"control\" [placeholder]=\"column.filter.placeholder\" multiple=\"true\">\n <mat-option *ngFor=\"let option of column.filter.options\" [value]=\"option\" (click)=\"onMultiSelectFilter($event, column);\">{{ option }}</mat-option>\n </mat-select>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ column.label }}</ng-container>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"isSortEnabled\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container [ngTemplateOutlet]=\"tableHeaders\"></ng-container>\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"!isSortEnabled\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container [ngTemplateOutlet]=\"tableHeaders\"></ng-container>\n </th>\n </ng-container>\n\n <td mat-cell *matCellDef=\"let element\"> {{ element[column.key] }} </td>\n </ng-container>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n<mat-paginator *ngIf=\"paginationSize > 0\" [pageSize]=\"paginationSize\"></mat-paginator>\n\n\n\n", styles: [":host{display:block;width:100%}:host:not(.compact) table.mat-table tr.mat-header-row,:host:not(.compact) table.mat-table tr.mat-row{height:56px}:host.compact table.mat-table tr.mat-header-row,:host.compact table.mat-table tr.mat-row{height:32px}:host.compact mat-paginator.mat-paginator{align-items:center;display:flex;height:32px;justify-content:flex-end}table.mat-table{width:100%}table.mat-table th,table.mat-table td{vertical-align:middle}table.mat-table th.mat-header-cell,table.mat-table th.mat-cell,table.mat-table td.mat-header-cell,table.mat-table td.mat-cell{border-bottom-color:var(--color-gray)}\n"] }]
1320
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
1321
+ type: Input
1322
+ }], dataSource: [{
1323
+ type: Input
1324
+ }], layout: [{
1325
+ type: Input
1326
+ }], pageSize: [{
1327
+ type: Input
1328
+ }], webCompPageSize: [{
1329
+ type: Input,
1330
+ args: ['page-size']
1331
+ }], sort: [{
1332
+ type: Input
1333
+ }], matPaginator: [{
1334
+ type: ViewChild,
1335
+ args: [MatPaginator]
1336
+ }], matSort: [{
1337
+ type: ViewChild,
1338
+ args: [MatSort]
1339
+ }] } });
1340
+
1341
+ class FwTableModule {
1342
+ }
1343
+ FwTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1344
+ FwTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwTableModule, declarations: [FwTableComponent], imports: [CommonModule,
1345
+ FormsModule,
1346
+ ReactiveFormsModule,
1347
+ MatInputModule,
1348
+ MatPaginatorModule,
1349
+ MatSelectModule,
1350
+ MatSortModule,
1351
+ MatTableModule], exports: [FwTableComponent] });
1352
+ FwTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwTableModule, imports: [[
1353
+ CommonModule,
1354
+ FormsModule,
1355
+ ReactiveFormsModule,
1356
+ MatInputModule,
1357
+ MatPaginatorModule,
1358
+ MatSelectModule,
1359
+ MatSortModule,
1360
+ MatTableModule,
1361
+ ]] });
1362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FwTableModule, decorators: [{
1363
+ type: NgModule,
1364
+ args: [{
1365
+ imports: [
1366
+ CommonModule,
1367
+ FormsModule,
1368
+ ReactiveFormsModule,
1369
+ MatInputModule,
1370
+ MatPaginatorModule,
1371
+ MatSelectModule,
1372
+ MatSortModule,
1373
+ MatTableModule,
1374
+ ],
1375
+ exports: [
1376
+ FwTableComponent,
1377
+ ],
1378
+ declarations: [
1379
+ FwTableComponent,
1380
+ ],
1381
+ entryComponents: [
1382
+ FwTableComponent,
1383
+ ]
1384
+ }]
1385
+ }] });
1386
+
1387
+ /**
1388
+ * Generated bundle index. Do not edit.
1389
+ */
1390
+
1391
+ export { FwButtonComponent, FwButtonGroupComponent, FwButtonGroupModule, FwButtonModule, FwChoiceDialog, FwConfirmDialog, FwDialogModule, FwDialogService, FwErrorDialog, FwIconComponent, FwIconModule, FwNotificationComponent, FwNotificationContainerComponent, FwNotificationModule, FwNotificationService, FwNotificationType, FwPopoverComponent, FwPopoverModule, FwPopoverTriggerComponent, FwPopoverTriggerDirective, FwPortalDialog, FwTableComponent, FwTableModule, MinimalTranslationService, TranslationService, genId };
1392
+ //# sourceMappingURL=flywheel-io-vision.mjs.map