ngx-sfc-common 0.0.0-watch

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 (219) hide show
  1. package/README.md +644 -0
  2. package/esm2020/lib/components/button/button-type.enum.mjs +9 -0
  3. package/esm2020/lib/components/button/button.component.mjs +44 -0
  4. package/esm2020/lib/components/checkmark/checkmark-type.enum.mjs +7 -0
  5. package/esm2020/lib/components/checkmark/checkmark.component.mjs +39 -0
  6. package/esm2020/lib/components/close/close.component.mjs +16 -0
  7. package/esm2020/lib/components/delimeter/delimeter.component.mjs +28 -0
  8. package/esm2020/lib/components/dots/dots.component.mjs +30 -0
  9. package/esm2020/lib/components/hamburger/default/hamburger.component.mjs +12 -0
  10. package/esm2020/lib/components/hamburger/hamburger-base.component.mjs +23 -0
  11. package/esm2020/lib/components/hamburger/menu/hamburger-menu.component.mjs +18 -0
  12. package/esm2020/lib/components/icon/icon.component.mjs +21 -0
  13. package/esm2020/lib/components/index.mjs +34 -0
  14. package/esm2020/lib/components/load-container/load-container.component.mjs +180 -0
  15. package/esm2020/lib/components/load-container/load-container.constants.mjs +5 -0
  16. package/esm2020/lib/components/load-container/load-container.enum.mjs +11 -0
  17. package/esm2020/lib/components/load-container/models/load-container.model.mjs +2 -0
  18. package/esm2020/lib/components/load-container/models/load-more-parameters.model.mjs +2 -0
  19. package/esm2020/lib/components/load-container/models/load-more-predicate-parameters.model.mjs +2 -0
  20. package/esm2020/lib/components/load-container/models/load-more.model.mjs +2 -0
  21. package/esm2020/lib/components/load-container/service/load-more.service.mjs +27 -0
  22. package/esm2020/lib/components/load-more-button/load-more-button.component.mjs +31 -0
  23. package/esm2020/lib/components/loader/bounce/bounce-loader.component.mjs +13 -0
  24. package/esm2020/lib/components/loader/circle/circle-loader-type.enum.mjs +6 -0
  25. package/esm2020/lib/components/loader/circle/circle-loader.component.mjs +20 -0
  26. package/esm2020/lib/components/loader/loader-base.component.mjs +51 -0
  27. package/esm2020/lib/components/loader/loader.constants.mjs +6 -0
  28. package/esm2020/lib/components/loader/loader.event.mjs +2 -0
  29. package/esm2020/lib/components/loader/service/loader.service.mjs +76 -0
  30. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +50 -0
  31. package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +28 -0
  32. package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +60 -0
  33. package/esm2020/lib/components/modal/footer/default/default-modal-footer.model.mjs +2 -0
  34. package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +38 -0
  35. package/esm2020/lib/components/modal/header/default/default-modal-header.model.mjs +2 -0
  36. package/esm2020/lib/components/modal/modal-template.enum.mjs +7 -0
  37. package/esm2020/lib/components/modal/modal.component.mjs +103 -0
  38. package/esm2020/lib/components/modal/service/modal.event.mjs +2 -0
  39. package/esm2020/lib/components/modal/service/modal.service.mjs +31 -0
  40. package/esm2020/lib/components/pagination/models/pagination-view.model.mjs +2 -0
  41. package/esm2020/lib/components/pagination/pagination.component.mjs +104 -0
  42. package/esm2020/lib/components/pagination/pagination.constants.mjs +6 -0
  43. package/esm2020/lib/components/pagination/service/pagination.event.mjs +2 -0
  44. package/esm2020/lib/components/pagination/service/pagination.service.mjs +47 -0
  45. package/esm2020/lib/components/sorting/service/sorting.event.mjs +2 -0
  46. package/esm2020/lib/components/sorting/service/sorting.service.mjs +21 -0
  47. package/esm2020/lib/components/sorting/sorting.component.mjs +71 -0
  48. package/esm2020/lib/components/sorting/sorting.constants.mjs +6 -0
  49. package/esm2020/lib/components/sorting/sorting.model.mjs +2 -0
  50. package/esm2020/lib/components/template-content/template-content.component.mjs +31 -0
  51. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +38 -0
  52. package/esm2020/lib/components/toggle-switcher/toggle-switcher.model.mjs +2 -0
  53. package/esm2020/lib/components/tooltip/tooltip-type.enum.mjs +6 -0
  54. package/esm2020/lib/components/tooltip/tooltip.component.mjs +69 -0
  55. package/esm2020/lib/constants/common.constants.mjs +9 -0
  56. package/esm2020/lib/constants/date-time.constants.mjs +10 -0
  57. package/esm2020/lib/constants/file.constants.mjs +2 -0
  58. package/esm2020/lib/constants/index.mjs +4 -0
  59. package/esm2020/lib/constants/ui.constants.mjs +23 -0
  60. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +63 -0
  61. package/esm2020/lib/directives/click-outside/click-outside.event.mjs +2 -0
  62. package/esm2020/lib/directives/component-size/component-size.directive.mjs +59 -0
  63. package/esm2020/lib/directives/destroy-parent/destroy-parent.directive.mjs +27 -0
  64. package/esm2020/lib/directives/dom-changes/dom-changes.directive.mjs +32 -0
  65. package/esm2020/lib/directives/if/if.directive.mjs +26 -0
  66. package/esm2020/lib/directives/image-size/image-load.directive.mjs +41 -0
  67. package/esm2020/lib/directives/image-size/services/image-load.event.mjs +2 -0
  68. package/esm2020/lib/directives/image-size/services/image-load.service.mjs +22 -0
  69. package/esm2020/lib/directives/image-size/services/image-size.model.mjs +2 -0
  70. package/esm2020/lib/directives/index.mjs +14 -0
  71. package/esm2020/lib/directives/mouse-down/mouse-down.directive.mjs +37 -0
  72. package/esm2020/lib/directives/scroll-into-view/scroll-into-view.directive.mjs +39 -0
  73. package/esm2020/lib/directives/scroll-tracker/scroll-tracker.directive.mjs +39 -0
  74. package/esm2020/lib/directives/show-hide-element/show-hide-element.directive.mjs +42 -0
  75. package/esm2020/lib/directives/template-reference/template-reference.directive.mjs +23 -0
  76. package/esm2020/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.mjs +38 -0
  77. package/esm2020/lib/enums/direction.enum.mjs +9 -0
  78. package/esm2020/lib/enums/index.mjs +9 -0
  79. package/esm2020/lib/enums/media.enum.mjs +13 -0
  80. package/esm2020/lib/enums/position.enum.mjs +12 -0
  81. package/esm2020/lib/enums/sequence.enum.mjs +9 -0
  82. package/esm2020/lib/enums/size.enum.mjs +11 -0
  83. package/esm2020/lib/enums/sorting-direction.enum.mjs +9 -0
  84. package/esm2020/lib/enums/theme.enum.mjs +9 -0
  85. package/esm2020/lib/enums/ui.enum.mjs +30 -0
  86. package/esm2020/lib/models/class.model.mjs +2 -0
  87. package/esm2020/lib/models/index.mjs +2 -0
  88. package/esm2020/lib/ngx-sfc-common.module.mjs +190 -0
  89. package/esm2020/lib/pipes/index.mjs +2 -0
  90. package/esm2020/lib/pipes/switch-multi-case/switch-multi-case.pipe.mjs +16 -0
  91. package/esm2020/lib/services/document-ref.service.mjs +71 -0
  92. package/esm2020/lib/services/index.mjs +4 -0
  93. package/esm2020/lib/services/resize.service.mjs +42 -0
  94. package/esm2020/lib/services/window-ref.service.mjs +70 -0
  95. package/esm2020/lib/utils/collections.utils.mjs +280 -0
  96. package/esm2020/lib/utils/common.utils.mjs +184 -0
  97. package/esm2020/lib/utils/date-time.utils.mjs +265 -0
  98. package/esm2020/lib/utils/file.utils.mjs +53 -0
  99. package/esm2020/lib/utils/index.mjs +7 -0
  100. package/esm2020/lib/utils/string.utils.mjs +31 -0
  101. package/esm2020/lib/utils/ui.utils.mjs +90 -0
  102. package/esm2020/ngx-sfc-common.mjs +5 -0
  103. package/esm2020/public-api.mjs +12 -0
  104. package/fesm2015/ngx-sfc-common.mjs +3097 -0
  105. package/fesm2015/ngx-sfc-common.mjs.map +1 -0
  106. package/fesm2020/ngx-sfc-common.mjs +3088 -0
  107. package/fesm2020/ngx-sfc-common.mjs.map +1 -0
  108. package/index.d.ts +5 -0
  109. package/lib/components/button/button-type.enum.d.ts +7 -0
  110. package/lib/components/button/button.component.d.ts +16 -0
  111. package/lib/components/checkmark/checkmark-type.enum.d.ts +5 -0
  112. package/lib/components/checkmark/checkmark.component.d.ts +11 -0
  113. package/lib/components/close/close.component.d.ts +6 -0
  114. package/lib/components/delimeter/delimeter.component.d.ts +9 -0
  115. package/lib/components/dots/dots.component.d.ts +9 -0
  116. package/lib/components/hamburger/default/hamburger.component.d.ts +6 -0
  117. package/lib/components/hamburger/hamburger-base.component.d.ts +7 -0
  118. package/lib/components/hamburger/menu/hamburger-menu.component.d.ts +7 -0
  119. package/lib/components/icon/icon.component.d.ts +9 -0
  120. package/lib/components/index.d.ts +44 -0
  121. package/lib/components/load-container/load-container.component.d.ts +50 -0
  122. package/lib/components/load-container/load-container.constants.d.ts +4 -0
  123. package/lib/components/load-container/load-container.enum.d.ts +8 -0
  124. package/lib/components/load-container/models/load-container.model.d.ts +14 -0
  125. package/lib/components/load-container/models/load-more-parameters.model.d.ts +5 -0
  126. package/lib/components/load-container/models/load-more-predicate-parameters.model.d.ts +3 -0
  127. package/lib/components/load-container/models/load-more.model.d.ts +5 -0
  128. package/lib/components/load-container/service/load-more.service.d.ts +12 -0
  129. package/lib/components/load-more-button/load-more-button.component.d.ts +12 -0
  130. package/lib/components/loader/bounce/bounce-loader.component.d.ts +6 -0
  131. package/lib/components/loader/circle/circle-loader-type.enum.d.ts +4 -0
  132. package/lib/components/loader/circle/circle-loader.component.d.ts +8 -0
  133. package/lib/components/loader/loader-base.component.d.ts +27 -0
  134. package/lib/components/loader/loader.constants.d.ts +5 -0
  135. package/lib/components/loader/loader.event.d.ts +4 -0
  136. package/lib/components/loader/service/loader.service.d.ts +33 -0
  137. package/lib/components/modal/directive/click/modal-open-on-click.directive.d.ts +17 -0
  138. package/lib/components/modal/directive/open/modal-open.directive.d.ts +13 -0
  139. package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +19 -0
  140. package/lib/components/modal/footer/default/default-modal-footer.model.d.ts +8 -0
  141. package/lib/components/modal/header/default/default-modal-header.component.d.ts +16 -0
  142. package/lib/components/modal/header/default/default-modal-header.model.d.ts +6 -0
  143. package/lib/components/modal/modal-template.enum.d.ts +5 -0
  144. package/lib/components/modal/modal.component.d.ts +26 -0
  145. package/lib/components/modal/service/modal.event.d.ts +4 -0
  146. package/lib/components/modal/service/modal.service.d.ts +13 -0
  147. package/lib/components/pagination/models/pagination-view.model.d.ts +12 -0
  148. package/lib/components/pagination/pagination.component.d.ts +31 -0
  149. package/lib/components/pagination/pagination.constants.d.ts +5 -0
  150. package/lib/components/pagination/service/pagination.event.d.ts +6 -0
  151. package/lib/components/pagination/service/pagination.service.d.ts +25 -0
  152. package/lib/components/sorting/service/sorting.event.d.ts +5 -0
  153. package/lib/components/sorting/service/sorting.service.d.ts +9 -0
  154. package/lib/components/sorting/sorting.component.d.ts +22 -0
  155. package/lib/components/sorting/sorting.constants.d.ts +4 -0
  156. package/lib/components/sorting/sorting.model.d.ts +12 -0
  157. package/lib/components/template-content/template-content.component.d.ts +14 -0
  158. package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +12 -0
  159. package/lib/components/toggle-switcher/toggle-switcher.model.d.ts +5 -0
  160. package/lib/components/tooltip/tooltip-type.enum.d.ts +4 -0
  161. package/lib/components/tooltip/tooltip.component.d.ts +22 -0
  162. package/lib/constants/common.constants.d.ts +8 -0
  163. package/lib/constants/date-time.constants.d.ts +9 -0
  164. package/lib/constants/file.constants.d.ts +1 -0
  165. package/lib/constants/index.d.ts +4 -0
  166. package/lib/constants/ui.constants.d.ts +22 -0
  167. package/lib/directives/click-outside/click-outside.directive.d.ts +23 -0
  168. package/lib/directives/click-outside/click-outside.event.d.ts +4 -0
  169. package/lib/directives/component-size/component-size.directive.d.ts +18 -0
  170. package/lib/directives/destroy-parent/destroy-parent.directive.d.ts +10 -0
  171. package/lib/directives/dom-changes/dom-changes.directive.d.ts +12 -0
  172. package/lib/directives/if/if.directive.d.ts +11 -0
  173. package/lib/directives/image-size/image-load.directive.d.ts +12 -0
  174. package/lib/directives/image-size/services/image-load.event.d.ts +5 -0
  175. package/lib/directives/image-size/services/image-load.service.d.ts +10 -0
  176. package/lib/directives/image-size/services/image-size.model.d.ts +4 -0
  177. package/lib/directives/index.d.ts +16 -0
  178. package/lib/directives/mouse-down/mouse-down.directive.d.ts +12 -0
  179. package/lib/directives/scroll-into-view/scroll-into-view.directive.d.ts +11 -0
  180. package/lib/directives/scroll-tracker/scroll-tracker.directive.d.ts +11 -0
  181. package/lib/directives/show-hide-element/show-hide-element.directive.d.ts +13 -0
  182. package/lib/directives/template-reference/template-reference.directive.d.ts +10 -0
  183. package/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.d.ts +13 -0
  184. package/lib/enums/direction.enum.d.ts +7 -0
  185. package/lib/enums/index.d.ts +8 -0
  186. package/lib/enums/media.enum.d.ts +11 -0
  187. package/lib/enums/position.enum.d.ts +10 -0
  188. package/lib/enums/sequence.enum.d.ts +7 -0
  189. package/lib/enums/size.enum.d.ts +9 -0
  190. package/lib/enums/sorting-direction.enum.d.ts +7 -0
  191. package/lib/enums/theme.enum.d.ts +7 -0
  192. package/lib/enums/ui.enum.d.ts +27 -0
  193. package/lib/models/class.model.d.ts +3 -0
  194. package/lib/models/index.d.ts +1 -0
  195. package/lib/ngx-sfc-common.module.d.ts +43 -0
  196. package/lib/pipes/index.d.ts +1 -0
  197. package/lib/pipes/switch-multi-case/switch-multi-case.pipe.d.ts +7 -0
  198. package/lib/services/document-ref.service.d.ts +43 -0
  199. package/lib/services/index.d.ts +3 -0
  200. package/lib/services/resize.service.d.ts +32 -0
  201. package/lib/services/window-ref.service.d.ts +43 -0
  202. package/lib/utils/collections.utils.d.ts +156 -0
  203. package/lib/utils/common.utils.d.ts +78 -0
  204. package/lib/utils/date-time.utils.d.ts +164 -0
  205. package/lib/utils/file.utils.d.ts +25 -0
  206. package/lib/utils/index.d.ts +6 -0
  207. package/lib/utils/string.utils.d.ts +19 -0
  208. package/lib/utils/ui.utils.d.ts +58 -0
  209. package/package.json +56 -0
  210. package/public-api.d.ts +8 -0
  211. package/styles/_colors.scss +48 -0
  212. package/styles/_index.scss +4 -0
  213. package/styles/_mixins-delimeter.scss +21 -0
  214. package/styles/_mixins-scroll.scss +38 -0
  215. package/styles/_mixins.scss +46 -0
  216. package/styles/_variables.scss +12 -0
  217. package/styles/themes/_dark.scss +17 -0
  218. package/styles/themes/_default.scss +18 -0
  219. package/styles/themes/_yellow.scss +3 -0
