@tilde-nlp/ngx-common 3.0.1 → 4.0.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 (193) hide show
  1. package/{esm2020 → esm2022}/lib/close-button/close-button.component.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/close-button/close-button.module.mjs +11 -11
  3. package/{esm2020 → esm2022}/lib/company-product/company-product.component.mjs +4 -4
  4. package/{esm2020 → esm2022}/lib/company-product/company-product.module.mjs +5 -5
  5. package/esm2022/lib/confirmation-modal/confirmation-modal.component.mjs +25 -0
  6. package/esm2022/lib/confirmation-modal/confirmation-modal.module.mjs +21 -0
  7. package/esm2022/lib/confirmation-modal/index.mjs +6 -0
  8. package/esm2022/lib/confirmation-modal/models/confirmation-body.model.mjs +2 -0
  9. package/esm2022/lib/confirmation-modal/models/confirmation.enum.mjs +6 -0
  10. package/esm2022/lib/confirmation-modal/services/confirmation.service.mjs +25 -0
  11. package/esm2022/lib/confirmation-modal/services/index.mjs +2 -0
  12. package/{esm2020 → esm2022}/lib/directives/click-outside/click-outside.directive.mjs +4 -4
  13. package/{esm2020 → esm2022}/lib/directives/click-outside/click-outside.module.mjs +5 -5
  14. package/esm2022/lib/directives/drag-and-drop/drag-and-drop.directive.mjs +62 -0
  15. package/esm2022/lib/directives/drag-and-drop/drag-and-drop.module.mjs +24 -0
  16. package/esm2022/lib/directives/drag-and-drop/index.mjs +3 -0
  17. package/esm2022/lib/directives/index.mjs +4 -0
  18. package/esm2022/lib/directives/mat-button-loading/index.mjs +3 -0
  19. package/esm2022/lib/directives/mat-button-loading/mat-button-loading.directive.mjs +65 -0
  20. package/esm2022/lib/directives/mat-button-loading/mat-button-loading.module.mjs +20 -0
  21. package/esm2022/lib/file-upload/file-upload.component.mjs +107 -0
  22. package/esm2022/lib/file-upload/file-upload.module.mjs +42 -0
  23. package/esm2022/lib/file-upload/index.mjs +4 -0
  24. package/esm2022/lib/file-upload/models/file-upload-error-type.enum.mjs +8 -0
  25. package/esm2022/lib/file-upload/models/file-upload-error.model.mjs +2 -0
  26. package/esm2022/lib/file-upload/models/index.mjs +3 -0
  27. package/esm2022/lib/filter-bar/filter-bar.component.mjs +146 -0
  28. package/esm2022/lib/filter-bar/filter-bar.module.mjs +71 -0
  29. package/esm2022/lib/filter-bar/index.mjs +4 -0
  30. package/esm2022/lib/filter-bar/models/filter-bar-change-event.model.mjs +2 -0
  31. package/esm2022/lib/filter-bar/models/filter-bar-filter-item.model.mjs +2 -0
  32. package/esm2022/lib/filter-bar/models/filter-bar-filter.model.mjs +2 -0
  33. package/esm2022/lib/filter-bar/models/filter-bar-settings.model.mjs +2 -0
  34. package/esm2022/lib/filter-bar/models/index.mjs +4 -0
  35. package/{esm2020 → esm2022}/lib/footer/footer.component.mjs +4 -4
  36. package/{esm2020 → esm2022}/lib/footer/footer.module.mjs +11 -11
  37. package/esm2022/lib/helpers/html-element-parse.helper.mjs +15 -0
  38. package/esm2022/lib/helpers/index.mjs +4 -0
  39. package/{esm2020/lib/helpers/missing-translation-helper.mjs → esm2022/lib/helpers/missing-translation.helper.mjs} +1 -1
  40. package/esm2022/lib/helpers/save-file.helper.mjs +11 -0
  41. package/{esm2020 → esm2022}/lib/inline-message/inline-message.component.mjs +4 -4
  42. package/{esm2020 → esm2022}/lib/inline-message/inline-message.module.mjs +9 -9
  43. package/esm2022/lib/multi-functional-table/constants/disable-export-attribute-name.const.mjs +2 -0
  44. package/esm2022/lib/multi-functional-table/constants/index.mjs +2 -0
  45. package/esm2022/lib/multi-functional-table/index.mjs +5 -0
  46. package/esm2022/lib/multi-functional-table/models/batch-config.model.mjs +2 -0
  47. package/esm2022/lib/multi-functional-table/models/column-config.model.mjs +2 -0
  48. package/esm2022/lib/multi-functional-table/models/column-select-config.model.mjs +2 -0
  49. package/esm2022/lib/multi-functional-table/models/export-config.model.mjs +2 -0
  50. package/esm2022/lib/multi-functional-table/models/export-format.enum.mjs +5 -0
  51. package/esm2022/lib/multi-functional-table/models/filter-config.model.mjs +2 -0
  52. package/esm2022/lib/multi-functional-table/models/index.mjs +8 -0
  53. package/esm2022/lib/multi-functional-table/models/multi-functional-table-config.model.mjs +2 -0
  54. package/esm2022/lib/multi-functional-table/models/no-data-row-config.model.mjs +2 -0
  55. package/esm2022/lib/multi-functional-table/models/selected-column-local-storage-config.model.mjs +2 -0
  56. package/esm2022/lib/multi-functional-table/multi-functional-table.component.mjs +227 -0
  57. package/esm2022/lib/multi-functional-table/multi-functional-table.module.mjs +64 -0
  58. package/esm2022/lib/notification-message/notification-message.component.mjs +51 -0
  59. package/{esm2020 → esm2022}/lib/notification-message/notification-message.module.mjs +15 -15
  60. package/esm2022/lib/pipes/date-ago/date-ago.module.mjs +28 -0
  61. package/esm2022/lib/pipes/date-ago/date-ago.pipe.mjs +114 -0
  62. package/esm2022/lib/pipes/date-ago/index.mjs +3 -0
  63. package/esm2022/lib/pipes/date-ago/models/date-ago-interval.model.mjs +2 -0
  64. package/esm2022/lib/pipes/date-ago/models/date-ago-settings.model.mjs +2 -0
  65. package/esm2022/lib/pipes/date-ago/models/date-ago-settings.token.mjs +2 -0
  66. package/esm2022/lib/pipes/date-ago/models/date-ago.model.mjs +2 -0
  67. package/esm2022/lib/pipes/date-ago/models/index.mjs +5 -0
  68. package/{esm2020 → esm2022}/lib/pipes/filter-with-highlight/filter-with-highlight.module.mjs +5 -5
  69. package/{esm2020 → esm2022}/lib/pipes/filter-with-highlight/filter-with-highlight.pipe.mjs +4 -4
  70. package/esm2022/lib/pipes/index.mjs +5 -0
  71. package/{esm2020 → esm2022}/lib/pipes/sort-translations/sort-translations.module.mjs +5 -5
  72. package/{esm2020 → esm2022}/lib/pipes/sort-translations/sort-translations.pipe.mjs +4 -4
  73. package/esm2022/lib/pipes/sort-translations-by-property/index.mjs +3 -0
  74. package/esm2022/lib/pipes/sort-translations-by-property/sort-translations-by-property.module.mjs +18 -0
  75. package/esm2022/lib/pipes/sort-translations-by-property/sort-translations-by-property.pipe.mjs +40 -0
  76. package/{esm2020 → esm2022}/lib/plausible/plausible-event.directive.mjs +4 -4
  77. package/{esm2020 → esm2022}/lib/plausible/plausible.module.mjs +5 -5
  78. package/{esm2020 → esm2022}/lib/services/dom.service.mjs +4 -4
  79. package/{esm2020 → esm2022}/lib/services/icon.service.mjs +4 -4
  80. package/{esm2020 → esm2022}/lib/tld-loader/tld-loader.component.mjs +4 -4
  81. package/{esm2020 → esm2022}/lib/tld-loader/tld-loader.module.mjs +5 -5
  82. package/esm2022/public-api.mjs +19 -0
  83. package/fesm2022/tilde-nlp-ngx-common.mjs +1714 -0
  84. package/fesm2022/tilde-nlp-ngx-common.mjs.map +1 -0
  85. package/lib/close-button/close-button.component.d.ts +1 -1
  86. package/lib/company-product/company-product.component.d.ts +1 -1
  87. package/lib/confirmation-modal/confirmation-modal.component.d.ts +12 -0
  88. package/lib/confirmation-modal/confirmation-modal.module.d.ts +11 -0
  89. package/lib/confirmation-modal/index.d.ts +5 -0
  90. package/lib/confirmation-modal/models/confirmation-body.model.d.ts +8 -0
  91. package/lib/confirmation-modal/models/confirmation.enum.d.ts +4 -0
  92. package/lib/confirmation-modal/services/confirmation.service.d.ts +12 -0
  93. package/lib/confirmation-modal/services/index.d.ts +1 -0
  94. package/lib/directives/drag-and-drop/drag-and-drop.directive.d.ts +14 -0
  95. package/lib/directives/drag-and-drop/drag-and-drop.module.d.ts +8 -0
  96. package/lib/directives/drag-and-drop/index.d.ts +2 -0
  97. package/lib/directives/index.d.ts +2 -0
  98. package/lib/directives/mat-button-loading/index.d.ts +2 -0
  99. package/lib/directives/mat-button-loading/mat-button-loading.directive.d.ts +18 -0
  100. package/lib/directives/mat-button-loading/mat-button-loading.module.d.ts +8 -0
  101. package/lib/file-upload/file-upload.component.d.ts +29 -0
  102. package/lib/file-upload/file-upload.module.d.ts +13 -0
  103. package/lib/file-upload/index.d.ts +3 -0
  104. package/lib/file-upload/models/file-upload-error-type.enum.d.ts +6 -0
  105. package/lib/file-upload/models/file-upload-error.model.d.ts +6 -0
  106. package/lib/file-upload/models/index.d.ts +2 -0
  107. package/lib/filter-bar/filter-bar.component.d.ts +54 -0
  108. package/lib/filter-bar/filter-bar.module.d.ts +19 -0
  109. package/lib/filter-bar/index.d.ts +3 -0
  110. package/lib/filter-bar/models/filter-bar-change-event.model.d.ts +6 -0
  111. package/lib/filter-bar/models/filter-bar-filter-item.model.d.ts +4 -0
  112. package/lib/filter-bar/models/filter-bar-filter.model.d.ts +6 -0
  113. package/lib/filter-bar/models/filter-bar-settings.model.d.ts +19 -0
  114. package/lib/filter-bar/models/index.d.ts +3 -0
  115. package/lib/footer/footer.component.d.ts +1 -1
  116. package/lib/helpers/html-element-parse.helper.d.ts +3 -0
  117. package/lib/helpers/index.d.ts +3 -1
  118. package/lib/helpers/save-file.helper.d.ts +3 -0
  119. package/lib/inline-message/inline-message.component.d.ts +1 -1
  120. package/lib/multi-functional-table/constants/disable-export-attribute-name.const.d.ts +1 -0
  121. package/lib/multi-functional-table/constants/index.d.ts +1 -0
  122. package/lib/multi-functional-table/index.d.ts +4 -0
  123. package/lib/multi-functional-table/models/batch-config.model.d.ts +4 -0
  124. package/lib/multi-functional-table/models/column-config.model.d.ts +18 -0
  125. package/lib/multi-functional-table/models/column-select-config.model.d.ts +14 -0
  126. package/lib/multi-functional-table/models/export-config.model.d.ts +9 -0
  127. package/lib/multi-functional-table/models/export-format.enum.d.ts +3 -0
  128. package/lib/multi-functional-table/models/filter-config.model.d.ts +6 -0
  129. package/lib/multi-functional-table/models/index.d.ts +7 -0
  130. package/lib/multi-functional-table/models/multi-functional-table-config.model.d.ts +36 -0
  131. package/lib/multi-functional-table/models/no-data-row-config.model.d.ts +9 -0
  132. package/lib/multi-functional-table/models/selected-column-local-storage-config.model.d.ts +20 -0
  133. package/lib/multi-functional-table/multi-functional-table.component.d.ts +66 -0
  134. package/lib/multi-functional-table/multi-functional-table.module.d.ts +18 -0
  135. package/lib/notification-message/notification-message.component.d.ts +1 -1
  136. package/lib/pipes/date-ago/date-ago.module.d.ts +9 -0
  137. package/lib/pipes/date-ago/date-ago.pipe.d.ts +20 -0
  138. package/lib/pipes/date-ago/index.d.ts +2 -0
  139. package/lib/pipes/date-ago/models/date-ago-interval.model.d.ts +5 -0
  140. package/lib/pipes/date-ago/models/date-ago-settings.model.d.ts +26 -0
  141. package/lib/pipes/date-ago/models/date-ago-settings.token.d.ts +1 -0
  142. package/lib/pipes/date-ago/models/date-ago.model.d.ts +4 -0
  143. package/lib/pipes/date-ago/models/index.d.ts +4 -0
  144. package/lib/pipes/index.d.ts +2 -0
  145. package/lib/pipes/sort-translations-by-property/index.d.ts +2 -0
  146. package/lib/pipes/sort-translations-by-property/sort-translations-by-property.module.d.ts +8 -0
  147. package/lib/pipes/sort-translations-by-property/sort-translations-by-property.pipe.d.ts +15 -0
  148. package/lib/plausible/plausible-event.directive.d.ts +1 -1
  149. package/package.json +8 -14
  150. package/public-api.d.ts +4 -0
  151. package/styles/components/buttons.scss +19 -0
  152. package/styles/components/dialogs.scss +18 -0
  153. package/styles/components/icons.scss +16 -4
  154. package/styles/mixins/material-overrides/mat-button-overrides.mixin.scss +17 -9
  155. package/styles/mixins/material-overrides/mat-form-field-overrides.mixin.scss +1 -0
  156. package/styles/mixins/material-overrides/mat-progress-bar-overrides.mixin.scss +15 -0
  157. package/styles/mixins/material-overrides/material-overrides.mixin.scss +2 -0
  158. package/styles/mixins/tld-all-mixins.mixin.scss +9 -1
  159. package/styles/tilde-style.scss +1 -0
  160. package/styles/variables/colors.variables.scss +1 -0
  161. package/esm2020/lib/directives/index.mjs +0 -2
  162. package/esm2020/lib/helpers/index.mjs +0 -2
  163. package/esm2020/lib/notification-message/notification-message.component.mjs +0 -51
  164. package/esm2020/lib/pipes/index.mjs +0 -3
  165. package/esm2020/public-api.mjs +0 -15
  166. package/fesm2015/tilde-nlp-ngx-common.mjs +0 -676
  167. package/fesm2015/tilde-nlp-ngx-common.mjs.map +0 -1
  168. package/fesm2020/tilde-nlp-ngx-common.mjs +0 -675
  169. package/fesm2020/tilde-nlp-ngx-common.mjs.map +0 -1
  170. /package/{esm2020 → esm2022}/lib/close-button/index.mjs +0 -0
  171. /package/{esm2020 → esm2022}/lib/company-product/index.mjs +0 -0
  172. /package/{esm2020 → esm2022}/lib/directives/click-outside/index.mjs +0 -0
  173. /package/{esm2020 → esm2022}/lib/footer/index.mjs +0 -0
  174. /package/{esm2020 → esm2022}/lib/inline-message/index.mjs +0 -0
  175. /package/{esm2020 → esm2022}/lib/inline-message/models/index.mjs +0 -0
  176. /package/{esm2020 → esm2022}/lib/inline-message/models/inline-message-icon-position.enum.mjs +0 -0
  177. /package/{esm2020 → esm2022}/lib/inline-message/models/inline-message-type.enum.mjs +0 -0
  178. /package/{esm2020 → esm2022}/lib/inline-message/models/inline-message.model.mjs +0 -0
  179. /package/{esm2020 → esm2022}/lib/notification-message/enums/index.mjs +0 -0
  180. /package/{esm2020 → esm2022}/lib/notification-message/enums/notification-message-type.enum.mjs +0 -0
  181. /package/{esm2020 → esm2022}/lib/notification-message/index.mjs +0 -0
  182. /package/{esm2020 → esm2022}/lib/notification-message/interfaces/index.mjs +0 -0
  183. /package/{esm2020 → esm2022}/lib/notification-message/interfaces/notification-message.model.mjs +0 -0
  184. /package/{esm2020 → esm2022}/lib/pipes/filter-with-highlight/index.mjs +0 -0
  185. /package/{esm2020 → esm2022}/lib/pipes/sort-translations/index.mjs +0 -0
  186. /package/{esm2020 → esm2022}/lib/plausible/index.mjs +0 -0
  187. /package/{esm2020 → esm2022}/lib/plausible/models/index.mjs +0 -0
  188. /package/{esm2020 → esm2022}/lib/plausible/models/plausible-event.model.mjs +0 -0
  189. /package/{esm2020 → esm2022}/lib/plausible/plausible.helper.mjs +0 -0
  190. /package/{esm2020 → esm2022}/lib/services/index.mjs +0 -0
  191. /package/{esm2020 → esm2022}/lib/tld-loader/index.mjs +0 -0
  192. /package/{esm2020 → esm2022}/tilde-nlp-ngx-common.mjs +0 -0
  193. /package/lib/helpers/{missing-translation-helper.d.ts → missing-translation.helper.d.ts} +0 -0
