@kms-ngx-ui/presentational 16.3.1 → 16.3.2

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