@@ -0,0 +1,3097 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, PLATFORM_ID, EventEmitter, Directive, Inject, Input, Output, HostListener, Pipe, Component, HostBinding, ContentChildren, ViewChild, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@angular/common';
4
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
5
+ import * as i3 from '@fortawesome/angular-fontawesome';
6
+ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
7
+ import { Subject, fromEvent, Observable, distinctUntilChanged, startWith, BehaviorSubject, filter, map, EMPTY, combineLatest, tap, switchMap, of } from 'rxjs';
8
+ import * as i1 from '@angular/platform-browser';
9
+ import { trigger, state, style, transition, group, query, animate, animateChild } from '@angular/animations';
10
+ import { faTimes, faWindowRestore, faCheck, faChevronLeft, faChevronRight, faChevronUp, faChevronDown, faChevronCircleDown } from '@fortawesome/free-solid-svg-icons';
11
+
12
+ /**
13
+ * Component sizes
14
+ */
15
+ var ComponentSize;
16
+ (function (ComponentSize) {
17
+ ComponentSize["Small"] = "small";
18
+ ComponentSize["Medium"] = "medium";
19
+ ComponentSize["Large"] = "large";
20
+ ComponentSize["Custom"] = "custom";
21
+ })(ComponentSize || (ComponentSize = {}));
22
+
23
+ /**
24
+ * Direction types
25
+ */
26
+ var Direction;
27
+ (function (Direction) {
28
+ Direction["Horizontal"] = "horizontal";
29
+ Direction["Vertical"] = "vertical";
30
+ })(Direction || (Direction = {}));
31
+
32
+ /**
33
+ * CSS Media limits
34
+ */
35
+ var MediaLimits;
36
+ (function (MediaLimits) {
37
+ MediaLimits[MediaLimits["LaptopLarge"] = 1440] = "LaptopLarge";
38
+ MediaLimits[MediaLimits["Laptop"] = 1024] = "Laptop";
39
+ MediaLimits[MediaLimits["Tablet"] = 768] = "Tablet";
40
+ MediaLimits[MediaLimits["MobileLarge"] = 425] = "MobileLarge";
41
+ MediaLimits[MediaLimits["Mobile"] = 375] = "Mobile";
42
+ MediaLimits[MediaLimits["MobileSmall"] = 320] = "MobileSmall";
43
+ })(MediaLimits || (MediaLimits = {}));
44
+
45
+ /**
46
+ * Position directions
47
+ */
48
+ var Position;
49
+ (function (Position) {
50
+ Position["Top"] = "top";
51
+ Position["Bottom"] = "bottom";
52
+ Position["Left"] = "left";
53
+ Position["Right"] = "right";
54
+ Position["Center"] = "center";
55
+ })(Position || (Position = {}));
56
+
57
+ /**
58
+ * Type of sorting
59
+ */
60
+ var SortingDirection;
61
+ (function (SortingDirection) {
62
+ SortingDirection["Ascending"] = "ascending";
63
+ SortingDirection["Descending"] = "descending";
64
+ })(SortingDirection || (SortingDirection = {}));
65
+
66
+ /**
67
+ * Theme types
68
+ */
69
+ var Theme;
70
+ (function (Theme) {
71
+ Theme["Default"] = "sfc-default-theme";
72
+ Theme["Dark"] = "sfc-dark-theme";
73
+ })(Theme || (Theme = {}));
74
+
75
+ /**
76
+ * UI classes
77
+ */
78
+ var UIClass;
79
+ (function (UIClass) {
80
+ UIClass["Active"] = "active";
81
+ UIClass["Valid"] = "valid";
82
+ UIClass["Invalid"] = "invalid";
83
+ UIClass["InnerInvalid"] = "inner-invalid";
84
+ UIClass["Enabled"] = "enabled";
85
+ UIClass["Disabled"] = "disabled";
86
+ UIClass["Selected"] = "selected";
87
+ UIClass["Empty"] = "empty";
88
+ UIClass["Focus"] = "focus";
89
+ UIClass["Open"] = "open";
90
+ UIClass["Loading"] = "loading";
91
+ UIClass["Removed"] = "removed";
92
+ UIClass["Visible"] = "visible";
93
+ UIClass["Hidden"] = "hidden";
94
+ UIClass["Animated"] = "animated";
95
+ UIClass["Expanded"] = "expanded";
96
+ UIClass["Fixed"] = "fixed";
97
+ UIClass["Bordered"] = "bordered";
98
+ UIClass["Even"] = "even";
99
+ UIClass["Pointer"] = "pointer";
100
+ UIClass["Default"] = "default";
101
+ UIClass["Initialization"] = "initialization";
102
+ })(UIClass || (UIClass = {}));
103
+ ;
104
+
105
+ /**
106
+ * Sequence types
107
+ */
108
+ var Sequence;
109
+ (function (Sequence) {
110
+ Sequence["Previous"] = "previous";
111
+ Sequence["Next"] = "next";
112
+ })(Sequence || (Sequence = {}));
113
+
114
+ /**
115
+ * Create a new injection token for injecting the Document into a component.
116
+ */
117
+ const DOCUMENT = new InjectionToken('DocumentToken');
118
+ /**
119
+ * Define abstract class for obtaining reference to the global Document object.
120
+ */
121
+ class DocumentRef {
122
+ get nativeDocument() {
123
+ throw new Error('Not implemented.');
124
+ }
125
+ }
126
+ /**
127
+ * Define class that implements the abstract class and returns the native Document object.
128
+ */
129
+ class BrowserDocumentRef extends DocumentRef {
130
+ constructor() {
131
+ super();
132
+ }
133
+ /**
134
+ * @returns Document object
135
+ */
136
+ get nativeDocument() {
137
+ return document;
138
+ }
139
+ }
140
+ BrowserDocumentRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BrowserDocumentRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
141
+ BrowserDocumentRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BrowserDocumentRef });
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BrowserDocumentRef, decorators: [{
143
+ type: Injectable
144
+ }], ctorParameters: function () { return []; } });
145
+ /**
146
+ * Create an factory function that returns the native Document object.
147
+ * @param browserDocumentRef Native Document object
148
+ * @param platformId id of platform
149
+ * @returns type of platform of empty object
150
+ */
151
+ function documentFactory(browserDocumentRef, platformId) {
152
+ if (isPlatformBrowser(platformId)) {
153
+ return browserDocumentRef.nativeDocument;
154
+ }
155
+ const doc = {
156
+ hidden: false,
157
+ visibilityState: UIClass.Visible
158
+ };
159
+ return doc;
160
+ }
161
+ /**
162
+ * Create a injectable provider for the DocumentRef token that uses the BrowserDocumentRef class.
163
+ */
164
+ const browserDocumentProvider = {
165
+ provide: DocumentRef,
166
+ useClass: BrowserDocumentRef
167
+ };
168
+ /**
169
+ * Create an injectable provider that uses the DocumentFactory function for returning the native Document object.
170
+ */
171
+ const documentProvider = {
172
+ provide: DOCUMENT,
173
+ useFactory: documentFactory,
174
+ deps: [DocumentRef, PLATFORM_ID]
175
+ };
176
+ /**
177
+ * Create an array of providers.
178
+ */
179
+ const DOCUMENT_PROVIDERS = [browserDocumentProvider, documentProvider];
180
+
181
+ /**
182
+ * Create a new injection token for injecting the window into a component.
183
+ */
184
+ const WINDOW = new InjectionToken('WindowToken');
185
+ /**
186
+ * Define abstract class for obtaining reference to the global window object.
187
+ */
188
+ class WindowRef {
189
+ get nativeWindow() {
190
+ throw new Error('Not implemented.');
191
+ }
192
+ }
193
+ /**
194
+ * Define class that implements the abstract class and returns the native window object.
195
+ */
196
+ class BrowserWindowRef extends WindowRef {
197
+ constructor() {
198
+ super();
199
+ }
200
+ /**
201
+ * @returns window object
202
+ */
203
+ get nativeWindow() {
204
+ return window;
205
+ }
206
+ }
207
+ BrowserWindowRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BrowserWindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
208
+ BrowserWindowRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BrowserWindowRef });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BrowserWindowRef, decorators: [{
210
+ type: Injectable
211
+ }], ctorParameters: function () { return []; } });
212
+ /**
213
+ * Create an factory function that returns the native window object.
214
+ * @param browserWindowRef Native window object
215
+ * @param platformId id of platform
216
+ * @returns type of platform of empty object
217
+ */
218
+ function windowFactory(browserWindowRef, platformId) {
219
+ if (isPlatformBrowser(platformId)) {
220
+ return browserWindowRef.nativeWindow;
221
+ }
222
+ const obj = {
223
+ setTimeout: (func, time) => { },
224
+ clearTimeout: (a) => { }
225
+ };
226
+ return obj;
227
+ }
228
+ /**
229
+ * Create a injectable provider for the WindowRef token that uses the BrowserWindowRef class.
230
+ */
231
+ const browserWindowProvider = {
232
+ provide: WindowRef,
233
+ useClass: BrowserWindowRef
234
+ };
235
+ /**
236
+ * Create an injectable provider that uses the windowFactory function for returning the native window object.
237
+ */
238
+ const windowProvider = {
239
+ provide: WINDOW,
240
+ useFactory: windowFactory,
241
+ deps: [WindowRef, PLATFORM_ID]
242
+ };
243
+ /**
244
+ * Create an array of providers.
245
+ */
246
+ const WINDOW_PROVIDERS = [browserWindowProvider, windowProvider];
247
+
248
+ class ResizeService {
249
+ constructor(eventManager) {
250
+ this.eventManager = eventManager;
251
+ this.resizeSubject = new Subject();
252
+ this.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));
253
+ this.eventManager.addGlobalEventListener('window', 'onload', this.onLoaded.bind(this));
254
+ }
255
+ /**
256
+ * Makes resizeSubject become Observable
257
+ * @returns Observable of resizeSubject
258
+ */
259
+ get onResize$() {
260
+ return this.resizeSubject.asObservable();
261
+ }
262
+ /**
263
+ * Handler of 'resize' event. Passes data throw resizeSubject
264
+ * @param event Event Object of 'resize' event
265
+ */
266
+ onResize(event) {
267
+ this.resizeSubject.next(event.target);
268
+ }
269
+ /**
270
+ * Handler of 'onload' event. Defines the width of window
271
+ * @param event Event Object of 'onload' event
272
+ */
273
+ onLoaded(event) {
274
+ this.windowWidth = event.target;
275
+ }
276
+ }
277
+ ResizeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResizeService, deps: [{ token: i1.EventManager }], target: i0.ɵɵFactoryTarget.Injectable });
278
+ ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResizeService, providedIn: 'root' });
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResizeService, decorators: [{
280
+ type: Injectable,
281
+ args: [{
282
+ providedIn: 'root'
283
+ }]
284
+ }], ctorParameters: function () { return [{ type: i1.EventManager }]; } });
285
+
286
+ class ClickOutsideDirective {
287
+ constructor(elementRef, document) {
288
+ this.elementRef = elementRef;
289
+ this.document = document;
290
+ /**
291
+ * Toggler for checking ouside click event
292
+ */
293
+ this.listening = false;
294
+ /**
295
+ * Emitter for click event
296
+ */
297
+ this.action = new EventEmitter();
298
+ }
299
+ ngAfterViewInit() {
300
+ this._clickSubscription = fromEvent(this.document, 'click')
301
+ .subscribe(event => this.onClick(event));
302
+ }
303
+ ngOnDestroy() {
304
+ var _a;
305
+ (_a = this._clickSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
306
+ }
307
+ onClick(event) {
308
+ if (event instanceof MouseEvent && this.listening) {
309
+ const clickOutsideEvent = {
310
+ target: event.target,
311
+ value: !this.isDescendant(this.elementRef.nativeElement, event.target)
312
+ };
313
+ this.action.emit(clickOutsideEvent);
314
+ }
315
+ }
316
+ isDescendant(parent, child) {
317
+ let node = child;
318
+ while (node !== null) {
319
+ if (node === parent) {
320
+ return true;
321
+ }
322
+ else {
323
+ node = node.parentNode;
324
+ }
325
+ }
326
+ return false;
327
+ }
328
+ }
329
+ ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
330
+ ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ClickOutsideDirective, selector: "[sfcClickOutside]", inputs: { listening: ["sfcClickOutside", "listening"] }, outputs: { action: "action" }, ngImport: i0 });
331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ClickOutsideDirective, decorators: [{
332
+ type: Directive,
333
+ args: [{
334
+ selector: '[sfcClickOutside]'
335
+ }]
336
+ }], ctorParameters: function () {
337
+ return [{ type: i0.ElementRef }, { type: Document, decorators: [{
338
+ type: Inject,
339
+ args: [DOCUMENT]
340
+ }] }];
341
+ }, propDecorators: { listening: [{
342
+ type: Input,
343
+ args: ['sfcClickOutside']
344
+ }], action: [{
345
+ type: Output
346
+ }] } });
347
+
348
+ class CommonConstants {
349
+ }
350
+ CommonConstants.NOT_FOUND_INDEX = -1;
351
+ CommonConstants.EMPTY_STRING = '';
352
+ CommonConstants.MOUSE_BUTTON_LEFT = 0;
353
+ CommonConstants.FULL_PERCENTAGE = 100;
354
+ CommonConstants.COMMON_TEXT_DELIMETER = '/';
355
+ CommonConstants.PERCENTAGE_SYMBOL = '%';
356
+
357
+ class DateTimeConstants {
358
+ }
359
+ DateTimeConstants.DAYS_IN_WEEK = 7;
360
+ DateTimeConstants.HOURS_IN_SHORT_TIME = 12;
361
+ DateTimeConstants.HOURS_IN_TIME = 24;
362
+ DateTimeConstants.MIDNIGHT_HOUR = 0;
363
+ DateTimeConstants.MINUTES_IN_HOUR = 60;
364
+ DateTimeConstants.DAYS_OF_WEEK = ["S", "M", "T", "W", "T", "F", "S"];
365
+ DateTimeConstants.DAYS_OF_WEEK_3 = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
366
+
367
+ class UIConstants {
368
+ }
369
+ UIConstants.CSS_PIXELS = 'px';
370
+ UIConstants.CSS_PERCENTAGE = '%';
371
+ UIConstants.CSS_DEGREES = 'deg';
372
+ UIConstants.CSS_EM = 'em';
373
+ UIConstants.CSS_CH = 'ch';
374
+ UIConstants.CSS_INITIAL = 'initial';
375
+ UIConstants.CSS_INHERIT = 'inherit';
376
+ UIConstants.CSS_NONE = 'none';
377
+ UIConstants.CSS_VISIBILITY_VISIBLE = 'visible';
378
+ UIConstants.CSS_VISIBILITY_HIDDEN = 'hidden';
379
+ UIConstants.CSS_WIDTH = 'width';
380
+ UIConstants.CSS_LEFT = 'left';
381
+ UIConstants.CSS_RIGHT = 'right';
382
+ UIConstants.CSS_START = 'start';
383
+ UIConstants.CSS_END = 'end';
384
+ UIConstants.CSS_CENTER = 'center';
385
+ UIConstants.CSS_CLASS_FIXED = 'fixed';
386
+ UIConstants.CSS_CLASS_BACKGROUND = 'background';
387
+ UIConstants.CSS_CLASS_TOP = 'top';
388
+ UIConstants.RGB_OPACITY_PLACEHOLDER = '{opacity}';
389
+
390
+ class ShowHideElementDirective {
391
+ constructor(el) {
392
+ this.el = el;
393
+ this.SHOW_HIDE_TRANSITION_DELAY_DEFAULT = 0.5;
394
+ this.style.transition = this.getTransitionValue();
395
+ }
396
+ set showHideElement(show) {
397
+ this.style.visibility = show
398
+ ? UIConstants.CSS_VISIBILITY_VISIBLE
399
+ : UIConstants.CSS_VISIBILITY_HIDDEN;
400
+ this.style.opacity = show ? 1 : 0;
401
+ }
402
+ set delay(value) {
403
+ this.style.transition = this.getTransitionValue(value);
404
+ }
405
+ ;
406
+ get style() {
407
+ return this.el.nativeElement.style;
408
+ }
409
+ getTransitionValue(delay = this.SHOW_HIDE_TRANSITION_DELAY_DEFAULT) {
410
+ return `visibility ${delay}s,
411
+ opacity ${delay}s
412
+ linear`;
413
+ }
414
+ }
415
+ ShowHideElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShowHideElementDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
416
+ ShowHideElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: { showHideElement: ["sfcShowHideElement", "showHideElement"], delay: "delay" }, ngImport: i0 });
417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShowHideElementDirective, decorators: [{
418
+ type: Directive,
419
+ args: [{
420
+ selector: '[sfcShowHideElement]'
421
+ }]
422
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { showHideElement: [{
423
+ type: Input,
424
+ args: ['sfcShowHideElement']
425
+ }], delay: [{
426
+ type: Input
427
+ }] } });
428
+
429
+ class IfDirective {
430
+ constructor(el) {
431
+ this.el = el;
432
+ this.display = this.style.display;
433
+ }
434
+ set sfcIf(show) {
435
+ this.style.display = show
436
+ ? this.display || UIConstants.CSS_INITIAL
437
+ : UIConstants.CSS_NONE;
438
+ }
439
+ get style() { return this.el.nativeElement.style; }
440
+ }
441
+ IfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IfDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
442
+ IfDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: IfDirective, selector: "[sfcIf]", inputs: { sfcIf: "sfcIf" }, ngImport: i0 });
443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IfDirective, decorators: [{
444
+ type: Directive,
445
+ args: [{
446
+ selector: '[sfcIf]'
447
+ }]
448
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { sfcIf: [{
449
+ type: Input
450
+ }] } });
451
+
452
+ /**
453
+ * Set minutes for date
454
+ * @param date Date value
455
+ * @param minute Minute value
456
+ * @returns Date with minute value
457
+ */
458
+ function setMinutes(date, minute) {
459
+ const result = new Date(date);
460
+ result.setMinutes(minute);
461
+ return result;
462
+ }
463
+ /**
464
+ * Set hours for date
465
+ * @param date Date value
466
+ * @param hour Hour value
467
+ * @returns Date with hour value
468
+ */
469
+ function setHours(date, hour) {
470
+ const result = new Date(date);
471
+ result.setHours(hour);
472
+ return result;
473
+ }
474
+ /**
475
+ * Set day for date value
476
+ * @param date Date value
477
+ * @param dayNumber Day number
478
+ * @returns Date with day number
479
+ */
480
+ function setDay(date, dayNumber) {
481
+ const nextDate = new Date(date);
482
+ nextDate.setDate(dayNumber);
483
+ return nextDate;
484
+ }
485
+ /**
486
+ * Set year for date
487
+ * @param date Date value
488
+ * @param year Year value
489
+ * @returns Date with year value
490
+ */
491
+ function setYear(date, year) {
492
+ const result = new Date(date);
493
+ result.setFullYear(year);
494
+ return result;
495
+ }
496
+ /**
497
+ * Set seconds for date
498
+ * @param date Date value
499
+ * @param value Seconds value
500
+ * @returns Date with minute value
501
+ */
502
+ function setSeconds(date, value) {
503
+ const result = new Date(date);
504
+ result.setSeconds(value);
505
+ return result;
506
+ }
507
+ /**
508
+ * Set milliseconds for date
509
+ * @param date Date value
510
+ * @param value Milliseconds value
511
+ * @returns Date with minute value
512
+ */
513
+ function setMilliseconds(date, value) {
514
+ const result = new Date(date);
515
+ result.setMilliseconds(value);
516
+ return result;
517
+ }
518
+ /**
519
+ * Set 0 for seconds and milliseconds of date
520
+ * @param date Date value
521
+ * @returns Date with minute value
522
+ */
523
+ function setDefaultSecondsAndMiliseconds(date) {
524
+ const result = new Date(date);
525
+ result.setSeconds(0);
526
+ result.setMilliseconds(0);
527
+ return result;
528
+ }
529
+ /**
530
+ * Get next date
531
+ * @param date Date value
532
+ * @returns Next date
533
+ */
534
+ function getNextDate(date) {
535
+ const nextDate = new Date(date);
536
+ nextDate.setDate(date.getDate() + 1);
537
+ return nextDate;
538
+ }
539
+ /**
540
+ * Get next month as date
541
+ * @param date Date value
542
+ * @returns Next month as date
543
+ */
544
+ function getNextMonth(date) {
545
+ const nextMonth = new Date(date);
546
+ nextMonth.setMonth(date.getMonth() + 1);
547
+ return nextMonth;
548
+ }
549
+ /**
550
+ * Get previous month as date
551
+ * @param date Date value
552
+ * @returns Previous month as date
553
+ */
554
+ function getPreviousMonth(date) {
555
+ const prevMonth = new Date(date);
556
+ prevMonth.setMonth(date.getMonth() - 1);
557
+ return prevMonth;
558
+ }
559
+ /**
560
+ * Get next year as date
561
+ * @param date Date value
562
+ * @returns Next year as date
563
+ */
564
+ function getNextYear(date) {
565
+ const nextYear = new Date(date);
566
+ nextYear.setFullYear(date.getFullYear() + 1);
567
+ return nextYear;
568
+ }
569
+ /**
570
+ * Get previous year as date
571
+ * @param date Date value
572
+ * @returns Previous year as date
573
+ */
574
+ function getPreviousYear(date) {
575
+ const prevYear = new Date(date);
576
+ prevYear.setFullYear(date.getFullYear() - 1);
577
+ return prevYear;
578
+ }
579
+ /**
580
+ * Return first day of month as date from date value
581
+ * @param date Date value
582
+ * @returns First day of month as date
583
+ */
584
+ function getFirstDayOfMonth(date) {
585
+ if (isDefined(date) && date instanceof Date) {
586
+ const year = date.getFullYear(), month = date.getMonth();
587
+ return new Date(year, month, 1);
588
+ }
589
+ return date;
590
+ }
591
+ /**
592
+ * Return last day of month as date from date value
593
+ * @param date Date value
594
+ * @returns Last day of month as date
595
+ */
596
+ function getLastDayOfMonth(date) {
597
+ if (isDefined(date) && date instanceof Date) {
598
+ const year = date.getFullYear(), month = date.getMonth();
599
+ return new Date(year, month + 1, 0);
600
+ }
601
+ return date;
602
+ }
603
+ /**
604
+ * Return first day of year as date from date value
605
+ * @param date Date value
606
+ * @returns First day of year as date
607
+ */
608
+ function getFirstDayOfYear(date) {
609
+ if (isDefined(date) && date instanceof Date) {
610
+ return new Date(date.getFullYear(), 0, 1);
611
+ }
612
+ return date;
613
+ }
614
+ /**
615
+ * Return last day of year as date from date value
616
+ * @param date Date value
617
+ * @returns Last day of year as date
618
+ */
619
+ function getLastDayOfYear(date) {
620
+ if (isDefined(date) && date instanceof Date) {
621
+ return new Date(date.getFullYear(), 12, 0);
622
+ }
623
+ return date;
624
+ }
625
+ /**
626
+ * Return first day of month as date
627
+ * @param year Year value
628
+ * @param month Month value
629
+ * @returns First day of month
630
+ */
631
+ function getFirstDayOfMonthByYearAndMonth(year, month) {
632
+ return new Date(year, month, 1);
633
+ }
634
+ /**
635
+ * Return last day of month as date
636
+ * @param year Year value
637
+ * @param month Month value
638
+ * @returns Last day of month
639
+ */
640
+ function getLastDayOfMonthByYearAndMonth(year, month) {
641
+ return new Date(year, month + 1, 0);
642
+ }
643
+ /**
644
+ * Return week number in month from date value
645
+ * @param date Date value
646
+ * @returns Week number
647
+ */
648
+ function getWeeksNumberInMonth(date) {
649
+ const firstOfMonth = getFirstDayOfMonth(date), lastOfMonth = getLastDayOfMonth(date), used = firstOfMonth.getDay() + lastOfMonth.getDate();
650
+ return Math.ceil(used / DateTimeConstants.DAYS_IN_WEEK);
651
+ }
652
+ /**
653
+ * Return true if first and second date are equal
654
+ * @param date1 First date value
655
+ * @param date2 Second date value
656
+ * @returns True if first and second date are equal
657
+ */
658
+ function isEqualDates(date1, date2) {
659
+ const date1Value = new Date(date1), date2Value = new Date(date2);
660
+ date1Value.setHours(0, 0, 0, 0);
661
+ date2Value.setHours(0, 0, 0, 0);
662
+ return date1Value.getTime() === date2Value.getTime();
663
+ }
664
+ /**
665
+ * Return true if first and second datetime are equal
666
+ * @param date1 First datetime value
667
+ * @param date2 Second datetime value
668
+ * @returns True if first and second datetime are equal
669
+ */
670
+ function isEqualDateTimes(date1, date2) {
671
+ const date1Value = new Date(date1), date2Value = new Date(date2);
672
+ return date1Value.getTime() === date2Value.getTime();
673
+ }
674
+ /**
675
+ * Return true if first date greater than second date
676
+ * @param date1 First date value
677
+ * @param date2 Second date value
678
+ * @returns True if first date greater than second date
679
+ */
680
+ function isDateGreat(date1, date2) {
681
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate())
682
+ > new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
683
+ }
684
+ /**
685
+ * Return true if first date greater or equal to second date
686
+ * @param date1 First date value
687
+ * @param date2 Second date value
688
+ * @returns True if first date greater or equal to second date
689
+ */
690
+ function isDateGreatOrEqual(date1, date2) {
691
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate())
692
+ >= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
693
+ }
694
+ /**
695
+ * Return true if first date time greater than second date time
696
+ * @param date1 First date time value
697
+ * @param date2 Second date time value
698
+ * @returns True if first date time greater than second date time
699
+ */
700
+ function isDateTimeGreat(date1, date2) {
701
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
702
+ > new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
703
+ }
704
+ /**
705
+ * Return true if first date time greater or equal to second date time
706
+ * @param date1 First date time value
707
+ * @param date2 Second date time value
708
+ * @returns True if first date time greater or equal to second date time
709
+ */
710
+ function isDateTimeGreatOrEqual(date1, date2) {
711
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
712
+ >= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
713
+ }
714
+
715
+ /**
716
+ * Return true if value defined
717
+ * @param value Value to check
718
+ * @returns True if value is not null and defined
719
+ */
720
+ function isDefined(value) {
721
+ return value !== undefined && value !== null;
722
+ }
723
+ /**
724
+ * Return true if value is object
725
+ * @param value Value to check
726
+ * @returns True if value is object
727
+ */
728
+ function isObject(value) {
729
+ return (isDefined(value) && typeof value === 'object'
730
+ && !Array.isArray(value)
731
+ && !(value instanceof Date || value instanceof File));
732
+ }
733
+ /**
734
+ * Return true if data is observable
735
+ * @param data Object to check
736
+ * @returns True if data is observable
737
+ */
738
+ function isAsyncData(data) {
739
+ return data instanceof Observable;
740
+ }
741
+ /**
742
+ * Return extended object with new property
743
+ * @param obj Object to extend by property
744
+ * @param property New property name
745
+ * @param value Value for new property
746
+ * @returns Extended object with new property
747
+ */
748
+ function addPropertyToObject(obj, property, value = null) {
749
+ if (isDefined(property) && !obj.hasOwnProperty(property)) {
750
+ let newObj = {};
751
+ newObj[property] = value;
752
+ obj = Object.assign(Object.assign({}, obj), newObj);
753
+ }
754
+ return obj;
755
+ }
756
+ /**
757
+ * Remove property from object
758
+ * @param obj Object for removing property
759
+ * @param property Property name to remove
760
+ */
761
+ function removePropertyFromObject(obj, property) {
762
+ if (obj.hasOwnProperty(property)) {
763
+ delete obj[property];
764
+ }
765
+ }
766
+ /**
767
+ * Deep merge object with others
768
+ * @param target Object to merge
769
+ * @param sources
770
+ */
771
+ /**
772
+ * Deep merge object with others
773
+ * @param target Object to merge
774
+ * @param sources Objects to be merged with target
775
+ * @returns Merged object
776
+ */
777
+ function mergeDeep(target, ...sources) {
778
+ if (!sources.length)
779
+ return target;
780
+ const source = sources.shift();
781
+ if (isObject(target) && isObject(source)) {
782
+ for (const key in source) {
783
+ if (isObject(source[key])) {
784
+ if (!target[key])
785
+ Object.assign(target, { [key]: {} });
786
+ mergeDeep(target[key], source[key]);
787
+ }
788
+ else {
789
+ Object.assign(target, { [key]: source[key] });
790
+ }
791
+ }
792
+ }
793
+ return mergeDeep(target, ...sources);
794
+ }
795
+ /**
796
+ * Get type's property name safety
797
+ * @param name KeyOf property
798
+ * @returns Type's property name
799
+ */
800
+ const nameof = (name) => name;
801
+ /**
802
+ * Determines if the input is a Number or something that can be coerced to a Number
803
+ * @param - The input to be tested
804
+ * @returns - An indication if the input is a Number or can be coerced to a Number
805
+ */
806
+ function isNumeric(number) {
807
+ return !isNaN(parseFloat(number));
808
+ }
809
+ /**
810
+ * Return true if current browser is Chrome
811
+ * @returns If current browser is Chrome
812
+ */
813
+ function isChromeBrowser() {
814
+ return /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
815
+ }
816
+ /**
817
+ * Return true if value is valid email address
818
+ * @returns True if it's valid email address
819
+ */
820
+ function isEmail(value) {
821
+ return isDefined(value.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/));
822
+ }
823
+ /**
824
+ * Return true if string is "true"
825
+ * @returns parsed string as boolean
826
+ */
827
+ function parseBoolean(value) {
828
+ return /^true$/i.test(value);
829
+ }
830
+ /**
831
+ * Return true if values equal
832
+ * @param obj1 First value to compare
833
+ * @param obj2 Second value to compare
834
+ * @returns True if equal
835
+ */
836
+ function isEqual(obj1, obj2) {
837
+ /**
838
+ * More accurately check the type of a JavaScript object
839
+ * @param {Object} obj The object
840
+ * @return {String} The object type
841
+ */
842
+ function getType(obj) {
843
+ return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
844
+ }
845
+ function areArraysEqual() {
846
+ // Check length
847
+ if (obj1.length !== obj2.length)
848
+ return false;
849
+ // Check each item in the array
850
+ for (let i = 0; i < obj1.length; i++) {
851
+ if (!isEqual(obj1[i], obj2[i]))
852
+ return false;
853
+ }
854
+ // If no errors, return true
855
+ return true;
856
+ }
857
+ function areObjectsEqual() {
858
+ if (Object.keys(obj1).length !== Object.keys(obj2).length)
859
+ return false;
860
+ // Check each item in the object
861
+ for (let key in obj1) {
862
+ if (Object.prototype.hasOwnProperty.call(obj1, key)) {
863
+ if (!isEqual(obj1[key], obj2[key])) {
864
+ return false;
865
+ }
866
+ }
867
+ }
868
+ // If no errors, return true
869
+ return true;
870
+ }
871
+ function areFunctionsEqual() {
872
+ return obj1.toString() === obj2.toString();
873
+ }
874
+ function arePrimativesEqual() {
875
+ return obj1 === obj2;
876
+ }
877
+ function areDatesEqual() {
878
+ return isEqualDateTimes(obj1, obj2);
879
+ }
880
+ // Get the object type
881
+ let type = getType(obj1);
882
+ // If the two items are not the same type, return false
883
+ if (type !== getType(obj2))
884
+ return false;
885
+ // Compare based on type
886
+ if (type === 'array')
887
+ return areArraysEqual();
888
+ if (type === 'date')
889
+ return areDatesEqual();
890
+ if (type === 'object')
891
+ return areObjectsEqual();
892
+ if (type === 'function')
893
+ return areFunctionsEqual();
894
+ return arePrimativesEqual();
895
+ }
896
+
897
+ /**
898
+ * Return true if string has value(not empty string)
899
+ * @param value String value to check
900
+ * @returns True if string is not null and defined(not empty string)
901
+ */
902
+ function isNullOrEmptyString(value) {
903
+ return !isDefined(value) || value === CommonConstants.EMPTY_STRING;
904
+ }
905
+ /**
906
+ * Return true if value contains includeValue
907
+ * @param value String value to check
908
+ * @param includeValue Value to check if it include
909
+ * @returns True if value contains includeValue
910
+ */
911
+ function contains(value, includeValue) {
912
+ return !isNullOrEmptyString(value) && !isNullOrEmptyString(includeValue)
913
+ ? value.toLowerCase()
914
+ .includes(includeValue.toLowerCase())
915
+ : false;
916
+ }
917
+ /**
918
+ * Return trimed value
919
+ * @param value Value for trim modification
920
+ * @returns Trimed value
921
+ */
922
+ function trim(value) {
923
+ return isNullOrEmptyString(value) ? value : value.replace(/\s/g, '');
924
+ }
925
+
926
+ /**
927
+ * Return parsed file size as string
928
+ * @param bytes Bytes count
929
+ * @param decimals Value after dot
930
+ * @returns Parsed file size
931
+ */
932
+ function parseFileSize(bytes, decimals = 2) {
933
+ if (bytes === 0)
934
+ return '0';
935
+ const k = 1024;
936
+ const dm = decimals < 0 ? 0 : decimals;
937
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
938
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
939
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
940
+ }
941
+ /**
942
+ * Return file extension
943
+ * @param file File value
944
+ * @returns File extension
945
+ */
946
+ function getFileExtension(file) {
947
+ if (!isDefined(file))
948
+ return CommonConstants.EMPTY_STRING;
949
+ if (file.name.indexOf('.') === CommonConstants.NOT_FOUND_INDEX) {
950
+ return CommonConstants.EMPTY_STRING;
951
+ }
952
+ return file.name.split('.').pop();
953
+ }
954
+ /**
955
+ * Read file as data URL
956
+ * @param file File value
957
+ * @param onLoad On load action
958
+ */
959
+ function readAsDataURL(file, onLoad) {
960
+ if (isDefined(file)) {
961
+ const reader = new FileReader();
962
+ reader.onload = () => onLoad(reader.result);
963
+ reader.readAsDataURL(file);
964
+ }
965
+ else
966
+ throw new Error('File utils | Read as data URL function --> File is empty.');
967
+ }
968
+ /**
969
+ * Return true if file is image
970
+ * @param file File value
971
+ * @returns True if file is image
972
+ */
973
+ function isImage(file) {
974
+ return isDefined(file) && (/\.(gif|jpe?g|jpg|tiff|png|webp|bmp)$/i).test(file.name);
975
+ }
976
+
977
+ /**
978
+ * Return CSS like value
979
+ * @param value Value as number
980
+ * @returns Value as '1px'
981
+ */
982
+ function getCssLikeValue(value, type = UIConstants.CSS_PIXELS) {
983
+ return value + type;
984
+ }
985
+ /**
986
+ * Parse CSS like value to number
987
+ * @param value CSS like value
988
+ * @returns Number value
989
+ */
990
+ function getValueFromCssLikeValue(value, type = UIConstants.CSS_PIXELS) {
991
+ return +value.replace(type, CommonConstants.EMPTY_STRING);
992
+ }
993
+ /**
994
+ * Return CCS like calc value
995
+ * @param value All value (100% by default)
996
+ * @param part Part value
997
+ * @returns Calc value
998
+ */
999
+ function getCalcValue(part, value = 100) {
1000
+ return `calc(${value}${UIConstants.CSS_PERCENTAGE} / ${part} )`;
1001
+ }
1002
+ /**
1003
+ * Return CCS like rotate value
1004
+ * @param value value as degrees
1005
+ * @returns Rotate value
1006
+ */
1007
+ function getRotateValue(value) {
1008
+ return `rotate(${value}deg)`;
1009
+ }
1010
+ /**
1011
+ * Add classes to HTML element
1012
+ * @param element HTML element
1013
+ * @param classNames Array of CSS classes
1014
+ */
1015
+ function addClasses(element, ...classNames) {
1016
+ if (isDefined(element)) {
1017
+ classNames.forEach((className) => element.classList.add(className));
1018
+ }
1019
+ }
1020
+ /**
1021
+ * Remove classes to HTML element
1022
+ * @param element HTML element
1023
+ * @param classNames Array of CSS classes
1024
+ */
1025
+ function removeClasses(element, ...classNames) {
1026
+ if (isDefined(element)) {
1027
+ classNames.forEach((className) => element.classList.remove(className));
1028
+ }
1029
+ }
1030
+ /**
1031
+ * Convert RGB color to HEX
1032
+ * @param r Red
1033
+ * @param g Green
1034
+ * @param b Blue
1035
+ * @returns HEX value
1036
+ */
1037
+ function rgbToHex(r, g, b) {
1038
+ return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
1039
+ }
1040
+ /**
1041
+ * Convert HEX to RGB value
1042
+ * @param hex HEX value
1043
+ * @returns RGB value
1044
+ */
1045
+ function hexToRgb(hex) {
1046
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
1047
+ if (result) {
1048
+ var r = parseInt(result[1], 16);
1049
+ var g = parseInt(result[2], 16);
1050
+ var b = parseInt(result[3], 16);
1051
+ return `rgb(${r}, ${g}, ${b})`;
1052
+ }
1053
+ return null;
1054
+ }
1055
+ /**
1056
+ * Set opacity for RGB value
1057
+ * @param rgb Rgb value with {opacity} placeholder
1058
+ * @param opacity Opacity value
1059
+ * @returns RGB value with relevant opacity
1060
+ */
1061
+ function replaceRgbOpacity(rgb, opacity) {
1062
+ return rgb.replace(UIConstants.RGB_OPACITY_PLACEHOLDER, opacity.toString());
1063
+ }
1064
+
1065
+ /**
1066
+ * Return true if collection not empty
1067
+ * @param collection Array of items
1068
+ * @returns True if collection not empty
1069
+ */
1070
+ function any(collection) {
1071
+ return isDefined(collection) && collection.length > 0;
1072
+ }
1073
+ /**
1074
+ * Return true if collection has such value
1075
+ * @param collection Array of items
1076
+ * @param value Value to check
1077
+ * @returns True if found value in collection
1078
+ */
1079
+ function hasItem(collection, value) {
1080
+ return any(collection)
1081
+ && collection.findIndex(item => item === value) !== CommonConstants.NOT_FOUND_INDEX;
1082
+ }
1083
+ /**
1084
+ * Return true if collection has such value by predicate function
1085
+ * @param collection Array of items
1086
+ * @param predicate Function to define check logic
1087
+ * @returns True if found value in collection
1088
+ */
1089
+ function hasItemBy(collection, predicate) {
1090
+ return any(collection) && collection.findIndex(predicate) !== CommonConstants.NOT_FOUND_INDEX;
1091
+ }
1092
+ /**
1093
+ * Return true if collection of objects has such value as object
1094
+ * @param collection Array of objects
1095
+ * @param property Property name
1096
+ * @param value Value to check
1097
+ * @returns True if found value in collection
1098
+ */
1099
+ function hasObjectItem(collection, // TODO <-- Array<T>
1100
+ property, value) {
1101
+ return any(collection)
1102
+ && collection.findIndex(item => item.hasOwnProperty(property)
1103
+ && item[property] === value) !== CommonConstants.NOT_FOUND_INDEX;
1104
+ }
1105
+ /**
1106
+ * Return value from collection by predicate function
1107
+ * @param collection Array of items
1108
+ * @param predicate Function to define search logic
1109
+ * @returns Value from collection
1110
+ */
1111
+ function firstOrDefault(collection, predicate) {
1112
+ return any(collection) ? collection === null || collection === void 0 ? void 0 : collection.find(predicate) : undefined;
1113
+ }
1114
+ /**
1115
+ * Return first item from collection
1116
+ * @param collection Array of items
1117
+ * @returns First value from collection
1118
+ */
1119
+ function firstItem(collection) {
1120
+ return any(collection) ? collection[0] : null;
1121
+ }
1122
+ /**
1123
+ * Return last item from collection
1124
+ * @param collection Array of items
1125
+ * @returns Last value from collection
1126
+ */
1127
+ function lastItem(collection) {
1128
+ return any(collection) ? collection[collection.length - 1] : null;
1129
+ }
1130
+ /**
1131
+ * Return True if all values match predicate function
1132
+ * @param collection Array of objects
1133
+ * @param predicate Function to define check logic
1134
+ * @returns True if all values match predicate
1135
+ */
1136
+ function all(collection, predicate) {
1137
+ return any(collection) ? collection.filter(predicate).length == collection.length : false;
1138
+ }
1139
+ /**
1140
+ * Return count by predicate
1141
+ * @param collection Array of objects
1142
+ * @param predicate Function to define check logic
1143
+ * @returns Items count
1144
+ */
1145
+ function count(collection, predicate) {
1146
+ return collection.filter(predicate).length;
1147
+ }
1148
+ /**
1149
+ * Return items from collection by predicate function
1150
+ * @param collection Array of items
1151
+ * @param predicate Function to define search logic
1152
+ * @returns Values from collection
1153
+ */
1154
+ function where(collection, predicate) {
1155
+ return any(collection) ? collection.filter(predicate) : null;
1156
+ }
1157
+ /**
1158
+ * Return sliced collection by page number and page size
1159
+ * @param collection Array of items
1160
+ * @param page Page number
1161
+ * @param size Page size
1162
+ * @returns Sliced collection
1163
+ */
1164
+ function skip(collection, page, size) {
1165
+ if (any(collection)) {
1166
+ let start = (page - 1) * size;
1167
+ return collection.slice(start, start + size);
1168
+ }
1169
+ return collection;
1170
+ }
1171
+ function sort(collection, direction = SortingDirection.Ascending) {
1172
+ if (any(collection)) {
1173
+ return direction == SortingDirection.Ascending
1174
+ ? collection.sort((a, b) => a - b)
1175
+ : collection.sort((a, b) => b - a);
1176
+ }
1177
+ return collection;
1178
+ }
1179
+ /**
1180
+ * Return sorted collection of objects by property
1181
+ * @param collection Array of items
1182
+ * @param property Property name
1183
+ * @param direction Sorting direction
1184
+ * @returns Sorted collection
1185
+ */
1186
+ function sortBy(collection, property, direction) {
1187
+ if (any(collection)) {
1188
+ let _sortFunc = (a, b) => (t1, t2) => (a[property] > b[property] ? t1 : t2);
1189
+ return direction == SortingDirection.Ascending
1190
+ ? collection.sort((a, b) => _sortFunc(a, b)(1, -1))
1191
+ : collection.sort((a, b) => _sortFunc(a, b)(-1, 1));
1192
+ }
1193
+ return collection;
1194
+ }
1195
+ /**
1196
+ * Return sorted collection of objects by path
1197
+ * @param collection Array of items
1198
+ * @param path Path to property
1199
+ * @param direction Sorting direction
1200
+ * @returns Sorted collection
1201
+ */
1202
+ function sortByPath(collection, path, direction) {
1203
+ if (any(collection)) {
1204
+ if (isNullOrEmptyString(path))
1205
+ throw new Error('Collection utils | Sort By Path function --> Path is empty.');
1206
+ const pathParts = path.split('.');
1207
+ if (!any(pathParts))
1208
+ throw new Error('Collection utils | Sort By Path function --> Path is incorrect.');
1209
+ const partsLength = pathParts.length;
1210
+ collection.sort((a, b) => {
1211
+ var i = 0;
1212
+ while (i < partsLength) {
1213
+ a = a[pathParts[i]];
1214
+ b = b[pathParts[i]];
1215
+ i++;
1216
+ }
1217
+ return direction == SortingDirection.Ascending
1218
+ ? a >= b ? 1 : -1
1219
+ : a > b ? -1 : 1;
1220
+ });
1221
+ return collection;
1222
+ }
1223
+ return collection;
1224
+ }
1225
+ /**
1226
+ * Return collection without matches
1227
+ * @param collection Array of items
1228
+ * @returns Collection without matches
1229
+ */
1230
+ function distinct(collection) {
1231
+ return any(collection)
1232
+ ? collection.filter((value, index, self) => self.indexOf(value) === index)
1233
+ : collection;
1234
+ }
1235
+ /**
1236
+ * Return sum value from collection items by map function
1237
+ * @param collection Array of items
1238
+ * @param select Map function
1239
+ * @returns Sum value of colection items
1240
+ */
1241
+ function sum(collection, select) {
1242
+ return any(collection)
1243
+ ? collection
1244
+ .map(select)
1245
+ .reduce((a, b) => { return a + b; }, 0)
1246
+ : 0;
1247
+ }
1248
+ /**
1249
+ * Return max value from collection items by map function
1250
+ * @param collection Array of items
1251
+ * @param select Map function
1252
+ * @returns Max value of collection items
1253
+ */
1254
+ function max(collection, select) {
1255
+ if (any(collection))
1256
+ return Math.max(...collection.map(select));
1257
+ throw new Error('Collection utils | Max function --> Collection is empty.');
1258
+ }
1259
+ /**
1260
+ * Delete items from collection by predicate
1261
+ * @param collection Array of items
1262
+ * @param predicate Function to define remove logic
1263
+ */
1264
+ function remove(collection, predicate) {
1265
+ var i = collection.length;
1266
+ while (i--) {
1267
+ if (predicate(collection[i])) {
1268
+ collection.splice(i, 1);
1269
+ }
1270
+ }
1271
+ }
1272
+ /**
1273
+ * Add item to collection
1274
+ * @param collection Array of items
1275
+ * @param item New item
1276
+ * @param predicate Function to define if allowed to add new item
1277
+ * @returns True if successfully added
1278
+ */
1279
+ function addItem(collection, item, predicate) {
1280
+ if (!isDefined(collection))
1281
+ collection = new Array();
1282
+ if (isDefined(predicate) && predicate(item))
1283
+ return false;
1284
+ collection.push(item);
1285
+ return true;
1286
+ }
1287
+ /**
1288
+ * Delete item from collection
1289
+ * @param collection Array of items
1290
+ * @param item Item to delete
1291
+ * @returns True if successfully removed
1292
+ */
1293
+ function removeItem(collection, item) {
1294
+ if (isDefined(item) && hasItem(collection, item)) {
1295
+ collection.splice(collection.indexOf(item), 1);
1296
+ return true;
1297
+ }
1298
+ return false;
1299
+ }
1300
+ /**
1301
+ * Delete item from collection by predicate
1302
+ * @param collection Array of items
1303
+ * @param predicate Function to define remove logic
1304
+ * @returns True if successfully removed
1305
+ */
1306
+ function removeItemBy(collection, predicate) {
1307
+ const foundItem = firstOrDefault(collection, predicate);
1308
+ if (isDefined(foundItem)) {
1309
+ collection.splice(collection.indexOf(foundItem), 1);
1310
+ return true;
1311
+ }
1312
+ return false;
1313
+ }
1314
+ /**
1315
+ * Update item in collection by predicate
1316
+ * @param collection Array of items
1317
+ * @param predicate Function to define item for deleting
1318
+ * @returns True if successfully removed
1319
+ */
1320
+ function updateItemBy(collection, predicate, newItem) {
1321
+ const itemIndex = collection.findIndex(predicate);
1322
+ if (itemIndex !== CommonConstants.NOT_FOUND_INDEX) {
1323
+ const result = collection.slice(0);
1324
+ result[itemIndex] = Object.assign(Object.assign({}, collection[itemIndex]), newItem);
1325
+ return result;
1326
+ }
1327
+ return null;
1328
+ }
1329
+ /**
1330
+ * Return collection or empty if collection is not defined
1331
+ * @param collection Array of items
1332
+ * @returns Collection or empty
1333
+ */
1334
+ function getCollectionOrEmpty(collection) {
1335
+ return isDefined(collection) ? collection : [];
1336
+ }
1337
+
1338
+ class ThrowElementOnHoverDirective {
1339
+ constructor(el) {
1340
+ this.el = el;
1341
+ }
1342
+ onMouseEnter() {
1343
+ this.throw(this.throwValue);
1344
+ }
1345
+ onMouseLeave() {
1346
+ this.throw(null);
1347
+ }
1348
+ get style() {
1349
+ return this.el.nativeElement.style;
1350
+ }
1351
+ throw(value) {
1352
+ this.style.transform = value ? `translateY(${getCssLikeValue(value)})` : null;
1353
+ }
1354
+ }
1355
+ ThrowElementOnHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThrowElementOnHoverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1356
+ ThrowElementOnHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ThrowElementOnHoverDirective, selector: "[sfcThrowElementOnHover]", inputs: { throwValue: ["sfcThrowElementOnHover", "throwValue"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 });
1357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThrowElementOnHoverDirective, decorators: [{
1358
+ type: Directive,
1359
+ args: [{
1360
+ selector: '[sfcThrowElementOnHover]'
1361
+ }]
1362
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { throwValue: [{
1363
+ type: Input,
1364
+ args: ['sfcThrowElementOnHover']
1365
+ }], onMouseEnter: [{
1366
+ type: HostListener,
1367
+ args: ['mouseenter']
1368
+ }], onMouseLeave: [{
1369
+ type: HostListener,
1370
+ args: ['mouseleave']
1371
+ }] } });
1372
+
1373
+ class TemplateReferenceDirective {
1374
+ constructor(template) {
1375
+ this.template = template;
1376
+ this.templateName = CommonConstants.EMPTY_STRING;
1377
+ }
1378
+ }
1379
+ TemplateReferenceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TemplateReferenceDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1380
+ TemplateReferenceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: TemplateReferenceDirective, selector: "[sfcTemplateReference]", inputs: { templateName: ["sfcTemplateReference", "templateName"], data: "data" }, ngImport: i0 });
1381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TemplateReferenceDirective, decorators: [{
1382
+ type: Directive,
1383
+ args: [{
1384
+ selector: '[sfcTemplateReference]'
1385
+ }]
1386
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { templateName: [{
1387
+ type: Input,
1388
+ args: ['sfcTemplateReference']
1389
+ }], data: [{
1390
+ type: Input
1391
+ }] } });
1392
+
1393
+ class MouseDownDirective {
1394
+ constructor() {
1395
+ /**
1396
+ * Allowed mouse button
1397
+ */
1398
+ this.button = CommonConstants.MOUSE_BUTTON_LEFT;
1399
+ this.action = new EventEmitter();
1400
+ }
1401
+ onMouseDown($event) {
1402
+ if ($event.button === this.button) {
1403
+ this.action.emit($event);
1404
+ }
1405
+ else {
1406
+ $event.preventDefault();
1407
+ }
1408
+ }
1409
+ }
1410
+ MouseDownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MouseDownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1411
+ MouseDownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: MouseDownDirective, selector: "[sfcMouseDown]", inputs: { button: "button" }, outputs: { action: "sfcMouseDown" }, host: { listeners: { "mousedown": "onMouseDown($event)" } }, ngImport: i0 });
1412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MouseDownDirective, decorators: [{
1413
+ type: Directive,
1414
+ args: [{
1415
+ selector: '[sfcMouseDown]'
1416
+ }]
1417
+ }], propDecorators: { button: [{
1418
+ type: Input
1419
+ }], action: [{
1420
+ type: Output,
1421
+ args: ['sfcMouseDown']
1422
+ }], onMouseDown: [{
1423
+ type: HostListener,
1424
+ args: ['mousedown', ['$event']]
1425
+ }] } });
1426
+
1427
+ class ComponentSizeDirective {
1428
+ constructor(el) {
1429
+ this.el = el;
1430
+ this._customSize = null;
1431
+ this.style.fontSize = getCssLikeValue(this.getSizeProportion(), UIConstants.CSS_EM);
1432
+ }
1433
+ set size(value) {
1434
+ this._size = value;
1435
+ this.style.fontSize = getCssLikeValue(this.getSizeProportion(), UIConstants.CSS_EM);
1436
+ }
1437
+ get size() {
1438
+ return this._size;
1439
+ }
1440
+ set customSize(value) {
1441
+ this._customSize = value;
1442
+ if (this._customSize)
1443
+ this.style.fontSize = getCssLikeValue(this._customSize, UIConstants.CSS_EM);
1444
+ }
1445
+ get customSize() {
1446
+ return this._customSize;
1447
+ }
1448
+ get proportion() {
1449
+ return this.customSize || this.getSizeProportion();
1450
+ }
1451
+ get style() {
1452
+ return this.el.nativeElement.style;
1453
+ }
1454
+ getSizeProportion() {
1455
+ switch (this.size) {
1456
+ case ComponentSize.Small:
1457
+ return 0.5;
1458
+ case ComponentSize.Medium:
1459
+ return 1;
1460
+ case ComponentSize.Large:
1461
+ return 2;
1462
+ default:
1463
+ return 1;
1464
+ }
1465
+ }
1466
+ }
1467
+ ComponentSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ComponentSizeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1468
+ ComponentSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: { size: ["sfcComponentSize", "size"], customSize: "customSize" }, ngImport: i0 });
1469
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ComponentSizeDirective, decorators: [{
1470
+ type: Directive,
1471
+ args: [{
1472
+ selector: '[sfcComponentSize]'
1473
+ }]
1474
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { size: [{
1475
+ type: Input,
1476
+ args: ['sfcComponentSize']
1477
+ }], customSize: [{
1478
+ type: Input
1479
+ }] } });
1480
+
1481
+ class DestroyParentDirective {
1482
+ constructor(el) {
1483
+ this.el = el;
1484
+ this.delay = 0;
1485
+ }
1486
+ set destroyParent(value) {
1487
+ if (value) {
1488
+ setTimeout(() => { var _a; return (_a = this.el.nativeElement.parentElement) === null || _a === void 0 ? void 0 : _a.remove(); }, this.delay);
1489
+ }
1490
+ }
1491
+ }
1492
+ DestroyParentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DestroyParentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1493
+ DestroyParentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DestroyParentDirective, selector: "[sfcDestroyParent]", inputs: { destroyParent: ["sfcDestroyParent", "destroyParent"], delay: "delay" }, ngImport: i0 });
1494
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DestroyParentDirective, decorators: [{
1495
+ type: Directive,
1496
+ args: [{
1497
+ selector: '[sfcDestroyParent]'
1498
+ }]
1499
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { destroyParent: [{
1500
+ type: Input,
1501
+ args: ['sfcDestroyParent']
1502
+ }], delay: [{
1503
+ type: Input
1504
+ }] } });
1505
+
1506
+ class DomChangesDirective {
1507
+ constructor(elementRef) {
1508
+ this.elementRef = elementRef;
1509
+ this.sfcDomChanges = new EventEmitter();
1510
+ this.options = {
1511
+ attributes: true,
1512
+ childList: true,
1513
+ characterData: true
1514
+ };
1515
+ const element = this.elementRef.nativeElement;
1516
+ this.changes = new MutationObserver((mutations) => mutations.forEach((mutation) => this.sfcDomChanges.emit(mutation)));
1517
+ this.changes.observe(element, this.options);
1518
+ }
1519
+ ngOnDestroy() {
1520
+ this.changes.disconnect();
1521
+ }
1522
+ }
1523
+ DomChangesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DomChangesDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1524
+ DomChangesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DomChangesDirective, selector: "[sfcDomChanges]", inputs: { options: "options" }, outputs: { sfcDomChanges: "sfcDomChanges" }, ngImport: i0 });
1525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DomChangesDirective, decorators: [{
1526
+ type: Directive,
1527
+ args: [{
1528
+ selector: '[sfcDomChanges]'
1529
+ }]
1530
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { sfcDomChanges: [{
1531
+ type: Output
1532
+ }], options: [{
1533
+ type: Input
1534
+ }] } });
1535
+
1536
+ class ScrollTrackerDirective {
1537
+ constructor() {
1538
+ this.positions = [];
1539
+ this.sfcScrollTracker = new EventEmitter();
1540
+ }
1541
+ onScroll(event) {
1542
+ const position = this.getPosition(event);
1543
+ if (position && hasItem(this.positions, position))
1544
+ this.sfcScrollTracker.emit(position);
1545
+ }
1546
+ getPosition(event) {
1547
+ const tracker = event.target, limit = tracker.scrollHeight - tracker.clientHeight, scrollTopFixed = tracker.scrollTop.toFixed();
1548
+ if (scrollTopFixed >= limit)
1549
+ return Position.Bottom;
1550
+ else if (scrollTopFixed <= 0)
1551
+ return Position.Top;
1552
+ return null;
1553
+ }
1554
+ }
1555
+ ScrollTrackerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ScrollTrackerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1556
+ ScrollTrackerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ScrollTrackerDirective, selector: "[sfcScrollTracker]", inputs: { positions: "positions" }, outputs: { sfcScrollTracker: "sfcScrollTracker" }, host: { listeners: { "scroll": "onScroll($event)" } }, ngImport: i0 });
1557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ScrollTrackerDirective, decorators: [{
1558
+ type: Directive,
1559
+ args: [{
1560
+ selector: '[sfcScrollTracker]'
1561
+ }]
1562
+ }], propDecorators: { positions: [{
1563
+ type: Input
1564
+ }], sfcScrollTracker: [{
1565
+ type: Output
1566
+ }], onScroll: [{
1567
+ type: HostListener,
1568
+ args: ['scroll', ['$event']]
1569
+ }] } });
1570
+
1571
+ class ScrollIntoViewDirective {
1572
+ constructor() {
1573
+ /**
1574
+ * Scroll into middle of local container(not whole page)
1575
+ */
1576
+ this.local = false;
1577
+ this.options = { behavior: 'smooth', block: 'center', inline: 'start' };
1578
+ }
1579
+ set sfcScrollIntoView(target) {
1580
+ if (!isDefined(target))
1581
+ return;
1582
+ if (this.local)
1583
+ target.scrollTop = target.offsetHeight / 2;
1584
+ else {
1585
+ if (isChromeBrowser())
1586
+ target.scrollIntoViewIfNeeded();
1587
+ else
1588
+ target.scrollIntoView(this.options);
1589
+ }
1590
+ }
1591
+ }
1592
+ ScrollIntoViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ScrollIntoViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1593
+ ScrollIntoViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ScrollIntoViewDirective, selector: "[sfcScrollIntoView]", inputs: { sfcScrollIntoView: "sfcScrollIntoView", local: "local", options: "options" }, ngImport: i0 });
1594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ScrollIntoViewDirective, decorators: [{
1595
+ type: Directive,
1596
+ args: [{
1597
+ selector: '[sfcScrollIntoView]'
1598
+ }]
1599
+ }], propDecorators: { sfcScrollIntoView: [{
1600
+ type: Input
1601
+ }], local: [{
1602
+ type: Input
1603
+ }], options: [{
1604
+ type: Input
1605
+ }] } });
1606
+
1607
+ class ImageLoadService {
1608
+ constructor() {
1609
+ this.loadSubject = new Subject();
1610
+ this.load$ = this.loadSubject.asObservable()
1611
+ .pipe(distinctUntilChanged());
1612
+ }
1613
+ load(value) {
1614
+ this.loadSubject.next(value);
1615
+ }
1616
+ }
1617
+ ImageLoadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImageLoadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1618
+ ImageLoadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImageLoadService, providedIn: 'root' });
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImageLoadService, decorators: [{
1620
+ type: Injectable,
1621
+ args: [{
1622
+ providedIn: 'root'
1623
+ }]
1624
+ }] });
1625
+
1626
+ class ImageLoadDirective {
1627
+ constructor(el, loadService) {
1628
+ this.el = el;
1629
+ this.loadService = loadService;
1630
+ this.action = new EventEmitter();
1631
+ }
1632
+ onLoad(event) {
1633
+ const loadEvent = {
1634
+ natural: {
1635
+ height: this.el.nativeElement.naturalHeight,
1636
+ width: this.el.nativeElement.naturalWidth
1637
+ },
1638
+ offset: {
1639
+ height: this.el.nativeElement.offsetHeight,
1640
+ width: this.el.nativeElement.offsetWidth
1641
+ }
1642
+ };
1643
+ this.loadService.load(loadEvent);
1644
+ if (isDefined(this.action))
1645
+ this.action.emit(event);
1646
+ }
1647
+ }
1648
+ ImageLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImageLoadDirective, deps: [{ token: i0.ElementRef }, { token: ImageLoadService }], target: i0.ɵɵFactoryTarget.Directive });
1649
+ ImageLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ImageLoadDirective, selector: "[sfcImageLoad]", outputs: { action: "sfcImageLoad" }, host: { listeners: { "load": "onLoad($event)" } }, ngImport: i0 });
1650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImageLoadDirective, decorators: [{
1651
+ type: Directive,
1652
+ args: [{
1653
+ selector: '[sfcImageLoad]'
1654
+ }]
1655
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ImageLoadService }]; }, propDecorators: { action: [{
1656
+ type: Output,
1657
+ args: ['sfcImageLoad']
1658
+ }], onLoad: [{
1659
+ type: HostListener,
1660
+ args: ['load', ['$event']]
1661
+ }] } });
1662
+
1663
+ class SwitchMultiCasePipe {
1664
+ transform(cases, switchOption) {
1665
+ return cases.includes(switchOption) ? switchOption : !switchOption;
1666
+ }
1667
+ }
1668
+ SwitchMultiCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1669
+ SwitchMultiCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, name: "sfcSwitchMultiCase" });
1670
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, decorators: [{
1671
+ type: Pipe,
1672
+ args: [{
1673
+ name: 'sfcSwitchMultiCase'
1674
+ }]
1675
+ }] });
1676
+
1677
+ var ButtonType;
1678
+ (function (ButtonType) {
1679
+ ButtonType["Bordered"] = "bordered";
1680
+ ButtonType["Filled"] = "filled";
1681
+ ButtonType["Rounded"] = "rounded";
1682
+ ButtonType["Circled"] = "circled";
1683
+ ButtonType["Texted"] = "texted";
1684
+ })(ButtonType || (ButtonType = {}));
1685
+
1686
+ class ButtonComponent {
1687
+ constructor() {
1688
+ this.BUTTON_DEFAULT_TEXT = 'Button';
1689
+ this.disabled = false;
1690
+ this.types = [ButtonType.Bordered];
1691
+ }
1692
+ get label() {
1693
+ return isNullOrEmptyString(this.text) && !isDefined(this.iconBefore) && !isDefined(this.iconAfter)
1694
+ ? this.BUTTON_DEFAULT_TEXT
1695
+ : this.text;
1696
+ }
1697
+ get classes() {
1698
+ const classes = {};
1699
+ distinct(this.types).forEach(type => classes[type] = true);
1700
+ return classes;
1701
+ }
1702
+ }
1703
+ ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1704
+ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ButtonComponent, selector: "sfc-button", inputs: { text: "text", iconBefore: "iconBefore", iconAfter: "iconAfter", disabled: "disabled", types: "types" }, host: { properties: { "class.disabled": "this.disabled" } }, ngImport: i0, template: "<a class=\"button\" [ngClass]=\"classes\">\r\n <fa-icon *ngIf=\"iconBefore\" class=\"icon before\" [icon]=\"iconBefore\"></fa-icon>\r\n <span class=\"text\">{{label}}</span>\r\n <fa-icon *ngIf=\"iconAfter\" class=\"icon after\" [icon]=\"iconAfter\"></fa-icon>\r\n</a>", styles: [":host .button.bordered{border:solid 2px}:host .button.bordered,:host-context(.sfc-default-theme) :host .button.bordered{color:#545e61}:host-context(.sfc-dark-theme) :host .button.bordered{color:#fff}:host .button.bordered,:host-context(.sfc-default-theme) :host .button.bordered{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.bordered{border-color:#fff}:host .button.filled{color:#fff!important}:host .button.filled,:host-context(.sfc-default-theme) :host .button.filled{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.filled{border-color:#545e61}:host .button.filled,:host-context(.sfc-default-theme) :host .button.filled{background:#545e61}:host-context(.sfc-dark-theme) :host .button.filled{background:#545e61}:host.disabled .button.filled{color:#fff!important}:host.disabled .button.filled,:host-context(.sfc-default-theme) :host.disabled .button.filled{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button.filled{border-color:#bdbdbd}:host.disabled .button.filled,:host-context(.sfc-default-theme) :host.disabled .button.filled{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button.filled{background:#bdbdbd}:host:hover .button.filled{color:#fff!important}:host:hover .button.filled,:host-context(.sfc-default-theme) :host:hover .button.filled{border-color:#ffce54}:host-context(.sfc-dark-theme) :host:hover .button.filled{border-color:#ffce54}:host:hover .button.filled,:host-context(.sfc-default-theme) :host:hover .button.filled{background:#ffce54}:host-context(.sfc-dark-theme) :host:hover .button.filled{background:#ffce54}:host .button.rounded{border:solid 2px;border-radius:1.25em;padding:.4em 1.2em}:host .button.rounded,:host-context(.sfc-default-theme) :host .button.rounded{color:#545e61}:host-context(.sfc-dark-theme) :host .button.rounded{color:#fff}:host .button.rounded,:host-context(.sfc-default-theme) :host .button.rounded{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.rounded{border-color:#fff}:host .button.rounded.filled,:host-context(.sfc-default-theme) :host .button.rounded.filled{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.rounded.filled{border-color:#545e61}:host.disabled .button.rounded.filled{border-color:#bdbdbd}:host:not(.disabled):hover .button.rounded.filled{border-color:#ffce54}:host .button.circled{border:solid 2px;width:5em;height:5em;border-radius:50%}:host .button.circled,:host-context(.sfc-default-theme) :host .button.circled{color:#545e61}:host-context(.sfc-dark-theme) :host .button.circled{color:#fff}:host .button.circled,:host-context(.sfc-default-theme) :host .button.circled{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.circled{border-color:#fff}:host .button.circled .text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host{display:inline-block;font-size:1em}:host .button{box-sizing:border-box;display:inline-flex;justify-content:center;flex-wrap:wrap;align-items:center;overflow:hidden;text-align:center;text-decoration:none;white-space:nowrap;font-size:.9em;cursor:pointer;-webkit-user-select:none;user-select:none;width:inherit;transition:color .5s ease,border-color .5s ease,background .5s ease}:host .button,:host-context(.sfc-default-theme) :host .button{color:#545e61}:host-context(.sfc-dark-theme) :host .button{color:#fff}:host .button .icon{padding:3px}:host .button .text{padding:3px;white-space:initial;text-overflow:ellipsis;overflow:hidden}:host .button .text:empty{display:none}:host.disabled{pointer-events:none}:host.disabled .button,:host-context(.sfc-default-theme) :host.disabled .button{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button{color:#656d78}:host.disabled .button,:host-context(.sfc-default-theme) :host.disabled .button{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button{border-color:#656d78}:host:not(.disabled):hover .button{color:#ffce54;border-color:#ffce54}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
1705
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ButtonComponent, decorators: [{
1706
+ type: Component,
1707
+ args: [{ selector: 'sfc-button', template: "<a class=\"button\" [ngClass]=\"classes\">\r\n <fa-icon *ngIf=\"iconBefore\" class=\"icon before\" [icon]=\"iconBefore\"></fa-icon>\r\n <span class=\"text\">{{label}}</span>\r\n <fa-icon *ngIf=\"iconAfter\" class=\"icon after\" [icon]=\"iconAfter\"></fa-icon>\r\n</a>", styles: [":host .button.bordered{border:solid 2px}:host .button.bordered,:host-context(.sfc-default-theme) :host .button.bordered{color:#545e61}:host-context(.sfc-dark-theme) :host .button.bordered{color:#fff}:host .button.bordered,:host-context(.sfc-default-theme) :host .button.bordered{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.bordered{border-color:#fff}:host .button.filled{color:#fff!important}:host .button.filled,:host-context(.sfc-default-theme) :host .button.filled{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.filled{border-color:#545e61}:host .button.filled,:host-context(.sfc-default-theme) :host .button.filled{background:#545e61}:host-context(.sfc-dark-theme) :host .button.filled{background:#545e61}:host.disabled .button.filled{color:#fff!important}:host.disabled .button.filled,:host-context(.sfc-default-theme) :host.disabled .button.filled{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button.filled{border-color:#bdbdbd}:host.disabled .button.filled,:host-context(.sfc-default-theme) :host.disabled .button.filled{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button.filled{background:#bdbdbd}:host:hover .button.filled{color:#fff!important}:host:hover .button.filled,:host-context(.sfc-default-theme) :host:hover .button.filled{border-color:#ffce54}:host-context(.sfc-dark-theme) :host:hover .button.filled{border-color:#ffce54}:host:hover .button.filled,:host-context(.sfc-default-theme) :host:hover .button.filled{background:#ffce54}:host-context(.sfc-dark-theme) :host:hover .button.filled{background:#ffce54}:host .button.rounded{border:solid 2px;border-radius:1.25em;padding:.4em 1.2em}:host .button.rounded,:host-context(.sfc-default-theme) :host .button.rounded{color:#545e61}:host-context(.sfc-dark-theme) :host .button.rounded{color:#fff}:host .button.rounded,:host-context(.sfc-default-theme) :host .button.rounded{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.rounded{border-color:#fff}:host .button.rounded.filled,:host-context(.sfc-default-theme) :host .button.rounded.filled{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.rounded.filled{border-color:#545e61}:host.disabled .button.rounded.filled{border-color:#bdbdbd}:host:not(.disabled):hover .button.rounded.filled{border-color:#ffce54}:host .button.circled{border:solid 2px;width:5em;height:5em;border-radius:50%}:host .button.circled,:host-context(.sfc-default-theme) :host .button.circled{color:#545e61}:host-context(.sfc-dark-theme) :host .button.circled{color:#fff}:host .button.circled,:host-context(.sfc-default-theme) :host .button.circled{border-color:#545e61}:host-context(.sfc-dark-theme) :host .button.circled{border-color:#fff}:host .button.circled .text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host{display:inline-block;font-size:1em}:host .button{box-sizing:border-box;display:inline-flex;justify-content:center;flex-wrap:wrap;align-items:center;overflow:hidden;text-align:center;text-decoration:none;white-space:nowrap;font-size:.9em;cursor:pointer;-webkit-user-select:none;user-select:none;width:inherit;transition:color .5s ease,border-color .5s ease,background .5s ease}:host .button,:host-context(.sfc-default-theme) :host .button{color:#545e61}:host-context(.sfc-dark-theme) :host .button{color:#fff}:host .button .icon{padding:3px}:host .button .text{padding:3px;white-space:initial;text-overflow:ellipsis;overflow:hidden}:host .button .text:empty{display:none}:host.disabled{pointer-events:none}:host.disabled .button,:host-context(.sfc-default-theme) :host.disabled .button{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button{color:#656d78}:host.disabled .button,:host-context(.sfc-default-theme) :host.disabled .button{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .button{border-color:#656d78}:host:not(.disabled):hover .button{color:#ffce54;border-color:#ffce54}\n"] }]
1708
+ }], propDecorators: { text: [{
1709
+ type: Input
1710
+ }], iconBefore: [{
1711
+ type: Input
1712
+ }], iconAfter: [{
1713
+ type: Input
1714
+ }], disabled: [{
1715
+ type: Input
1716
+ }, {
1717
+ type: HostBinding,
1718
+ args: [`class.${UIClass.Disabled}`]
1719
+ }], types: [{
1720
+ type: Input
1721
+ }] } });
1722
+
1723
+ var TooltipType;
1724
+ (function (TooltipType) {
1725
+ TooltipType["Hover"] = "hover";
1726
+ TooltipType["Click"] = "click";
1727
+ })(TooltipType || (TooltipType = {}));
1728
+
1729
+ class TooltipComponent {
1730
+ constructor(resizeService, window) {
1731
+ this.resizeService = resizeService;
1732
+ this.window = window;
1733
+ this.tooltipType = TooltipType.Hover;
1734
+ this.tooltipPosition = Position.Top;
1735
+ this.tooltipShow = false;
1736
+ // preserved position
1737
+ this._position = Position.Top;
1738
+ }
1739
+ click() {
1740
+ if (this.tooltipType == TooltipType.Click) {
1741
+ this.tooltipShow = !this.tooltipShow;
1742
+ }
1743
+ }
1744
+ ngOnInit() {
1745
+ this._position = this.tooltipPosition;
1746
+ }
1747
+ ngAfterContentInit() {
1748
+ this._resizeSubscription = this.resizeService.onResize$
1749
+ .pipe(startWith(this.window))
1750
+ .subscribe(window => this.tooltipPosition = window.innerWidth <= MediaLimits.Tablet
1751
+ ? Position.Bottom : this._position);
1752
+ }
1753
+ ngOnDestroy() {
1754
+ var _a;
1755
+ (_a = this._resizeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1756
+ }
1757
+ }
1758
+ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TooltipComponent, deps: [{ token: ResizeService }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
1759
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TooltipComponent, selector: "[sfc-tooltip]", inputs: { value: ["sfc-tooltip", "value"], tooltipType: "tooltipType", tooltipPosition: "tooltipPosition", tooltipShow: "tooltipShow" }, host: { listeners: { "click": "click()" }, properties: { "attr.value": "this.value", "attr.type": "this.tooltipType", "attr.position": "this.tooltipPosition", "class.show": "this.tooltipShow" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host{position:relative}:host:before,:host:after{position:absolute;left:50%;bottom:calc(100% + 5px);pointer-events:none;transition:.2s;will-change:transform}:host:hover:before,:host.show:before{content:attr(value);padding:.4em .7em;font-size:.8em;font-weight:initial;width:inherit;max-width:18.75em;border-radius:6px;background-color:#545e61;box-shadow:0 0 20.25em #aab2bd;color:#fff;text-align:center;white-space:pre-wrap;overflow:hidden;word-wrap:break-word;z-index:9999}:host:after{content:\"\";border-style:solid;transition-duration:0s;transform:translate(-50%) scaleY(0)}:host[type=hover]:before,:host[type=hover]:after,:host:not(.show):before,:host:not(.show):after{visibility:hidden;opacity:0}:host[type=hover]:hover:before,:host[type=hover]:hover:after,:host.show:before,:host.show:after{visibility:visible;opacity:1}:host[type=hover]:hover:before,:host.show:before{transition-delay:.1s}:host[type=hover]:hover:after,:host.show:after{transition-delay:.3s;transition-duration:.2s;transform:translate(-50%) scaleY(1)}:host[position=top]:before,:host[position=top]:after{left:50%;bottom:calc(100% + 5px)}:host[position=top]:before{transform:translate(-50%,-5px) scale(.5)}:host[position=top]:hover:before,:host[position=top].show:before{transform:translate(-50%,-.25em) scale(1)}:host[position=top]:after{border-width:.25em .25em 0;border-color:#545e61 transparent transparent transparent;transform-origin:top}:host[position=left]:before,:host[position=left]:after{left:auto;right:calc(100% + 5px);bottom:50%}:host[position=left]:before{transform:translate(-.25em,50%) scale(.5)}:host[position=left]:hover:before,:host[position=left].show:before{transform:translate(-.31em,50%) scale(1)}:host[position=left]:after{border-width:.25em 0 .25em .25em;border-color:transparent transparent transparent #545e61;transform-origin:left;transform:translateY(50%) scaleX(0)}:host[position=left]:hover:after,:host[position=left].show:after{transform:translateY(50%) scaleX(1)}:host[position=right]:before,:host[position=right]:after{left:calc(100% + 5px);bottom:50%}:host[position=right]:before{transform:translate(5px,50%) scale(.5)}:host[position=right]:hover:before,:host[position=right].show:before{transform:translate(.31em,50%) scale(1)}:host[position=right]:after{border-width:.25em .25em .25em 0;border-color:transparent #545e61 transparent transparent;transform-origin:right;transform:translateY(50%) scaleX(0)}:host[position=right]:hover:after,:host[position=right].show:after{transform:translateY(50%) scaleX(1)}:host[position=bottom]:before,:host[position=bottom]:after{top:calc(100% + 5px);bottom:auto}:host[position=bottom]:before{transform:translate(-50%,5px) scale(.5)}:host[position=bottom]:hover:before,:host[position=bottom].show:before{transform:translate(-50%,.31em) scale(1)}:host[position=bottom]:after{border-width:0 .25em .25em;border-color:transparent transparent #545e61 transparent;transform-origin:bottom}\n"] });
1760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TooltipComponent, decorators: [{
1761
+ type: Component,
1762
+ args: [{ selector: '[sfc-tooltip]', template: `<ng-content></ng-content>`, styles: [":host{position:relative}:host:before,:host:after{position:absolute;left:50%;bottom:calc(100% + 5px);pointer-events:none;transition:.2s;will-change:transform}:host:hover:before,:host.show:before{content:attr(value);padding:.4em .7em;font-size:.8em;font-weight:initial;width:inherit;max-width:18.75em;border-radius:6px;background-color:#545e61;box-shadow:0 0 20.25em #aab2bd;color:#fff;text-align:center;white-space:pre-wrap;overflow:hidden;word-wrap:break-word;z-index:9999}:host:after{content:\"\";border-style:solid;transition-duration:0s;transform:translate(-50%) scaleY(0)}:host[type=hover]:before,:host[type=hover]:after,:host:not(.show):before,:host:not(.show):after{visibility:hidden;opacity:0}:host[type=hover]:hover:before,:host[type=hover]:hover:after,:host.show:before,:host.show:after{visibility:visible;opacity:1}:host[type=hover]:hover:before,:host.show:before{transition-delay:.1s}:host[type=hover]:hover:after,:host.show:after{transition-delay:.3s;transition-duration:.2s;transform:translate(-50%) scaleY(1)}:host[position=top]:before,:host[position=top]:after{left:50%;bottom:calc(100% + 5px)}:host[position=top]:before{transform:translate(-50%,-5px) scale(.5)}:host[position=top]:hover:before,:host[position=top].show:before{transform:translate(-50%,-.25em) scale(1)}:host[position=top]:after{border-width:.25em .25em 0;border-color:#545e61 transparent transparent transparent;transform-origin:top}:host[position=left]:before,:host[position=left]:after{left:auto;right:calc(100% + 5px);bottom:50%}:host[position=left]:before{transform:translate(-.25em,50%) scale(.5)}:host[position=left]:hover:before,:host[position=left].show:before{transform:translate(-.31em,50%) scale(1)}:host[position=left]:after{border-width:.25em 0 .25em .25em;border-color:transparent transparent transparent #545e61;transform-origin:left;transform:translateY(50%) scaleX(0)}:host[position=left]:hover:after,:host[position=left].show:after{transform:translateY(50%) scaleX(1)}:host[position=right]:before,:host[position=right]:after{left:calc(100% + 5px);bottom:50%}:host[position=right]:before{transform:translate(5px,50%) scale(.5)}:host[position=right]:hover:before,:host[position=right].show:before{transform:translate(.31em,50%) scale(1)}:host[position=right]:after{border-width:.25em .25em .25em 0;border-color:transparent #545e61 transparent transparent;transform-origin:right;transform:translateY(50%) scaleX(0)}:host[position=right]:hover:after,:host[position=right].show:after{transform:translateY(50%) scaleX(1)}:host[position=bottom]:before,:host[position=bottom]:after{top:calc(100% + 5px);bottom:auto}:host[position=bottom]:before{transform:translate(-50%,5px) scale(.5)}:host[position=bottom]:hover:before,:host[position=bottom].show:before{transform:translate(-50%,.31em) scale(1)}:host[position=bottom]:after{border-width:0 .25em .25em;border-color:transparent transparent #545e61 transparent;transform-origin:bottom}\n"] }]
1763
+ }], ctorParameters: function () {
1764
+ return [{ type: ResizeService }, { type: Window, decorators: [{
1765
+ type: Inject,
1766
+ args: [WINDOW]
1767
+ }] }];
1768
+ }, propDecorators: { value: [{
1769
+ type: Input,
1770
+ args: ['sfc-tooltip']
1771
+ }, {
1772
+ type: HostBinding,
1773
+ args: ['attr.value']
1774
+ }], tooltipType: [{
1775
+ type: Input
1776
+ }, {
1777
+ type: HostBinding,
1778
+ args: ['attr.type']
1779
+ }], tooltipPosition: [{
1780
+ type: Input
1781
+ }, {
1782
+ type: HostBinding,
1783
+ args: ['attr.position']
1784
+ }], tooltipShow: [{
1785
+ type: Input
1786
+ }, {
1787
+ type: HostBinding,
1788
+ args: ['class.show']
1789
+ }], click: [{
1790
+ type: HostListener,
1791
+ args: ['click']
1792
+ }] } });
1793
+
1794
+ class DelimeterComponent {
1795
+ constructor() {
1796
+ this.direction = Direction.Horizontal;
1797
+ }
1798
+ get _empty() { return isNullOrEmptyString(this.label); }
1799
+ ;
1800
+ }
1801
+ DelimeterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DelimeterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1802
+ DelimeterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DelimeterComponent, selector: "sfc-delimeter", inputs: { label: "label", direction: "direction" }, host: { properties: { "class": "this.direction", "class.empty": "this._empty" } }, ngImport: i0, template: `<span>{{label}}</span>`, isInline: true, styles: [":host{padding:.3em 0}:host span{font-size:.8em}:host span,:host-context(.sfc-default-theme) :host span{color:#545e61}:host-context(.sfc-dark-theme) :host span{color:#fff}:host.vertical{display:inline-table;text-align:center;height:100%;min-height:4em;padding:0 .3em}:host.vertical span{position:relative;display:table-cell;vertical-align:middle}:host.vertical span:before,:host.vertical span:after{position:absolute;content:\"\";left:50%;border-left:1px solid;transition:border-image .5s ease}:host.vertical span:before{bottom:50%;top:0;margin-bottom:.8em}:host.vertical span:before,:host-context(.sfc-default-theme) :host.vertical span:before{border-image:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 1 100%}:host-context(.sfc-dark-theme) :host.vertical span:before{border-image:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 1 100%}:host.vertical span:after{top:50%;bottom:0;margin-top:.8em}:host.vertical span:after,:host-context(.sfc-default-theme) :host.vertical span:after{border-image:linear-gradient(to top,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 1 100%}:host-context(.sfc-dark-theme) :host.vertical span:after{border-image:linear-gradient(to top,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 1 100%}:host.vertical.empty{min-height:2em}:host.vertical.empty span:before{margin-bottom:0}:host.vertical.empty span:after{margin-top:0}:host.horizontal{display:flex;align-items:center;text-align:center;-webkit-user-select:none;user-select:none}:host.horizontal:before,:host-context(.sfc-default-theme) :host.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host.horizontal:before{border-image:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 100% 1}:host.horizontal:after,:host-context(.sfc-default-theme) :host.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host.horizontal:after{border-image:linear-gradient(to left,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 100% 1}:host.horizontal:before,:host.horizontal:after{content:\"\";flex:1;border-bottom:1px solid}:host.horizontal.empty span{display:none}:host.horizontal:not(.empty):before{margin-right:.5em}:host.horizontal:not(.empty):after{margin-left:.5em}\n"] });
1803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DelimeterComponent, decorators: [{
1804
+ type: Component,
1805
+ args: [{ selector: 'sfc-delimeter', template: `<span>{{label}}</span>`, styles: [":host{padding:.3em 0}:host span{font-size:.8em}:host span,:host-context(.sfc-default-theme) :host span{color:#545e61}:host-context(.sfc-dark-theme) :host span{color:#fff}:host.vertical{display:inline-table;text-align:center;height:100%;min-height:4em;padding:0 .3em}:host.vertical span{position:relative;display:table-cell;vertical-align:middle}:host.vertical span:before,:host.vertical span:after{position:absolute;content:\"\";left:50%;border-left:1px solid;transition:border-image .5s ease}:host.vertical span:before{bottom:50%;top:0;margin-bottom:.8em}:host.vertical span:before,:host-context(.sfc-default-theme) :host.vertical span:before{border-image:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 1 100%}:host-context(.sfc-dark-theme) :host.vertical span:before{border-image:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 1 100%}:host.vertical span:after{top:50%;bottom:0;margin-top:.8em}:host.vertical span:after,:host-context(.sfc-default-theme) :host.vertical span:after{border-image:linear-gradient(to top,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 1 100%}:host-context(.sfc-dark-theme) :host.vertical span:after{border-image:linear-gradient(to top,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 1 100%}:host.vertical.empty{min-height:2em}:host.vertical.empty span:before{margin-bottom:0}:host.vertical.empty span:after{margin-top:0}:host.horizontal{display:flex;align-items:center;text-align:center;-webkit-user-select:none;user-select:none}:host.horizontal:before,:host-context(.sfc-default-theme) :host.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host.horizontal:before{border-image:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 100% 1}:host.horizontal:after,:host-context(.sfc-default-theme) :host.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host.horizontal:after{border-image:linear-gradient(to left,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 47%,rgba(255,255,255,.4) 53%,rgba(255,255,255,.4) 100%) 100% 1}:host.horizontal:before,:host.horizontal:after{content:\"\";flex:1;border-bottom:1px solid}:host.horizontal.empty span{display:none}:host.horizontal:not(.empty):before{margin-right:.5em}:host.horizontal:not(.empty):after{margin-left:.5em}\n"] }]
1806
+ }], propDecorators: { label: [{
1807
+ type: Input
1808
+ }], direction: [{
1809
+ type: Input
1810
+ }, {
1811
+ type: HostBinding,
1812
+ args: ['class']
1813
+ }], _empty: [{
1814
+ type: HostBinding,
1815
+ args: [`class.${UIClass.Empty}`]
1816
+ }] } });
1817
+
1818
+ class LoaderConstants {
1819
+ }
1820
+ LoaderConstants.GLOBAL_LOADER_ID = 'global';
1821
+ LoaderConstants.LOCAL_LOADER_ID = 'local';
1822
+ LoaderConstants.CSS_CLASS_BACKGROUND = 'background';
1823
+
1824
+ class LoaderService {
1825
+ constructor() {
1826
+ this.loaderSubject = new BehaviorSubject([]);
1827
+ this.loaders$ = this.loaderSubject
1828
+ .asObservable()
1829
+ .pipe(filter(loaders => any(loaders)), distinctUntilChanged());
1830
+ }
1831
+ /**
1832
+ * Show loader by Id
1833
+ * @param id Loader Id
1834
+ * @param register If true register loader and show it
1835
+ */
1836
+ show(id = LoaderConstants.GLOBAL_LOADER_ID, register = false) {
1837
+ return this.setLoaderStatus(id, true, register);
1838
+ }
1839
+ /**
1840
+ * Hide loader
1841
+ * @param id Loader Id
1842
+ */
1843
+ hide(id = LoaderConstants.GLOBAL_LOADER_ID) {
1844
+ this.setLoaderStatus(id, false);
1845
+ }
1846
+ /**
1847
+ * Register loader for next use
1848
+ * @param event Loader event
1849
+ * @returns Registred loade observable
1850
+ */
1851
+ register(event) {
1852
+ const loaders = this.loaderSubject.getValue();
1853
+ if (addItem(loaders, event, () => hasObjectItem(loaders, nameof('id'), event.id))) {
1854
+ this.loaderSubject.next(loaders);
1855
+ }
1856
+ return this.selectLoaderById(event.id);
1857
+ }
1858
+ /**
1859
+ * Remove loader
1860
+ * @param id Loader Id
1861
+ */
1862
+ remove(id = LoaderConstants.GLOBAL_LOADER_ID) {
1863
+ const loaders = this.loaderSubject.getValue();
1864
+ if (removeItemBy(loaders, loader => loader.id == id)) {
1865
+ this.loaderSubject.next(loaders);
1866
+ }
1867
+ }
1868
+ selectLoaderById(id) {
1869
+ return this.loaders$
1870
+ .pipe(map(loaders => loaders.find(loader => loader.id == id)), distinctUntilChanged());
1871
+ }
1872
+ setLoaderStatus(id, status, register = false) {
1873
+ const loaders = this.loaderSubject.getValue(), ILoaderEvent = { id, status }, loader = firstOrDefault(loaders, (loader) => loader.id == id);
1874
+ if (isDefined(loader) && (loader === null || loader === void 0 ? void 0 : loader.status) == status)
1875
+ return this.selectLoaderById(id);
1876
+ const updatedLoaders = updateItemBy(loaders, (loader) => loader.id == id, ILoaderEvent);
1877
+ if (isDefined(updatedLoaders)) {
1878
+ this.loaderSubject.next(updatedLoaders);
1879
+ }
1880
+ if (register) {
1881
+ return this.register(ILoaderEvent);
1882
+ }
1883
+ return null;
1884
+ }
1885
+ }
1886
+ LoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1887
+ LoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderService, providedIn: 'root' });
1888
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderService, decorators: [{
1889
+ type: Injectable,
1890
+ args: [{
1891
+ providedIn: 'root'
1892
+ }]
1893
+ }] });
1894
+
1895
+ class LoaderBaseComponent {
1896
+ constructor(loaderService) {
1897
+ this.loaderService = loaderService;
1898
+ this.UIClass = UIClass;
1899
+ /**
1900
+ * Loader identificator (global by default)
1901
+ */
1902
+ this.id = LoaderConstants.GLOBAL_LOADER_ID;
1903
+ /**
1904
+ * Is start on init (loader register with show = True)
1905
+ */
1906
+ this.start = false;
1907
+ /**
1908
+ * Loader when active(show) has background(low opacity)
1909
+ */
1910
+ this.background = true;
1911
+ this.show$ = EMPTY;
1912
+ }
1913
+ ngOnInit() {
1914
+ // register new loader
1915
+ this.show$ = this.loaderService.register({ id: this.id, status: this.start })
1916
+ .pipe(map((event) => this.id === event.id && event.status));
1917
+ }
1918
+ get preLoaderClasses() {
1919
+ let classes = {};
1920
+ if (this.id === LoaderConstants.GLOBAL_LOADER_ID)
1921
+ classes[LoaderConstants.GLOBAL_LOADER_ID] = true;
1922
+ else
1923
+ classes[LoaderConstants.LOCAL_LOADER_ID] = true;
1924
+ classes[LoaderConstants.CSS_CLASS_BACKGROUND] = this.background;
1925
+ return classes;
1926
+ }
1927
+ }
1928
+ LoaderBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderBaseComponent, deps: [{ token: LoaderService }], target: i0.ɵɵFactoryTarget.Directive });
1929
+ LoaderBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: LoaderBaseComponent, inputs: { id: "id", start: "start", background: "background" }, ngImport: i0 });
1930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderBaseComponent, decorators: [{
1931
+ type: Directive
1932
+ }], ctorParameters: function () { return [{ type: LoaderService }]; }, propDecorators: { id: [{
1933
+ type: Input
1934
+ }], start: [{
1935
+ type: Input
1936
+ }], background: [{
1937
+ type: Input
1938
+ }] } });
1939
+
1940
+ class BounceLoaderComponent extends LoaderBaseComponent {
1941
+ }
1942
+ BounceLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BounceLoaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1943
+ BounceLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BounceLoaderComponent, selector: "sfc-bounce-loader", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"show$ | async\" class=\"preloader\" [ngClass]=\"preLoaderClasses\">\r\n <div class=\"spinner\">\r\n <div class=\"bounce\"></div>\r\n <div class=\"bounce\"></div>\r\n <div class=\"bounce\"></div>\r\n </div>\r\n</div>", styles: [".preloader{position:relative;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.preloader.background{opacity:.7}.preloader.background,:host-context(.sfc-default-theme) .preloader.background{background-color:#fff}:host-context(.sfc-dark-theme) .preloader.background{background-color:#656d78}.preloader.global{z-index:9999;position:fixed}.preloader.local{z-index:9998;position:absolute}\n", ".spinner{text-align:center}.spinner .bounce{border-radius:100%;display:inline-block;animation:bounce-delay 1.4s infinite ease-in-out both;width:1em;height:1em}.spinner .bounce,:host-context(.sfc-default-theme) .spinner .bounce{background-color:#545e61}:host-context(.sfc-dark-theme) .spinner .bounce{background-color:#fff}.spinner .bounce:nth-child(1){animation-delay:-.32s}.spinner .bounce:nth-child(2){animation-delay:-.16s}@keyframes bounce-delay{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
1944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BounceLoaderComponent, decorators: [{
1945
+ type: Component,
1946
+ args: [{ selector: 'sfc-bounce-loader', template: "<div *ngIf=\"show$ | async\" class=\"preloader\" [ngClass]=\"preLoaderClasses\">\r\n <div class=\"spinner\">\r\n <div class=\"bounce\"></div>\r\n <div class=\"bounce\"></div>\r\n <div class=\"bounce\"></div>\r\n </div>\r\n</div>", styles: [".preloader{position:relative;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.preloader.background{opacity:.7}.preloader.background,:host-context(.sfc-default-theme) .preloader.background{background-color:#fff}:host-context(.sfc-dark-theme) .preloader.background{background-color:#656d78}.preloader.global{z-index:9999;position:fixed}.preloader.local{z-index:9998;position:absolute}\n", ".spinner{text-align:center}.spinner .bounce{border-radius:100%;display:inline-block;animation:bounce-delay 1.4s infinite ease-in-out both;width:1em;height:1em}.spinner .bounce,:host-context(.sfc-default-theme) .spinner .bounce{background-color:#545e61}:host-context(.sfc-dark-theme) .spinner .bounce{background-color:#fff}.spinner .bounce:nth-child(1){animation-delay:-.32s}.spinner .bounce:nth-child(2){animation-delay:-.16s}@keyframes bounce-delay{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}\n"] }]
1947
+ }] });
1948
+
1949
+ var CircleLoaderType;
1950
+ (function (CircleLoaderType) {
1951
+ CircleLoaderType["Default"] = "default";
1952
+ CircleLoaderType["Fading"] = "fading";
1953
+ })(CircleLoaderType || (CircleLoaderType = {}));
1954
+
1955
+ class CircleLoaderComponent extends LoaderBaseComponent {
1956
+ constructor() {
1957
+ super(...arguments);
1958
+ this.type = CircleLoaderType.Default;
1959
+ }
1960
+ }
1961
+ CircleLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CircleLoaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1962
+ CircleLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CircleLoaderComponent, selector: "sfc-circle-loader", inputs: { type: "type" }, usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"show$ | async\" class=\"preloader\" [ngClass]=\"preLoaderClasses\">\r\n <div class=\"circles-container\" [ngClass]=\"type\">\r\n <div class=\"circle1\"></div>\r\n <div class=\"circle2\"></div>\r\n <div class=\"circle3\"></div>\r\n <div class=\"circle4\"></div>\r\n <div class=\"circle5\"></div>\r\n <div class=\"circle6\"></div>\r\n <div class=\"circle7\"></div>\r\n <div class=\"circle8\"></div>\r\n <div class=\"circle9\"></div>\r\n <div class=\"circle10\"></div>\r\n <div class=\"circle11\"></div>\r\n <div class=\"circle12\"></div>\r\n </div>\r\n</div>", styles: [".preloader{position:relative;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.preloader.background{opacity:.7}.preloader.background,:host-context(.sfc-default-theme) .preloader.background{background-color:#fff}:host-context(.sfc-dark-theme) .preloader.background{background-color:#656d78}.preloader.global{z-index:9999;position:fixed}.preloader.local{z-index:9998;position:absolute}\n", ".circles-container{position:relative;width:2.5em;height:2.5em}.circles-container div{width:100%;height:100%;position:absolute;left:0;top:0}.circles-container div:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;border-radius:100%;animation:bounce-delay 1.2s infinite ease-in-out both}.circles-container div:before,:host-context(.sfc-default-theme) .circles-container div:before{background-color:#545e61}:host-context(.sfc-dark-theme) .circles-container div:before{background-color:#fff}.circles-container.fading div:before{animation-name:circle-fade-delay}.circles-container .circle2{transform:rotate(30deg)}.circles-container .circle2:before{animation-delay:-1.1s}.circles-container .circle3{transform:rotate(60deg)}.circles-container .circle3:before{animation-delay:-1s}.circles-container .circle4{transform:rotate(90deg)}.circles-container .circle4:before{animation-delay:-.9s}.circles-container .circle5{transform:rotate(120deg)}.circles-container .circle5:before{animation-delay:-.8s}.circles-container .circle6{transform:rotate(150deg)}.circles-container .circle6:before{animation-delay:-.7s}.circles-container .circle7{transform:rotate(180deg)}.circles-container .circle7:before{animation-delay:-.6s}.circles-container .circle8{transform:rotate(210deg)}.circles-container .circle8:before{animation-delay:-.5s}.circles-container .circle9{transform:rotate(240deg)}.circles-container .circle9:before{animation-delay:-.4s}.circles-container .circle10{transform:rotate(270deg)}.circles-container .circle10:before{animation-delay:-.3s}.circles-container .circle11{transform:rotate(300deg)}.circles-container .circle11:before{animation-delay:-.2s}.circles-container .circle12{transform:rotate(330deg)}.circles-container .circle12:before{animation-delay:-.1s}@keyframes bounce-delay{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}@keyframes circle-fade-delay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
1963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CircleLoaderComponent, decorators: [{
1964
+ type: Component,
1965
+ args: [{ selector: 'sfc-circle-loader', template: "<div *ngIf=\"show$ | async\" class=\"preloader\" [ngClass]=\"preLoaderClasses\">\r\n <div class=\"circles-container\" [ngClass]=\"type\">\r\n <div class=\"circle1\"></div>\r\n <div class=\"circle2\"></div>\r\n <div class=\"circle3\"></div>\r\n <div class=\"circle4\"></div>\r\n <div class=\"circle5\"></div>\r\n <div class=\"circle6\"></div>\r\n <div class=\"circle7\"></div>\r\n <div class=\"circle8\"></div>\r\n <div class=\"circle9\"></div>\r\n <div class=\"circle10\"></div>\r\n <div class=\"circle11\"></div>\r\n <div class=\"circle12\"></div>\r\n </div>\r\n</div>", styles: [".preloader{position:relative;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.preloader.background{opacity:.7}.preloader.background,:host-context(.sfc-default-theme) .preloader.background{background-color:#fff}:host-context(.sfc-dark-theme) .preloader.background{background-color:#656d78}.preloader.global{z-index:9999;position:fixed}.preloader.local{z-index:9998;position:absolute}\n", ".circles-container{position:relative;width:2.5em;height:2.5em}.circles-container div{width:100%;height:100%;position:absolute;left:0;top:0}.circles-container div:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;border-radius:100%;animation:bounce-delay 1.2s infinite ease-in-out both}.circles-container div:before,:host-context(.sfc-default-theme) .circles-container div:before{background-color:#545e61}:host-context(.sfc-dark-theme) .circles-container div:before{background-color:#fff}.circles-container.fading div:before{animation-name:circle-fade-delay}.circles-container .circle2{transform:rotate(30deg)}.circles-container .circle2:before{animation-delay:-1.1s}.circles-container .circle3{transform:rotate(60deg)}.circles-container .circle3:before{animation-delay:-1s}.circles-container .circle4{transform:rotate(90deg)}.circles-container .circle4:before{animation-delay:-.9s}.circles-container .circle5{transform:rotate(120deg)}.circles-container .circle5:before{animation-delay:-.8s}.circles-container .circle6{transform:rotate(150deg)}.circles-container .circle6:before{animation-delay:-.7s}.circles-container .circle7{transform:rotate(180deg)}.circles-container .circle7:before{animation-delay:-.6s}.circles-container .circle8{transform:rotate(210deg)}.circles-container .circle8:before{animation-delay:-.5s}.circles-container .circle9{transform:rotate(240deg)}.circles-container .circle9:before{animation-delay:-.4s}.circles-container .circle10{transform:rotate(270deg)}.circles-container .circle10:before{animation-delay:-.3s}.circles-container .circle11{transform:rotate(300deg)}.circles-container .circle11:before{animation-delay:-.2s}.circles-container .circle12{transform:rotate(330deg)}.circles-container .circle12:before{animation-delay:-.1s}@keyframes bounce-delay{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}@keyframes circle-fade-delay{0%,39%,to{opacity:0}40%{opacity:1}}\n"] }]
1966
+ }], propDecorators: { type: [{
1967
+ type: Input
1968
+ }] } });
1969
+
1970
+ var ModalTemplate;
1971
+ (function (ModalTemplate) {
1972
+ ModalTemplate["Body"] = "body";
1973
+ ModalTemplate["Header"] = "header";
1974
+ ModalTemplate["Footer"] = "footer";
1975
+ })(ModalTemplate || (ModalTemplate = {}));
1976
+
1977
+ class ModalService {
1978
+ constructor() {
1979
+ this.subject = new BehaviorSubject({ open: false });
1980
+ this.modal$ = this.subject.asObservable();
1981
+ }
1982
+ get isOpen() {
1983
+ return this.subject.value.open;
1984
+ }
1985
+ toggle() {
1986
+ this.subject.next({ open: !this.isOpen });
1987
+ }
1988
+ close() {
1989
+ this.subject.next({ open: false });
1990
+ }
1991
+ open(args) {
1992
+ this.args = args;
1993
+ this.subject.next({ open: true, args: args });
1994
+ }
1995
+ }
1996
+ ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1997
+ ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, providedIn: 'root' });
1998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, decorators: [{
1999
+ type: Injectable,
2000
+ args: [{
2001
+ providedIn: 'root'
2002
+ }]
2003
+ }] });
2004
+
2005
+ class TemplateContentComponent {
2006
+ get showDefault() {
2007
+ return !isDefined(this.referenceContent)
2008
+ && !isDefined(this.templateContent);
2009
+ }
2010
+ get templateContent() {
2011
+ var _a;
2012
+ const templateRef = firstOrDefault((_a = this.templatesContent) === null || _a === void 0 ? void 0 : _a.toArray(), t => t.templateName == this.templateType);
2013
+ return (templateRef === null || templateRef === void 0 ? void 0 : templateRef.template) || null;
2014
+ }
2015
+ }
2016
+ TemplateContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TemplateContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2017
+ TemplateContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TemplateContentComponent, selector: "sfc-template-content", inputs: { contextData: "contextData", referenceContent: "referenceContent", templateType: "templateType", templatesContent: "templatesContent", defaultContent: "defaultContent" }, ngImport: i0, template: "<ng-container *ngIf=\"referenceContent;else template\">\r\n <ng-container *ngTemplateOutlet=\"referenceContent;context:{$implicit: contextData}\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #template>\r\n <ng-container *ngTemplateOutlet=\"templateContent;context:{$implicit: contextData}\">\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-container *ngIf=\"defaultContent && showDefault\">\r\n <ng-container *ngTemplateOutlet=\"defaultContent;context:{$implicit: contextData}\"></ng-container>\r\n</ng-container>", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
2018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TemplateContentComponent, decorators: [{
2019
+ type: Component,
2020
+ args: [{ selector: 'sfc-template-content', template: "<ng-container *ngIf=\"referenceContent;else template\">\r\n <ng-container *ngTemplateOutlet=\"referenceContent;context:{$implicit: contextData}\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #template>\r\n <ng-container *ngTemplateOutlet=\"templateContent;context:{$implicit: contextData}\">\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-container *ngIf=\"defaultContent && showDefault\">\r\n <ng-container *ngTemplateOutlet=\"defaultContent;context:{$implicit: contextData}\"></ng-container>\r\n</ng-container>", styles: [":host{display:contents}\n"] }]
2021
+ }], propDecorators: { contextData: [{
2022
+ type: Input
2023
+ }], referenceContent: [{
2024
+ type: Input
2025
+ }], templateType: [{
2026
+ type: Input
2027
+ }], templatesContent: [{
2028
+ type: Input
2029
+ }], defaultContent: [{
2030
+ type: Input
2031
+ }] } });
2032
+
2033
+ class CloseComponent {
2034
+ constructor() {
2035
+ this.faTimes = faTimes;
2036
+ }
2037
+ }
2038
+ CloseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CloseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2039
+ CloseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CloseComponent, selector: "sfc-close", ngImport: i0, template: "<div class=\"container\">\r\n <fa-icon [icon]=\"faTimes\"></fa-icon>\r\n</div>", styles: [":host{color:#545e61;cursor:pointer}:host:hover{color:#ffce54}\n"], dependencies: [{ kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
2040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CloseComponent, decorators: [{
2041
+ type: Component,
2042
+ args: [{ selector: 'sfc-close', template: "<div class=\"container\">\r\n <fa-icon [icon]=\"faTimes\"></fa-icon>\r\n</div>", styles: [":host{color:#545e61;cursor:pointer}:host:hover{color:#ffce54}\n"] }]
2043
+ }] });
2044
+
2045
+ class DefaultModalHeaderComponent {
2046
+ constructor(modalService) {
2047
+ this.modalService = modalService;
2048
+ this.DEFAULT_MODAL_HEADER_MODEL = {
2049
+ icon: faWindowRestore,
2050
+ showCloseIcon: true,
2051
+ text: 'Modal'
2052
+ };
2053
+ }
2054
+ get icon() {
2055
+ var _a;
2056
+ return ((_a = this.model) === null || _a === void 0 ? void 0 : _a.icon) || faWindowRestore;
2057
+ }
2058
+ ngOnInit() {
2059
+ if (!isDefined(this.model))
2060
+ this.model = this.DEFAULT_MODAL_HEADER_MODEL;
2061
+ }
2062
+ onClose() {
2063
+ this.modalService.close();
2064
+ }
2065
+ }
2066
+ DefaultModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalHeaderComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
2067
+ DefaultModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <fa-icon *ngIf=\"icon\" class=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <span *ngIf=\"model.text\" class=\"label\">{{model.text}}</span>\r\n <sfc-close *ngIf=\"model.showCloseIcon\" (click)=\"onClose()\"></sfc-close>\r\n </div>\r\n\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{width:100%;padding-bottom:.5em}:host .container .content{display:flex;align-items:center;justify-content:center;padding:.5em 0}:host .container .content .icon{position:absolute;left:1.5em;font-size:1.3em}:host .container .content .label{font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em}:host .container .content sfc-close{position:absolute;right:1.5em}:host .container ::ng-deep sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container ::ng-deep sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }, { kind: "component", type: CloseComponent, selector: "sfc-close" }] });
2068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalHeaderComponent, decorators: [{
2069
+ type: Component,
2070
+ args: [{ selector: 'sfc-default-modal-header', template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <fa-icon *ngIf=\"icon\" class=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <span *ngIf=\"model.text\" class=\"label\">{{model.text}}</span>\r\n <sfc-close *ngIf=\"model.showCloseIcon\" (click)=\"onClose()\"></sfc-close>\r\n </div>\r\n\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{width:100%;padding-bottom:.5em}:host .container .content{display:flex;align-items:center;justify-content:center;padding:.5em 0}:host .container .content .icon{position:absolute;left:1.5em;font-size:1.3em}:host .container .content .label{font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em}:host .container .content sfc-close{position:absolute;right:1.5em}:host .container ::ng-deep sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container ::ng-deep sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}\n"] }]
2071
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { model: [{
2072
+ type: Input
2073
+ }] } });
2074
+
2075
+ class DefaultModalFooterComponent {
2076
+ constructor(modalService) {
2077
+ this.modalService = modalService;
2078
+ this.DEFAULT_MODAL_FOOTER_MODEL = {
2079
+ cancelButton: true,
2080
+ applyButton: true,
2081
+ applyButtonText: 'Ok',
2082
+ cancelButtonText: 'Cancel'
2083
+ };
2084
+ this.BUTTON_CUSTOM_SIZE = 0.9;
2085
+ this.ComponentSize = ComponentSize;
2086
+ this.ButtonType = ButtonType;
2087
+ }
2088
+ ngOnInit() {
2089
+ if (!this.model) {
2090
+ this.model = Object.assign({}, this.DEFAULT_MODAL_FOOTER_MODEL);
2091
+ }
2092
+ else {
2093
+ if (isNullOrEmptyString(this.model.applyButtonText))
2094
+ this.model.applyButtonText = this.DEFAULT_MODAL_FOOTER_MODEL.applyButtonText;
2095
+ if (isNullOrEmptyString(this.model.cancelButtonText))
2096
+ this.model.cancelButtonText = this.DEFAULT_MODAL_FOOTER_MODEL.cancelButtonText;
2097
+ if (!isDefined(this.model.applyButton))
2098
+ this.model.applyButton = this.DEFAULT_MODAL_FOOTER_MODEL.applyButton;
2099
+ if (!isDefined(this.model.cancelButton))
2100
+ this.model.cancelButton = this.DEFAULT_MODAL_FOOTER_MODEL.cancelButton;
2101
+ }
2102
+ }
2103
+ onButtonClick(isCancelButton = false) {
2104
+ var _a;
2105
+ if (isCancelButton) {
2106
+ if (this.model.onCancel) {
2107
+ return (_a = this.model) === null || _a === void 0 ? void 0 : _a.onCancel(this.modalService.args);
2108
+ }
2109
+ }
2110
+ else {
2111
+ if (this.model.onApply) {
2112
+ return this.model.onApply(this.modalService.args);
2113
+ }
2114
+ }
2115
+ this.modalService.toggle();
2116
+ }
2117
+ }
2118
+ DefaultModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalFooterComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
2119
+ DefaultModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.applyButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model.cancelButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.cancelButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick(true)\">\r\n </sfc-button>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;justify-content:center;align-items:center;width:100%}:host .container sfc-button:first-child{padding-right:.3em}:host .container sfc-button:nth-child(2){padding-left:.3em}:host .container ::ng-deep sfc-button .button.rounded{min-width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }, { kind: "component", type: ButtonComponent, selector: "sfc-button", inputs: ["text", "iconBefore", "iconAfter", "disabled", "types"] }] });
2120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalFooterComponent, decorators: [{
2121
+ type: Component,
2122
+ args: [{ selector: 'sfc-default-modal-footer', template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.applyButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model.cancelButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.cancelButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick(true)\">\r\n </sfc-button>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;justify-content:center;align-items:center;width:100%}:host .container sfc-button:first-child{padding-right:.3em}:host .container sfc-button:nth-child(2){padding-left:.3em}:host .container ::ng-deep sfc-button .button.rounded{min-width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"] }]
2123
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { model: [{
2124
+ type: Input
2125
+ }] } });
2126
+
2127
+ class ModalComponent {
2128
+ constructor(modalService) {
2129
+ this.modalService = modalService;
2130
+ this.ModalTemplate = ModalTemplate;
2131
+ // End Defaults
2132
+ this.hideOnEsc = true;
2133
+ this.hideOnClickOutside = true;
2134
+ // hide modal header (even default)
2135
+ this.showHeader = true;
2136
+ // hide modal footer (even default)
2137
+ this.showFooter = true;
2138
+ }
2139
+ onEscapeKeyDownHandler() {
2140
+ if (this.hideOnEsc)
2141
+ this.close();
2142
+ }
2143
+ close() {
2144
+ this.modalService.close();
2145
+ }
2146
+ }
2147
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
2148
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalComponent, selector: "sfc-modal", inputs: { body: "body", header: "header", footer: "footer", defaultHeaderModel: "defaultHeaderModel", defaultFooterModel: "defaultFooterModel", hideOnEsc: "hideOnEsc", hideOnClickOutside: "hideOnClickOutside", showHeader: "showHeader", showFooter: "showFooter" }, host: { listeners: { "document:keydown.escape": "onEscapeKeyDownHandler()" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div *ngIf=\"showHeader\" class=\"header\">\r\n\r\n <sfc-template-content [referenceContent]=\"header\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Header\" [defaultContent]=\"defaultHeader\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultHeader>\r\n <sfc-default-modal-header [model]=\"defaultHeaderModel\"> </sfc-default-modal-header>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n <div class=\"body\">\r\n\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Body\">\r\n </sfc-template-content>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"footer\">\r\n\r\n <sfc-template-content [referenceContent]=\"footer\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Footer\" [defaultContent]=\"defaultFooter\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultFooter>\r\n <sfc-default-modal-footer [model]=\"defaultFooterModel\"></sfc-default-modal-footer>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".overlay{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#0009;-webkit-backface-visibility:visible;backface-visibility:visible;animation:expand-overlay .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-overlay{0%{visibility:hidden;opacity:0}}.overlay .content{display:flex;align-items:center;position:relative;padding:.9em 1.5em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;box-shadow:0 .125em .625em #656d78;transform:scale(1);flex-direction:column;animation:expand-modal .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-modal{0%{visibility:hidden;opacity:0;transform:scale(1.2)}}.overlay .content>div{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#545e61;flex-direction:row;display:flex;flex:0 0 auto;justify-content:center}.overlay .content>div.body{overflow-y:auto;flex:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { kind: "component", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: ["model"] }, { kind: "component", type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: ["model"] }], animations: [
2149
+ trigger('hideOverlay', [
2150
+ state('initial', style({ opacity: 1, visibility: 'visible' })),
2151
+ state('void', style({ opacity: 0, visibility: 'hidden' })),
2152
+ transition('* => void', [
2153
+ group([
2154
+ query(':self', [
2155
+ animate('400ms cubic-bezier(.55, 0, .1, 1)', style({
2156
+ opacity: 0,
2157
+ visibility: 'hidden'
2158
+ }))
2159
+ ]),
2160
+ query('@hideContent', [animateChild()])
2161
+ ])
2162
+ ])
2163
+ ]),
2164
+ trigger('hideContent', [
2165
+ state('initial', style({ opacity: 1, visibility: 'visible', transform: 'scale(1)' })),
2166
+ state('void', style({ opacity: 0, visibility: 'hidden', transform: 'scale(1.2)' })),
2167
+ transition('* => void', animate('400ms cubic-bezier(.55, 0, .1, 1)'))
2168
+ ])
2169
+ ] });
2170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, decorators: [{
2171
+ type: Component,
2172
+ args: [{ selector: 'sfc-modal', animations: [
2173
+ trigger('hideOverlay', [
2174
+ state('initial', style({ opacity: 1, visibility: 'visible' })),
2175
+ state('void', style({ opacity: 0, visibility: 'hidden' })),
2176
+ transition('* => void', [
2177
+ group([
2178
+ query(':self', [
2179
+ animate('400ms cubic-bezier(.55, 0, .1, 1)', style({
2180
+ opacity: 0,
2181
+ visibility: 'hidden'
2182
+ }))
2183
+ ]),
2184
+ query('@hideContent', [animateChild()])
2185
+ ])
2186
+ ])
2187
+ ]),
2188
+ trigger('hideContent', [
2189
+ state('initial', style({ opacity: 1, visibility: 'visible', transform: 'scale(1)' })),
2190
+ state('void', style({ opacity: 0, visibility: 'hidden', transform: 'scale(1.2)' })),
2191
+ transition('* => void', animate('400ms cubic-bezier(.55, 0, .1, 1)'))
2192
+ ])
2193
+ ], template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div *ngIf=\"showHeader\" class=\"header\">\r\n\r\n <sfc-template-content [referenceContent]=\"header\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Header\" [defaultContent]=\"defaultHeader\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultHeader>\r\n <sfc-default-modal-header [model]=\"defaultHeaderModel\"> </sfc-default-modal-header>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n <div class=\"body\">\r\n\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Body\">\r\n </sfc-template-content>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"footer\">\r\n\r\n <sfc-template-content [referenceContent]=\"footer\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Footer\" [defaultContent]=\"defaultFooter\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultFooter>\r\n <sfc-default-modal-footer [model]=\"defaultFooterModel\"></sfc-default-modal-footer>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".overlay{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#0009;-webkit-backface-visibility:visible;backface-visibility:visible;animation:expand-overlay .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-overlay{0%{visibility:hidden;opacity:0}}.overlay .content{display:flex;align-items:center;position:relative;padding:.9em 1.5em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;box-shadow:0 .125em .625em #656d78;transform:scale(1);flex-direction:column;animation:expand-modal .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-modal{0%{visibility:hidden;opacity:0;transform:scale(1.2)}}.overlay .content>div{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#545e61;flex-direction:row;display:flex;flex:0 0 auto;justify-content:center}.overlay .content>div.body{overflow-y:auto;flex:0}\n"] }]
2194
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { body: [{
2195
+ type: Input
2196
+ }], header: [{
2197
+ type: Input
2198
+ }], footer: [{
2199
+ type: Input
2200
+ }], defaultHeaderModel: [{
2201
+ type: Input
2202
+ }], defaultFooterModel: [{
2203
+ type: Input
2204
+ }], hideOnEsc: [{
2205
+ type: Input
2206
+ }], hideOnClickOutside: [{
2207
+ type: Input
2208
+ }], showHeader: [{
2209
+ type: Input
2210
+ }], showFooter: [{
2211
+ type: Input
2212
+ }], onEscapeKeyDownHandler: [{
2213
+ type: HostListener,
2214
+ args: ['document:keydown.escape']
2215
+ }], templates: [{
2216
+ type: ContentChildren,
2217
+ args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
2218
+ }] } });
2219
+
2220
+ class ModalOpenOnClickDirective {
2221
+ constructor(templateRef, viewContainer, modalService) {
2222
+ this.templateRef = templateRef;
2223
+ this.viewContainer = viewContainer;
2224
+ this.modalService = modalService;
2225
+ this.clickHandler = (() => {
2226
+ this.viewContainer.clear();
2227
+ this.viewContainer.createEmbeddedView(this.templateRef);
2228
+ this.modalService.toggle();
2229
+ }).bind(this);
2230
+ this.elements = [];
2231
+ }
2232
+ set modalOpenOnClick(elements) {
2233
+ if (!isDefined(elements))
2234
+ return;
2235
+ if (elements instanceof HTMLElement)
2236
+ this.elements = [elements];
2237
+ else
2238
+ this.elements = elements;
2239
+ this.elements.forEach(el => {
2240
+ el.addEventListener('click', this.clickHandler);
2241
+ });
2242
+ }
2243
+ ngOnInit() {
2244
+ this._closeSubscription = this.modalService.modal$
2245
+ .pipe(filter((event) => !event.open))
2246
+ .subscribe(() => this.viewContainer.clear());
2247
+ }
2248
+ ngOnDestroy() {
2249
+ var _a;
2250
+ (_a = this._closeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2251
+ this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
2252
+ }
2253
+ }
2254
+ ModalOpenOnClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
2255
+ ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
2256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
2257
+ type: Directive,
2258
+ args: [{
2259
+ selector: '[sfcModalOpenOnClick]'
2260
+ }]
2261
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { modalOpenOnClick: [{
2262
+ type: Input,
2263
+ args: ['sfcModalOpenOnClick']
2264
+ }] } });
2265
+
2266
+ class ModalOpenDirective {
2267
+ constructor(templateRef, viewContainer, modalService) {
2268
+ this.templateRef = templateRef;
2269
+ this.viewContainer = viewContainer;
2270
+ this.modalService = modalService;
2271
+ this._openSubscription = this.modalService.modal$
2272
+ .subscribe((event) => {
2273
+ this.viewContainer.clear();
2274
+ if (event.open)
2275
+ this.viewContainer.createEmbeddedView(this.templateRef);
2276
+ });
2277
+ }
2278
+ ngOnDestroy() {
2279
+ this._openSubscription.unsubscribe();
2280
+ }
2281
+ }
2282
+ ModalOpenDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
2283
+ ModalOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenDirective, selector: "[sfcModalOpen]", ngImport: i0 });
2284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, decorators: [{
2285
+ type: Directive,
2286
+ args: [{
2287
+ selector: '[sfcModalOpen]'
2288
+ }]
2289
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; } });
2290
+
2291
+ class HamburgerBaseComponent {
2292
+ constructor() {
2293
+ this.open = false;
2294
+ this.onClick = () => this.open = !this.open;
2295
+ }
2296
+ }
2297
+ HamburgerBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HamburgerBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2298
+ HamburgerBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: HamburgerBaseComponent, inputs: { open: "open" }, host: { listeners: { "click": "onClick()" }, properties: { "class.open": "this.open" } }, ngImport: i0 });
2299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HamburgerBaseComponent, decorators: [{
2300
+ type: Directive
2301
+ }], propDecorators: { open: [{
2302
+ type: Input
2303
+ }, {
2304
+ type: HostBinding,
2305
+ args: ['class.' + UIClass.Open]
2306
+ }], onClick: [{
2307
+ type: HostListener,
2308
+ args: ['click']
2309
+ }] } });
2310
+
2311
+ class HamburgerComponent extends HamburgerBaseComponent {
2312
+ }
2313
+ HamburgerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HamburgerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2314
+ HamburgerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: HamburgerComponent, selector: "sfc-hamburger", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"line half start\"></div>\r\n <div class=\"line\"></div>\r\n <div class=\"line half end\"></div>\r\n</div>", styles: [".container{width:1em;height:1em;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer;transition:transform .33s ease-out}:host(.open) .container{transform:rotate(-45deg)}.container .line{transition:background-color .5s ease;border-radius:.31em;width:100%;height:.25em}.container .line,:host-context(.sfc-default-theme) .container .line{background-color:#545e61}:host-context(.sfc-dark-theme) .container .line{background-color:#fff}.container .line.half{width:50%}.container .line.start{transition:transform .33s cubic-bezier(.54,-.81,.57,.57),background-color .5s ease;transform-origin:right}:host(.open) .container .line.start{transform:rotate(-90deg) translate(.1375em)}.container .line.end{align-self:flex-end;transition:transform .33s cubic-bezier(.54,-.81,.57,.57),background-color .5s ease;transform-origin:left}:host(.open) .container .line.end{transform:rotate(-90deg) translate(-.1875em)}.container:hover .line{background-color:#ffce54!important}\n"] });
2315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HamburgerComponent, decorators: [{
2316
+ type: Component,
2317
+ args: [{ selector: 'sfc-hamburger', template: "<div class=\"container\">\r\n <div class=\"line half start\"></div>\r\n <div class=\"line\"></div>\r\n <div class=\"line half end\"></div>\r\n</div>", styles: [".container{width:1em;height:1em;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer;transition:transform .33s ease-out}:host(.open) .container{transform:rotate(-45deg)}.container .line{transition:background-color .5s ease;border-radius:.31em;width:100%;height:.25em}.container .line,:host-context(.sfc-default-theme) .container .line{background-color:#545e61}:host-context(.sfc-dark-theme) .container .line{background-color:#fff}.container .line.half{width:50%}.container .line.start{transition:transform .33s cubic-bezier(.54,-.81,.57,.57),background-color .5s ease;transform-origin:right}:host(.open) .container .line.start{transform:rotate(-90deg) translate(.1375em)}.container .line.end{align-self:flex-end;transition:transform .33s cubic-bezier(.54,-.81,.57,.57),background-color .5s ease;transform-origin:left}:host(.open) .container .line.end{transform:rotate(-90deg) translate(-.1875em)}.container:hover .line{background-color:#ffce54!important}\n"] }]
2318
+ }] });
2319
+
2320
+ class HamburgerMenuComponent extends HamburgerBaseComponent {
2321
+ constructor() {
2322
+ super(...arguments);
2323
+ this.label = 'Menu';
2324
+ }
2325
+ }
2326
+ HamburgerMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HamburgerMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2327
+ HamburgerMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: HamburgerMenuComponent, selector: "sfc-hamburger-menu", inputs: { label: "label" }, usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <span> &nbsp;</span>\r\n <span> &nbsp;</span>\r\n <span> &nbsp;</span>\r\n <span> &nbsp;</span>\r\n <span class=\"text\">{{label}}</span>\r\n</div>", styles: [":host .container{display:inline-block;cursor:pointer}:host .container span{position:relative;transition:background .5s ease;display:block;height:.125em;margin-bottom:.1875em}:host .container span,:host-context(.sfc-default-theme) :host .container span{background:#545e61}:host-context(.sfc-dark-theme) :host .container span{background:#fff}:host .container span.text{font-size:.4375em;letter-spacing:.4px;transition:opacity 1s ease-in-out,color .5s ease;background:none!important;opacity:1;text-transform:uppercase}:host .container span.text,:host-context(.sfc-default-theme) :host .container span.text{color:#545e61}:host-context(.sfc-dark-theme) :host .container span.text{color:#fff}:host .container:hover span{background:#ffce54}:host .container:hover span.text{color:#ffce54}:host.open .container span:nth-child(1){transform:rotate(-45deg);top:.625em}:host.open .container span:nth-child(2),:host.open .container span:nth-child(3){width:0;opacity:0}:host.open .container span:nth-child(4){transform:rotate(45deg);top:-.3125em}:host.open .container span.text{opacity:0}\n"] });
2328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HamburgerMenuComponent, decorators: [{
2329
+ type: Component,
2330
+ args: [{ selector: 'sfc-hamburger-menu', template: "<div class=\"container\">\r\n <span> &nbsp;</span>\r\n <span> &nbsp;</span>\r\n <span> &nbsp;</span>\r\n <span> &nbsp;</span>\r\n <span class=\"text\">{{label}}</span>\r\n</div>", styles: [":host .container{display:inline-block;cursor:pointer}:host .container span{position:relative;transition:background .5s ease;display:block;height:.125em;margin-bottom:.1875em}:host .container span,:host-context(.sfc-default-theme) :host .container span{background:#545e61}:host-context(.sfc-dark-theme) :host .container span{background:#fff}:host .container span.text{font-size:.4375em;letter-spacing:.4px;transition:opacity 1s ease-in-out,color .5s ease;background:none!important;opacity:1;text-transform:uppercase}:host .container span.text,:host-context(.sfc-default-theme) :host .container span.text{color:#545e61}:host-context(.sfc-dark-theme) :host .container span.text{color:#fff}:host .container:hover span{background:#ffce54}:host .container:hover span.text{color:#ffce54}:host.open .container span:nth-child(1){transform:rotate(-45deg);top:.625em}:host.open .container span:nth-child(2),:host.open .container span:nth-child(3){width:0;opacity:0}:host.open .container span:nth-child(4){transform:rotate(45deg);top:-.3125em}:host.open .container span.text{opacity:0}\n"] }]
2331
+ }], propDecorators: { label: [{
2332
+ type: Input
2333
+ }] } });
2334
+
2335
+ class DotsComponent {
2336
+ constructor() {
2337
+ this.open = false;
2338
+ this.direction = Direction.Horizontal;
2339
+ this.onClick = () => this.open = !this.open;
2340
+ }
2341
+ }
2342
+ DotsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DotsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2343
+ DotsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DotsComponent, selector: "sfc-dots", inputs: { open: "open", direction: "direction" }, host: { listeners: { "click": "onClick()" }, properties: { "class.open": "this.open", "class": "this.direction" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"dots-container\">\r\n <div class=\"dot\"></div>\r\n <div class=\"dot\"></div>\r\n <div class=\"dot\"></div>\r\n </div>\r\n</div>", styles: [":host{display:inline-flex;transform:rotate(0);transition:all .3s cubic-bezier(.175,.885,.32,1.275);cursor:pointer}:host.open{transform:rotate(90deg)}:host.vertical{transform:rotate(90deg)}:host.vertical.open{transform:rotate(0)}:host .container{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;flex:1;margin:.25em}:host .container .dots-container{display:flex;flex-flow:row wrap;justify-content:center;align-items:center;position:relative}:host .container .dots-container .dot{width:.3125em;height:.3125em;transition:background .3s ease;margin:.06em;border-radius:50%;display:block}:host .container .dots-container .dot,:host-context(.sfc-default-theme) :host .container .dots-container .dot{background:#545e61}:host-context(.sfc-dark-theme) :host .container .dots-container .dot{background:#fff}:host:hover .container,:host:focus .container{outline:none}:host:hover .container .dots-container .dot,:host-context(.sfc-default-theme) :host:hover .container .dots-container .dot,:host:focus .container .dots-container .dot,:host-context(.sfc-default-theme) :host:focus .container .dots-container .dot{background:#ffce54}:host-context(.sfc-dark-theme) :host:hover .container .dots-container .dot,:host-context(.sfc-dark-theme) :host:focus .container .dots-container .dot{background:#ffce54}\n"] });
2344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DotsComponent, decorators: [{
2345
+ type: Component,
2346
+ args: [{ selector: 'sfc-dots', template: "<div class=\"container\">\r\n <div class=\"dots-container\">\r\n <div class=\"dot\"></div>\r\n <div class=\"dot\"></div>\r\n <div class=\"dot\"></div>\r\n </div>\r\n</div>", styles: [":host{display:inline-flex;transform:rotate(0);transition:all .3s cubic-bezier(.175,.885,.32,1.275);cursor:pointer}:host.open{transform:rotate(90deg)}:host.vertical{transform:rotate(90deg)}:host.vertical.open{transform:rotate(0)}:host .container{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;flex:1;margin:.25em}:host .container .dots-container{display:flex;flex-flow:row wrap;justify-content:center;align-items:center;position:relative}:host .container .dots-container .dot{width:.3125em;height:.3125em;transition:background .3s ease;margin:.06em;border-radius:50%;display:block}:host .container .dots-container .dot,:host-context(.sfc-default-theme) :host .container .dots-container .dot{background:#545e61}:host-context(.sfc-dark-theme) :host .container .dots-container .dot{background:#fff}:host:hover .container,:host:focus .container{outline:none}:host:hover .container .dots-container .dot,:host-context(.sfc-default-theme) :host:hover .container .dots-container .dot,:host:focus .container .dots-container .dot,:host-context(.sfc-default-theme) :host:focus .container .dots-container .dot{background:#ffce54}:host-context(.sfc-dark-theme) :host:hover .container .dots-container .dot,:host-context(.sfc-dark-theme) :host:focus .container .dots-container .dot{background:#ffce54}\n"] }]
2347
+ }], propDecorators: { open: [{
2348
+ type: Input
2349
+ }, {
2350
+ type: HostBinding,
2351
+ args: ['class.' + UIClass.Open]
2352
+ }], direction: [{
2353
+ type: Input
2354
+ }, {
2355
+ type: HostBinding,
2356
+ args: ['class']
2357
+ }], onClick: [{
2358
+ type: HostListener,
2359
+ args: ['click']
2360
+ }] } });
2361
+
2362
+ class ToggleSwitcherComponent {
2363
+ constructor() {
2364
+ this.active = false;
2365
+ this.disabled = false;
2366
+ this.onClick = () => this.active = !this.active;
2367
+ this.leftModel = { label: 'Left' };
2368
+ this.rightModel = { label: 'Right' };
2369
+ }
2370
+ }
2371
+ ToggleSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToggleSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2372
+ ToggleSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToggleSwitcherComponent, selector: "sfc-toggle-switcher", inputs: { active: "active", disabled: "disabled", leftModel: "leftModel", rightModel: "rightModel" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active", "class.disabled": "this.disabled" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"toggle\"></div>\r\n <div class=\"names\">\r\n <p class=\"left\">\r\n <fa-icon *ngIf=\"leftModel.icon\" [icon]=\"leftModel.icon\"></fa-icon>\r\n <span>{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\">\r\n <fa-icon *ngIf=\"rightModel.icon\" [icon]=\"rightModel.icon\"></fa-icon>\r\n <span>{{rightModel.label}}</span>\r\n </p>\r\n </div>\r\n</div>", styles: [":host .container,:host .toggle{height:100%;border-radius:100px}:host .container{width:100%;background-color:#e6e9ed;color:#545e61;border-radius:100px;position:relative;cursor:pointer}:host .container .toggle{position:absolute;width:50%;background-color:#fff;box-shadow:0 .125em .5em #656d78;transition:transform .3s cubic-bezier(.25,.46,.45,.94)}:host .container .names{font-size:90%;font-weight:bolder;width:100%;height:100%;position:relative;display:flex;justify-content:space-around;align-items:center;-webkit-user-select:none;user-select:none;overflow:hidden}:host .container .names p{font-size:90%;text-align:center;margin:0;padding:.5em 1em}:host .container .names p.right{opacity:.5}:host.active .container{background-color:#e6e9ed}:host.active .container .toggle{transform:translate(100%);background-color:#fff}:host.active .container .names{color:#545e61}:host.active .container .names .left{opacity:.5}:host.active .container .names .right{opacity:1}:host.disabled{pointer-events:none}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{background-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{background-color:#656d78}:host.disabled .container .toggle{box-shadow:none}:host.disabled .container .toggle,:host-context(.sfc-default-theme) :host.disabled .container .toggle{background-color:#e6e9ed}:host-context(.sfc-dark-theme) :host.disabled .container .toggle{background-color:#aab2bd}:host.disabled .container .names,:host-context(.sfc-default-theme) :host.disabled .container .names{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .container .names{color:#e9e9e9}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
2373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToggleSwitcherComponent, decorators: [{
2374
+ type: Component,
2375
+ args: [{ selector: 'sfc-toggle-switcher', template: "<div class=\"container\">\r\n <div class=\"toggle\"></div>\r\n <div class=\"names\">\r\n <p class=\"left\">\r\n <fa-icon *ngIf=\"leftModel.icon\" [icon]=\"leftModel.icon\"></fa-icon>\r\n <span>{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\">\r\n <fa-icon *ngIf=\"rightModel.icon\" [icon]=\"rightModel.icon\"></fa-icon>\r\n <span>{{rightModel.label}}</span>\r\n </p>\r\n </div>\r\n</div>", styles: [":host .container,:host .toggle{height:100%;border-radius:100px}:host .container{width:100%;background-color:#e6e9ed;color:#545e61;border-radius:100px;position:relative;cursor:pointer}:host .container .toggle{position:absolute;width:50%;background-color:#fff;box-shadow:0 .125em .5em #656d78;transition:transform .3s cubic-bezier(.25,.46,.45,.94)}:host .container .names{font-size:90%;font-weight:bolder;width:100%;height:100%;position:relative;display:flex;justify-content:space-around;align-items:center;-webkit-user-select:none;user-select:none;overflow:hidden}:host .container .names p{font-size:90%;text-align:center;margin:0;padding:.5em 1em}:host .container .names p.right{opacity:.5}:host.active .container{background-color:#e6e9ed}:host.active .container .toggle{transform:translate(100%);background-color:#fff}:host.active .container .names{color:#545e61}:host.active .container .names .left{opacity:.5}:host.active .container .names .right{opacity:1}:host.disabled{pointer-events:none}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{background-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{background-color:#656d78}:host.disabled .container .toggle{box-shadow:none}:host.disabled .container .toggle,:host-context(.sfc-default-theme) :host.disabled .container .toggle{background-color:#e6e9ed}:host-context(.sfc-dark-theme) :host.disabled .container .toggle{background-color:#aab2bd}:host.disabled .container .names,:host-context(.sfc-default-theme) :host.disabled .container .names{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .container .names{color:#e9e9e9}\n"] }]
2376
+ }], ctorParameters: function () { return []; }, propDecorators: { active: [{
2377
+ type: Input
2378
+ }, {
2379
+ type: HostBinding,
2380
+ args: ['class.' + UIClass.Active]
2381
+ }], disabled: [{
2382
+ type: Input
2383
+ }, {
2384
+ type: HostBinding,
2385
+ args: ['class.' + UIClass.Disabled]
2386
+ }], leftModel: [{
2387
+ type: Input
2388
+ }], rightModel: [{
2389
+ type: Input
2390
+ }], onClick: [{
2391
+ type: HostListener,
2392
+ args: ['click']
2393
+ }] } });
2394
+
2395
+ var CheckmarkType;
2396
+ (function (CheckmarkType) {
2397
+ CheckmarkType["Square"] = "square";
2398
+ CheckmarkType["Rounded"] = "rounded";
2399
+ CheckmarkType["Circle"] = "circle";
2400
+ })(CheckmarkType || (CheckmarkType = {}));
2401
+
2402
+ class CheckmarkComponent {
2403
+ constructor() {
2404
+ this.active = false;
2405
+ this.disabled = false;
2406
+ this.icon = faCheck;
2407
+ this.type = CheckmarkType.Rounded;
2408
+ }
2409
+ }
2410
+ CheckmarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckmarkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2411
+ CheckmarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CheckmarkComponent, selector: "sfc-checkmark", inputs: { active: "active", disabled: "disabled", icon: "icon", type: "type" }, host: { properties: { "class.active": "this.active", "class.disabled": "this.disabled", "class": "this.type" } }, ngImport: i0, template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <fa-icon [sfcShowHideElement]=\"active\" [icon]=\"icon\"></fa-icon>\r\n </span>\r\n</div>", styles: [":host{display:inline-block}:host,:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#fff}:host .check{border:.125em solid;background:transparent;transition:border-color .5s ease,background .5s ease;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center}:host .check,:host-context(.sfc-default-theme) :host .check{border-color:#545e61}:host-context(.sfc-dark-theme) :host .check{border-color:#fff}:host .check fa-icon{font-size:.8em;transition:opacity .3s ease}:host .check fa-icon,:host-context(.sfc-default-theme) :host .check fa-icon{opacity:.5}:host-context(.sfc-dark-theme) :host .check fa-icon{opacity:.8}:host .check:hover{border-color:#ffce54}:host .check:hover fa-icon{color:#ffce54}:host .check:hover fa-icon,:host-context(.sfc-default-theme) :host .check:hover fa-icon{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover fa-icon{opacity:1}:host.active .check{border-color:#ffce54;background:#ffce54}:host.active .check fa-icon{opacity:1;transform:scale(0);color:#fff;-webkit-text-stroke:0;animation:icon .3s cubic-bezier(1,.008,.565,1.65) .1s 1 forwards}@keyframes icon{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}:host.circle .check{border-radius:50%}:host.rounded .check{border-radius:15%}:host.disabled{pointer-events:none}:host.disabled .check{color:#fff;border-style:dashed}:host.disabled .check,:host-context(.sfc-default-theme) :host.disabled .check{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .check{border-color:#656d78}:host.disabled.active .check,:host-context(.sfc-default-theme) :host.disabled.active .check{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled.active .check{background:#656d78}\n"], dependencies: [{ kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }] });
2412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckmarkComponent, decorators: [{
2413
+ type: Component,
2414
+ args: [{ selector: 'sfc-checkmark', template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <fa-icon [sfcShowHideElement]=\"active\" [icon]=\"icon\"></fa-icon>\r\n </span>\r\n</div>", styles: [":host{display:inline-block}:host,:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#fff}:host .check{border:.125em solid;background:transparent;transition:border-color .5s ease,background .5s ease;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center}:host .check,:host-context(.sfc-default-theme) :host .check{border-color:#545e61}:host-context(.sfc-dark-theme) :host .check{border-color:#fff}:host .check fa-icon{font-size:.8em;transition:opacity .3s ease}:host .check fa-icon,:host-context(.sfc-default-theme) :host .check fa-icon{opacity:.5}:host-context(.sfc-dark-theme) :host .check fa-icon{opacity:.8}:host .check:hover{border-color:#ffce54}:host .check:hover fa-icon{color:#ffce54}:host .check:hover fa-icon,:host-context(.sfc-default-theme) :host .check:hover fa-icon{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover fa-icon{opacity:1}:host.active .check{border-color:#ffce54;background:#ffce54}:host.active .check fa-icon{opacity:1;transform:scale(0);color:#fff;-webkit-text-stroke:0;animation:icon .3s cubic-bezier(1,.008,.565,1.65) .1s 1 forwards}@keyframes icon{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}:host.circle .check{border-radius:50%}:host.rounded .check{border-radius:15%}:host.disabled{pointer-events:none}:host.disabled .check{color:#fff;border-style:dashed}:host.disabled .check,:host-context(.sfc-default-theme) :host.disabled .check{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .check{border-color:#656d78}:host.disabled.active .check,:host-context(.sfc-default-theme) :host.disabled.active .check{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled.active .check{background:#656d78}\n"] }]
2415
+ }], propDecorators: { active: [{
2416
+ type: Input
2417
+ }, {
2418
+ type: HostBinding,
2419
+ args: ['class.' + UIClass.Active]
2420
+ }], disabled: [{
2421
+ type: Input
2422
+ }, {
2423
+ type: HostBinding,
2424
+ args: ['class.' + UIClass.Disabled]
2425
+ }], icon: [{
2426
+ type: Input
2427
+ }], type: [{
2428
+ type: Input
2429
+ }, {
2430
+ type: HostBinding,
2431
+ args: ['class']
2432
+ }] } });
2433
+
2434
+ class PaginationConstants {
2435
+ }
2436
+ PaginationConstants.DEFAULT_SIZE = 5;
2437
+ PaginationConstants.DEFAULT_PAGE = 1;
2438
+ PaginationConstants.DEFAULT_COUNT = 3;
2439
+
2440
+ class PaginationService {
2441
+ constructor() {
2442
+ /**
2443
+ * Handle page changing
2444
+ */
2445
+ this.pageSubject = new Subject();
2446
+ this.page$ = this.pageSubject.asObservable();
2447
+ }
2448
+ /** Need for init pagination observables */
2449
+ init(data$, page = PaginationConstants.DEFAULT_PAGE, pageSize = PaginationConstants.DEFAULT_SIZE) {
2450
+ if (isDefined(data$))
2451
+ this.initObservables(data$, page, pageSize);
2452
+ }
2453
+ /**
2454
+ * Move to page
2455
+ */
2456
+ page(page) {
2457
+ this.pageSubject.next(page);
2458
+ }
2459
+ initObservables(data$, page, pageSize) {
2460
+ this.total$ = data$.pipe(map((p) => p.length));
2461
+ this.totalPages$ = this.total$.pipe(map((total) => Math.ceil(total / pageSize)));
2462
+ this.pagination$ = combineLatest([this.totalPages$, this.page$.pipe(startWith(page))])
2463
+ .pipe(map(([total, page]) => {
2464
+ return {
2465
+ page: page > total ? PaginationConstants.DEFAULT_PAGE : page,
2466
+ next: Math.min(page + 1, total),
2467
+ previous: Math.max(1, page - 1),
2468
+ total: total
2469
+ };
2470
+ }));
2471
+ }
2472
+ }
2473
+ PaginationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2474
+ PaginationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationService, providedIn: 'root' });
2475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationService, decorators: [{
2476
+ type: Injectable,
2477
+ args: [{
2478
+ providedIn: 'root'
2479
+ }]
2480
+ }] });
2481
+
2482
+ class PaginationComponent {
2483
+ constructor(service) {
2484
+ this.service = service;
2485
+ this.faChevronLeft = faChevronLeft;
2486
+ this.faChevronRight = faChevronRight;
2487
+ // max limit for pagination bts
2488
+ this.count = PaginationConstants.DEFAULT_COUNT;
2489
+ /**
2490
+ * show full range of data
2491
+ */
2492
+ this.full = false;
2493
+ /**
2494
+ * show first and last page's btn
2495
+ */
2496
+ this.limits = false;
2497
+ }
2498
+ ngOnInit() {
2499
+ if (!isDefined(this.service.pagination$))
2500
+ this.service.init(this.data$);
2501
+ if (isDefined(this.service.pagination$)) {
2502
+ this.vm$ = this.service.pagination$.pipe(map((event) => {
2503
+ const range = this.initRange(event);
2504
+ return {
2505
+ range: range,
2506
+ any: event.total > 0,
2507
+ firstPage: this.showStartLimit(range, event),
2508
+ lastPage: this.showEndLimit(range, event),
2509
+ previousPage: event.page != PaginationConstants.DEFAULT_PAGE,
2510
+ nextPage: event.total > event.page,
2511
+ page: event.page,
2512
+ previous: event.previous,
2513
+ next: event.next,
2514
+ total: event.total
2515
+ };
2516
+ }));
2517
+ }
2518
+ }
2519
+ onPageClick(page) {
2520
+ this.service.page(page);
2521
+ }
2522
+ get showLimitPages() {
2523
+ return this.limits && !this.full;
2524
+ }
2525
+ showStartLimit(range, event) {
2526
+ return this.showLimitPages && event.page !== PaginationConstants.DEFAULT_PAGE
2527
+ && !hasItem(range, PaginationConstants.DEFAULT_PAGE);
2528
+ }
2529
+ showEndLimit(range, event) {
2530
+ return this.showLimitPages && event.total !== event.page && !hasItem(range, event.total);
2531
+ }
2532
+ initRange(event) {
2533
+ let start = 1, end = event.total + 1;
2534
+ if (!this.full) {
2535
+ const fullRange = this.range(1, event.total + 1), pageIndex = fullRange.indexOf(event.page), pageCount = Math.min(event.total, this.count);
2536
+ let rangeStart = 0, rangeEnd = 0;
2537
+ if (pageCount == PaginationConstants.DEFAULT_PAGE) {
2538
+ rangeStart = rangeEnd = pageIndex;
2539
+ }
2540
+ else {
2541
+ let allowedCount = pageCount - 1, partValue = Math.ceil(allowedCount / 2), leftValue = pageIndex - partValue < 0 ? pageIndex : partValue, rightToExtend = allowedCount - leftValue, rightValue = rightToExtend < 0 ? 0 : rightToExtend;
2542
+ if (pageIndex + rightValue >= event.total)
2543
+ leftValue += pageIndex + rightValue - event.total + 1;
2544
+ rangeStart = pageIndex - leftValue;
2545
+ rangeEnd = pageIndex + rightValue;
2546
+ }
2547
+ start = rangeStart + 1;
2548
+ end = Math.min(event.total + 1, rangeEnd + 2);
2549
+ }
2550
+ return this.range(start, end);
2551
+ }
2552
+ range(start, stop, step = 1) {
2553
+ if (!stop) {
2554
+ start = 0;
2555
+ stop = start;
2556
+ }
2557
+ return Array.from(new Array(Number((stop - start) / step)), (_, i) => start + i * step);
2558
+ }
2559
+ }
2560
+ PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationComponent, deps: [{ token: PaginationService }], target: i0.ɵɵFactoryTarget.Component });
2561
+ PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PaginationComponent, selector: "sfc-pagination", inputs: { count: "count", full: "full", limits: "limits", data$: "data$" }, ngImport: i0, template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <sfc-delimeter></sfc-delimeter>\r\n <ul *ngIf=\"vm.any\">\r\n <li [sfcShowHideElement]=\"vm.previousPage\" (click)=\"onPageClick(vm.previous)\">\r\n <button class=\"limit\">\r\n <fa-icon [icon]=\"faChevronLeft\"></fa-icon>\r\n </button>\r\n </li>\r\n <li *ngIf=\"vm.firstPage\" (click)=\"onPageClick(1)\">\r\n <button>1</button>\r\n </li>\r\n <li *ngIf=\"vm.firstPage\">\r\n <span>...</span>\r\n </li>\r\n <li *ngFor=\"let page of vm.range\" (click)=\"onPageClick(page)\">\r\n <button [class.active]=\"vm.page === page\">{{page}}</button>\r\n </li>\r\n <li *ngIf=\"vm.lastPage\">\r\n <span>...</span>\r\n </li>\r\n <li *ngIf=\"vm.lastPage\" (click)=\"onPageClick(vm.total)\">\r\n <button>{{vm.total}}</button>\r\n </li>\r\n <li [sfcShowHideElement]=\"vm.nextPage\" (click)=\"onPageClick(vm.next)\">\r\n <button class=\"limit\">\r\n <fa-icon [icon]=\"faChevronRight\"></fa-icon>\r\n </button>\r\n </li>\r\n </ul>\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{width:100%;display:inline-block}:host .container{position:relative;text-align:center}:host .container ul{list-style:none;margin:0;padding:0;display:flex;justify-content:center;-webkit-user-select:none;user-select:none}:host .container ul li{display:block;float:left;padding:.31em}:host .container ul li:first-child{border:none}:host .container ul li button,:host .container ul li span{background:none;border:none;border-radius:50%;box-sizing:border-box;display:block;font-size:1em;height:2.5em;min-width:2.5em;line-height:2.5em;padding:0}:host .container ul li button,:host-context(.sfc-default-theme) :host .container ul li button,:host .container ul li span,:host-context(.sfc-default-theme) :host .container ul li span{color:#0009}:host-context(.sfc-dark-theme) :host .container ul li button,:host-context(.sfc-dark-theme) :host .container ul li span{color:#fff}:host .container ul li button{outline:none;position:relative;transition:all .17s linear}:host .container ul li button,:host-context(.sfc-default-theme) :host .container ul li button{color:#545e61}:host-context(.sfc-dark-theme) :host .container ul li button{color:#fff}:host .container ul li button:before{border-radius:50%;content:\"\";cursor:pointer;height:0;left:50%;opacity:0;position:absolute;transform:translate(-50%,-50%);transition:all .17s linear;top:50%;width:0}:host .container ul li button:before,:host-context(.sfc-default-theme) :host .container ul li button:before{background:#545e61}:host-context(.sfc-dark-theme) :host .container ul li button:before{background:#f5f7fa}:host .container ul li button:hover:not(.active),:host-context(.sfc-default-theme) :host .container ul li button:hover:not(.active){color:#545e61}:host-context(.sfc-dark-theme) :host .container ul li button:hover:not(.active){color:#fff}:host .container ul li button:hover:not(.active):before{animation:hover-animation .51s linear forwards;width:2.5em;height:2.5em}:host .container ul li button.active{color:#545e61!important}:host .container ul li button.active,:host-context(.sfc-default-theme) :host .container ul li button.active{background:rgba(0,0,0,.1019607843)}:host-context(.sfc-dark-theme) :host .container ul li button.active{background:#f5f7fa}@keyframes hover-animation{0%{opacity:1}to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
2562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationComponent, decorators: [{
2563
+ type: Component,
2564
+ args: [{ selector: 'sfc-pagination', template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <sfc-delimeter></sfc-delimeter>\r\n <ul *ngIf=\"vm.any\">\r\n <li [sfcShowHideElement]=\"vm.previousPage\" (click)=\"onPageClick(vm.previous)\">\r\n <button class=\"limit\">\r\n <fa-icon [icon]=\"faChevronLeft\"></fa-icon>\r\n </button>\r\n </li>\r\n <li *ngIf=\"vm.firstPage\" (click)=\"onPageClick(1)\">\r\n <button>1</button>\r\n </li>\r\n <li *ngIf=\"vm.firstPage\">\r\n <span>...</span>\r\n </li>\r\n <li *ngFor=\"let page of vm.range\" (click)=\"onPageClick(page)\">\r\n <button [class.active]=\"vm.page === page\">{{page}}</button>\r\n </li>\r\n <li *ngIf=\"vm.lastPage\">\r\n <span>...</span>\r\n </li>\r\n <li *ngIf=\"vm.lastPage\" (click)=\"onPageClick(vm.total)\">\r\n <button>{{vm.total}}</button>\r\n </li>\r\n <li [sfcShowHideElement]=\"vm.nextPage\" (click)=\"onPageClick(vm.next)\">\r\n <button class=\"limit\">\r\n <fa-icon [icon]=\"faChevronRight\"></fa-icon>\r\n </button>\r\n </li>\r\n </ul>\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{width:100%;display:inline-block}:host .container{position:relative;text-align:center}:host .container ul{list-style:none;margin:0;padding:0;display:flex;justify-content:center;-webkit-user-select:none;user-select:none}:host .container ul li{display:block;float:left;padding:.31em}:host .container ul li:first-child{border:none}:host .container ul li button,:host .container ul li span{background:none;border:none;border-radius:50%;box-sizing:border-box;display:block;font-size:1em;height:2.5em;min-width:2.5em;line-height:2.5em;padding:0}:host .container ul li button,:host-context(.sfc-default-theme) :host .container ul li button,:host .container ul li span,:host-context(.sfc-default-theme) :host .container ul li span{color:#0009}:host-context(.sfc-dark-theme) :host .container ul li button,:host-context(.sfc-dark-theme) :host .container ul li span{color:#fff}:host .container ul li button{outline:none;position:relative;transition:all .17s linear}:host .container ul li button,:host-context(.sfc-default-theme) :host .container ul li button{color:#545e61}:host-context(.sfc-dark-theme) :host .container ul li button{color:#fff}:host .container ul li button:before{border-radius:50%;content:\"\";cursor:pointer;height:0;left:50%;opacity:0;position:absolute;transform:translate(-50%,-50%);transition:all .17s linear;top:50%;width:0}:host .container ul li button:before,:host-context(.sfc-default-theme) :host .container ul li button:before{background:#545e61}:host-context(.sfc-dark-theme) :host .container ul li button:before{background:#f5f7fa}:host .container ul li button:hover:not(.active),:host-context(.sfc-default-theme) :host .container ul li button:hover:not(.active){color:#545e61}:host-context(.sfc-dark-theme) :host .container ul li button:hover:not(.active){color:#fff}:host .container ul li button:hover:not(.active):before{animation:hover-animation .51s linear forwards;width:2.5em;height:2.5em}:host .container ul li button.active{color:#545e61!important}:host .container ul li button.active,:host-context(.sfc-default-theme) :host .container ul li button.active{background:rgba(0,0,0,.1019607843)}:host-context(.sfc-dark-theme) :host .container ul li button.active{background:#f5f7fa}@keyframes hover-animation{0%{opacity:1}to{opacity:0}}\n"] }]
2565
+ }], ctorParameters: function () { return [{ type: PaginationService }]; }, propDecorators: { count: [{
2566
+ type: Input
2567
+ }], full: [{
2568
+ type: Input
2569
+ }], limits: [{
2570
+ type: Input
2571
+ }], data$: [{
2572
+ type: Input
2573
+ }] } });
2574
+
2575
+ class SortingConstants {
2576
+ }
2577
+ SortingConstants.DEFAULT_ASCENDING_ICON = faChevronUp;
2578
+ SortingConstants.DEFAULT_DESCENDING_ICON = faChevronDown;
2579
+
2580
+ class SortingService {
2581
+ constructor() {
2582
+ this.sortingSubject = new Subject();
2583
+ this.sorting$ = this.sortingSubject.asObservable();
2584
+ }
2585
+ sort(event) {
2586
+ this.sortingSubject.next(event);
2587
+ }
2588
+ }
2589
+ SortingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2590
+ SortingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortingService, providedIn: 'root' });
2591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortingService, decorators: [{
2592
+ type: Injectable,
2593
+ args: [{
2594
+ providedIn: 'root'
2595
+ }]
2596
+ }] });
2597
+
2598
+ class SortingComponent {
2599
+ constructor(service) {
2600
+ this.service = service;
2601
+ this.SortingDirection = SortingDirection;
2602
+ this.id = CommonConstants.EMPTY_STRING;
2603
+ this.model = { active: false, enabled: false, direction: SortingDirection.Ascending };
2604
+ }
2605
+ get enabled() {
2606
+ return this.model.enabled;
2607
+ }
2608
+ get active() {
2609
+ return this.model.active || false;
2610
+ }
2611
+ sort() {
2612
+ if (this.enabled) {
2613
+ if (this.active) {
2614
+ this.model.direction = this.model.direction === SortingDirection.Ascending
2615
+ ? SortingDirection.Descending
2616
+ : SortingDirection.Ascending;
2617
+ }
2618
+ this.service.sort({ id: this.id, direction: this.model.direction });
2619
+ }
2620
+ }
2621
+ get icon() {
2622
+ const modelIcon = firstOrDefault(this.model.icons, i => i.direction == this.model.direction);
2623
+ return modelIcon ? modelIcon.icon : this.model.direction === SortingDirection.Ascending
2624
+ ? SortingConstants.DEFAULT_ASCENDING_ICON : SortingConstants.DEFAULT_DESCENDING_ICON;
2625
+ }
2626
+ ngOnInit() {
2627
+ if (!isDefined(this.model))
2628
+ this.model = { active: false, enabled: false, direction: SortingDirection.Ascending };
2629
+ // subscribe to sort changes so we can react when other columns are sorted
2630
+ this._subscription = this.service.sorting$.subscribe(event => {
2631
+ // reset this column's sort direction to hide the sort icons
2632
+ if (this.id != event.id)
2633
+ this.model.direction = SortingDirection.Ascending;
2634
+ });
2635
+ }
2636
+ ngOnDestroy() {
2637
+ this._subscription.unsubscribe();
2638
+ }
2639
+ }
2640
+ SortingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortingComponent, deps: [{ token: SortingService }], target: i0.ɵɵFactoryTarget.Component });
2641
+ SortingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: SortingComponent, selector: "sfc-sorting", inputs: { id: "id", model: "model" }, host: { listeners: { "click": "sort()" }, properties: { "class.enabled": "this.enabled", "class.active": "this.active" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div *ngIf=\"enabled\" class=\"icons\">\r\n <fa-icon [icon]=\"icon\"></fa-icon>\r\n </div>\r\n</div>", styles: [":host{cursor:default;text-overflow:ellipsis;overflow:hidden}:host.enabled{cursor:pointer}:host .container{display:flex;min-width:0}:host .container,:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#fff}:host .container:hover{color:#ffce54}:host .container .content{display:flex;-webkit-user-select:none;user-select:none}:host .container .icons{margin:0 .31em;font-size:.7em;display:flex;align-items:center;transition:all .3s}:host.active .container{color:#ffce54}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
2642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortingComponent, decorators: [{
2643
+ type: Component,
2644
+ args: [{ selector: 'sfc-sorting', template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div *ngIf=\"enabled\" class=\"icons\">\r\n <fa-icon [icon]=\"icon\"></fa-icon>\r\n </div>\r\n</div>", styles: [":host{cursor:default;text-overflow:ellipsis;overflow:hidden}:host.enabled{cursor:pointer}:host .container{display:flex;min-width:0}:host .container,:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#fff}:host .container:hover{color:#ffce54}:host .container .content{display:flex;-webkit-user-select:none;user-select:none}:host .container .icons{margin:0 .31em;font-size:.7em;display:flex;align-items:center;transition:all .3s}:host.active .container{color:#ffce54}\n"] }]
2645
+ }], ctorParameters: function () { return [{ type: SortingService }]; }, propDecorators: { id: [{
2646
+ type: Input
2647
+ }], model: [{
2648
+ type: Input
2649
+ }], enabled: [{
2650
+ type: HostBinding,
2651
+ args: [`class.${UIClass.Enabled}`]
2652
+ }], active: [{
2653
+ type: HostBinding,
2654
+ args: [`class.${UIClass.Active}`]
2655
+ }], sort: [{
2656
+ type: HostListener,
2657
+ args: ['click']
2658
+ }] } });
2659
+
2660
+ class LoadMoreService {
2661
+ constructor() {
2662
+ this._page = LoadMoreService.START_PAGE;
2663
+ this.moreSubject = new Subject();
2664
+ this.more$ = this.moreSubject.asObservable();
2665
+ }
2666
+ more() {
2667
+ this._page++;
2668
+ this.moreSubject.next(this._page);
2669
+ }
2670
+ reset() {
2671
+ this._page = LoadMoreService.START_PAGE;
2672
+ }
2673
+ }
2674
+ LoadMoreService.START_PAGE = 1;
2675
+ LoadMoreService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadMoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2676
+ LoadMoreService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadMoreService, providedIn: 'root' });
2677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadMoreService, decorators: [{
2678
+ type: Injectable,
2679
+ args: [{
2680
+ providedIn: 'root'
2681
+ }]
2682
+ }] });
2683
+
2684
+ var LoadContainerType;
2685
+ (function (LoadContainerType) {
2686
+ LoadContainerType["Dropdown"] = "dropdown";
2687
+ LoadContainerType["Table"] = "table";
2688
+ })(LoadContainerType || (LoadContainerType = {}));
2689
+ var LoadChangesSource;
2690
+ (function (LoadChangesSource) {
2691
+ LoadChangesSource["Parameters"] = "parameters";
2692
+ LoadChangesSource["Data"] = "data";
2693
+ })(LoadChangesSource || (LoadChangesSource = {}));
2694
+
2695
+ class LoadContainerConstants {
2696
+ }
2697
+ LoadContainerConstants.DEFAULT_PAGE_SIZE = 5;
2698
+ LoadContainerConstants.DEFAULT_NOT_FOUND_LABEL = 'Not found';
2699
+
2700
+ class LoadMoreButtonComponent {
2701
+ constructor() {
2702
+ this.DEFAULT_LABEL = 'Show more';
2703
+ this.icon = faChevronCircleDown;
2704
+ this.more = new EventEmitter();
2705
+ }
2706
+ ngOnInit() {
2707
+ if (isNullOrEmptyString(this.label))
2708
+ this.label = this.DEFAULT_LABEL;
2709
+ }
2710
+ }
2711
+ LoadMoreButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadMoreButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2712
+ LoadMoreButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoadMoreButtonComponent, selector: "sfc-load-more-button", inputs: { label: "label", icon: "icon" }, outputs: { more: "more" }, ngImport: i0, template: "<div class=\"container\">\r\n <sfc-delimeter></sfc-delimeter>\r\n <div class=\"button\" (sfcMouseDown)=\"more.emit($event)\">\r\n <fa-icon [icon]=\"icon\"></fa-icon>\r\n <span>{{label}}</span>\r\n </div>\r\n</div>", styles: [":host{cursor:default}:host .container{text-align:center;background-color:#fff}:host .container .button{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;cursor:pointer;transition:color .5s;padding:.5em 0 1em}:host .container .button,:host-context(.sfc-default-theme) :host .container .button{color:#545e61}:host-context(.sfc-dark-theme) :host .container .button{color:#fff}:host .container .button fa-icon{font-size:.7em;margin-right:.31em}:host .container .button span{font-size:.6em;font-weight:700;text-transform:uppercase}:host .container .button:hover{color:#ffce54}\n"], dependencies: [{ kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: MouseDownDirective, selector: "[sfcMouseDown]", inputs: ["button"], outputs: ["sfcMouseDown"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }] });
2713
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadMoreButtonComponent, decorators: [{
2714
+ type: Component,
2715
+ args: [{ selector: 'sfc-load-more-button', template: "<div class=\"container\">\r\n <sfc-delimeter></sfc-delimeter>\r\n <div class=\"button\" (sfcMouseDown)=\"more.emit($event)\">\r\n <fa-icon [icon]=\"icon\"></fa-icon>\r\n <span>{{label}}</span>\r\n </div>\r\n</div>", styles: [":host{cursor:default}:host .container{text-align:center;background-color:#fff}:host .container .button{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;cursor:pointer;transition:color .5s;padding:.5em 0 1em}:host .container .button,:host-context(.sfc-default-theme) :host .container .button{color:#545e61}:host-context(.sfc-dark-theme) :host .container .button{color:#fff}:host .container .button fa-icon{font-size:.7em;margin-right:.31em}:host .container .button span{font-size:.6em;font-weight:700;text-transform:uppercase}:host .container .button:hover{color:#ffce54}\n"] }]
2716
+ }], propDecorators: { label: [{
2717
+ type: Input
2718
+ }], icon: [{
2719
+ type: Input
2720
+ }], more: [{
2721
+ type: Output
2722
+ }] } });
2723
+
2724
+ class LoadContainerComponent {
2725
+ constructor(loaderService, loadMoreService) {
2726
+ this.loaderService = loaderService;
2727
+ this.loadMoreService = loadMoreService;
2728
+ this.ComponentSize = ComponentSize;
2729
+ this.Position = Position;
2730
+ this.type = LoadContainerType.Dropdown;
2731
+ this.open = false;
2732
+ this.loadMore = true;
2733
+ this.showEmpty = true;
2734
+ this.showLoadMoreButton = true;
2735
+ this.notFoundLabel = LoadContainerConstants.DEFAULT_NOT_FOUND_LABEL;
2736
+ this.handleError = new EventEmitter();
2737
+ this.handleSuccess = new EventEmitter();
2738
+ this.handleLoading = new EventEmitter();
2739
+ this.next = false;
2740
+ this.empty = false;
2741
+ this._loading = false;
2742
+ // define what source emit changes for data (1. data changes, 2. predicate conditions)
2743
+ this.source = LoadChangesSource.Data;
2744
+ }
2745
+ set model(model) {
2746
+ if (isDefined(model)) {
2747
+ const parameters$ = this.buildParameters(model.predicate$), data$ = isDefined(model.loader) ?
2748
+ this.buildDynamic(parameters$, model.loader) : this.buildStatic(parameters$, model);
2749
+ if (isDefined(this._subscription))
2750
+ this._subscription.unsubscribe();
2751
+ this._subscription = data$.subscribe({
2752
+ next: (result) => this.success(result),
2753
+ error: (error) => this.error(error)
2754
+ });
2755
+ }
2756
+ }
2757
+ get scrollPosition() {
2758
+ return !this.allowLoadMore || this.showLoadMoreButton ? [] : [Position.Bottom];
2759
+ }
2760
+ get allowLoadMore() { return this.next && this.loadMore; }
2761
+ get hideLoadMoreButton() { return !(this.allowLoadMore && this.showLoadMoreButton); }
2762
+ get isEmpty() { return this.empty && this.showEmpty; }
2763
+ set loading(value) {
2764
+ this._loading = value;
2765
+ if (value)
2766
+ this.loaderService.show(this.id, true);
2767
+ else
2768
+ this.loaderService.hide(this.id);
2769
+ this.handleLoading.emit(value);
2770
+ }
2771
+ ngOnDestroy() {
2772
+ if (this._subscription)
2773
+ this._subscription.unsubscribe();
2774
+ }
2775
+ more(event) {
2776
+ event.preventDefault();
2777
+ this.loadMoreService.more();
2778
+ }
2779
+ onScroll() {
2780
+ if (this.allowLoadMore)
2781
+ this.loadMoreService.more();
2782
+ }
2783
+ success(result) {
2784
+ this.next = result.next;
2785
+ this.loading = false;
2786
+ this.empty = !any(result.items);
2787
+ this.handleSuccess.emit(result);
2788
+ }
2789
+ error(error) {
2790
+ this.loading = false;
2791
+ this.empty = false;
2792
+ this.handleError.emit(error);
2793
+ }
2794
+ buildParameters(predicate$) {
2795
+ const parameters$ = (predicate$ || EMPTY.pipe(startWith(null))).pipe(tap((predicateParameters) => {
2796
+ if (predicateParameters)
2797
+ this.resetParameters();
2798
+ }), switchMap((value) => {
2799
+ return this.loadMoreService.more$.pipe(startWith(LoadMoreService.START_PAGE), tap(() => {
2800
+ this.source = LoadChangesSource.Parameters;
2801
+ this.loading = true;
2802
+ }), map((page) => {
2803
+ return { params: value, page: page };
2804
+ }));
2805
+ }));
2806
+ return parameters$;
2807
+ }
2808
+ buildDynamic(parameters$, loader) {
2809
+ return parameters$.pipe(switchMap((parameters) => loader(parameters, this.source).pipe(tap((model) => {
2810
+ if (model.reset) {
2811
+ this.source = LoadChangesSource.Data;
2812
+ this.resetParameters();
2813
+ }
2814
+ }))));
2815
+ }
2816
+ buildStatic(parameters$, model) {
2817
+ const data$ = (model.data$ || of([])).pipe(tap(_ => this.source = LoadChangesSource.Data));
2818
+ return combineLatest([parameters$, data$]).pipe(map(([parameters, items]) => {
2819
+ const reset = this.source == LoadChangesSource.Data;
2820
+ if (reset && parameters.page != LoadMoreService.START_PAGE) {
2821
+ // if data changed need to start from start
2822
+ this.resetParameters();
2823
+ parameters = { params: parameters.params, page: 1 };
2824
+ }
2825
+ const filtered = model.filter ? model.filter(items, parameters) : items, size = model.size || LoadContainerConstants.DEFAULT_PAGE_SIZE, data = filtered ? {
2826
+ items: skip(filtered, parameters.page, size),
2827
+ next: parameters.page < Math.ceil(filtered.length / size),
2828
+ reset
2829
+ } : { items: [], next: false, reset };
2830
+ return data;
2831
+ }));
2832
+ }
2833
+ resetParameters() {
2834
+ if (isDefined(this.contentEl))
2835
+ this.contentEl.nativeElement.scrollTop = 0;
2836
+ this.loadMoreService.reset();
2837
+ }
2838
+ }
2839
+ LoadContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadContainerComponent, deps: [{ token: LoaderService }, { token: LoadMoreService }], target: i0.ɵɵFactoryTarget.Component });
2840
+ LoadContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoadContainerComponent, selector: "sfc-load-container", inputs: { id: "id", type: "type", open: "open", loadMore: "loadMore", showEmpty: "showEmpty", showLoadMoreButton: "showLoadMoreButton", loadMoreLabel: "loadMoreLabel", notFoundLabel: "notFoundLabel", model: "model", scrollTarget: "scrollTarget" }, outputs: { handleError: "handleError", handleSuccess: "handleSuccess", handleLoading: "handleLoading" }, host: { properties: { "class": "this.type", "class.open": "this.open", "class.empty": "this.isEmpty", "class.loading": "this._loading" } }, providers: [LoadMoreService], viewQueries: [{ propertyName: "contentEl", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div class=\"container\">\r\n <sfc-bounce-loader [id]=\"id\" [sfcComponentSize]=\"ComponentSize.Small\"></sfc-bounce-loader>\r\n <div #content class=\"content\" [sfcScrollIntoView]=\"scrollTarget\" (sfcScrollTracker)=\"onScroll()\" [positions]=\"scrollPosition\">\r\n <ng-content></ng-content>\r\n <div (sfcMouseDown)=\"$event.preventDefault()\">\r\n <sfc-load-more-button [hidden]=\"hideLoadMoreButton\" (more)=\"more($event)\" [label]=\"loadMoreLabel\">\r\n </sfc-load-more-button>\r\n <div *ngIf=\"isEmpty\" class=\"empty\">{{notFoundLabel}}</div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;height:inherit;position:relative}:host .container{height:inherit}:host .container .content{cursor:initial;overflow-y:auto;height:inherit}:host .container .content,:host-context(.sfc-default-theme) :host .container .content{background:#fff}:host-context(.sfc-dark-theme) :host .container .content{background:#fff}:host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container .content sfc-load-more-button ::ng-deep .container .button,:host-context(.sfc-default-theme) :host .container .content sfc-load-more-button ::ng-deep .container .button{color:#545e61}:host-context(.sfc-dark-theme) :host .container .content sfc-load-more-button ::ng-deep .container .button{color:#545e61}:host .container .content sfc-load-more-button ::ng-deep .container .button:hover{color:#ffce54}:host .container .content .empty{display:flex;align-items:center;justify-content:center;color:#545e61;cursor:default;height:100%;font-size:.8em;-webkit-user-select:none;user-select:none;padding:.7em}:host.dropdown .container .content{display:none;opacity:0;max-height:12.5em;box-shadow:0 .125em .125em #00000024,0 .18em .06em -.125em #0000001f,0 .06em .31em #0003}:host.dropdown.open .container .content{display:block;opacity:1}:host ::ng-deep ::-webkit-scrollbar{width:.375em;height:.375em}:host ::ng-deep ::-webkit-scrollbar-track{border-radius:.625em;background:#e9e9e9}:host ::ng-deep ::-webkit-scrollbar-thumb{border-radius:.625em;background:rgba(0,0,0,.2)}:host ::ng-deep ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}:host ::ng-deep ::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.6)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MouseDownDirective, selector: "[sfcMouseDown]", inputs: ["button"], outputs: ["sfcMouseDown"] }, { kind: "directive", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }, { kind: "directive", type: ScrollTrackerDirective, selector: "[sfcScrollTracker]", inputs: ["positions"], outputs: ["sfcScrollTracker"] }, { kind: "directive", type: ScrollIntoViewDirective, selector: "[sfcScrollIntoView]", inputs: ["sfcScrollIntoView", "local", "options"] }, { kind: "component", type: LoadMoreButtonComponent, selector: "sfc-load-more-button", inputs: ["label", "icon"], outputs: ["more"] }, { kind: "component", type: BounceLoaderComponent, selector: "sfc-bounce-loader" }] });
2841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadContainerComponent, decorators: [{
2842
+ type: Component,
2843
+ args: [{ selector: 'sfc-load-container', providers: [LoadMoreService], template: "<div class=\"container\">\r\n <sfc-bounce-loader [id]=\"id\" [sfcComponentSize]=\"ComponentSize.Small\"></sfc-bounce-loader>\r\n <div #content class=\"content\" [sfcScrollIntoView]=\"scrollTarget\" (sfcScrollTracker)=\"onScroll()\" [positions]=\"scrollPosition\">\r\n <ng-content></ng-content>\r\n <div (sfcMouseDown)=\"$event.preventDefault()\">\r\n <sfc-load-more-button [hidden]=\"hideLoadMoreButton\" (more)=\"more($event)\" [label]=\"loadMoreLabel\">\r\n </sfc-load-more-button>\r\n <div *ngIf=\"isEmpty\" class=\"empty\">{{notFoundLabel}}</div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;height:inherit;position:relative}:host .container{height:inherit}:host .container .content{cursor:initial;overflow-y:auto;height:inherit}:host .container .content,:host-context(.sfc-default-theme) :host .container .content{background:#fff}:host-context(.sfc-dark-theme) :host .container .content{background:#fff}:host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container .content sfc-load-more-button ::ng-deep .container ::ng-deep sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container .content sfc-load-more-button ::ng-deep .container .button,:host-context(.sfc-default-theme) :host .container .content sfc-load-more-button ::ng-deep .container .button{color:#545e61}:host-context(.sfc-dark-theme) :host .container .content sfc-load-more-button ::ng-deep .container .button{color:#545e61}:host .container .content sfc-load-more-button ::ng-deep .container .button:hover{color:#ffce54}:host .container .content .empty{display:flex;align-items:center;justify-content:center;color:#545e61;cursor:default;height:100%;font-size:.8em;-webkit-user-select:none;user-select:none;padding:.7em}:host.dropdown .container .content{display:none;opacity:0;max-height:12.5em;box-shadow:0 .125em .125em #00000024,0 .18em .06em -.125em #0000001f,0 .06em .31em #0003}:host.dropdown.open .container .content{display:block;opacity:1}:host ::ng-deep ::-webkit-scrollbar{width:.375em;height:.375em}:host ::ng-deep ::-webkit-scrollbar-track{border-radius:.625em;background:#e9e9e9}:host ::ng-deep ::-webkit-scrollbar-thumb{border-radius:.625em;background:rgba(0,0,0,.2)}:host ::ng-deep ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}:host ::ng-deep ::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.6)}\n"] }]
2844
+ }], ctorParameters: function () { return [{ type: LoaderService }, { type: LoadMoreService }]; }, propDecorators: { id: [{
2845
+ type: Input
2846
+ }], type: [{
2847
+ type: Input
2848
+ }, {
2849
+ type: HostBinding,
2850
+ args: ['class']
2851
+ }], open: [{
2852
+ type: Input
2853
+ }, {
2854
+ type: HostBinding,
2855
+ args: [`class.${UIClass.Open}`]
2856
+ }], loadMore: [{
2857
+ type: Input
2858
+ }], showEmpty: [{
2859
+ type: Input
2860
+ }], showLoadMoreButton: [{
2861
+ type: Input
2862
+ }], loadMoreLabel: [{
2863
+ type: Input
2864
+ }], notFoundLabel: [{
2865
+ type: Input
2866
+ }], model: [{
2867
+ type: Input
2868
+ }], scrollTarget: [{
2869
+ type: Input
2870
+ }], handleError: [{
2871
+ type: Output
2872
+ }], handleSuccess: [{
2873
+ type: Output
2874
+ }], handleLoading: [{
2875
+ type: Output
2876
+ }], contentEl: [{
2877
+ type: ViewChild,
2878
+ args: ['content']
2879
+ }], isEmpty: [{
2880
+ type: HostBinding,
2881
+ args: [`class.${UIClass.Empty}`]
2882
+ }], _loading: [{
2883
+ type: HostBinding,
2884
+ args: [`class.${UIClass.Loading}`]
2885
+ }] } });
2886
+
2887
+ class IconComponent {
2888
+ get showImage() {
2889
+ return !isNullOrEmptyString(this.imageSrc) && !isDefined(this.icon);
2890
+ }
2891
+ }
2892
+ IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2893
+ IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IconComponent, selector: "sfc-icon", inputs: { icon: "icon", imageSrc: "imageSrc" }, ngImport: i0, template: "<div class=\"container\">\r\n <fa-icon *ngIf=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <img *ngIf=\"showImage\" [src]=\"imageSrc\">\r\n</div>", styles: [":host{display:inline-block}:host .container{display:flex;align-items:center;justify-content:center}:host .container img{max-width:1.3em}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
2894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IconComponent, decorators: [{
2895
+ type: Component,
2896
+ args: [{ selector: 'sfc-icon', template: "<div class=\"container\">\r\n <fa-icon *ngIf=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <img *ngIf=\"showImage\" [src]=\"imageSrc\">\r\n</div>", styles: [":host{display:inline-block}:host .container{display:flex;align-items:center;justify-content:center}:host .container img{max-width:1.3em}\n"] }]
2897
+ }], propDecorators: { icon: [{
2898
+ type: Input
2899
+ }], imageSrc: [{
2900
+ type: Input
2901
+ }] } });
2902
+
2903
+ class NgxSfcCommonModule {
2904
+ }
2905
+ NgxSfcCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2906
+ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, declarations: [
2907
+ // directives
2908
+ ClickOutsideDirective,
2909
+ ShowHideElementDirective,
2910
+ IfDirective,
2911
+ ThrowElementOnHoverDirective,
2912
+ TemplateReferenceDirective,
2913
+ MouseDownDirective,
2914
+ ComponentSizeDirective,
2915
+ DestroyParentDirective,
2916
+ DomChangesDirective,
2917
+ ScrollTrackerDirective,
2918
+ ScrollIntoViewDirective,
2919
+ ImageLoadDirective,
2920
+ // components
2921
+ ButtonComponent,
2922
+ TooltipComponent,
2923
+ DelimeterComponent,
2924
+ ToggleSwitcherComponent,
2925
+ CheckmarkComponent,
2926
+ TemplateContentComponent,
2927
+ CloseComponent,
2928
+ HamburgerComponent,
2929
+ HamburgerMenuComponent,
2930
+ DotsComponent,
2931
+ PaginationComponent,
2932
+ SortingComponent,
2933
+ LoadMoreButtonComponent,
2934
+ LoadContainerComponent,
2935
+ IconComponent,
2936
+ // loaders
2937
+ BounceLoaderComponent,
2938
+ CircleLoaderComponent,
2939
+ // modal
2940
+ ModalComponent,
2941
+ ModalOpenDirective,
2942
+ ModalOpenOnClickDirective,
2943
+ DefaultModalHeaderComponent,
2944
+ DefaultModalFooterComponent,
2945
+ // pipes
2946
+ SwitchMultiCasePipe
2947
+ ], imports: [CommonModule,
2948
+ FontAwesomeModule], exports: [
2949
+ // directives
2950
+ ClickOutsideDirective,
2951
+ ShowHideElementDirective,
2952
+ IfDirective,
2953
+ ThrowElementOnHoverDirective,
2954
+ TemplateReferenceDirective,
2955
+ MouseDownDirective,
2956
+ ComponentSizeDirective,
2957
+ DestroyParentDirective,
2958
+ DomChangesDirective,
2959
+ ScrollTrackerDirective,
2960
+ ScrollIntoViewDirective,
2961
+ ImageLoadDirective,
2962
+ // components
2963
+ ButtonComponent,
2964
+ TooltipComponent,
2965
+ DelimeterComponent,
2966
+ CloseComponent,
2967
+ CheckmarkComponent,
2968
+ TemplateContentComponent,
2969
+ ToggleSwitcherComponent,
2970
+ DotsComponent,
2971
+ HamburgerComponent,
2972
+ HamburgerMenuComponent,
2973
+ PaginationComponent,
2974
+ SortingComponent,
2975
+ LoadMoreButtonComponent,
2976
+ LoadContainerComponent,
2977
+ IconComponent,
2978
+ // loaders
2979
+ BounceLoaderComponent,
2980
+ CircleLoaderComponent,
2981
+ // modal
2982
+ ModalComponent,
2983
+ ModalOpenDirective,
2984
+ ModalOpenOnClickDirective,
2985
+ DefaultModalHeaderComponent,
2986
+ DefaultModalFooterComponent,
2987
+ // pipes
2988
+ SwitchMultiCasePipe
2989
+ ] });
2990
+ NgxSfcCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS], imports: [CommonModule,
2991
+ FontAwesomeModule] });
2992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, decorators: [{
2993
+ type: NgModule,
2994
+ args: [{
2995
+ declarations: [
2996
+ // directives
2997
+ ClickOutsideDirective,
2998
+ ShowHideElementDirective,
2999
+ IfDirective,
3000
+ ThrowElementOnHoverDirective,
3001
+ TemplateReferenceDirective,
3002
+ MouseDownDirective,
3003
+ ComponentSizeDirective,
3004
+ DestroyParentDirective,
3005
+ DomChangesDirective,
3006
+ ScrollTrackerDirective,
3007
+ ScrollIntoViewDirective,
3008
+ ImageLoadDirective,
3009
+ // components
3010
+ ButtonComponent,
3011
+ TooltipComponent,
3012
+ DelimeterComponent,
3013
+ ToggleSwitcherComponent,
3014
+ CheckmarkComponent,
3015
+ TemplateContentComponent,
3016
+ CloseComponent,
3017
+ HamburgerComponent,
3018
+ HamburgerMenuComponent,
3019
+ DotsComponent,
3020
+ PaginationComponent,
3021
+ SortingComponent,
3022
+ LoadMoreButtonComponent,
3023
+ LoadContainerComponent,
3024
+ IconComponent,
3025
+ // loaders
3026
+ BounceLoaderComponent,
3027
+ CircleLoaderComponent,
3028
+ // modal
3029
+ ModalComponent,
3030
+ ModalOpenDirective,
3031
+ ModalOpenOnClickDirective,
3032
+ DefaultModalHeaderComponent,
3033
+ DefaultModalFooterComponent,
3034
+ // pipes
3035
+ SwitchMultiCasePipe
3036
+ ],
3037
+ imports: [
3038
+ CommonModule,
3039
+ FontAwesomeModule
3040
+ ],
3041
+ exports: [
3042
+ // directives
3043
+ ClickOutsideDirective,
3044
+ ShowHideElementDirective,
3045
+ IfDirective,
3046
+ ThrowElementOnHoverDirective,
3047
+ TemplateReferenceDirective,
3048
+ MouseDownDirective,
3049
+ ComponentSizeDirective,
3050
+ DestroyParentDirective,
3051
+ DomChangesDirective,
3052
+ ScrollTrackerDirective,
3053
+ ScrollIntoViewDirective,
3054
+ ImageLoadDirective,
3055
+ // components
3056
+ ButtonComponent,
3057
+ TooltipComponent,
3058
+ DelimeterComponent,
3059
+ CloseComponent,
3060
+ CheckmarkComponent,
3061
+ TemplateContentComponent,
3062
+ ToggleSwitcherComponent,
3063
+ DotsComponent,
3064
+ HamburgerComponent,
3065
+ HamburgerMenuComponent,
3066
+ PaginationComponent,
3067
+ SortingComponent,
3068
+ LoadMoreButtonComponent,
3069
+ LoadContainerComponent,
3070
+ IconComponent,
3071
+ // loaders
3072
+ BounceLoaderComponent,
3073
+ CircleLoaderComponent,
3074
+ // modal
3075
+ ModalComponent,
3076
+ ModalOpenDirective,
3077
+ ModalOpenOnClickDirective,
3078
+ DefaultModalHeaderComponent,
3079
+ DefaultModalFooterComponent,
3080
+ // pipes
3081
+ SwitchMultiCasePipe
3082
+ ],
3083
+ providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS]
3084
+ }]
3085
+ }] });
3086
+
3087
+ /*
3088
+ * Public API Surface of ngx-sfc-common
3089
+ */
3090
+
3091
+ /**
3092
+ * Generated bundle index. Do not edit.
3093
+ */
3094
+
3095
+ export { BounceLoaderComponent, BrowserDocumentRef, BrowserWindowRef, ButtonComponent, ButtonType, CheckmarkComponent, CheckmarkType, CircleLoaderComponent, CircleLoaderType, ClickOutsideDirective, CloseComponent, CommonConstants, ComponentSize, ComponentSizeDirective, DOCUMENT, DOCUMENT_PROVIDERS, DateTimeConstants, DefaultModalFooterComponent, DefaultModalHeaderComponent, DelimeterComponent, DestroyParentDirective, Direction, DocumentRef, DomChangesDirective, DotsComponent, HamburgerComponent, HamburgerMenuComponent, IconComponent, IfDirective, ImageLoadDirective, ImageLoadService, LoadChangesSource, LoadContainerComponent, LoadContainerType, LoadMoreButtonComponent, LoaderService, MediaLimits, ModalComponent, ModalOpenDirective, ModalOpenOnClickDirective, ModalService, ModalTemplate, MouseDownDirective, NgxSfcCommonModule, PaginationComponent, PaginationService, Position, ResizeService, ScrollIntoViewDirective, ScrollTrackerDirective, Sequence, ShowHideElementDirective, SortingComponent, SortingDirection, SortingService, SwitchMultiCasePipe, TemplateContentComponent, TemplateReferenceDirective, Theme, ThrowElementOnHoverDirective, ToggleSwitcherComponent, TooltipComponent, TooltipType, UIClass, UIConstants, WINDOW, WINDOW_PROVIDERS, WindowRef, addClasses, addItem, addPropertyToObject, all, any, browserDocumentProvider, browserWindowProvider, contains, count, distinct, documentFactory, documentProvider, firstItem, firstOrDefault, getCalcValue, getCollectionOrEmpty, getCssLikeValue, getFileExtension, getFirstDayOfMonth, getFirstDayOfMonthByYearAndMonth, getFirstDayOfYear, getLastDayOfMonth, getLastDayOfMonthByYearAndMonth, getLastDayOfYear, getNextDate, getNextMonth, getNextYear, getPreviousMonth, getPreviousYear, getRotateValue, getValueFromCssLikeValue, getWeeksNumberInMonth, hasItem, hasItemBy, hasObjectItem, hexToRgb, isAsyncData, isChromeBrowser, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual, isDefined, isEmail, isEqual, isEqualDateTimes, isEqualDates, isImage, isNullOrEmptyString, isNumeric, isObject, lastItem, max, mergeDeep, nameof, parseBoolean, parseFileSize, readAsDataURL, remove, removeClasses, removeItem, removeItemBy, removePropertyFromObject, replaceRgbOpacity, rgbToHex, setDay, setDefaultSecondsAndMiliseconds, setHours, setMilliseconds, setMinutes, setSeconds, setYear, skip, sort, sortBy, sortByPath, sum, trim, updateItemBy, where, windowFactory, windowProvider };
3096
+ //# sourceMappingURL=ngx-sfc-common.mjs.map
3097
+ //# sourceMappingURL=ngx-sfc-common.mjs.map