@@ -0,0 +1,1714 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Directive, Input, HostListener, NgModule, Component, Pipe, Inject, Optional, EventEmitter, Output, HostBinding, ViewChild, ElementRef, ContentChildren, ContentChild } from '@angular/core';
3
+ import * as i1 from '@angular/material/icon';
4
+ import { MatIconModule } from '@angular/material/icon';
5
+ import * as i2 from '@angular/platform-browser';
6
+ import * as i2$1 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import * as i2$2 from '@angular/material/tooltip';
9
+ import { MatTooltipModule } from '@angular/material/tooltip';
10
+ import * as i1$1 from '@ngx-translate/core';
11
+ import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
12
+ import { Observable, of, map, take } from 'rxjs';
13
+ import * as i11 from '@angular/material/progress-spinner';
14
+ import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
15
+ import * as i1$2 from '@angular/material/button';
16
+ import { MatButtonModule } from '@angular/material/button';
17
+ import { FlexLayoutModule } from '@angular/flex-layout';
18
+ import * as i6 from '@angular/router';
19
+ import { RouterModule } from '@angular/router';
20
+ import * as i2$3 from '@angular/flex-layout/flex';
21
+ import * as i3 from '@angular/flex-layout/extended';
22
+ import * as i2$4 from '@angular/material/progress-bar';
23
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
24
+ import * as i9 from '@angular/forms';
25
+ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
26
+ import * as i3$1 from '@angular/material/input';
27
+ import { MatInputModule } from '@angular/material/input';
28
+ import * as i4 from '@angular/material/form-field';
29
+ import { MatFormFieldModule } from '@angular/material/form-field';
30
+ import * as i7 from '@angular/material/select';
31
+ import { MatSelectModule } from '@angular/material/select';
32
+ import * as i8 from '@angular/material/core';
33
+ import * as i12 from '@angular/material/chips';
34
+ import { MatChipsModule } from '@angular/material/chips';
35
+ import { SelectionModel } from '@angular/cdk/collections';
36
+ import { MatSort, MatSortModule } from '@angular/material/sort';
37
+ import * as i4$1 from '@angular/material/table';
38
+ import { MatNoDataRow, MatHeaderRowDef, MatRowDef, MatColumnDef, MatTable, MatTableModule } from '@angular/material/table';
39
+ import * as i6$1 from '@angular/material/menu';
40
+ import { MatMenuModule } from '@angular/material/menu';
41
+ import * as i7$1 from '@angular/material/checkbox';
42
+ import { MatCheckboxModule } from '@angular/material/checkbox';
43
+ import * as i1$3 from '@angular/material/dialog';
44
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
45
+
46
+ class IconService {
47
+ constructor(iconRegistry, sanitizer) {
48
+ this.iconRegistry = iconRegistry;
49
+ this.sanitizer = sanitizer;
50
+ }
51
+ //https://material.angular.io/components/icon/examples
52
+ /** Registers svg icons to mat icon registry. Icon SVG's should be under some key in object. Icon name can be used with property name in lowercase. */
53
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
+ registerIcons(icons) {
55
+ for (const key in icons) {
56
+ this.iconRegistry.addSvgIconLiteral(key.toLowerCase(), this.sanitizer.bypassSecurityTrustHtml(icons[key]));
57
+ }
58
+ }
59
+ registerIconFromUrl(name, url) {
60
+ this.iconRegistry.addSvgIcon(name, this.sanitizer.bypassSecurityTrustResourceUrl(url));
61
+ }
62
+ addSvgIconSet(path, namespace) {
63
+ namespace ?
64
+ this.iconRegistry.addSvgIconSetInNamespace(namespace, this.sanitizer.bypassSecurityTrustResourceUrl(path)) :
65
+ this.iconRegistry.addSvgIconSet(this.sanitizer.bypassSecurityTrustResourceUrl(path));
66
+ }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: IconService, deps: [{ token: i1.MatIconRegistry }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable }); }
68
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: IconService, providedIn: 'root' }); }
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: IconService, decorators: [{
71
+ type: Injectable,
72
+ args: [{
73
+ providedIn: 'root'
74
+ }]
75
+ }], ctorParameters: function () { return [{ type: i1.MatIconRegistry }, { type: i2.DomSanitizer }]; } });
76
+
77
+ const _localStorage = typeof localStorage !== 'undefined' ? localStorage : null;
78
+ const _window = typeof window !== 'undefined' ? window : null;
79
+ class DOMService {
80
+ get window() {
81
+ return _window;
82
+ }
83
+ get localStorage() {
84
+ return _localStorage;
85
+ }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DOMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
87
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DOMService, providedIn: 'root' }); }
88
+ }
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DOMService, decorators: [{
90
+ type: Injectable,
91
+ args: [{
92
+ providedIn: 'root'
93
+ }]
94
+ }] });
95
+
96
+ /* eslint-disable @typescript-eslint/no-explicit-any */
97
+ class PlausibleHelper {
98
+ /**
99
+ * Adds plausible for selected domain and adds additional script for custom event (goal) triggering
100
+ * @param domain domain that is registered in your plausible account
101
+ * @returns
102
+ */
103
+ static addPlausible(domain) {
104
+ const domService = new DOMService();
105
+ const windowObj = domService.window;
106
+ if (!windowObj || !domain) {
107
+ return;
108
+ }
109
+ const plausibleSrc = "https://plausible.io/js/plausible.js";
110
+ const script = document.createElement("script");
111
+ script.src = plausibleSrc;
112
+ script.setAttribute("data-domain", domain);
113
+ document.head.append(script);
114
+ // Add plausible custom event functionality https://plausible.io/docs/custom-event-goals#code-example-for-tracking-link-clicks
115
+ windowObj.plausible = windowObj.plausible || ((...params) => { (windowObj.plausible.q = windowObj.plausible.q || []).push(params); });
116
+ }
117
+ /**
118
+ * Emits custom plausible event
119
+ * @param id plausible event id that should be the same as registered in plausible
120
+ * @param properties an object with custom properties for the event
121
+ * @returns
122
+ */
123
+ static customEvent(id, properties) {
124
+ const windowObj = window;
125
+ if (!windowObj?.plausible) {
126
+ return;
127
+ }
128
+ windowObj.plausible(id, { props: properties });
129
+ }
130
+ }
131
+
132
+ class PlausibleEventDirective {
133
+ constructor() {
134
+ this.id = "";
135
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
136
+ this.properties = null;
137
+ }
138
+ /** Plausible event id. */
139
+ set libPlausibleEvent(value) {
140
+ if (!value) {
141
+ return;
142
+ }
143
+ this.id = value.eventId;
144
+ if (value.properties) {
145
+ this.properties = {};
146
+ value.properties.forEach(item => this.properties[item.key] = item.value);
147
+ }
148
+ }
149
+ onClick() {
150
+ if (this.id.length) {
151
+ PlausibleHelper.customEvent(this.id, this.properties);
152
+ }
153
+ }
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: PlausibleEventDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
155
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.6", type: PlausibleEventDirective, selector: "[libPlausibleEvent]", inputs: { libPlausibleEvent: "libPlausibleEvent" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: PlausibleEventDirective, decorators: [{
158
+ type: Directive,
159
+ args: [{
160
+ selector: '[libPlausibleEvent]'
161
+ }]
162
+ }], propDecorators: { libPlausibleEvent: [{
163
+ type: Input
164
+ }], onClick: [{
165
+ type: HostListener,
166
+ args: ["click"]
167
+ }] } });
168
+
169
+ class PlausibleModule {
170
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: PlausibleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
171
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: PlausibleModule, declarations: [PlausibleEventDirective], imports: [CommonModule], exports: [PlausibleEventDirective] }); }
172
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: PlausibleModule, imports: [CommonModule] }); }
173
+ }
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: PlausibleModule, decorators: [{
175
+ type: NgModule,
176
+ args: [{
177
+ declarations: [
178
+ PlausibleEventDirective
179
+ ],
180
+ imports: [
181
+ CommonModule
182
+ ],
183
+ exports: [
184
+ PlausibleEventDirective
185
+ ]
186
+ }]
187
+ }] });
188
+
189
+ var InlineMessageIconPosition;
190
+ (function (InlineMessageIconPosition) {
191
+ InlineMessageIconPosition[InlineMessageIconPosition["START"] = 0] = "START";
192
+ InlineMessageIconPosition[InlineMessageIconPosition["END"] = 1] = "END";
193
+ })(InlineMessageIconPosition || (InlineMessageIconPosition = {}));
194
+
195
+ class InlineMessageComponent {
196
+ constructor() {
197
+ this.END_ICON_POSITION = InlineMessageIconPosition.END;
198
+ this.iconName = "info";
199
+ }
200
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: InlineMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
201
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: InlineMessageComponent, selector: "lib-inline-message", inputs: { iconName: "iconName", message: "message" }, ngImport: i0, template: "<div class=\"tld-inline-message {{message.type}}\">\r\n <span class=\"material-icons\" [class.order-end]=\"message.iconPosition === END_ICON_POSITION\"\r\n [matTooltip]=\"message.iconTooltip? (message.iconTooltip | translate: message.localizationParams) : ''\" *ngIf=\"iconName\">{{iconName}}</span>\r\n <section *ngIf=\"message\">\r\n <div class=\"text-s-semi-bold title\" *ngIf=\"message.title\"\r\n [innerHtml]=\"message.title | translate: message.localizationParams\">\r\n </div>\r\n <p class=\"text-s description\" *ngIf=\"message.description\" [innerHtml]=\"message.description | translate:\r\n message.localizationParams\"></p>\r\n </section>\r\n</div>", styles: [":host{display:block}.tld-inline-message{display:flex;flex-direction:row}.tld-inline-message.error .material-icons{color:var(--error-dark)}.tld-inline-message.info .material-icons{color:var(--base-40)}.tld-inline-message.warning .material-icons{color:var(--warning-dark)}.tld-inline-message .material-icons{font-size:16px;margin-right:.5rem;display:inline-block}.tld-inline-message .material-icons.order-end{order:2}.tld-inline-message .title,.tld-inline-message .description{margin:0}.tld-inline-message .title+.description{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
202
+ }
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: InlineMessageComponent, decorators: [{
204
+ type: Component,
205
+ args: [{ selector: 'lib-inline-message', template: "<div class=\"tld-inline-message {{message.type}}\">\r\n <span class=\"material-icons\" [class.order-end]=\"message.iconPosition === END_ICON_POSITION\"\r\n [matTooltip]=\"message.iconTooltip? (message.iconTooltip | translate: message.localizationParams) : ''\" *ngIf=\"iconName\">{{iconName}}</span>\r\n <section *ngIf=\"message\">\r\n <div class=\"text-s-semi-bold title\" *ngIf=\"message.title\"\r\n [innerHtml]=\"message.title | translate: message.localizationParams\">\r\n </div>\r\n <p class=\"text-s description\" *ngIf=\"message.description\" [innerHtml]=\"message.description | translate:\r\n message.localizationParams\"></p>\r\n </section>\r\n</div>", styles: [":host{display:block}.tld-inline-message{display:flex;flex-direction:row}.tld-inline-message.error .material-icons{color:var(--error-dark)}.tld-inline-message.info .material-icons{color:var(--base-40)}.tld-inline-message.warning .material-icons{color:var(--warning-dark)}.tld-inline-message .material-icons{font-size:16px;margin-right:.5rem;display:inline-block}.tld-inline-message .material-icons.order-end{order:2}.tld-inline-message .title,.tld-inline-message .description{margin:0}.tld-inline-message .title+.description{margin-top:.5rem}\n"] }]
206
+ }], propDecorators: { iconName: [{
207
+ type: Input
208
+ }], message: [{
209
+ type: Input
210
+ }] } });
211
+
212
+ class InlineMessageModule {
213
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: InlineMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
214
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: InlineMessageModule, declarations: [InlineMessageComponent], imports: [CommonModule,
215
+ TranslateModule,
216
+ MatTooltipModule], exports: [InlineMessageComponent] }); }
217
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: InlineMessageModule, imports: [CommonModule,
218
+ TranslateModule,
219
+ MatTooltipModule] }); }
220
+ }
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: InlineMessageModule, decorators: [{
222
+ type: NgModule,
223
+ args: [{
224
+ declarations: [
225
+ InlineMessageComponent
226
+ ],
227
+ imports: [
228
+ CommonModule,
229
+ TranslateModule,
230
+ MatTooltipModule
231
+ ],
232
+ exports: [
233
+ InlineMessageComponent
234
+ ]
235
+ }]
236
+ }] });
237
+
238
+ var InlineMessageType;
239
+ (function (InlineMessageType) {
240
+ InlineMessageType["INFO"] = "info";
241
+ InlineMessageType["WARNING"] = "warning";
242
+ InlineMessageType["ERROR"] = "error";
243
+ })(InlineMessageType || (InlineMessageType = {}));
244
+
245
+ class FilterWithHighlightPipe {
246
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
247
+ transform(value, filter, key) {
248
+ if (!filter.length) {
249
+ return [...value];
250
+ }
251
+ const filteredArr = [];
252
+ const regex = new RegExp(filter, 'gi');
253
+ for (let element of value) {
254
+ const elementText = key ? element[key] : element;
255
+ const match = elementText.match(regex);
256
+ if (!match) {
257
+ continue;
258
+ }
259
+ let newElement;
260
+ const textWithHighlight = elementText.replace(regex, (match) => `<span class="filter-highlight">${match}</span>`);
261
+ if (key) {
262
+ newElement = { ...element };
263
+ newElement[key] = textWithHighlight;
264
+ }
265
+ else {
266
+ element = textWithHighlight;
267
+ }
268
+ filteredArr.push(newElement ?? element);
269
+ }
270
+ return filteredArr;
271
+ }
272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
273
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightPipe, name: "filterWithHighlight" }); }
274
+ }
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightPipe, decorators: [{
276
+ type: Pipe,
277
+ args: [{
278
+ name: 'filterWithHighlight'
279
+ }]
280
+ }] });
281
+
282
+ class FilterWithHighlightModule {
283
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
284
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightModule, declarations: [FilterWithHighlightPipe], imports: [CommonModule], exports: [FilterWithHighlightPipe] }); }
285
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightModule, imports: [CommonModule] }); }
286
+ }
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterWithHighlightModule, decorators: [{
288
+ type: NgModule,
289
+ args: [{
290
+ declarations: [
291
+ FilterWithHighlightPipe
292
+ ],
293
+ imports: [
294
+ CommonModule
295
+ ],
296
+ exports: [
297
+ FilterWithHighlightPipe
298
+ ]
299
+ }]
300
+ }] });
301
+
302
+ /* eslint-disable @typescript-eslint/no-explicit-any */
303
+ /**
304
+ * Pipe used to sort translated values.
305
+ */
306
+ class SortTranslationsPipe {
307
+ constructor(translate) {
308
+ this.translate = translate;
309
+ }
310
+ /**
311
+ *
312
+ * @param objects array of objects to be sorted
313
+ * @param localizationPrefix prefix for localization code. This is used to get necessary object translations.
314
+ * @param key Which object property needs to be used for sorting.
315
+ * @param currentLanguage This is necessary to update values if language is changed.
316
+ * @returns
317
+ */
318
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
319
+ transform(objects, localizationPrefix, key = null, currentLanguage, translationKey = null) {
320
+ const arrayCopy = [...objects];
321
+ if (localizationPrefix) {
322
+ return new Observable((subscriber) => {
323
+ this.translate.get(localizationPrefix ?? "").subscribe((translations) => {
324
+ const array = this.sortObjects(arrayCopy, key, translations);
325
+ subscriber.next(array);
326
+ subscriber.complete();
327
+ });
328
+ });
329
+ }
330
+ else {
331
+ return of(this.sortObjects(arrayCopy, key));
332
+ }
333
+ }
334
+ sortObjects(array, key, translations) {
335
+ return array.sort((a, b) => {
336
+ const aValue = key ? a[key] : a;
337
+ const aTranslation = translations ? translations[aValue.toUpperCase()] : aValue;
338
+ const bValue = key ? b[key] : b;
339
+ const bTranslation = translations ? translations[bValue.toUpperCase()] : bValue;
340
+ if (aTranslation < bTranslation)
341
+ return -1;
342
+ else if (aTranslation > bTranslation)
343
+ return 1;
344
+ else
345
+ return 0;
346
+ });
347
+ }
348
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsPipe, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
349
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsPipe, name: "sortTranslations" }); }
350
+ }
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsPipe, decorators: [{
352
+ type: Pipe,
353
+ args: [{
354
+ name: 'sortTranslations'
355
+ }]
356
+ }], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; } });
357
+
358
+ class SortTranslationsModule {
359
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
360
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsModule, declarations: [SortTranslationsPipe], imports: [CommonModule], exports: [SortTranslationsPipe] }); }
361
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsModule, imports: [CommonModule] }); }
362
+ }
363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsModule, decorators: [{
364
+ type: NgModule,
365
+ args: [{
366
+ declarations: [SortTranslationsPipe],
367
+ imports: [
368
+ CommonModule
369
+ ],
370
+ exports: [
371
+ SortTranslationsPipe
372
+ ]
373
+ }]
374
+ }] });
375
+
376
+ /**
377
+ * Pipe transforms an array of objects by sorting them based on a provided localization key in A-Z order.
378
+ * Unlike the "sortTranslations" pipe, it does not require knowledge of the current language, and it does not require the use of the async pipe.
379
+ */
380
+ class SortTranslationsByPropertyPipe {
381
+ constructor(translate) {
382
+ this.translate = translate;
383
+ }
384
+ /**
385
+ * Transforms the input array of objects by sorting them based on the specified sortingValueKey.
386
+ * @param values An array of objects to be sorted.
387
+ * @param sortingValueKey The key by which the provided values should be sorted.
388
+ */
389
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
390
+ transform(values, sortingValueKey) {
391
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
392
+ values.sort((a, b) => {
393
+ const aTranslated = this.translate.instant(a[sortingValueKey]).toLowerCase();
394
+ const bTranslated = this.translate.instant(b[sortingValueKey]).toLowerCase();
395
+ if (aTranslated < bTranslated)
396
+ return -1;
397
+ if (aTranslated > bTranslated)
398
+ return 1;
399
+ return 0;
400
+ });
401
+ return values;
402
+ }
403
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyPipe, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
404
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyPipe, name: "sortTranslationsByProperty" }); }
405
+ }
406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyPipe, decorators: [{
407
+ type: Pipe,
408
+ args: [{
409
+ name: 'sortTranslationsByProperty',
410
+ }]
411
+ }], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; } });
412
+
413
+ class SortTranslationsByPropertyModule {
414
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
415
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyModule, declarations: [SortTranslationsByPropertyPipe], imports: [CommonModule], exports: [SortTranslationsByPropertyPipe] }); }
416
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyModule, imports: [CommonModule] }); }
417
+ }
418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SortTranslationsByPropertyModule, decorators: [{
419
+ type: NgModule,
420
+ args: [{
421
+ declarations: [SortTranslationsByPropertyPipe],
422
+ imports: [CommonModule],
423
+ exports: [SortTranslationsByPropertyPipe],
424
+ }]
425
+ }] });
426
+
427
+ const DateAgoSettingsToken = "DATE_AGO_SETTINGS";
428
+
429
+ /**
430
+ * Pipe that converts date to date ago and returns translated string.
431
+ */
432
+ class DateAgoPipe {
433
+ get intervals() { return this.settings?.intervals ?? this.defaultSettings.intervals; }
434
+ get multiplePostfix() { return this.settings?.multiplePostfix ?? this.defaultSettings.multiplePostfix; }
435
+ get localizationPrefix() { return this.settings?.localizationPrefix ?? this.defaultSettings.localizationPrefix; }
436
+ get justNowKey() { return this.settings?.justNowKey ?? this.defaultSettings.justNowKey; }
437
+ get justNowSeconds() { return this.settings?.justNowSeconds ?? this.defaultSettings.justNowSeconds; }
438
+ constructor(translate, _ref, settings) {
439
+ this.translate = translate;
440
+ this._ref = _ref;
441
+ this.settings = settings;
442
+ this.defaultSettings = {
443
+ intervals: [
444
+ {
445
+ key: "YEAR",
446
+ interval: 31536000,
447
+ min: 1
448
+ },
449
+ {
450
+ key: "MONTH",
451
+ interval: 2592000,
452
+ min: 1
453
+ },
454
+ {
455
+ key: "WEEK",
456
+ interval: 604800,
457
+ min: 2
458
+ },
459
+ {
460
+ key: "DAY",
461
+ interval: 86400,
462
+ min: 1
463
+ },
464
+ {
465
+ key: "HOUR",
466
+ interval: 3600,
467
+ min: 1
468
+ },
469
+ {
470
+ key: "MINUTE",
471
+ interval: 60,
472
+ min: 1
473
+ },
474
+ {
475
+ key: "SECOND",
476
+ interval: 1,
477
+ min: 10
478
+ }
479
+ ],
480
+ localizationPrefix: "DATE_AGO",
481
+ multiplePostfix: "S",
482
+ justNowKey: "JUST_NOW",
483
+ justNowSeconds: 29
484
+ };
485
+ }
486
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
487
+ transform(value, enableMultiplePostfix = true) {
488
+ if (!value) {
489
+ return "";
490
+ }
491
+ const dateAgo = this.calculateDateAgo(value, enableMultiplePostfix);
492
+ if (!dateAgo) {
493
+ return "";
494
+ }
495
+ const translatePipe = new TranslatePipe(this.translate, this._ref);
496
+ return translatePipe.transform(`${this.localizationPrefix}.${dateAgo.key}`, { value: dateAgo.howMany });
497
+ }
498
+ calculateDateAgo(value, enableMultiplePostfix) {
499
+ if (value) {
500
+ const seconds = Math.floor((new Date().getTime() - new Date(value).getTime()) / 1000);
501
+ if (seconds < this.justNowSeconds) // less than 30 seconds ago will show as 'Just now'
502
+ return { key: this.justNowKey };
503
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
504
+ let counter;
505
+ let type;
506
+ for (let i = 0; i < this.intervals.length; i++) {
507
+ const interval = this.intervals[i];
508
+ counter = Math.floor(seconds / interval.interval);
509
+ if (counter >= interval.min) {
510
+ type = interval.key;
511
+ if (enableMultiplePostfix && counter > 1) {
512
+ // add "S" in the end of localization key
513
+ type += this.multiplePostfix;
514
+ }
515
+ break;
516
+ }
517
+ }
518
+ return { key: type, howMany: counter };
519
+ }
520
+ return null;
521
+ }
522
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DateAgoPipe, deps: [{ token: i1$1.TranslateService }, { token: i0.ChangeDetectorRef }, { token: DateAgoSettingsToken, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
523
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: DateAgoPipe, name: "dateAgo", pure: false }); }
524
+ }
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DateAgoPipe, decorators: [{
526
+ type: Pipe,
527
+ args: [{
528
+ name: 'dateAgo',
529
+ pure: false
530
+ }]
531
+ }], ctorParameters: function () { return [{ type: i1$1.TranslateService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
532
+ type: Inject,
533
+ args: [DateAgoSettingsToken]
534
+ }, {
535
+ type: Optional
536
+ }] }]; } });
537
+
538
+ class DateAgoModule {
539
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DateAgoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
540
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: DateAgoModule, declarations: [DateAgoPipe], imports: [CommonModule,
541
+ TranslateModule], exports: [DateAgoPipe] }); }
542
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DateAgoModule, imports: [CommonModule,
543
+ TranslateModule] }); }
544
+ }
545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DateAgoModule, decorators: [{
546
+ type: NgModule,
547
+ args: [{
548
+ declarations: [
549
+ DateAgoPipe
550
+ ],
551
+ imports: [
552
+ CommonModule,
553
+ TranslateModule
554
+ ],
555
+ exports: [
556
+ DateAgoPipe
557
+ ]
558
+ }]
559
+ }] });
560
+
561
+ class ClickOutsideDirective {
562
+ constructor(elementRef) {
563
+ this.elementRef = elementRef;
564
+ this.clickOutside = new EventEmitter();
565
+ }
566
+ onClick(target) {
567
+ const clickedInside = this.elementRef.nativeElement.contains(target);
568
+ if (!clickedInside) {
569
+ this.clickOutside.emit();
570
+ }
571
+ }
572
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
573
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.6", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, ngImport: i0 }); }
574
+ }
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ClickOutsideDirective, decorators: [{
576
+ type: Directive,
577
+ args: [{
578
+ // eslint-disable-next-line @angular-eslint/directive-selector
579
+ selector: '[clickOutside]'
580
+ }]
581
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { clickOutside: [{
582
+ type: Output
583
+ }], onClick: [{
584
+ type: HostListener,
585
+ args: ['document:click', ['$event.target']]
586
+ }] } });
587
+
588
+ class ClickOutsideModule {
589
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ClickOutsideModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
590
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: ClickOutsideModule, declarations: [ClickOutsideDirective], imports: [CommonModule], exports: [ClickOutsideDirective] }); }
591
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ClickOutsideModule, imports: [CommonModule] }); }
592
+ }
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ClickOutsideModule, decorators: [{
594
+ type: NgModule,
595
+ args: [{
596
+ declarations: [
597
+ ClickOutsideDirective
598
+ ],
599
+ imports: [
600
+ CommonModule
601
+ ],
602
+ exports: [
603
+ ClickOutsideDirective
604
+ ]
605
+ }]
606
+ }] });
607
+
608
+ class DragAndDropDirective {
609
+ get disabled() { return this.element.nativeElement.disabled; }
610
+ // Dragover listener
611
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
612
+ onDragOver(evt) {
613
+ evt.preventDefault();
614
+ evt.stopPropagation();
615
+ this.active = !this.disabled;
616
+ }
617
+ // Dragleave listener
618
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
619
+ onDragLeave(evt) {
620
+ evt.preventDefault();
621
+ evt.stopPropagation();
622
+ this.active = false;
623
+ }
624
+ // Drop listener
625
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
626
+ ondrop(evt) {
627
+ evt.preventDefault();
628
+ evt.stopPropagation();
629
+ this.active = false;
630
+ if (this.disabled) {
631
+ return;
632
+ }
633
+ const files = evt.dataTransfer.files;
634
+ if (files.length > 0) {
635
+ this.fileDropped.emit(files);
636
+ }
637
+ }
638
+ constructor(element) {
639
+ this.element = element;
640
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
641
+ this.fileDropped = new EventEmitter();
642
+ }
643
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DragAndDropDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
644
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.6", type: DragAndDropDirective, selector: "[tldDragAndDrop]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.tld-file-over": "this.active" } }, ngImport: i0 }); }
645
+ }
646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DragAndDropDirective, decorators: [{
647
+ type: Directive,
648
+ args: [{
649
+ // eslint-disable-next-line @angular-eslint/directive-selector
650
+ selector: '[tldDragAndDrop]'
651
+ }]
652
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { active: [{
653
+ type: HostBinding,
654
+ args: ['class.tld-file-over']
655
+ }], fileDropped: [{
656
+ type: Output
657
+ }], onDragOver: [{
658
+ type: HostListener,
659
+ args: ['dragover', ['$event']]
660
+ }], onDragLeave: [{
661
+ type: HostListener,
662
+ args: ['dragleave', ['$event']]
663
+ }], ondrop: [{
664
+ type: HostListener,
665
+ args: ['drop', ['$event']]
666
+ }] } });
667
+
668
+ class DragAndDropModule {
669
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DragAndDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
670
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: DragAndDropModule, declarations: [DragAndDropDirective], imports: [CommonModule], exports: [DragAndDropDirective] }); }
671
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DragAndDropModule, imports: [CommonModule] }); }
672
+ }
673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: DragAndDropModule, decorators: [{
674
+ type: NgModule,
675
+ args: [{
676
+ declarations: [
677
+ DragAndDropDirective
678
+ ],
679
+ imports: [
680
+ CommonModule
681
+ ],
682
+ exports: [
683
+ DragAndDropDirective
684
+ ]
685
+ }]
686
+ }] });
687
+
688
+ class MatButtonLoadingDirective {
689
+ set loading(value) {
690
+ if (value != this._loading) {
691
+ this._loading = value;
692
+ this.updateState();
693
+ }
694
+ }
695
+ constructor(matButton, viewContainerRef, renderer) {
696
+ this.matButton = matButton;
697
+ this.viewContainerRef = viewContainerRef;
698
+ this.renderer = renderer;
699
+ this._loading = false;
700
+ }
701
+ get nativeElement() {
702
+ return this.matButton._elementRef.nativeElement;
703
+ }
704
+ updateState() {
705
+ if (this._loading) {
706
+ this.nativeElement.classList.add('mat-loading');
707
+ this.matButton.disabled = true;
708
+ this.createSpinner();
709
+ return;
710
+ }
711
+ this.nativeElement.classList.remove('mat-loading');
712
+ this.matButton.disabled = false;
713
+ this.destroySpinner();
714
+ }
715
+ createSpinner() {
716
+ if (!this.spinner) {
717
+ this.spinner = this.viewContainerRef.createComponent(MatProgressSpinner);
718
+ this.spinner.instance.color = this.matButton.color;
719
+ this.spinner.instance.diameter = 20;
720
+ this.spinner.instance.mode = 'indeterminate';
721
+ this.renderer.appendChild(this.matButton._elementRef.nativeElement, this.spinner.instance._elementRef.nativeElement);
722
+ }
723
+ }
724
+ destroySpinner() {
725
+ if (this.spinner) {
726
+ this.spinner.destroy();
727
+ this.spinner = null;
728
+ }
729
+ }
730
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MatButtonLoadingDirective, deps: [{ token: i1$2.MatButton }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
731
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.6", type: MatButtonLoadingDirective, selector: "button[mat-button][loading],\n button[mat-raised-button][loading],\n button[mat-icon-button][loading],\n button[mat-fab][loading],\n button[mat-mini-fab][loading],\n button[mat-stroked-button][loading],\n button[mat-flat-button][loading]", inputs: { loading: "loading" }, ngImport: i0 }); }
732
+ }
733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MatButtonLoadingDirective, decorators: [{
734
+ type: Directive,
735
+ args: [{
736
+ // eslint-disable-next-line @angular-eslint/directive-selector
737
+ selector: `button[mat-button][loading],
738
+ button[mat-raised-button][loading],
739
+ button[mat-icon-button][loading],
740
+ button[mat-fab][loading],
741
+ button[mat-mini-fab][loading],
742
+ button[mat-stroked-button][loading],
743
+ button[mat-flat-button][loading]`
744
+ }]
745
+ }], ctorParameters: function () { return [{ type: i1$2.MatButton }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }]; }, propDecorators: { loading: [{
746
+ type: Input
747
+ }] } });
748
+
749
+ class MatButtonLoadingModule {
750
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MatButtonLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
751
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: MatButtonLoadingModule, declarations: [MatButtonLoadingDirective], imports: [CommonModule], exports: [MatButtonLoadingDirective] }); }
752
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MatButtonLoadingModule, imports: [CommonModule] }); }
753
+ }
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MatButtonLoadingModule, decorators: [{
755
+ type: NgModule,
756
+ args: [{
757
+ declarations: [MatButtonLoadingDirective],
758
+ imports: [
759
+ CommonModule
760
+ ],
761
+ exports: [MatButtonLoadingDirective]
762
+ }]
763
+ }] });
764
+
765
+ class CloseButtonComponent {
766
+ constructor() {
767
+ // any type because emitter doesn't really need a value
768
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
769
+ this.tldClick = new EventEmitter();
770
+ this.ariaCode = "CLOSE_BUTTON";
771
+ }
772
+ clicked() {
773
+ this.tldClick.emit(null);
774
+ }
775
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CloseButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
776
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: CloseButtonComponent, selector: "tld-close-button", inputs: { ariaCode: "ariaCode", disabled: "disabled", tooltip: "tooltip" }, outputs: { tldClick: "tldClick" }, viewQueries: [{ propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true }], ngImport: i0, template: "<button [matTooltip]=\"tooltip | translate\"\r\n#clearButton mat-icon-button (click)=\"clicked()\" [attr.aria-label]=\"'ARIA_LABELS.'+ariaCode | translate\"\r\n [disabled]=\"disabled\">\r\n <span class=\"material-icons\">\r\n close\r\n </span>\r\n</button>", dependencies: [{ kind: "component", type: i1$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
777
+ }
778
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CloseButtonComponent, decorators: [{
779
+ type: Component,
780
+ args: [{ selector: 'tld-close-button', template: "<button [matTooltip]=\"tooltip | translate\"\r\n#clearButton mat-icon-button (click)=\"clicked()\" [attr.aria-label]=\"'ARIA_LABELS.'+ariaCode | translate\"\r\n [disabled]=\"disabled\">\r\n <span class=\"material-icons\">\r\n close\r\n </span>\r\n</button>" }]
781
+ }], propDecorators: { tldClick: [{
782
+ type: Output
783
+ }], ariaCode: [{
784
+ type: Input
785
+ }], clearButton: [{
786
+ type: ViewChild,
787
+ args: ["clearButton"]
788
+ }], disabled: [{
789
+ type: Input
790
+ }], tooltip: [{
791
+ type: Input
792
+ }] } });
793
+
794
+ class CloseButtonModule {
795
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CloseButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
796
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: CloseButtonModule, declarations: [CloseButtonComponent], imports: [CommonModule,
797
+ MatButtonModule,
798
+ TranslateModule,
799
+ MatTooltipModule], exports: [CloseButtonComponent] }); }
800
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CloseButtonModule, imports: [CommonModule,
801
+ MatButtonModule,
802
+ TranslateModule,
803
+ MatTooltipModule] }); }
804
+ }
805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CloseButtonModule, decorators: [{
806
+ type: NgModule,
807
+ args: [{
808
+ declarations: [
809
+ CloseButtonComponent
810
+ ],
811
+ imports: [
812
+ CommonModule,
813
+ MatButtonModule,
814
+ TranslateModule,
815
+ MatTooltipModule
816
+ ],
817
+ exports: [
818
+ CloseButtonComponent
819
+ ]
820
+ }]
821
+ }] });
822
+
823
+ class NotificationMessageComponent {
824
+ constructor() {
825
+ this.buttonClicked = new EventEmitter();
826
+ this.closeClicked = new EventEmitter();
827
+ this.linkClicked = new EventEmitter();
828
+ this.iconNames = {
829
+ "BASIC": "info",
830
+ "ERROR": "error",
831
+ "SUCCESS": "check_circle",
832
+ "WARNING": "info",
833
+ };
834
+ }
835
+ ngOnInit() {
836
+ this.className = this.message.type.toLocaleLowerCase();
837
+ }
838
+ buttonClick() {
839
+ this.buttonClicked.next(null);
840
+ }
841
+ closeClick() {
842
+ this.closeClicked.next(null);
843
+ }
844
+ linkClick() {
845
+ this.linkClicked.next(null);
846
+ }
847
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NotificationMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
848
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: NotificationMessageComponent, selector: "lib-tld-notification-message", inputs: { message: "message", inline: "inline" }, outputs: { buttonClicked: "buttonClicked", closeClicked: "closeClicked", linkClicked: "linkClicked" }, ngImport: i0, template: "<div class=\"notification-message {{className}}\">\r\n <div class=\"notification-message-container tld-default-border\" [ngClass.lt-md]=\"'mobile'\" [class.inline]=\"inline\"\r\n fxLayout=\"row\" fxLayoutAlign=\"start start\" [attr.id]=\"message.id\" aria-live=\"polite\" fxLayout=\"row\">\r\n <span class=\"material-icons message-icon\">\r\n {{iconNames[message.type]}}\r\n </span>\r\n <div class=\"items-container\" fxFlex>\r\n <div fxLayout=\"row\">\r\n <div class=\"text-container\" fxFlex>\r\n <h1 *ngIf=\"message.title\" class=\"message-title\"\r\n [innerHtml]=\"message.title | translate: message.localizationParams\"></h1>\r\n <p *ngIf=\"message.body\" class=\"message-body\">\r\n <span [innerHtml]=\"message.body | translate: message.localizationParams\"></span>\r\n <span *ngIf=\"message.support\" [innerHtml]=\"message.support | translate: message.localizationParams\"></span>\r\n </p>\r\n </div>\r\n <tld-close-button *ngIf=\"!message.hideClose\" class=\"close-button\" (tldClick)=\"closeClick()\">\r\n </tld-close-button>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutGap=\"16px\" fxLayoutAlign=\"start center\"\r\n *ngIf=\"message.buttonText || message.linkHref || message.routerLink\">\r\n <button class=\"message-action-button\" color=\"accent\" mat-flat-button *ngIf=\"message.buttonText\"\r\n (click)=\"buttonClick()\">{{message.buttonText | translate}} </button>\r\n <a class=\"message-action-link\" *ngIf=\"message.linkHref && message.linkText\" (click)=\"linkClick()\"\r\n [attr.href]=\"message.linkHref\">{{message.linkText |\r\n translate}}</a>\r\n <a class=\"message-action-link\" *ngIf=\"message.routerLink && message.linkText\" (click)=\"linkClick()\"\r\n [routerLink]=\"[message.routerLink]\">{{message.linkText |\r\n translate}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:inline-block;width:100%}.notification-message.basic .notification-message-container{background-color:var(--base-100);border-color:var(--base-100)}.notification-message.basic .notification-message-container .message-icon{color:var(--base-40)}.notification-message.basic .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.error .notification-message-container{background-color:var(--error-light);border-color:var(--base-100)}.notification-message.error .notification-message-container .message-icon{color:var(--error-dark)}.notification-message.error .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.warning .notification-message-container{background-color:var(--warning-light);border-color:var(--base-100)}.notification-message.warning .notification-message-container .message-icon{color:var(--warning-dark)}.notification-message.warning .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.success .notification-message-container{background-color:var(--success-light);border-color:var(--base-100)}.notification-message.success .notification-message-container .message-icon{color:var(--success-dark)}.notification-message.success .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message .notification-message-container{border:1px solid var(--base-95);border-radius:.5em}.notification-message .notification-message-container.mobile{padding:.6em .4em!important}.notification-message .notification-message-container.mobile .items-container{margin-left:.4em!important}.notification-message .notification-message-container.mobile .items-container div+div{margin-top:.2em!important}.notification-message .notification-message-container.mobile .items-container .message-title+.message-body{margin-top:0!important}.notification-message .notification-message-container .text-container:first-child{line-height:1.5em}.notification-message .notification-message-container .text-container .message-title{font-weight:500;margin:0}.notification-message .notification-message-container .text-container .message-body{margin:0}.notification-message .notification-message-container:not(.inline){padding:1.5em}.notification-message .notification-message-container:not(.inline) .items-container{margin-left:1em}.notification-message .notification-message-container:not(.inline) .items-container div+div,.notification-message .notification-message-container:not(.inline) .items-container .message-title+.message-body{margin-top:1em}.notification-message .notification-message-container:not(.inline) .message-title{font-size:1.25em}.notification-message .notification-message-container:not(.inline) .message-body{line-height:1.5em}.notification-message .notification-message-container.inline{padding:.75em 1em}.notification-message .notification-message-container.inline .items-container{margin-left:.75em}.notification-message .notification-message-container.inline .items-container div+div{margin-top:.5em}.notification-message .notification-message-container.inline .items-container .message-title+.message-body{margin-top:.2em}.notification-message .notification-message-container.inline .message-title{font-size:1em}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: CloseButtonComponent, selector: "tld-close-button", inputs: ["ariaCode", "disabled", "tooltip"], outputs: ["tldClick"] }, { kind: "component", type: i1$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
849
+ }
850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NotificationMessageComponent, decorators: [{
851
+ type: Component,
852
+ args: [{ selector: 'lib-tld-notification-message', template: "<div class=\"notification-message {{className}}\">\r\n <div class=\"notification-message-container tld-default-border\" [ngClass.lt-md]=\"'mobile'\" [class.inline]=\"inline\"\r\n fxLayout=\"row\" fxLayoutAlign=\"start start\" [attr.id]=\"message.id\" aria-live=\"polite\" fxLayout=\"row\">\r\n <span class=\"material-icons message-icon\">\r\n {{iconNames[message.type]}}\r\n </span>\r\n <div class=\"items-container\" fxFlex>\r\n <div fxLayout=\"row\">\r\n <div class=\"text-container\" fxFlex>\r\n <h1 *ngIf=\"message.title\" class=\"message-title\"\r\n [innerHtml]=\"message.title | translate: message.localizationParams\"></h1>\r\n <p *ngIf=\"message.body\" class=\"message-body\">\r\n <span [innerHtml]=\"message.body | translate: message.localizationParams\"></span>\r\n <span *ngIf=\"message.support\" [innerHtml]=\"message.support | translate: message.localizationParams\"></span>\r\n </p>\r\n </div>\r\n <tld-close-button *ngIf=\"!message.hideClose\" class=\"close-button\" (tldClick)=\"closeClick()\">\r\n </tld-close-button>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutGap=\"16px\" fxLayoutAlign=\"start center\"\r\n *ngIf=\"message.buttonText || message.linkHref || message.routerLink\">\r\n <button class=\"message-action-button\" color=\"accent\" mat-flat-button *ngIf=\"message.buttonText\"\r\n (click)=\"buttonClick()\">{{message.buttonText | translate}} </button>\r\n <a class=\"message-action-link\" *ngIf=\"message.linkHref && message.linkText\" (click)=\"linkClick()\"\r\n [attr.href]=\"message.linkHref\">{{message.linkText |\r\n translate}}</a>\r\n <a class=\"message-action-link\" *ngIf=\"message.routerLink && message.linkText\" (click)=\"linkClick()\"\r\n [routerLink]=\"[message.routerLink]\">{{message.linkText |\r\n translate}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:inline-block;width:100%}.notification-message.basic .notification-message-container{background-color:var(--base-100);border-color:var(--base-100)}.notification-message.basic .notification-message-container .message-icon{color:var(--base-40)}.notification-message.basic .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.error .notification-message-container{background-color:var(--error-light);border-color:var(--base-100)}.notification-message.error .notification-message-container .message-icon{color:var(--error-dark)}.notification-message.error .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.warning .notification-message-container{background-color:var(--warning-light);border-color:var(--base-100)}.notification-message.warning .notification-message-container .message-icon{color:var(--warning-dark)}.notification-message.warning .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.success .notification-message-container{background-color:var(--success-light);border-color:var(--base-100)}.notification-message.success .notification-message-container .message-icon{color:var(--success-dark)}.notification-message.success .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message .notification-message-container{border:1px solid var(--base-95);border-radius:.5em}.notification-message .notification-message-container.mobile{padding:.6em .4em!important}.notification-message .notification-message-container.mobile .items-container{margin-left:.4em!important}.notification-message .notification-message-container.mobile .items-container div+div{margin-top:.2em!important}.notification-message .notification-message-container.mobile .items-container .message-title+.message-body{margin-top:0!important}.notification-message .notification-message-container .text-container:first-child{line-height:1.5em}.notification-message .notification-message-container .text-container .message-title{font-weight:500;margin:0}.notification-message .notification-message-container .text-container .message-body{margin:0}.notification-message .notification-message-container:not(.inline){padding:1.5em}.notification-message .notification-message-container:not(.inline) .items-container{margin-left:1em}.notification-message .notification-message-container:not(.inline) .items-container div+div,.notification-message .notification-message-container:not(.inline) .items-container .message-title+.message-body{margin-top:1em}.notification-message .notification-message-container:not(.inline) .message-title{font-size:1.25em}.notification-message .notification-message-container:not(.inline) .message-body{line-height:1.5em}.notification-message .notification-message-container.inline{padding:.75em 1em}.notification-message .notification-message-container.inline .items-container{margin-left:.75em}.notification-message .notification-message-container.inline .items-container div+div{margin-top:.5em}.notification-message .notification-message-container.inline .items-container .message-title+.message-body{margin-top:.2em}.notification-message .notification-message-container.inline .message-title{font-size:1em}\n"] }]
853
+ }], propDecorators: { message: [{
854
+ type: Input
855
+ }], buttonClicked: [{
856
+ type: Output
857
+ }], closeClicked: [{
858
+ type: Output
859
+ }], linkClicked: [{
860
+ type: Output
861
+ }], inline: [{
862
+ type: Input
863
+ }] } });
864
+
865
+ class NotificationMessageModule {
866
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NotificationMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
867
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: NotificationMessageModule, declarations: [NotificationMessageComponent], imports: [CommonModule,
868
+ FlexLayoutModule,
869
+ CloseButtonModule,
870
+ MatButtonModule,
871
+ TranslateModule,
872
+ RouterModule], exports: [NotificationMessageComponent] }); }
873
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NotificationMessageModule, imports: [CommonModule,
874
+ FlexLayoutModule,
875
+ CloseButtonModule,
876
+ MatButtonModule,
877
+ TranslateModule,
878
+ RouterModule] }); }
879
+ }
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NotificationMessageModule, decorators: [{
881
+ type: NgModule,
882
+ args: [{
883
+ declarations: [
884
+ NotificationMessageComponent
885
+ ],
886
+ imports: [
887
+ CommonModule,
888
+ FlexLayoutModule,
889
+ CloseButtonModule,
890
+ MatButtonModule,
891
+ TranslateModule,
892
+ RouterModule
893
+ ],
894
+ exports: [
895
+ NotificationMessageComponent
896
+ ]
897
+ }]
898
+ }] });
899
+
900
+ var NotificationMessageType;
901
+ (function (NotificationMessageType) {
902
+ NotificationMessageType["BASIC"] = "BASIC";
903
+ NotificationMessageType["WARNING"] = "WARNING";
904
+ NotificationMessageType["SUCCESS"] = "SUCCESS";
905
+ NotificationMessageType["ERROR"] = "ERROR";
906
+ })(NotificationMessageType || (NotificationMessageType = {}));
907
+
908
+ class TldLoaderComponent {
909
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: TldLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
910
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: TldLoaderComponent, selector: "lib-tld-loader", ngImport: i0, template: "<div class=\"tld-loader accent-color\" fxLayout=\"row\" fxLayoutGap=\"10px\">\r\n <div class=\"accent-bg-color tld-loader-element element-1\"></div>\r\n <div class=\"accent-bg-color tld-loader-element element-2\"></div>\r\n <div class=\"accent-bg-color tld-loader-element element-3\"></div>\r\n</div>\r\n", styles: [".tld-loader .tld-loader-element{will-change:transform;border-radius:50%;animation:grow .6s ease-in-out infinite alternate;width:24px;height:24px}.tld-loader .tld-loader-element.element-2{animation-delay:.2s}.tld-loader .tld-loader-element.element-3{animation-delay:.4s}@keyframes grow{to{transform:translate(-50%) scale(0)}}\n"] }); }
911
+ }
912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: TldLoaderComponent, decorators: [{
913
+ type: Component,
914
+ args: [{ selector: 'lib-tld-loader', template: "<div class=\"tld-loader accent-color\" fxLayout=\"row\" fxLayoutGap=\"10px\">\r\n <div class=\"accent-bg-color tld-loader-element element-1\"></div>\r\n <div class=\"accent-bg-color tld-loader-element element-2\"></div>\r\n <div class=\"accent-bg-color tld-loader-element element-3\"></div>\r\n</div>\r\n", styles: [".tld-loader .tld-loader-element{will-change:transform;border-radius:50%;animation:grow .6s ease-in-out infinite alternate;width:24px;height:24px}.tld-loader .tld-loader-element.element-2{animation-delay:.2s}.tld-loader .tld-loader-element.element-3{animation-delay:.4s}@keyframes grow{to{transform:translate(-50%) scale(0)}}\n"] }]
915
+ }] });
916
+
917
+ class TldLoaderModule {
918
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: TldLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
919
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: TldLoaderModule, declarations: [TldLoaderComponent], exports: [TldLoaderComponent] }); }
920
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: TldLoaderModule }); }
921
+ }
922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: TldLoaderModule, decorators: [{
923
+ type: NgModule,
924
+ args: [{
925
+ declarations: [
926
+ TldLoaderComponent
927
+ ],
928
+ exports: [
929
+ TldLoaderComponent
930
+ ]
931
+ }]
932
+ }] });
933
+
934
+ class MissingTranslationHelper {
935
+ handle(params) {
936
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
937
+ return params.interpolateParams?.default || params.key;
938
+ }
939
+ }
940
+
941
+ class SaveFileHelper {
942
+ static saveFile(content, fileName) {
943
+ const file = new Blob([content]);
944
+ const link = document.createElement("a");
945
+ link.href = URL.createObjectURL(file);
946
+ link.download = fileName;
947
+ link.click();
948
+ link.remove();
949
+ }
950
+ }
951
+
952
+ class HtmlElementParseHelper {
953
+ static tableAsCsv(tableElement, ignoreAttributeName) {
954
+ const csv_data = [];
955
+ const rows = tableElement.querySelectorAll('tr');
956
+ const columnSelector = ignoreAttributeName ? `td:not([${ignoreAttributeName}]),th:not([${ignoreAttributeName}])` : `td,th`;
957
+ for (let i = 0; i < rows.length; i++) {
958
+ const cols = rows[i].querySelectorAll(columnSelector);
959
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
960
+ const csvrow = Array.from(cols).map((element) => `"${element.innerText}"`);
961
+ csv_data.push(csvrow.join(","));
962
+ }
963
+ return csv_data.join('\n');
964
+ }
965
+ }
966
+
967
+ class CompanyProductComponent {
968
+ constructor() {
969
+ this.company = "";
970
+ this.product = "";
971
+ }
972
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CompanyProductComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
973
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: CompanyProductComponent, selector: "lib-company-product", inputs: { company: "company", product: "product" }, ngImport: i0, template: "<div fxHide.lt-md class=\"tilde-product-title\">\r\n <span class=\"company\">\r\n {{company | uppercase}}\r\n </span>\r\n <span class=\"product\">\r\n {{product}}\r\n </span>\r\n</div>", styles: [".tilde-product-title{font-family:Roboto;text-decoration:none!important}.tilde-product-title .company{font-weight:700;font-size:.75rem;line-height:1rem;color:#616e7c;letter-spacing:1px;display:block}.tilde-product-title .product{font-weight:500;font-size:1.25rem;line-height:1.5rem;color:#1f2933;display:block}\n"], dependencies: [{ kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }] }); }
974
+ }
975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CompanyProductComponent, decorators: [{
976
+ type: Component,
977
+ args: [{ selector: 'lib-company-product', template: "<div fxHide.lt-md class=\"tilde-product-title\">\r\n <span class=\"company\">\r\n {{company | uppercase}}\r\n </span>\r\n <span class=\"product\">\r\n {{product}}\r\n </span>\r\n</div>", styles: [".tilde-product-title{font-family:Roboto;text-decoration:none!important}.tilde-product-title .company{font-weight:700;font-size:.75rem;line-height:1rem;color:#616e7c;letter-spacing:1px;display:block}.tilde-product-title .product{font-weight:500;font-size:1.25rem;line-height:1.5rem;color:#1f2933;display:block}\n"] }]
978
+ }], propDecorators: { company: [{
979
+ type: Input
980
+ }], product: [{
981
+ type: Input
982
+ }] } });
983
+
984
+ class CompanyProductModule {
985
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CompanyProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
986
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: CompanyProductModule, declarations: [CompanyProductComponent], imports: [CommonModule], exports: [CompanyProductComponent] }); }
987
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CompanyProductModule, imports: [CommonModule] }); }
988
+ }
989
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: CompanyProductModule, decorators: [{
990
+ type: NgModule,
991
+ args: [{
992
+ declarations: [
993
+ CompanyProductComponent
994
+ ],
995
+ imports: [
996
+ CommonModule
997
+ ],
998
+ exports: [CompanyProductComponent]
999
+ }]
1000
+ }] });
1001
+
1002
+ class FooterComponent {
1003
+ constructor() {
1004
+ this.defaultTermsRoute = "terms-of-use";
1005
+ this.defaultPrivacyRoute = "privacy-policy";
1006
+ this.privacyRoute = this.defaultPrivacyRoute;
1007
+ this.termsOfUseRoute = this.defaultTermsRoute;
1008
+ this.contactUsRoute = "https://tilde.com/about/get-in-touch";
1009
+ this.currentYear = new Date().getFullYear();
1010
+ }
1011
+ ngOnInit() {
1012
+ if (this.baseUrl) {
1013
+ this.privacyRoute = this.baseUrl + this.privacyRoute;
1014
+ this.termsOfUseRoute = this.baseUrl + this.termsOfUseRoute;
1015
+ }
1016
+ }
1017
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1018
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: FooterComponent, selector: "tld-footer", inputs: { privacyRoute: "privacyRoute", termsOfUseRoute: "termsOfUseRoute", contactUsRoute: "contactUsRoute", baseUrl: "baseUrl" }, ngImport: i0, template: "<footer fxLayout=\"row\" class=\"text-m\">\r\n <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutAlign.xs=\"center center\" fxLayout.xs=\"column\"\r\n fxLayoutGap=\"16px\">\r\n <div>\r\n {{ 'FOOTER.TITLE' | translate: {currentYear: currentYear} }}\r\n </div>\r\n <div fxLayoutGap=\"1rem\">\r\n <ng-container *ngIf=\"baseUrl; else localRoutes\">\r\n <a class=\"semi-bold\" *ngIf=\"termsOfUseRoute\" [attr.href]=\"termsOfUseRoute\" target=\"_blank\"> {{\r\n 'FOOTER.TERMS_OF_USE' |\r\n translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"privacyRoute\" [attr.href]=\"privacyRoute\" target=\"_blank\"> {{ 'FOOTER.PRIVACY'\r\n | translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"contactUsRoute\" [routerLink]=\"[contactUsRoute]\"> {{ 'FOOTER.CONTACT_US'| translate\r\n }}</a>\r\n\r\n </ng-container>\r\n <ng-template #localRoutes>\r\n <a class=\"semi-bold\" *ngIf=\"termsOfUseRoute\" [routerLink]=\"[termsOfUseRoute]\"> {{ 'FOOTER.TERMS_OF_USE' |\r\n translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"privacyRoute\" [routerLink]=\"[privacyRoute]\"> {{ 'FOOTER.PRIVACY'| translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"contactUsRoute\" [routerLink]=\"[contactUsRoute]\"> {{ 'FOOTER.CONTACT_US'| translate\r\n }}</a>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</footer>\r\n", styles: [":host footer{color:var(--base-30);padding:1rem 2rem;margin-bottom:0;border-top:1px solid var(--base-70);margin-top:1rem}:host footer a{color:var(--base-30);text-decoration:none}:host footer a:hover{color:var(--base-30);text-decoration:underline}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
1019
+ }
1020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FooterComponent, decorators: [{
1021
+ type: Component,
1022
+ args: [{ selector: 'tld-footer', template: "<footer fxLayout=\"row\" class=\"text-m\">\r\n <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutAlign.xs=\"center center\" fxLayout.xs=\"column\"\r\n fxLayoutGap=\"16px\">\r\n <div>\r\n {{ 'FOOTER.TITLE' | translate: {currentYear: currentYear} }}\r\n </div>\r\n <div fxLayoutGap=\"1rem\">\r\n <ng-container *ngIf=\"baseUrl; else localRoutes\">\r\n <a class=\"semi-bold\" *ngIf=\"termsOfUseRoute\" [attr.href]=\"termsOfUseRoute\" target=\"_blank\"> {{\r\n 'FOOTER.TERMS_OF_USE' |\r\n translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"privacyRoute\" [attr.href]=\"privacyRoute\" target=\"_blank\"> {{ 'FOOTER.PRIVACY'\r\n | translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"contactUsRoute\" [routerLink]=\"[contactUsRoute]\"> {{ 'FOOTER.CONTACT_US'| translate\r\n }}</a>\r\n\r\n </ng-container>\r\n <ng-template #localRoutes>\r\n <a class=\"semi-bold\" *ngIf=\"termsOfUseRoute\" [routerLink]=\"[termsOfUseRoute]\"> {{ 'FOOTER.TERMS_OF_USE' |\r\n translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"privacyRoute\" [routerLink]=\"[privacyRoute]\"> {{ 'FOOTER.PRIVACY'| translate }}</a>\r\n <a class=\"semi-bold\" *ngIf=\"contactUsRoute\" [routerLink]=\"[contactUsRoute]\"> {{ 'FOOTER.CONTACT_US'| translate\r\n }}</a>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</footer>\r\n", styles: [":host footer{color:var(--base-30);padding:1rem 2rem;margin-bottom:0;border-top:1px solid var(--base-70);margin-top:1rem}:host footer a{color:var(--base-30);text-decoration:none}:host footer a:hover{color:var(--base-30);text-decoration:underline}\n"] }]
1023
+ }], ctorParameters: function () { return []; }, propDecorators: { privacyRoute: [{
1024
+ type: Input
1025
+ }], termsOfUseRoute: [{
1026
+ type: Input
1027
+ }], contactUsRoute: [{
1028
+ type: Input
1029
+ }], baseUrl: [{
1030
+ type: Input
1031
+ }] } });
1032
+
1033
+ class FooterModule {
1034
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1035
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: FooterModule, declarations: [FooterComponent], imports: [CommonModule,
1036
+ FlexLayoutModule,
1037
+ TranslateModule,
1038
+ RouterModule], exports: [FooterComponent] }); }
1039
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FooterModule, imports: [CommonModule,
1040
+ FlexLayoutModule,
1041
+ TranslateModule,
1042
+ RouterModule] }); }
1043
+ }
1044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FooterModule, decorators: [{
1045
+ type: NgModule,
1046
+ args: [{
1047
+ declarations: [
1048
+ FooterComponent
1049
+ ],
1050
+ imports: [
1051
+ CommonModule,
1052
+ FlexLayoutModule,
1053
+ TranslateModule,
1054
+ RouterModule
1055
+ ],
1056
+ exports: [FooterComponent]
1057
+ }]
1058
+ }] });
1059
+
1060
+ var FileUploadErrorTypeEnum;
1061
+ (function (FileUploadErrorTypeEnum) {
1062
+ FileUploadErrorTypeEnum["FILE_UPLOAD_UNSUPPORTED_FORMAT"] = "FILE_UPLOAD_UNSUPPORTED_FORMAT";
1063
+ FileUploadErrorTypeEnum["FILE_UPLOAD_UNSUPPORTED_FORMAT_REGISTER"] = "FILE_UPLOAD_UNSUPPORTED_FORMAT_REGISTER";
1064
+ FileUploadErrorTypeEnum["MAX_SIZE"] = "FILE_UPLOAD_MAX_SIZE";
1065
+ FileUploadErrorTypeEnum["FILE_EMPTY"] = "FILE_UPLOAD_EMPTY";
1066
+ })(FileUploadErrorTypeEnum || (FileUploadErrorTypeEnum = {}));
1067
+
1068
+ class FileUploadComponent {
1069
+ constructor() {
1070
+ this.fileChange = new EventEmitter();
1071
+ this.errorEvent = new EventEmitter();
1072
+ this._accept = [];
1073
+ this.multiple = false;
1074
+ }
1075
+ set accept(val) {
1076
+ this._accept = val;
1077
+ this.allowedExtensions = val ? val.join(",") : "";
1078
+ }
1079
+ get accept() { return this._accept; }
1080
+ handleFileInput(event) {
1081
+ const target = event.target;
1082
+ const files = target.files;
1083
+ this.validate(files);
1084
+ }
1085
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1086
+ onFileDrop(files) {
1087
+ this.validate(files);
1088
+ }
1089
+ emit(files) {
1090
+ if (files && files.length > 0) {
1091
+ this.fileChange.emit(files);
1092
+ }
1093
+ }
1094
+ emitError(error) {
1095
+ this.errorEvent.emit(error);
1096
+ }
1097
+ validate(files) {
1098
+ //let size = 0;
1099
+ const validFiles = [];
1100
+ for (let i = 0; i < files.length; i++) {
1101
+ const file = files[i];
1102
+ if (!this.allowEmpty && file.size == 0) {
1103
+ this.emitError({ code: FileUploadErrorTypeEnum.FILE_EMPTY, error: "File is empty", fileName: file.name });
1104
+ return;
1105
+ }
1106
+ //size += file.size;
1107
+ const extensionErrorCode = this.getExtensionErrorCode(file.name);
1108
+ if (extensionErrorCode) {
1109
+ const error = { code: extensionErrorCode, error: "Not valid extension.", fileName: file.name };
1110
+ this.emitError(error);
1111
+ }
1112
+ else if (this.maxSize && file.size > this.maxSize) {
1113
+ const error = { code: FileUploadErrorTypeEnum.MAX_SIZE, error: "Maximum allowed file size exceeded.", fileName: file.name };
1114
+ this.emitError(error);
1115
+ }
1116
+ else {
1117
+ validFiles.push(file);
1118
+ }
1119
+ }
1120
+ this.emit(validFiles);
1121
+ this.fileInput.nativeElement.value = '';
1122
+ }
1123
+ getExtensionErrorCode(fileName) {
1124
+ const extension = fileName.slice(fileName.lastIndexOf('.')).toLowerCase();
1125
+ if (this.accept.length == 0 || (this.accept.length == 1 && this.accept[0] == '*') || this.accept.includes(extension)) {
1126
+ return null;
1127
+ }
1128
+ else {
1129
+ return this.extendedAcceptList?.includes(extension) ? FileUploadErrorTypeEnum.FILE_UPLOAD_UNSUPPORTED_FORMAT_REGISTER : FileUploadErrorTypeEnum.FILE_UPLOAD_UNSUPPORTED_FORMAT;
1130
+ }
1131
+ }
1132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1133
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: FileUploadComponent, selector: "tld-file-upload", inputs: { accept: "accept", maxSize: "maxSize", multiple: "multiple", filePreviewProgress: "filePreviewProgress", allowEmpty: "allowEmpty", disabled: "disabled", uploadIconName: "uploadIconName", extendedAcceptList: "extendedAcceptList" }, outputs: { fileChange: "fileChange", errorEvent: "errorEvent" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "inputButton", first: true, predicate: ["inputButton"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"file-upload\" [ngClass.lt-sm]=\"'file-upload-mobile'\">\r\n <mat-progress-bar class=\"tld-file-upload-progress\" color=\"primary\" [value]=\"filePreviewProgress\"\r\n *ngIf=\"filePreviewProgress\"></mat-progress-bar>\r\n <button tldDragAndDrop #inputButton mat-button (fileDropped)=\"onFileDrop($event)\" [disabled]=\"disabled\" type=\"button\"\r\n (click)=\"fileInput.click()\" class=\"upload-button text-l\">\r\n <mat-icon *ngIf=\"uploadIconName\">{{uploadIconName}}</mat-icon>\r\n <ng-content></ng-content>\r\n </button>\r\n</div>\r\n<input #fileInput type=\"file\" (change)=\"handleFileInput($event)\" name=\"files\" class=\"native-file-input\"\r\n [accept]=\"allowedExtensions\" [multiple]=\"multiple\" />\r\n", styles: [".file-upload{max-width:100%;width:100%}.file-upload .upload-button{width:100%;font-size:1em;border:1px dashed #9aa5b1;border-radius:16px;background-color:#fff;font-family:var(--tld-font);padding:1em;white-space:normal;line-height:normal;text-align:left}.file-upload-mobile .upload-button{border:2px solid var(--base-70);padding:.5em 1em!important}.tld-file-over{background-color:#e5e7e8!important;border-color:#00f!important}.mat-icon{color:var(--accent);margin-right:16px}.mat-mdc-outlined-button .mat-button-wrapper{pointer-events:none}.native-file-input{display:none}.tld-file-upload-progress ::ng-deep .mat-progress-bar-fill:after{background-color:#1e457c}.tld-file-upload-progress ::ng-deep .mat-progress-bar-buffer{background:white}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i1$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: DragAndDropDirective, selector: "[tldDragAndDrop]", outputs: ["fileDropped"] }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
1134
+ }
1135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FileUploadComponent, decorators: [{
1136
+ type: Component,
1137
+ args: [{ selector: 'tld-file-upload', template: "<div class=\"file-upload\" [ngClass.lt-sm]=\"'file-upload-mobile'\">\r\n <mat-progress-bar class=\"tld-file-upload-progress\" color=\"primary\" [value]=\"filePreviewProgress\"\r\n *ngIf=\"filePreviewProgress\"></mat-progress-bar>\r\n <button tldDragAndDrop #inputButton mat-button (fileDropped)=\"onFileDrop($event)\" [disabled]=\"disabled\" type=\"button\"\r\n (click)=\"fileInput.click()\" class=\"upload-button text-l\">\r\n <mat-icon *ngIf=\"uploadIconName\">{{uploadIconName}}</mat-icon>\r\n <ng-content></ng-content>\r\n </button>\r\n</div>\r\n<input #fileInput type=\"file\" (change)=\"handleFileInput($event)\" name=\"files\" class=\"native-file-input\"\r\n [accept]=\"allowedExtensions\" [multiple]=\"multiple\" />\r\n", styles: [".file-upload{max-width:100%;width:100%}.file-upload .upload-button{width:100%;font-size:1em;border:1px dashed #9aa5b1;border-radius:16px;background-color:#fff;font-family:var(--tld-font);padding:1em;white-space:normal;line-height:normal;text-align:left}.file-upload-mobile .upload-button{border:2px solid var(--base-70);padding:.5em 1em!important}.tld-file-over{background-color:#e5e7e8!important;border-color:#00f!important}.mat-icon{color:var(--accent);margin-right:16px}.mat-mdc-outlined-button .mat-button-wrapper{pointer-events:none}.native-file-input{display:none}.tld-file-upload-progress ::ng-deep .mat-progress-bar-fill:after{background-color:#1e457c}.tld-file-upload-progress ::ng-deep .mat-progress-bar-buffer{background:white}\n"] }]
1138
+ }], propDecorators: { fileInput: [{
1139
+ type: ViewChild,
1140
+ args: ['fileInput']
1141
+ }], inputButton: [{
1142
+ type: ViewChild,
1143
+ args: ['inputButton', { read: ElementRef }]
1144
+ }], fileChange: [{
1145
+ type: Output
1146
+ }], errorEvent: [{
1147
+ type: Output
1148
+ }], accept: [{
1149
+ type: Input
1150
+ }], maxSize: [{
1151
+ type: Input
1152
+ }], multiple: [{
1153
+ type: Input
1154
+ }], filePreviewProgress: [{
1155
+ type: Input
1156
+ }], allowEmpty: [{
1157
+ type: Input
1158
+ }], disabled: [{
1159
+ type: Input
1160
+ }], uploadIconName: [{
1161
+ type: Input
1162
+ }], extendedAcceptList: [{
1163
+ type: Input
1164
+ }] } });
1165
+
1166
+ class FileUploadModule {
1167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1168
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: FileUploadModule, declarations: [FileUploadComponent], imports: [CommonModule,
1169
+ MatProgressBarModule,
1170
+ FlexLayoutModule,
1171
+ MatButtonModule,
1172
+ DragAndDropModule,
1173
+ MatIconModule], exports: [FileUploadComponent] }); }
1174
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FileUploadModule, imports: [CommonModule,
1175
+ MatProgressBarModule,
1176
+ FlexLayoutModule,
1177
+ MatButtonModule,
1178
+ DragAndDropModule,
1179
+ MatIconModule] }); }
1180
+ }
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FileUploadModule, decorators: [{
1182
+ type: NgModule,
1183
+ args: [{
1184
+ declarations: [FileUploadComponent],
1185
+ imports: [
1186
+ CommonModule,
1187
+ MatProgressBarModule,
1188
+ FlexLayoutModule,
1189
+ MatButtonModule,
1190
+ DragAndDropModule,
1191
+ MatIconModule
1192
+ ],
1193
+ exports: [
1194
+ FileUploadComponent
1195
+ ]
1196
+ }]
1197
+ }] });
1198
+
1199
+ class FilterBarComponent {
1200
+ onResize() {
1201
+ this.checkOverflow();
1202
+ }
1203
+ set filterRowVisible(value) {
1204
+ this._filterRowVisible = value;
1205
+ this.cdref.detectChanges();
1206
+ this.checkOverflow();
1207
+ }
1208
+ // getter for cleaner template html
1209
+ get filterFormGroupValue() {
1210
+ return this.filterFormGroup.value;
1211
+ }
1212
+ // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures
1213
+ get filterRowVisible() { return this._filterRowVisible; }
1214
+ get inputText() {
1215
+ return this._inputText;
1216
+ }
1217
+ get showSearch() {
1218
+ return !this.settings?.hideSearch;
1219
+ }
1220
+ // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures
1221
+ set inputText(value) {
1222
+ this._inputText = value;
1223
+ this.filters.input = this._inputText;
1224
+ this.emitFilters();
1225
+ }
1226
+ constructor(cdref, translate) {
1227
+ this.cdref = cdref;
1228
+ this.translate = translate;
1229
+ this.filterBarChange = new EventEmitter();
1230
+ this._inputText = "";
1231
+ /** To hide filters, but leave chips visible */
1232
+ this.inputFormControlName = "input";
1233
+ this.filterFormGroup = new FormGroup({});
1234
+ this.form = new FormGroup({
1235
+ [this.inputFormControlName]: new FormControl(""),
1236
+ filters: this.filterFormGroup
1237
+ });
1238
+ this.filters = {
1239
+ filters: {},
1240
+ input: ""
1241
+ };
1242
+ this.filterOverflow = false;
1243
+ this.activeFilterIndex = 0;
1244
+ // when to show filter by name or id on mobile
1245
+ this.searchIndex = -1;
1246
+ }
1247
+ ngOnInit() {
1248
+ this.settings.filters?.forEach((field) => {
1249
+ this.filterFormGroup.addControl(field.fieldName, new FormControl([]));
1250
+ });
1251
+ this.subscribeToFormValueChanges();
1252
+ this.searchTooltip = this.settings?.searchTooltip ?? 'FILTER_BAR.SEARCH_TOOLTIP';
1253
+ this.searchTitle = this.settings?.searchTitle ?? 'FILTER_BAR.SEARCH';
1254
+ this.prefixIcon = this.settings?.prefixIcon ?? "filter_alt";
1255
+ this.suffixIcon = this.settings?.suffixIcon ?? "question_mark";
1256
+ this.showSuffixIcon = this.settings?.showSuffixIcon ?? true;
1257
+ }
1258
+ ngAfterViewInit() {
1259
+ this.checkOverflow();
1260
+ this.cdref.detectChanges();
1261
+ }
1262
+ ngOnDestroy() {
1263
+ this.formChangesSubscription.unsubscribe();
1264
+ }
1265
+ emitFilters() {
1266
+ this.filterBarChange.next(this.filters);
1267
+ }
1268
+ switchRight() {
1269
+ if (this.settings?.filters && this.settings?.filters.length === this.activeFilterIndex + 1) {
1270
+ return;
1271
+ }
1272
+ this.activeFilterIndex += 1;
1273
+ }
1274
+ switchLeft() {
1275
+ if (this.activeFilterIndex === this.searchIndex) {
1276
+ return;
1277
+ }
1278
+ this.activeFilterIndex -= 1;
1279
+ }
1280
+ removeFilter(key, ix) {
1281
+ const control = this.filterFormGroup.get(key);
1282
+ if (!control) {
1283
+ return;
1284
+ }
1285
+ const newArray = control.value;
1286
+ newArray.splice(ix, 1);
1287
+ control.setValue(newArray);
1288
+ }
1289
+ checkOverflow() {
1290
+ if (this.filterWrapper) {
1291
+ this.filterOverflow = this.filterWrapper.nativeElement.clientWidth < this.filterWrapper.nativeElement.scrollWidth;
1292
+ }
1293
+ }
1294
+ subscribeToFormValueChanges() {
1295
+ this.formChangesSubscription = this.form.valueChanges.subscribe(() => {
1296
+ this.filters = {
1297
+ input: this.form.value.input ?? "",
1298
+ filters: {}
1299
+ };
1300
+ for (const filterKey in this.form.value.filters) {
1301
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1302
+ const filter = this.form.value.filters[filterKey];
1303
+ this.filters.filters[filterKey] = filter.map((item) => item.value);
1304
+ }
1305
+ this.emitFilters();
1306
+ });
1307
+ }
1308
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterBarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1309
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: FilterBarComponent, selector: "tld-filter-bar", inputs: { settings: "settings", filterRowVisible: "filterRowVisible" }, outputs: { filterBarChange: "filterBarChange" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "filterWrapper", first: true, predicate: ["filterWrapper"], descendants: true }], ngImport: i0, template: "<div class=\"filter-row\" *ngIf=\"filterRowVisible\">\r\n <div fxLayout=\"row\" class=\"filter-wrapper\" #filterWrapper [formGroup]=\"form\">\r\n <mat-form-field fxFlex *ngIf=\"showSearch && !filterOverflow || activeFilterIndex === searchIndex\" class=\"filter-bar-search-input\">\r\n <span matPrefix class=\"material-icons-outlined\">\r\n {{prefixIcon}}\r\n </span>\r\n <span matSuffix class=\"material-icons-outlined\" *ngIf=\"showSuffixIcon\" [matTooltip]=\"searchTooltip | translate\">\r\n {{suffixIcon}}\r\n </span>\r\n <input class=\"search-input\" matInput [placeholder]=\"searchTitle | translate\"\r\n [formControlName]=\"inputFormControlName\">\r\n </mat-form-field>\r\n <ng-container [formGroup]=\"filterFormGroup\">\r\n\r\n <mat-form-field [ngClass]=\"{'hidden': filterOverflow && activeFilterIndex !== i, 'engine-filter': !filterOverflow}\" *ngFor=\"let filter of settings?.filters; let i = index\">\r\n <mat-label>{{filter.title | translate}}</mat-label>\r\n <mat-select multiple [formControlName]=\"filter.fieldName\">\r\n <ng-container *ngIf=\"filter.values.length\">\r\n <mat-option *ngFor=\"let value of filter.values | sortTranslationsByProperty:'key'\" [value]=\"value\">\r\n {{value.key | translate : {default: value.value | titlecase } }}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </ng-container>\r\n </div>\r\n <button mat-icon-button (click)=\"switchLeft()\" *ngIf=\"filterOverflow\">\r\n <span class=\"material-icons-outlined\">\r\n arrow_back_ios\r\n </span>\r\n </button>\r\n <button mat-icon-button *ngIf=\"filterOverflow\" (click)=\"switchRight()\">\r\n <span class=\"material-icons-outlined\">\r\n arrow_forward_ios\r\n </span>\r\n </button>\r\n</div>\r\n<mat-chip-listbox>\r\n <div *ngFor=\"let filter of settings?.filters\">\r\n <mat-chip-option *ngFor=\"let filterValue of filterFormGroupValue[filter.fieldName]; let ix=index\"\r\n (removed)=\"removeFilter(filter.fieldName, ix)\" class=\"text-s\">\r\n <button matChipRemove>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <span class=\"chip-filter-title\">{{filter.title | translate}}:</span>\r\n <span class=\"chip-value semi-bold\"> {{filterValue.key | translate : {default: filterValue.value | titlecase }\r\n }}</span>\r\n </mat-chip-option>\r\n </div>\r\n</mat-chip-listbox>\r\n", styles: [":host{display:inline-block}.filter-row{display:flex;background-color:var(--base-95);min-height:40px;min-width:100%;border-radius:.5rem;padding:.5rem 1.25rem 1rem;max-width:100%;align-items:baseline;margin-bottom:.5rem}.filter-row ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.filter-row ::ng-deep .mat-form-field-underline{bottom:0!important}.search-input{background-color:unset;border:none}.engine-filter{margin-left:1rem}.filter-bar-search-input{width:100%}.filter-bar-search-input::ng-deep .material-icons-outlined{vertical-align:bottom}.material-icons-outlined{color:var(--base-40)}.filter-wrapper{max-width:100%;overflow-x:hidden;overflow-y:hidden;display:flex;flex:1}.mat-mdc-chip.mat-mdc-standard-chip{background-color:var(--base-95);padding-left:.5em;padding-right:.75em;border:.5px solid var(--base-70)}.mat-mdc-chip.mat-mdc-standard-chip span{display:inline-block}.mat-mdc-chip.mat-mdc-standard-chip .chip-filter-title+.chip-value{margin-left:.25rem}.mat-mdc-chip .mat-chip-remove{margin-left:0;margin-right:.5em;color:var(--base-40);opacity:1}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i1$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i12.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i12.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i12.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i2$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SortTranslationsByPropertyPipe, name: "sortTranslationsByProperty" }] }); }
1310
+ }
1311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterBarComponent, decorators: [{
1312
+ type: Component,
1313
+ args: [{ selector: 'tld-filter-bar', template: "<div class=\"filter-row\" *ngIf=\"filterRowVisible\">\r\n <div fxLayout=\"row\" class=\"filter-wrapper\" #filterWrapper [formGroup]=\"form\">\r\n <mat-form-field fxFlex *ngIf=\"showSearch && !filterOverflow || activeFilterIndex === searchIndex\" class=\"filter-bar-search-input\">\r\n <span matPrefix class=\"material-icons-outlined\">\r\n {{prefixIcon}}\r\n </span>\r\n <span matSuffix class=\"material-icons-outlined\" *ngIf=\"showSuffixIcon\" [matTooltip]=\"searchTooltip | translate\">\r\n {{suffixIcon}}\r\n </span>\r\n <input class=\"search-input\" matInput [placeholder]=\"searchTitle | translate\"\r\n [formControlName]=\"inputFormControlName\">\r\n </mat-form-field>\r\n <ng-container [formGroup]=\"filterFormGroup\">\r\n\r\n <mat-form-field [ngClass]=\"{'hidden': filterOverflow && activeFilterIndex !== i, 'engine-filter': !filterOverflow}\" *ngFor=\"let filter of settings?.filters; let i = index\">\r\n <mat-label>{{filter.title | translate}}</mat-label>\r\n <mat-select multiple [formControlName]=\"filter.fieldName\">\r\n <ng-container *ngIf=\"filter.values.length\">\r\n <mat-option *ngFor=\"let value of filter.values | sortTranslationsByProperty:'key'\" [value]=\"value\">\r\n {{value.key | translate : {default: value.value | titlecase } }}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </ng-container>\r\n </div>\r\n <button mat-icon-button (click)=\"switchLeft()\" *ngIf=\"filterOverflow\">\r\n <span class=\"material-icons-outlined\">\r\n arrow_back_ios\r\n </span>\r\n </button>\r\n <button mat-icon-button *ngIf=\"filterOverflow\" (click)=\"switchRight()\">\r\n <span class=\"material-icons-outlined\">\r\n arrow_forward_ios\r\n </span>\r\n </button>\r\n</div>\r\n<mat-chip-listbox>\r\n <div *ngFor=\"let filter of settings?.filters\">\r\n <mat-chip-option *ngFor=\"let filterValue of filterFormGroupValue[filter.fieldName]; let ix=index\"\r\n (removed)=\"removeFilter(filter.fieldName, ix)\" class=\"text-s\">\r\n <button matChipRemove>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <span class=\"chip-filter-title\">{{filter.title | translate}}:</span>\r\n <span class=\"chip-value semi-bold\"> {{filterValue.key | translate : {default: filterValue.value | titlecase }\r\n }}</span>\r\n </mat-chip-option>\r\n </div>\r\n</mat-chip-listbox>\r\n", styles: [":host{display:inline-block}.filter-row{display:flex;background-color:var(--base-95);min-height:40px;min-width:100%;border-radius:.5rem;padding:.5rem 1.25rem 1rem;max-width:100%;align-items:baseline;margin-bottom:.5rem}.filter-row ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.filter-row ::ng-deep .mat-form-field-underline{bottom:0!important}.search-input{background-color:unset;border:none}.engine-filter{margin-left:1rem}.filter-bar-search-input{width:100%}.filter-bar-search-input::ng-deep .material-icons-outlined{vertical-align:bottom}.material-icons-outlined{color:var(--base-40)}.filter-wrapper{max-width:100%;overflow-x:hidden;overflow-y:hidden;display:flex;flex:1}.mat-mdc-chip.mat-mdc-standard-chip{background-color:var(--base-95);padding-left:.5em;padding-right:.75em;border:.5px solid var(--base-70)}.mat-mdc-chip.mat-mdc-standard-chip span{display:inline-block}.mat-mdc-chip.mat-mdc-standard-chip .chip-filter-title+.chip-value{margin-left:.25rem}.mat-mdc-chip .mat-chip-remove{margin-left:0;margin-right:.5em;color:var(--base-40);opacity:1}.hidden{display:none}\n"] }]
1314
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.TranslateService }]; }, propDecorators: { filterWrapper: [{
1315
+ type: ViewChild,
1316
+ args: ["filterWrapper"]
1317
+ }], onResize: [{
1318
+ type: HostListener,
1319
+ args: ['window:resize', []]
1320
+ }], settings: [{
1321
+ type: Input
1322
+ }], filterRowVisible: [{
1323
+ type: Input
1324
+ }], filterBarChange: [{
1325
+ type: Output
1326
+ }] } });
1327
+
1328
+ class FilterBarModule {
1329
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1330
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: FilterBarModule, declarations: [FilterBarComponent], imports: [CommonModule,
1331
+ TranslateModule,
1332
+ MatInputModule,
1333
+ MatFormFieldModule,
1334
+ FlexLayoutModule,
1335
+ MatSelectModule,
1336
+ FormsModule,
1337
+ MatTooltipModule,
1338
+ MatButtonModule,
1339
+ MatChipsModule,
1340
+ MatIconModule,
1341
+ ReactiveFormsModule,
1342
+ SortTranslationsByPropertyModule], exports: [FilterBarComponent] }); }
1343
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterBarModule, imports: [CommonModule,
1344
+ TranslateModule,
1345
+ MatInputModule,
1346
+ MatFormFieldModule,
1347
+ FlexLayoutModule,
1348
+ MatSelectModule,
1349
+ FormsModule,
1350
+ MatTooltipModule,
1351
+ MatButtonModule,
1352
+ MatChipsModule,
1353
+ MatIconModule,
1354
+ ReactiveFormsModule,
1355
+ SortTranslationsByPropertyModule] }); }
1356
+ }
1357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: FilterBarModule, decorators: [{
1358
+ type: NgModule,
1359
+ args: [{
1360
+ declarations: [
1361
+ FilterBarComponent
1362
+ ],
1363
+ imports: [
1364
+ CommonModule,
1365
+ TranslateModule,
1366
+ MatInputModule,
1367
+ MatFormFieldModule,
1368
+ FlexLayoutModule,
1369
+ MatSelectModule,
1370
+ FormsModule,
1371
+ MatTooltipModule,
1372
+ MatButtonModule,
1373
+ MatChipsModule,
1374
+ MatIconModule,
1375
+ ReactiveFormsModule,
1376
+ SortTranslationsByPropertyModule
1377
+ ],
1378
+ exports: [
1379
+ FilterBarComponent
1380
+ ]
1381
+ }]
1382
+ }] });
1383
+
1384
+ const DISABLE_EXPORT_ATTRIBUTE_NAME = "disable-export";
1385
+
1386
+ var ExportFormat;
1387
+ (function (ExportFormat) {
1388
+ ExportFormat["CSV"] = "csv";
1389
+ })(ExportFormat || (ExportFormat = {}));
1390
+
1391
+ class MultiFunctionalTableComponent {
1392
+ set selection(value) {
1393
+ this.matSelection.setSelection(...(value ?? []));
1394
+ }
1395
+ get ignoreAttributeName() { return DISABLE_EXPORT_ATTRIBUTE_NAME; }
1396
+ get filterActive() { return this.config.filter?.enabled; }
1397
+ constructor(domService, translateService) {
1398
+ this.domService = domService;
1399
+ this.translateService = translateService;
1400
+ this.matSelection = new SelectionModel(true, []);
1401
+ //#region Output properties
1402
+ this.filterBarChange = new EventEmitter();
1403
+ this.exported = new EventEmitter();
1404
+ this.selectionChange = this.matSelection.changed.asObservable().pipe(map(() => { return this.matSelection.selected; }));
1405
+ this.noDataRowIcon = "manage_search";
1406
+ this.batchColumnName = "batch";
1407
+ }
1408
+ //#region Angular lifecycle hooks
1409
+ ngOnInit() {
1410
+ this.readFromLocalStorage();
1411
+ this.setFilterVisibility();
1412
+ this.setColumnSelectProperties();
1413
+ this.setExportProperties();
1414
+ this.setNoDataRowProperties();
1415
+ }
1416
+ ngAfterContentInit() {
1417
+ this.columnDefs.forEach(columnDef => this.table.addColumnDef(columnDef));
1418
+ this.rowDefs.forEach(rowDef => this.table.addRowDef(rowDef));
1419
+ this.headerRowDefs.forEach(headerRowDef => this.table.addHeaderRowDef(headerRowDef));
1420
+ this.headerRowDefs.forEach(headerRowDef => this.table.addHeaderRowDef(headerRowDef));
1421
+ this.table.setNoDataRow(this.noDataRow);
1422
+ }
1423
+ ngAfterViewInit() {
1424
+ this.config.dataSource.sort = this.sort;
1425
+ }
1426
+ //#endregion
1427
+ updateDisplayColumns(initial = false) {
1428
+ this.batchSelectedEnabled = this.config.batchConfig?.enabled ? true : false;
1429
+ const allColumns = this.config.columnSelect?.columns ?? [];
1430
+ this.displayColumns = [];
1431
+ this.configurableColumns = allColumns.filter(column => !column.notConfigurable);
1432
+ if (this.batchSelectedEnabled) {
1433
+ this.displayColumns.push(this.batchColumnName);
1434
+ }
1435
+ if (!allColumns.length) {
1436
+ return;
1437
+ }
1438
+ const localStorageValue = this.localStorageValue ?? {};
1439
+ if (!localStorageValue.columns) {
1440
+ localStorageValue.columns = {};
1441
+ }
1442
+ allColumns.forEach((column) => {
1443
+ if (initial) {
1444
+ column.selected = localStorageValue.columns?.[column.name] ?? column.selected;
1445
+ }
1446
+ else {
1447
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1448
+ localStorageValue.columns[column.name] = column.selected;
1449
+ }
1450
+ if (column.selected) {
1451
+ this.displayColumns.push(column.name);
1452
+ }
1453
+ });
1454
+ if (!initial) {
1455
+ this.updateLocalStorage(localStorageValue);
1456
+ }
1457
+ }
1458
+ toggleFilterBar() {
1459
+ const localstorageObject = this.localStorageValue ?? {};
1460
+ if (!localstorageObject.filter) {
1461
+ localstorageObject.filter = {};
1462
+ }
1463
+ this.filterBarVisible = !this.filterBarVisible;
1464
+ localstorageObject.filter.visible = this.filterBarVisible;
1465
+ this.updateLocalStorage(localstorageObject);
1466
+ }
1467
+ filtersChanged(filters) {
1468
+ this.filterBarChange.emit(filters);
1469
+ }
1470
+ export() {
1471
+ this.config.dataSource.connect().pipe(take(1)).subscribe((data) => {
1472
+ this.exported.emit(data);
1473
+ });
1474
+ if (this.config.export?.fileOptions) {
1475
+ this.exportToFile();
1476
+ }
1477
+ }
1478
+ highlightElement(element) {
1479
+ return this.highlightedElements?.includes(element);
1480
+ }
1481
+ //#region Methods for batch selection
1482
+ isAllSelected() {
1483
+ const numSelected = this.matSelection.selected.length;
1484
+ const numRows = this.config.dataSource.data.length;
1485
+ return numSelected === numRows;
1486
+ }
1487
+ toggleAllRowSelection() {
1488
+ if (this.isAllSelected()) {
1489
+ this.matSelection.clear();
1490
+ return;
1491
+ }
1492
+ this.matSelection.select(...this.config.dataSource.data);
1493
+ }
1494
+ toggleElementSelection(element) {
1495
+ this.matSelection.toggle(element);
1496
+ }
1497
+ //#endregion
1498
+ exportToFile() {
1499
+ if (!this.config.export?.fileOptions?.saveToFile) {
1500
+ return;
1501
+ }
1502
+ let fileString = "";
1503
+ let extension;
1504
+ switch (this.config.export.fileOptions.format) {
1505
+ case ExportFormat.CSV:
1506
+ default:
1507
+ extension = ExportFormat.CSV;
1508
+ fileString = HtmlElementParseHelper.tableAsCsv(this.tableElementRef.nativeElement, this.ignoreAttributeName);
1509
+ break;
1510
+ }
1511
+ const translatedFileName = this.translateService.instant(this.config.export.fileOptions.fileName);
1512
+ SaveFileHelper.saveFile(fileString, `${translatedFileName}.${extension}`);
1513
+ }
1514
+ updateLocalStorage(newValue) {
1515
+ this.localStorageValue = newValue;
1516
+ if (this.config.localStorageKey && newValue) {
1517
+ this.domService.localStorage?.setItem(this.config.localStorageKey, JSON.stringify(newValue));
1518
+ }
1519
+ }
1520
+ readFromLocalStorage() {
1521
+ if (this.config.localStorageKey) {
1522
+ try {
1523
+ const localStorageString = this.domService.localStorage?.getItem(this.config.localStorageKey);
1524
+ if (localStorageString) {
1525
+ this.localStorageValue = JSON.parse(localStorageString);
1526
+ }
1527
+ }
1528
+ // eslint-disable-next-line no-empty
1529
+ catch {
1530
+ }
1531
+ }
1532
+ }
1533
+ setColumnSelectProperties() {
1534
+ this.columnSelectActive = this.config.columnSelect?.enabled ? true : false;
1535
+ this.updateDisplayColumns(true);
1536
+ }
1537
+ setFilterVisibility() {
1538
+ this.filterBarVisible = this.localStorageValue?.filter?.visible ?? this.config?.filter?.visible ?? false;
1539
+ }
1540
+ setNoDataRowProperties() {
1541
+ if (this.config.noDataRow) {
1542
+ this.noDataRowActive = true;
1543
+ this.noDataRowConfig = this.config.noDataRow;
1544
+ if (this.noDataRowConfig.icon) {
1545
+ this.noDataRowIcon = this.noDataRowConfig.icon;
1546
+ }
1547
+ }
1548
+ }
1549
+ setExportProperties() {
1550
+ if (this.config.export?.enabled) {
1551
+ this.exportActive = true;
1552
+ }
1553
+ }
1554
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MultiFunctionalTableComponent, deps: [{ token: DOMService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1555
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MultiFunctionalTableComponent, selector: "tld-multi-functional-table", inputs: { config: "config", filterEnabled: "filterEnabled", highlightedElements: "highlightedElements", selection: "selection" }, outputs: { filterBarChange: "filterBarChange", exported: "exported", selectionChange: "selectionChange" }, queries: [{ propertyName: "noDataRow", first: true, predicate: MatNoDataRow, descendants: true }, { propertyName: "headerRowDefs", predicate: MatHeaderRowDef }, { propertyName: "rowDefs", predicate: MatRowDef, descendants: true }, { propertyName: "columnDefs", predicate: MatColumnDef }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "tableElementRef", first: true, predicate: MatTable, descendants: true, read: ElementRef }], ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\">\r\n\r\n <div fxLayout=\"row\">\r\n <div fxFlex fxLayoutGap=\"1rem\">\r\n <button mat-button [matMenuTriggerFor]=\"columnMenu\" *ngIf=\"columnSelectActive\">\r\n <span class=\"material-icons column-select-icon\">menu</span>\r\n <span>{{'MULTI_FUNCTIONAL_TABLE.COLUMN_SELECT' | translate}}</span>\r\n </button>\r\n\r\n <button mat-button *ngIf=\"filterActive\" (click)=\"toggleFilterBar()\">\r\n <span class=\"material-icons\">filter_list</span>\r\n <span>{{'MULTI_FUNCTIONAL_TABLE.FILTER_TOGGLE' | translate}}</span>\r\n </button>\r\n\r\n <button mat-stroked-button *ngIf=\"exportActive\" (click)=\"export()\">\r\n <span class=\"material-icons-outlined\">cloud_download</span>\r\n <span>{{'MULTI_FUNCTIONAL_TABLE.EXPORT' | translate}}</span>\r\n </button>\r\n </div>\r\n\r\n <ng-content select=\"[additionalActions]\"></ng-content>\r\n </div>\r\n\r\n <mat-menu #columnMenu=\"matMenu\">\r\n <div class=\"column-select-wrapper\" (click)=\"$event.stopPropagation()\">\r\n <div *ngFor=\"let column of configurableColumns\">\r\n <mat-checkbox [(ngModel)]=\"column.selected\" (change)=\"updateDisplayColumns()\">\r\n {{column.displayName | translate}}\r\n </mat-checkbox>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n\r\n <tld-filter-bar *ngIf=\"filterEnabled && config.filter\" [filterRowVisible]=\"!filterBarVisible\" [settings]=\"config.filter.settings\" \r\n (filterBarChange)=\"filtersChanged($event)\">\r\n </tld-filter-bar>\r\n\r\n <div class=\"table-overflow\">\r\n <table #table mat-table [dataSource]=\"config.dataSource\">\r\n <ng-content></ng-content>\r\n <ng-container [matColumnDef]=\"batchColumnName\">\r\n <th class=\"row-select\" mat-header-cell *matHeaderCellDef disable-export>\r\n <mat-checkbox [disabled]=\"config.batchConfig!.checkBoxesDisabled\" (change)=\"toggleAllRowSelection()\"\r\n [checked]=\"matSelection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"matSelection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </th>\r\n <td class=\"row-select\" mat-cell *matCellDef=\"let element\" disable-export>\r\n <mat-checkbox *ngIf=\"hoveredRow === element || matSelection.isSelected(element)\" [disabled]=\"config.batchConfig!.checkBoxesDisabled\" (click)=\"$event.stopPropagation()\"\r\n (change)=\"toggleElementSelection(element)\" [checked]=\"matSelection.isSelected(element)\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"displayColumns\" sticky></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayColumns\" (mouseover)=\"hoveredRow = row\" (mouseleave)=\"hoveredRow = null\" [class.highlight]=\"highlightElement(row)\"></tr>\r\n\r\n <ng-container *ngIf=\"noDataRowActive\">\r\n <tr *matNoDataRow>\r\n <!-- add random number to make sure it takes full width -->\r\n <td colspan=\"99\">\r\n <div class=\"no-engines-wrapper\">\r\n <ng-container *ngIf=\"!noDataRowConfig.loading; else loading\">\r\n <div>\r\n <span class=\"material-icons-outlined\">\r\n {{noDataRowIcon}}\r\n </span>\r\n </div>\r\n <div class=\"text-xl-semi-bold\" *ngIf=\"noDataRowConfig.title\"\r\n [innerHtml]=\"noDataRowConfig.title | translate: noDataRowConfig.titleParams\">\r\n </div>\r\n <div class=\"text-l\" *ngIf=\"noDataRowConfig.description\"\r\n [innerHtml]=\"noDataRowConfig.description | translate: noDataRowConfig.descriptionParams\"></div>\r\n </ng-container>\r\n <ng-template #loading>\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </ng-template>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n</div>\r\n", styles: [":host ::ng-deep th,:host ::ng-deep tr{white-space:nowrap}:host ::ng-deep td{padding-right:10px!important}:host ::ng-deep tr.mat-mdc-row:hover,:host ::ng-deep tr.mat-mdc-row.highlight{background-color:var(--base-95)}table{width:100%}.column-select-icon{rotate:90deg}.column-select-wrapper{padding:1rem}.material-icons,.material-icons-outlined{margin-right:.5rem}.table-action-button{margin-bottom:1rem}.mat-no-data-row{text-align:center}.mat-no-data-row .no-engines-wrapper{margin-top:4rem}.mat-no-data-row .material-icons-outlined{font-size:4rem;color:var(--base-70)}mat-spinner{margin:auto}th.mat-mdc-header-cell:first-of-type,td.mat-mdc-cell:first-of-type,td.mat-mdc-footer-cell:first-of-type{padding:0 22px}.row-select{width:0}.mat-mdc-checkbox{padding-top:8px}.table-overflow{overflow-x:auto}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i4$1.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "component", type: i1$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FilterBarComponent, selector: "tld-filter-bar", inputs: ["settings", "filterRowVisible"], outputs: ["filterBarChange"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
1556
+ }
1557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MultiFunctionalTableComponent, decorators: [{
1558
+ type: Component,
1559
+ args: [{ selector: 'tld-multi-functional-table', template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\">\r\n\r\n <div fxLayout=\"row\">\r\n <div fxFlex fxLayoutGap=\"1rem\">\r\n <button mat-button [matMenuTriggerFor]=\"columnMenu\" *ngIf=\"columnSelectActive\">\r\n <span class=\"material-icons column-select-icon\">menu</span>\r\n <span>{{'MULTI_FUNCTIONAL_TABLE.COLUMN_SELECT' | translate}}</span>\r\n </button>\r\n\r\n <button mat-button *ngIf=\"filterActive\" (click)=\"toggleFilterBar()\">\r\n <span class=\"material-icons\">filter_list</span>\r\n <span>{{'MULTI_FUNCTIONAL_TABLE.FILTER_TOGGLE' | translate}}</span>\r\n </button>\r\n\r\n <button mat-stroked-button *ngIf=\"exportActive\" (click)=\"export()\">\r\n <span class=\"material-icons-outlined\">cloud_download</span>\r\n <span>{{'MULTI_FUNCTIONAL_TABLE.EXPORT' | translate}}</span>\r\n </button>\r\n </div>\r\n\r\n <ng-content select=\"[additionalActions]\"></ng-content>\r\n </div>\r\n\r\n <mat-menu #columnMenu=\"matMenu\">\r\n <div class=\"column-select-wrapper\" (click)=\"$event.stopPropagation()\">\r\n <div *ngFor=\"let column of configurableColumns\">\r\n <mat-checkbox [(ngModel)]=\"column.selected\" (change)=\"updateDisplayColumns()\">\r\n {{column.displayName | translate}}\r\n </mat-checkbox>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n\r\n <tld-filter-bar *ngIf=\"filterEnabled && config.filter\" [filterRowVisible]=\"!filterBarVisible\" [settings]=\"config.filter.settings\" \r\n (filterBarChange)=\"filtersChanged($event)\">\r\n </tld-filter-bar>\r\n\r\n <div class=\"table-overflow\">\r\n <table #table mat-table [dataSource]=\"config.dataSource\">\r\n <ng-content></ng-content>\r\n <ng-container [matColumnDef]=\"batchColumnName\">\r\n <th class=\"row-select\" mat-header-cell *matHeaderCellDef disable-export>\r\n <mat-checkbox [disabled]=\"config.batchConfig!.checkBoxesDisabled\" (change)=\"toggleAllRowSelection()\"\r\n [checked]=\"matSelection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"matSelection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </th>\r\n <td class=\"row-select\" mat-cell *matCellDef=\"let element\" disable-export>\r\n <mat-checkbox *ngIf=\"hoveredRow === element || matSelection.isSelected(element)\" [disabled]=\"config.batchConfig!.checkBoxesDisabled\" (click)=\"$event.stopPropagation()\"\r\n (change)=\"toggleElementSelection(element)\" [checked]=\"matSelection.isSelected(element)\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"displayColumns\" sticky></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayColumns\" (mouseover)=\"hoveredRow = row\" (mouseleave)=\"hoveredRow = null\" [class.highlight]=\"highlightElement(row)\"></tr>\r\n\r\n <ng-container *ngIf=\"noDataRowActive\">\r\n <tr *matNoDataRow>\r\n <!-- add random number to make sure it takes full width -->\r\n <td colspan=\"99\">\r\n <div class=\"no-engines-wrapper\">\r\n <ng-container *ngIf=\"!noDataRowConfig.loading; else loading\">\r\n <div>\r\n <span class=\"material-icons-outlined\">\r\n {{noDataRowIcon}}\r\n </span>\r\n </div>\r\n <div class=\"text-xl-semi-bold\" *ngIf=\"noDataRowConfig.title\"\r\n [innerHtml]=\"noDataRowConfig.title | translate: noDataRowConfig.titleParams\">\r\n </div>\r\n <div class=\"text-l\" *ngIf=\"noDataRowConfig.description\"\r\n [innerHtml]=\"noDataRowConfig.description | translate: noDataRowConfig.descriptionParams\"></div>\r\n </ng-container>\r\n <ng-template #loading>\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </ng-template>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n</div>\r\n", styles: [":host ::ng-deep th,:host ::ng-deep tr{white-space:nowrap}:host ::ng-deep td{padding-right:10px!important}:host ::ng-deep tr.mat-mdc-row:hover,:host ::ng-deep tr.mat-mdc-row.highlight{background-color:var(--base-95)}table{width:100%}.column-select-icon{rotate:90deg}.column-select-wrapper{padding:1rem}.material-icons,.material-icons-outlined{margin-right:.5rem}.table-action-button{margin-bottom:1rem}.mat-no-data-row{text-align:center}.mat-no-data-row .no-engines-wrapper{margin-top:4rem}.mat-no-data-row .material-icons-outlined{font-size:4rem;color:var(--base-70)}mat-spinner{margin:auto}th.mat-mdc-header-cell:first-of-type,td.mat-mdc-cell:first-of-type,td.mat-mdc-footer-cell:first-of-type{padding:0 22px}.row-select{width:0}.mat-mdc-checkbox{padding-top:8px}.table-overflow{overflow-x:auto}\n"] }]
1560
+ }], ctorParameters: function () { return [{ type: DOMService }, { type: i1$1.TranslateService }]; }, propDecorators: { config: [{
1561
+ type: Input
1562
+ }], filterEnabled: [{
1563
+ type: Input
1564
+ }], highlightedElements: [{
1565
+ type: Input
1566
+ }], selection: [{
1567
+ type: Input
1568
+ }], filterBarChange: [{
1569
+ type: Output
1570
+ }], exported: [{
1571
+ type: Output
1572
+ }], selectionChange: [{
1573
+ type: Output
1574
+ }], headerRowDefs: [{
1575
+ type: ContentChildren,
1576
+ args: [MatHeaderRowDef]
1577
+ }], rowDefs: [{
1578
+ type: ContentChildren,
1579
+ args: [MatRowDef, { descendants: true }]
1580
+ }], columnDefs: [{
1581
+ type: ContentChildren,
1582
+ args: [MatColumnDef]
1583
+ }], noDataRow: [{
1584
+ type: ContentChild,
1585
+ args: [MatNoDataRow]
1586
+ }], table: [{
1587
+ type: ViewChild,
1588
+ args: [MatTable, { static: true }]
1589
+ }], sort: [{
1590
+ type: ViewChild,
1591
+ args: [MatSort]
1592
+ }], tableElementRef: [{
1593
+ type: ViewChild,
1594
+ args: [MatTable, { read: ElementRef }]
1595
+ }] } });
1596
+
1597
+ class MultiFunctionalTableModule {
1598
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MultiFunctionalTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1599
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: MultiFunctionalTableModule, declarations: [MultiFunctionalTableComponent], imports: [CommonModule,
1600
+ MatTableModule,
1601
+ MatButtonModule,
1602
+ TranslateModule,
1603
+ MatMenuModule,
1604
+ MatCheckboxModule,
1605
+ FormsModule,
1606
+ FilterBarModule,
1607
+ FlexLayoutModule,
1608
+ MatSortModule,
1609
+ MatProgressSpinnerModule], exports: [MultiFunctionalTableComponent] }); }
1610
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MultiFunctionalTableModule, imports: [CommonModule,
1611
+ MatTableModule,
1612
+ MatButtonModule,
1613
+ TranslateModule,
1614
+ MatMenuModule,
1615
+ MatCheckboxModule,
1616
+ FormsModule,
1617
+ FilterBarModule,
1618
+ FlexLayoutModule,
1619
+ MatSortModule,
1620
+ MatProgressSpinnerModule] }); }
1621
+ }
1622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MultiFunctionalTableModule, decorators: [{
1623
+ type: NgModule,
1624
+ args: [{
1625
+ declarations: [
1626
+ MultiFunctionalTableComponent
1627
+ ],
1628
+ imports: [
1629
+ CommonModule,
1630
+ MatTableModule,
1631
+ MatButtonModule,
1632
+ TranslateModule,
1633
+ MatMenuModule,
1634
+ MatCheckboxModule,
1635
+ FormsModule,
1636
+ FilterBarModule,
1637
+ FlexLayoutModule,
1638
+ MatSortModule,
1639
+ MatProgressSpinnerModule
1640
+ ],
1641
+ exports: [
1642
+ MultiFunctionalTableComponent
1643
+ ]
1644
+ }]
1645
+ }] });
1646
+
1647
+ var Confirmation;
1648
+ (function (Confirmation) {
1649
+ Confirmation[Confirmation["PRIMARY"] = 1] = "PRIMARY";
1650
+ Confirmation[Confirmation["SECONDARY"] = 2] = "SECONDARY";
1651
+ })(Confirmation || (Confirmation = {}));
1652
+
1653
+ class ConfirmationModalComponent {
1654
+ constructor(dialogRef, data) {
1655
+ this.dialogRef = dialogRef;
1656
+ this.data = data;
1657
+ this.confirmation = Confirmation;
1658
+ }
1659
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationModalComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
1660
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: ConfirmationModalComponent, selector: "lib-confirmation-modal", ngImport: i0, template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\r\n<div mat-dialog-content>\r\n <p>{{ data.descriptioon | translate }}</p>\r\n \r\n <ul *ngIf=\"data.details\">\r\n <li *ngFor=\"let extraData of data.details\">\r\n {{ extraData }}\r\n </li>\r\n </ul>\r\n</div>\r\n<div class=\"d-flex justify-content-center\" mat-dialog-actions>\r\n <button mat-flat-button color=\"accent\" [mat-dialog-close]=\"confirmation.PRIMARY\">\r\n {{ data.confirmationText | translate }}\r\n </button>\r\n <button mat-stroked-button color=\"accent\" class=\"ml-3\" [mat-dialog-close]=\"confirmation.SECONDARY\">\r\n {{ data.rejectionText | translate }}\r\n </button>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i1$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
1661
+ }
1662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationModalComponent, decorators: [{
1663
+ type: Component,
1664
+ args: [{ selector: 'lib-confirmation-modal', template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\r\n<div mat-dialog-content>\r\n <p>{{ data.descriptioon | translate }}</p>\r\n \r\n <ul *ngIf=\"data.details\">\r\n <li *ngFor=\"let extraData of data.details\">\r\n {{ extraData }}\r\n </li>\r\n </ul>\r\n</div>\r\n<div class=\"d-flex justify-content-center\" mat-dialog-actions>\r\n <button mat-flat-button color=\"accent\" [mat-dialog-close]=\"confirmation.PRIMARY\">\r\n {{ data.confirmationText | translate }}\r\n </button>\r\n <button mat-stroked-button color=\"accent\" class=\"ml-3\" [mat-dialog-close]=\"confirmation.SECONDARY\">\r\n {{ data.rejectionText | translate }}\r\n </button>\r\n</div>\r\n" }]
1665
+ }], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
1666
+ type: Inject,
1667
+ args: [MAT_DIALOG_DATA]
1668
+ }] }]; } });
1669
+
1670
+ class ConfirmationModalModule {
1671
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1672
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationModalModule, declarations: [ConfirmationModalComponent], imports: [CommonModule, MatDialogModule, MatButtonModule, TranslateModule], exports: [ConfirmationModalComponent] }); }
1673
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationModalModule, imports: [CommonModule, MatDialogModule, MatButtonModule, TranslateModule] }); }
1674
+ }
1675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationModalModule, decorators: [{
1676
+ type: NgModule,
1677
+ args: [{
1678
+ declarations: [ConfirmationModalComponent],
1679
+ imports: [CommonModule, MatDialogModule, MatButtonModule, TranslateModule],
1680
+ exports: [ConfirmationModalComponent],
1681
+ }]
1682
+ }] });
1683
+
1684
+ class ConfirmationService {
1685
+ constructor(dialog) {
1686
+ this.dialog = dialog;
1687
+ }
1688
+ openDialog(data) {
1689
+ const dialogRef = this.dialog.open(ConfirmationModalComponent, {
1690
+ data: data,
1691
+ width: '40rem'
1692
+ });
1693
+ return dialogRef.afterClosed();
1694
+ }
1695
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationService, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
1696
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationService, providedIn: 'root' }); }
1697
+ }
1698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ConfirmationService, decorators: [{
1699
+ type: Injectable,
1700
+ args: [{
1701
+ providedIn: 'root'
1702
+ }]
1703
+ }], ctorParameters: function () { return [{ type: i1$3.MatDialog }]; } });
1704
+
1705
+ /*
1706
+ * Public API Surface of ngx-common
1707
+ */
1708
+
1709
+ /**
1710
+ * Generated bundle index. Do not edit.
1711
+ */
1712
+
1713
+ export { ClickOutsideDirective, ClickOutsideModule, CloseButtonComponent, CloseButtonModule, CompanyProductComponent, CompanyProductModule, Confirmation, ConfirmationModalComponent, ConfirmationModalModule, ConfirmationService, DISABLE_EXPORT_ATTRIBUTE_NAME, DOMService, DateAgoModule, DateAgoPipe, DragAndDropDirective, DragAndDropModule, ExportFormat, FileUploadComponent, FileUploadErrorTypeEnum, FileUploadModule, FilterBarComponent, FilterBarModule, FilterWithHighlightModule, FilterWithHighlightPipe, FooterComponent, FooterModule, HtmlElementParseHelper, IconService, InlineMessageComponent, InlineMessageIconPosition, InlineMessageModule, InlineMessageType, MatButtonLoadingDirective, MatButtonLoadingModule, MissingTranslationHelper, MultiFunctionalTableComponent, MultiFunctionalTableModule, NotificationMessageComponent, NotificationMessageModule, NotificationMessageType, PlausibleEventDirective, PlausibleHelper, PlausibleModule, SaveFileHelper, SortTranslationsByPropertyModule, SortTranslationsByPropertyPipe, SortTranslationsModule, SortTranslationsPipe, TldLoaderComponent, TldLoaderModule };
1714
+ //# sourceMappingURL=tilde-nlp-ngx-common.mjs.map