ngx-sfc-common 0.0.1

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 (114) hide show
  1. package/README.md +460 -0
  2. package/esm2020/lib/components/button/button-type.enum.mjs +9 -0
  3. package/esm2020/lib/components/button/button.component.mjs +38 -0
  4. package/esm2020/lib/components/checkmark/checkmark.component.mjs +27 -0
  5. package/esm2020/lib/components/delimeter/delimeter.component.mjs +11 -0
  6. package/esm2020/lib/components/dots/dots.component.mjs +30 -0
  7. package/esm2020/lib/components/hamburger/hamburger.component.mjs +24 -0
  8. package/esm2020/lib/components/index.mjs +20 -0
  9. package/esm2020/lib/components/loader/bounce/bounce-loader.component.mjs +13 -0
  10. package/esm2020/lib/components/loader/circle/circle-loader-type.enum.mjs +6 -0
  11. package/esm2020/lib/components/loader/circle/circle-loader.component.mjs +20 -0
  12. package/esm2020/lib/components/loader/loader-base.component.mjs +51 -0
  13. package/esm2020/lib/components/loader/loader.constants.mjs +6 -0
  14. package/esm2020/lib/components/loader/loader.event.mjs +2 -0
  15. package/esm2020/lib/components/loader/service/loader.service.mjs +76 -0
  16. package/esm2020/lib/components/modal/directive/modal-open-on-click.directive.mjs +50 -0
  17. package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +48 -0
  18. package/esm2020/lib/components/modal/footer/default/default-modal-footer.model.mjs +2 -0
  19. package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +31 -0
  20. package/esm2020/lib/components/modal/header/default/default-modal-header.model.mjs +2 -0
  21. package/esm2020/lib/components/modal/modal-template.enum.mjs +7 -0
  22. package/esm2020/lib/components/modal/modal.component.mjs +107 -0
  23. package/esm2020/lib/components/modal/service/modal.service.mjs +26 -0
  24. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +31 -0
  25. package/esm2020/lib/components/toggle-switcher/toggle-switcher.model.mjs +2 -0
  26. package/esm2020/lib/components/tooltip/tooltip-type.enum.mjs +6 -0
  27. package/esm2020/lib/components/tooltip/tooltip.component.mjs +69 -0
  28. package/esm2020/lib/constants/common.constants.mjs +6 -0
  29. package/esm2020/lib/constants/date-time.constants.mjs +8 -0
  30. package/esm2020/lib/constants/index.mjs +4 -0
  31. package/esm2020/lib/constants/ui.constants.mjs +16 -0
  32. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +65 -0
  33. package/esm2020/lib/directives/click-outside/click-outside.event.mjs +2 -0
  34. package/esm2020/lib/directives/component-size/component-size.directive.mjs +46 -0
  35. package/esm2020/lib/directives/index.mjs +7 -0
  36. package/esm2020/lib/directives/mouse-down/mouse-down.directive.mjs +37 -0
  37. package/esm2020/lib/directives/show-hide-element/show-hide-element.directive.mjs +42 -0
  38. package/esm2020/lib/directives/template-reference/template-reference.directive.mjs +21 -0
  39. package/esm2020/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.mjs +38 -0
  40. package/esm2020/lib/enums/common.enums.mjs +69 -0
  41. package/esm2020/lib/enums/index.mjs +2 -0
  42. package/esm2020/lib/ngx-sfc-common.module.mjs +135 -0
  43. package/esm2020/lib/services/document-ref.service.mjs +70 -0
  44. package/esm2020/lib/services/index.mjs +4 -0
  45. package/esm2020/lib/services/resize.service.mjs +42 -0
  46. package/esm2020/lib/services/window-ref.service.mjs +70 -0
  47. package/esm2020/lib/utils/collections.utils.mjs +244 -0
  48. package/esm2020/lib/utils/common.utils.mjs +86 -0
  49. package/esm2020/lib/utils/date-time.utils.mjs +208 -0
  50. package/esm2020/lib/utils/file.utils.mjs +52 -0
  51. package/esm2020/lib/utils/index.mjs +7 -0
  52. package/esm2020/lib/utils/string.utils.mjs +31 -0
  53. package/esm2020/lib/utils/ui.utils.mjs +39 -0
  54. package/esm2020/ngx-sfc-common.mjs +5 -0
  55. package/esm2020/public-api.mjs +11 -0
  56. package/fesm2015/ngx-sfc-common.mjs +1908 -0
  57. package/fesm2015/ngx-sfc-common.mjs.map +1 -0
  58. package/fesm2020/ngx-sfc-common.mjs +1900 -0
  59. package/fesm2020/ngx-sfc-common.mjs.map +1 -0
  60. package/lib/components/button/button-type.enum.d.ts +7 -0
  61. package/lib/components/button/button.component.d.ts +13 -0
  62. package/lib/components/checkmark/checkmark.component.d.ts +8 -0
  63. package/lib/components/delimeter/delimeter.component.d.ts +5 -0
  64. package/lib/components/dots/dots.component.d.ts +9 -0
  65. package/lib/components/hamburger/hamburger.component.d.ts +7 -0
  66. package/lib/components/index.d.ts +21 -0
  67. package/lib/components/loader/bounce/bounce-loader.component.d.ts +6 -0
  68. package/lib/components/loader/circle/circle-loader-type.enum.d.ts +4 -0
  69. package/lib/components/loader/circle/circle-loader.component.d.ts +8 -0
  70. package/lib/components/loader/loader-base.component.d.ts +27 -0
  71. package/lib/components/loader/loader.constants.d.ts +5 -0
  72. package/lib/components/loader/loader.event.d.ts +4 -0
  73. package/lib/components/loader/service/loader.service.d.ts +33 -0
  74. package/lib/components/modal/directive/modal-open-on-click.directive.d.ts +17 -0
  75. package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +19 -0
  76. package/lib/components/modal/footer/default/default-modal-footer.model.d.ts +6 -0
  77. package/lib/components/modal/header/default/default-modal-header.component.d.ts +14 -0
  78. package/lib/components/modal/header/default/default-modal-header.model.d.ts +5 -0
  79. package/lib/components/modal/modal-template.enum.d.ts +5 -0
  80. package/lib/components/modal/modal.component.d.ts +25 -0
  81. package/lib/components/modal/service/modal.service.d.ts +12 -0
  82. package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +11 -0
  83. package/lib/components/toggle-switcher/toggle-switcher.model.d.ts +4 -0
  84. package/lib/components/tooltip/tooltip-type.enum.d.ts +4 -0
  85. package/lib/components/tooltip/tooltip.component.d.ts +22 -0
  86. package/lib/constants/common.constants.d.ts +5 -0
  87. package/lib/constants/date-time.constants.d.ts +7 -0
  88. package/lib/constants/index.d.ts +3 -0
  89. package/lib/constants/ui.constants.d.ts +15 -0
  90. package/lib/directives/click-outside/click-outside.directive.d.ts +23 -0
  91. package/lib/directives/click-outside/click-outside.event.d.ts +4 -0
  92. package/lib/directives/component-size/component-size.directive.d.ts +13 -0
  93. package/lib/directives/index.d.ts +7 -0
  94. package/lib/directives/mouse-down/mouse-down.directive.d.ts +12 -0
  95. package/lib/directives/show-hide-element/show-hide-element.directive.d.ts +13 -0
  96. package/lib/directives/template-reference/template-reference.directive.d.ts +9 -0
  97. package/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.d.ts +13 -0
  98. package/lib/enums/common.enums.d.ts +61 -0
  99. package/lib/enums/index.d.ts +1 -0
  100. package/lib/ngx-sfc-common.module.d.ts +27 -0
  101. package/lib/services/document-ref.service.d.ts +43 -0
  102. package/lib/services/index.d.ts +3 -0
  103. package/lib/services/resize.service.d.ts +32 -0
  104. package/lib/services/window-ref.service.d.ts +43 -0
  105. package/lib/utils/collections.utils.d.ts +135 -0
  106. package/lib/utils/common.utils.d.ts +50 -0
  107. package/lib/utils/date-time.utils.d.ts +131 -0
  108. package/lib/utils/file.utils.d.ts +25 -0
  109. package/lib/utils/index.d.ts +6 -0
  110. package/lib/utils/string.utils.d.ts +19 -0
  111. package/lib/utils/ui.utils.d.ts +24 -0
  112. package/ngx-sfc-common.d.ts +5 -0
  113. package/package.json +53 -0
  114. package/public-api.d.ts +7 -0
