@kms-ngx-ui/presentational 0.0.24 → 14.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 (178) hide show
  1. package/README.md +28 -28
  2. package/{esm2015/kms-ngx-ui-presentational.js → esm2020/kms-ngx-ui-presentational.mjs} +4 -4
  3. package/esm2020/lib/directives/directives.module.mjs +40 -0
  4. package/{esm2015/lib/directives/mousewheel.directive.js → esm2020/lib/directives/mousewheel.directive.mjs} +56 -56
  5. package/{esm2015/lib/directives/sum-of-height.directive.js → esm2020/lib/directives/sum-of-height.directive.mjs} +74 -74
  6. package/{esm2015/lib/directives/swipe.directive.js → esm2020/lib/directives/swipe.directive.mjs} +183 -183
  7. package/esm2020/lib/directives/swipe.model.mjs +5 -0
  8. package/{esm2015/lib/directives/tooltip.directive.js → esm2020/lib/directives/tooltip.directive.mjs} +144 -144
  9. package/esm2020/lib/kms-ngx-ui-presentational.component.mjs +22 -0
  10. package/{esm2015/lib/kms-ngx-ui-presentational.module.js → esm2020/lib/kms-ngx-ui-presentational.module.mjs} +215 -217
  11. package/{esm2015/lib/kms-ngx-ui-presentational.service.js → esm2020/lib/kms-ngx-ui-presentational.service.mjs} +14 -14
  12. package/esm2020/lib/models/address.model.mjs +6 -0
  13. package/{esm2015/lib/models/iconSize.enum.js → esm2020/lib/models/iconSize.enum.mjs} +17 -17
  14. package/{esm2015/lib/models/image-snippet.model.js → esm2020/lib/models/image-snippet.model.mjs} +18 -18
  15. package/{esm2015/lib/models/index.js → esm2020/lib/models/index.mjs} +5 -5
  16. package/{esm2015/lib/models/is-value.function.js → esm2020/lib/models/is-value.function.mjs} +17 -17
  17. package/{esm2015/lib/models/salutation.enum.js → esm2020/lib/models/salutation.enum.mjs} +8 -8
  18. package/{esm2015/lib/models/types/attached-file-dto.model.js → esm2020/lib/models/types/attached-file-dto.model.mjs} +6 -6
  19. package/{esm2015/lib/models/types/nullable.type.js → esm2020/lib/models/types/nullable.type.mjs} +5 -5
  20. package/{esm2015/lib/parent-components/actions.component.js → esm2020/lib/parent-components/actions.component.mjs} +56 -56
  21. package/esm2020/lib/parent-components/form-control.component.mjs +75 -0
  22. package/esm2020/lib/parent-components/form.component.mjs +78 -0
  23. package/{esm2015/lib/pipes/custom-pipes.module.js → esm2020/lib/pipes/custom-pipes.module.mjs} +71 -71
  24. package/esm2020/lib/pipes/decode-uri.pipe.mjs +19 -0
  25. package/esm2020/lib/pipes/encode-uri.pipe.mjs +19 -0
  26. package/{esm2015/lib/pipes/integer-currency.pipe.js → esm2020/lib/pipes/integer-currency.pipe.mjs} +27 -27
  27. package/{esm2015/lib/pipes/safe-html.pipe.js → esm2020/lib/pipes/safe-html.pipe.mjs} +23 -23
  28. package/{esm2015/lib/pipes/safe-resource-url.pipe.js → esm2020/lib/pipes/safe-resource-url.pipe.mjs} +23 -23
  29. package/{esm2015/lib/pipes/safe-style.pipe.js → esm2020/lib/pipes/safe-style.pipe.mjs} +23 -23
  30. package/{esm2015/lib/pipes/safe-url.pipe.js → esm2020/lib/pipes/safe-url.pipe.mjs} +23 -23
  31. package/{esm2015/lib/pipes/to-number.pipe.js → esm2020/lib/pipes/to-number.pipe.mjs} +23 -23
  32. package/{esm2015/lib/pipes/trim.pipe.js → esm2020/lib/pipes/trim.pipe.mjs} +20 -20
  33. package/{esm2015/lib/pipes/typeof.pipe.js → esm2020/lib/pipes/typeof.pipe.mjs} +16 -16
  34. package/esm2020/lib/services/viewport.service.mjs +216 -0
  35. package/esm2020/lib/ui/back-to-top/back-to-top.component.mjs +49 -0
  36. package/{esm2015/lib/ui/button-with-confirm-dialog/button-response-types.enum.js → esm2020/lib/ui/button-with-confirm-dialog/button-response-types.enum.mjs} +6 -6
  37. package/esm2020/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.mjs +58 -0
  38. package/{esm2015/lib/ui/button-with-confirm-dialog/dialog-data.model.js → esm2020/lib/ui/button-with-confirm-dialog/dialog-data.model.mjs} +2 -2
  39. package/esm2020/lib/ui/checkbox/checkbox.component.mjs +71 -0
  40. package/esm2020/lib/ui/color-input/color-input.component.mjs +76 -0
  41. package/esm2020/lib/ui/dropdown-from-data/dropdown-from-data.component.mjs +165 -0
  42. package/esm2020/lib/ui/enum-radiogroup/enum-radiogroup.component.mjs +53 -0
  43. package/esm2020/lib/ui/file-input/file-input.component.mjs +232 -0
  44. package/esm2020/lib/ui/flyout/flyout.component.mjs +119 -0
  45. package/esm2020/lib/ui/generic-dialog/generic-dialog.component.mjs +54 -0
  46. package/esm2020/lib/ui/icon/icon.component.mjs +48 -0
  47. package/esm2020/lib/ui/icon/iconSize.enum.mjs +17 -0
  48. package/esm2020/lib/ui/image-slider/image-slider.component.mjs +189 -0
  49. package/esm2020/lib/ui/kms-accordion-item/kms-accordion-item.component.mjs +40 -0
  50. package/esm2020/lib/ui/loader/loader.component.mjs +21 -0
  51. package/esm2020/lib/ui/map/map.component.mjs +116 -0
  52. package/esm2020/lib/ui/radiobutton/radiobutton.component.mjs +73 -0
  53. package/esm2020/lib/ui/salutation-dropdown/salutation-dropdown.component.mjs +55 -0
  54. package/esm2020/lib/ui/salutation-radiogroup/salutation-radiogroup.component.mjs +49 -0
  55. package/esm2020/lib/ui/time-input/time-input.component.mjs +83 -0
  56. package/esm2020/lib/ui/tooltip/tooltip.component.mjs +16 -0
  57. package/esm2020/lib/ui/tooltip-icon/tooltip-icon.component.mjs +35 -0
  58. package/esm2020/lib/ui/yes-no-radiogroup/yes-no-radiogroup.component.mjs +82 -0
  59. package/esm2020/public-api.mjs +49 -0
  60. package/fesm2015/kms-ngx-ui-presentational.mjs +3013 -0
  61. package/fesm2015/kms-ngx-ui-presentational.mjs.map +1 -0
  62. package/{fesm2015/kms-ngx-ui-presentational.js → fesm2020/kms-ngx-ui-presentational.mjs} +2894 -3108
  63. package/fesm2020/kms-ngx-ui-presentational.mjs.map +1 -0
  64. package/{kms-ngx-ui-presentational.d.ts → index.d.ts} +5 -5
  65. package/lib/directives/directives.module.d.ts +11 -13
  66. package/lib/directives/mousewheel.directive.d.ts +15 -15
  67. package/lib/directives/sum-of-height.directive.d.ts +31 -31
  68. package/lib/directives/swipe.directive.d.ts +45 -45
  69. package/lib/directives/swipe.model.d.ts +49 -49
  70. package/lib/directives/tooltip.directive.d.ts +29 -29
  71. package/lib/kms-ngx-ui-presentational.component.d.ts +8 -8
  72. package/lib/kms-ngx-ui-presentational.module.d.ts +47 -47
  73. package/lib/kms-ngx-ui-presentational.service.d.ts +6 -6
  74. package/lib/models/address.model.d.ts +14 -14
  75. package/lib/models/iconSize.enum.d.ts +15 -15
  76. package/lib/models/image-snippet.model.d.ts +15 -15
  77. package/lib/models/index.d.ts +4 -4
  78. package/lib/models/is-value.function.d.ts +9 -9
  79. package/lib/models/salutation.enum.d.ts +5 -5
  80. package/lib/models/types/attached-file-dto.model.d.ts +11 -11
  81. package/lib/models/types/nullable.type.d.ts +4 -4
  82. package/lib/parent-components/actions.component.d.ts +31 -31
  83. package/lib/parent-components/form-control.component.d.ts +27 -27
  84. package/lib/parent-components/form.component.d.ts +34 -40
  85. package/lib/pipes/custom-pipes.module.d.ts +17 -17
  86. package/lib/pipes/decode-uri.pipe.d.ts +10 -10
  87. package/lib/pipes/encode-uri.pipe.d.ts +10 -10
  88. package/lib/pipes/integer-currency.pipe.d.ts +13 -13
  89. package/lib/pipes/safe-html.pipe.d.ts +13 -13
  90. package/lib/pipes/safe-resource-url.pipe.d.ts +13 -13
  91. package/lib/pipes/safe-style.pipe.d.ts +13 -13
  92. package/lib/pipes/safe-url.pipe.d.ts +13 -13
  93. package/lib/pipes/to-number.pipe.d.ts +10 -10
  94. package/lib/pipes/trim.pipe.d.ts +10 -10
  95. package/lib/pipes/typeof.pipe.d.ts +7 -7
  96. package/lib/services/viewport.service.d.ts +74 -83
  97. package/lib/ui/back-to-top/back-to-top.component.d.ts +10 -10
  98. package/lib/ui/button-with-confirm-dialog/button-response-types.enum.d.ts +4 -4
  99. package/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.d.ts +19 -19
  100. package/lib/ui/button-with-confirm-dialog/dialog-data.model.d.ts +9 -9
  101. package/lib/ui/checkbox/checkbox.component.d.ts +31 -31
  102. package/lib/ui/color-input/color-input.component.d.ts +19 -19
  103. package/lib/ui/dropdown-from-data/dropdown-from-data.component.d.ts +55 -55
  104. package/lib/ui/enum-radiogroup/enum-radiogroup.component.d.ts +17 -17
  105. package/lib/ui/file-input/file-input.component.d.ts +89 -89
  106. package/lib/ui/flyout/flyout.component.d.ts +32 -32
  107. package/lib/ui/generic-dialog/generic-dialog.component.d.ts +26 -26
  108. package/lib/ui/icon/icon.component.d.ts +42 -48
  109. package/lib/ui/icon/iconSize.enum.d.ts +15 -25
  110. package/lib/ui/image-slider/image-slider.component.d.ts +62 -62
  111. package/lib/ui/kms-accordion-item/kms-accordion-item.component.d.ts +22 -22
  112. package/lib/ui/loader/loader.component.d.ts +9 -9
  113. package/lib/ui/map/map.component.d.ts +70 -69
  114. package/lib/ui/radiobutton/radiobutton.component.d.ts +26 -27
  115. package/lib/ui/salutation-dropdown/salutation-dropdown.component.d.ts +17 -17
  116. package/lib/ui/salutation-radiogroup/salutation-radiogroup.component.d.ts +15 -15
  117. package/lib/ui/time-input/time-input.component.d.ts +22 -22
  118. package/lib/ui/tooltip/tooltip.component.d.ts +6 -6
  119. package/lib/ui/tooltip-icon/tooltip-icon.component.d.ts +13 -13
  120. package/lib/ui/yes-no-radiogroup/yes-no-radiogroup.component.d.ts +27 -27
  121. package/package.json +27 -14
  122. package/public-api.d.ts +45 -46
  123. package/src/lib/ui/back-to-top/back-to-top.component.scss +46 -45
  124. package/src/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.scss +2 -2
  125. package/src/lib/ui/checkbox/checkbox.component.scss +48 -48
  126. package/src/lib/ui/color-input/color-input.component.scss +38 -38
  127. package/src/lib/ui/file-input/file-input.component.scss +2 -2
  128. package/src/lib/ui/flyout/flyout.component.scss +34 -34
  129. package/src/lib/ui/generic-dialog/generic-dialog.component.scss +59 -59
  130. package/src/lib/ui/icon/icon.component.scss +148 -114
  131. package/src/lib/ui/image-slider/image-slider.component.scss +219 -219
  132. package/src/lib/ui/kms-accordion-item/kms-accordion-item.component.scss +95 -95
  133. package/src/lib/ui/radiobutton/radiobutton.component.scss +31 -31
  134. package/src/lib/ui/time-input/time-input.component.scss +10 -10
  135. package/src/lib/ui/tooltip/tooltip.component.scss +26 -26
  136. package/src/lib/ui/tooltip-icon/tooltip-icon.component.scss +2 -2
  137. package/src/styles/mixins.scss +8 -8
  138. package/src/styles/styles.scss +30 -31
  139. package/bundles/kms-ngx-ui-presentational.umd.js +0 -3751
  140. package/bundles/kms-ngx-ui-presentational.umd.js.map +0 -1
  141. package/esm2015/lib/directives/directives.module.js +0 -45
  142. package/esm2015/lib/directives/size.directive.js +0 -21
  143. package/esm2015/lib/directives/swipe.model.js +0 -5
  144. package/esm2015/lib/kms-ngx-ui-presentational.component.js +0 -26
  145. package/esm2015/lib/models/address.model.js +0 -6
  146. package/esm2015/lib/parent-components/colorable.component.js +0 -35
  147. package/esm2015/lib/parent-components/form-control.component.js +0 -76
  148. package/esm2015/lib/parent-components/form.component.js +0 -99
  149. package/esm2015/lib/pipes/decode-uri.pipe.js +0 -19
  150. package/esm2015/lib/pipes/encode-uri.pipe.js +0 -19
  151. package/esm2015/lib/services/viewport.service.js +0 -242
  152. package/esm2015/lib/ui/back-to-top/back-to-top.component.js +0 -52
  153. package/esm2015/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.js +0 -62
  154. package/esm2015/lib/ui/checkbox/checkbox.component.js +0 -76
  155. package/esm2015/lib/ui/color-input/color-input.component.js +0 -81
  156. package/esm2015/lib/ui/dropdown-from-data/dropdown-from-data.component.js +0 -169
  157. package/esm2015/lib/ui/enum-radiogroup/enum-radiogroup.component.js +0 -57
  158. package/esm2015/lib/ui/file-input/file-input.component.js +0 -237
  159. package/esm2015/lib/ui/flyout/flyout.component.js +0 -125
  160. package/esm2015/lib/ui/generic-dialog/generic-dialog.component.js +0 -58
  161. package/esm2015/lib/ui/icon/icon.component.js +0 -55
  162. package/esm2015/lib/ui/icon/iconSize.enum.js +0 -28
  163. package/esm2015/lib/ui/image-slider/image-slider.component.js +0 -193
  164. package/esm2015/lib/ui/kms-accordion-item/kms-accordion-item.component.js +0 -44
  165. package/esm2015/lib/ui/loader/loader.component.js +0 -25
  166. package/esm2015/lib/ui/map/map.component.js +0 -120
  167. package/esm2015/lib/ui/radiobutton/radiobutton.component.js +0 -82
  168. package/esm2015/lib/ui/salutation-dropdown/salutation-dropdown.component.js +0 -59
  169. package/esm2015/lib/ui/salutation-radiogroup/salutation-radiogroup.component.js +0 -53
  170. package/esm2015/lib/ui/time-input/time-input.component.js +0 -88
  171. package/esm2015/lib/ui/tooltip/tooltip.component.js +0 -20
  172. package/esm2015/lib/ui/tooltip-icon/tooltip-icon.component.js +0 -40
  173. package/esm2015/lib/ui/yes-no-radiogroup/yes-no-radiogroup.component.js +0 -86
  174. package/esm2015/public-api.js +0 -50
  175. package/fesm2015/kms-ngx-ui-presentational.js.map +0 -1
  176. package/lib/directives/size.directive.d.ts +0 -10
  177. package/lib/parent-components/colorable.component.d.ts +0 -10
  178. package/src/styles/animations.scss +0 -47
