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