@@ -0,0 +1,1900 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, PLATFORM_ID, EventEmitter, Directive, Inject, Input, Output, HostListener, Component, HostBinding, ContentChildren, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@angular/common';
4
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
5
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
6
+ import { Subject, fromEvent, Observable, startWith, BehaviorSubject, filter, distinctUntilChanged, map, EMPTY } from 'rxjs';
7
+ import * as i1 from '@angular/platform-browser';
8
+ import { trigger, state, style, transition, group, query, animate, animateChild } from '@angular/animations';
9
+
10
+ /**
11
+ * Create a new injection token for injecting the Document into a component.
12
+ */
13
+ const DOCUMENT = new InjectionToken('DocumentToken');
14
+ /**
15
+ * Define abstract class for obtaining reference to the global Document object.
16
+ */
17
+ class DocumentRef {
18
+ get nativeDocument() {
19
+ throw new Error('Not implemented.');
20
+ }
21
+ }
22
+ /**
23
+ * Define class that implements the abstract class and returns the native Document object.
24
+ */
25
+ class BrowserDocumentRef extends DocumentRef {
26
+ constructor() {
27
+ super();
28
+ }
29
+ /**
30
+ * @returns Document object
31
+ */
32
+ get nativeDocument() {
33
+ return document;
34
+ }
35
+ }
36
+ BrowserDocumentRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BrowserDocumentRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
37
+ BrowserDocumentRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BrowserDocumentRef });
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BrowserDocumentRef, decorators: [{
39
+ type: Injectable
40
+ }], ctorParameters: function () { return []; } });
41
+ /**
42
+ * Create an factory function that returns the native Document object.
43
+ * @param browserDocumentRef Native Document object
44
+ * @param platformId id of platform
45
+ * @returns type of platform of empty object
46
+ */
47
+ function documentFactory(browserDocumentRef, platformId) {
48
+ if (isPlatformBrowser(platformId)) {
49
+ return browserDocumentRef.nativeDocument;
50
+ }
51
+ const doc = {
52
+ hidden: false,
53
+ visibilityState: 'visible'
54
+ };
55
+ return doc;
56
+ }
57
+ /**
58
+ * Create a injectable provider for the DocumentRef token that uses the BrowserDocumentRef class.
59
+ */
60
+ const browserDocumentProvider = {
61
+ provide: DocumentRef,
62
+ useClass: BrowserDocumentRef
63
+ };
64
+ /**
65
+ * Create an injectable provider that uses the DocumentFactory function for returning the native Document object.
66
+ */
67
+ const documentProvider = {
68
+ provide: DOCUMENT,
69
+ useFactory: documentFactory,
70
+ deps: [DocumentRef, PLATFORM_ID]
71
+ };
72
+ /**
73
+ * Create an array of providers.
74
+ */
75
+ const DOCUMENT_PROVIDERS = [browserDocumentProvider, documentProvider];
76
+
77
+ /**
78
+ * Create a new injection token for injecting the window into a component.
79
+ */
80
+ const WINDOW = new InjectionToken('WindowToken');
81
+ /**
82
+ * Define abstract class for obtaining reference to the global window object.
83
+ */
84
+ class WindowRef {
85
+ get nativeWindow() {
86
+ throw new Error('Not implemented.');
87
+ }
88
+ }
89
+ /**
90
+ * Define class that implements the abstract class and returns the native window object.
91
+ */
92
+ class BrowserWindowRef extends WindowRef {
93
+ constructor() {
94
+ super();
95
+ }
96
+ /**
97
+ * @returns window object
98
+ */
99
+ get nativeWindow() {
100
+ return window;
101
+ }
102
+ }
103
+ BrowserWindowRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BrowserWindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
104
+ BrowserWindowRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BrowserWindowRef });
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BrowserWindowRef, decorators: [{
106
+ type: Injectable
107
+ }], ctorParameters: function () { return []; } });
108
+ /**
109
+ * Create an factory function that returns the native window object.
110
+ * @param browserWindowRef Native window object
111
+ * @param platformId id of platform
112
+ * @returns type of platform of empty object
113
+ */
114
+ function windowFactory(browserWindowRef, platformId) {
115
+ if (isPlatformBrowser(platformId)) {
116
+ return browserWindowRef.nativeWindow;
117
+ }
118
+ const obj = {
119
+ setTimeout: (func, time) => { },
120
+ clearTimeout: (a) => { }
121
+ };
122
+ return obj;
123
+ }
124
+ /**
125
+ * Create a injectable provider for the WindowRef token that uses the BrowserWindowRef class.
126
+ */
127
+ const browserWindowProvider = {
128
+ provide: WindowRef,
129
+ useClass: BrowserWindowRef
130
+ };
131
+ /**
132
+ * Create an injectable provider that uses the windowFactory function for returning the native window object.
133
+ */
134
+ const windowProvider = {
135
+ provide: WINDOW,
136
+ useFactory: windowFactory,
137
+ deps: [WindowRef, PLATFORM_ID]
138
+ };
139
+ /**
140
+ * Create an array of providers.
141
+ */
142
+ const WINDOW_PROVIDERS = [browserWindowProvider, windowProvider];
143
+
144
+ class ResizeService {
145
+ constructor(eventManager) {
146
+ this.eventManager = eventManager;
147
+ this.resizeSubject = new Subject();
148
+ this.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));
149
+ this.eventManager.addGlobalEventListener('window', 'onload', this.onLoaded.bind(this));
150
+ }
151
+ /**
152
+ * Makes resizeSubject become Observable
153
+ * @returns Observable of resizeSubject
154
+ */
155
+ get onResize$() {
156
+ return this.resizeSubject.asObservable();
157
+ }
158
+ /**
159
+ * Handler of 'resize' event. Passes data throw resizeSubject
160
+ * @param event Event Object of 'resize' event
161
+ */
162
+ onResize(event) {
163
+ this.resizeSubject.next(event.target);
164
+ }
165
+ /**
166
+ * Handler of 'onload' event. Defines the width of window
167
+ * @param event Event Object of 'onload' event
168
+ */
169
+ onLoaded(event) {
170
+ this.windowWidth = event.target;
171
+ }
172
+ }
173
+ ResizeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ResizeService, deps: [{ token: i1.EventManager }], target: i0.ɵɵFactoryTarget.Injectable });
174
+ ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ResizeService, providedIn: 'root' });
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ResizeService, decorators: [{
176
+ type: Injectable,
177
+ args: [{
178
+ providedIn: 'root'
179
+ }]
180
+ }], ctorParameters: function () { return [{ type: i1.EventManager }]; } });
181
+
182
+ class ClickOutsideDirective {
183
+ constructor(elementRef, document) {
184
+ this.elementRef = elementRef;
185
+ this.document = document;
186
+ /**
187
+ * Toggler for checking ouside click event
188
+ */
189
+ this.listening = false;
190
+ /**
191
+ * Emitter for click event
192
+ */
193
+ this.action = new EventEmitter();
194
+ }
195
+ ngOnInit() {
196
+ this._clickSubscription = fromEvent(this.document, 'click')
197
+ .subscribe(event => {
198
+ this.onClick(event);
199
+ });
200
+ }
201
+ ngOnDestroy() {
202
+ this._clickSubscription?.unsubscribe();
203
+ }
204
+ onClick(event) {
205
+ if (event instanceof MouseEvent && this.listening) {
206
+ const clickOutsideEvent = {
207
+ target: event.target,
208
+ value: !this.isDescendant(this.elementRef.nativeElement, event.target)
209
+ };
210
+ this.action.emit(clickOutsideEvent);
211
+ }
212
+ }
213
+ isDescendant(parent, child) {
214
+ let node = child;
215
+ while (node !== null) {
216
+ if (node === parent) {
217
+ return true;
218
+ }
219
+ else {
220
+ node = node.parentNode;
221
+ }
222
+ }
223
+ return false;
224
+ }
225
+ }
226
+ ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
227
+ ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: ClickOutsideDirective, selector: "[sfcClickOutside]", inputs: { listening: ["sfcClickOutside", "listening"] }, outputs: { action: "action" }, ngImport: i0 });
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ClickOutsideDirective, decorators: [{
229
+ type: Directive,
230
+ args: [{
231
+ selector: '[sfcClickOutside]'
232
+ }]
233
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: Document, decorators: [{
234
+ type: Inject,
235
+ args: [DOCUMENT]
236
+ }] }]; }, propDecorators: { listening: [{
237
+ type: Input,
238
+ args: ['sfcClickOutside']
239
+ }], action: [{
240
+ type: Output
241
+ }] } });
242
+
243
+ class CommonConstants {
244
+ }
245
+ CommonConstants.NOT_FOUND_INDEX = -1;
246
+ CommonConstants.EMPTY_STRING = '';
247
+ CommonConstants.MOUSE_BUTTON_LEFT = 0;
248
+
249
+ class DateTimeConstants {
250
+ }
251
+ DateTimeConstants.DAYS_IN_WEEK = 7;
252
+ DateTimeConstants.HOURS_IN_SHORT_TIME = 12;
253
+ DateTimeConstants.MINUTES_IN_HOUR = 60;
254
+ DateTimeConstants.DAYS_OF_WEEK = ["S", "M", "T", "W", "T", "F", "S"];
255
+ DateTimeConstants.DAYS_OF_WEEK_3 = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
256
+
257
+ class UIConstants {
258
+ }
259
+ UIConstants.CSS_PIXELS = 'px';
260
+ UIConstants.CSS_PERCENTAGE = '%';
261
+ UIConstants.CSS_DEGREES = 'deg';
262
+ UIConstants.CSS_EM = 'em';
263
+ UIConstants.CSS_VISIBILITY_VISIBLE = 'visible';
264
+ UIConstants.CSS_VISIBILITY_HIDDEN = 'hidden';
265
+ UIConstants.DEFAULT_THEME = 'sfc-default-theme';
266
+ UIConstants.DARK_THEME = 'sfc-dark-theme';
267
+ UIConstants.CSS_WIDTH = 'width';
268
+ UIConstants.CSS_LEFT = 'left';
269
+ UIConstants.CSS_CLASS_FIXED = 'fixed';
270
+ UIConstants.CSS_CLASS_BACKGROUND = 'background';
271
+ UIConstants.CSS_CLASS_TOP = 'top';
272
+
273
+ class ShowHideElementDirective {
274
+ constructor(el) {
275
+ this.el = el;
276
+ this.SHOW_HIDE_TRANSITION_DELAY_DEFAULT = 0.5;
277
+ this.style.transition = this.getTransitionValue();
278
+ }
279
+ set showHideElement(show) {
280
+ this.style.visibility = show
281
+ ? UIConstants.CSS_VISIBILITY_VISIBLE
282
+ : UIConstants.CSS_VISIBILITY_HIDDEN;
283
+ this.style.opacity = show ? 1 : 0;
284
+ }
285
+ set delay(value) {
286
+ this.style.transition = this.getTransitionValue(value);
287
+ }
288
+ ;
289
+ get style() {
290
+ return this.el.nativeElement.style;
291
+ }
292
+ getTransitionValue(delay = this.SHOW_HIDE_TRANSITION_DELAY_DEFAULT) {
293
+ return `visibility ${delay}s,
294
+ opacity ${delay}s
295
+ linear`;
296
+ }
297
+ }
298
+ ShowHideElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ShowHideElementDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
299
+ ShowHideElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: { showHideElement: ["sfcShowHideElement", "showHideElement"], delay: "delay" }, ngImport: i0 });
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ShowHideElementDirective, decorators: [{
301
+ type: Directive,
302
+ args: [{
303
+ selector: '[sfcShowHideElement]'
304
+ }]
305
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { showHideElement: [{
306
+ type: Input,
307
+ args: ['sfcShowHideElement']
308
+ }], delay: [{
309
+ type: Input
310
+ }] } });
311
+
312
+ /**
313
+ * Return true if value defined
314
+ * @param value Value to check
315
+ * @returns True if value is not null and defined
316
+ */
317
+ function isDefined(value) {
318
+ return value !== undefined && value !== null;
319
+ }
320
+ /**
321
+ * Return true if value is object
322
+ * @param value Value to check
323
+ * @returns True if value is object
324
+ */
325
+ function isObject(value) {
326
+ return (isDefined(value) && typeof value === 'object' && !Array.isArray(value));
327
+ }
328
+ /**
329
+ * Return true if data is observable
330
+ * @param data Object to check
331
+ * @returns True if data is observable
332
+ */
333
+ function isAsyncData(data) {
334
+ return data instanceof Observable;
335
+ }
336
+ /**
337
+ * Return extended object with new property
338
+ * @param obj Object to extend by property
339
+ * @param property New property name
340
+ * @param value Value for new property
341
+ * @returns Extended object with new property
342
+ */
343
+ function addPropertyToObject(obj, property, value = null) {
344
+ if (!isDefined(property) && !obj.hasOwnProperty(property)) {
345
+ let newObj = {};
346
+ newObj[property] = value;
347
+ obj = { ...obj, ...newObj };
348
+ }
349
+ return obj;
350
+ }
351
+ /**
352
+ * Remove property from object
353
+ * @param obj Object for removing property
354
+ * @param property Property name to remove
355
+ */
356
+ function removePropertyFromObject(obj, property) {
357
+ if (obj.hasOwnProperty(property)) {
358
+ delete obj[property];
359
+ }
360
+ }
361
+ /**
362
+ * Deep merge object with others
363
+ * @param target Object to merge
364
+ * @param sources
365
+ */
366
+ /**
367
+ * Deep merge object with others
368
+ * @param target Object to merge
369
+ * @param sources Objects to be merged with target
370
+ * @returns Merged object
371
+ */
372
+ function mergeDeep(target, ...sources) {
373
+ if (!isDefined(sources))
374
+ return target;
375
+ const source = sources.shift();
376
+ if (isObject(target) && isObject(source)) {
377
+ for (const key in source) {
378
+ if (isObject(source[key])) {
379
+ if (!target[key])
380
+ Object.assign(target, { [key]: {} });
381
+ mergeDeep(target[key], source[key]);
382
+ }
383
+ else {
384
+ Object.assign(target, { [key]: source[key] });
385
+ }
386
+ }
387
+ }
388
+ return mergeDeep(target, ...sources);
389
+ }
390
+ /**
391
+ * Get type's property name safety
392
+ * @param name KeyOf property
393
+ * @returns Type's property name
394
+ */
395
+ const nameof = (name) => name;
396
+
397
+ /**
398
+ * Return true if string has value(not empty string)
399
+ * @param value String value to check
400
+ * @returns True if string is not null and defined(not empty string)
401
+ */
402
+ function isNullOrEmptyString(value) {
403
+ return isDefined(value) || value === CommonConstants.EMPTY_STRING;
404
+ }
405
+ /**
406
+ * Return true if value contains includeValue
407
+ * @param value String value to check
408
+ * @param includeValue Value to check if it include
409
+ * @returns True if value contains includeValue
410
+ */
411
+ function contains(value, includeValue) {
412
+ return !isNullOrEmptyString(value) && !isNullOrEmptyString(includeValue)
413
+ ? value.toLowerCase()
414
+ .includes(includeValue.toLowerCase())
415
+ : false;
416
+ }
417
+ /**
418
+ * Return trimed value
419
+ * @param value Value for trim modification
420
+ * @returns Trimed value
421
+ */
422
+ function trim(value) {
423
+ return isNullOrEmptyString(value) ? value : value.replace(/\s/g, '');
424
+ }
425
+
426
+ /**
427
+ * Set minutes for date
428
+ * @param date Date value
429
+ * @param minute Minute value
430
+ * @returns Date with minute value
431
+ */
432
+ function setMinutes(date, minute) {
433
+ date.setMinutes(minute);
434
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes());
435
+ }
436
+ /**
437
+ * Set hours for date
438
+ * @param date Date value
439
+ * @param hour Hour value
440
+ * @returns Date with hour value
441
+ */
442
+ function setHours(date, hour) {
443
+ date.setHours(hour);
444
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes());
445
+ }
446
+ /**
447
+ * Set day for date value
448
+ * @param date Date value
449
+ * @param dayNumber Day number
450
+ * @returns Date with day number
451
+ */
452
+ function setDay(date, dayNumber) {
453
+ const nextDate = new Date(date);
454
+ nextDate.setDate(dayNumber);
455
+ return nextDate;
456
+ }
457
+ /**
458
+ * Set year for date
459
+ * @param date Date value
460
+ * @param year Year value
461
+ * @returns Date with year value
462
+ */
463
+ function setYear(date, year) {
464
+ date.setFullYear(year);
465
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes());
466
+ }
467
+ /**
468
+ * Get next month as date
469
+ * @param date Date value
470
+ * @returns Next month as date
471
+ */
472
+ function getNextMonth(date) {
473
+ const nextMonth = new Date(date);
474
+ nextMonth.setMonth(date.getMonth() + 1);
475
+ return nextMonth;
476
+ }
477
+ /**
478
+ * Get previous month as date
479
+ * @param date Date value
480
+ * @returns Previous month as date
481
+ */
482
+ function getPreviousMonth(date) {
483
+ const prevMonth = new Date(date);
484
+ prevMonth.setMonth(date.getMonth() - 1);
485
+ return prevMonth;
486
+ }
487
+ /**
488
+ * Get next year as date
489
+ * @param date Date value
490
+ * @returns Next year as date
491
+ */
492
+ function getNextYear(date) {
493
+ const nextYear = new Date(date);
494
+ nextYear.setFullYear(date.getFullYear() + 1);
495
+ return nextYear;
496
+ }
497
+ /**
498
+ * Get previous year as date
499
+ * @param date Date value
500
+ * @returns Previous year as date
501
+ */
502
+ function getPreviousYear(date) {
503
+ const prevYear = new Date(date);
504
+ prevYear.setFullYear(date.getFullYear() - 1);
505
+ return prevYear;
506
+ }
507
+ /**
508
+ * Return first day of month as date from date value
509
+ * @param date Date value
510
+ * @returns First day of month as date
511
+ */
512
+ function getFirstDayOfMonth(date) {
513
+ if (isDefined(date) && date instanceof Date) {
514
+ const year = date.getFullYear(), month = date.getMonth();
515
+ return new Date(year, month, 1);
516
+ }
517
+ return date;
518
+ }
519
+ /**
520
+ * Return last day of month as date from date value
521
+ * @param date Date value
522
+ * @returns Last day of month as date
523
+ */
524
+ function getLastDayOfMonth(date) {
525
+ if (isDefined(date) && date instanceof Date) {
526
+ const year = date.getFullYear(), month = date.getMonth();
527
+ return new Date(year, month + 1, 0);
528
+ }
529
+ return date;
530
+ }
531
+ /**
532
+ * Return first day of year as date from date value
533
+ * @param date Date value
534
+ * @returns First day of year as date
535
+ */
536
+ function getFirstDayOfYear(date) {
537
+ if (isDefined(date) && date instanceof Date) {
538
+ return new Date(date.getFullYear(), 0, 1);
539
+ }
540
+ return date;
541
+ }
542
+ /**
543
+ * Return last day of year as date from date value
544
+ * @param date Date value
545
+ * @returns Last day of year as date
546
+ */
547
+ function getLastDayOfYear(date) {
548
+ if (isDefined(date) && date instanceof Date) {
549
+ return new Date(date.getFullYear(), 12, 0);
550
+ }
551
+ return date;
552
+ }
553
+ /**
554
+ * Return first day of month as date
555
+ * @param year Year value
556
+ * @param month Month value
557
+ * @returns First day of month
558
+ */
559
+ function getFirstDayOfMonthByYearAndMonth(year, month) {
560
+ return new Date(year, month, 1);
561
+ }
562
+ /**
563
+ * Return last day of month as date
564
+ * @param year Year value
565
+ * @param month Month value
566
+ * @returns Last day of month
567
+ */
568
+ function getLastDayOfMonthByYearAndMonth(year, month) {
569
+ return new Date(year, month + 1, 0);
570
+ }
571
+ /**
572
+ * Return week number in month from date value
573
+ * @param date Date value
574
+ * @returns Week number
575
+ */
576
+ function getWeeksNumberInMonth(date) {
577
+ const firstOfMonth = getFirstDayOfMonth(date), lastOfMonth = getLastDayOfMonth(date), used = firstOfMonth.getDay() + lastOfMonth.getDate();
578
+ return Math.ceil(used / DateTimeConstants.DAYS_IN_WEEK);
579
+ }
580
+ /**
581
+ * Return true if first and second date are equal
582
+ * @param date1 First date value
583
+ * @param date2 Second date value
584
+ * @returns True if first and second date are equal
585
+ */
586
+ function isEqualDates(date1, date2) {
587
+ date1.setHours(0, 0, 0, 0);
588
+ date2.setHours(0, 0, 0, 0);
589
+ return date1.getTime() === date2.getTime();
590
+ }
591
+ /**
592
+ * Return true if first date greater than second date
593
+ * @param date1 First date value
594
+ * @param date2 Second date value
595
+ * @returns True if first date greater than second date
596
+ */
597
+ function isDateGreat(date1, date2) {
598
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate())
599
+ > new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
600
+ }
601
+ /**
602
+ * Return true if first date greater or equal to second date
603
+ * @param date1 First date value
604
+ * @param date2 Second date value
605
+ * @returns True if first date greater or equal to second date
606
+ */
607
+ function isDateGreatOrEqual(date1, date2) {
608
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate())
609
+ >= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
610
+ }
611
+ /**
612
+ * Return true if first date time greater than second date time
613
+ * @param date1 First date time value
614
+ * @param date2 Second date time value
615
+ * @returns True if first date time greater than second date time
616
+ */
617
+ function isDateTimeGreat(date1, date2) {
618
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
619
+ > new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
620
+ }
621
+ /**
622
+ * Return true if first date time greater or equal to second date time
623
+ * @param date1 First date time value
624
+ * @param date2 Second date time value
625
+ * @returns True if first date time greater or equal to second date time
626
+ */
627
+ function isDateTimeGreatOrEqual(date1, date2) {
628
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
629
+ >= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
630
+ }
631
+
632
+ /**
633
+ * Return parsed file size as string
634
+ * @param bytes Bytes count
635
+ * @param decimals Value after dot
636
+ * @returns Parsed file size
637
+ */
638
+ function parseFileSize(bytes, decimals = 2) {
639
+ if (bytes === 0)
640
+ return '0';
641
+ const k = 1024;
642
+ const dm = decimals < 0 ? 0 : decimals;
643
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
644
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
645
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
646
+ }
647
+ /**
648
+ * Return file extension
649
+ * @param file File value
650
+ * @returns File extension
651
+ */
652
+ function getFileExtension(file) {
653
+ if (!isDefined(file))
654
+ return CommonConstants.EMPTY_STRING;
655
+ if (file.name.indexOf('.') === CommonConstants.NOT_FOUND_INDEX) {
656
+ return CommonConstants.EMPTY_STRING;
657
+ }
658
+ return file.name.split('.').pop();
659
+ }
660
+ /**
661
+ * Read file as data URL
662
+ * @param file File value
663
+ * @param onLoad On load action
664
+ */
665
+ function readAsDataURL(file, onLoad) {
666
+ if (isDefined(file)) {
667
+ const reader = new FileReader();
668
+ reader.onload = () => onLoad(reader.result);
669
+ reader.readAsDataURL(file);
670
+ }
671
+ throw new Error('File utils | Read as data URL function --> File is empty.');
672
+ }
673
+ /**
674
+ * Return true if file is image
675
+ * @param file File value
676
+ * @returns True if file is image
677
+ */
678
+ function isImage(file) {
679
+ return (/\.(gif|jpe?g|jpg|tiff|png|webp|bmp)$/i).test(file.name);
680
+ }
681
+
682
+ /**
683
+ * Return CSS like value
684
+ * @param value Value as number
685
+ * @returns Value as '1px'
686
+ */
687
+ function getCssLikeValue(value, type = UIConstants.CSS_PIXELS) {
688
+ return value + type;
689
+ }
690
+ /**
691
+ * Parse CSS like value to number
692
+ * @param value CSS like value
693
+ * @returns Number value
694
+ */
695
+ function getValueFromCssLikeValue(value, type = UIConstants.CSS_PIXELS) {
696
+ return +value.replace(type, CommonConstants.EMPTY_STRING);
697
+ }
698
+ /**
699
+ * Add classes to HTML element
700
+ * @param element HTML element
701
+ * @param classNames Array of CSS classes
702
+ */
703
+ function addClasses(element, ...classNames) {
704
+ if (isDefined(element)) {
705
+ classNames.forEach((className) => element.classList.add(className));
706
+ }
707
+ }
708
+ /**
709
+ * Remove classes to HTML element
710
+ * @param element HTML element
711
+ * @param classNames Array of CSS classes
712
+ */
713
+ function removeClasses(element, ...classNames) {
714
+ if (isDefined(element)) {
715
+ classNames.forEach((className) => element.classList.remove(className));
716
+ }
717
+ }
718
+
719
+ /**
720
+ * Component sizes
721
+ */
722
+ var ComponentSize;
723
+ (function (ComponentSize) {
724
+ ComponentSize["Small"] = "small";
725
+ ComponentSize["Medium"] = "medium";
726
+ ComponentSize["Large"] = "large";
727
+ ComponentSize["Custom"] = "custom";
728
+ })(ComponentSize || (ComponentSize = {}));
729
+ /**
730
+ * Type of sorting
731
+ */
732
+ var SortingDirection;
733
+ (function (SortingDirection) {
734
+ SortingDirection["Ascending"] = "ascending";
735
+ SortingDirection["Descending"] = "descending";
736
+ })(SortingDirection || (SortingDirection = {}));
737
+ /**
738
+ * UI classes
739
+ */
740
+ var UIClass;
741
+ (function (UIClass) {
742
+ UIClass["Active"] = "active";
743
+ UIClass["Valid"] = "valid";
744
+ UIClass["Invalid"] = "invalid";
745
+ UIClass["Enabled"] = "enabled";
746
+ UIClass["Disabled"] = "disabled";
747
+ UIClass["Selected"] = "selected";
748
+ UIClass["Empty"] = "empty";
749
+ UIClass["Focus"] = "focus";
750
+ UIClass["Open"] = "open";
751
+ UIClass["Loading"] = "loading";
752
+ UIClass["Removed"] = "removed";
753
+ UIClass["Visible"] = "visible";
754
+ UIClass["Hidden"] = "hidden";
755
+ UIClass["Animated"] = "animated";
756
+ UIClass["Expanded"] = "expanded";
757
+ UIClass["Fixed"] = "fixed";
758
+ })(UIClass || (UIClass = {}));
759
+ ;
760
+ /**
761
+ * Position directions
762
+ */
763
+ var Position;
764
+ (function (Position) {
765
+ Position["Top"] = "top";
766
+ Position["Bottom"] = "bottom";
767
+ Position["Left"] = "left";
768
+ Position["Right"] = "right";
769
+ })(Position || (Position = {}));
770
+ /**
771
+ * CSS Media limits
772
+ */
773
+ var MediaLimits;
774
+ (function (MediaLimits) {
775
+ MediaLimits[MediaLimits["Laptop"] = 1200] = "Laptop";
776
+ MediaLimits[MediaLimits["Tablet"] = 767] = "Tablet";
777
+ MediaLimits[MediaLimits["Phone"] = 430] = "Phone";
778
+ })(MediaLimits || (MediaLimits = {}));
779
+ /**
780
+ * Direction types
781
+ */
782
+ var Direction;
783
+ (function (Direction) {
784
+ Direction["Horizontal"] = "horizontal";
785
+ Direction["Vertical"] = "vertical";
786
+ })(Direction || (Direction = {}));
787
+
788
+ /**
789
+ * Return true if collection not empty
790
+ * @param collection Array of items
791
+ * @returns True if collection not empty
792
+ */
793
+ function any(collection) {
794
+ return isDefined(collection) && collection.length > 0;
795
+ }
796
+ /**
797
+ * Return true if collection has such value
798
+ * @param collection Array of items
799
+ * @param value Value to check
800
+ * @returns True if found value in collection
801
+ */
802
+ function hasItem(collection, value) {
803
+ return any(collection)
804
+ && collection.findIndex(item => item === value) !== CommonConstants.NOT_FOUND_INDEX;
805
+ }
806
+ /**
807
+ * Return true if collection has such value by predicate function
808
+ * @param collection Array of items
809
+ * @param predicate Function to define check logic
810
+ * @returns True if found value in collection
811
+ */
812
+ function hasItemBy(collection, predicate) {
813
+ return any(collection) && collection.findIndex(predicate) !== CommonConstants.NOT_FOUND_INDEX;
814
+ }
815
+ /**
816
+ * Return true if collection of objects has such value as object
817
+ * @param collection Array of objects
818
+ * @param property Property name
819
+ * @param value Value to check
820
+ * @returns True if found value in collection
821
+ */
822
+ function hasObjectItem(collection, // TODO <-- Array<T>
823
+ property, value) {
824
+ return any(collection)
825
+ && collection.findIndex(item => item.hasOwnProperty(property)
826
+ && item[property] === value) !== CommonConstants.NOT_FOUND_INDEX;
827
+ }
828
+ /**
829
+ * Return value from collection by predicate function
830
+ * @param collection Array of items
831
+ * @param predicate Function to define search logic
832
+ * @returns Value from collection
833
+ */
834
+ function firstOrDefault(collection, predicate) {
835
+ return any(collection) ? collection?.find(predicate) : undefined;
836
+ }
837
+ /**
838
+ * Return first item from collection
839
+ * @param collection Array of items
840
+ * @returns First value from collection
841
+ */
842
+ function firstItem(collection) {
843
+ return any(collection) ? collection[0] : null;
844
+ }
845
+ /**
846
+ * Return last item from collection
847
+ * @param collection Array of items
848
+ * @returns Last value from collection
849
+ */
850
+ function lastItem(collection) {
851
+ return any(collection) ? collection[collection.length - 1] : null;
852
+ }
853
+ /**
854
+ * Return True if all values match predicate function
855
+ * @param collection Array of objects
856
+ * @param predicate Function to define check logic
857
+ * @returns True if all values match predicate
858
+ */
859
+ function all(collection, predicate) {
860
+ return any(collection) ? collection.filter(predicate).length == collection.length : false;
861
+ }
862
+ /**
863
+ * Return items from collection by predicate function
864
+ * @param collection Array of items
865
+ * @param predicate Function to define search logic
866
+ * @returns Values from collection
867
+ */
868
+ function where(collection, predicate) {
869
+ return any(collection) ? collection.filter(predicate) : null;
870
+ }
871
+ /**
872
+ * Return sliced collection by page number and page size
873
+ * @param collection Array of items
874
+ * @param page Page number
875
+ * @param size Page size
876
+ * @returns Sliced collection
877
+ */
878
+ function skip(collection, page, size) {
879
+ if (any(collection)) {
880
+ let start = (page - 1) * size;
881
+ return collection.slice(start, start + size);
882
+ }
883
+ return collection;
884
+ }
885
+ /**
886
+ * Return sorted collection of objects by property
887
+ * @param collection Array of items
888
+ * @param property Property name
889
+ * @param direction Sorting direction
890
+ * @returns Sorted collection
891
+ */
892
+ function sortBy(collection, property, direction) {
893
+ if (any(collection)) {
894
+ let _sortFunc = (a, b) => (t1, t2) => (a[property] > b[property] ? t1 : t2);
895
+ return direction == SortingDirection.Ascending
896
+ ? collection.sort((a, b) => _sortFunc(a, b)(1, -1))
897
+ : collection.sort((a, b) => _sortFunc(a, b)(-1, 1));
898
+ }
899
+ return collection;
900
+ }
901
+ /**
902
+ * Return sorted collection of objects by path
903
+ * @param collection Array of items
904
+ * @param path Path to property
905
+ * @param direction Sorting direction
906
+ * @returns Sorted collection
907
+ */
908
+ function sortByPath(collection, path, direction) {
909
+ if (any(collection)) {
910
+ if (isNullOrEmptyString(path))
911
+ throw new Error('Collection utils | Sort By Path function --> Path is empty.');
912
+ const pathParts = path.split('.');
913
+ if (!any(pathParts))
914
+ throw new Error('Collection utils | Sort By Path function --> Path is incorrect.');
915
+ const partsLength = pathParts.length;
916
+ collection.sort((a, b) => {
917
+ var i = 0;
918
+ while (i < partsLength) {
919
+ a = a[pathParts[i]];
920
+ b = b[pathParts[i]];
921
+ i++;
922
+ }
923
+ return direction == SortingDirection.Ascending
924
+ ? a > b ? 1 : -1
925
+ : a > b ? -1 : 1;
926
+ });
927
+ return collection;
928
+ }
929
+ return collection;
930
+ }
931
+ /**
932
+ * Return collection without matches
933
+ * @param collection Array of items
934
+ * @returns Collection without matches
935
+ */
936
+ function distinct(collection) {
937
+ return any(collection)
938
+ ? collection.filter((value, index, self) => self.indexOf(value) === index)
939
+ : collection;
940
+ }
941
+ /**
942
+ * Return sum value from collection items by map function
943
+ * @param collection Array of items
944
+ * @param select Map function
945
+ * @returns Sum value of colection items
946
+ */
947
+ function sum(collection, select) {
948
+ return any(collection)
949
+ ? collection
950
+ .map(select)
951
+ .reduce((a, b) => { return a + b; }, 0)
952
+ : 0;
953
+ }
954
+ /**
955
+ * Return max value from collection items by map function
956
+ * @param collection Array of items
957
+ * @param select Map function
958
+ * @returns Max value of collection items
959
+ */
960
+ function max(collection, select) {
961
+ if (any(collection))
962
+ return Math.max(...collection.map(select));
963
+ throw new Error('Collection utils | Max function --> Collection is empty.');
964
+ }
965
+ /**
966
+ * Delete items from collection by predicate
967
+ * @param collection Array of items
968
+ * @param predicate Function to define remove logic
969
+ */
970
+ function remove(collection, predicate) {
971
+ var i = collection.length;
972
+ while (i--) {
973
+ if (predicate(collection[i])) {
974
+ collection.splice(i, 1);
975
+ }
976
+ }
977
+ }
978
+ /**
979
+ * Add item to collection
980
+ * @param collection Array of items
981
+ * @param item New item
982
+ * @param predicate Function to define if allowed to add new item
983
+ * @returns True if successfully added
984
+ */
985
+ function addItem(collection, item, predicate) {
986
+ if (!isDefined(collection))
987
+ collection = new Array();
988
+ if (isDefined(predicate) && predicate(item))
989
+ return false;
990
+ collection.push(item);
991
+ return true;
992
+ }
993
+ /**
994
+ * Delete item from collection by predicate
995
+ * @param collection Array of items
996
+ * @param predicate Function to define remove logic
997
+ * @returns True if successfully removed
998
+ */
999
+ function removeItem(collection, predicate) {
1000
+ const foundItem = firstOrDefault(collection, predicate);
1001
+ if (isDefined(foundItem)) {
1002
+ collection.splice(collection.indexOf(foundItem), 1);
1003
+ return true;
1004
+ }
1005
+ return false;
1006
+ }
1007
+ function updateItem(collection, predicate, newItem) {
1008
+ const itemIndex = collection.findIndex(predicate);
1009
+ if (itemIndex !== CommonConstants.NOT_FOUND_INDEX) {
1010
+ const result = collection.slice(0);
1011
+ result[itemIndex] = {
1012
+ ...collection[itemIndex],
1013
+ ...newItem
1014
+ };
1015
+ return result;
1016
+ }
1017
+ return null;
1018
+ }
1019
+ /**
1020
+ * Return collection or empty if collection is not defined
1021
+ * @param collection Array of items
1022
+ * @returns Collection or empty
1023
+ */
1024
+ function getCollectionOrEmpty(collection) {
1025
+ return isDefined(collection) ? collection : [];
1026
+ }
1027
+
1028
+ class ThrowElementOnHoverDirective {
1029
+ constructor(el) {
1030
+ this.el = el;
1031
+ }
1032
+ onMouseEnter() {
1033
+ this.throw(this.throwValue);
1034
+ }
1035
+ onMouseLeave() {
1036
+ this.throw(null);
1037
+ }
1038
+ get style() {
1039
+ return this.el.nativeElement.style;
1040
+ }
1041
+ throw(value) {
1042
+ this.style.transform = value ? `translateY(${getCssLikeValue(value)})` : null;
1043
+ }
1044
+ }
1045
+ ThrowElementOnHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThrowElementOnHoverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1046
+ ThrowElementOnHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: ThrowElementOnHoverDirective, selector: "[sfcThrowElementOnHover]", inputs: { throwValue: ["sfcThrowElementOnHover", "throwValue"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 });
1047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThrowElementOnHoverDirective, decorators: [{
1048
+ type: Directive,
1049
+ args: [{
1050
+ selector: '[sfcThrowElementOnHover]'
1051
+ }]
1052
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { throwValue: [{
1053
+ type: Input,
1054
+ args: ['sfcThrowElementOnHover']
1055
+ }], onMouseEnter: [{
1056
+ type: HostListener,
1057
+ args: ['mouseenter']
1058
+ }], onMouseLeave: [{
1059
+ type: HostListener,
1060
+ args: ['mouseleave']
1061
+ }] } });
1062
+
1063
+ class TemplateReferenceDirective {
1064
+ constructor(template) {
1065
+ this.template = template;
1066
+ this.templateName = CommonConstants.EMPTY_STRING;
1067
+ }
1068
+ }
1069
+ TemplateReferenceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TemplateReferenceDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1070
+ TemplateReferenceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: TemplateReferenceDirective, selector: "[sfcTemplateReference]", inputs: { templateName: ["sfcTemplateReference", "templateName"] }, ngImport: i0 });
1071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TemplateReferenceDirective, decorators: [{
1072
+ type: Directive,
1073
+ args: [{
1074
+ selector: '[sfcTemplateReference]'
1075
+ }]
1076
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { templateName: [{
1077
+ type: Input,
1078
+ args: ['sfcTemplateReference']
1079
+ }] } });
1080
+
1081
+ class MouseDownDirective {
1082
+ constructor() {
1083
+ /**
1084
+ * Allowed mouse button
1085
+ */
1086
+ this.button = CommonConstants.MOUSE_BUTTON_LEFT;
1087
+ this.action = new EventEmitter();
1088
+ }
1089
+ onMouseDown($event) {
1090
+ if ($event.button === this.button) {
1091
+ this.action.emit($event);
1092
+ }
1093
+ else {
1094
+ $event.preventDefault();
1095
+ }
1096
+ }
1097
+ }
1098
+ MouseDownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: MouseDownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1099
+ MouseDownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: MouseDownDirective, selector: "[sfcMouseDown]", inputs: { button: "button" }, outputs: { action: "sfcMouseDown" }, host: { listeners: { "mousedown": "onMouseDown($event)" } }, ngImport: i0 });
1100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: MouseDownDirective, decorators: [{
1101
+ type: Directive,
1102
+ args: [{
1103
+ selector: '[sfcMouseDown]'
1104
+ }]
1105
+ }], propDecorators: { button: [{
1106
+ type: Input
1107
+ }], action: [{
1108
+ type: Output,
1109
+ args: ['sfcMouseDown']
1110
+ }], onMouseDown: [{
1111
+ type: HostListener,
1112
+ args: ['mousedown', ['$event']]
1113
+ }] } });
1114
+
1115
+ class ComponentSizeDirective {
1116
+ constructor(el) {
1117
+ this.el = el;
1118
+ this.style.fontSize = this.getSizeValue(this.size);
1119
+ }
1120
+ set size(value) {
1121
+ this.style.fontSize = this.getSizeValue(value);
1122
+ }
1123
+ set customSize(value) {
1124
+ this.style.fontSize = getCssLikeValue(value, UIConstants.CSS_EM);
1125
+ }
1126
+ get style() {
1127
+ return this.el.nativeElement.style;
1128
+ }
1129
+ getSizeValue(value) {
1130
+ switch (value) {
1131
+ case ComponentSize.Small:
1132
+ return getCssLikeValue(0.5, UIConstants.CSS_EM);
1133
+ case ComponentSize.Medium:
1134
+ return getCssLikeValue(1, UIConstants.CSS_EM);
1135
+ case ComponentSize.Large:
1136
+ return getCssLikeValue(2, UIConstants.CSS_EM);
1137
+ default:
1138
+ return getCssLikeValue(1, UIConstants.CSS_EM);
1139
+ }
1140
+ }
1141
+ }
1142
+ ComponentSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ComponentSizeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1143
+ ComponentSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: { size: ["sfcComponentSize", "size"], customSize: "customSize" }, ngImport: i0 });
1144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ComponentSizeDirective, decorators: [{
1145
+ type: Directive,
1146
+ args: [{
1147
+ selector: '[sfcComponentSize]'
1148
+ }]
1149
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { size: [{
1150
+ type: Input,
1151
+ args: ['sfcComponentSize']
1152
+ }], customSize: [{
1153
+ type: Input
1154
+ }] } });
1155
+
1156
+ var ButtonType;
1157
+ (function (ButtonType) {
1158
+ ButtonType["Bordered"] = "bordered";
1159
+ ButtonType["Filled"] = "filled";
1160
+ ButtonType["Rounded"] = "rounded";
1161
+ ButtonType["Circled"] = "circled";
1162
+ ButtonType["Texted"] = "texted";
1163
+ })(ButtonType || (ButtonType = {}));
1164
+
1165
+ class ButtonComponent {
1166
+ constructor() {
1167
+ this.BUTTON_DEFAULT_TEXT = 'Button';
1168
+ this.text = this.BUTTON_DEFAULT_TEXT;
1169
+ this.disabled = false;
1170
+ this.types = [ButtonType.Bordered];
1171
+ }
1172
+ get classes() {
1173
+ const classes = {};
1174
+ if (this.disabled)
1175
+ classes[UIClass.Disabled] = true;
1176
+ distinct(this.types).forEach(type => classes[type] = true);
1177
+ return classes;
1178
+ }
1179
+ }
1180
+ ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1181
+ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: ButtonComponent, selector: "sfc-button", inputs: { text: "text", iconBefore: "iconBefore", iconAfter: "iconAfter", disabled: "disabled", types: "types" }, ngImport: i0, template: "<a class=\"button\" [ngClass]=\"classes\">\r\n <i *ngIf=\"iconBefore\" class=\"icon before\" [ngClass]=\"iconBefore\"></i>\r\n <span class=\"text\">{{text}}</span>\r\n <i *ngIf=\"iconAfter\" class=\"icon after\" [ngClass]=\"iconAfter\"></i>\r\n</a>", styles: [":host-context(.sfc-default-theme) .button.texted:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.texted:not(:hover):not(.disabled){color:#ccd1d9}.button.bordered{border:solid 2px}:host-context(.sfc-default-theme) .button.bordered:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.bordered:not(:hover):not(.disabled){color:#ccd1d9}:host-context(.sfc-default-theme) .button.bordered:not(:hover):not(.disabled){border-color:#545e61}:host-context(.sfc-dark-theme) .button.bordered:not(:hover):not(.disabled){border-color:#ccd1d9}.button.filled{color:#fff!important;border-color:#545e61;background:#545e61}.button.filled:hover{color:#fff!important;border-color:#aab2bd;background:#aab2bd}.button.filled.disabled{color:#fff!important;border-color:#bdbdbd;background:#bdbdbd}.button.rounded{border:solid 2px;border-radius:20px;padding:.4em 1.2em}:host-context(.sfc-default-theme) .button.rounded:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.rounded:not(:hover):not(.disabled){color:#ccd1d9}:host-context(.sfc-default-theme) .button.rounded:not(:hover):not(.disabled){border-color:#545e61}:host-context(.sfc-dark-theme) .button.rounded:not(:hover):not(.disabled){border-color:#ccd1d9}.button.circled{border:solid 2px;width:5em;height:5em;border-radius:50%}:host-context(.sfc-default-theme) .button.circled:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.circled:not(:hover):not(.disabled){color:#ccd1d9}:host-context(.sfc-default-theme) .button.circled:not(:hover):not(.disabled){border-color:#545e61}:host-context(.sfc-dark-theme) .button.circled:not(:hover):not(.disabled){border-color:#ccd1d9}.button.circled .text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host{display:inline-block;font-size:1em}.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:.8em;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .5s ease,border-color .5s ease,background .5s ease}.button:hover{color:#2bbbad;border-color:#2bbbad}.button.disabled{pointer-events:none}:host-context(.sfc-default-theme) .button.disabled{color:#bdbdbd}:host-context(.sfc-dark-theme) .button.disabled{color:#656d78}:host-context(.sfc-default-theme) .button.disabled{border-color:#bdbdbd}:host-context(.sfc-dark-theme) .button.disabled{border-color:#656d78}.button .icon{padding:3px}.button .text{padding:3px;white-space:initial}.button .text:empty{display:none}\n"], directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ButtonComponent, decorators: [{
1183
+ type: Component,
1184
+ args: [{ selector: 'sfc-button', template: "<a class=\"button\" [ngClass]=\"classes\">\r\n <i *ngIf=\"iconBefore\" class=\"icon before\" [ngClass]=\"iconBefore\"></i>\r\n <span class=\"text\">{{text}}</span>\r\n <i *ngIf=\"iconAfter\" class=\"icon after\" [ngClass]=\"iconAfter\"></i>\r\n</a>", styles: [":host-context(.sfc-default-theme) .button.texted:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.texted:not(:hover):not(.disabled){color:#ccd1d9}.button.bordered{border:solid 2px}:host-context(.sfc-default-theme) .button.bordered:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.bordered:not(:hover):not(.disabled){color:#ccd1d9}:host-context(.sfc-default-theme) .button.bordered:not(:hover):not(.disabled){border-color:#545e61}:host-context(.sfc-dark-theme) .button.bordered:not(:hover):not(.disabled){border-color:#ccd1d9}.button.filled{color:#fff!important;border-color:#545e61;background:#545e61}.button.filled:hover{color:#fff!important;border-color:#aab2bd;background:#aab2bd}.button.filled.disabled{color:#fff!important;border-color:#bdbdbd;background:#bdbdbd}.button.rounded{border:solid 2px;border-radius:20px;padding:.4em 1.2em}:host-context(.sfc-default-theme) .button.rounded:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.rounded:not(:hover):not(.disabled){color:#ccd1d9}:host-context(.sfc-default-theme) .button.rounded:not(:hover):not(.disabled){border-color:#545e61}:host-context(.sfc-dark-theme) .button.rounded:not(:hover):not(.disabled){border-color:#ccd1d9}.button.circled{border:solid 2px;width:5em;height:5em;border-radius:50%}:host-context(.sfc-default-theme) .button.circled:not(:hover):not(.disabled){color:#545e61}:host-context(.sfc-dark-theme) .button.circled:not(:hover):not(.disabled){color:#ccd1d9}:host-context(.sfc-default-theme) .button.circled:not(:hover):not(.disabled){border-color:#545e61}:host-context(.sfc-dark-theme) .button.circled:not(:hover):not(.disabled){border-color:#ccd1d9}.button.circled .text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host{display:inline-block;font-size:1em}.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:.8em;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .5s ease,border-color .5s ease,background .5s ease}.button:hover{color:#2bbbad;border-color:#2bbbad}.button.disabled{pointer-events:none}:host-context(.sfc-default-theme) .button.disabled{color:#bdbdbd}:host-context(.sfc-dark-theme) .button.disabled{color:#656d78}:host-context(.sfc-default-theme) .button.disabled{border-color:#bdbdbd}:host-context(.sfc-dark-theme) .button.disabled{border-color:#656d78}.button .icon{padding:3px}.button .text{padding:3px;white-space:initial}.button .text:empty{display:none}\n"] }]
1185
+ }], propDecorators: { text: [{
1186
+ type: Input
1187
+ }], iconBefore: [{
1188
+ type: Input
1189
+ }], iconAfter: [{
1190
+ type: Input
1191
+ }], disabled: [{
1192
+ type: Input
1193
+ }], types: [{
1194
+ type: Input
1195
+ }] } });
1196
+
1197
+ var TooltipType;
1198
+ (function (TooltipType) {
1199
+ TooltipType["Hover"] = "hover";
1200
+ TooltipType["Click"] = "click";
1201
+ })(TooltipType || (TooltipType = {}));
1202
+
1203
+ class TooltipComponent {
1204
+ constructor(resizeService, window) {
1205
+ this.resizeService = resizeService;
1206
+ this.window = window;
1207
+ this.tooltipType = TooltipType.Hover;
1208
+ this.tooltipPosition = Position.Top;
1209
+ this.tooltipShow = false;
1210
+ // preserved position
1211
+ this._position = Position.Top;
1212
+ }
1213
+ click() {
1214
+ if (this.tooltipType == TooltipType.Click) {
1215
+ this.tooltipShow = !this.tooltipShow;
1216
+ }
1217
+ }
1218
+ ngOnInit() {
1219
+ this._position = this.tooltipPosition;
1220
+ }
1221
+ ngAfterContentInit() {
1222
+ this._resizeSubscription = this.resizeService.onResize$
1223
+ .pipe(startWith(this.window))
1224
+ .subscribe(window => this.tooltipPosition = window.innerWidth <= MediaLimits.Tablet
1225
+ ? Position.Bottom : this._position);
1226
+ }
1227
+ ngOnDestroy() {
1228
+ this._resizeSubscription?.unsubscribe();
1229
+ }
1230
+ }
1231
+ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TooltipComponent, deps: [{ token: ResizeService }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
1232
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", 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 #0003;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"] });
1233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TooltipComponent, decorators: [{
1234
+ type: Component,
1235
+ 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 #0003;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"] }]
1236
+ }], ctorParameters: function () { return [{ type: ResizeService }, { type: Window, decorators: [{
1237
+ type: Inject,
1238
+ args: [WINDOW]
1239
+ }] }]; }, propDecorators: { value: [{
1240
+ type: Input,
1241
+ args: ['sfc-tooltip']
1242
+ }, {
1243
+ type: HostBinding,
1244
+ args: ['attr.value']
1245
+ }], tooltipType: [{
1246
+ type: Input
1247
+ }, {
1248
+ type: HostBinding,
1249
+ args: ['attr.type']
1250
+ }], tooltipPosition: [{
1251
+ type: Input
1252
+ }, {
1253
+ type: HostBinding,
1254
+ args: ['attr.position']
1255
+ }], tooltipShow: [{
1256
+ type: Input
1257
+ }, {
1258
+ type: HostBinding,
1259
+ args: ['class.show']
1260
+ }], click: [{
1261
+ type: HostListener,
1262
+ args: ['click']
1263
+ }] } });
1264
+
1265
+ class DelimeterComponent {
1266
+ }
1267
+ DelimeterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelimeterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1268
+ DelimeterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: DelimeterComponent, selector: "sfc-delimeter", ngImport: i0, template: ``, isInline: true, styles: [":host{width:100%;height:.07em}:host :host-context(.sfc-default-theme){background:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 17%,rgba(0,0,0,.3) 83%,rgba(0,0,0,0) 100%)}:host :host-context(.sfc-dark-theme){background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 17%,rgba(255,255,255,.4) 83%,rgba(255,255,255,0) 100%)}\n"] });
1269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelimeterComponent, decorators: [{
1270
+ type: Component,
1271
+ args: [{ selector: 'sfc-delimeter', template: ``, styles: [":host{width:100%;height:.07em}:host :host-context(.sfc-default-theme){background:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 17%,rgba(0,0,0,.3) 83%,rgba(0,0,0,0) 100%)}:host :host-context(.sfc-dark-theme){background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.4) 17%,rgba(255,255,255,.4) 83%,rgba(255,255,255,0) 100%)}\n"] }]
1272
+ }] });
1273
+
1274
+ class LoaderConstants {
1275
+ }
1276
+ LoaderConstants.GLOBAL_LOADER_ID = 'global';
1277
+ LoaderConstants.LOCAL_LOADER_ID = 'local';
1278
+ LoaderConstants.CSS_CLASS_BACKGROUND = 'background';
1279
+
1280
+ class LoaderService {
1281
+ constructor() {
1282
+ this.loaderSubject = new BehaviorSubject([]);
1283
+ this.loaders$ = this.loaderSubject
1284
+ .asObservable()
1285
+ .pipe(filter(loaders => any(loaders)), distinctUntilChanged());
1286
+ }
1287
+ /**
1288
+ * Show loader by Id
1289
+ * @param id Loader Id
1290
+ * @param register If true register loader and show it
1291
+ */
1292
+ show(id = LoaderConstants.GLOBAL_LOADER_ID, register = false) {
1293
+ return this.setLoaderStatus(id, true, register);
1294
+ }
1295
+ /**
1296
+ * Hide loader
1297
+ * @param id Loader Id
1298
+ */
1299
+ hide(id = LoaderConstants.GLOBAL_LOADER_ID) {
1300
+ this.setLoaderStatus(id, false);
1301
+ }
1302
+ /**
1303
+ * Register loader for next use
1304
+ * @param event Loader event
1305
+ * @returns Registred loade observable
1306
+ */
1307
+ register(event) {
1308
+ const loaders = this.loaderSubject.getValue();
1309
+ if (addItem(loaders, event, () => hasObjectItem(loaders, nameof('id'), event.id))) {
1310
+ this.loaderSubject.next(loaders);
1311
+ }
1312
+ return this.selectLoaderById(event.id);
1313
+ }
1314
+ /**
1315
+ * Remove loader
1316
+ * @param id Loader Id
1317
+ */
1318
+ remove(id = LoaderConstants.GLOBAL_LOADER_ID) {
1319
+ const loaders = this.loaderSubject.getValue();
1320
+ if (removeItem(loaders, loader => loader.id == id)) {
1321
+ this.loaderSubject.next(loaders);
1322
+ }
1323
+ }
1324
+ selectLoaderById(id) {
1325
+ return this.loaders$
1326
+ .pipe(map(loaders => loaders.find(loader => loader.id == id)), distinctUntilChanged());
1327
+ }
1328
+ setLoaderStatus(id, status, register = false) {
1329
+ const loaders = this.loaderSubject.getValue(), ILoaderEvent = { id, status }, loader = firstOrDefault(loaders, (loader) => loader.id == id);
1330
+ if (isDefined(loader) && loader?.status == status)
1331
+ return this.selectLoaderById(id);
1332
+ const updatedLoaders = updateItem(loaders, (loader) => loader.id == id, ILoaderEvent);
1333
+ if (isDefined(updatedLoaders)) {
1334
+ this.loaderSubject.next(updatedLoaders);
1335
+ }
1336
+ if (register) {
1337
+ return this.register(ILoaderEvent);
1338
+ }
1339
+ return null;
1340
+ }
1341
+ }
1342
+ LoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: LoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1343
+ LoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: LoaderService, providedIn: 'root' });
1344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: LoaderService, decorators: [{
1345
+ type: Injectable,
1346
+ args: [{
1347
+ providedIn: 'root'
1348
+ }]
1349
+ }] });
1350
+
1351
+ class LoaderBaseComponent {
1352
+ constructor(loaderService) {
1353
+ this.loaderService = loaderService;
1354
+ this.UIClass = UIClass;
1355
+ /**
1356
+ * Loader identificator (global by default)
1357
+ */
1358
+ this.id = LoaderConstants.GLOBAL_LOADER_ID;
1359
+ /**
1360
+ * Is start on init (loader register with show = True)
1361
+ */
1362
+ this.start = false;
1363
+ /**
1364
+ * Loader when active(show) has background(low opacity)
1365
+ */
1366
+ this.background = true;
1367
+ this.show$ = EMPTY;
1368
+ }
1369
+ ngOnInit() {
1370
+ // register new loader
1371
+ this.show$ = this.loaderService.register({ id: this.id, status: this.start })
1372
+ .pipe(map((event) => this.id === event.id && event.status));
1373
+ }
1374
+ get preLoaderClasses() {
1375
+ let classes = {};
1376
+ if (this.id === LoaderConstants.GLOBAL_LOADER_ID)
1377
+ classes[LoaderConstants.GLOBAL_LOADER_ID] = true;
1378
+ else
1379
+ classes[LoaderConstants.LOCAL_LOADER_ID] = true;
1380
+ classes[LoaderConstants.CSS_CLASS_BACKGROUND] = this.background;
1381
+ return classes;
1382
+ }
1383
+ }
1384
+ LoaderBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: LoaderBaseComponent, deps: [{ token: LoaderService }], target: i0.ɵɵFactoryTarget.Directive });
1385
+ LoaderBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: LoaderBaseComponent, inputs: { id: "id", start: "start", background: "background" }, ngImport: i0 });
1386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: LoaderBaseComponent, decorators: [{
1387
+ type: Directive
1388
+ }], ctorParameters: function () { return [{ type: LoaderService }]; }, propDecorators: { id: [{
1389
+ type: Input
1390
+ }], start: [{
1391
+ type: Input
1392
+ }], background: [{
1393
+ type: Input
1394
+ }] } });
1395
+
1396
+ class BounceLoaderComponent extends LoaderBaseComponent {
1397
+ }
1398
+ BounceLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BounceLoaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1399
+ BounceLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", 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}: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}: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"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1$1.AsyncPipe } });
1400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BounceLoaderComponent, decorators: [{
1401
+ type: Component,
1402
+ 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}: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}: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"] }]
1403
+ }] });
1404
+
1405
+ var CircleLoaderType;
1406
+ (function (CircleLoaderType) {
1407
+ CircleLoaderType["Default"] = "default";
1408
+ CircleLoaderType["Fading"] = "fading";
1409
+ })(CircleLoaderType || (CircleLoaderType = {}));
1410
+
1411
+ class CircleLoaderComponent extends LoaderBaseComponent {
1412
+ constructor() {
1413
+ super(...arguments);
1414
+ this.type = CircleLoaderType.Default;
1415
+ }
1416
+ }
1417
+ CircleLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: CircleLoaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1418
+ CircleLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", 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}: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}: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"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1$1.AsyncPipe } });
1419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: CircleLoaderComponent, decorators: [{
1420
+ type: Component,
1421
+ 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}: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}: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"] }]
1422
+ }], propDecorators: { type: [{
1423
+ type: Input
1424
+ }] } });
1425
+
1426
+ var ModalTemplate;
1427
+ (function (ModalTemplate) {
1428
+ ModalTemplate["Body"] = "body";
1429
+ ModalTemplate["Header"] = "header";
1430
+ ModalTemplate["Footer"] = "footer";
1431
+ })(ModalTemplate || (ModalTemplate = {}));
1432
+
1433
+ class ModalService {
1434
+ constructor() {
1435
+ this.subjectClose = new Subject();
1436
+ this.subjectOpen = new Subject();
1437
+ this.close$ = this.subjectClose.asObservable();
1438
+ this.open$ = this.subjectOpen.asObservable();
1439
+ }
1440
+ close() {
1441
+ this.subjectClose.next();
1442
+ }
1443
+ open(options) {
1444
+ this.subjectOpen.next(options);
1445
+ }
1446
+ }
1447
+ ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1448
+ ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalService, providedIn: 'root' });
1449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalService, decorators: [{
1450
+ type: Injectable,
1451
+ args: [{
1452
+ providedIn: 'root'
1453
+ }]
1454
+ }] });
1455
+
1456
+ class DefaultModalHeaderComponent {
1457
+ constructor(modalService) {
1458
+ this.modalService = modalService;
1459
+ this.DEFAULT_MODAL_HEADER_MODEL = {
1460
+ icon: 'fa fa-window-restore',
1461
+ showCloseIcon: true,
1462
+ text: 'Modal'
1463
+ };
1464
+ }
1465
+ ngOnInit() {
1466
+ if (!isDefined(this.model))
1467
+ this.model = this.DEFAULT_MODAL_HEADER_MODEL;
1468
+ }
1469
+ onClose() {
1470
+ this.modalService.close();
1471
+ }
1472
+ }
1473
+ DefaultModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DefaultModalHeaderComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
1474
+ DefaultModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <i *ngIf=\"model?.icon\" class=\"icon\" class=\"{{model?.icon}}\"></i>\r\n <span *ngIf=\"model?.text\" class=\"label\">{{model?.text}}</span>\r\n <span *ngIf=\"model?.showCloseIcon\" class=\"close\" (click)=\"onClose()\">\r\n <i class=\"fa fa-times\"></i>\r\n </span>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;align-items:flex-start;width:100%;justify-content:space-between}:host .container i{font-size:1em}:host .container .icon{padding-right:.7em}:host .container .label{font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em}:host .container .close{color:#545e61;cursor:pointer;display:flex;padding-left:.7em}:host .container .close:hover{color:#2bbbad}\n"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DefaultModalHeaderComponent, decorators: [{
1476
+ type: Component,
1477
+ args: [{ selector: 'sfc-default-modal-header', template: "<div class=\"container\">\r\n <i *ngIf=\"model?.icon\" class=\"icon\" class=\"{{model?.icon}}\"></i>\r\n <span *ngIf=\"model?.text\" class=\"label\">{{model?.text}}</span>\r\n <span *ngIf=\"model?.showCloseIcon\" class=\"close\" (click)=\"onClose()\">\r\n <i class=\"fa fa-times\"></i>\r\n </span>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;align-items:flex-start;width:100%;justify-content:space-between}:host .container i{font-size:1em}:host .container .icon{padding-right:.7em}:host .container .label{font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em}:host .container .close{color:#545e61;cursor:pointer;display:flex;padding-left:.7em}:host .container .close:hover{color:#2bbbad}\n"] }]
1478
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { model: [{
1479
+ type: Input
1480
+ }] } });
1481
+
1482
+ class DefaultModalFooterComponent {
1483
+ constructor(modalService) {
1484
+ this.modalService = modalService;
1485
+ this.DEFAULT_MODAL_FOOTER_MODEL = {
1486
+ cancelButton: true,
1487
+ applyButton: true
1488
+ };
1489
+ this.BUTTON_CUSTOM_SIZE = 0.9;
1490
+ this.ComponentSize = ComponentSize;
1491
+ this.ButtonType = ButtonType;
1492
+ }
1493
+ ngOnInit() {
1494
+ if (!isDefined(this.model)) {
1495
+ this.model = this.DEFAULT_MODAL_FOOTER_MODEL;
1496
+ }
1497
+ }
1498
+ onButtonClick(isCancelButton = false) {
1499
+ if (isCancelButton) {
1500
+ if (this.model?.onCancel) {
1501
+ return this.model?.onCancel();
1502
+ }
1503
+ }
1504
+ else {
1505
+ if (this.model?.onApply) {
1506
+ return this.model?.onApply();
1507
+ }
1508
+ }
1509
+ this.modalService.close();
1510
+ }
1511
+ }
1512
+ DefaultModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DefaultModalFooterComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
1513
+ DefaultModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", 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=\"Ok\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model?.cancelButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" text=\"Cancel\"\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{width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"], components: [{ type: ButtonComponent, selector: "sfc-button", inputs: ["text", "iconBefore", "iconAfter", "disabled", "types"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }] });
1514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DefaultModalFooterComponent, decorators: [{
1515
+ type: Component,
1516
+ args: [{ selector: 'sfc-default-modal-footer', template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model?.applyButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" text=\"Ok\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model?.cancelButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" text=\"Cancel\"\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{width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"] }]
1517
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { model: [{
1518
+ type: Input
1519
+ }] } });
1520
+
1521
+ class ModalComponent {
1522
+ constructor(modalService) {
1523
+ this.modalService = modalService;
1524
+ this.ModalTemplate = ModalTemplate;
1525
+ // End Defaults
1526
+ this.hideOnEsc = true;
1527
+ this.hideOnClickOutside = true;
1528
+ }
1529
+ onEscapeKeyDownHandler() {
1530
+ if (this.hideOnEsc)
1531
+ this.close();
1532
+ }
1533
+ getTemplate(template) {
1534
+ if (!isDefined(this.templates))
1535
+ return null;
1536
+ const templateRef = firstOrDefault(this.templates?.toArray(), t => t.templateName == template);
1537
+ return isDefined(templateRef) ? templateRef?.template : null;
1538
+ }
1539
+ isShowDefault(template) {
1540
+ return !isDefined(this.getTemplate(template))
1541
+ && (template == ModalTemplate.Header
1542
+ ? !isDefined(this.header)
1543
+ : !isDefined(this.footer));
1544
+ }
1545
+ close() {
1546
+ this.modalService.close();
1547
+ }
1548
+ }
1549
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
1550
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: ModalComponent, selector: "sfc-modal", inputs: { body: "body", header: "header", footer: "footer", defaultHeaderModel: "defaultHeaderModel", defaultFooterModel: "defaultFooterModel", hideOnEsc: "hideOnEsc", hideOnClickOutside: "hideOnClickOutside" }, 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 class=\"header\">\r\n\r\n <ng-container *ngIf=\"header;else headerTemplate\">\r\n <ng-container *ngTemplateOutlet=\"header;\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #headerTemplate>\r\n <ng-container *ngTemplateOutlet=\"getTemplate(ModalTemplate.Header)\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isShowDefault(ModalTemplate.Header)\">\r\n <sfc-default-modal-header [model]=\"defaultHeaderModel\">\r\n </sfc-default-modal-header>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <div class=\"body\">\r\n\r\n <ng-container *ngIf=\"body;else bodyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"body;\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #bodyTemplate>\r\n <ng-container #bodyTemplate *ngTemplateOutlet=\"getTemplate(ModalTemplate.Body)\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n <div class=\"footer\">\r\n\r\n <ng-container *ngIf=\"footer;else footerTemplate\">\r\n <ng-container *ngTemplateOutlet=\"footer;\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #footerTemplate>\r\n <ng-container *ngTemplateOutlet=\"getTemplate(ModalTemplate.Footer)\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isShowDefault(ModalTemplate.Footer)\">\r\n <sfc-default-modal-footer [model]=\"defaultFooterModel\">\r\n </sfc-default-modal-footer>\r\n </ng-container>\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:.7em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;overflow-y:auto;box-shadow:0 .125em .625em #0003;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%;flex:0 0 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#545e61;flex-direction:row;display:flex;justify-content:center}\n"], components: [{ type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: ["model"] }, { type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: ["model"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
1551
+ trigger('hideOverlay', [
1552
+ state('initial', style({ opacity: 1, visibility: 'visible' })),
1553
+ state('void', style({ opacity: 0, visibility: 'hidden' })),
1554
+ transition('* => void', [
1555
+ group([
1556
+ query(':self', [
1557
+ animate('400ms cubic-bezier(.55, 0, .1, 1)', style({
1558
+ opacity: 0,
1559
+ visibility: 'hidden'
1560
+ }))
1561
+ ]),
1562
+ query('@hideContent', [animateChild()])
1563
+ ])
1564
+ ])
1565
+ ]),
1566
+ trigger('hideContent', [
1567
+ state('initial', style({ opacity: 1, visibility: 'visible', transform: 'scale(1)' })),
1568
+ state('void', style({ opacity: 0, visibility: 'hidden', transform: 'scale(1.2)' })),
1569
+ transition('* => void', animate('400ms cubic-bezier(.55, 0, .1, 1)'))
1570
+ ])
1571
+ ] });
1572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalComponent, decorators: [{
1573
+ type: Component,
1574
+ args: [{ selector: 'sfc-modal', animations: [
1575
+ trigger('hideOverlay', [
1576
+ state('initial', style({ opacity: 1, visibility: 'visible' })),
1577
+ state('void', style({ opacity: 0, visibility: 'hidden' })),
1578
+ transition('* => void', [
1579
+ group([
1580
+ query(':self', [
1581
+ animate('400ms cubic-bezier(.55, 0, .1, 1)', style({
1582
+ opacity: 0,
1583
+ visibility: 'hidden'
1584
+ }))
1585
+ ]),
1586
+ query('@hideContent', [animateChild()])
1587
+ ])
1588
+ ])
1589
+ ]),
1590
+ trigger('hideContent', [
1591
+ state('initial', style({ opacity: 1, visibility: 'visible', transform: 'scale(1)' })),
1592
+ state('void', style({ opacity: 0, visibility: 'hidden', transform: 'scale(1.2)' })),
1593
+ transition('* => void', animate('400ms cubic-bezier(.55, 0, .1, 1)'))
1594
+ ])
1595
+ ], template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div class=\"header\">\r\n\r\n <ng-container *ngIf=\"header;else headerTemplate\">\r\n <ng-container *ngTemplateOutlet=\"header;\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #headerTemplate>\r\n <ng-container *ngTemplateOutlet=\"getTemplate(ModalTemplate.Header)\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isShowDefault(ModalTemplate.Header)\">\r\n <sfc-default-modal-header [model]=\"defaultHeaderModel\">\r\n </sfc-default-modal-header>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <div class=\"body\">\r\n\r\n <ng-container *ngIf=\"body;else bodyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"body;\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #bodyTemplate>\r\n <ng-container #bodyTemplate *ngTemplateOutlet=\"getTemplate(ModalTemplate.Body)\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n <div class=\"footer\">\r\n\r\n <ng-container *ngIf=\"footer;else footerTemplate\">\r\n <ng-container *ngTemplateOutlet=\"footer;\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #footerTemplate>\r\n <ng-container *ngTemplateOutlet=\"getTemplate(ModalTemplate.Footer)\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isShowDefault(ModalTemplate.Footer)\">\r\n <sfc-default-modal-footer [model]=\"defaultFooterModel\">\r\n </sfc-default-modal-footer>\r\n </ng-container>\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:.7em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;overflow-y:auto;box-shadow:0 .125em .625em #0003;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%;flex:0 0 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#545e61;flex-direction:row;display:flex;justify-content:center}\n"] }]
1596
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { body: [{
1597
+ type: Input
1598
+ }], header: [{
1599
+ type: Input
1600
+ }], footer: [{
1601
+ type: Input
1602
+ }], defaultHeaderModel: [{
1603
+ type: Input
1604
+ }], defaultFooterModel: [{
1605
+ type: Input
1606
+ }], hideOnEsc: [{
1607
+ type: Input
1608
+ }], hideOnClickOutside: [{
1609
+ type: Input
1610
+ }], onEscapeKeyDownHandler: [{
1611
+ type: HostListener,
1612
+ args: ['document:keydown.escape']
1613
+ }], templates: [{
1614
+ type: ContentChildren,
1615
+ args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
1616
+ }] } });
1617
+
1618
+ class ModalOpenOnClickDirective {
1619
+ constructor(templateRef, viewContainer, modalService) {
1620
+ this.templateRef = templateRef;
1621
+ this.viewContainer = viewContainer;
1622
+ this.modalService = modalService;
1623
+ this.clickHandler = ((event) => {
1624
+ this.viewContainer.clear();
1625
+ this.viewContainer.createEmbeddedView(this.templateRef);
1626
+ this.modalService.open(event.currentTarget);
1627
+ }).bind(this);
1628
+ this.elements = [];
1629
+ }
1630
+ set modalOpenOnClick(elements) {
1631
+ if (!isDefined(elements))
1632
+ return;
1633
+ if (elements instanceof HTMLElement)
1634
+ this.elements = [elements];
1635
+ else
1636
+ this.elements = elements;
1637
+ this.elements.forEach(el => {
1638
+ el.addEventListener('click', this.clickHandler);
1639
+ });
1640
+ }
1641
+ ngOnInit() {
1642
+ this._closeSubscription = this.modalService.close$
1643
+ .subscribe(() => {
1644
+ this.viewContainer.clear();
1645
+ });
1646
+ }
1647
+ ngOnDestroy() {
1648
+ this._closeSubscription?.unsubscribe();
1649
+ this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
1650
+ }
1651
+ }
1652
+ ModalOpenOnClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalOpenOnClickDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
1653
+ ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
1654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
1655
+ type: Directive,
1656
+ args: [{
1657
+ selector: '[sfcModalOpenOnClick]'
1658
+ }]
1659
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { modalOpenOnClick: [{
1660
+ type: Input,
1661
+ args: ['sfcModalOpenOnClick']
1662
+ }] } });
1663
+
1664
+ class HamburgerComponent {
1665
+ constructor() {
1666
+ this.open = false;
1667
+ this.onClick = () => this.open = !this.open;
1668
+ }
1669
+ }
1670
+ HamburgerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HamburgerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1671
+ HamburgerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: HamburgerComponent, selector: "sfc-hamburger", inputs: { open: "open" }, host: { listeners: { "click": "onClick()" }, properties: { "class.open": "this.open" } }, 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{border-radius:.31em;width:100%;height:.25em}:host-context(.sfc-default-theme) .container .line{background-color:#545e61}:host-context(.sfc-dark-theme) .container .line{background-color:#ccd1d9}.container .line.half{width:50%}.container .line.start{transition:transform .33s cubic-bezier(.54,-.81,.57,.57);transform-origin:right}:host(.open) .container .line.start{transform:rotate(-90deg) translate(.1875em)}.container .line.end{align-self:flex-end;transition:transform .33s cubic-bezier(.54,-.81,.57,.57);transform-origin:left}:host(.open) .container .line.end{transform:rotate(-90deg) translate(-.1875em)}.container:hover .line{background-color:#2bbbad!important}\n"] });
1672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HamburgerComponent, decorators: [{
1673
+ type: Component,
1674
+ 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{border-radius:.31em;width:100%;height:.25em}:host-context(.sfc-default-theme) .container .line{background-color:#545e61}:host-context(.sfc-dark-theme) .container .line{background-color:#ccd1d9}.container .line.half{width:50%}.container .line.start{transition:transform .33s cubic-bezier(.54,-.81,.57,.57);transform-origin:right}:host(.open) .container .line.start{transform:rotate(-90deg) translate(.1875em)}.container .line.end{align-self:flex-end;transition:transform .33s cubic-bezier(.54,-.81,.57,.57);transform-origin:left}:host(.open) .container .line.end{transform:rotate(-90deg) translate(-.1875em)}.container:hover .line{background-color:#2bbbad!important}\n"] }]
1675
+ }], propDecorators: { open: [{
1676
+ type: Input
1677
+ }, {
1678
+ type: HostBinding,
1679
+ args: ['class.' + UIClass.Open]
1680
+ }], onClick: [{
1681
+ type: HostListener,
1682
+ args: ['click']
1683
+ }] } });
1684
+
1685
+ class DotsComponent {
1686
+ constructor() {
1687
+ this.open = false;
1688
+ this.direction = Direction.Horizontal;
1689
+ this.onClick = () => this.open = !this.open;
1690
+ }
1691
+ }
1692
+ DotsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DotsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1693
+ DotsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", 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(90deg);transition:all .3s cubic-bezier(.175,.885,.32,1.275);cursor:pointer}:host.open{transform:rotate(0)}:host.vertical{transform:rotate(0)}:host.vertical.open{transform:rotate(90deg)}: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:column,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-context(.sfc-default-theme) :host .container .dots-container .dot{background:#545e61}:host-context(.sfc-dark-theme) :host .container .dots-container .dot{background:#ccd1d9}:host .container:hover,:host .container.open,:host .container:focus{outline:none}:host-context(.sfc-default-theme) :host .container:hover .dots-container .dot,:host-context(.sfc-default-theme) :host .container.open .dots-container .dot,:host-context(.sfc-default-theme) :host .container:focus .dots-container .dot{background:#2bbbad}:host-context(.sfc-dark-theme) :host .container:hover .dots-container .dot,:host-context(.sfc-dark-theme) :host .container.open .dots-container .dot,:host-context(.sfc-dark-theme) :host .container:focus .dots-container .dot{background:#2bbbad}\n"] });
1694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DotsComponent, decorators: [{
1695
+ type: Component,
1696
+ 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(90deg);transition:all .3s cubic-bezier(.175,.885,.32,1.275);cursor:pointer}:host.open{transform:rotate(0)}:host.vertical{transform:rotate(0)}:host.vertical.open{transform:rotate(90deg)}: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:column,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-context(.sfc-default-theme) :host .container .dots-container .dot{background:#545e61}:host-context(.sfc-dark-theme) :host .container .dots-container .dot{background:#ccd1d9}:host .container:hover,:host .container.open,:host .container:focus{outline:none}:host-context(.sfc-default-theme) :host .container:hover .dots-container .dot,:host-context(.sfc-default-theme) :host .container.open .dots-container .dot,:host-context(.sfc-default-theme) :host .container:focus .dots-container .dot{background:#2bbbad}:host-context(.sfc-dark-theme) :host .container:hover .dots-container .dot,:host-context(.sfc-dark-theme) :host .container.open .dots-container .dot,:host-context(.sfc-dark-theme) :host .container:focus .dots-container .dot{background:#2bbbad}\n"] }]
1697
+ }], propDecorators: { open: [{
1698
+ type: Input
1699
+ }, {
1700
+ type: HostBinding,
1701
+ args: ['class.' + UIClass.Open]
1702
+ }], direction: [{
1703
+ type: Input
1704
+ }, {
1705
+ type: HostBinding,
1706
+ args: ['class']
1707
+ }], onClick: [{
1708
+ type: HostListener,
1709
+ args: ['click']
1710
+ }] } });
1711
+
1712
+ class ToggleSwitcherComponent {
1713
+ constructor() {
1714
+ this.active = false;
1715
+ this.onClick = () => this.active = !this.active;
1716
+ this.leftModel = { label: 'Left' };
1717
+ this.rightModel = { label: 'Right' };
1718
+ }
1719
+ }
1720
+ ToggleSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ToggleSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1721
+ ToggleSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: ToggleSwitcherComponent, selector: "sfc-toggle-switcher", inputs: { active: "active", leftModel: "leftModel", rightModel: "rightModel" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"toggle\"></div>\r\n <div class=\"names\">\r\n <p class=\"left\">\r\n <i *ngIf=\"leftModel.icon\" class=\"{{leftModel.icon}}\"></i>\r\n <span>{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\">\r\n <i *ngIf=\"rightModel.icon\" class=\"{{rightModel.icon}}\"></i>\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 1em #0003;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 .container .names p i{margin-right:.25em}: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}\n"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ToggleSwitcherComponent, decorators: [{
1723
+ type: Component,
1724
+ 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 <i *ngIf=\"leftModel.icon\" class=\"{{leftModel.icon}}\"></i>\r\n <span>{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\">\r\n <i *ngIf=\"rightModel.icon\" class=\"{{rightModel.icon}}\"></i>\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 1em #0003;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 .container .names p i{margin-right:.25em}: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}\n"] }]
1725
+ }], ctorParameters: function () { return []; }, propDecorators: { active: [{
1726
+ type: Input
1727
+ }, {
1728
+ type: HostBinding,
1729
+ args: ['class.' + UIClass.Active]
1730
+ }], leftModel: [{
1731
+ type: Input
1732
+ }], rightModel: [{
1733
+ type: Input
1734
+ }], onClick: [{
1735
+ type: HostListener,
1736
+ args: ['click']
1737
+ }] } });
1738
+
1739
+ class CheckmarkComponent {
1740
+ constructor() {
1741
+ this.active = false;
1742
+ this.icon = 'fa fa-check';
1743
+ this.onClick = () => this.active = !this.active;
1744
+ }
1745
+ }
1746
+ CheckmarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: CheckmarkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1747
+ CheckmarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: CheckmarkComponent, selector: "sfc-checkmark", inputs: { active: "active", icon: "icon" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active" } }, ngImport: i0, template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <i class=\"{{icon}}\"></i>\r\n </span>\r\n</div>", styles: [":host{display:inline-block}:host .check{border-radius:50%;border:.18em solid;background:#fff;border-color:#ccd1d9;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:border-color .3s ease}:host .check i{font-size:.8em;transition:opacity .3s ease;color:transparent;-webkit-text-stroke:1px #0003}:host-context(.sfc-default-theme) :host .check i{opacity:.5}:host-context(.sfc-dark-theme) :host .check i{opacity:.8}:host .check:hover{border-color:#2bbbad}:host .check:hover i{-webkit-text-stroke:initial;color:#2bbbad}:host-context(.sfc-default-theme) :host .check:hover i{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover i{opacity:1}:host.active .check{border-color:#2bbbad;background:#2bbbad}:host.active .check i{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)}}\n"] });
1748
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: CheckmarkComponent, decorators: [{
1749
+ type: Component,
1750
+ args: [{ selector: 'sfc-checkmark', template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <i class=\"{{icon}}\"></i>\r\n </span>\r\n</div>", styles: [":host{display:inline-block}:host .check{border-radius:50%;border:.18em solid;background:#fff;border-color:#ccd1d9;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:border-color .3s ease}:host .check i{font-size:.8em;transition:opacity .3s ease;color:transparent;-webkit-text-stroke:1px #0003}:host-context(.sfc-default-theme) :host .check i{opacity:.5}:host-context(.sfc-dark-theme) :host .check i{opacity:.8}:host .check:hover{border-color:#2bbbad}:host .check:hover i{-webkit-text-stroke:initial;color:#2bbbad}:host-context(.sfc-default-theme) :host .check:hover i{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover i{opacity:1}:host.active .check{border-color:#2bbbad;background:#2bbbad}:host.active .check i{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)}}\n"] }]
1751
+ }], propDecorators: { active: [{
1752
+ type: Input
1753
+ }, {
1754
+ type: HostBinding,
1755
+ args: ['class.' + UIClass.Active]
1756
+ }], icon: [{
1757
+ type: Input
1758
+ }], onClick: [{
1759
+ type: HostListener,
1760
+ args: ['click']
1761
+ }] } });
1762
+
1763
+ class NgxSfcCommonModule {
1764
+ }
1765
+ NgxSfcCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NgxSfcCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1766
+ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NgxSfcCommonModule, declarations: [
1767
+ // directives
1768
+ ClickOutsideDirective,
1769
+ ShowHideElementDirective,
1770
+ ThrowElementOnHoverDirective,
1771
+ TemplateReferenceDirective,
1772
+ MouseDownDirective,
1773
+ ComponentSizeDirective,
1774
+ // components
1775
+ ButtonComponent,
1776
+ TooltipComponent,
1777
+ DelimeterComponent,
1778
+ // loaders
1779
+ BounceLoaderComponent,
1780
+ CircleLoaderComponent,
1781
+ // modal
1782
+ ModalComponent,
1783
+ ModalOpenOnClickDirective,
1784
+ DefaultModalHeaderComponent,
1785
+ DefaultModalFooterComponent,
1786
+ // hamburger
1787
+ HamburgerComponent,
1788
+ // dots
1789
+ DotsComponent,
1790
+ //toggle
1791
+ ToggleSwitcherComponent,
1792
+ CheckmarkComponent], imports: [CommonModule,
1793
+ BrowserAnimationsModule], exports: [
1794
+ // directives
1795
+ ClickOutsideDirective,
1796
+ ShowHideElementDirective,
1797
+ ThrowElementOnHoverDirective,
1798
+ TemplateReferenceDirective,
1799
+ MouseDownDirective,
1800
+ ComponentSizeDirective,
1801
+ // components
1802
+ ButtonComponent,
1803
+ TooltipComponent,
1804
+ DelimeterComponent,
1805
+ // loaders
1806
+ BounceLoaderComponent,
1807
+ CircleLoaderComponent,
1808
+ // modal
1809
+ ModalComponent,
1810
+ ModalOpenOnClickDirective,
1811
+ DefaultModalHeaderComponent,
1812
+ DefaultModalFooterComponent,
1813
+ // hamburger
1814
+ HamburgerComponent,
1815
+ // dots
1816
+ DotsComponent,
1817
+ //toggle
1818
+ ToggleSwitcherComponent,
1819
+ CheckmarkComponent] });
1820
+ NgxSfcCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NgxSfcCommonModule, providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS], imports: [[
1821
+ CommonModule,
1822
+ BrowserAnimationsModule
1823
+ ]] });
1824
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NgxSfcCommonModule, decorators: [{
1825
+ type: NgModule,
1826
+ args: [{
1827
+ declarations: [
1828
+ // directives
1829
+ ClickOutsideDirective,
1830
+ ShowHideElementDirective,
1831
+ ThrowElementOnHoverDirective,
1832
+ TemplateReferenceDirective,
1833
+ MouseDownDirective,
1834
+ ComponentSizeDirective,
1835
+ // components
1836
+ ButtonComponent,
1837
+ TooltipComponent,
1838
+ DelimeterComponent,
1839
+ // loaders
1840
+ BounceLoaderComponent,
1841
+ CircleLoaderComponent,
1842
+ // modal
1843
+ ModalComponent,
1844
+ ModalOpenOnClickDirective,
1845
+ DefaultModalHeaderComponent,
1846
+ DefaultModalFooterComponent,
1847
+ // hamburger
1848
+ HamburgerComponent,
1849
+ // dots
1850
+ DotsComponent,
1851
+ //toggle
1852
+ ToggleSwitcherComponent,
1853
+ CheckmarkComponent
1854
+ ],
1855
+ imports: [
1856
+ CommonModule,
1857
+ BrowserAnimationsModule
1858
+ ],
1859
+ exports: [
1860
+ // directives
1861
+ ClickOutsideDirective,
1862
+ ShowHideElementDirective,
1863
+ ThrowElementOnHoverDirective,
1864
+ TemplateReferenceDirective,
1865
+ MouseDownDirective,
1866
+ ComponentSizeDirective,
1867
+ // components
1868
+ ButtonComponent,
1869
+ TooltipComponent,
1870
+ DelimeterComponent,
1871
+ // loaders
1872
+ BounceLoaderComponent,
1873
+ CircleLoaderComponent,
1874
+ // modal
1875
+ ModalComponent,
1876
+ ModalOpenOnClickDirective,
1877
+ DefaultModalHeaderComponent,
1878
+ DefaultModalFooterComponent,
1879
+ // hamburger
1880
+ HamburgerComponent,
1881
+ // dots
1882
+ DotsComponent,
1883
+ //toggle
1884
+ ToggleSwitcherComponent,
1885
+ CheckmarkComponent
1886
+ ],
1887
+ providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS]
1888
+ }]
1889
+ }] });
1890
+
1891
+ /*
1892
+ * Public API Surface of ngx-sfc-common
1893
+ */
1894
+
1895
+ /**
1896
+ * Generated bundle index. Do not edit.
1897
+ */
1898
+
1899
+ export { BounceLoaderComponent, BrowserDocumentRef, BrowserWindowRef, ButtonComponent, ButtonType, CheckmarkComponent, CircleLoaderComponent, CircleLoaderType, ClickOutsideDirective, CommonConstants, ComponentSize, ComponentSizeDirective, DOCUMENT, DOCUMENT_PROVIDERS, DateTimeConstants, DefaultModalFooterComponent, DefaultModalHeaderComponent, DelimeterComponent, Direction, DocumentRef, DotsComponent, HamburgerComponent, LoaderService, MediaLimits, ModalComponent, ModalOpenOnClickDirective, ModalService, ModalTemplate, MouseDownDirective, NgxSfcCommonModule, Position, ResizeService, ShowHideElementDirective, SortingDirection, TemplateReferenceDirective, ThrowElementOnHoverDirective, ToggleSwitcherComponent, TooltipComponent, TooltipType, UIClass, UIConstants, WINDOW, WINDOW_PROVIDERS, WindowRef, addClasses, addItem, addPropertyToObject, all, any, browserDocumentProvider, browserWindowProvider, contains, distinct, documentFactory, documentProvider, firstItem, firstOrDefault, getCollectionOrEmpty, getCssLikeValue, getFileExtension, getFirstDayOfMonth, getFirstDayOfMonthByYearAndMonth, getFirstDayOfYear, getLastDayOfMonth, getLastDayOfMonthByYearAndMonth, getLastDayOfYear, getNextMonth, getNextYear, getPreviousMonth, getPreviousYear, getValueFromCssLikeValue, getWeeksNumberInMonth, hasItem, hasItemBy, hasObjectItem, isAsyncData, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual, isDefined, isEqualDates, isImage, isNullOrEmptyString, isObject, lastItem, max, mergeDeep, nameof, parseFileSize, readAsDataURL, remove, removeClasses, removeItem, removePropertyFromObject, setDay, setHours, setMinutes, setYear, skip, sortBy, sortByPath, sum, trim, updateItem, where, windowFactory, windowProvider };
1900
+ //# sourceMappingURL=ngx-sfc-common.mjs.map