@flywheel-io/vision 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/components/dialog/choice-dialog.component.d.ts +8 -5
  2. package/elements/README.md +20 -0
  3. package/elements/package.json +5 -5
  4. package/{esm2015/components/button/button.component.js → esm2020/components/button/button.component.mjs} +6 -11
  5. package/{esm2015/components/button/button.module.js → esm2020/components/button/button.module.mjs} +4 -4
  6. package/{esm2015/components/button-group/button-group.component.js → esm2020/components/button-group/button-group.component.mjs} +6 -12
  7. package/{esm2015/components/button-group/button-group.module.js → esm2020/components/button-group/button-group.module.mjs} +4 -4
  8. package/esm2020/components/dialog/choice-dialog.component.mjs +90 -0
  9. package/{esm2015/components/dialog/confirm-dialog.component.js → esm2020/components/dialog/confirm-dialog.component.mjs} +4 -4
  10. package/{esm2015/components/dialog/dialog.module.js → esm2020/components/dialog/dialog.module.mjs} +4 -4
  11. package/esm2020/components/dialog/dialog.service.mjs +72 -0
  12. package/{esm2015/components/dialog/error-dialog.component.js → esm2020/components/dialog/error-dialog.component.mjs} +4 -4
  13. package/esm2020/components/dialog/portal-dialog.component.mjs +112 -0
  14. package/{esm2015/components/icon/icon.component.js → esm2020/components/icon/icon.component.mjs} +3 -3
  15. package/{esm2015/components/icon/icon.module.js → esm2020/components/icon/icon.module.mjs} +4 -4
  16. package/esm2020/components/notification/notification/notification.component.mjs +69 -0
  17. package/{esm2015/components/notification/notification/notification.model.js → esm2020/components/notification/notification/notification.model.mjs} +0 -0
  18. package/esm2020/components/notification/notification-container/notification-container.component.mjs +86 -0
  19. package/{esm2015/components/notification/notification-timer.service.js → esm2020/components/notification/notification-timer.service.mjs} +0 -0
  20. package/{esm2015/components/notification/notification.module.js → esm2020/components/notification/notification.module.mjs} +4 -4
  21. package/{esm2015/components/notification/notification.service.js → esm2020/components/notification/notification.service.mjs} +3 -3
  22. package/{esm2015/components/popover/popover-trigger.component.js → esm2020/components/popover/popover-trigger.component.mjs} +3 -3
  23. package/esm2020/components/popover/popover-trigger.directive.mjs +133 -0
  24. package/esm2020/components/popover/popover.component.mjs +29 -0
  25. package/{esm2015/components/popover/popover.module.js → esm2020/components/popover/popover.module.mjs} +4 -4
  26. package/{esm2015/components/shared/pipes/pipes.module.js → esm2020/components/shared/pipes/pipes.module.mjs} +4 -4
  27. package/{esm2015/components/shared/pipes/translate.pipe.js → esm2020/components/shared/pipes/translate.pipe.mjs} +3 -3
  28. package/{esm2015/components/shared/pipes/trusthtml.pipe.js → esm2020/components/shared/pipes/trusthtml.pipe.mjs} +3 -3
  29. package/{esm2015/components/shared/translation.service.js → esm2020/components/shared/translation.service.mjs} +3 -3
  30. package/esm2020/components/table/table.component.mjs +179 -0
  31. package/{esm2015/components/table/table.module.js → esm2020/components/table/table.module.mjs} +4 -4
  32. package/{esm2015/elements/elements.js → esm2020/elements/elements.mjs} +4 -4
  33. package/{esm2015/elements/flywheel-io-vision-elements.js → esm2020/elements/flywheel-io-vision-elements.mjs} +0 -0
  34. package/{esm2015/elements/polyfills.js → esm2020/elements/polyfills.mjs} +0 -0
  35. package/{esm2015/elements/public-api.js → esm2020/elements/public-api.mjs} +0 -0
  36. package/{esm2015/flywheel-io-vision.js → esm2020/flywheel-io-vision.mjs} +0 -0
  37. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  38. package/fesm2015/{flywheel-io-vision-elements.js → flywheel-io-vision-elements.mjs} +5 -5
  39. package/fesm2015/flywheel-io-vision-elements.mjs.map +1 -0
  40. package/fesm2015/{flywheel-io-vision.js → flywheel-io-vision.mjs} +148 -165
  41. package/fesm2015/flywheel-io-vision.mjs.map +1 -0
  42. package/fesm2020/flywheel-io-vision-elements.mjs +85 -0
  43. package/fesm2020/flywheel-io-vision-elements.mjs.map +1 -0
  44. package/fesm2020/flywheel-io-vision.mjs +1392 -0
  45. package/fesm2020/flywheel-io-vision.mjs.map +1 -0
  46. package/package.json +43 -18
  47. package/scss/atoms/ghost.scss +30 -0
  48. package/scss/config/theme.scss +6 -6
  49. package/scss/material/overrides.scss +6 -1
  50. package/styles.css +156 -94
  51. package/styles.scss +8 -9
  52. package/bundles/flywheel-io-vision-elements.umd.js +0 -449
  53. package/bundles/flywheel-io-vision-elements.umd.js.map +0 -1
  54. package/bundles/flywheel-io-vision.umd.js +0 -1800
  55. package/bundles/flywheel-io-vision.umd.js.map +0 -1
  56. package/esm2015/components/dialog/choice-dialog.component.js +0 -78
  57. package/esm2015/components/dialog/dialog.service.js +0 -69
  58. package/esm2015/components/dialog/portal-dialog.component.js +0 -113
  59. package/esm2015/components/notification/notification/notification.component.js +0 -78
  60. package/esm2015/components/notification/notification-container/notification-container.component.js +0 -93
  61. package/esm2015/components/popover/popover-trigger.directive.js +0 -135
  62. package/esm2015/components/popover/popover.component.js +0 -35
  63. package/esm2015/components/table/table.component.js +0 -184
  64. package/fesm2015/flywheel-io-vision-elements.js.map +0 -1
  65. package/fesm2015/flywheel-io-vision.js.map +0 -1