@@ -0,0 +1,3013 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, EventEmitter, Input, Output, forwardRef, ViewChild, Directive, HostListener, VERSION, Pipe, NgModule, PLATFORM_ID, Inject } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule, CurrencyPipe, isPlatformBrowser } from '@angular/common';
5
+ import * as i1 from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, UntypedFormControl, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import * as i2$1 from '@angular/material/checkbox';
8
+ import { MatCheckboxModule } from '@angular/material/checkbox';
9
+ import * as i2$2 from '@angular/material/radio';
10
+ import { MatRadioModule } from '@angular/material/radio';
11
+ import * as i3 from '@angular/material/form-field';
12
+ import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import * as i4 from '@angular/material/input';
14
+ import { MatInputModule } from '@angular/material/input';
15
+ import * as i1$1 from '@angular/platform-browser';
16
+ import * as i2$3 from '@angular/material/button';
17
+ import { MatButtonModule } from '@angular/material/button';
18
+ import * as i5 from '@ngx-translate/core';
19
+ import { TranslateModule } from '@ngx-translate/core';
20
+ import * as i2$4 from '@angular/material/progress-spinner';
21
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
22
+ import { trigger, state, style } from '@angular/animations';
23
+ import * as i3$1 from '@angular/material/expansion';
24
+ import { MatExpansionModule } from '@angular/material/expansion';
25
+ import { Subject } from 'rxjs';
26
+ import * as i3$2 from '@angular/google-maps';
27
+ import { GoogleMapsModule } from '@angular/google-maps';
28
+ import * as i3$3 from '@angular/material/select';
29
+ import { MatSelectModule } from '@angular/material/select';
30
+ import * as i4$1 from '@angular/material/core';
31
+ import { SubSink } from 'subsink';
32
+ import * as i1$2 from '@angular/material/dialog';
33
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
34
+ import * as i4$2 from '@angular/material/menu';
35
+ import { MatMenuModule } from '@angular/material/menu';
36
+ import { EnumValues } from 'enum-values/src/enumValues';
37
+ import * as i3$4 from '@angular/cdk/drag-drop';
38
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
39
+ import * as i6 from 'ngx-useful-swiper';
40
+ import { NgxUsefulSwiperModule } from 'ngx-useful-swiper';
41
+
42
+ class KmsUiPresentationalService {
43
+ constructor() { }
44
+ }
45
+ KmsUiPresentationalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
46
+ KmsUiPresentationalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalService, providedIn: 'root' });
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalService, decorators: [{
48
+ type: Injectable,
49
+ args: [{
50
+ providedIn: 'root'
51
+ }]
52
+ }], ctorParameters: function () { return []; } });
53
+
54
+ class KmsUiPresentationalComponent {
55
+ constructor() { }
56
+ ngOnInit() {
57
+ }
58
+ }
59
+ KmsUiPresentationalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
60
+ KmsUiPresentationalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KmsUiPresentationalComponent, selector: "lib-kms-ngx-ui-presentational", ngImport: i0, template: `
61
+ <p>
62
+ kms-ngx-ui-presentational works!
63
+ </p>
64
+ `, isInline: true });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalComponent, decorators: [{
66
+ type: Component,
67
+ args: [{ selector: 'lib-kms-ngx-ui-presentational', template: `
68
+ <p>
69
+ kms-ngx-ui-presentational works!
70
+ </p>
71
+ ` }]
72
+ }], ctorParameters: function () { return []; } });
73
+
74
+ /*!
75
+ * @copyright FLYACTS GmbH 2019
76
+ */
77
+ class ActionsParentComponent {
78
+ constructor() {
79
+ /**
80
+ * Defines the disabled property
81
+ */
82
+ this.disabled = false;
83
+ /**
84
+ * Set button as selected. F.e. in multiselect component
85
+ */
86
+ this.checked = false;
87
+ /**
88
+ * Displayed label.
89
+ */
90
+ this.label = '';
91
+ /**
92
+ * Link
93
+ */
94
+ this.link = '';
95
+ /**
96
+ * Internal value that will be send if a form is submitted.
97
+ */
98
+ this.initialValue = '';
99
+ this.select = new EventEmitter();
100
+ }
101
+ selectAction(id) {
102
+ this.checked = !this.checked;
103
+ this.select.emit(id);
104
+ }
105
+ }
106
+ ActionsParentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsParentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
107
+ ActionsParentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ActionsParentComponent, selector: "kms-actions", inputs: { disabled: "disabled", checked: "checked", label: "label", link: "link", initialValue: "initialValue" }, outputs: { select: "select" }, ngImport: i0, template: '', isInline: true });
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsParentComponent, decorators: [{
109
+ type: Component,
110
+ args: [{
111
+ selector: 'kms-actions',
112
+ template: '',
113
+ }]
114
+ }], propDecorators: { disabled: [{
115
+ type: Input
116
+ }], checked: [{
117
+ type: Input
118
+ }], label: [{
119
+ type: Input
120
+ }], link: [{
121
+ type: Input
122
+ }], initialValue: [{
123
+ type: Input
124
+ }], select: [{
125
+ type: Output
126
+ }] } });
127
+
128
+ /*!
129
+ * @copyright FLYACTS GmbH 2019
130
+ */
131
+ class CheckboxComponent extends ActionsParentComponent {
132
+ constructor() {
133
+ super();
134
+ /**
135
+ * Internal description name. All checkboxes with the same name belong to the same group.
136
+ * User can select none, one or all checkboxes with the same name.
137
+ */
138
+ this.name = '';
139
+ this.select = new EventEmitter();
140
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
141
+ this.onChange = () => { };
142
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
143
+ this.onTouch = () => { };
144
+ }
145
+ selectAction(id) {
146
+ this.select.emit(id);
147
+ this.checked = !this.checked;
148
+ }
149
+ get value() {
150
+ return this.checked;
151
+ }
152
+ set value(value) {
153
+ this.checked = value;
154
+ this.onChange(value);
155
+ this.onTouch(value);
156
+ }
157
+ writeValue(value) {
158
+ this.value = value;
159
+ }
160
+ registerOnChange(fn) {
161
+ this.onChange = fn;
162
+ }
163
+ registerOnTouched(fn) {
164
+ this.onTouch = fn;
165
+ }
166
+ }
167
+ CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
+ CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "kms-checkbox", inputs: { infoText: "infoText", name: "name" }, outputs: { select: "select" }, providers: [
169
+ {
170
+ provide: NG_VALUE_ACCESSOR,
171
+ useExisting: forwardRef(() => CheckboxComponent),
172
+ multi: true,
173
+ },
174
+ ], usesInheritance: true, ngImport: i0, template: "<!-- <label class=\"wrapper ui-copy-text\"\n [ngClass]=\"{'disabled' : disabled}\">{{label}}\n <input type=\"checkbox\" \n [checked]=\"checked\"\n [value]=\"value\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n (change)=\"selectAction($event)\">\n\n</label> -->\n<mat-checkbox class=\"example-margin\" [disabled]=\"disabled\" [name]=\"name\" [(ngModel)]=\"checked\"></mat-checkbox>\n<span *ngIf=\"infoText && infoText.length > 0\" \n class=\"\"\n [ngClass]=\"{'disabled' : disabled}\">{{infoText}}\n</span>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, decorators: [{
176
+ type: Component,
177
+ args: [{ selector: 'kms-checkbox', providers: [
178
+ {
179
+ provide: NG_VALUE_ACCESSOR,
180
+ useExisting: forwardRef(() => CheckboxComponent),
181
+ multi: true,
182
+ },
183
+ ], template: "<!-- <label class=\"wrapper ui-copy-text\"\n [ngClass]=\"{'disabled' : disabled}\">{{label}}\n <input type=\"checkbox\" \n [checked]=\"checked\"\n [value]=\"value\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n (change)=\"selectAction($event)\">\n\n</label> -->\n<mat-checkbox class=\"example-margin\" [disabled]=\"disabled\" [name]=\"name\" [(ngModel)]=\"checked\"></mat-checkbox>\n<span *ngIf=\"infoText && infoText.length > 0\" \n class=\"\"\n [ngClass]=\"{'disabled' : disabled}\">{{infoText}}\n</span>" }]
184
+ }], ctorParameters: function () { return []; }, propDecorators: { infoText: [{
185
+ type: Input
186
+ }], name: [{
187
+ type: Input
188
+ }], select: [{
189
+ type: Output
190
+ }] } });
191
+
192
+ /*!
193
+ * @copyright FLYACTS GmbH 2019
194
+ */
195
+ class FormParentComponent {
196
+ constructor(formBuilder) {
197
+ this.formBuilder = formBuilder;
198
+ this.formInitialized = false;
199
+ this.allowedCharsOnlyNumbers = new Set('0123456789'.split('').map(c => c.charCodeAt(0)));
200
+ this.formDataChanged = new EventEmitter();
201
+ this.disabled = false;
202
+ }
203
+ // TODO make a service or make own compoennt etc.
204
+ /**
205
+ * Returns if a number was pressed
206
+ * @param e
207
+ * @returns
208
+ */
209
+ checkIfKeyWasNumber(e, allowDelete = true, allowArrows = true, allowCutCopyPaste = true) {
210
+ // returns if keycode of numbers-row or numberpad. Or if parameter set, allow delete/backspace key
211
+ const isNumberRow = e.keyCode >= 48 && e.keyCode <= 57;
212
+ const isNumberPad = e.keyCode >= 96 && e.keyCode <= 105;
213
+ const isArrows = e.keyCode >= 37 && e.keyCode <= 40;
214
+ const isDelete = e.keyCode == 8 || e.keyCode == 46;
215
+ const isCutCopyOrPaste = (e.ctrlKey || e.metaKey) && (e.keyCode == 86 || e.keyCode == 88 || e.keyCode == 67);
216
+ return (isNumberRow) || (isNumberPad) || (allowDelete && isDelete) || (allowArrows && isArrows) || (allowCutCopyPaste && isCutCopyOrPaste);
217
+ }
218
+ // TODO make a service or make own compoennt etc.
219
+ /**
220
+ * Prevents to input other chars than numbers in input
221
+ * @param event
222
+ */
223
+ removeNumbersOnType(event) {
224
+ // only allow keydown from numbers-row or numberpad of keybard and block other chars than numbers
225
+ if (!this.checkIfKeyWasNumber(event) && !this.allowedCharsOnlyNumbers.has(event.keyCode)) {
226
+ event.preventDefault();
227
+ }
228
+ }
229
+ // TODO make a service or make own compoennt etc.
230
+ /**
231
+ * Prevents input when pasting which is not number
232
+ * @param event
233
+ */
234
+ removeNumbersOnPaste(event) {
235
+ const clipboardData = event.clipboardData;
236
+ if (clipboardData) {
237
+ const pastedText = clipboardData.getData('text');
238
+ if (pastedText) {
239
+ const isnum = /^\d+$/.test(pastedText);
240
+ if (!isnum) {
241
+ event.preventDefault();
242
+ }
243
+ }
244
+ }
245
+ }
246
+ ngOnInit() {
247
+ this.formDataChanged.emit(this.form);
248
+ this.form.valueChanges.subscribe(() => {
249
+ this.formDataChanged.emit(this.form);
250
+ });
251
+ }
252
+ }
253
+ FormParentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormParentComponent, deps: [{ token: i1.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
254
+ FormParentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormParentComponent, selector: "kms-form", inputs: { disabled: "disabled" }, outputs: { formDataChanged: "formDataChanged" }, ngImport: i0, template: '', isInline: true });
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormParentComponent, decorators: [{
256
+ type: Component,
257
+ args: [{
258
+ selector: 'kms-form',
259
+ template: '',
260
+ }]
261
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }]; }, propDecorators: { formDataChanged: [{
262
+ type: Output
263
+ }], disabled: [{
264
+ type: Input
265
+ }] } });
266
+
267
+ class FormControlParentComponent extends FormParentComponent {
268
+ constructor(formBuilder, renderer) {
269
+ super(formBuilder);
270
+ this.formBuilder = formBuilder;
271
+ this.renderer = renderer;
272
+ this.defaultDataOverride = ''; // when we have NO form around, get default via input to set it manually
273
+ this.onSelectItemEmitter = new EventEmitter();
274
+ this.internalValue = '';
275
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
276
+ this.onChange = () => { };
277
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
278
+ this.onTouch = () => { };
279
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
280
+ this.onTouched = () => { };
281
+ }
282
+ ngOnInit() {
283
+ super.ngOnInit();
284
+ }
285
+ change(value) {
286
+ this.onChange(value);
287
+ this.onTouched();
288
+ }
289
+ get value() {
290
+ return this.internalValue;
291
+ }
292
+ set value(value) {
293
+ this.internalValue = value;
294
+ if (value !== undefined && this.internalValue !== value) {
295
+ if (!this.internalValue && this.defaultDataOverride) {
296
+ this.internalValue = this.defaultDataOverride;
297
+ }
298
+ this.onChange(value);
299
+ this.onTouch(value);
300
+ }
301
+ }
302
+ writeValue(value) {
303
+ this.internalValue = value;
304
+ this.value = value;
305
+ }
306
+ registerOnChange(fn) {
307
+ this.onChange = fn;
308
+ }
309
+ registerOnTouched(fn) {
310
+ this.onTouch = fn;
311
+ }
312
+ setDisabledState(isDisabled) {
313
+ if (this.child) {
314
+ this.renderer.setProperty(this.child.nativeElement, 'disabled', isDisabled);
315
+ }
316
+ }
317
+ validate(_) {
318
+ return this.form.valid ? null : false;
319
+ }
320
+ }
321
+ FormControlParentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormControlParentComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
322
+ FormControlParentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormControlParentComponent, selector: "kms-formControlParent", inputs: { defaultDataOverride: "defaultDataOverride" }, outputs: { onSelectItemEmitter: "onSelectItemEmitter" }, viewQueries: [{ propertyName: "child", first: true, predicate: ["child"], descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormControlParentComponent, decorators: [{
324
+ type: Component,
325
+ args: [{
326
+ selector: 'kms-formControlParent',
327
+ template: '',
328
+ }]
329
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; }, propDecorators: { defaultDataOverride: [{
330
+ type: Input
331
+ }], onSelectItemEmitter: [{
332
+ type: Output
333
+ }], child: [{
334
+ type: ViewChild,
335
+ args: ['child']
336
+ }] } });
337
+
338
+ /**
339
+ * Attached File DTO
340
+ */
341
+ class AttachedFileDTO {
342
+ }
343
+
344
+ /*!
345
+ * @copyright FLYACTS GmbH 2019
346
+ */
347
+ var IconSize$1;
348
+ (function (IconSize) {
349
+ IconSize["FULLSIZE"] = "size-full";
350
+ IconSize["TINY"] = "size-16";
351
+ IconSize["SMALLER"] = "size-20";
352
+ IconSize["SMALL"] = "size-32";
353
+ IconSize["MEDIUM"] = "size-64";
354
+ IconSize["LARGE"] = "size-128";
355
+ IconSize["XL"] = "size-256";
356
+ IconSize["XXL"] = "size-512";
357
+ IconSize["XXXL"] = "size-1024";
358
+ IconSize["NONE"] = "NONE";
359
+ })(IconSize$1 || (IconSize$1 = {}));
360
+
361
+ /**
362
+ * @copyright FLYACTS GmbH 2019
363
+ */
364
+ /**
365
+ * Check if null or undefined
366
+ * @param value value that is being checked
367
+ */
368
+ function isValue(value) {
369
+ if (value === null) {
370
+ return false;
371
+ }
372
+ if (typeof value === 'undefined') {
373
+ return false;
374
+ }
375
+ return true;
376
+ }
377
+
378
+ class TooltipDirective {
379
+ constructor(el, renderer) {
380
+ this.el = el;
381
+ this.renderer = renderer;
382
+ this.tooltipTitle = "";
383
+ this.tooltipText = "";
384
+ this.tooltipLinkText = "";
385
+ this.tooltipLinkUrl = "";
386
+ this.tooltipPlacement = "bottom";
387
+ this.tooltipDelay = 1000;
388
+ this.tooltipPlaceIntoHost = false;
389
+ this.tooltipOnlyonclick = false;
390
+ this.offset = 0;
391
+ }
392
+ onMouseEnter() {
393
+ if (!this.tooltipOnlyonclick) {
394
+ this.show();
395
+ }
396
+ }
397
+ onClick() {
398
+ if (this.tooltipOnlyonclick) {
399
+ this.show();
400
+ }
401
+ }
402
+ onMouseLeave() {
403
+ if (this.tooltipElem) {
404
+ this.hide();
405
+ }
406
+ }
407
+ show() {
408
+ if (!this.tooltipElem) {
409
+ this.create();
410
+ this.setPosition();
411
+ }
412
+ this.renderer.addClass(this.tooltipElem, 'tooltip-show');
413
+ }
414
+ hide() {
415
+ this.renderer.removeClass(this.tooltipElem, 'tooltip-show');
416
+ window.setTimeout(() => {
417
+ }, this.tooltipDelay);
418
+ }
419
+ create() {
420
+ this.tooltipElem = this.renderer.createElement('kms-tooltip-element');
421
+ this.tooltipTitleElem = this.renderer.createElement('b');
422
+ this.renderer.appendChild(this.tooltipTitleElem, this.renderer.createText(this.tooltipTitle));
423
+ this.renderer.appendChild(this.tooltipElem, this.tooltipTitleElem);
424
+ this.tooltipTextElem = this.renderer.createElement('div');
425
+ this.renderer.appendChild(this.tooltipTextElem, this.renderer.createText(this.tooltipText));
426
+ this.renderer.appendChild(this.tooltipElem, this.tooltipTextElem);
427
+ this.tooltipLinkElem = this.renderer.createElement('a');
428
+ this.renderer.setAttribute(this.tooltipLinkElem, 'href', this.tooltipLinkUrl);
429
+ this.renderer.appendChild(this.tooltipLinkElem, this.renderer.createText(this.tooltipLinkText));
430
+ this.renderer.appendChild(this.tooltipElem, this.tooltipLinkElem);
431
+ if (this.tooltipPlaceIntoHost) {
432
+ this.renderer.appendChild(this.el.nativeElement, this.tooltipElem);
433
+ }
434
+ else {
435
+ this.renderer.appendChild(document.body, this.tooltipElem);
436
+ }
437
+ this.renderer.addClass(this.tooltipElem, 'tooltip');
438
+ this.renderer.addClass(this.tooltipElem, `tooltip-${this.tooltipPlacement}`);
439
+ this.renderer.setStyle(this.tooltipElem, '-webkit-transition', `opacity ${this.tooltipDelay}ms`);
440
+ this.renderer.setStyle(this.tooltipElem, '-moz-transition', `opacity ${this.tooltipDelay}ms`);
441
+ this.renderer.setStyle(this.tooltipElem, '-o-transition', `opacity ${this.tooltipDelay}ms`);
442
+ this.renderer.setStyle(this.tooltipElem, 'transition', `opacity ${this.tooltipDelay}ms`);
443
+ }
444
+ setPosition() {
445
+ if (this.tooltipElem) {
446
+ const hostPos = this.el.nativeElement.getBoundingClientRect();
447
+ const tooltipPos = this.tooltipElem.getBoundingClientRect();
448
+ let top, left;
449
+ if (this.tooltipPlaceIntoHost) {
450
+ left = 0;
451
+ top = hostPos.height;
452
+ }
453
+ else {
454
+ const scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
455
+ if (this.tooltipPlacement === 'top') {
456
+ top = hostPos.top - tooltipPos.height - this.offset;
457
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
458
+ }
459
+ if (!this.tooltipPlacement || this.tooltipPlacement === 'bottom') {
460
+ top = hostPos.bottom + this.offset;
461
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
462
+ }
463
+ if (this.tooltipPlacement === 'left') {
464
+ top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
465
+ left = hostPos.left - tooltipPos.width - this.offset;
466
+ }
467
+ if (this.tooltipPlacement === 'right') {
468
+ top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
469
+ left = hostPos.right + this.offset;
470
+ }
471
+ top += scrollPos;
472
+ }
473
+ this.renderer.setStyle(this.tooltipElem, 'top', `${top}px`);
474
+ this.renderer.setStyle(this.tooltipElem, 'left', `${left}px`);
475
+ }
476
+ }
477
+ }
478
+ TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
479
+ TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TooltipDirective, selector: "[kmsTooltip]", inputs: { tooltipTitle: "tooltipTitle", tooltipText: "tooltipText", tooltipLinkText: "tooltipLinkText", tooltipLinkUrl: "tooltipLinkUrl", tooltipPlacement: "tooltipPlacement", tooltipDelay: "tooltipDelay", tooltipPlaceIntoHost: "tooltipPlaceIntoHost", tooltipOnlyonclick: "tooltipOnlyonclick" }, host: { listeners: { "mouseenter": "onMouseEnter()", "click": "onClick()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 });
480
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipDirective, decorators: [{
481
+ type: Directive,
482
+ args: [{
483
+ selector: '[kmsTooltip]'
484
+ }]
485
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltipTitle: [{
486
+ type: Input,
487
+ args: ['tooltipTitle']
488
+ }], tooltipText: [{
489
+ type: Input,
490
+ args: ['tooltipText']
491
+ }], tooltipLinkText: [{
492
+ type: Input,
493
+ args: ['tooltipLinkText']
494
+ }], tooltipLinkUrl: [{
495
+ type: Input,
496
+ args: ['tooltipLinkUrl']
497
+ }], tooltipPlacement: [{
498
+ type: Input,
499
+ args: ['tooltipPlacement']
500
+ }], tooltipDelay: [{
501
+ type: Input,
502
+ args: ['tooltipDelay']
503
+ }], tooltipPlaceIntoHost: [{
504
+ type: Input,
505
+ args: ['tooltipPlaceIntoHost']
506
+ }], tooltipOnlyonclick: [{
507
+ type: Input,
508
+ args: ['tooltipOnlyonclick']
509
+ }], onMouseEnter: [{
510
+ type: HostListener,
511
+ args: ['mouseenter']
512
+ }], onClick: [{
513
+ type: HostListener,
514
+ args: ['click']
515
+ }], onMouseLeave: [{
516
+ type: HostListener,
517
+ args: ['mouseleave']
518
+ }] } });
519
+
520
+ /*!
521
+ * @copyright FLYACTS GmbH 2019
522
+ */
523
+ var IconSize;
524
+ (function (IconSize) {
525
+ IconSize["FULLSIZE"] = "size-full";
526
+ IconSize["TINY"] = "size-16";
527
+ IconSize["SMALLER"] = "size-20";
528
+ IconSize["SMALL"] = "size-32";
529
+ IconSize["MEDIUM"] = "size-64";
530
+ IconSize["LARGE"] = "size-128";
531
+ IconSize["XL"] = "size-256";
532
+ IconSize["XXL"] = "size-512";
533
+ IconSize["XXXL"] = "size-1024";
534
+ IconSize["NONE"] = "NONE";
535
+ })(IconSize || (IconSize = {}));
536
+
537
+ /**
538
+ * @copyright KMS GmbH
539
+ */
540
+ class IconComponent {
541
+ constructor(sanitizer) {
542
+ this.sanitizer = sanitizer;
543
+ /**
544
+ * Optional: Different size via CSS inline style.
545
+ */
546
+ this.iconSize = IconSize.FULLSIZE;
547
+ /**
548
+ * Dont use icon sprite
549
+ */
550
+ this.dontUseSprite = false;
551
+ this.IconSize = IconSize;
552
+ this.Version = VERSION.full;
553
+ this.timestamp = 0;
554
+ this.iconToShow = this.icon;
555
+ }
556
+ ngOnInit() {
557
+ this.iconToShow = this.icon;
558
+ const d = new Date();
559
+ const n = d.getTime();
560
+ this.timestamp = n;
561
+ }
562
+ }
563
+ IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IconComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
564
+ IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: IconComponent, selector: "kms-icon", inputs: { icon: "icon", iconClass: "iconClass", iconStyle: "iconStyle", iconSize: "iconSize", dontUseSprite: "dontUseSprite" }, ngImport: i0, template: "<ng-container *ngIf=\"icon !== 'none' && dontUseSprite === false\">\n <span class=\"icon {{ iconSize }}\" [ngClass]=\"iconClass\" [ngStyle]=\"iconStyle\">\n <svg>\n <use\n [attr.xlink:href]=\"\n 'assets/sprite.svg?Version=' + Version + '#' + iconToShow\n \"\n ></use>\n </svg>\n </span>\n</ng-container>\n<ng-container *ngIf=\"icon !== 'none' && dontUseSprite === true\">\n <object\n [data]=\"\n sanitizer.bypassSecurityTrustResourceUrl('assets/icons/' + icon + '')\n \"\n type=\"image/svg+xml\"\n class=\"icon {{ iconSize }}\"\n [ngClass]=\"iconClass\"\n [ngStyle]=\"iconStyle\"\n ></object>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IconComponent, decorators: [{
566
+ type: Component,
567
+ args: [{ selector: 'kms-icon', template: "<ng-container *ngIf=\"icon !== 'none' && dontUseSprite === false\">\n <span class=\"icon {{ iconSize }}\" [ngClass]=\"iconClass\" [ngStyle]=\"iconStyle\">\n <svg>\n <use\n [attr.xlink:href]=\"\n 'assets/sprite.svg?Version=' + Version + '#' + iconToShow\n \"\n ></use>\n </svg>\n </span>\n</ng-container>\n<ng-container *ngIf=\"icon !== 'none' && dontUseSprite === true\">\n <object\n [data]=\"\n sanitizer.bypassSecurityTrustResourceUrl('assets/icons/' + icon + '')\n \"\n type=\"image/svg+xml\"\n class=\"icon {{ iconSize }}\"\n [ngClass]=\"iconClass\"\n [ngStyle]=\"iconStyle\"\n ></object>\n</ng-container>\n" }]
568
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; }, propDecorators: { icon: [{
569
+ type: Input
570
+ }], iconClass: [{
571
+ type: Input
572
+ }], iconStyle: [{
573
+ type: Input
574
+ }], iconSize: [{
575
+ type: Input
576
+ }], dontUseSprite: [{
577
+ type: Input
578
+ }] } });
579
+
580
+ class TooltipIconComponent {
581
+ constructor() {
582
+ this.tooltipTitle = "";
583
+ this.tooltipText = "";
584
+ this.tooltipLinkText = "";
585
+ this.tooltipLinkUrl = "";
586
+ this.placement = "";
587
+ this.delay = 1000;
588
+ this.IconSize = IconSize$1;
589
+ }
590
+ }
591
+ TooltipIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
592
+ TooltipIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TooltipIconComponent, selector: "kms-tooltip-icon", inputs: { tooltipTitle: "tooltipTitle", tooltipText: "tooltipText", tooltipLinkText: "tooltipLinkText", tooltipLinkUrl: "tooltipLinkUrl", placement: "placement", delay: "delay" }, ngImport: i0, template: "<span\n kmsTooltip\n [tooltipTitle]=\"tooltipTitle\"\n [tooltipText]=\"tooltipText\"\n [tooltipPlacement]=\"placement\"\n [tooltipDelay]=\"delay\"\n [tooltipLinkText]=\"tooltipLinkText\"\n [tooltipLinkUrl]=\"tooltipLinkUrl\"\n>\n <kms-icon icon=\"ic_info\" [iconSize]=\"IconSize.SMALLER\" [iconClass]=\"'color-primary'\"></kms-icon>\n</span>\n", styles: [""], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[kmsTooltip]", inputs: ["tooltipTitle", "tooltipText", "tooltipLinkText", "tooltipLinkUrl", "tooltipPlacement", "tooltipDelay", "tooltipPlaceIntoHost", "tooltipOnlyonclick"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }] });
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipIconComponent, decorators: [{
594
+ type: Component,
595
+ args: [{ selector: 'kms-tooltip-icon', template: "<span\n kmsTooltip\n [tooltipTitle]=\"tooltipTitle\"\n [tooltipText]=\"tooltipText\"\n [tooltipPlacement]=\"placement\"\n [tooltipDelay]=\"delay\"\n [tooltipLinkText]=\"tooltipLinkText\"\n [tooltipLinkUrl]=\"tooltipLinkUrl\"\n>\n <kms-icon icon=\"ic_info\" [iconSize]=\"IconSize.SMALLER\" [iconClass]=\"'color-primary'\"></kms-icon>\n</span>\n" }]
596
+ }], propDecorators: { tooltipTitle: [{
597
+ type: Input
598
+ }], tooltipText: [{
599
+ type: Input
600
+ }], tooltipLinkText: [{
601
+ type: Input
602
+ }], tooltipLinkUrl: [{
603
+ type: Input
604
+ }], placement: [{
605
+ type: Input
606
+ }], delay: [{
607
+ type: Input
608
+ }] } });
609
+
610
+ class ColorInputComponent extends FormControlParentComponent {
611
+ constructor(formBuilder, renderer) {
612
+ super(formBuilder, renderer);
613
+ this.formBuilder = formBuilder;
614
+ this.renderer = renderer;
615
+ this.label = '';
616
+ this.tooltipText = '';
617
+ this.placeholder = '';
618
+ }
619
+ ngOnInit() {
620
+ this.form = this.formBuilder.group({
621
+ color: '',
622
+ });
623
+ super.ngOnInit();
624
+ this.formInitialized = true;
625
+ this.form.valueChanges.subscribe((value) => {
626
+ this.internalValue = value.color;
627
+ this.onChange(value.color);
628
+ });
629
+ }
630
+ validate(_) {
631
+ // TODO fix to validate complete form
632
+ this.valid = this.matchesHex(this.form.value) ? null : false;
633
+ return this.valid && {
634
+ invalid: !this.valid
635
+ };
636
+ }
637
+ matchesHex(match) {
638
+ if (match) {
639
+ const ret = match.match(/^#[0-9a-f]{6}$/i);
640
+ this.valid = ret && ret.length > 0;
641
+ return ret;
642
+ }
643
+ return false;
644
+ }
645
+ updateSelectedColor(value) {
646
+ const color = value.target.value;
647
+ this.value = color;
648
+ this.internalValue = color;
649
+ this.change(color);
650
+ }
651
+ }
652
+ ColorInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ColorInputComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
653
+ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ColorInputComponent, selector: "kms-color-input", inputs: { label: "label", tooltipText: "tooltipText", placeholder: "placeholder" }, providers: [
654
+ {
655
+ provide: NG_VALUE_ACCESSOR,
656
+ useExisting: forwardRef(() => ColorInputComponent),
657
+ multi: true,
658
+ },
659
+ ], usesInheritance: true, ngImport: i0, template: "\n<form [formGroup]=\"form\" *ngIf=\"formInitialized\">\n <div>\n <mat-form-field class=\"colorInput\">\n <kms-tooltip-icon [tooltipText]=\"tooltipText\" *ngIf=\"tooltipText\"></kms-tooltip-icon>\n <mat-label>{{ label }}</mat-label>\n <input type=\"text\" [(ngModel)]=\"value\" matInput formControlName=\"color\" [placeholder]=\"placeholder\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n <input type=\"color\" [value]=\"value && matchesHex(value) ? value : '#ffffff'\" (change)=\"updateSelectedColor($event)\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n </mat-form-field>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.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: TooltipIconComponent, selector: "kms-tooltip-icon", inputs: ["tooltipTitle", "tooltipText", "tooltipLinkText", "tooltipLinkUrl", "placement", "delay"] }] });
660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ColorInputComponent, decorators: [{
661
+ type: Component,
662
+ args: [{ selector: 'kms-color-input', providers: [
663
+ {
664
+ provide: NG_VALUE_ACCESSOR,
665
+ useExisting: forwardRef(() => ColorInputComponent),
666
+ multi: true,
667
+ },
668
+ ], template: "\n<form [formGroup]=\"form\" *ngIf=\"formInitialized\">\n <div>\n <mat-form-field class=\"colorInput\">\n <kms-tooltip-icon [tooltipText]=\"tooltipText\" *ngIf=\"tooltipText\"></kms-tooltip-icon>\n <mat-label>{{ label }}</mat-label>\n <input type=\"text\" [(ngModel)]=\"value\" matInput formControlName=\"color\" [placeholder]=\"placeholder\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n <input type=\"color\" [value]=\"value && matchesHex(value) ? value : '#ffffff'\" (change)=\"updateSelectedColor($event)\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n </mat-form-field>\n </div>\n</form>" }]
669
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; }, propDecorators: { label: [{
670
+ type: Input
671
+ }], tooltipText: [{
672
+ type: Input
673
+ }], placeholder: [{
674
+ type: Input
675
+ }] } });
676
+
677
+ /*!
678
+ * @copyright FLYACTS GmbH 2019
679
+ */
680
+ class RadioButtonComponent extends ActionsParentComponent {
681
+ constructor() {
682
+ super();
683
+ /**
684
+ * Internal description name. All radio buttons with the same name belong to the same group.
685
+ * User can select exactly one of the radio buttons from the same group.
686
+ */
687
+ this.name = '';
688
+ /**
689
+ * Internal description id. Will be send in the output event when the radio button is selected.
690
+ */
691
+ this.id = '';
692
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
693
+ this.onChange = () => { };
694
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
695
+ this.onTouch = () => { };
696
+ }
697
+ selectAction(id) {
698
+ this.select.emit(id);
699
+ this.checked = !this.checked;
700
+ }
701
+ get value() {
702
+ return this.checked;
703
+ }
704
+ set value(value) {
705
+ this.checked = value;
706
+ this.onChange(value);
707
+ this.onTouch(value);
708
+ }
709
+ writeValue(value) {
710
+ this.value = value;
711
+ }
712
+ registerOnChange(fn) {
713
+ this.onChange = fn;
714
+ }
715
+ registerOnTouched(fn) {
716
+ this.onTouch = fn;
717
+ }
718
+ }
719
+ RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RadioButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
720
+ RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: RadioButtonComponent, selector: "kms-radiobutton", inputs: { name: "name", id: "id", formControl: "formControl" }, providers: [
721
+ {
722
+ provide: NG_VALUE_ACCESSOR,
723
+ useExisting: forwardRef(() => RadioButtonComponent),
724
+ multi: true,
725
+ },
726
+ ], usesInheritance: true, ngImport: i0, template: "<label class=\"wrapper ui-small-text\"\n [ngClass]=\"{'disabled' : disabled}\">\n <input type=\"radio\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n (change)=\"selectAction($event)\">{{label}}\n\n <kms-icon\n class=\"checkmark\" \n aria-hidden=\"true\"\n *ngIf=\"checked\"\n [ngClass]=\"{\n 'disabled' : disabled\n }\"\n [iconClass]=\"{\n 'disabled' : disabled, \n 'color-primary': true,\n 'size-16': true\n }\"\n [icon]=\"'ic_radiobutton_active'\"\n >\n </kms-icon>\n <kms-icon\n class=\"checkmark\" \n aria-hidden=\"true\"\n *ngIf=\"!checked\"\n [ngClass]=\"{\n 'disabled' : disabled\n }\"\n [iconClass]=\"{\n 'disabled' : disabled, \n 'color-primary': true,\n 'size-16': true\n }\"\n [icon]=\"'ic_radiobutton_inactive'\"\n >\n </kms-icon>\n <ng-content></ng-content>\n</label>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }] });
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RadioButtonComponent, decorators: [{
728
+ type: Component,
729
+ args: [{ selector: 'kms-radiobutton', providers: [
730
+ {
731
+ provide: NG_VALUE_ACCESSOR,
732
+ useExisting: forwardRef(() => RadioButtonComponent),
733
+ multi: true,
734
+ },
735
+ ], template: "<label class=\"wrapper ui-small-text\"\n [ngClass]=\"{'disabled' : disabled}\">\n <input type=\"radio\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n (change)=\"selectAction($event)\">{{label}}\n\n <kms-icon\n class=\"checkmark\" \n aria-hidden=\"true\"\n *ngIf=\"checked\"\n [ngClass]=\"{\n 'disabled' : disabled\n }\"\n [iconClass]=\"{\n 'disabled' : disabled, \n 'color-primary': true,\n 'size-16': true\n }\"\n [icon]=\"'ic_radiobutton_active'\"\n >\n </kms-icon>\n <kms-icon\n class=\"checkmark\" \n aria-hidden=\"true\"\n *ngIf=\"!checked\"\n [ngClass]=\"{\n 'disabled' : disabled\n }\"\n [iconClass]=\"{\n 'disabled' : disabled, \n 'color-primary': true,\n 'size-16': true\n }\"\n [icon]=\"'ic_radiobutton_inactive'\"\n >\n </kms-icon>\n <ng-content></ng-content>\n</label>\n" }]
736
+ }], ctorParameters: function () { return []; }, propDecorators: { name: [{
737
+ type: Input
738
+ }], id: [{
739
+ type: Input
740
+ }], formControl: [{
741
+ type: Input
742
+ }] } });
743
+
744
+ class TimeInputComponent {
745
+ constructor(formBuilder) {
746
+ this.formBuilder = formBuilder;
747
+ this.h = '';
748
+ this.m = '';
749
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
750
+ this.onChange = () => { };
751
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
752
+ this.onTouch = () => { };
753
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
754
+ this.onTouched = () => { };
755
+ }
756
+ get value() {
757
+ return this.value;
758
+ }
759
+ set value(value) {
760
+ this.onChange(value);
761
+ this.onTouch(value);
762
+ }
763
+ writeValue(value) {
764
+ if (value && value.length === 8) {
765
+ this.h = value.substr(0, 2);
766
+ this.m = value.substr(3, 2);
767
+ }
768
+ else if (value && value.length === 5) {
769
+ this.h = value.substr(0, 2);
770
+ this.m = value.substr(-2);
771
+ }
772
+ //we need to also update the form value because angular has a problem reading it from first time when valuechanges subscription was fired.
773
+ this.form.controls['h'].setValue(this.h);
774
+ this.form.controls['m'].setValue(this.m);
775
+ this.form.valueChanges.subscribe(value => {
776
+ this.h = value.h;
777
+ this.m = value.m;
778
+ value = this.getNewOrDefault();
779
+ this.value = value;
780
+ this.onChange(value);
781
+ });
782
+ }
783
+ ngOnInit() {
784
+ this.form = this.formBuilder.group({
785
+ h: '',
786
+ m: '',
787
+ });
788
+ }
789
+ getNewOrDefault() {
790
+ //reset if user deletes everything
791
+ if (this.h === '' && this.m === '') {
792
+ return '';
793
+ }
794
+ const ret = this.h.padStart(2, '0') + ':' + this.m.padStart(2, '0');
795
+ return ret;
796
+ }
797
+ registerOnChange(fn) {
798
+ this.onChange = fn;
799
+ }
800
+ registerOnTouched(fn) {
801
+ this.onTouch = fn;
802
+ }
803
+ }
804
+ TimeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TimeInputComponent, deps: [{ token: i1.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
805
+ TimeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TimeInputComponent, selector: "kms-time-input", providers: [
806
+ {
807
+ provide: NG_VALUE_ACCESSOR,
808
+ useExisting: forwardRef(() => TimeInputComponent),
809
+ multi: true,
810
+ },
811
+ ], ngImport: i0, template: "<form [formGroup]=\"form\" class=\"timeInput\">\n <input type=\"text\" formControlName=\"h\" [value]=\"h\" maxlength=\"2\" pattern=\"(0?[0-9]|1[0-9]|2[0-3])\"/>\n <span>:</span>\n <input type=\"text\" formControlName=\"m\" [value]=\"m\" maxlength=\"2\" pattern=\"(0?[0-9]|[1-5][0-9])\"/>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TimeInputComponent, decorators: [{
813
+ type: Component,
814
+ args: [{ selector: 'kms-time-input', providers: [
815
+ {
816
+ provide: NG_VALUE_ACCESSOR,
817
+ useExisting: forwardRef(() => TimeInputComponent),
818
+ multi: true,
819
+ },
820
+ ], template: "<form [formGroup]=\"form\" class=\"timeInput\">\n <input type=\"text\" formControlName=\"h\" [value]=\"h\" maxlength=\"2\" pattern=\"(0?[0-9]|1[0-9]|2[0-3])\"/>\n <span>:</span>\n <input type=\"text\" formControlName=\"m\" [value]=\"m\" maxlength=\"2\" pattern=\"(0?[0-9]|[1-5][0-9])\"/>\n</form>" }]
821
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }]; } });
822
+
823
+ class YesNoRadiogroupComponent {
824
+ constructor(formBuilder, renderer) {
825
+ this.formBuilder = formBuilder;
826
+ this.renderer = renderer;
827
+ this.disabled = false;
828
+ this.textYes = '';
829
+ this.textNo = '';
830
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
831
+ this.onChange = () => { };
832
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
833
+ this.onTouch = () => { };
834
+ }
835
+ get value() {
836
+ return this.internalValue;
837
+ }
838
+ set value(value) {
839
+ this.internalValue = value;
840
+ if (value !== undefined && this.internalValue !== value) {
841
+ this.onChange(value);
842
+ this.onTouch(value);
843
+ }
844
+ }
845
+ writeValue(value) {
846
+ this.internalValue = value;
847
+ this.value = value;
848
+ }
849
+ registerOnChange(fn) {
850
+ this.onChange = fn;
851
+ }
852
+ registerOnTouched(fn) {
853
+ this.onTouch = fn;
854
+ }
855
+ setDisabledState(isDisabled) {
856
+ if (this.child) {
857
+ this.renderer.setProperty(this.child.nativeElement, 'disabled', isDisabled);
858
+ }
859
+ }
860
+ ngOnInit() {
861
+ this.form = this.formBuilder.group({
862
+ yesno: [],
863
+ });
864
+ this.form.valueChanges.subscribe((value) => {
865
+ this.internalValue = value.yesno;
866
+ this.onChange(value.yesno);
867
+ });
868
+ }
869
+ }
870
+ YesNoRadiogroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: YesNoRadiogroupComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
871
+ YesNoRadiogroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: YesNoRadiogroupComponent, selector: "kms-yesno-radiogroup", inputs: { header: "header", disabled: "disabled", textYes: "textYes", textNo: "textNo" }, providers: [
872
+ {
873
+ provide: NG_VALUE_ACCESSOR,
874
+ useExisting: forwardRef(() => YesNoRadiogroupComponent),
875
+ multi: true,
876
+ },
877
+ ], viewQueries: [{ propertyName: "child", first: true, predicate: ["child"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <div>{{ header }}</div>\n <mat-radio-group [formControl]=\"form.controls['yesno']\" [disabled]=\"disabled\" #child>\n <mat-radio-button [value]=\"true\" [checked]=\"internalValue === true\"> {{ textYes }}</mat-radio-button>\n <mat-radio-button [value]=\"false\" [checked]=\"internalValue === false\"> {{ textNo }}</mat-radio-button>\n </mat-radio-group>\n</form>\n", dependencies: [{ kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: YesNoRadiogroupComponent, decorators: [{
879
+ type: Component,
880
+ args: [{ selector: 'kms-yesno-radiogroup', providers: [
881
+ {
882
+ provide: NG_VALUE_ACCESSOR,
883
+ useExisting: forwardRef(() => YesNoRadiogroupComponent),
884
+ multi: true,
885
+ },
886
+ ], template: "<form [formGroup]=\"form\">\n <div>{{ header }}</div>\n <mat-radio-group [formControl]=\"form.controls['yesno']\" [disabled]=\"disabled\" #child>\n <mat-radio-button [value]=\"true\" [checked]=\"internalValue === true\"> {{ textYes }}</mat-radio-button>\n <mat-radio-button [value]=\"false\" [checked]=\"internalValue === false\"> {{ textNo }}</mat-radio-button>\n </mat-radio-group>\n</form>\n" }]
887
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; }, propDecorators: { header: [{
888
+ type: Input
889
+ }], disabled: [{
890
+ type: Input
891
+ }], textYes: [{
892
+ type: Input
893
+ }], textNo: [{
894
+ type: Input
895
+ }], child: [{
896
+ type: ViewChild,
897
+ args: ['child']
898
+ }] } });
899
+
900
+ // Max size in bytes of uploaded image
901
+ const MAX_SIZE_BYTES = 2097152;
902
+ class FileInputComponent {
903
+ /**
904
+ * Constructor
905
+ * @param formBuilder
906
+ * @param appRef
907
+ * @param cd
908
+ * @param translateService
909
+ * @param renderer
910
+ */
911
+ constructor(formBuilder, appRef, cd,
912
+ //private translateService: TranslateService,
913
+ renderer) {
914
+ this.formBuilder = formBuilder;
915
+ this.appRef = appRef;
916
+ this.cd = cd;
917
+ this.renderer = renderer;
918
+ this.label = '';
919
+ this.previewImage = true;
920
+ this.allowRemove = true;
921
+ this.previewImageText = '';
922
+ this.maxSizeBytes = MAX_SIZE_BYTES;
923
+ this.resizePixels = 0;
924
+ this.acceptedFileMimetypes = 'image/jpeg, image/jpg, image/png';
925
+ this.form = this.formBuilder.group({
926
+ ImageIdent: new UntypedFormControl(''),
927
+ ImageLink: new UntypedFormControl(''),
928
+ Filename: new UntypedFormControl(''),
929
+ ImageAsDataURL: new UntypedFormControl(''),
930
+ Text: new UntypedFormControl(''),
931
+ });
932
+ this.subscriptions = [];
933
+ this.newImageLoading = false;
934
+ this.IconSize = IconSize$1;
935
+ this.formDataChanged = new EventEmitter();
936
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
937
+ this.onChange = () => { };
938
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
939
+ this.onTouch = () => { };
940
+ }
941
+ /**
942
+ * Click on button triggers file-input to open OS file dialog
943
+ */
944
+ selectImageOverlay() {
945
+ this.fileInput.nativeElement.click();
946
+ }
947
+ /**
948
+ * Function to manage the input image
949
+ * Returns an error if the file exceeds maximum wanted filesize (Mb).
950
+ * @param ev
951
+ * @returns
952
+ */
953
+ selectImage(ev) {
954
+ if (ev.target.files && ev.target.files[0]) {
955
+ const file = ev.target.files[0];
956
+ if (file.size > this.maxSizeBytes) {
957
+ this.clearInputValue(ev);
958
+ //alert(this.translateService.instant('errors.fileTooBig'));
959
+ return;
960
+ }
961
+ else {
962
+ this.newImageLoading = true;
963
+ if (this.resizePixels > 0) {
964
+ const logoUrl = URL.createObjectURL(file);
965
+ const imgEl = document.createElement('img');
966
+ imgEl.addEventListener('load', () => {
967
+ const resizedLogo = this.resizeImage(imgEl, this.resizePixels);
968
+ const newFile = this.generateModel(file.name, resizedLogo, this.value.ImageIdent, this.value.ImageLink, this.value.Text);
969
+ this.value = newFile;
970
+ this.newImageLoading = false;
971
+ this.cd.markForCheck();
972
+ });
973
+ imgEl.src = logoUrl;
974
+ }
975
+ else {
976
+ const reader = new FileReader();
977
+ reader.readAsDataURL(file);
978
+ reader.onload = (e) => {
979
+ const newFile = this.generateModel(file.name, e.target.result, this.value.ImageIdent, this.value.ImageLink, this.value.Text);
980
+ this.value = newFile;
981
+ this.newImageLoading = false;
982
+ this.cd.markForCheck();
983
+ };
984
+ }
985
+ }
986
+ }
987
+ else {
988
+ console.warn("No file selected");
989
+ }
990
+ }
991
+ /**
992
+ * Resize an image
993
+ * @param imgEl
994
+ * @param wantedWidth as number
995
+ * @returns string
996
+ */
997
+ resizeImage(imgEl, wantedWidth) {
998
+ const canvas = document.createElement('canvas');
999
+ const ctx = canvas.getContext('2d');
1000
+ const aspect = imgEl.width / imgEl.height;
1001
+ canvas.width = wantedWidth;
1002
+ canvas.height = wantedWidth / aspect;
1003
+ if (isValue(ctx))
1004
+ ctx.drawImage(imgEl, 0, 0, canvas.width, canvas.height);
1005
+ return canvas.toDataURL();
1006
+ }
1007
+ /**
1008
+ * Generate default object
1009
+ * @param name as string
1010
+ * @param content as string
1011
+ * @returns AttachedFileDTO
1012
+ */
1013
+ generateModel(name, content, ident, imageLink, text) {
1014
+ return {
1015
+ ImageIdent: ident ? ident : '',
1016
+ Filename: name ? name : '',
1017
+ ImageAsDataURL: content ? content : '',
1018
+ ImageLink: imageLink ? imageLink : '',
1019
+ Text: text ? text : ''
1020
+ };
1021
+ }
1022
+ /**
1023
+ * Remove image
1024
+ */
1025
+ removeFromList() {
1026
+ this.value = this.generateModel('', '', '', '');
1027
+ }
1028
+ /**
1029
+ * get value
1030
+ */
1031
+ get value() {
1032
+ return this.form.value;
1033
+ }
1034
+ /**
1035
+ * set value
1036
+ */
1037
+ set value(value) {
1038
+ this.form.setValue(value);
1039
+ this.onChange(value);
1040
+ this.formDataChanged.emit(this.form);
1041
+ }
1042
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1043
+ ngOnInit() { }
1044
+ ngOnDestroy() {
1045
+ this.subscriptions.forEach(s => s.unsubscribe());
1046
+ }
1047
+ registerOnChange(fn) {
1048
+ this.onChange = fn;
1049
+ }
1050
+ registerOnTouched(fn) {
1051
+ this.onTouch = fn;
1052
+ }
1053
+ writeValue(value) {
1054
+ if (value) {
1055
+ this.value = value;
1056
+ }
1057
+ if (value === null) {
1058
+ this.form.reset();
1059
+ }
1060
+ }
1061
+ // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures
1062
+ validate(_) {
1063
+ return this.form.valid ? null : { styles: { valid: false } };
1064
+ }
1065
+ /**
1066
+ * OnClick event listener of input#fileInput to clear his input value
1067
+ */
1068
+ clearInputValue(ev) {
1069
+ const element = ev.target;
1070
+ element.value = '';
1071
+ }
1072
+ }
1073
+ FileInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileInputComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.ApplicationRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1074
+ FileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FileInputComponent, selector: "kms-file-input", inputs: { label: "label", previewImage: "previewImage", allowRemove: "allowRemove", previewImageText: "previewImageText", maxSizeBytes: "maxSizeBytes", resizePixels: "resizePixels", acceptedFileMimetypes: "acceptedFileMimetypes" }, outputs: { formDataChanged: "formDataChanged" }, providers: [
1075
+ {
1076
+ provide: NG_VALUE_ACCESSOR,
1077
+ useExisting: forwardRef(() => FileInputComponent),
1078
+ multi: true,
1079
+ },
1080
+ {
1081
+ provide: NG_VALIDATORS,
1082
+ useExisting: forwardRef(() => FileInputComponent),
1083
+ multi: true,
1084
+ },
1085
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (change)=\"newImageLoading=true\" class=\"fileInput\"> \n\n <div *ngIf=\"form.value.Filename && previewImage\">\n <div *ngIf=\"newImageLoading\">\n {{ 'file-input.loading' | translate }}\n </div>\n <div *ngIf=\"!newImageLoading\">\n <div class=\"\">\n <div class=\"\">\n <img *ngIf=\"form.value.ImageLink && form.value.ImageLink !== '' && !(form.value.ImageAsDataURL && form.value.ImageAsDataURL !== '')\" [src]=\"form.value.ImageAsDataURL\" [src]=\"form.value.ImageLink\" style=\"height: 40px; width: fit-content;\" />\n <img *ngIf=\"form.value.ImageAsDataURL && form.value.ImageAsDataURL !== ''\" [src]=\"form.value.ImageAsDataURL\" style=\"height: 40px; width: fit-content;\" />\n </div>\n <div class=\"\">{{form.value.Filename}}</div>\n <div class=\"\">\n <div (click)=\"removeFromList()\" *ngIf=\"allowRemove\">\n <kms-icon icon=\"trash\" [iconSize]=\"IconSize.TINY\" iconClass=\"color-black\"></kms-icon> \n {{ 'file-input.remove' }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"!previewImage\">\n <div class=\"\">{{form.value.Filename}}</div>\n </div>\n\n <button (click)=\"selectImageOverlay()\" class=\"button-primary-font-color\" mat-stroked-button>\n <span>{{ label }}</span>\n </button>\n <input\n type=\"file\"\n [accept]=\"acceptedFileMimetypes\"\n style=\"display: none\"\n #fileInput\n (click)=\"clearInputValue($event)\"\n (change)=\"selectImage($event)\"\n />\n\n <input type=\"hidden\" [formControl]=\"form.controls['ImageIdent']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['ImageLink']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['Filename']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['ImageAsDataURL']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['Text']\" />\n\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
1086
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileInputComponent, decorators: [{
1087
+ type: Component,
1088
+ args: [{ selector: 'kms-file-input', providers: [
1089
+ {
1090
+ provide: NG_VALUE_ACCESSOR,
1091
+ useExisting: forwardRef(() => FileInputComponent),
1092
+ multi: true,
1093
+ },
1094
+ {
1095
+ provide: NG_VALIDATORS,
1096
+ useExisting: forwardRef(() => FileInputComponent),
1097
+ multi: true,
1098
+ },
1099
+ ], template: "<form [formGroup]=\"form\" (change)=\"newImageLoading=true\" class=\"fileInput\"> \n\n <div *ngIf=\"form.value.Filename && previewImage\">\n <div *ngIf=\"newImageLoading\">\n {{ 'file-input.loading' | translate }}\n </div>\n <div *ngIf=\"!newImageLoading\">\n <div class=\"\">\n <div class=\"\">\n <img *ngIf=\"form.value.ImageLink && form.value.ImageLink !== '' && !(form.value.ImageAsDataURL && form.value.ImageAsDataURL !== '')\" [src]=\"form.value.ImageAsDataURL\" [src]=\"form.value.ImageLink\" style=\"height: 40px; width: fit-content;\" />\n <img *ngIf=\"form.value.ImageAsDataURL && form.value.ImageAsDataURL !== ''\" [src]=\"form.value.ImageAsDataURL\" style=\"height: 40px; width: fit-content;\" />\n </div>\n <div class=\"\">{{form.value.Filename}}</div>\n <div class=\"\">\n <div (click)=\"removeFromList()\" *ngIf=\"allowRemove\">\n <kms-icon icon=\"trash\" [iconSize]=\"IconSize.TINY\" iconClass=\"color-black\"></kms-icon> \n {{ 'file-input.remove' }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"!previewImage\">\n <div class=\"\">{{form.value.Filename}}</div>\n </div>\n\n <button (click)=\"selectImageOverlay()\" class=\"button-primary-font-color\" mat-stroked-button>\n <span>{{ label }}</span>\n </button>\n <input\n type=\"file\"\n [accept]=\"acceptedFileMimetypes\"\n style=\"display: none\"\n #fileInput\n (click)=\"clearInputValue($event)\"\n (change)=\"selectImage($event)\"\n />\n\n <input type=\"hidden\" [formControl]=\"form.controls['ImageIdent']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['ImageLink']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['Filename']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['ImageAsDataURL']\" />\n <input type=\"hidden\" [formControl]=\"form.controls['Text']\" />\n\n</form>" }]
1100
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.ApplicationRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { fileInput: [{
1101
+ type: ViewChild,
1102
+ args: ['fileInput']
1103
+ }], label: [{
1104
+ type: Input
1105
+ }], previewImage: [{
1106
+ type: Input
1107
+ }], allowRemove: [{
1108
+ type: Input
1109
+ }], previewImageText: [{
1110
+ type: Input
1111
+ }], maxSizeBytes: [{
1112
+ type: Input
1113
+ }], resizePixels: [{
1114
+ type: Input
1115
+ }], acceptedFileMimetypes: [{
1116
+ type: Input
1117
+ }], formDataChanged: [{
1118
+ type: Output
1119
+ }] } });
1120
+
1121
+ class LoaderComponent {
1122
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1123
+ constructor() {
1124
+ this.loading = false;
1125
+ }
1126
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1127
+ ngOnInit() { }
1128
+ }
1129
+ LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1130
+ LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LoaderComponent, selector: "kms-loader", inputs: { loading: "loading" }, ngImport: i0, template: "<div class=\"loading-spinner-shade\" *ngIf=\"loading\">\n <mat-spinner class=\"spinnerMargin\" color=\"accent\" diameter=\"44\"></mat-spinner>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }] });
1131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoaderComponent, decorators: [{
1132
+ type: Component,
1133
+ args: [{ selector: 'kms-loader', template: "<div class=\"loading-spinner-shade\" *ngIf=\"loading\">\n <mat-spinner class=\"spinnerMargin\" color=\"accent\" diameter=\"44\"></mat-spinner>\n</div>\n" }]
1134
+ }], ctorParameters: function () { return []; }, propDecorators: { loading: [{
1135
+ type: Input
1136
+ }] } });
1137
+
1138
+ /*!
1139
+ * @copyright FLYACTS GmbH 2019
1140
+ */
1141
+ /**
1142
+ * Directive to calc the height of all inner elements
1143
+ */
1144
+ class GetMaxHeightDirective {
1145
+ constructor(el) {
1146
+ this.el = el;
1147
+ /**
1148
+ * CSS class name of the child items (markup elements) that should be checked for their height.
1149
+ * This is mandatory.
1150
+ */
1151
+ this.cssClassName = '';
1152
+ /**
1153
+ * Event that will pass the height of the tallest child inside the container.
1154
+ * Useful to calculate the target height of containers with different content (like accordion) for animations.
1155
+ */
1156
+ this.maxHeightChanged = new EventEmitter();
1157
+ /**
1158
+ * Event that will pass the complete sum of all height values from each child.
1159
+ * Useful to calculate the full target height of a container (like dropdown) for animations.
1160
+ */
1161
+ this.sumOfHeight = new EventEmitter();
1162
+ }
1163
+ ngAfterContentChecked() {
1164
+ this.checkHeightOfChildren(this.el.nativeElement, this.cssClassName);
1165
+ }
1166
+ checkHeightOfChildren(parent, cssClassName) {
1167
+ if (!parent) {
1168
+ return;
1169
+ }
1170
+ // find all the child elements with the selected class name
1171
+ const children = parent.getElementsByClassName(cssClassName);
1172
+ // failsafe
1173
+ if (!children) {
1174
+ return;
1175
+ }
1176
+ // get all the child elements heights
1177
+ const itemHeights = Array.from(children).map((x) => x.getBoundingClientRect().height);
1178
+ // failsafe
1179
+ if (itemHeights.length === 0) {
1180
+ return;
1181
+ }
1182
+ // find out the tallest element
1183
+ const maxHeight = itemHeights.reduce((prev, curr) => {
1184
+ return curr > prev ? curr : prev;
1185
+ }, 0);
1186
+ // get sum of heights
1187
+ const sumOfHeight = itemHeights.reduce((pv, cv) => pv + cv, 0);
1188
+ // inform
1189
+ this.maxHeightChanged.emit(maxHeight);
1190
+ this.sumOfHeight.emit(sumOfHeight);
1191
+ }
1192
+ }
1193
+ GetMaxHeightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GetMaxHeightDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1194
+ GetMaxHeightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: GetMaxHeightDirective, selector: "[getMaxHeight]", inputs: { cssClassName: ["getMaxHeight", "cssClassName"] }, outputs: { maxHeightChanged: "maxHeightChanged", sumOfHeight: "sumOfHeight" }, ngImport: i0 });
1195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GetMaxHeightDirective, decorators: [{
1196
+ type: Directive,
1197
+ args: [{
1198
+ selector: '[getMaxHeight]',
1199
+ }]
1200
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { cssClassName: [{
1201
+ type: Input,
1202
+ args: ['getMaxHeight']
1203
+ }], maxHeightChanged: [{
1204
+ type: Output
1205
+ }], sumOfHeight: [{
1206
+ type: Output
1207
+ }] } });
1208
+
1209
+ /*!
1210
+ * @copyright FLYACTS GmbH 2019
1211
+ */
1212
+ class SafeHtmlPipe {
1213
+ constructor(sanitizer) {
1214
+ this.sanitizer = sanitizer;
1215
+ }
1216
+ transform(html) {
1217
+ return this.sanitizer.bypassSecurityTrustHtml(html);
1218
+ }
1219
+ }
1220
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1221
+ SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SafeHtmlPipe, name: "kmsSafeHtml" });
1222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeHtmlPipe, decorators: [{
1223
+ type: Pipe,
1224
+ args: [{
1225
+ name: 'kmsSafeHtml',
1226
+ }]
1227
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
1228
+
1229
+ /*!
1230
+ * @copyright FLYACTS GmbH 2019
1231
+ */
1232
+ class FlyoutComponent {
1233
+ constructor() {
1234
+ this.icon = 'filter';
1235
+ this.isDropdownOpened = false;
1236
+ this.targetHeight = '0';
1237
+ this.animationTime = 5000;
1238
+ this.headerCssClass = '';
1239
+ this.bodyCssClass = '';
1240
+ this.headerTitle = '';
1241
+ this.headerText = '';
1242
+ this.hasButtonForMore = false;
1243
+ this.moreText = '';
1244
+ this.lessText = '';
1245
+ }
1246
+ /**
1247
+ * Open/close dropdown if click on header.
1248
+ * Except, if mode is set to hasButtonForMore. When there is a extra button to open/close
1249
+ */
1250
+ toggleDropdownHeader() {
1251
+ if (!this.hasButtonForMore) {
1252
+ this.toggleDropdown();
1253
+ }
1254
+ }
1255
+ /**
1256
+ * Open or close the dropdown
1257
+ */
1258
+ toggleDropdown() {
1259
+ this.isDropdownOpened = !this.isDropdownOpened;
1260
+ }
1261
+ /**
1262
+ * Set the height of the dropdown list items dynamic - needed for the animation
1263
+ */
1264
+ setDropdownListHeight(contentHeight) {
1265
+ this.targetHeight = `${contentHeight}px`;
1266
+ }
1267
+ }
1268
+ FlyoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FlyoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1269
+ FlyoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FlyoutComponent, selector: "kms-flyout", inputs: { icon: "icon", headerCssClass: "headerCssClass", bodyCssClass: "bodyCssClass", headerTitle: "headerTitle", headerText: "headerText", hasButtonForMore: "hasButtonForMore", moreText: "moreText", lessText: "lessText" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "flyoutHeader", first: true, predicate: ["flyoutHeader"], descendants: true }], ngImport: i0, template: "<div class=\"flyout\"\n [ngClass]=\"{'is-active': isDropdownOpened}\"\n>\n <div class=\"flyout-header\" (click)=\"toggleDropdownHeader()\" [ngClass]=\"headerCssClass\">\n <span [innerHtml]=\"headerTitle | kmsSafeHtml\"></span>\n <span [innerHtml]=\"headerText | kmsSafeHtml\"></span>\n\n <ng-content select=\"[header]\"></ng-content>\n\n <div *ngIf=\"hasButtonForMore\" (click)=\"toggleDropdown()\" class=\"flyout-header-more\">\n <span *ngIf=\"!isDropdownOpened\">\n {{ moreText }}\n </span>\n <span *ngIf=\"isDropdownOpened\">\n {{ lessText }}\n </span>\n <kms-icon [icon]=\"'chevron-down'\"\n [iconClass]=\"{'size-16': true, 'is-rotating180': isDropdownOpened}\" >\n </kms-icon>\n </div>\n </div>\n <div \n class=\"flyout-body\"\n [ngClass]=\"bodyCssClass\"\n tabindex=\"0\"\n [@dropdownAnimation]=\"{value: isDropdownOpened, params: {targetHeight: targetHeight, animationTime: '500'}}\"\n getMaxHeight=\"inner\"\n (sumOfHeight)=\"setDropdownListHeight($event)\"\n #flyoutHeader>\n <div class=\"inner\" #content>\n <ng-content ></ng-content>\n </div>\n </div>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: GetMaxHeightDirective, selector: "[getMaxHeight]", inputs: ["getMaxHeight"], outputs: ["maxHeightChanged", "sumOfHeight"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }, { kind: "pipe", type: SafeHtmlPipe, name: "kmsSafeHtml" }], animations: [
1270
+ trigger('dropdownAnimation', [
1271
+ state('true', style({
1272
+ height: '{{targetHeight}}',
1273
+ transition: 'height {{animationTime}}ms ease-in-out',
1274
+ }), {
1275
+ params: {
1276
+ targetHeight: '300px',
1277
+ animationTime: 3000,
1278
+ },
1279
+ }),
1280
+ state('false', style({
1281
+ height: 0,
1282
+ transition: 'height {{animationTime}}ms ease-in-out',
1283
+ }), {
1284
+ params: {
1285
+ targetHeight: '300px',
1286
+ opacity: 0,
1287
+ animationTime: 3000,
1288
+ },
1289
+ }),
1290
+ ]),
1291
+ ] });
1292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FlyoutComponent, decorators: [{
1293
+ type: Component,
1294
+ args: [{ selector: 'kms-flyout', animations: [
1295
+ trigger('dropdownAnimation', [
1296
+ state('true', style({
1297
+ height: '{{targetHeight}}',
1298
+ transition: 'height {{animationTime}}ms ease-in-out',
1299
+ }), {
1300
+ params: {
1301
+ targetHeight: '300px',
1302
+ animationTime: 3000,
1303
+ },
1304
+ }),
1305
+ state('false', style({
1306
+ height: 0,
1307
+ transition: 'height {{animationTime}}ms ease-in-out',
1308
+ }), {
1309
+ params: {
1310
+ targetHeight: '300px',
1311
+ opacity: 0,
1312
+ animationTime: 3000,
1313
+ },
1314
+ }),
1315
+ ]),
1316
+ ], template: "<div class=\"flyout\"\n [ngClass]=\"{'is-active': isDropdownOpened}\"\n>\n <div class=\"flyout-header\" (click)=\"toggleDropdownHeader()\" [ngClass]=\"headerCssClass\">\n <span [innerHtml]=\"headerTitle | kmsSafeHtml\"></span>\n <span [innerHtml]=\"headerText | kmsSafeHtml\"></span>\n\n <ng-content select=\"[header]\"></ng-content>\n\n <div *ngIf=\"hasButtonForMore\" (click)=\"toggleDropdown()\" class=\"flyout-header-more\">\n <span *ngIf=\"!isDropdownOpened\">\n {{ moreText }}\n </span>\n <span *ngIf=\"isDropdownOpened\">\n {{ lessText }}\n </span>\n <kms-icon [icon]=\"'chevron-down'\"\n [iconClass]=\"{'size-16': true, 'is-rotating180': isDropdownOpened}\" >\n </kms-icon>\n </div>\n </div>\n <div \n class=\"flyout-body\"\n [ngClass]=\"bodyCssClass\"\n tabindex=\"0\"\n [@dropdownAnimation]=\"{value: isDropdownOpened, params: {targetHeight: targetHeight, animationTime: '500'}}\"\n getMaxHeight=\"inner\"\n (sumOfHeight)=\"setDropdownListHeight($event)\"\n #flyoutHeader>\n <div class=\"inner\" #content>\n <ng-content ></ng-content>\n </div>\n </div>\n\n</div>\n" }]
1317
+ }], propDecorators: { icon: [{
1318
+ type: Input
1319
+ }], headerCssClass: [{
1320
+ type: Input
1321
+ }], bodyCssClass: [{
1322
+ type: Input
1323
+ }], headerTitle: [{
1324
+ type: Input
1325
+ }], headerText: [{
1326
+ type: Input
1327
+ }], hasButtonForMore: [{
1328
+ type: Input
1329
+ }], moreText: [{
1330
+ type: Input
1331
+ }], lessText: [{
1332
+ type: Input
1333
+ }], content: [{
1334
+ type: ViewChild,
1335
+ args: ['content']
1336
+ }], flyoutHeader: [{
1337
+ type: ViewChild,
1338
+ args: ['flyoutHeader']
1339
+ }] } });
1340
+
1341
+ class IntegerCurrency {
1342
+ constructor(cp) {
1343
+ this.cp = cp;
1344
+ }
1345
+ transform(value, currencyCode, display, digitsInfo) {
1346
+ const currencyPipeValue = this.cp.transform(value, currencyCode, display, digitsInfo);
1347
+ if (currencyPipeValue) {
1348
+ const convertedValue = currencyPipeValue.split(',')[0] + ' ' + currencyPipeValue.slice(-1);
1349
+ return convertedValue;
1350
+ }
1351
+ else {
1352
+ throw new Error("No value provided");
1353
+ }
1354
+ }
1355
+ }
1356
+ IntegerCurrency.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IntegerCurrency, deps: [{ token: i2.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Pipe });
1357
+ IntegerCurrency.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: IntegerCurrency, name: "kmsIntegerCurrency" });
1358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IntegerCurrency, decorators: [{
1359
+ type: Pipe,
1360
+ args: [{
1361
+ name: 'kmsIntegerCurrency',
1362
+ }]
1363
+ }], ctorParameters: function () { return [{ type: i2.CurrencyPipe }]; } });
1364
+
1365
+ /*!
1366
+ * @copyright FLYACTS GmbH 2019
1367
+ */
1368
+ class DecodeUriPipe {
1369
+ transform(value, _args) {
1370
+ return decodeURI(value);
1371
+ }
1372
+ }
1373
+ DecodeUriPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DecodeUriPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1374
+ DecodeUriPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DecodeUriPipe, name: "kmsDecodeUri" });
1375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DecodeUriPipe, decorators: [{
1376
+ type: Pipe,
1377
+ args: [{
1378
+ name: 'kmsDecodeUri',
1379
+ }]
1380
+ }] });
1381
+
1382
+ /*!
1383
+ * @copyright FLYACTS GmbH 2019
1384
+ */
1385
+ class EncodeUriPipe {
1386
+ transform(value, _args) {
1387
+ return encodeURI(value);
1388
+ }
1389
+ }
1390
+ EncodeUriPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncodeUriPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1391
+ EncodeUriPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EncodeUriPipe, name: "kmsEncodeUri" });
1392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EncodeUriPipe, decorators: [{
1393
+ type: Pipe,
1394
+ args: [{
1395
+ name: 'kmsEncodeUri',
1396
+ }]
1397
+ }] });
1398
+
1399
+ /**
1400
+ * @copyright KMS GmbH
1401
+ */
1402
+ class SafeStylePipe {
1403
+ constructor(sanitizer) {
1404
+ this.sanitizer = sanitizer;
1405
+ }
1406
+ transform(style) {
1407
+ return this.sanitizer.bypassSecurityTrustStyle(style);
1408
+ }
1409
+ }
1410
+ SafeStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeStylePipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1411
+ SafeStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SafeStylePipe, name: "kmsSafeStyle" });
1412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeStylePipe, decorators: [{
1413
+ type: Pipe,
1414
+ args: [{
1415
+ name: 'kmsSafeStyle',
1416
+ }]
1417
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
1418
+
1419
+ /**
1420
+ * @copyright KMS GmbH
1421
+ */
1422
+ class SafeUrlPipe {
1423
+ constructor(sanitizer) {
1424
+ this.sanitizer = sanitizer;
1425
+ }
1426
+ transform(url) {
1427
+ return this.sanitizer.bypassSecurityTrustUrl(url);
1428
+ }
1429
+ }
1430
+ SafeUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1431
+ SafeUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SafeUrlPipe, name: "kmsSafeSUrl" });
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeUrlPipe, decorators: [{
1433
+ type: Pipe,
1434
+ args: [{
1435
+ name: 'kmsSafeSUrl',
1436
+ }]
1437
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
1438
+
1439
+ /**
1440
+ * @copyright KMS GmbH
1441
+ */
1442
+ class SafeResourceUrlPipe {
1443
+ constructor(sanitizer) {
1444
+ this.sanitizer = sanitizer;
1445
+ }
1446
+ transform(url) {
1447
+ return this.sanitizer.bypassSecurityTrustResourceUrl(url);
1448
+ }
1449
+ }
1450
+ SafeResourceUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeResourceUrlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1451
+ SafeResourceUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SafeResourceUrlPipe, name: "kmsSafeResourceSUrl" });
1452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SafeResourceUrlPipe, decorators: [{
1453
+ type: Pipe,
1454
+ args: [{
1455
+ name: 'kmsSafeResourceSUrl',
1456
+ }]
1457
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
1458
+
1459
+ class TypeofPipe {
1460
+ transform(value) {
1461
+ return typeof value;
1462
+ }
1463
+ }
1464
+ TypeofPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TypeofPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1465
+ TypeofPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TypeofPipe, name: "kmsTypeOf" });
1466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TypeofPipe, decorators: [{
1467
+ type: Pipe,
1468
+ args: [{
1469
+ name: 'kmsTypeOf',
1470
+ }]
1471
+ }] });
1472
+
1473
+ /**
1474
+ * @copyright KMS GmbH
1475
+ */
1476
+ class TrimPipe {
1477
+ transform(value) {
1478
+ if (!value) {
1479
+ return '';
1480
+ }
1481
+ return value.trim();
1482
+ }
1483
+ }
1484
+ TrimPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TrimPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1485
+ TrimPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TrimPipe, name: "kmsTrim" });
1486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TrimPipe, decorators: [{
1487
+ type: Pipe,
1488
+ args: [{ name: 'kmsTrim' }]
1489
+ }] });
1490
+
1491
+ /**
1492
+ * @copyright KMS GmbH
1493
+ */
1494
+ class ToNumberPipe {
1495
+ transform(items) {
1496
+ if (!items) {
1497
+ return 0;
1498
+ }
1499
+ return parseInt(items, 10);
1500
+ }
1501
+ }
1502
+ ToNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1503
+ ToNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ToNumberPipe, name: "kmsToNumber", pure: false });
1504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToNumberPipe, decorators: [{
1505
+ type: Pipe,
1506
+ args: [{
1507
+ name: 'kmsToNumber',
1508
+ pure: false
1509
+ }]
1510
+ }] });
1511
+
1512
+ /**
1513
+ * @copyright KMS GmbH
1514
+ */
1515
+ class CustomPipesModule {
1516
+ }
1517
+ CustomPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1518
+ CustomPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CustomPipesModule, declarations: [IntegerCurrency,
1519
+ SafeHtmlPipe,
1520
+ SafeStylePipe,
1521
+ SafeResourceUrlPipe,
1522
+ SafeUrlPipe,
1523
+ EncodeUriPipe,
1524
+ DecodeUriPipe,
1525
+ TypeofPipe,
1526
+ TrimPipe,
1527
+ ToNumberPipe], imports: [CommonModule], exports: [IntegerCurrency,
1528
+ SafeHtmlPipe,
1529
+ SafeStylePipe,
1530
+ SafeResourceUrlPipe,
1531
+ SafeUrlPipe,
1532
+ EncodeUriPipe,
1533
+ DecodeUriPipe,
1534
+ TypeofPipe,
1535
+ TrimPipe,
1536
+ ToNumberPipe] });
1537
+ CustomPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomPipesModule, providers: [CurrencyPipe], imports: [CommonModule] });
1538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomPipesModule, decorators: [{
1539
+ type: NgModule,
1540
+ args: [{
1541
+ declarations: [
1542
+ IntegerCurrency,
1543
+ SafeHtmlPipe,
1544
+ SafeStylePipe,
1545
+ SafeResourceUrlPipe,
1546
+ SafeUrlPipe,
1547
+ EncodeUriPipe,
1548
+ DecodeUriPipe,
1549
+ TypeofPipe,
1550
+ TrimPipe,
1551
+ ToNumberPipe,
1552
+ ],
1553
+ imports: [CommonModule],
1554
+ exports: [
1555
+ IntegerCurrency,
1556
+ SafeHtmlPipe,
1557
+ SafeStylePipe,
1558
+ SafeResourceUrlPipe,
1559
+ SafeUrlPipe,
1560
+ EncodeUriPipe,
1561
+ DecodeUriPipe,
1562
+ TypeofPipe,
1563
+ TrimPipe,
1564
+ ToNumberPipe,
1565
+ ],
1566
+ providers: [CurrencyPipe],
1567
+ }]
1568
+ }] });
1569
+
1570
+ class EnumRadiogroupComponent extends FormControlParentComponent {
1571
+ constructor(formBuilder, renderer) {
1572
+ super(formBuilder, renderer);
1573
+ this.formBuilder = formBuilder;
1574
+ this.renderer = renderer;
1575
+ this.translationPrefix = '';
1576
+ }
1577
+ ngOnInit() {
1578
+ this.optionValues = Object.keys(this.optionsEnum).filter(x => !(parseInt(x) >= 0));
1579
+ this.form = this.formBuilder.group({
1580
+ enumData: [],
1581
+ });
1582
+ this.formInitialized = true;
1583
+ this.form.valueChanges.subscribe((value) => {
1584
+ this.internalValue = value.enumData;
1585
+ this.onChange(value.enumData);
1586
+ });
1587
+ super.ngOnInit();
1588
+ }
1589
+ }
1590
+ EnumRadiogroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EnumRadiogroupComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1591
+ EnumRadiogroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EnumRadiogroupComponent, selector: "kms-enum-radiogroup", inputs: { header: "header", optionsEnum: "optionsEnum", translationPrefix: "translationPrefix" }, providers: [
1592
+ {
1593
+ provide: NG_VALUE_ACCESSOR,
1594
+ useExisting: forwardRef(() => EnumRadiogroupComponent),
1595
+ multi: true,
1596
+ },
1597
+ ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <div>{{ header }}</div>\n <mat-radio-group [formControl]=\"form.controls['enumData']\" [disabled]=\"disabled\" #child>\n <mat-radio-button [value]=\"choice\" [checked]=\"value === choice\" *ngFor=\"let choice of optionValues\">{{ translationPrefix + '.' + choice | translate }}</mat-radio-button>\n </mat-radio-group>\n</form>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
1598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EnumRadiogroupComponent, decorators: [{
1599
+ type: Component,
1600
+ args: [{ selector: 'kms-enum-radiogroup', providers: [
1601
+ {
1602
+ provide: NG_VALUE_ACCESSOR,
1603
+ useExisting: forwardRef(() => EnumRadiogroupComponent),
1604
+ multi: true,
1605
+ },
1606
+ ], template: "<form [formGroup]=\"form\">\n <div>{{ header }}</div>\n <mat-radio-group [formControl]=\"form.controls['enumData']\" [disabled]=\"disabled\" #child>\n <mat-radio-button [value]=\"choice\" [checked]=\"value === choice\" *ngFor=\"let choice of optionValues\">{{ translationPrefix + '.' + choice | translate }}</mat-radio-button>\n </mat-radio-group>\n</form>" }]
1607
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; }, propDecorators: { header: [{
1608
+ type: Input
1609
+ }], optionsEnum: [{
1610
+ type: Input
1611
+ }], translationPrefix: [{
1612
+ type: Input
1613
+ }] } });
1614
+
1615
+ /*!
1616
+ * @copyright FLYACTS GmbH 2019
1617
+ */
1618
+ /**
1619
+ * A generic dialog component
1620
+ */
1621
+ class KMSAccordionItemComponent {
1622
+ constructor(sanitizer) {
1623
+ this.sanitizer = sanitizer;
1624
+ this.itemTitle = '';
1625
+ this.showAsCard = false;
1626
+ this.isSmall = false;
1627
+ this.expanded = false;
1628
+ this.panelOpenState = false;
1629
+ }
1630
+ ngOnInit() {
1631
+ this.itemTitleTrustHtml = this.sanitizer.bypassSecurityTrustHtml(this.itemTitle);
1632
+ }
1633
+ }
1634
+ KMSAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KMSAccordionItemComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
1635
+ KMSAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KMSAccordionItemComponent, selector: "kms-accordion-item", inputs: { itemTitle: "itemTitle", showAsCard: "showAsCard", isSmall: "isSmall", expanded: "expanded" }, ngImport: i0, template: "<mat-expansion-panel\n class=\"accordion-item\"\n [ngClass]=\"{showAsCard: showAsCard, showFlat: !showAsCard, isSmall: isSmall}\"\n (opened)=\"panelOpenState = true\"\n (closed)=\"panelOpenState = false\"\n [expanded] = \"expanded\"\n hideToggle=\"true\">\n <mat-expansion-panel-header class=\"accordion-item-header\">\n <mat-panel-title class=\"mat-subheading-2 accordion-item-title\">\n <div [innerHtml]=\"itemTitleTrustHtml\"></div>\n <ng-content select=\"[itemTitleElement]\"></ng-content>\n </mat-panel-title>\n <div class=\"accordion-item-header-icon-wrapper\">\n <kms-icon *ngIf=\"!panelOpenState\" icon=\"ic_plus\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-desktop\"></kms-icon>\n <kms-icon *ngIf=\"panelOpenState\" icon=\"ic_minus\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-desktop\"></kms-icon>\n\n <kms-icon *ngIf=\"!panelOpenState\" icon=\"chevron-down\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-mobile\"></kms-icon>\n <kms-icon *ngIf=\"panelOpenState\" icon=\"chevron-top\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-mobile\"></kms-icon>\n </div>\n </mat-expansion-panel-header>\n <ng-content></ng-content>\n</mat-expansion-panel>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i3$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i3$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }] });
1636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KMSAccordionItemComponent, decorators: [{
1637
+ type: Component,
1638
+ args: [{ selector: 'kms-accordion-item', template: "<mat-expansion-panel\n class=\"accordion-item\"\n [ngClass]=\"{showAsCard: showAsCard, showFlat: !showAsCard, isSmall: isSmall}\"\n (opened)=\"panelOpenState = true\"\n (closed)=\"panelOpenState = false\"\n [expanded] = \"expanded\"\n hideToggle=\"true\">\n <mat-expansion-panel-header class=\"accordion-item-header\">\n <mat-panel-title class=\"mat-subheading-2 accordion-item-title\">\n <div [innerHtml]=\"itemTitleTrustHtml\"></div>\n <ng-content select=\"[itemTitleElement]\"></ng-content>\n </mat-panel-title>\n <div class=\"accordion-item-header-icon-wrapper\">\n <kms-icon *ngIf=\"!panelOpenState\" icon=\"ic_plus\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-desktop\"></kms-icon>\n <kms-icon *ngIf=\"panelOpenState\" icon=\"ic_minus\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-desktop\"></kms-icon>\n\n <kms-icon *ngIf=\"!panelOpenState\" icon=\"chevron-down\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-mobile\"></kms-icon>\n <kms-icon *ngIf=\"panelOpenState\" icon=\"chevron-top\" iconClass=\"color-red\" class=\"accordion-item-header-icon-wrapper-mobile\"></kms-icon>\n </div>\n </mat-expansion-panel-header>\n <ng-content></ng-content>\n</mat-expansion-panel>\n" }]
1639
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; }, propDecorators: { itemTitle: [{
1640
+ type: Input
1641
+ }], showAsCard: [{
1642
+ type: Input
1643
+ }], isSmall: [{
1644
+ type: Input
1645
+ }], expanded: [{
1646
+ type: Input
1647
+ }] } });
1648
+
1649
+ /**
1650
+ * @copyright KMS GmbH
1651
+ */
1652
+ /**
1653
+ * Service to get viewport
1654
+ */
1655
+ class ViewportService {
1656
+ constructor(platformId) {
1657
+ this.platformId = platformId;
1658
+ this.viewports = [
1659
+ {
1660
+ name: 'xs',
1661
+ low: 420,
1662
+ high: 990,
1663
+ },
1664
+ {
1665
+ name: 's',
1666
+ low: 991,
1667
+ high: 1024,
1668
+ },
1669
+ {
1670
+ name: 'm',
1671
+ low: 1025,
1672
+ high: 1200,
1673
+ },
1674
+ {
1675
+ name: 'l',
1676
+ low: 12001,
1677
+ high: 1400,
1678
+ },
1679
+ {
1680
+ name: 'xl',
1681
+ low: 1401,
1682
+ high: 1600,
1683
+ },
1684
+ {
1685
+ name: 'xxl',
1686
+ low: 1601,
1687
+ high: 1920,
1688
+ },
1689
+ {
1690
+ name: 'xxxl',
1691
+ low: 1921,
1692
+ high: 99999,
1693
+ },
1694
+ ];
1695
+ this.viewportChangedSubscriber = new Subject();
1696
+ this.viewportResizedSubscriber = new Subject();
1697
+ if (isPlatformBrowser(this.platformId)) {
1698
+ window.addEventListener('resize', this.documentSizeChanged.bind(this), { passive: true });
1699
+ }
1700
+ }
1701
+ /**
1702
+ * Get window height
1703
+ */
1704
+ getDocumentHeight() {
1705
+ return isPlatformBrowser(this.platformId) ? document.body.clientHeight : 1200;
1706
+ }
1707
+ /**
1708
+ * Get window width
1709
+ */
1710
+ getDocumentWidth() {
1711
+ return isPlatformBrowser(this.platformId) ? document.body.clientWidth : 1200;
1712
+ }
1713
+ /**
1714
+ * Get window height
1715
+ */
1716
+ getWindowHeight() {
1717
+ return isPlatformBrowser(this.platformId) ? window.innerHeight : 1200;
1718
+ }
1719
+ /**
1720
+ * Get window width
1721
+ */
1722
+ getWindowWidth() {
1723
+ return isPlatformBrowser(this.platformId) ? window.innerWidth : 1200;
1724
+ }
1725
+ /**
1726
+ * Returns the current viewport MQ as string
1727
+ * @returns string
1728
+ */
1729
+ getCurrentViewPort() {
1730
+ if (!this.currentViewport) {
1731
+ const currentWidth = isPlatformBrowser(this.platformId) ? document.body.clientWidth : 1200;
1732
+ this.currentViewport = this.convertWidthToMediaQuery(currentWidth);
1733
+ }
1734
+ return this.currentViewport;
1735
+ }
1736
+ /**
1737
+ * Provides mq´s as string
1738
+ */
1739
+ getViewportChangedObserver() {
1740
+ return this.viewportChangedSubscriber.asObservable();
1741
+ }
1742
+ /**
1743
+ * Provides the current window width as number
1744
+ */
1745
+ getViewportResizedObserver() {
1746
+ return this.viewportResizedSubscriber.asObservable();
1747
+ }
1748
+ scrollToElementId(el, alignCenter = false) {
1749
+ if (isPlatformBrowser(this.platformId)) {
1750
+ this.scrollToElement(document.querySelector('#' + el), alignCenter);
1751
+ }
1752
+ }
1753
+ /**
1754
+ * Helper function that scrolls to the given markup element.
1755
+ * @param el - nativeElement from markup
1756
+ * @param alignCenter - defines if the element needs to be centered on window
1757
+ */
1758
+ scrollToElement(el, alignCenter = false) {
1759
+ if (isPlatformBrowser(this.platformId)) {
1760
+ let extraScrollTop = 0;
1761
+ if (alignCenter) {
1762
+ extraScrollTop = (window.innerHeight - el.clientHeight) / 2;
1763
+ }
1764
+ /*
1765
+ const elementPos: DOMRect = el.getBoundingClientRect();
1766
+ const scrollTopPosition = elementPos.x - extraScrollTop;
1767
+ */
1768
+ //let offsetLeft = 0;
1769
+ let offsetTop = 0;
1770
+ let elTemp = el;
1771
+ while (elTemp) {
1772
+ //offsetLeft += elTemp.offsetLeft;
1773
+ offsetTop += elTemp.offsetTop;
1774
+ elTemp = elTemp.parentElement ? elTemp.parentElement : null;
1775
+ }
1776
+ window.scrollTo({ left: 0, top: offsetTop - extraScrollTop, behavior: 'smooth' });
1777
+ }
1778
+ }
1779
+ /**
1780
+ * Scroll to the top position
1781
+ * @param top - top position value
1782
+ */
1783
+ scrollTop(top) {
1784
+ if (isPlatformBrowser(this.platformId)) {
1785
+ window.scrollTo({ left: 0, top: top, behavior: 'smooth' });
1786
+ }
1787
+ }
1788
+ ngOnDestroy() {
1789
+ if (isPlatformBrowser(this.platformId)) {
1790
+ window.removeEventListener('resize', this.documentSizeChanged);
1791
+ }
1792
+ }
1793
+ /**
1794
+ * If viewport changed
1795
+ * @event
1796
+ */
1797
+ documentSizeChanged(event) {
1798
+ const currentWindowWidth = event.target.innerWidth;
1799
+ // inform who´s interested
1800
+ this.viewportResizedSubscriber.next(currentWindowWidth);
1801
+ if (currentWindowWidth > 0) {
1802
+ for (const mqs of this.viewports) {
1803
+ if (currentWindowWidth > mqs.high) {
1804
+ continue;
1805
+ }
1806
+ else if ((currentWindowWidth >= mqs.low || currentWindowWidth <= mqs.high) &&
1807
+ this.currentViewport !== mqs.name) {
1808
+ this.currentViewport = mqs.name;
1809
+ // inform who´s interested
1810
+ this.viewportChangedSubscriber.next(mqs.name);
1811
+ break;
1812
+ }
1813
+ else if (this.currentViewport === mqs.name) {
1814
+ break;
1815
+ }
1816
+ else {
1817
+ console.error('ERROR');
1818
+ }
1819
+ }
1820
+ }
1821
+ }
1822
+ /**
1823
+ * Get the Media Query for the given width
1824
+ * @param width Width to get the according MQ for
1825
+ */
1826
+ convertWidthToMediaQuery(width) {
1827
+ let currentViewport = '';
1828
+ for (const mqs of this.viewports) {
1829
+ if (width <= mqs.high && width >= mqs.low) {
1830
+ currentViewport = mqs.name;
1831
+ break;
1832
+ }
1833
+ }
1834
+ return currentViewport;
1835
+ }
1836
+ isPortrait() {
1837
+ if (isPlatformBrowser(this.platformId))
1838
+ return window.innerHeight > window.innerWidth;
1839
+ else
1840
+ return;
1841
+ }
1842
+ isLandscape() {
1843
+ if (isPlatformBrowser(this.platformId)) {
1844
+ const isLandscape = window.orientation === 90 || window.orientation === -90;
1845
+ return isLandscape;
1846
+ }
1847
+ else {
1848
+ return;
1849
+ }
1850
+ }
1851
+ }
1852
+ ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewportService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
1853
+ ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewportService });
1854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewportService, decorators: [{
1855
+ type: Injectable
1856
+ }], ctorParameters: function () {
1857
+ return [{ type: Object, decorators: [{
1858
+ type: Inject,
1859
+ args: [PLATFORM_ID]
1860
+ }] }];
1861
+ } });
1862
+
1863
+ /*!
1864
+ * @copyright FLYACTS GmbH 2019
1865
+ */
1866
+ /**
1867
+ * MarkerOptions class for Marker
1868
+ */
1869
+ class MarkerOptions {
1870
+ }
1871
+ /**
1872
+ * MarkerLabel class for Marker
1873
+ */
1874
+ class MarkerLabel {
1875
+ }
1876
+ /**
1877
+ * Marker class
1878
+ */
1879
+ class Marker {
1880
+ }
1881
+ /**
1882
+ * Component to show marker on google map for specific address
1883
+ */
1884
+ class MapComponent {
1885
+ //
1886
+ constructor(viewPortService) {
1887
+ this.viewPortService = viewPortService;
1888
+ this.markers = [];
1889
+ this.geoDataFoundForAddress = false;
1890
+ this.widthSet = false;
1891
+ this.width = '100%';
1892
+ this.zoom = 15;
1893
+ this.center = {
1894
+ lat: 52.097449,
1895
+ lng: 12.7436911,
1896
+ };
1897
+ this.options = {
1898
+ mapTypeId: 'roadmap',
1899
+ zoomControl: false,
1900
+ scrollwheel: false,
1901
+ disableDoubleClickZoom: true,
1902
+ maxZoom: 15,
1903
+ minZoom: 8,
1904
+ };
1905
+ }
1906
+ ngOnInit() {
1907
+ this.findLocation(this.data.Street + ' ' + this.data.Zip + ' ' + this.data.City);
1908
+ }
1909
+ /**
1910
+ * Asks google for geocoordinates of a given address string
1911
+ * @input address as string
1912
+ */
1913
+ findLocation(address) {
1914
+ if (!this.geocoder) {
1915
+ this.geocoder = new google.maps.Geocoder();
1916
+ }
1917
+ this.geocoder.geocode({
1918
+ 'address': address,
1919
+ }, (results, status) => {
1920
+ if (status === google.maps.GeocoderStatus.OK) {
1921
+ this.center.lat = results[0].geometry.location.lat();
1922
+ this.center.lng = results[0].geometry.location.lng();
1923
+ this.addMarker();
1924
+ this.geoDataFoundForAddress = true;
1925
+ }
1926
+ else {
1927
+ console.error('Sorry, this search of map address produced no results.');
1928
+ }
1929
+ });
1930
+ }
1931
+ /**
1932
+ * Adds a marker to the map
1933
+ */
1934
+ addMarker() {
1935
+ this.markers.push({
1936
+ position: {
1937
+ lat: this.center.lat,
1938
+ lng: this.center.lng,
1939
+ },
1940
+ label: {
1941
+ color: 'blue',
1942
+ text: this.data.Name1 || '',
1943
+ },
1944
+ title: this.data.Name1 + ' ' + this.data.Street + ' ' + this.data.Zip,
1945
+ options: { animation: google.maps.Animation.DROP },
1946
+ });
1947
+ }
1948
+ /**
1949
+ * Zooms in into map
1950
+ */
1951
+ zoomIn() {
1952
+ if (this.options.maxZoom && this.zoom < this.options.maxZoom) {
1953
+ this.zoom++;
1954
+ }
1955
+ }
1956
+ /**
1957
+ * Zooms out from map
1958
+ */
1959
+ zoomOut() {
1960
+ if (this.options.minZoom && this.zoom > this.options.minZoom) {
1961
+ this.zoom--;
1962
+ }
1963
+ }
1964
+ }
1965
+ MapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MapComponent, deps: [{ token: ViewportService }], target: i0.ɵɵFactoryTarget.Component });
1966
+ MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MapComponent, selector: "kms-map", inputs: { data: "data" }, ngImport: i0, template: "<div *ngIf=\"geoDataFoundForAddress && widthSet\">\n <google-map\n height=\"415px\"\n [width]=\"width\"\n [zoom]=\"zoom\"\n [center]=\"center\"\n [options]=\"options\"\n >\n <map-marker\n *ngFor=\"let marker of markers\"\n [position]=\"marker.position\"\n [label]=\"marker.label\"\n [title]=\"marker.title\"\n [options]=\"marker.options\"\n >\n </map-marker>\n </google-map>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.GoogleMap, selector: "google-map", inputs: ["height", "width", "mapTypeId", "center", "zoom", "options"], outputs: ["mapInitialized", "authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { kind: "directive", type: i3$2.MapMarker, selector: "map-marker", inputs: ["title", "position", "label", "clickable", "options", "icon", "visible"], outputs: ["animationChanged", "mapClick", "clickableChanged", "cursorChanged", "mapDblclick", "mapDrag", "mapDragend", "draggableChanged", "mapDragstart", "flatChanged", "iconChanged", "mapMousedown", "mapMouseout", "mapMouseover", "mapMouseup", "positionChanged", "mapRightclick", "shapeChanged", "titleChanged", "visibleChanged", "zindexChanged"], exportAs: ["mapMarker"] }] });
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MapComponent, decorators: [{
1968
+ type: Component,
1969
+ args: [{ selector: 'kms-map', template: "<div *ngIf=\"geoDataFoundForAddress && widthSet\">\n <google-map\n height=\"415px\"\n [width]=\"width\"\n [zoom]=\"zoom\"\n [center]=\"center\"\n [options]=\"options\"\n >\n <map-marker\n *ngFor=\"let marker of markers\"\n [position]=\"marker.position\"\n [label]=\"marker.label\"\n [title]=\"marker.title\"\n [options]=\"marker.options\"\n >\n </map-marker>\n </google-map>\n</div>" }]
1970
+ }], ctorParameters: function () { return [{ type: ViewportService }]; }, propDecorators: { data: [{
1971
+ type: Input
1972
+ }] } });
1973
+
1974
+ // TODO change values after cleaned up database
1975
+ var SalutationEnum;
1976
+ (function (SalutationEnum) {
1977
+ SalutationEnum["NOT_SPECIFIED"] = "Keine Anrede";
1978
+ SalutationEnum["MALE"] = "Herr";
1979
+ SalutationEnum["FEMALE"] = "Frau";
1980
+ })(SalutationEnum || (SalutationEnum = {}));
1981
+
1982
+ class SalutationDropdownComponent extends FormControlParentComponent {
1983
+ constructor(formBuilder, renderer) {
1984
+ super(formBuilder, renderer);
1985
+ this.formBuilder = formBuilder;
1986
+ this.renderer = renderer;
1987
+ //For view
1988
+ this.SalutationEnum = SalutationEnum;
1989
+ this.Object = Object;
1990
+ }
1991
+ ngOnInit() {
1992
+ this.form = this.formBuilder.group({
1993
+ salut: [],
1994
+ });
1995
+ this.formInitialized = true;
1996
+ //somehow for dropowns we have to set value manually with timeout for default value
1997
+ setTimeout(() => {
1998
+ this.form.controls['salut'].setValue(this.value ? this.value : '');
1999
+ }, 1000);
2000
+ this.form.valueChanges.subscribe((value) => {
2001
+ this.onChange(value.salut);
2002
+ });
2003
+ super.ngOnInit();
2004
+ }
2005
+ }
2006
+ SalutationDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SalutationDropdownComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2007
+ SalutationDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SalutationDropdownComponent, selector: "kms-salutation-dropdown", inputs: { placeholder: "placeholder" }, providers: [
2008
+ {
2009
+ provide: NG_VALUE_ACCESSOR,
2010
+ useExisting: forwardRef(() => SalutationDropdownComponent),
2011
+ multi: true,
2012
+ },
2013
+ ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" class=\"row\">\n <mat-form-field class=\"col\">\n <mat-select disableOptionCentering [formControl]=\"form.controls['salut']\" [placeholder]=\"placeholder\" [value]=\"value\" #child>\n <mat-option [value]=\"SalutationEnum.NOT_SPECIFIED\">{{ 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase() | translate }}</mat-option>\n <mat-option [value]=\"SalutationEnum.MALE\">{{ 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase() | translate }}</mat-option>\n <mat-option [value]=\"SalutationEnum.FEMALE\">{{ 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase() | translate }}</mat-option>\n </mat-select>\n </mat-form-field>\n</form>", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
2014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SalutationDropdownComponent, decorators: [{
2015
+ type: Component,
2016
+ args: [{ selector: 'kms-salutation-dropdown', providers: [
2017
+ {
2018
+ provide: NG_VALUE_ACCESSOR,
2019
+ useExisting: forwardRef(() => SalutationDropdownComponent),
2020
+ multi: true,
2021
+ },
2022
+ ], template: "<form [formGroup]=\"form\" class=\"row\">\n <mat-form-field class=\"col\">\n <mat-select disableOptionCentering [formControl]=\"form.controls['salut']\" [placeholder]=\"placeholder\" [value]=\"value\" #child>\n <mat-option [value]=\"SalutationEnum.NOT_SPECIFIED\">{{ 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase() | translate }}</mat-option>\n <mat-option [value]=\"SalutationEnum.MALE\">{{ 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase() | translate }}</mat-option>\n <mat-option [value]=\"SalutationEnum.FEMALE\">{{ 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase() | translate }}</mat-option>\n </mat-select>\n </mat-form-field>\n</form>" }]
2023
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; }, propDecorators: { placeholder: [{
2024
+ type: Input
2025
+ }] } });
2026
+
2027
+ class TooltipComponent {
2028
+ constructor() {
2029
+ this.tooltipTitle = "";
2030
+ }
2031
+ }
2032
+ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2033
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TooltipComponent, selector: "kms-tooltip-element", inputs: { tooltipTitle: "tooltipTitle" }, ngImport: i0, template: "<ng-content></ng-content>", styles: ["[kmsTooltip]{position:relative}\n"] });
2034
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipComponent, decorators: [{
2035
+ type: Component,
2036
+ args: [{ selector: 'kms-tooltip-element', template: "<ng-content></ng-content>", styles: ["[kmsTooltip]{position:relative}\n"] }]
2037
+ }], propDecorators: { tooltipTitle: [{
2038
+ type: Input
2039
+ }] } });
2040
+
2041
+ class SalutationRadiogroupComponent extends FormControlParentComponent {
2042
+ constructor(formBuilder, renderer) {
2043
+ super(formBuilder, renderer);
2044
+ this.formBuilder = formBuilder;
2045
+ this.renderer = renderer;
2046
+ //For view
2047
+ this.SalutationEnum = SalutationEnum;
2048
+ this.Object = Object;
2049
+ }
2050
+ ngOnInit() {
2051
+ this.form = this.formBuilder.group({
2052
+ salut: [isValue(this.value) ? this.value : '', null],
2053
+ });
2054
+ this.formInitialized = true;
2055
+ this.form.valueChanges.subscribe((value) => {
2056
+ this.internalValue = value.salut;
2057
+ this.onChange(value.salut);
2058
+ });
2059
+ super.ngOnInit();
2060
+ }
2061
+ }
2062
+ SalutationRadiogroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SalutationRadiogroupComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2063
+ SalutationRadiogroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SalutationRadiogroupComponent, selector: "kms-salutation-radiogroup", providers: [
2064
+ {
2065
+ provide: NG_VALUE_ACCESSOR,
2066
+ useExisting: forwardRef(() => SalutationRadiogroupComponent),
2067
+ multi: true,
2068
+ },
2069
+ ], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" >\n <mat-radio-group [formControl]=\"form.controls['salut']\" [disabled]=\"disabled\" #radioGroup>\n <mat-radio-button color=\"primary\" [value]=\"SalutationEnum.NOT_SPECIFIED\" [checked]=\"value === SalutationEnum.NOT_SPECIFIED\">\n {{ 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase() | translate }}\n </mat-radio-button>\n <mat-radio-button color=\"primary\" [value]=\"SalutationEnum.MALE\" [checked]=\"value === SalutationEnum.MALE\">\n {{ 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase() | translate }}\n </mat-radio-button>\n <mat-radio-button color=\"primary\" [value]=\"SalutationEnum.FEMALE\" [checked]=\"value === SalutationEnum.FEMALE\">\n {{ 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase() | translate }}\n </mat-radio-button>\n </mat-radio-group>\n</form>", dependencies: [{ kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
2070
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SalutationRadiogroupComponent, decorators: [{
2071
+ type: Component,
2072
+ args: [{ selector: 'kms-salutation-radiogroup', providers: [
2073
+ {
2074
+ provide: NG_VALUE_ACCESSOR,
2075
+ useExisting: forwardRef(() => SalutationRadiogroupComponent),
2076
+ multi: true,
2077
+ },
2078
+ ], template: "<form [formGroup]=\"form\" >\n <mat-radio-group [formControl]=\"form.controls['salut']\" [disabled]=\"disabled\" #radioGroup>\n <mat-radio-button color=\"primary\" [value]=\"SalutationEnum.NOT_SPECIFIED\" [checked]=\"value === SalutationEnum.NOT_SPECIFIED\">\n {{ 'general.salutation.' + Object.keys(SalutationEnum)[0]?.toLowerCase() | translate }}\n </mat-radio-button>\n <mat-radio-button color=\"primary\" [value]=\"SalutationEnum.MALE\" [checked]=\"value === SalutationEnum.MALE\">\n {{ 'general.salutation.' + Object.keys(SalutationEnum)[1]?.toLowerCase() | translate }}\n </mat-radio-button>\n <mat-radio-button color=\"primary\" [value]=\"SalutationEnum.FEMALE\" [checked]=\"value === SalutationEnum.FEMALE\">\n {{ 'general.salutation.' + Object.keys(SalutationEnum)[2]?.toLowerCase() | translate }}\n </mat-radio-button>\n </mat-radio-group>\n</form>" }]
2079
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; } });
2080
+
2081
+ /**
2082
+ * @copyright KMS GmbH
2083
+ */
2084
+ class BackToTopComponent {
2085
+ constructor(platformId) {
2086
+ this.platformId = platformId;
2087
+ }
2088
+ onWindowScroll() {
2089
+ if (isPlatformBrowser(this.platformId)) {
2090
+ if (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop > 100) {
2091
+ this.windowScrolled = true;
2092
+ }
2093
+ else if ((this.windowScrolled && window.pageYOffset) ||
2094
+ document.documentElement.scrollTop ||
2095
+ document.body.scrollTop < 10) {
2096
+ this.windowScrolled = false;
2097
+ }
2098
+ }
2099
+ }
2100
+ scrollToTop() {
2101
+ if (isPlatformBrowser(this.platformId)) {
2102
+ (function smoothscroll() {
2103
+ const currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
2104
+ if (currentScroll > 0) {
2105
+ window.requestAnimationFrame(smoothscroll);
2106
+ window.scrollTo(0, currentScroll - currentScroll / 8);
2107
+ }
2108
+ })();
2109
+ }
2110
+ }
2111
+ }
2112
+ BackToTopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BackToTopComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
2113
+ BackToTopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BackToTopComponent, selector: "kms-back-to-top", host: { listeners: { "window:scroll": "onWindowScroll()" } }, ngImport: i0, template: "<div class=\"scrollToTop\"\n [ngClass]=\"{'show': windowScrolled}\"\n (click)=\"scrollToTop()\">\n <div class=\"scrollToTop-inner\">\n <kms-icon icon=\"floating_button_clear\" iconClass=\"color-white\"></kms-icon>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }] });
2114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BackToTopComponent, decorators: [{
2115
+ type: Component,
2116
+ args: [{ selector: 'kms-back-to-top', template: "<div class=\"scrollToTop\"\n [ngClass]=\"{'show': windowScrolled}\"\n (click)=\"scrollToTop()\">\n <div class=\"scrollToTop-inner\">\n <kms-icon icon=\"floating_button_clear\" iconClass=\"color-white\"></kms-icon>\n </div>\n</div>" }]
2117
+ }], ctorParameters: function () {
2118
+ return [{ type: Object, decorators: [{
2119
+ type: Inject,
2120
+ args: [PLATFORM_ID]
2121
+ }] }];
2122
+ }, propDecorators: { onWindowScroll: [{
2123
+ type: HostListener,
2124
+ args: ['window:scroll', []]
2125
+ }] } });
2126
+
2127
+ var ButtonResponseType;
2128
+ (function (ButtonResponseType) {
2129
+ ButtonResponseType["primary"] = "primary";
2130
+ ButtonResponseType["secondary"] = "secondary";
2131
+ })(ButtonResponseType || (ButtonResponseType = {}));
2132
+
2133
+ /**
2134
+ * @copyright KMS GmbH
2135
+ */
2136
+ /**
2137
+ * A generic dialog component
2138
+ */
2139
+ class GenericDialogComponent {
2140
+ constructor(dialogRef, zone, data) {
2141
+ this.dialogRef = dialogRef;
2142
+ this.zone = zone;
2143
+ this.data = data;
2144
+ this.ButtonResponseType = ButtonResponseType;
2145
+ if (isValue(data.buttons)) {
2146
+ this.buttons = data.buttons;
2147
+ }
2148
+ else {
2149
+ this.buttons = { primary: 'Yes', secondary: 'No' };
2150
+ }
2151
+ }
2152
+ /**
2153
+ * Action called when clicked
2154
+ * @param clickedButton Whether the primary or secondary button was clicked
2155
+ */
2156
+ onClickAction(clickedButton) {
2157
+ this.zone.run(() => {
2158
+ this.dialogRef.close(clickedButton);
2159
+ this.dialogRef.afterClosed().subscribe(() => {
2160
+ const buttonList = document.querySelectorAll('.mat-flat-button, .mat-button');
2161
+ let i = 0;
2162
+ for (i; i < buttonList.length; i++) {
2163
+ buttonList[i].classList.remove('cdk-focused');
2164
+ buttonList[i].classList.remove('cdk-program-focused');
2165
+ }
2166
+ });
2167
+ });
2168
+ }
2169
+ }
2170
+ GenericDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GenericDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: i0.NgZone }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
2171
+ GenericDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GenericDialogComponent, selector: "kms-generic-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\n <h3>{{ data.title }}</h3>\n</div>\n<div mat-dialog-content class=\"mat-dialog-content\">\n {{ data.message }}\n</div>\n<div mat-dialog-actions class=\"custom-dialog-actions\">\n <button\n mat-flat-button\n class=\"test_secondary_button\"\n color=\"accent\"\n (click)=\"onClickAction(ButtonResponseType.secondary)\"\n >\n {{ buttons.secondary }}\n </button>\n <button\n mat-flat-button\n class=\"test_primary_button\"\n color=\"primary\"\n (click)=\"onClickAction(ButtonResponseType.primary)\"\n >\n {{ buttons.primary }}\n </button>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
2172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GenericDialogComponent, decorators: [{
2173
+ type: Component,
2174
+ args: [{ selector: 'kms-generic-dialog', template: "<div mat-dialog-title class=\"mat-dialog-title\">\n <h3>{{ data.title }}</h3>\n</div>\n<div mat-dialog-content class=\"mat-dialog-content\">\n {{ data.message }}\n</div>\n<div mat-dialog-actions class=\"custom-dialog-actions\">\n <button\n mat-flat-button\n class=\"test_secondary_button\"\n color=\"accent\"\n (click)=\"onClickAction(ButtonResponseType.secondary)\"\n >\n {{ buttons.secondary }}\n </button>\n <button\n mat-flat-button\n class=\"test_primary_button\"\n color=\"primary\"\n (click)=\"onClickAction(ButtonResponseType.primary)\"\n >\n {{ buttons.primary }}\n </button>\n</div>\n" }]
2175
+ }], ctorParameters: function () {
2176
+ return [{ type: i1$2.MatDialogRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
2177
+ type: Inject,
2178
+ args: [MAT_DIALOG_DATA]
2179
+ }] }];
2180
+ } });
2181
+
2182
+ class ButtonWithConfirmDialogComponent {
2183
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2184
+ constructor(dialog) {
2185
+ this.dialog = dialog;
2186
+ // Outputs when dialogue was closed. Returns true, if yes was clicked, false otherwise
2187
+ this.onConfirmClosed = new EventEmitter();
2188
+ this.subs = new SubSink();
2189
+ }
2190
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2191
+ ngOnInit() { }
2192
+ start() {
2193
+ const data = {
2194
+ title: this.confirmTitle,
2195
+ buttons: {
2196
+ primary: this.confirmTextYes,
2197
+ secondary: this.confirmTextNo,
2198
+ }
2199
+ };
2200
+ const dialogRef = this.dialog.open(GenericDialogComponent, {
2201
+ data: data,
2202
+ });
2203
+ this.subs.sink = dialogRef.afterClosed().subscribe(result => {
2204
+ if (result === ButtonResponseType.primary) {
2205
+ this.onConfirmClosed.emit(true);
2206
+ }
2207
+ else {
2208
+ this.onConfirmClosed.emit(false);
2209
+ }
2210
+ dialogRef.close();
2211
+ });
2212
+ }
2213
+ }
2214
+ ButtonWithConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonWithConfirmDialogComponent, deps: [{ token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2215
+ ButtonWithConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonWithConfirmDialogComponent, selector: "kms-button-with-confirm-dialog", inputs: { disabled: "disabled", buttonText: "buttonText", confirmTitle: "confirmTitle", confirmTextYes: "confirmTextYes", confirmTextNo: "confirmTextNo" }, outputs: { onConfirmClosed: "onConfirmClosed" }, ngImport: i0, template: "<button\n type=\"button\"\n (click)=\"start()\"\n mat-stroked-button\n [disabled]=\"disabled\"\n>\n {{ buttonText }}\n</button>\n", styles: [""], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
2216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonWithConfirmDialogComponent, decorators: [{
2217
+ type: Component,
2218
+ args: [{ selector: 'kms-button-with-confirm-dialog', template: "<button\n type=\"button\"\n (click)=\"start()\"\n mat-stroked-button\n [disabled]=\"disabled\"\n>\n {{ buttonText }}\n</button>\n" }]
2219
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialog }]; }, propDecorators: { disabled: [{
2220
+ type: Input
2221
+ }], buttonText: [{
2222
+ type: Input
2223
+ }], confirmTitle: [{
2224
+ type: Input
2225
+ }], confirmTextYes: [{
2226
+ type: Input
2227
+ }], confirmTextNo: [{
2228
+ type: Input
2229
+ }], onConfirmClosed: [{
2230
+ type: Output
2231
+ }] } });
2232
+
2233
+ /**
2234
+ * Dropdown from data component {@link https://leaseplan-dev.rentoffice.de/styleguide#ui-elements}
2235
+ */
2236
+ class DropdownFromDataComponent extends FormControlParentComponent {
2237
+ constructor(formBuilder, renderer) {
2238
+ super(formBuilder, renderer);
2239
+ this.formBuilder = formBuilder;
2240
+ this.renderer = renderer;
2241
+ // options for the dropdown have a null value at the beginning of the array
2242
+ this.hasNullOption = false;
2243
+ this.placeholder = '';
2244
+ this.label = '';
2245
+ this.required = false;
2246
+ this.useEnumIndexAsValue = false;
2247
+ // multiple selection
2248
+ this.multiple = false;
2249
+ this.keys = [];
2250
+ this.values = [];
2251
+ this.Object = Object;
2252
+ }
2253
+ /**
2254
+ * Hook used to sync changes on set Label and Type
2255
+ * @param changes
2256
+ */
2257
+ ngOnChanges(changes) {
2258
+ if (changes.optionsPlainArray) {
2259
+ this.keys = this.optionsPlainArray;
2260
+ this.values = this.optionsPlainArray;
2261
+ }
2262
+ this.setKeyValues();
2263
+ }
2264
+ ngOnInit() {
2265
+ this.form = this.formBuilder.group({
2266
+ dropdownData: [],
2267
+ });
2268
+ this.formInitialized = true;
2269
+ this.form.valueChanges.subscribe((value) => {
2270
+ this.internalValue = value.dropdownData;
2271
+ this.onChange(value.dropdownData);
2272
+ });
2273
+ super.ngOnInit();
2274
+ }
2275
+ /**
2276
+ * transofrms the data values to the correct format for be used by the template
2277
+ * @param value
2278
+ */
2279
+ setKeyValues() {
2280
+ if (this.optionsObjArray && this.mapKey && this.mapValue) {
2281
+ this.keys = this.optionsObjArray.map((obj) => obj[`${this.mapKey}`]);
2282
+ this.values = this.optionsObjArray.map((obj) => obj[`${this.mapValue}`]);
2283
+ }
2284
+ else if (this.optionsObjArray && this.mapKey) {
2285
+ this.keys = this.optionsObjArray.map((obj) => obj[`${this.mapKey}`]);
2286
+ this.values = this.optionsObjArray.map((obj) => obj[`${this.mapKey}`]);
2287
+ }
2288
+ if (this.optionsEnum) {
2289
+ this.keys = EnumValues.getNames(this.optionsEnum);
2290
+ if (this.optionsPlainArray) {
2291
+ this.values = this.optionsPlainArray;
2292
+ }
2293
+ else {
2294
+ const values = EnumValues.getValues(this.optionsEnum);
2295
+ // var who defines if enum is componed just with keys or keyValues. E.g enum KeyEnum { VALUE1, VALUE2 } or enum KeyValueEnum { VALUE4 = 'V4', VALUE5 = 'V5' }
2296
+ let keyValueEnum = false;
2297
+ for (let i = 0; i < this.keys.length; i++) {
2298
+ if (i !== values[i]) {
2299
+ keyValueEnum = true;
2300
+ }
2301
+ }
2302
+ if (keyValueEnum || this.useEnumIndexAsValue) {
2303
+ this.values = values;
2304
+ }
2305
+ else {
2306
+ this.values = EnumValues.getNames(this.optionsEnum);
2307
+ }
2308
+ }
2309
+ }
2310
+ if (this.hasNullOption === true)
2311
+ this.keys.unshift(null);
2312
+ if (this.hasNullOption === true)
2313
+ this.values.unshift(null);
2314
+ }
2315
+ /**
2316
+ * set the value of the dropdown based if translation is set
2317
+ * @param key
2318
+ */
2319
+ setDisplayKey(key) {
2320
+ /*
2321
+ if (this.translation && key !== null) {
2322
+ if (this.translation.isPrefix) {
2323
+ return this.translationService.instant(this.translation.path + '.' + key);
2324
+ } else if (this.translation.useKey) {
2325
+ return this.translationService.instant(this.translation.path, { key: key });
2326
+ } else if (!this.translation?.useKey && !this.translation?.isPrefix) {
2327
+ return this.translationService.instant(this.translation.path);
2328
+ }
2329
+ } else if (key == null) {
2330
+ return '';
2331
+ } else if (!this.translation) {
2332
+ return key;
2333
+ }
2334
+ */
2335
+ return key;
2336
+ }
2337
+ valueChanged(value) {
2338
+ this.form.patchValue({
2339
+ dropdownData: value,
2340
+ });
2341
+ this.onSelectItemEmitter.emit(value);
2342
+ }
2343
+ }
2344
+ DropdownFromDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DropdownFromDataComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2345
+ DropdownFromDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DropdownFromDataComponent, selector: "kms-dropdown-from-data", inputs: { optionsEnum: "optionsEnum", optionsPlainArray: "optionsPlainArray", optionsObjArray: "optionsObjArray", mapKey: "mapKey", mapValue: "mapValue", hasNullOption: "hasNullOption", translation: "translation", placeholder: "placeholder", label: "label", required: "required", useEnumIndexAsValue: "useEnumIndexAsValue", multiple: "multiple" }, providers: [
2346
+ {
2347
+ provide: NG_VALUE_ACCESSOR,
2348
+ useExisting: forwardRef(() => DropdownFromDataComponent),
2349
+ multi: true,
2350
+ },
2351
+ ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field [attr.required]=\"required\" [floatLabel]=\"placeholder ? 'always' : 'auto'\">\n <mat-label>{{ label }}</mat-label>\n <mat-select\n placeholder=\"{{ placeholder }}\"\n disableOptionCentering\n [(value)]=\"value\"\n (selectionChange)=\"valueChanged($event?.value)\"\n #child\n [disabled]=\"disabled\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngFor=\"let key of keys; let i = index\" [value]=\"values[i]\">\n <span>{{ setDisplayKey(key) }}</span>\n </mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
2352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DropdownFromDataComponent, decorators: [{
2353
+ type: Component,
2354
+ args: [{ selector: 'kms-dropdown-from-data', providers: [
2355
+ {
2356
+ provide: NG_VALUE_ACCESSOR,
2357
+ useExisting: forwardRef(() => DropdownFromDataComponent),
2358
+ multi: true,
2359
+ },
2360
+ ], template: "<form [formGroup]=\"form\">\n <mat-form-field [attr.required]=\"required\" [floatLabel]=\"placeholder ? 'always' : 'auto'\">\n <mat-label>{{ label }}</mat-label>\n <mat-select\n placeholder=\"{{ placeholder }}\"\n disableOptionCentering\n [(value)]=\"value\"\n (selectionChange)=\"valueChanged($event?.value)\"\n #child\n [disabled]=\"disabled\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngFor=\"let key of keys; let i = index\" [value]=\"values[i]\">\n <span>{{ setDisplayKey(key) }}</span>\n </mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n" }]
2361
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Renderer2 }]; }, propDecorators: { optionsEnum: [{
2362
+ type: Input
2363
+ }], optionsPlainArray: [{
2364
+ type: Input
2365
+ }], optionsObjArray: [{
2366
+ type: Input
2367
+ }], mapKey: [{
2368
+ type: Input
2369
+ }], mapValue: [{
2370
+ type: Input
2371
+ }], hasNullOption: [{
2372
+ type: Input
2373
+ }], translation: [{
2374
+ type: Input
2375
+ }], placeholder: [{
2376
+ type: Input
2377
+ }], label: [{
2378
+ type: Input
2379
+ }], required: [{
2380
+ type: Input
2381
+ }], useEnumIndexAsValue: [{
2382
+ type: Input
2383
+ }], multiple: [{
2384
+ type: Input
2385
+ }] } });
2386
+
2387
+ /*!
2388
+ * @copyright FLYACTS GmbH 2019
2389
+ */
2390
+ class SwipeDirective {
2391
+ constructor() {
2392
+ /**
2393
+ * Output Event that is emitted during swipe process (mouse move or touch move event).
2394
+ * Can be used for calculation purposes.
2395
+ */
2396
+ this.moveEvent = new EventEmitter();
2397
+ /**
2398
+ * Output Event that is emitted when swipe process end (mouse up or touch end event).
2399
+ * Can be used for calculation purposes.
2400
+ */
2401
+ this.releaseEvent = new EventEmitter();
2402
+ this._startPosition = -1;
2403
+ this._lastPosX = 0;
2404
+ this._thresholdWasReached = false;
2405
+ this._timeStart = 0;
2406
+ }
2407
+ /**
2408
+ * Needed config that defines swipe behaviour.
2409
+ * @param options SwipeOptions
2410
+ */
2411
+ set config(options) {
2412
+ if (options) {
2413
+ this._swipeOptions = options;
2414
+ }
2415
+ }
2416
+ onMouseDown(event) {
2417
+ this.calculateStartPosition(event);
2418
+ }
2419
+ onMove(event) {
2420
+ this.move(event);
2421
+ }
2422
+ onRelease(event) {
2423
+ this.release(event);
2424
+ this.reset();
2425
+ }
2426
+ // ** PRIVATE ** //
2427
+ /**
2428
+ * Function checks if the current moving delta is inside the defined threshold.
2429
+ * Sets the flag to true if the threshold was reached once.
2430
+ */
2431
+ checkThreshold(moveEvent) {
2432
+ const percentage = this._swipeOptions && this._swipeOptions.swipeThresholdType === '%';
2433
+ if (!percentage && this._swipeOptions && moveEvent.swipeDistanceTotal < this._swipeOptions.swipeThreshold) {
2434
+ return;
2435
+ }
2436
+ else if (percentage &&
2437
+ this._swipeOptions &&
2438
+ moveEvent.swipeDistancePercentage < this._swipeOptions.swipeThreshold / 100) {
2439
+ return;
2440
+ }
2441
+ else {
2442
+ this._thresholdWasReached = true;
2443
+ }
2444
+ }
2445
+ calculateStartPosition(event) {
2446
+ // detect if touch or click
2447
+ this._isMobile = event.type === 'touchstart';
2448
+ // save start position
2449
+ if (this._swipeOptions && this._swipeOptions.swipeLocalPosition) {
2450
+ if (this._isMobile) {
2451
+ const touch = event.touches[0];
2452
+ this._startPosition = this._swipeOptions.swipeLocalPosition ? touch.clientX : touch.pageX;
2453
+ }
2454
+ else {
2455
+ this._startPosition = this._swipeOptions.swipeLocalPosition ? event.offsetX : event.pageX;
2456
+ }
2457
+ }
2458
+ this._lastPosX = this._startPosition;
2459
+ this._timeStart = event.timeStamp;
2460
+ this._thresholdWasReached = false;
2461
+ }
2462
+ move(event) {
2463
+ // failsafe
2464
+ if (typeof event === 'undefined') {
2465
+ return;
2466
+ }
2467
+ let posX = 0;
2468
+ if (this._swipeOptions) {
2469
+ if (this._isMobile && event.type === 'touchmove') {
2470
+ const touch = event.touches[0];
2471
+ posX = this._swipeOptions.swipeLocalPosition ? touch.clientX : touch.pageX;
2472
+ }
2473
+ else {
2474
+ posX = this._swipeOptions.swipeLocalPosition ? event.offsetX : event.pageX;
2475
+ }
2476
+ }
2477
+ const offsetPerFrame = posX - this._lastPosX;
2478
+ const swipeDistanceTotal = Math.abs(posX - this._startPosition);
2479
+ const swipeDistancePercentage = Math.abs(swipeDistanceTotal / event.target.clientWidth);
2480
+ const timeDuration = Math.abs(event.timeStamp - this._timeStart);
2481
+ let direction;
2482
+ let speed = 1 - swipeDistanceTotal / timeDuration;
2483
+ speed = Math.max(0.1, speed);
2484
+ if (posX - this._startPosition > 0) {
2485
+ direction = 1; // a.k.a LTR
2486
+ }
2487
+ else {
2488
+ direction = -1; // a.k.a RTL
2489
+ }
2490
+ this._moveEventData = {
2491
+ position: posX,
2492
+ offsetPerFrame: offsetPerFrame,
2493
+ swipeDistanceTotal: swipeDistanceTotal,
2494
+ swipeDistancePercentage: swipeDistancePercentage,
2495
+ direction: direction,
2496
+ speed: speed,
2497
+ thresholdWasReached: this._thresholdWasReached,
2498
+ };
2499
+ this.checkThreshold(this._moveEventData);
2500
+ // update move delta
2501
+ this._lastPosX = posX;
2502
+ // inform
2503
+ this.moveEvent.emit(this._moveEventData);
2504
+ }
2505
+ release(event) {
2506
+ // case: just a click/touch
2507
+ if (!this._moveEventData) {
2508
+ return;
2509
+ }
2510
+ const releaseEventData = {
2511
+ thresholdWasReached: this._thresholdWasReached,
2512
+ direction: this._moveEventData.direction,
2513
+ speed: this._moveEventData.speed,
2514
+ easingType: this.getEasingCurve(this._moveEventData.speed),
2515
+ target: event.currentTarget,
2516
+ };
2517
+ // inform
2518
+ this.releaseEvent.emit(releaseEventData);
2519
+ }
2520
+ getEasingCurve(speed) {
2521
+ return speed > 0.5 ? 'ease-in' : 'ease-out';
2522
+ }
2523
+ reset() {
2524
+ this._startPosition = -1;
2525
+ this._thresholdWasReached = false;
2526
+ if (this._moveEventData) {
2527
+ this._moveEventData = undefined;
2528
+ }
2529
+ }
2530
+ }
2531
+ SwipeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SwipeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2532
+ SwipeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: SwipeDirective, selector: "[swipeDirective]", inputs: { config: ["swipeDirective", "config"] }, outputs: { moveEvent: "moveEvent", releaseEvent: "releaseEvent" }, host: { listeners: { "mousedown": "onMouseDown($event)", "touchstart": "onMouseDown($event)", "mousemove": "onMove($event)", "touchmove": "onMove($event)", "mouseup": "onRelease($event)", "mouseleave": "onRelease($event)", "touchend": "onRelease($event)" } }, ngImport: i0 });
2533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SwipeDirective, decorators: [{
2534
+ type: Directive,
2535
+ args: [{
2536
+ selector: '[swipeDirective]',
2537
+ }]
2538
+ }], propDecorators: { moveEvent: [{
2539
+ type: Output
2540
+ }], releaseEvent: [{
2541
+ type: Output
2542
+ }], config: [{
2543
+ type: Input,
2544
+ args: ['swipeDirective']
2545
+ }], onMouseDown: [{
2546
+ type: HostListener,
2547
+ args: ['mousedown', ['$event']]
2548
+ }, {
2549
+ type: HostListener,
2550
+ args: ['touchstart', ['$event']]
2551
+ }], onMove: [{
2552
+ type: HostListener,
2553
+ args: ['mousemove', ['$event']]
2554
+ }, {
2555
+ type: HostListener,
2556
+ args: ['touchmove', ['$event']]
2557
+ }], onRelease: [{
2558
+ type: HostListener,
2559
+ args: ['mouseup', ['$event']]
2560
+ }, {
2561
+ type: HostListener,
2562
+ args: ['mouseleave', ['$event']]
2563
+ }, {
2564
+ type: HostListener,
2565
+ args: ['touchend', ['$event']]
2566
+ }] } });
2567
+
2568
+ /*!
2569
+ * @copyright FLYACTS GmbH 2019
2570
+ */
2571
+ class ImageSliderComponent {
2572
+ constructor(sanitizer) {
2573
+ this.sanitizer = sanitizer;
2574
+ this.editMode = false;
2575
+ this.orderChanged = new EventEmitter();
2576
+ this.deleteImageEvent = new EventEmitter();
2577
+ /**
2578
+ * Optional: Define Swipe behaviour configuration.
2579
+ * Default is 10% for the threshold definition until a swipe triggers next/previous slide.
2580
+ */
2581
+ this.swipeConfig = {
2582
+ swipeThreshold: 5,
2583
+ swipeThresholdType: '%',
2584
+ swipeLocalPosition: true,
2585
+ };
2586
+ this.selectedSlide = 0;
2587
+ this.isLastClickedInSliderImage = false;
2588
+ this.config = {
2589
+ initialSlide: 0,
2590
+ slidesPerView: 3,
2591
+ navigation: {
2592
+ nextEl: '.swiper-button-next',
2593
+ prevEl: '.swiper-button-prev',
2594
+ },
2595
+ watchOverflow: true,
2596
+ autoHeight: true,
2597
+ allowTouchMove: false,
2598
+ spaceBetween: 30,
2599
+ on: {
2600
+ slideChange: () => {
2601
+ // do something
2602
+ },
2603
+ slideChangeTransitionEnd: () => {
2604
+ // do something
2605
+ },
2606
+ },
2607
+ };
2608
+ }
2609
+ ngOnInit() {
2610
+ if (this.slides) {
2611
+ // TODO use Pipe safeStyle
2612
+ this.selectedSlideImage = this.sanitizer.bypassSecurityTrustStyle('url(' + this.slides[0] + ')');
2613
+ }
2614
+ }
2615
+ // !TODO
2616
+ onKeydownHandler(event) {
2617
+ if (event.key === 'ArrowRight') {
2618
+ this.nextSlide();
2619
+ }
2620
+ if (event.key === 'ArrowLeft') {
2621
+ this.previousSlide();
2622
+ }
2623
+ }
2624
+ /**
2625
+ * Slide follows the finger or mouse according to it´s move delta.
2626
+ * @param event SwipeMoveEvent
2627
+ */
2628
+ handleMoveEvent(event) {
2629
+ // certain move threshold needs to be reached
2630
+ if (!event.thresholdWasReached) {
2631
+ return;
2632
+ }
2633
+ this.config.direction = event.direction === 1 ? 'horizontal' : 'vertical';
2634
+ }
2635
+ /**
2636
+ * Mouse up or slide container was left.
2637
+ * @param event SwipeReleaseEvent
2638
+ */
2639
+ handleReleaseEvent(event) {
2640
+ if (!event.thresholdWasReached) {
2641
+ return;
2642
+ }
2643
+ // Just do if user clicked to slide on image and not on arrow or other element
2644
+ if (!this.isLastClickedInSliderImage) {
2645
+ return;
2646
+ }
2647
+ if (event.direction === 1) {
2648
+ this.previousSlide();
2649
+ }
2650
+ else {
2651
+ this.nextSlide();
2652
+ }
2653
+ }
2654
+ lastClicked() {
2655
+ this.isLastClickedInSliderImage = true;
2656
+ }
2657
+ noLastClicked() {
2658
+ this.isLastClickedInSliderImage = false;
2659
+ }
2660
+ scrollLeft() {
2661
+ this.previousSlide();
2662
+ }
2663
+ scrollRight() {
2664
+ this.nextSlide();
2665
+ }
2666
+ nextSlide() {
2667
+ if (this.slides && this.selectedSlide < this.slides.length - 1) {
2668
+ if (this.usefulSwiper) {
2669
+ this.usefulSwiper.swiper.slideNext();
2670
+ }
2671
+ this.openSlide(this.selectedSlide + 1);
2672
+ }
2673
+ this.isLastClickedInSliderImage = false;
2674
+ }
2675
+ previousSlide() {
2676
+ if (this.selectedSlide > 0) {
2677
+ if (this.usefulSwiper) {
2678
+ this.usefulSwiper.swiper.slidePrev();
2679
+ }
2680
+ this.openSlide(this.selectedSlide - 1);
2681
+ }
2682
+ this.isLastClickedInSliderImage = false;
2683
+ }
2684
+ slideTo(index) {
2685
+ if (this.usefulSwiper) {
2686
+ this.usefulSwiper.swiper.slideTo(index);
2687
+ }
2688
+ }
2689
+ openSlide(number) {
2690
+ if (this.slides && number < this.slides.length && number >= 0) {
2691
+ this.selectedSlide = number;
2692
+ // TODO use Pipe safeStyle
2693
+ this.selectedSlideImage = this.sanitizer.bypassSecurityTrustStyle('url(' + this.slides[number] || ')');
2694
+ }
2695
+ }
2696
+ ngOnChanges(_changes) {
2697
+ if (_changes.slides) {
2698
+ if (this.slides) {
2699
+ // TODO use Pipe safeStyle
2700
+ this.selectedSlideImage = this.sanitizer.bypassSecurityTrustStyle('url(' + this.slides[0] + ')');
2701
+ }
2702
+ }
2703
+ }
2704
+ /**
2705
+ * Re-order slides and notify parent component
2706
+ */
2707
+ drop(event) {
2708
+ if (this.slides && this.imagesTOSave) {
2709
+ moveItemInArray(this.slides, event.previousIndex, event.currentIndex);
2710
+ moveItemInArray(this.imagesTOSave, event.previousIndex, event.currentIndex);
2711
+ this.orderChanged.emit(this.imagesTOSave);
2712
+ }
2713
+ }
2714
+ /**
2715
+ * Send image index to parent to perform delete
2716
+ */
2717
+ deleteImage(index) {
2718
+ this.deleteImageEvent.emit(index);
2719
+ }
2720
+ }
2721
+ ImageSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ImageSliderComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
2722
+ ImageSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ImageSliderComponent, selector: "kms-image-slider", inputs: { slides: "slides", editMode: "editMode", imagesTOSave: "imagesTOSave", swipeConfig: "swipeConfig" }, outputs: { orderChanged: "orderChanged", deleteImageEvent: "deleteImageEvent" }, host: { listeners: { "document:keydown": "onKeydownHandler($event)" } }, viewQueries: [{ propertyName: "usefulSwiper", first: true, predicate: ["usefulSwiper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"all-wrapper\">\n <!--(swiperight)=\"previousSlide()\" (swipeleft)=\"nextSlide()\"-->\n <div \n class=\"swiper-bigImage\"\n [style.backgroundImage]=\"selectedSlideImage\"\n [swipeDirective]=\"swipeConfig\"\n (moveEvent)=\"handleMoveEvent($event)\"\n (releaseEvent)=\"handleReleaseEvent($event)\"\n (mouseup)=\"lastClicked()\"\n (mouseout)=\"noLastClicked()\" >\n </div>\n\n <ng-content select=\"[description]\"></ng-content>\n\n <div class=\"swiper-holder\">\n <!--\n (mouseWheelUp)=\"scrollLeft($event)\"\n (mouseWheelDown)=\"scrollRight($event)\"\n -->\n\n <swiper [config]=\"config\" #usefulSwiper>\n <div class=\"swiper-wrapper\" \n cdkDropList (cdkDropListDropped)=\"drop($event)\" \n cdkDropListOrientation=\"horizontal\"> \n <div class=\"swiper-slide\" \n *ngFor=\"let slide of slides; let index = index\" \n cdkDrag [cdkDragDisabled]=\"!editMode\">\n <button mat-menu-item *ngIf=\"editMode\" (click)=\"deleteImage(index)\"> \n <kms-icon icon=\"trash\"></kms-icon>\n </button>\n <div class=\"img\" (click)=\"openSlide(index)\"\n [style.backgroundImage]=\"sanitizer.bypassSecurityTrustStyle('url(' + slide + ')')\"\n [ngClass]=\"{'active': index === selectedSlide}\">\n </div>\n \n <div class=\"default-image\">{{\"common.defaultImage\" | translate}} </div>\n </div>\n </div>\n </swiper>\n\n <div class=\"swiper-button-next\" *ngIf=\"slides?.length > 3\"></div>\n <div class=\"swiper-button-prev\" *ngIf=\"slides?.length > 3\"></div>\n\n <div class=\"swiper-button-next2\" *ngIf=\"slides?.length > 1\" (click)=\"nextSlide()\">\n <kms-icon icon=\"chevron-right\" [iconClass]=\"{'color-disabled': selectedSlide == slides?.length - 1, 'color-primary': true}\"></kms-icon>\n </div>\n <div class=\"swiper-button-prev2\" *ngIf=\"slides?.length > 1\" (click)=\"previousSlide()\">\n <kms-icon icon=\"chevron-left\" [iconClass]=\"{'color-disabled': selectedSlide == 0, 'color-primary': true}\"></kms-icon>\n </div>\n\n </div>\n\n <ng-content></ng-content>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$4.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: SwipeDirective, selector: "[swipeDirective]", inputs: ["swipeDirective"], outputs: ["moveEvent", "releaseEvent"] }, { kind: "component", type: i6.SwiperComponent, selector: "swiper", inputs: ["initialize", "config"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "iconStyle", "iconSize", "dontUseSprite"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
2723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ImageSliderComponent, decorators: [{
2724
+ type: Component,
2725
+ args: [{ selector: 'kms-image-slider', template: "<div class=\"all-wrapper\">\n <!--(swiperight)=\"previousSlide()\" (swipeleft)=\"nextSlide()\"-->\n <div \n class=\"swiper-bigImage\"\n [style.backgroundImage]=\"selectedSlideImage\"\n [swipeDirective]=\"swipeConfig\"\n (moveEvent)=\"handleMoveEvent($event)\"\n (releaseEvent)=\"handleReleaseEvent($event)\"\n (mouseup)=\"lastClicked()\"\n (mouseout)=\"noLastClicked()\" >\n </div>\n\n <ng-content select=\"[description]\"></ng-content>\n\n <div class=\"swiper-holder\">\n <!--\n (mouseWheelUp)=\"scrollLeft($event)\"\n (mouseWheelDown)=\"scrollRight($event)\"\n -->\n\n <swiper [config]=\"config\" #usefulSwiper>\n <div class=\"swiper-wrapper\" \n cdkDropList (cdkDropListDropped)=\"drop($event)\" \n cdkDropListOrientation=\"horizontal\"> \n <div class=\"swiper-slide\" \n *ngFor=\"let slide of slides; let index = index\" \n cdkDrag [cdkDragDisabled]=\"!editMode\">\n <button mat-menu-item *ngIf=\"editMode\" (click)=\"deleteImage(index)\"> \n <kms-icon icon=\"trash\"></kms-icon>\n </button>\n <div class=\"img\" (click)=\"openSlide(index)\"\n [style.backgroundImage]=\"sanitizer.bypassSecurityTrustStyle('url(' + slide + ')')\"\n [ngClass]=\"{'active': index === selectedSlide}\">\n </div>\n \n <div class=\"default-image\">{{\"common.defaultImage\" | translate}} </div>\n </div>\n </div>\n </swiper>\n\n <div class=\"swiper-button-next\" *ngIf=\"slides?.length > 3\"></div>\n <div class=\"swiper-button-prev\" *ngIf=\"slides?.length > 3\"></div>\n\n <div class=\"swiper-button-next2\" *ngIf=\"slides?.length > 1\" (click)=\"nextSlide()\">\n <kms-icon icon=\"chevron-right\" [iconClass]=\"{'color-disabled': selectedSlide == slides?.length - 1, 'color-primary': true}\"></kms-icon>\n </div>\n <div class=\"swiper-button-prev2\" *ngIf=\"slides?.length > 1\" (click)=\"previousSlide()\">\n <kms-icon icon=\"chevron-left\" [iconClass]=\"{'color-disabled': selectedSlide == 0, 'color-primary': true}\"></kms-icon>\n </div>\n\n </div>\n\n <ng-content></ng-content>\n</div>" }]
2726
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; }, propDecorators: { slides: [{
2727
+ type: Input
2728
+ }], editMode: [{
2729
+ type: Input
2730
+ }], imagesTOSave: [{
2731
+ type: Input
2732
+ }], orderChanged: [{
2733
+ type: Output
2734
+ }], deleteImageEvent: [{
2735
+ type: Output
2736
+ }], swipeConfig: [{
2737
+ type: Input
2738
+ }], usefulSwiper: [{
2739
+ type: ViewChild,
2740
+ args: ['usefulSwiper']
2741
+ }], onKeydownHandler: [{
2742
+ type: HostListener,
2743
+ args: ['document:keydown', ['$event']]
2744
+ }] } });
2745
+
2746
+ /*!
2747
+ * @copyright FLYACTS GmbH 2019
2748
+ */
2749
+ class MouseWheelDirective {
2750
+ constructor() {
2751
+ this.mouseWheelUp = new EventEmitter();
2752
+ this.mouseWheelDown = new EventEmitter();
2753
+ }
2754
+ onMouseWheelChrome(event) {
2755
+ this.mouseWheelFunc(event);
2756
+ }
2757
+ onMouseWheelFirefox(event) {
2758
+ this.mouseWheelFunc(event);
2759
+ }
2760
+ onMouseWheelIE(event) {
2761
+ this.mouseWheelFunc(event);
2762
+ }
2763
+ mouseWheelFunc(event) {
2764
+ event = window.event || event; // old IE support
2765
+ const delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
2766
+ if (delta > 0) {
2767
+ this.mouseWheelUp.emit(event);
2768
+ }
2769
+ else if (delta < 0) {
2770
+ this.mouseWheelDown.emit(event);
2771
+ }
2772
+ // for IE
2773
+ event.returnValue = false;
2774
+ // for Chrome and Firefox
2775
+ if (event.preventDefault) {
2776
+ event.preventDefault();
2777
+ }
2778
+ }
2779
+ }
2780
+ MouseWheelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MouseWheelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2781
+ MouseWheelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: MouseWheelDirective, selector: "[mouseWheel]", outputs: { mouseWheelUp: "mouseWheelUp", mouseWheelDown: "mouseWheelDown" }, host: { listeners: { "mousewheel": "onMouseWheelChrome($event)", "DOMMouseScroll": "onMouseWheelFirefox($event)", "onmousewheel": "onMouseWheelIE($event)" } }, ngImport: i0 });
2782
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MouseWheelDirective, decorators: [{
2783
+ type: Directive,
2784
+ args: [{ selector: '[mouseWheel]' }]
2785
+ }], propDecorators: { mouseWheelUp: [{
2786
+ type: Output
2787
+ }], mouseWheelDown: [{
2788
+ type: Output
2789
+ }], onMouseWheelChrome: [{
2790
+ type: HostListener,
2791
+ args: ['mousewheel', ['$event']]
2792
+ }], onMouseWheelFirefox: [{
2793
+ type: HostListener,
2794
+ args: ['DOMMouseScroll', ['$event']]
2795
+ }], onMouseWheelIE: [{
2796
+ type: HostListener,
2797
+ args: ['onmousewheel', ['$event']]
2798
+ }] } });
2799
+
2800
+ /**
2801
+ * @copyright KMS GmbH
2802
+ */
2803
+ class DirectivesModule {
2804
+ }
2805
+ DirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2806
+ DirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DirectivesModule, declarations: [SwipeDirective,
2807
+ MouseWheelDirective,
2808
+ GetMaxHeightDirective,
2809
+ TooltipDirective], imports: [CommonModule], exports: [SwipeDirective,
2810
+ MouseWheelDirective,
2811
+ GetMaxHeightDirective,
2812
+ TooltipDirective] });
2813
+ DirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DirectivesModule, imports: [CommonModule] });
2814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DirectivesModule, decorators: [{
2815
+ type: NgModule,
2816
+ args: [{
2817
+ declarations: [
2818
+ SwipeDirective,
2819
+ MouseWheelDirective,
2820
+ GetMaxHeightDirective,
2821
+ TooltipDirective,
2822
+ ],
2823
+ imports: [CommonModule],
2824
+ exports: [
2825
+ SwipeDirective,
2826
+ MouseWheelDirective,
2827
+ GetMaxHeightDirective,
2828
+ TooltipDirective,
2829
+ ],
2830
+ }]
2831
+ }] });
2832
+
2833
+ class KmsUiPresentationalModule {
2834
+ }
2835
+ KmsUiPresentationalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2836
+ KmsUiPresentationalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalModule, declarations: [ActionsParentComponent,
2837
+ BackToTopComponent,
2838
+ ButtonWithConfirmDialogComponent,
2839
+ CheckboxComponent,
2840
+ ColorInputComponent,
2841
+ DropdownFromDataComponent,
2842
+ EnumRadiogroupComponent,
2843
+ EnumRadiogroupComponent,
2844
+ FileInputComponent,
2845
+ FlyoutComponent,
2846
+ GenericDialogComponent,
2847
+ IconComponent,
2848
+ ImageSliderComponent,
2849
+ KMSAccordionItemComponent,
2850
+ KmsUiPresentationalComponent,
2851
+ LoaderComponent,
2852
+ MapComponent,
2853
+ RadioButtonComponent,
2854
+ SalutationDropdownComponent,
2855
+ SalutationRadiogroupComponent,
2856
+ TimeInputComponent,
2857
+ TooltipComponent,
2858
+ TooltipIconComponent,
2859
+ YesNoRadiogroupComponent], imports: [CommonModule,
2860
+ DragDropModule,
2861
+ MatCheckboxModule,
2862
+ MatButtonModule,
2863
+ MatRadioModule,
2864
+ MatDialogModule,
2865
+ FormsModule,
2866
+ ReactiveFormsModule,
2867
+ MatFormFieldModule,
2868
+ MatInputModule,
2869
+ MatMenuModule,
2870
+ CustomPipesModule,
2871
+ GoogleMapsModule,
2872
+ MatExpansionModule,
2873
+ MatSelectModule,
2874
+ MatProgressSpinnerModule,
2875
+ DirectivesModule,
2876
+ TranslateModule,
2877
+ NgxUsefulSwiperModule], exports: [ActionsParentComponent,
2878
+ BackToTopComponent,
2879
+ ButtonWithConfirmDialogComponent,
2880
+ CheckboxComponent,
2881
+ ColorInputComponent,
2882
+ DropdownFromDataComponent,
2883
+ EnumRadiogroupComponent,
2884
+ EnumRadiogroupComponent,
2885
+ FileInputComponent,
2886
+ FlyoutComponent,
2887
+ GenericDialogComponent,
2888
+ IconComponent,
2889
+ ImageSliderComponent,
2890
+ KMSAccordionItemComponent,
2891
+ KmsUiPresentationalComponent,
2892
+ LoaderComponent,
2893
+ MapComponent,
2894
+ RadioButtonComponent,
2895
+ SalutationDropdownComponent,
2896
+ SalutationRadiogroupComponent,
2897
+ TimeInputComponent,
2898
+ TooltipComponent,
2899
+ TooltipIconComponent,
2900
+ YesNoRadiogroupComponent] });
2901
+ KmsUiPresentationalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalModule, providers: [
2902
+ ViewportService
2903
+ ], imports: [CommonModule,
2904
+ DragDropModule,
2905
+ MatCheckboxModule,
2906
+ MatButtonModule,
2907
+ MatRadioModule,
2908
+ MatDialogModule,
2909
+ FormsModule,
2910
+ ReactiveFormsModule,
2911
+ MatFormFieldModule,
2912
+ MatInputModule,
2913
+ MatMenuModule,
2914
+ CustomPipesModule,
2915
+ GoogleMapsModule,
2916
+ MatExpansionModule,
2917
+ MatSelectModule,
2918
+ MatProgressSpinnerModule,
2919
+ DirectivesModule,
2920
+ TranslateModule,
2921
+ NgxUsefulSwiperModule] });
2922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KmsUiPresentationalModule, decorators: [{
2923
+ type: NgModule,
2924
+ args: [{
2925
+ declarations: [
2926
+ ActionsParentComponent,
2927
+ BackToTopComponent,
2928
+ ButtonWithConfirmDialogComponent,
2929
+ CheckboxComponent,
2930
+ ColorInputComponent,
2931
+ DropdownFromDataComponent,
2932
+ EnumRadiogroupComponent,
2933
+ EnumRadiogroupComponent,
2934
+ FileInputComponent,
2935
+ FlyoutComponent,
2936
+ GenericDialogComponent,
2937
+ IconComponent,
2938
+ ImageSliderComponent,
2939
+ KMSAccordionItemComponent,
2940
+ KmsUiPresentationalComponent,
2941
+ LoaderComponent,
2942
+ MapComponent,
2943
+ RadioButtonComponent,
2944
+ SalutationDropdownComponent,
2945
+ SalutationRadiogroupComponent,
2946
+ TimeInputComponent,
2947
+ TooltipComponent,
2948
+ TooltipIconComponent,
2949
+ YesNoRadiogroupComponent,
2950
+ ],
2951
+ imports: [
2952
+ CommonModule,
2953
+ DragDropModule,
2954
+ MatCheckboxModule,
2955
+ MatButtonModule,
2956
+ MatRadioModule,
2957
+ MatDialogModule,
2958
+ FormsModule,
2959
+ ReactiveFormsModule,
2960
+ MatFormFieldModule,
2961
+ MatInputModule,
2962
+ MatMenuModule,
2963
+ CustomPipesModule,
2964
+ GoogleMapsModule,
2965
+ MatExpansionModule,
2966
+ MatSelectModule,
2967
+ MatProgressSpinnerModule,
2968
+ DirectivesModule,
2969
+ TranslateModule,
2970
+ NgxUsefulSwiperModule,
2971
+ ],
2972
+ exports: [
2973
+ ActionsParentComponent,
2974
+ BackToTopComponent,
2975
+ ButtonWithConfirmDialogComponent,
2976
+ CheckboxComponent,
2977
+ ColorInputComponent,
2978
+ DropdownFromDataComponent,
2979
+ EnumRadiogroupComponent,
2980
+ EnumRadiogroupComponent,
2981
+ FileInputComponent,
2982
+ FlyoutComponent,
2983
+ GenericDialogComponent,
2984
+ IconComponent,
2985
+ ImageSliderComponent,
2986
+ KMSAccordionItemComponent,
2987
+ KmsUiPresentationalComponent,
2988
+ LoaderComponent,
2989
+ MapComponent,
2990
+ RadioButtonComponent,
2991
+ SalutationDropdownComponent,
2992
+ SalutationRadiogroupComponent,
2993
+ TimeInputComponent,
2994
+ TooltipComponent,
2995
+ TooltipIconComponent,
2996
+ YesNoRadiogroupComponent,
2997
+ ],
2998
+ providers: [
2999
+ ViewportService
3000
+ ]
3001
+ }]
3002
+ }] });
3003
+
3004
+ /*
3005
+ * Public API Surface of kms-ngx-ui-presentational
3006
+ */
3007
+
3008
+ /**
3009
+ * Generated bundle index. Do not edit.
3010
+ */
3011
+
3012
+ export { ActionsParentComponent, BackToTopComponent, ButtonWithConfirmDialogComponent, CheckboxComponent, ColorInputComponent, CustomPipesModule, DecodeUriPipe, DirectivesModule, DropdownFromDataComponent, EncodeUriPipe, EnumRadiogroupComponent, FileInputComponent, FlyoutComponent, FormParentComponent, GenericDialogComponent, GetMaxHeightDirective, IconComponent, IconSize$1 as IconSize, ImageSliderComponent, IntegerCurrency, KMSAccordionItemComponent, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, MouseWheelDirective, RadioButtonComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeStylePipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SwipeDirective, TimeInputComponent, ToNumberPipe, TooltipComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, YesNoRadiogroupComponent };
3013
+ //# sourceMappingURL=kms-ngx-ui-presentational.mjs.map