@kms-ngx-ui/presentational 0.0.23 → 13.0.0

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