@@ -1,1800 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/button'), require('@angular/common'), require('@angular/material/dialog'), require('@angular/platform-browser'), require('rxjs'), require('@angular/cdk/portal'), require('@angular/material/icon'), require('rxjs/operators'), require('@angular/cdk/overlay'), require('@angular/forms'), require('@angular/material/paginator'), require('@angular/material/sort'), require('@angular/material/table'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/core'), require('@angular/material/input')) :
3
- typeof define === 'function' && define.amd ? define('@flywheel-io/vision', ['exports', '@angular/core', '@angular/material/button', '@angular/common', '@angular/material/dialog', '@angular/platform-browser', 'rxjs', '@angular/cdk/portal', '@angular/material/icon', 'rxjs/operators', '@angular/cdk/overlay', '@angular/forms', '@angular/material/paginator', '@angular/material/sort', '@angular/material/table', '@angular/material/form-field', '@angular/material/select', '@angular/material/core', '@angular/material/input'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["flywheel-io"] = global["flywheel-io"] || {}, global["flywheel-io"].vision = {}), global.ng.core, global.ng.material.button, global.ng.common, global.ng.material.dialog, global.ng.platformBrowser, global.rxjs, global.ng.cdk.portal, global.ng.material.icon, global.rxjs.operators, global.ng.cdk.overlay, global.ng.forms, global.ng.material.paginator, global.ng.material.sort, global.ng.material.table, global.ng.material.formField, global.ng.material.select, global.ng.material.core, global.ng.material.input));
5
- })(this, (function (exports, i0, i1, i2, i3, i1$1, rxjs, i5, i2$1, operators, i1$2, i9, i6, i5$1, i1$3, i2$2, i3$1, i4, i8) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
30
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
31
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
32
- var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
33
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
34
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
35
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
36
- var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
37
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
38
- var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
39
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
40
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
41
-
42
- var FwButtonGroupComponent = /** @class */ (function () {
43
- function FwButtonGroupComponent() {
44
- this.layout = 'basic';
45
- this.size = 'medium';
46
- }
47
- return FwButtonGroupComponent;
48
- }());
49
- FwButtonGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonGroupComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
50
- FwButtonGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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__namespace, 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__namespace.ViewEncapsulation.None });
51
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonGroupComponent, decorators: [{
52
- type: i0.Component,
53
- args: [{
54
- host: {
55
- 'class': 'fw-button-group',
56
- '[class.small]': 'size === "small"',
57
- '[class.medium]': 'size === "medium"',
58
- '[class.large]': 'size === "large"',
59
- '[class.compact]': 'layout === "compact"',
60
- },
61
- selector: 'fw-button-group',
62
- styleUrls: ['./button-group.component.scss'],
63
- template: "<ng-content></ng-content>",
64
- encapsulation: i0.ViewEncapsulation.None,
65
- }]
66
- }], propDecorators: { layout: [{
67
- type: i0.Input
68
- }], size: [{
69
- type: i0.Input
70
- }] } });
71
-
72
- var FwButtonGroupModule = /** @class */ (function () {
73
- function FwButtonGroupModule() {
74
- }
75
- return FwButtonGroupModule;
76
- }());
77
- FwButtonGroupModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonGroupModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
78
- FwButtonGroupModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonGroupModule, declarations: [FwButtonGroupComponent], exports: [FwButtonGroupComponent] });
79
- FwButtonGroupModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonGroupModule });
80
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonGroupModule, decorators: [{
81
- type: i0.NgModule,
82
- args: [{
83
- exports: [
84
- FwButtonGroupComponent,
85
- ],
86
- declarations: [
87
- FwButtonGroupComponent,
88
- ],
89
- entryComponents: [
90
- FwButtonGroupComponent,
91
- ]
92
- }]
93
- }] });
94
-
95
- var FwButtonComponent = /** @class */ (function () {
96
- function FwButtonComponent() {
97
- this.layout = 'basic';
98
- this.size = 'medium';
99
- this.type = 'basic';
100
- }
101
- return FwButtonComponent;
102
- }());
103
- FwButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
104
- FwButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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__namespace, 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__namespace.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: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
105
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonComponent, decorators: [{
106
- type: i0.Component,
107
- args: [{
108
- host: {
109
- 'class': 'fw-button',
110
- '[class.small]': 'size === "small"',
111
- '[class.medium]': 'size === "medium"',
112
- '[class.large]': 'size === "large"',
113
- '[class.compact]': 'layout === "compact"',
114
- },
115
- selector: 'fw-button',
116
- styleUrls: ['./button.component.scss'],
117
- templateUrl: './button.component.html',
118
- }]
119
- }], propDecorators: { color: [{
120
- type: i0.Input
121
- }], layout: [{
122
- type: i0.Input
123
- }], size: [{
124
- type: i0.Input
125
- }], type: [{
126
- type: i0.Input
127
- }] } });
128
-
129
- var FwButtonModule = /** @class */ (function () {
130
- function FwButtonModule() {
131
- }
132
- return FwButtonModule;
133
- }());
134
- FwButtonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
135
- FwButtonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonModule, declarations: [FwButtonComponent], imports: [i2.CommonModule,
136
- i1.MatButtonModule], exports: [FwButtonComponent] });
137
- FwButtonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonModule, imports: [[
138
- i2.CommonModule,
139
- i1.MatButtonModule,
140
- ]] });
141
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwButtonModule, decorators: [{
142
- type: i0.NgModule,
143
- args: [{
144
- imports: [
145
- i2.CommonModule,
146
- i1.MatButtonModule,
147
- ],
148
- exports: [
149
- FwButtonComponent,
150
- ],
151
- declarations: [
152
- FwButtonComponent,
153
- ],
154
- entryComponents: [
155
- FwButtonComponent,
156
- ],
157
- }]
158
- }] });
159
-
160
- var FwChoiceDialog = /** @class */ (function () {
161
- function FwChoiceDialog(data) {
162
- this.data = data;
163
- this.alignActions = this.data.alignActions
164
- ? this.data.alignActions === 'start'
165
- ? null
166
- : this.data.alignActions
167
- : 'center';
168
- this.choices = this.data.choices;
169
- this.content = this.data.content;
170
- this.title = this.data.title;
171
- }
172
- FwChoiceDialog.prototype.getTestId = function (choice) {
173
- var _a;
174
- return choice.testId || String((_a = choice.label) !== null && _a !== void 0 ? _a : choice.value).toLowerCase() + "-button";
175
- };
176
- return FwChoiceDialog;
177
- }());
178
- FwChoiceDialog.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwChoiceDialog, deps: [{ token: i3.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
179
- FwChoiceDialog.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwChoiceDialog, selector: "fw-choice-dialog", host: { attributes: { "test-id": "choice-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0__namespace, template: "\n <h1 mat-dialog-title *ngIf=\"title\">{{ title }}</h1>\n <div mat-dialog-content>{{ content }}</div>\n <div mat-dialog-actions [align]=\"alignActions\">\n <ng-container *ngFor=\"let choice of choices\" [ngSwitch]=\"choice.variant\">\n <button *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <ng-container *ngSwitchDefault>\n <button *ngIf=\"choice.color\" mat-flat-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngIf=\"!choice.color\" mat-stroked-button [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n </ng-container>\n </ng-container>\n </div>\n ", isInline: true, components: [{ type: i1__namespace.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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
180
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwChoiceDialog, decorators: [{
181
- type: i0.Component,
182
- args: [{
183
- host: {
184
- class: 'mat-dialog-component',
185
- 'test-id': 'choice-dialog',
186
- },
187
- selector: 'fw-choice-dialog',
188
- template: "\n <h1 mat-dialog-title *ngIf=\"title\">{{ title }}</h1>\n <div mat-dialog-content>{{ content }}</div>\n <div mat-dialog-actions [align]=\"alignActions\">\n <ng-container *ngFor=\"let choice of choices\" [ngSwitch]=\"choice.variant\">\n <button *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <ng-container *ngSwitchDefault>\n <button *ngIf=\"choice.color\" mat-flat-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngIf=\"!choice.color\" mat-stroked-button [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n </ng-container>\n </ng-container>\n </div>\n ",
189
- }]
190
- }], ctorParameters: function () {
191
- return [{ type: undefined, decorators: [{
192
- type: i0.Inject,
193
- args: [i3.MAT_DIALOG_DATA]
194
- }] }];
195
- } });
196
-
197
- var TrustHtmlPipe = /** @class */ (function () {
198
- function TrustHtmlPipe(sanitizer) {
199
- this.sanitizer = sanitizer;
200
- }
201
- TrustHtmlPipe.prototype.transform = function (html) {
202
- return this.sanitizer.bypassSecurityTrustHtml(html);
203
- };
204
- return TrustHtmlPipe;
205
- }());
206
- TrustHtmlPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TrustHtmlPipe, deps: [{ token: i1__namespace$1.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
207
- TrustHtmlPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TrustHtmlPipe, name: "trusthtml" });
208
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TrustHtmlPipe, decorators: [{
209
- type: i0.Pipe,
210
- args: [{
211
- name: 'trusthtml',
212
- pure: true,
213
- }]
214
- }], ctorParameters: function () { return [{ type: i1__namespace$1.DomSanitizer }]; } });
215
-
216
- /******************************************************************************
217
- Copyright (c) Microsoft Corporation.
218
-
219
- Permission to use, copy, modify, and/or distribute this software for any
220
- purpose with or without fee is hereby granted.
221
-
222
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
223
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
224
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
225
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
226
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
227
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
228
- PERFORMANCE OF THIS SOFTWARE.
229
- ***************************************************************************** */
230
- /* global Reflect, Promise */
231
- var extendStatics = function (d, b) {
232
- extendStatics = Object.setPrototypeOf ||
233
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
234
- function (d, b) { for (var p in b)
235
- if (Object.prototype.hasOwnProperty.call(b, p))
236
- d[p] = b[p]; };
237
- return extendStatics(d, b);
238
- };
239
- function __extends(d, b) {
240
- if (typeof b !== "function" && b !== null)
241
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
242
- extendStatics(d, b);
243
- function __() { this.constructor = d; }
244
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
245
- }
246
- var __assign = function () {
247
- __assign = Object.assign || function __assign(t) {
248
- for (var s, i = 1, n = arguments.length; i < n; i++) {
249
- s = arguments[i];
250
- for (var p in s)
251
- if (Object.prototype.hasOwnProperty.call(s, p))
252
- t[p] = s[p];
253
- }
254
- return t;
255
- };
256
- return __assign.apply(this, arguments);
257
- };
258
- function __rest(s, e) {
259
- var t = {};
260
- for (var p in s)
261
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
262
- t[p] = s[p];
263
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
264
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
265
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
266
- t[p[i]] = s[p[i]];
267
- }
268
- return t;
269
- }
270
- function __decorate(decorators, target, key, desc) {
271
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
272
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
273
- r = Reflect.decorate(decorators, target, key, desc);
274
- else
275
- for (var i = decorators.length - 1; i >= 0; i--)
276
- if (d = decorators[i])
277
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
278
- return c > 3 && r && Object.defineProperty(target, key, r), r;
279
- }
280
- function __param(paramIndex, decorator) {
281
- return function (target, key) { decorator(target, key, paramIndex); };
282
- }
283
- function __metadata(metadataKey, metadataValue) {
284
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
285
- return Reflect.metadata(metadataKey, metadataValue);
286
- }
287
- function __awaiter(thisArg, _arguments, P, generator) {
288
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
289
- return new (P || (P = Promise))(function (resolve, reject) {
290
- function fulfilled(value) { try {
291
- step(generator.next(value));
292
- }
293
- catch (e) {
294
- reject(e);
295
- } }
296
- function rejected(value) { try {
297
- step(generator["throw"](value));
298
- }
299
- catch (e) {
300
- reject(e);
301
- } }
302
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
303
- step((generator = generator.apply(thisArg, _arguments || [])).next());
304
- });
305
- }
306
- function __generator(thisArg, body) {
307
- var _ = { label: 0, sent: function () { if (t[0] & 1)
308
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
309
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
310
- function verb(n) { return function (v) { return step([n, v]); }; }
311
- function step(op) {
312
- if (f)
313
- throw new TypeError("Generator is already executing.");
314
- while (_)
315
- try {
316
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
317
- return t;
318
- if (y = 0, t)
319
- op = [op[0] & 2, t.value];
320
- switch (op[0]) {
321
- case 0:
322
- case 1:
323
- t = op;
324
- break;
325
- case 4:
326
- _.label++;
327
- return { value: op[1], done: false };
328
- case 5:
329
- _.label++;
330
- y = op[1];
331
- op = [0];
332
- continue;
333
- case 7:
334
- op = _.ops.pop();
335
- _.trys.pop();
336
- continue;
337
- default:
338
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
339
- _ = 0;
340
- continue;
341
- }
342
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
343
- _.label = op[1];
344
- break;
345
- }
346
- if (op[0] === 6 && _.label < t[1]) {
347
- _.label = t[1];
348
- t = op;
349
- break;
350
- }
351
- if (t && _.label < t[2]) {
352
- _.label = t[2];
353
- _.ops.push(op);
354
- break;
355
- }
356
- if (t[2])
357
- _.ops.pop();
358
- _.trys.pop();
359
- continue;
360
- }
361
- op = body.call(thisArg, _);
362
- }
363
- catch (e) {
364
- op = [6, e];
365
- y = 0;
366
- }
367
- finally {
368
- f = t = 0;
369
- }
370
- if (op[0] & 5)
371
- throw op[1];
372
- return { value: op[0] ? op[1] : void 0, done: true };
373
- }
374
- }
375
- var __createBinding = Object.create ? (function (o, m, k, k2) {
376
- if (k2 === undefined)
377
- k2 = k;
378
- var desc = Object.getOwnPropertyDescriptor(m, k);
379
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
380
- desc = { enumerable: true, get: function () { return m[k]; } };
381
- }
382
- Object.defineProperty(o, k2, desc);
383
- }) : (function (o, m, k, k2) {
384
- if (k2 === undefined)
385
- k2 = k;
386
- o[k2] = m[k];
387
- });
388
- function __exportStar(m, o) {
389
- for (var p in m)
390
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
391
- __createBinding(o, m, p);
392
- }
393
- function __values(o) {
394
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
395
- if (m)
396
- return m.call(o);
397
- if (o && typeof o.length === "number")
398
- return {
399
- next: function () {
400
- if (o && i >= o.length)
401
- o = void 0;
402
- return { value: o && o[i++], done: !o };
403
- }
404
- };
405
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
406
- }
407
- function __read(o, n) {
408
- var m = typeof Symbol === "function" && o[Symbol.iterator];
409
- if (!m)
410
- return o;
411
- var i = m.call(o), r, ar = [], e;
412
- try {
413
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
414
- ar.push(r.value);
415
- }
416
- catch (error) {
417
- e = { error: error };
418
- }
419
- finally {
420
- try {
421
- if (r && !r.done && (m = i["return"]))
422
- m.call(i);
423
- }
424
- finally {
425
- if (e)
426
- throw e.error;
427
- }
428
- }
429
- return ar;
430
- }
431
- /** @deprecated */
432
- function __spread() {
433
- for (var ar = [], i = 0; i < arguments.length; i++)
434
- ar = ar.concat(__read(arguments[i]));
435
- return ar;
436
- }
437
- /** @deprecated */
438
- function __spreadArrays() {
439
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
440
- s += arguments[i].length;
441
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
442
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
443
- r[k] = a[j];
444
- return r;
445
- }
446
- function __spreadArray(to, from, pack) {
447
- if (pack || arguments.length === 2)
448
- for (var i = 0, l = from.length, ar; i < l; i++) {
449
- if (ar || !(i in from)) {
450
- if (!ar)
451
- ar = Array.prototype.slice.call(from, 0, i);
452
- ar[i] = from[i];
453
- }
454
- }
455
- return to.concat(ar || Array.prototype.slice.call(from));
456
- }
457
- function __await(v) {
458
- return this instanceof __await ? (this.v = v, this) : new __await(v);
459
- }
460
- function __asyncGenerator(thisArg, _arguments, generator) {
461
- if (!Symbol.asyncIterator)
462
- throw new TypeError("Symbol.asyncIterator is not defined.");
463
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
464
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
465
- function verb(n) { if (g[n])
466
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
467
- function resume(n, v) { try {
468
- step(g[n](v));
469
- }
470
- catch (e) {
471
- settle(q[0][3], e);
472
- } }
473
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
474
- function fulfill(value) { resume("next", value); }
475
- function reject(value) { resume("throw", value); }
476
- function settle(f, v) { if (f(v), q.shift(), q.length)
477
- resume(q[0][0], q[0][1]); }
478
- }
479
- function __asyncDelegator(o) {
480
- var i, p;
481
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
482
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
483
- }
484
- function __asyncValues(o) {
485
- if (!Symbol.asyncIterator)
486
- throw new TypeError("Symbol.asyncIterator is not defined.");
487
- var m = o[Symbol.asyncIterator], i;
488
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
489
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
490
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
491
- }
492
- function __makeTemplateObject(cooked, raw) {
493
- if (Object.defineProperty) {
494
- Object.defineProperty(cooked, "raw", { value: raw });
495
- }
496
- else {
497
- cooked.raw = raw;
498
- }
499
- return cooked;
500
- }
501
- ;
502
- var __setModuleDefault = Object.create ? (function (o, v) {
503
- Object.defineProperty(o, "default", { enumerable: true, value: v });
504
- }) : function (o, v) {
505
- o["default"] = v;
506
- };
507
- function __importStar(mod) {
508
- if (mod && mod.__esModule)
509
- return mod;
510
- var result = {};
511
- if (mod != null)
512
- for (var k in mod)
513
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
514
- __createBinding(result, mod, k);
515
- __setModuleDefault(result, mod);
516
- return result;
517
- }
518
- function __importDefault(mod) {
519
- return (mod && mod.__esModule) ? mod : { default: mod };
520
- }
521
- function __classPrivateFieldGet(receiver, state, kind, f) {
522
- if (kind === "a" && !f)
523
- throw new TypeError("Private accessor was defined without a getter");
524
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
525
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
526
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
527
- }
528
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
529
- if (kind === "m")
530
- throw new TypeError("Private method is not writable");
531
- if (kind === "a" && !f)
532
- throw new TypeError("Private accessor was defined without a setter");
533
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
534
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
535
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
536
- }
537
- function __classPrivateFieldIn(state, receiver) {
538
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
539
- throw new TypeError("Cannot use 'in' operator on non-object");
540
- return typeof state === "function" ? receiver === state : state.has(receiver);
541
- }
542
-
543
- var TranslationService = /** @class */ (function () {
544
- function TranslationService() {
545
- }
546
- return TranslationService;
547
- }());
548
- /**
549
- * Very basic i18n implementation. Consumer apps can provide their own implementation of TranslationService to override.
550
- */
551
- var MinimalTranslationService = /** @class */ (function () {
552
- function MinimalTranslationService() {
553
- }
554
- MinimalTranslationService.prototype.getMessage = function (key, silent) {
555
- return rxjs.of(MinimalTranslationService.messages[key]);
556
- };
557
- return MinimalTranslationService;
558
- }());
559
- MinimalTranslationService.messages = {
560
- 'common.actions.close': 'Close',
561
- 'confirmDialog.body': 'Are you sure?',
562
- 'confirmDialog.no': 'No',
563
- 'confirmDialog.yes': 'Yes',
564
- };
565
- MinimalTranslationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MinimalTranslationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
566
- MinimalTranslationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MinimalTranslationService });
567
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MinimalTranslationService, decorators: [{
568
- type: i0.Injectable
569
- }] });
570
-
571
- /**
572
- * Translate a message given a nested key to a location in the loaded locale copy.
573
- */
574
- var TranslatePipe = /** @class */ (function () {
575
- function TranslatePipe(cdr, translationService) {
576
- this.cdr = cdr;
577
- this.translationService = translationService;
578
- this.subscriptions = {};
579
- this.messages = {};
580
- }
581
- TranslatePipe.prototype.ngOnDestroy = function () {
582
- var e_1, _a;
583
- try {
584
- for (var _b = __values(Object.values(this.subscriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
585
- var subscription = _c.value;
586
- subscription.unsubscribe();
587
- }
588
- }
589
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
590
- finally {
591
- try {
592
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
593
- }
594
- finally { if (e_1) throw e_1.error; }
595
- }
596
- };
597
- TranslatePipe.prototype.transform = function (key, silent) {
598
- var _this = this;
599
- if (silent === void 0) { silent = false; }
600
- if (!(key in this.subscriptions)) {
601
- this.subscriptions[key] = this.translationService.getMessage(key, silent).subscribe(function (message) {
602
- _this.messages[key] = message;
603
- // trigger change detection to support components with ChangeDetectionStrategy.OnPush
604
- _this.cdr.markForCheck();
605
- });
606
- }
607
- return this.messages[key] || '';
608
- };
609
- return TranslatePipe;
610
- }());
611
- TranslatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TranslatePipe, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: TranslationService }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
612
- TranslatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TranslatePipe, name: "translate", pure: false });
613
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TranslatePipe, decorators: [{
614
- type: i0.Pipe,
615
- args: [{
616
- name: 'translate',
617
- pure: false,
618
- }]
619
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: TranslationService }]; } });
620
-
621
- var FwConfirmDialog = /** @class */ (function () {
622
- function FwConfirmDialog(data) {
623
- this.data = data;
624
- this.title = this.data.title;
625
- this.content = this.data.content;
626
- this.html = this.data.html;
627
- }
628
- return FwConfirmDialog;
629
- }());
630
- FwConfirmDialog.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwConfirmDialog, deps: [{ token: i3.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
631
- FwConfirmDialog.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwConfirmDialog, selector: "fw-confirm-dialog", host: { attributes: { "test-id": "confirm-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0__namespace, template: "\n <h1 mat-dialog-title *ngIf=\"title\">{{ title }}</h1>\n <div mat-dialog-content *ngIf=\"html\" class=\"markup\" [innerHTML]=\"html | trusthtml\"></div>\n <div mat-dialog-content *ngIf=\"!html\">{{ content || ('confirmDialog.body' | translate ) }}</div>\n <div mat-dialog-actions align=\"center\">\n <button test-id=\"no-button\" mat-stroked-button [mat-dialog-close]=\"false\">{{ 'confirmDialog.no' | translate }}</button>\n <button test-id=\"yes-button\" mat-flat-button color=\"primary\" [mat-dialog-close]=\"true\">{{ 'confirmDialog.yes' | translate }}</button>\n </div>\n ", isInline: true, styles: ["\n [mat-dialog-content] {\n text-align: center;\n }\n [mat-dialog-content].markup {\n text-align: inherit;\n }\n "], components: [{ type: i1__namespace.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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i3__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "trusthtml": TrustHtmlPipe, "translate": TranslatePipe } });
632
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwConfirmDialog, decorators: [{
633
- type: i0.Component,
634
- args: [{
635
- host: {
636
- class: 'mat-dialog-component',
637
- 'test-id': 'confirm-dialog',
638
- },
639
- selector: 'fw-confirm-dialog',
640
- template: "\n <h1 mat-dialog-title *ngIf=\"title\">{{ title }}</h1>\n <div mat-dialog-content *ngIf=\"html\" class=\"markup\" [innerHTML]=\"html | trusthtml\"></div>\n <div mat-dialog-content *ngIf=\"!html\">{{ content || ('confirmDialog.body' | translate ) }}</div>\n <div mat-dialog-actions align=\"center\">\n <button test-id=\"no-button\" mat-stroked-button [mat-dialog-close]=\"false\">{{ 'confirmDialog.no' | translate }}</button>\n <button test-id=\"yes-button\" mat-flat-button color=\"primary\" [mat-dialog-close]=\"true\">{{ 'confirmDialog.yes' | translate }}</button>\n </div>\n ",
641
- styles: ["\n [mat-dialog-content] {\n text-align: center;\n }\n [mat-dialog-content].markup {\n text-align: inherit;\n }\n "],
642
- }]
643
- }], ctorParameters: function () {
644
- return [{ type: undefined, decorators: [{
645
- type: i0.Inject,
646
- args: [i3.MAT_DIALOG_DATA]
647
- }] }];
648
- } });
649
-
650
- var FwDialogService = /** @class */ (function () {
651
- function FwDialogService(matDialog) {
652
- this.matDialog = matDialog;
653
- this.dialogs = [];
654
- this.config = new Map();
655
- }
656
- FwDialogService.prototype.closeAll = function (component) {
657
- if (component) {
658
- this.dialogs
659
- .filter(function (el) { return el.component === component; })
660
- .forEach(function (el) { return el.ref.close(); });
661
- }
662
- else {
663
- this.matDialog.closeAll();
664
- }
665
- };
666
- FwDialogService.prototype.open = function (component, config) {
667
- var _this = this;
668
- var index = this.dialogs.findIndex(function (el) { return el.component === component; });
669
- var ref = null;
670
- var baseConfig = Object.assign({ multi: 'allow' }, this.config.get(component));
671
- switch (baseConfig.multi) {
672
- case 'ignore':
673
- // if an existing dialog of the same type doesn't exist, open one
674
- if (index === -1) {
675
- ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
676
- this.dialogs.push({ component: component, ref: ref });
677
- }
678
- break;
679
- case 'replace':
680
- // if an existing dialog of the same type exists, replace it.
681
- if (index > -1) {
682
- this.dialogs[index].ref.close();
683
- ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
684
- this.dialogs.splice(index, 1, { component: component, ref: ref });
685
- }
686
- else {
687
- ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
688
- this.dialogs.push({ component: component, ref: ref });
689
- }
690
- break;
691
- default:
692
- ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
693
- this.dialogs.push({ component: component, ref: ref });
694
- break;
695
- }
696
- if (ref) {
697
- ref.afterClosed().subscribe(function () {
698
- // clean up open dialog reference
699
- var index = _this.dialogs.findIndex(function (el) { return el.ref === ref; });
700
- if (index >= 0) {
701
- _this.dialogs.splice(index, 1);
702
- }
703
- });
704
- }
705
- return ref;
706
- };
707
- FwDialogService.prototype.registerDialog = function (component, config) {
708
- this.config.set(component, config);
709
- };
710
- return FwDialogService;
711
- }());
712
- FwDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogService, deps: [{ token: i3__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
713
- FwDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogService });
714
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogService, decorators: [{
715
- type: i0.Injectable
716
- }], ctorParameters: function () { return [{ type: i3__namespace.MatDialog }]; } });
717
-
718
- var FwErrorDialog = /** @class */ (function () {
719
- function FwErrorDialog(data, ref) {
720
- this.data = data;
721
- this.ref = ref;
722
- this.message = this.data.message;
723
- this.ref.disableClose = false;
724
- }
725
- return FwErrorDialog;
726
- }());
727
- FwErrorDialog.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwErrorDialog, deps: [{ token: i3.MAT_DIALOG_DATA }, { token: i3__namespace.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
728
- FwErrorDialog.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwErrorDialog, selector: "fw-error-dialog", host: { attributes: { "test-id": "error-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0__namespace, template: "\n <div mat-dialog-content>{{ message }}</div>\n <div mat-dialog-actions align=\"end\">\n <button test-id=\"close-button\" mat-stroked-button mat-dialog-close>\n {{ 'common.actions.close' | translate }}\n </button>\n </div>\n ", isInline: true, components: [{ type: i1__namespace.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__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i3__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "translate": TranslatePipe } });
729
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwErrorDialog, decorators: [{
730
- type: i0.Component,
731
- args: [{
732
- host: {
733
- class: 'mat-dialog-component',
734
- 'test-id': 'error-dialog',
735
- },
736
- selector: 'fw-error-dialog',
737
- template: "\n <div mat-dialog-content>{{ message }}</div>\n <div mat-dialog-actions align=\"end\">\n <button test-id=\"close-button\" mat-stroked-button mat-dialog-close>\n {{ 'common.actions.close' | translate }}\n </button>\n </div>\n ",
738
- }]
739
- }], ctorParameters: function () {
740
- return [{ type: undefined, decorators: [{
741
- type: i0.Inject,
742
- args: [i3.MAT_DIALOG_DATA]
743
- }] }, { type: i3__namespace.MatDialogRef }];
744
- } });
745
-
746
- var FwPortalDialog = /** @class */ (function () {
747
- function FwPortalDialog(data, viewContainerRef) {
748
- this.data = data;
749
- this.viewContainerRef = viewContainerRef;
750
- this.content = this.data.content;
751
- this.title = this.data.title;
752
- this.destroyed$ = new rxjs.Subject();
753
- if (this.data.component) {
754
- this.portal = new i5.ComponentPortal(this.data.component.type, this.viewContainerRef);
755
- }
756
- else if (this.data.template) {
757
- this.portal = new i5.TemplatePortal(this.data.template, this.viewContainerRef);
758
- }
759
- else {
760
- throw new Error('One of [component, template] was not provided.');
761
- }
762
- }
763
- FwPortalDialog.prototype.ngOnDestroy = function () {
764
- this.destroyed$.next();
765
- };
766
- FwPortalDialog.prototype.attached = function (ref) {
767
- var e_1, _c, e_2, _d;
768
- var _a, _b;
769
- if (this.data.component) {
770
- ref = ref;
771
- if (this.data.component.outputs) {
772
- try {
773
- for (var _e = __values(Object.entries(this.data.component.outputs)), _f = _e.next(); !_f.done; _f = _e.next()) {
774
- var _g = __read(_f.value, 2), key = _g[0], observer = _g[1];
775
- var output$ = ref[key];
776
- if (typeof (output$ === null || output$ === void 0 ? void 0 : output$.pipe) === 'function' && typeof output$.subscribe === 'function') {
777
- output$.pipe(operators.takeUntil(this.destroyed$)).subscribe(observer);
778
- }
779
- }
780
- }
781
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
782
- finally {
783
- try {
784
- if (_f && !_f.done && (_c = _e.return)) _c.call(_e);
785
- }
786
- finally { if (e_1) throw e_1.error; }
787
- }
788
- }
789
- if (this.data.component.inputs) {
790
- var changes = {};
791
- try {
792
- for (var _h = __values(Object.entries(this.data.component.inputs)), _j = _h.next(); !_j.done; _j = _h.next()) {
793
- var _k = __read(_j.value, 2), key = _k[0], value = _k[1];
794
- ref.instance[key] = value;
795
- changes[key] = new i0.SimpleChange(value, value, true);
796
- }
797
- }
798
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
799
- finally {
800
- try {
801
- if (_j && !_j.done && (_d = _h.return)) _d.call(_h);
802
- }
803
- finally { if (e_2) throw e_2.error; }
804
- }
805
- (_b = (_a = ref.instance).ngOnChanges) === null || _b === void 0 ? void 0 : _b.call(_a, changes);
806
- ref.changeDetectorRef.markForCheck();
807
- }
808
- }
809
- };
810
- return FwPortalDialog;
811
- }());
812
- FwPortalDialog.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPortalDialog, deps: [{ token: i3.MAT_DIALOG_DATA }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
813
- FwPortalDialog.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwPortalDialog, selector: "fw-portal-dialog", host: { attributes: { "test-id": "portal-dialog" }, classAttribute: "mat-dialog-component" }, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"title\">\n <h1 mat-dialog-title>{{ title }}</h1>\n <button test-id=\"dialog-close-corner\" mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n <mat-dialog-content>\n <p *ngIf=\"content\" class=\"content\">{{ content }}</p>\n <ng-template [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-template>\n </mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button test-id=\"dialog-close-button\" mat-stroked-button mat-dialog-close>\n {{ 'common.actions.close' | translate }}\n </button>\n </mat-dialog-actions>\n ", isInline: true, styles: ["\n :host {\n min-width: 200px;\n }\n .content {\n margin-bottom: 30px;\n }\n "], components: [{ type: i1__namespace.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__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i3__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i3__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], pipes: { "translate": TranslatePipe } });
814
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPortalDialog, decorators: [{
815
- type: i0.Component,
816
- args: [{
817
- host: {
818
- class: 'mat-dialog-component',
819
- 'test-id': 'portal-dialog',
820
- },
821
- selector: 'fw-portal-dialog',
822
- template: "\n <ng-container *ngIf=\"title\">\n <h1 mat-dialog-title>{{ title }}</h1>\n <button test-id=\"dialog-close-corner\" mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n <mat-dialog-content>\n <p *ngIf=\"content\" class=\"content\">{{ content }}</p>\n <ng-template [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-template>\n </mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button test-id=\"dialog-close-button\" mat-stroked-button mat-dialog-close>\n {{ 'common.actions.close' | translate }}\n </button>\n </mat-dialog-actions>\n ",
823
- styles: ["\n :host {\n min-width: 200px;\n }\n .content {\n margin-bottom: 30px;\n }\n "],
824
- }]
825
- }], ctorParameters: function () {
826
- return [{ type: undefined, decorators: [{
827
- type: i0.Inject,
828
- args: [i3.MAT_DIALOG_DATA]
829
- }] }, { type: i0__namespace.ViewContainerRef }];
830
- } });
831
-
832
- var exports$1 = [
833
- TranslatePipe,
834
- TrustHtmlPipe,
835
- ];
836
- var PipesModule = /** @class */ (function () {
837
- function PipesModule() {
838
- }
839
- return PipesModule;
840
- }());
841
- PipesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PipesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
842
- PipesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PipesModule, declarations: [TranslatePipe,
843
- TrustHtmlPipe], exports: [TranslatePipe,
844
- TrustHtmlPipe] });
845
- PipesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PipesModule, providers: [
846
- {
847
- provide: TranslationService,
848
- useClass: MinimalTranslationService,
849
- },
850
- ] });
851
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PipesModule, decorators: [{
852
- type: i0.NgModule,
853
- args: [{
854
- declarations: exports$1,
855
- exports: exports$1,
856
- providers: [
857
- {
858
- provide: TranslationService,
859
- useClass: MinimalTranslationService,
860
- },
861
- ],
862
- }]
863
- }] });
864
-
865
- var FwDialogModule = /** @class */ (function () {
866
- function FwDialogModule() {
867
- }
868
- return FwDialogModule;
869
- }());
870
- FwDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
871
- FwDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogModule, declarations: [FwChoiceDialog,
872
- FwConfirmDialog,
873
- FwErrorDialog,
874
- FwPortalDialog], imports: [i2.CommonModule,
875
- i1.MatButtonModule,
876
- i3.MatDialogModule,
877
- i2$1.MatIconModule,
878
- PipesModule,
879
- i5.PortalModule] });
880
- FwDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogModule, providers: [
881
- FwDialogService,
882
- {
883
- provide: i3.MAT_DIALOG_DEFAULT_OPTIONS,
884
- useValue: {
885
- disableClose: true,
886
- hasBackdrop: true,
887
- }
888
- }
889
- ], imports: [[
890
- i2.CommonModule,
891
- i1.MatButtonModule,
892
- i3.MatDialogModule,
893
- i2$1.MatIconModule,
894
- PipesModule,
895
- i5.PortalModule,
896
- ]] });
897
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwDialogModule, decorators: [{
898
- type: i0.NgModule,
899
- args: [{
900
- declarations: [
901
- FwChoiceDialog,
902
- FwConfirmDialog,
903
- FwErrorDialog,
904
- FwPortalDialog,
905
- ],
906
- imports: [
907
- i2.CommonModule,
908
- i1.MatButtonModule,
909
- i3.MatDialogModule,
910
- i2$1.MatIconModule,
911
- PipesModule,
912
- i5.PortalModule,
913
- ],
914
- providers: [
915
- FwDialogService,
916
- {
917
- provide: i3.MAT_DIALOG_DEFAULT_OPTIONS,
918
- useValue: {
919
- disableClose: true,
920
- hasBackdrop: true,
921
- }
922
- }
923
- ],
924
- }]
925
- }] });
926
-
927
- var FwIconComponent = /** @class */ (function () {
928
- function FwIconComponent() {
929
- }
930
- return FwIconComponent;
931
- }());
932
- FwIconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwIconComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
933
- FwIconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwIconComponent, selector: "fw-icon", host: { attributes: { "role": "img" }, classAttribute: "vision-icon" }, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
934
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwIconComponent, decorators: [{
935
- type: i0.Component,
936
- args: [{
937
- host: {
938
- 'role': 'img',
939
- 'class': 'vision-icon', // apply icon font to glyph content
940
- },
941
- selector: 'fw-icon',
942
- template: '<ng-content></ng-content>',
943
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
944
- }]
945
- }] });
946
-
947
- var FwIconModule = /** @class */ (function () {
948
- function FwIconModule() {
949
- }
950
- return FwIconModule;
951
- }());
952
- FwIconModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwIconModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
953
- FwIconModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwIconModule, declarations: [FwIconComponent], imports: [i2.CommonModule], exports: [FwIconComponent] });
954
- FwIconModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwIconModule, imports: [[
955
- i2.CommonModule,
956
- ]] });
957
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwIconModule, decorators: [{
958
- type: i0.NgModule,
959
- args: [{
960
- imports: [
961
- i2.CommonModule,
962
- ],
963
- exports: [
964
- FwIconComponent,
965
- ],
966
- declarations: [
967
- FwIconComponent,
968
- ],
969
- }]
970
- }] });
971
-
972
- function genId() {
973
- return String.prototype.padStart(24, Math.floor(Math.random() * Date.now()).toString(16));
974
- }
975
- var FwNotificationService = /** @class */ (function () {
976
- function FwNotificationService() {
977
- this.notifications$ = new rxjs.BehaviorSubject([]);
978
- this.notificationQueue = [];
979
- }
980
- FwNotificationService.prototype.show = function (notification) {
981
- if (!notification.id) {
982
- notification.id = genId();
983
- }
984
- this.notificationQueue.push(notification);
985
- this.notifications$.next(this.notificationQueue);
986
- };
987
- FwNotificationService.prototype.dismiss = function (notificationId) {
988
- this.notificationQueue = this.notificationQueue.filter(function (v) { return v.id !== notificationId; });
989
- this.notifications$.next(this.notificationQueue);
990
- };
991
- FwNotificationService.prototype.dismissAll = function () {
992
- this.notificationQueue = [];
993
- this.notifications$.next(this.notificationQueue);
994
- };
995
- return FwNotificationService;
996
- }());
997
- FwNotificationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
998
- FwNotificationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationService, providedIn: 'root' });
999
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationService, decorators: [{
1000
- type: i0.Injectable,
1001
- args: [{
1002
- providedIn: 'root'
1003
- }]
1004
- }] });
1005
-
1006
- var FwNotificationTimerService = /** @class */ (function () {
1007
- function FwNotificationTimerService() {
1008
- this.now = 0;
1009
- this.remainingDuration = 0;
1010
- }
1011
- FwNotificationTimerService.prototype.start = function (duration) {
1012
- var _this = this;
1013
- return new Promise(function (resolve) {
1014
- _this.remainingDuration = duration;
1015
- _this.resolver = resolve;
1016
- _this.continue();
1017
- });
1018
- };
1019
- FwNotificationTimerService.prototype.stop = function () {
1020
- clearTimeout(this.timerId);
1021
- this.remainingDuration = 0;
1022
- };
1023
- FwNotificationTimerService.prototype.pause = function () {
1024
- clearTimeout(this.timerId);
1025
- this.remainingDuration =
1026
- this.remainingDuration - new Date().getTime() - this.now;
1027
- };
1028
- FwNotificationTimerService.prototype.continue = function () {
1029
- var _this = this;
1030
- this.now = new Date().getTime();
1031
- this.timerId = window.setTimeout(function () {
1032
- _this.resolver();
1033
- }, this.remainingDuration);
1034
- };
1035
- return FwNotificationTimerService;
1036
- }());
1037
-
1038
- exports.FwNotificationType = void 0;
1039
- (function (FwNotificationType) {
1040
- FwNotificationType["Error"] = "error";
1041
- FwNotificationType["Info"] = "info";
1042
- FwNotificationType["Success"] = "success";
1043
- FwNotificationType["Wait"] = "wait";
1044
- FwNotificationType["Warning"] = "warning";
1045
- })(exports.FwNotificationType || (exports.FwNotificationType = {}));
1046
-
1047
- var FwNotificationComponent = /** @class */ (function () {
1048
- function FwNotificationComponent(cdr, timerService) {
1049
- this.cdr = cdr;
1050
- this.timerService = timerService;
1051
- this.notificationDuration = 9000;
1052
- this.ready = new i0.EventEmitter();
1053
- this.dismiss = new i0.EventEmitter();
1054
- }
1055
- Object.defineProperty(FwNotificationComponent.prototype, "cssClass", {
1056
- get: function () {
1057
- var _a;
1058
- var cssClass = 'fw-notification';
1059
- switch ((_a = this.notification) === null || _a === void 0 ? void 0 : _a.type) {
1060
- case exports.FwNotificationType.Error:
1061
- return cssClass += ' error';
1062
- case exports.FwNotificationType.Info:
1063
- return cssClass += ' info';
1064
- case exports.FwNotificationType.Success:
1065
- return cssClass += ' success';
1066
- case exports.FwNotificationType.Wait:
1067
- return cssClass += ' wait';
1068
- case exports.FwNotificationType.Warning:
1069
- return cssClass += ' warning';
1070
- default:
1071
- return cssClass;
1072
- }
1073
- },
1074
- enumerable: false,
1075
- configurable: true
1076
- });
1077
- FwNotificationComponent.prototype.ngAfterViewInit = function () {
1078
- this.ready.emit(this);
1079
- this.cdr.markForCheck();
1080
- };
1081
- FwNotificationComponent.prototype.startTimer = function () {
1082
- var _this = this;
1083
- this.timerService.start(this.notificationDuration).then(function () {
1084
- _this.onClickDismiss();
1085
- _this.cdr.markForCheck();
1086
- });
1087
- };
1088
- FwNotificationComponent.prototype.stopTimer = function () {
1089
- this.timerService.stop();
1090
- this.cdr.markForCheck();
1091
- };
1092
- FwNotificationComponent.prototype.onClickDismiss = function () {
1093
- this.dismiss.emit(this.notification.id);
1094
- this.cdr.markForCheck();
1095
- };
1096
- return FwNotificationComponent;
1097
- }());
1098
- FwNotificationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: FwNotificationTimerService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1099
- FwNotificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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__namespace, 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__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1100
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationComponent, decorators: [{
1101
- type: i0.Component,
1102
- args: [{
1103
- host: {
1104
- '(click)': 'onClickDismiss()'
1105
- },
1106
- selector: 'fw-notification',
1107
- styleUrls: ['./notification.component.scss'],
1108
- template: "{{ notification?.message }}",
1109
- providers: [FwNotificationTimerService],
1110
- encapsulation: i0.ViewEncapsulation.None,
1111
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1112
- }]
1113
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: FwNotificationTimerService }]; }, propDecorators: { notification: [{
1114
- type: i0.Input
1115
- }], notificationDuration: [{
1116
- type: i0.Input
1117
- }], ready: [{
1118
- type: i0.Output
1119
- }], dismiss: [{
1120
- type: i0.Output
1121
- }], cssClass: [{
1122
- type: i0.HostBinding,
1123
- args: ['class']
1124
- }] } });
1125
-
1126
- var FwNotificationContainerComponent = /** @class */ (function () {
1127
- function FwNotificationContainerComponent(cdr, notificationService) {
1128
- var _this = this;
1129
- this.cdr = cdr;
1130
- this.notificationService = notificationService;
1131
- this.limit = 3;
1132
- this.notifications = [];
1133
- this.expanded = false;
1134
- this.subscriptions = {
1135
- notifications: rxjs.Subscription.EMPTY,
1136
- };
1137
- this.subscriptions.notifications = this.notificationService.notifications$.subscribe(function (notifications) {
1138
- _this.notifications = notifications;
1139
- if (notifications.length === 0) {
1140
- _this.expanded = false;
1141
- }
1142
- _this.cdr.markForCheck();
1143
- });
1144
- }
1145
- FwNotificationContainerComponent.prototype.ngOnDestroy = function () {
1146
- var e_1, _a;
1147
- try {
1148
- for (var _b = __values(Object.values(this.subscriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
1149
- var subscription = _c.value;
1150
- subscription.unsubscribe();
1151
- }
1152
- }
1153
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1154
- finally {
1155
- try {
1156
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1157
- }
1158
- finally { if (e_1) throw e_1.error; }
1159
- }
1160
- };
1161
- FwNotificationContainerComponent.prototype.notificationClass = function (index) {
1162
- var cssClass;
1163
- var level = this.notifications.length > this.limit
1164
- ? index - (this.notifications.length - this.limit)
1165
- : index;
1166
- if (this.expanded) {
1167
- cssClass = 'default';
1168
- }
1169
- else {
1170
- cssClass = level >= 0 ? "level-" + level : 'hidden';
1171
- }
1172
- return cssClass;
1173
- };
1174
- FwNotificationContainerComponent.prototype.getEmptyNotification = function (notification) {
1175
- return Object.assign(Object.assign({}, notification), { message: ' ' }); // take up a line but show no content
1176
- };
1177
- FwNotificationContainerComponent.prototype.onReady = function (notification) {
1178
- var currentNotification = this.notifications[this.notifications.length - 1];
1179
- currentNotification.ref = notification;
1180
- notification.startTimer();
1181
- };
1182
- FwNotificationContainerComponent.prototype.onDismiss = function (notificationId) {
1183
- var notification = this.notifications.find(function (currentNotification) { return currentNotification.id === notificationId; });
1184
- if (notification === null || notification === void 0 ? void 0 : notification.ref) {
1185
- notification.ref.stopTimer();
1186
- }
1187
- if (notification === null || notification === void 0 ? void 0 : notification.id) {
1188
- this.notificationService.dismiss(notification.id);
1189
- }
1190
- this.cdr.markForCheck();
1191
- };
1192
- FwNotificationContainerComponent.prototype.clearAll = function () {
1193
- this.notificationService.dismissAll();
1194
- this.cdr.markForCheck();
1195
- };
1196
- FwNotificationContainerComponent.prototype.onShowMore = function () {
1197
- this.expanded = true;
1198
- this.cdr.markForCheck();
1199
- };
1200
- FwNotificationContainerComponent.prototype.onShowLess = function () {
1201
- this.expanded = false;
1202
- this.cdr.markForCheck();
1203
- };
1204
- return FwNotificationContainerComponent;
1205
- }());
1206
- FwNotificationContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationContainerComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: FwNotificationService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1207
- FwNotificationContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwNotificationContainerComponent, selector: "fw-notification-container", host: { properties: { "class.duo": "notifications.length === 2", "class.triple": "notifications.length >= 3" }, classAttribute: "fw-notification-container" }, ngImport: i0__namespace, 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__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1208
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationContainerComponent, decorators: [{
1209
- type: i0.Component,
1210
- args: [{
1211
- host: {
1212
- 'class': 'fw-notification-container',
1213
- '[class.duo]': 'notifications.length === 2',
1214
- '[class.triple]': 'notifications.length >= 3',
1215
- },
1216
- selector: 'fw-notification-container',
1217
- templateUrl: './notification-container.component.html',
1218
- styleUrls: ['./notification-container.component.scss'],
1219
- encapsulation: i0.ViewEncapsulation.None,
1220
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1221
- }]
1222
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: FwNotificationService }]; } });
1223
-
1224
- var FwNotificationModule = /** @class */ (function () {
1225
- function FwNotificationModule() {
1226
- }
1227
- return FwNotificationModule;
1228
- }());
1229
- FwNotificationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1230
- FwNotificationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationModule, declarations: [FwNotificationComponent,
1231
- FwNotificationContainerComponent], imports: [i2.CommonModule,
1232
- FwButtonModule,
1233
- FwButtonGroupModule,
1234
- i1.MatButtonModule,
1235
- i2$1.MatIconModule], exports: [FwNotificationComponent,
1236
- FwNotificationContainerComponent] });
1237
- FwNotificationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationModule, providers: [
1238
- FwNotificationService,
1239
- ], imports: [[
1240
- i2.CommonModule,
1241
- FwButtonModule,
1242
- FwButtonGroupModule,
1243
- i1.MatButtonModule,
1244
- i2$1.MatIconModule,
1245
- ]] });
1246
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwNotificationModule, decorators: [{
1247
- type: i0.NgModule,
1248
- args: [{
1249
- imports: [
1250
- i2.CommonModule,
1251
- FwButtonModule,
1252
- FwButtonGroupModule,
1253
- i1.MatButtonModule,
1254
- i2$1.MatIconModule,
1255
- ],
1256
- exports: [
1257
- FwNotificationComponent,
1258
- FwNotificationContainerComponent
1259
- ],
1260
- declarations: [
1261
- FwNotificationComponent,
1262
- FwNotificationContainerComponent,
1263
- ],
1264
- entryComponents: [
1265
- FwNotificationComponent,
1266
- ],
1267
- providers: [
1268
- FwNotificationService,
1269
- ]
1270
- }]
1271
- }] });
1272
-
1273
- var FwPopoverTriggerDirective = /** @class */ (function () {
1274
- function FwPopoverTriggerDirective(element, overlay, viewContainerRef) {
1275
- this.element = element;
1276
- this.overlay = overlay;
1277
- this.viewContainerRef = viewContainerRef;
1278
- this.popoverMargin = 15;
1279
- this.positionMap = {
1280
- 'left': { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },
1281
- 'right': { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },
1282
- 'above': { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },
1283
- 'below': { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },
1284
- };
1285
- this.position = 'below';
1286
- this.subscriptions = {
1287
- positionChanges: rxjs.Subscription.EMPTY,
1288
- };
1289
- }
1290
- FwPopoverTriggerDirective.prototype.ngOnChanges = function (changes) {
1291
- if (changes.position && this.overlayRef) {
1292
- this.overlayRef.dispose();
1293
- this.overlayRef = null;
1294
- }
1295
- };
1296
- FwPopoverTriggerDirective.prototype.ngOnDestroy = function () {
1297
- var e_1, _b;
1298
- if (this.overlayRef) {
1299
- this.overlayRef.dispose();
1300
- this.overlayRef = null;
1301
- }
1302
- try {
1303
- for (var _c = __values(Object.values(this.subscriptions)), _d = _c.next(); !_d.done; _d = _c.next()) {
1304
- var subscription = _d.value;
1305
- subscription.unsubscribe();
1306
- }
1307
- }
1308
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1309
- finally {
1310
- try {
1311
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
1312
- }
1313
- finally { if (e_1) throw e_1.error; }
1314
- }
1315
- };
1316
- FwPopoverTriggerDirective.prototype.showPopover = function () {
1317
- var _a;
1318
- if ((_a = this.popover) === null || _a === void 0 ? void 0 : _a.templateRef) {
1319
- this.getOverlay().attach(new i5.TemplatePortal(this.popover.templateRef, this.viewContainerRef));
1320
- }
1321
- };
1322
- FwPopoverTriggerDirective.prototype.hidePopover = function (e) {
1323
- var _a;
1324
- if (!((_a = e.relatedTarget) === null || _a === void 0 ? void 0 : _a.classList.contains('fw-popover-panel'))) {
1325
- this.getOverlay().detach();
1326
- }
1327
- };
1328
- FwPopoverTriggerDirective.prototype.setPopoverCaretPosition = function (position) {
1329
- var caret = this.overlayRef.overlayElement.querySelector('.fw-popover-caret');
1330
- var caretRect = this.overlayRef.overlayElement.getBoundingClientRect();
1331
- var triggerRect = this.element.nativeElement.getBoundingClientRect();
1332
- this.overlayRef.overlayElement.querySelector('.fw-popover-content-wrapper').style.margin = this.popoverMargin + "px";
1333
- if (['left', 'right', 'before', 'after'].includes(position)) {
1334
- caret.style.top = triggerRect.top - caretRect.top - this.popoverMargin + (triggerRect.height / 2) + "px";
1335
- }
1336
- else {
1337
- caret.style.left = triggerRect.left - caretRect.left - this.popoverMargin + (triggerRect.width / 2) + "px";
1338
- }
1339
- };
1340
- FwPopoverTriggerDirective.prototype.setPopoverPosition = function (positionChange) {
1341
- var position = this.positionMap[this.mainPosition] === positionChange.connectionPair
1342
- ? this.mainPosition
1343
- : this.positionMap[this.fallbackPosition] === positionChange.connectionPair
1344
- ? this.fallbackPosition
1345
- : this.mainPosition;
1346
- this.overlayRef.removePanelClass(['fw-popover-above', 'fw-popover-below', 'fw-popover-left', 'fw-popover-right']);
1347
- this.overlayRef.addPanelClass("fw-popover-" + position);
1348
- this.setPopoverCaretPosition(position);
1349
- };
1350
- FwPopoverTriggerDirective.prototype.getOverlay = function () {
1351
- var _this = this;
1352
- if (!this.overlayRef) {
1353
- this.overlayRef = this.overlay.create({
1354
- positionStrategy: this.overlay.position()
1355
- .flexibleConnectedTo(this.element)
1356
- .withPositions(this.getPositions()),
1357
- panelClass: 'fw-popover-panel',
1358
- });
1359
- this.overlayRef.overlayElement.addEventListener('mouseleave', function (e) { return _this.hidePopover(e); });
1360
- this.subscriptions.positionChanges = this.overlayRef.getConfig().positionStrategy.positionChanges
1361
- .subscribe(function (positionChange) { return _this.setPopoverPosition(positionChange); });
1362
- }
1363
- return this.overlayRef;
1364
- };
1365
- FwPopoverTriggerDirective.prototype.getMainPosition = function () {
1366
- return this.mainPosition =
1367
- ['left', 'before'].includes(this.position)
1368
- ? 'left'
1369
- : ['right', 'after'].includes(this.position)
1370
- ? 'right'
1371
- : this.position === 'above'
1372
- ? 'above'
1373
- : 'below';
1374
- };
1375
- FwPopoverTriggerDirective.prototype.getFallbackPosition = function () {
1376
- return this.fallbackPosition =
1377
- ['left', 'before'].includes(this.position)
1378
- ? 'right'
1379
- : ['right', 'after'].includes(this.position)
1380
- ? 'left'
1381
- : this.position === 'above'
1382
- ? 'below'
1383
- : 'above';
1384
- };
1385
- FwPopoverTriggerDirective.prototype.getPositions = function () {
1386
- return [
1387
- // main position
1388
- this.positionMap[this.getMainPosition()],
1389
- // fallback position (inverse of main)
1390
- this.positionMap[this.getFallbackPosition()],
1391
- ];
1392
- };
1393
- return FwPopoverTriggerDirective;
1394
- }());
1395
- FwPopoverTriggerDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverTriggerDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.Overlay }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1396
- FwPopoverTriggerDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", 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__namespace });
1397
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverTriggerDirective, decorators: [{
1398
- type: i0.Directive,
1399
- args: [{
1400
- host: {
1401
- 'class': 'fw-popover-trigger',
1402
- '(mouseenter)': 'showPopover()',
1403
- '(mouseleave)': 'hidePopover($event)',
1404
- },
1405
- selector: '[fwPopoverTriggerFor]',
1406
- exportAs: 'fwPopoverTrigger',
1407
- }]
1408
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$2.Overlay }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { popover: [{
1409
- type: i0.Input,
1410
- args: ['fwPopoverTriggerFor']
1411
- }], position: [{
1412
- type: i0.Input,
1413
- args: ['fwPopoverPosition']
1414
- }] } });
1415
-
1416
- var FwPopoverTriggerComponent = /** @class */ (function (_super) {
1417
- __extends(FwPopoverTriggerComponent, _super);
1418
- function FwPopoverTriggerComponent(element, overlay, viewContainerRef) {
1419
- var _this = _super.call(this, element, overlay, viewContainerRef) || this;
1420
- _this.element = element;
1421
- _this.overlay = overlay;
1422
- _this.viewContainerRef = viewContainerRef;
1423
- _this.position = 'below';
1424
- return _this;
1425
- }
1426
- FwPopoverTriggerComponent.prototype.showPopover = function () {
1427
- var overlay = this.getOverlay();
1428
- overlay.detach();
1429
- if (this.popoverId) {
1430
- // as a web component it is not possible to have a reference to this.popover
1431
- this.popoverHTML = document.querySelector("fw-popover#" + this.popoverId).innerHTML;
1432
- overlay.attach(new i5.TemplatePortal(this.popoverTemplateRef, this.viewContainerRef));
1433
- }
1434
- };
1435
- return FwPopoverTriggerComponent;
1436
- }(FwPopoverTriggerDirective));
1437
- FwPopoverTriggerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverTriggerComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.Overlay }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1438
- FwPopoverTriggerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i0.TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>\n <!-- for web component support -->\n <ng-template>\n <div [innerHTML]=\"popoverHTML\"></div>\n </ng-template>", isInline: true });
1439
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverTriggerComponent, decorators: [{
1440
- type: i0.Component,
1441
- args: [{
1442
- host: {
1443
- 'class': 'fw-popover-trigger',
1444
- '(mouseenter)': 'showPopover()',
1445
- '(mouseleave)': 'hidePopover($event)',
1446
- },
1447
- selector: 'fw-popover-trigger',
1448
- template: "<ng-content></ng-content>\n <!-- for web component support -->\n <ng-template>\n <div [innerHTML]=\"popoverHTML\"></div>\n </ng-template>",
1449
- }]
1450
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$2.Overlay }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { popoverId: [{
1451
- type: i0.Input,
1452
- args: ['trigger-for']
1453
- }], position: [{
1454
- type: i0.Input,
1455
- args: ['position']
1456
- }], popoverTemplateRef: [{
1457
- type: i0.ViewChild,
1458
- args: [i0.TemplateRef]
1459
- }] } });
1460
-
1461
- var FwPopoverComponent = /** @class */ (function () {
1462
- function FwPopoverComponent() {
1463
- }
1464
- return FwPopoverComponent;
1465
- }());
1466
- FwPopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1467
- FwPopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FwPopoverComponent, selector: "fw-popover", host: { classAttribute: "fw-popover" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true }], ngImport: i0__namespace, template: "\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ng-template #content>\n <div class=\"fw-popover-content-wrapper\">\n <ng-content></ng-content>\n <div class=\"fw-popover-caret\"></div>\n </div>\n </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:0px;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:0px;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: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
1468
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverComponent, decorators: [{
1469
- type: i0.Component,
1470
- args: [{
1471
- host: { 'class': 'fw-popover' },
1472
- selector: 'fw-popover',
1473
- styleUrls: ['./popover.component.scss'],
1474
- template: "\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <ng-template #content>\n <div class=\"fw-popover-content-wrapper\">\n <ng-content></ng-content>\n <div class=\"fw-popover-caret\"></div>\n </div>\n </ng-template>",
1475
- encapsulation: i0.ViewEncapsulation.None,
1476
- }]
1477
- }], propDecorators: { templateRef: [{
1478
- type: i0.ViewChild,
1479
- args: ['content']
1480
- }] } });
1481
-
1482
- var FwPopoverModule = /** @class */ (function () {
1483
- function FwPopoverModule() {
1484
- }
1485
- return FwPopoverModule;
1486
- }());
1487
- FwPopoverModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1488
- FwPopoverModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverModule, declarations: [FwPopoverComponent,
1489
- FwPopoverTriggerComponent,
1490
- FwPopoverTriggerDirective], imports: [i2.CommonModule], exports: [FwPopoverComponent,
1491
- FwPopoverTriggerComponent,
1492
- FwPopoverTriggerDirective] });
1493
- FwPopoverModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverModule, providers: [
1494
- i1$2.Overlay,
1495
- ], imports: [[
1496
- i2.CommonModule,
1497
- ]] });
1498
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwPopoverModule, decorators: [{
1499
- type: i0.NgModule,
1500
- args: [{
1501
- imports: [
1502
- i2.CommonModule,
1503
- ],
1504
- exports: [
1505
- FwPopoverComponent,
1506
- FwPopoverTriggerComponent,
1507
- FwPopoverTriggerDirective,
1508
- ],
1509
- declarations: [
1510
- FwPopoverComponent,
1511
- FwPopoverTriggerComponent,
1512
- FwPopoverTriggerDirective,
1513
- ],
1514
- entryComponents: [
1515
- FwPopoverComponent,
1516
- FwPopoverTriggerComponent,
1517
- ],
1518
- providers: [
1519
- i1$2.Overlay,
1520
- ],
1521
- }]
1522
- }] });
1523
-
1524
- var FwTableComponent = /** @class */ (function () {
1525
- function FwTableComponent(changeDetectorRef) {
1526
- this.changeDetectorRef = changeDetectorRef;
1527
- this.columns = [];
1528
- this.dataSource = [];
1529
- this.layout = 'basic';
1530
- this.pageSize = null;
1531
- this.webCompPageSize = null;
1532
- this.sort = null;
1533
- this.sortColumn = '';
1534
- this.sortOrder = 'asc';
1535
- this.displayedColumns = [];
1536
- this.filters = new i9.FormGroup({});
1537
- // to support updating column header labels
1538
- this.trackByIndex = function (i) { return i; };
1539
- }
1540
- FwTableComponent.prototype.ngOnInit = function () {
1541
- var _this = this;
1542
- this.setDataSource();
1543
- this.setColumns();
1544
- this.addFilterControls();
1545
- this.setFilter();
1546
- this.matDataSource.filterPredicate = function (row, filter) {
1547
- var filters = JSON.parse(filter);
1548
- for (var filter_1 in filters) {
1549
- var filterValue = filters[filter_1];
1550
- var rowValue = row[filter_1];
1551
- // multi-select
1552
- if (Array.isArray(filterValue) && filterValue.length > 0 && !filterValue.includes(rowValue)) {
1553
- return false;
1554
- }
1555
- // input or select
1556
- if (!Array.isArray(filterValue) && !String(rowValue).toLowerCase().includes(String(filterValue !== null && filterValue !== void 0 ? filterValue : '').toLowerCase())) {
1557
- return false;
1558
- }
1559
- }
1560
- return true;
1561
- };
1562
- this.filters.valueChanges.pipe(operators.debounceTime(200)).subscribe(function () { return _this.setFilter(); });
1563
- };
1564
- FwTableComponent.prototype.ngAfterViewInit = function () {
1565
- this.setSort();
1566
- this.setPaginator();
1567
- };
1568
- FwTableComponent.prototype.ngOnChanges = function (changes) {
1569
- if (changes.columns) {
1570
- this.setColumns();
1571
- }
1572
- if (changes.dataSource) {
1573
- this.setDataSource();
1574
- }
1575
- if (changes.sort || changes.dataSource) {
1576
- this.setSort();
1577
- }
1578
- if (changes.pageSize || changes['page-size']) {
1579
- this.setPaginator();
1580
- }
1581
- };
1582
- Object.defineProperty(FwTableComponent.prototype, "isCompact", {
1583
- get: function () {
1584
- return this.layout === 'compact';
1585
- },
1586
- enumerable: false,
1587
- configurable: true
1588
- });
1589
- Object.defineProperty(FwTableComponent.prototype, "paginationSize", {
1590
- get: function () {
1591
- return this.pageSize || this.webCompPageSize || 0;
1592
- },
1593
- enumerable: false,
1594
- configurable: true
1595
- });
1596
- Object.defineProperty(FwTableComponent.prototype, "isSortEnabled", {
1597
- get: function () {
1598
- return this.sort !== null;
1599
- },
1600
- enumerable: false,
1601
- configurable: true
1602
- });
1603
- FwTableComponent.prototype.addFilterControls = function () {
1604
- var e_1, _a;
1605
- try {
1606
- for (var _b = __values(this.columns), _c = _b.next(); !_c.done; _c = _b.next()) {
1607
- var column = _c.value;
1608
- this.filters.addControl(column.key, new i9.FormControl());
1609
- }
1610
- }
1611
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1612
- finally {
1613
- try {
1614
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1615
- }
1616
- finally { if (e_1) throw e_1.error; }
1617
- }
1618
- };
1619
- FwTableComponent.prototype.setDataSource = function () {
1620
- this.matDataSource = new i1$3.MatTableDataSource(this.dataSource);
1621
- };
1622
- FwTableComponent.prototype.setColumns = function () {
1623
- this.displayedColumns = this.columns.map(function (column) { return column.key; });
1624
- };
1625
- FwTableComponent.prototype.setFilter = function () {
1626
- this.matDataSource.filter = JSON.stringify(this.filters.value);
1627
- };
1628
- FwTableComponent.prototype.setSort = function () {
1629
- if (!this.matSort || this.sort === null) {
1630
- return;
1631
- }
1632
- var sortSplit = this.sort.split(' ');
1633
- this.sortColumn = sortSplit[0];
1634
- if (['asc', 'desc'].includes(sortSplit[1])) {
1635
- this.sortOrder = sortSplit[1];
1636
- }
1637
- else {
1638
- console.warn("Sort order '" + sortSplit[1] + "' is not 'asc' or 'desc', defaulting to 'asc'");
1639
- }
1640
- if (this.sortColumn) {
1641
- this.matSort.sort({ id: this.sortColumn, start: this.sortOrder, disableClear: false });
1642
- var sortHeader = this.matSort.sortables.get(this.sortColumn);
1643
- if (sortHeader) {
1644
- sortHeader._setAnimationTransitionState({ toState: 'active' });
1645
- }
1646
- else {
1647
- console.warn("Unable to find sort column '" + this.sortColumn + "'. Initial sort failed.");
1648
- }
1649
- }
1650
- this.matDataSource.sort = this.matSort;
1651
- };
1652
- FwTableComponent.prototype.setPaginator = function () {
1653
- // ensures ui updates correctly when paginator options change
1654
- this.changeDetectorRef.detectChanges();
1655
- this.matDataSource.paginator = this.matPaginator;
1656
- };
1657
- // necessary for web component to trigger this.filter.valueChanges
1658
- FwTableComponent.prototype.onInputFilter = function (event, column) {
1659
- var _this = this;
1660
- // defer setting filter control as event.target.value is not set yet
1661
- setTimeout(function () { return _this.filters.get(column.key).setValue(event.target.value); });
1662
- };
1663
- // necessary for web component to trigger this.filter.valueChanges
1664
- FwTableComponent.prototype.onSelectFilter = function (event, column) {
1665
- var innerText = event.target.innerText;
1666
- this.filters.get(column.key).setValue(innerText === '- none -' ? null : innerText);
1667
- };
1668
- // necessary for web component to trigger this.filter.valueChanges
1669
- FwTableComponent.prototype.onMultiSelectFilter = function (event, column) {
1670
- var value = this.filters.controls[column.key].value || [];
1671
- var innerText = event.target.parentElement.innerText;
1672
- if (value.includes(innerText)) {
1673
- value = value.filter(function (v) { return v !== innerText; });
1674
- }
1675
- else {
1676
- value.push(innerText);
1677
- }
1678
- this.filters.get(column.key).setValue(value.length === 1 && innerText === ''
1679
- ? null // when all checboxes have been deselected
1680
- : value);
1681
- };
1682
- return FwTableComponent;
1683
- }());
1684
- FwTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwTableComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1685
- FwTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i6.MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: i5$1.MatSort, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i2__namespace$2.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5__namespace$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "arrowPosition", "sortActionDescription", "disableClear", "mat-sort-header", "start"], exportAs: ["matSortHeader"] }, { type: i1__namespace$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i1__namespace$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i6__namespace.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i5__namespace$1.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortActive"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$2.MatLabel, selector: "mat-label" }, { type: i8__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i9__namespace.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__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i1__namespace$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace$3.MatCellDef, selector: "[matCellDef]" }, { type: i1__namespace$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i1__namespace$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i1__namespace$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }] });
1686
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwTableComponent, decorators: [{
1687
- type: i0.Component,
1688
- args: [{
1689
- host: {
1690
- 'class': 'fw-table',
1691
- '[class.compact]': 'isCompact',
1692
- },
1693
- selector: 'fw-table',
1694
- styleUrls: ['./table.component.scss'],
1695
- templateUrl: './table.component.html',
1696
- }]
1697
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { columns: [{
1698
- type: i0.Input
1699
- }], dataSource: [{
1700
- type: i0.Input
1701
- }], layout: [{
1702
- type: i0.Input
1703
- }], pageSize: [{
1704
- type: i0.Input
1705
- }], webCompPageSize: [{
1706
- type: i0.Input,
1707
- args: ['page-size']
1708
- }], sort: [{
1709
- type: i0.Input
1710
- }], matPaginator: [{
1711
- type: i0.ViewChild,
1712
- args: [i6.MatPaginator]
1713
- }], matSort: [{
1714
- type: i0.ViewChild,
1715
- args: [i5$1.MatSort]
1716
- }] } });
1717
-
1718
- var FwTableModule = /** @class */ (function () {
1719
- function FwTableModule() {
1720
- }
1721
- return FwTableModule;
1722
- }());
1723
- FwTableModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwTableModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1724
- FwTableModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwTableModule, declarations: [FwTableComponent], imports: [i2.CommonModule,
1725
- i9.FormsModule,
1726
- i9.ReactiveFormsModule,
1727
- i8.MatInputModule,
1728
- i6.MatPaginatorModule,
1729
- i3$1.MatSelectModule,
1730
- i5$1.MatSortModule,
1731
- i1$3.MatTableModule], exports: [FwTableComponent] });
1732
- FwTableModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwTableModule, imports: [[
1733
- i2.CommonModule,
1734
- i9.FormsModule,
1735
- i9.ReactiveFormsModule,
1736
- i8.MatInputModule,
1737
- i6.MatPaginatorModule,
1738
- i3$1.MatSelectModule,
1739
- i5$1.MatSortModule,
1740
- i1$3.MatTableModule,
1741
- ]] });
1742
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FwTableModule, decorators: [{
1743
- type: i0.NgModule,
1744
- args: [{
1745
- imports: [
1746
- i2.CommonModule,
1747
- i9.FormsModule,
1748
- i9.ReactiveFormsModule,
1749
- i8.MatInputModule,
1750
- i6.MatPaginatorModule,
1751
- i3$1.MatSelectModule,
1752
- i5$1.MatSortModule,
1753
- i1$3.MatTableModule,
1754
- ],
1755
- exports: [
1756
- FwTableComponent,
1757
- ],
1758
- declarations: [
1759
- FwTableComponent,
1760
- ],
1761
- entryComponents: [
1762
- FwTableComponent,
1763
- ]
1764
- }]
1765
- }] });
1766
-
1767
- /**
1768
- * Generated bundle index. Do not edit.
1769
- */
1770
-
1771
- exports.FwButtonComponent = FwButtonComponent;
1772
- exports.FwButtonGroupComponent = FwButtonGroupComponent;
1773
- exports.FwButtonGroupModule = FwButtonGroupModule;
1774
- exports.FwButtonModule = FwButtonModule;
1775
- exports.FwChoiceDialog = FwChoiceDialog;
1776
- exports.FwConfirmDialog = FwConfirmDialog;
1777
- exports.FwDialogModule = FwDialogModule;
1778
- exports.FwDialogService = FwDialogService;
1779
- exports.FwErrorDialog = FwErrorDialog;
1780
- exports.FwIconComponent = FwIconComponent;
1781
- exports.FwIconModule = FwIconModule;
1782
- exports.FwNotificationComponent = FwNotificationComponent;
1783
- exports.FwNotificationContainerComponent = FwNotificationContainerComponent;
1784
- exports.FwNotificationModule = FwNotificationModule;
1785
- exports.FwNotificationService = FwNotificationService;
1786
- exports.FwPopoverComponent = FwPopoverComponent;
1787
- exports.FwPopoverModule = FwPopoverModule;
1788
- exports.FwPopoverTriggerComponent = FwPopoverTriggerComponent;
1789
- exports.FwPopoverTriggerDirective = FwPopoverTriggerDirective;
1790
- exports.FwPortalDialog = FwPortalDialog;
1791
- exports.FwTableComponent = FwTableComponent;
1792
- exports.FwTableModule = FwTableModule;
1793
- exports.MinimalTranslationService = MinimalTranslationService;
1794
- exports.TranslationService = TranslationService;
1795
- exports.genId = genId;
1796
-
1797
- Object.defineProperty(exports, '__esModule', { value: true });
1798
-
1799
- }));
1800
- //# sourceMappingURL=flywheel-io-vision.umd.js.map