ngx-sfc-common 0.0.26 → 0.0.28

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 (87) hide show
  1. package/components/button/button.component.mixins.scss +28 -0
  2. package/esm2020/lib/components/checkmark/checkmark.component.mjs +8 -4
  3. package/esm2020/lib/components/index.mjs +2 -1
  4. package/esm2020/lib/components/load-container/enums/load-container-load-type.enum.mjs +2 -1
  5. package/esm2020/lib/components/load-container/enums/load-container-type.enum.mjs +2 -1
  6. package/esm2020/lib/components/load-container/load-container.component.mjs +21 -17
  7. package/esm2020/lib/components/load-container/models/load-container-predicate-parameters.model.mjs +1 -1
  8. package/esm2020/lib/components/message/message.component.mjs +22 -0
  9. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +14 -12
  10. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.model.mjs +2 -0
  11. package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +10 -4
  12. package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +16 -17
  13. package/esm2020/lib/components/modal/footer/default/default-modal-footer.constants.mjs +10 -0
  14. package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +13 -14
  15. package/esm2020/lib/components/modal/header/default/default-modal-header.constants.mjs +9 -0
  16. package/esm2020/lib/components/modal/modal.component.mjs +43 -12
  17. package/esm2020/lib/components/modal/service/modal.event.mjs +1 -1
  18. package/esm2020/lib/components/modal/service/modal.service.mjs +17 -13
  19. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +10 -4
  20. package/esm2020/lib/constants/ui.constants.mjs +2 -1
  21. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -2
  22. package/esm2020/lib/directives/if/if.directive.mjs +5 -1
  23. package/esm2020/lib/enums/index.mjs +5 -1
  24. package/esm2020/lib/enums/items-view.enum.mjs +7 -0
  25. package/esm2020/lib/enums/notification-type.enum.mjs +7 -0
  26. package/esm2020/lib/enums/select.enum.mjs +6 -0
  27. package/esm2020/lib/enums/state.enum.mjs +6 -0
  28. package/esm2020/lib/models/index.mjs +2 -2
  29. package/esm2020/lib/models/observable.model.mjs +10 -0
  30. package/esm2020/lib/models/select.model.mjs +2 -0
  31. package/esm2020/lib/ngx-sfc-common.module.mjs +15 -7
  32. package/esm2020/lib/pipes/index.mjs +2 -1
  33. package/esm2020/lib/pipes/repeat/repeat.pipe.mjs +14 -0
  34. package/esm2020/lib/pipes/sort-by/sort-by.pipe.mjs +4 -3
  35. package/esm2020/lib/pipes/switch-multi-case/switch-multi-case.pipe.mjs +2 -4
  36. package/esm2020/lib/services/index.mjs +2 -1
  37. package/esm2020/lib/services/reload/reload.service.mjs +21 -0
  38. package/esm2020/lib/utils/collections.utils.mjs +27 -1
  39. package/esm2020/lib/utils/common.utils.mjs +39 -7
  40. package/esm2020/lib/utils/date-time.utils.mjs +33 -1
  41. package/esm2020/lib/utils/http.utils.mjs +3 -1
  42. package/esm2020/lib/utils/index.mjs +4 -4
  43. package/esm2020/public-api.mjs +2 -1
  44. package/fesm2015/ngx-sfc-common.mjs +414 -157
  45. package/fesm2015/ngx-sfc-common.mjs.map +1 -1
  46. package/fesm2020/ngx-sfc-common.mjs +411 -155
  47. package/fesm2020/ngx-sfc-common.mjs.map +1 -1
  48. package/lib/components/checkmark/checkmark.component.d.ts +1 -0
  49. package/lib/components/index.d.ts +1 -0
  50. package/lib/components/load-container/enums/load-container-load-type.enum.d.ts +1 -0
  51. package/lib/components/load-container/enums/load-container-type.enum.d.ts +2 -1
  52. package/lib/components/load-container/load-container.component.d.ts +3 -2
  53. package/lib/components/load-container/models/load-container-predicate-parameters.model.d.ts +1 -0
  54. package/lib/components/message/message.component.d.ts +9 -0
  55. package/lib/components/modal/directive/click/modal-open-on-click.directive.d.ts +5 -2
  56. package/lib/components/modal/directive/click/modal-open-on-click.model.d.ts +4 -0
  57. package/lib/components/modal/directive/open/modal-open.directive.d.ts +2 -1
  58. package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +4 -3
  59. package/lib/components/modal/footer/default/default-modal-footer.constants.d.ts +5 -0
  60. package/lib/components/modal/header/default/default-modal-header.component.d.ts +2 -2
  61. package/lib/components/modal/header/default/default-modal-header.constants.d.ts +4 -0
  62. package/lib/components/modal/modal.component.d.ts +14 -5
  63. package/lib/components/modal/service/modal.event.d.ts +1 -0
  64. package/lib/components/modal/service/modal.service.d.ts +7 -6
  65. package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +4 -2
  66. package/lib/constants/ui.constants.d.ts +1 -0
  67. package/lib/directives/if/if.directive.d.ts +1 -1
  68. package/lib/enums/index.d.ts +4 -0
  69. package/lib/enums/items-view.enum.d.ts +5 -0
  70. package/lib/enums/notification-type.enum.d.ts +5 -0
  71. package/lib/enums/select.enum.d.ts +4 -0
  72. package/lib/enums/state.enum.d.ts +4 -0
  73. package/lib/models/index.d.ts +2 -0
  74. package/lib/models/observable.model.d.ts +8 -0
  75. package/lib/models/select.model.d.ts +4 -0
  76. package/lib/ngx-sfc-common.module.d.ts +14 -12
  77. package/lib/pipes/index.d.ts +1 -0
  78. package/lib/pipes/repeat/repeat.pipe.d.ts +7 -0
  79. package/lib/services/index.d.ts +1 -0
  80. package/lib/services/reload/reload.service.d.ts +9 -0
  81. package/lib/utils/collections.utils.d.ts +14 -0
  82. package/lib/utils/common.utils.d.ts +18 -6
  83. package/lib/utils/date-time.utils.d.ts +22 -1
  84. package/lib/utils/index.d.ts +3 -3
  85. package/package.json +1 -1
  86. package/public-api.d.ts +1 -0
  87. package/styles/_mixins.scss +11 -0
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, PLATFORM_ID, EventEmitter, Directive, Inject, Input, Output, HostListener, Pipe, Component, HostBinding, ContentChildren, ViewChild, NgModule } from '@angular/core';
2
+ import { InjectionToken, Injectable, PLATFORM_ID, EventEmitter, Directive, Inject, Input, Output, HostListener, Pipe, Component, HostBinding, Optional, ContentChildren, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { isPlatformBrowser, formatDate, CommonModule } from '@angular/common';
5
5
  import * as i1$2 from '@fortawesome/angular-fontawesome';
6
6
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
7
- import { Subject, fromEvent, Observable, distinctUntilChanged, startWith, BehaviorSubject, filter, map, EMPTY, tap, switchMap, combineLatest, of } from 'rxjs';
7
+ import { Subject, BehaviorSubject, fromEvent, Observable, distinctUntilChanged, startWith, filter, map, EMPTY, combineLatest, tap, switchMap, of } from 'rxjs';
8
8
  import * as i1 from '@angular/platform-browser';
9
9
  import { __awaiter } from 'tslib';
10
10
  import { HttpParams } from '@angular/common/http';
11
11
  import { trigger, state, style, transition, group, query, animate, animateChild } from '@angular/animations';
12
- import { faTimes, faWindowRestore, faCheck, faChevronLeft, faChevronRight, faChevronCircleDown, faChevronUp, faChevronDown } from '@fortawesome/free-solid-svg-icons';
12
+ import { faWindowRestore, faTimes, faCheck, faChevronLeft, faChevronRight, faChevronCircleDown, faChevronUp, faChevronDown } from '@fortawesome/free-solid-svg-icons';
13
13
 
14
14
  /**
15
15
  * Component sizes
@@ -124,6 +124,32 @@ var Compare;
124
124
  })(Compare || (Compare = {}));
125
125
  ;
126
126
 
127
+ var State;
128
+ (function (State) {
129
+ State["Added"] = "added";
130
+ State["Removed"] = "removed";
131
+ })(State || (State = {}));
132
+
133
+ var NotificationType;
134
+ (function (NotificationType) {
135
+ NotificationType["Info"] = "info";
136
+ NotificationType["Success"] = "success";
137
+ NotificationType["Failed"] = "failed";
138
+ })(NotificationType || (NotificationType = {}));
139
+
140
+ var Select;
141
+ (function (Select) {
142
+ Select["Single"] = "single";
143
+ Select["Multiple"] = "multiple";
144
+ })(Select || (Select = {}));
145
+
146
+ var ItemsView;
147
+ (function (ItemsView) {
148
+ ItemsView["List"] = "list";
149
+ ItemsView["Icons"] = "icons";
150
+ ItemsView["Cards"] = "cards";
151
+ })(ItemsView || (ItemsView = {}));
152
+
127
153
  /**
128
154
  * Create a new injection token for injecting the Document into a component.
129
155
  */
@@ -362,6 +388,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
362
388
  }]
363
389
  }] });
364
390
 
391
+ class ObservableModel {
392
+ constructor(defaultValue = null) {
393
+ this.defaultValue = defaultValue;
394
+ this.subject = new BehaviorSubject(this.defaultValue);
395
+ this.value$ = this.subject.asObservable();
396
+ }
397
+ get value() { return this.subject.value; }
398
+ }
399
+
400
+ class ReloadService {
401
+ constructor() {
402
+ /* Properties */
403
+ this.model = new ObservableModel();
404
+ }
405
+ get reload$() { return this.model.value$; }
406
+ /* End Properties */
407
+ reload(...ids) {
408
+ this.model.subject.next(ids);
409
+ }
410
+ }
411
+ ReloadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
412
+ ReloadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReloadService, providedIn: 'root' });
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReloadService, decorators: [{
414
+ type: Injectable,
415
+ args: [{ providedIn: 'root' }]
416
+ }] });
417
+
365
418
  class ClickOutsideDirective {
366
419
  constructor(elementRef, document) {
367
420
  this.elementRef = elementRef;
@@ -376,7 +429,8 @@ class ClickOutsideDirective {
376
429
  this.action = new EventEmitter();
377
430
  }
378
431
  ngAfterViewInit() {
379
- this._clickSubscription = fromEvent(this.document, 'click')
432
+ // capture: true allow to catch event in early state (ignore stop propagation)
433
+ this._clickSubscription = fromEvent(this.document, 'click', { capture: true })
380
434
  .subscribe(event => this.onClick(event));
381
435
  }
382
436
  ngOnDestroy() {
@@ -467,6 +521,7 @@ UIConstants.CSS_CENTER = 'center';
467
521
  UIConstants.CSS_CLASS_FIXED = 'fixed';
468
522
  UIConstants.CSS_CLASS_BACKGROUND = 'background';
469
523
  UIConstants.CSS_CLASS_TOP = 'top';
524
+ UIConstants.CSS_CLASS_SCROLL = 'scroll';
470
525
  UIConstants.RGB_OPACITY_PLACEHOLDER = '{opacity}';
471
526
 
472
527
  class ShowHideElementDirective {
@@ -509,15 +564,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
509
564
  }] } });
510
565
 
511
566
  class IfDirective {
567
+ /* End Properties */
512
568
  constructor(el) {
513
569
  this.el = el;
514
570
  this.display = this.style.display;
515
571
  }
572
+ /* Inputs */
516
573
  set sfcIf(show) {
517
574
  this.style.display = show
518
575
  ? this.display || UIConstants.CSS_INITIAL
519
576
  : UIConstants.CSS_NONE;
520
577
  }
578
+ /* End Inputs */
579
+ /* Properties */
521
580
  get style() { return this.el.nativeElement.style; }
522
581
  }
523
582
  IfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IfDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
@@ -803,6 +862,36 @@ function isDateTimeGreatOrEqual(date1, date2) {
803
862
  return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
804
863
  >= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
805
864
  }
865
+ /**
866
+ * Return true if first time greater or equal to second time
867
+ * @param date1 First date time value
868
+ * @param date2 Second date time value
869
+ * @returns True if first time greater or equal to second time
870
+ */
871
+ function isTimeGreatOrEqual(date1, date2) {
872
+ return new Date(0, 0, 0, date1.getHours(), date1.getMinutes())
873
+ >= new Date(0, 0, 0, date2.getHours(), date2.getMinutes());
874
+ }
875
+ /**
876
+ * Return true if first time less or equal to second time
877
+ * @param date1 First date time value
878
+ * @param date2 Second date time value
879
+ * @returns True if first time less or equal to second time
880
+ */
881
+ function isDateTimeLessOrEqual(date1, date2) {
882
+ return new Date(0, 0, 0, date1.getHours(), date1.getMinutes())
883
+ <= new Date(0, 0, 0, date2.getHours(), date2.getMinutes());
884
+ }
885
+ /**
886
+ * Return true if first time less or equal to second time
887
+ * @param date1 First date time value
888
+ * @param date2 Second date time value
889
+ * @returns True if first time less or equal to second time
890
+ */
891
+ function isTimeLessOrEqual(date1, date2) {
892
+ return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
893
+ <= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
894
+ }
806
895
  /**
807
896
  * Convert UTC date to local
808
897
  * @param date Date value
@@ -838,6 +927,8 @@ function convertDateToTimestamp(date, locale = DateTimeConstants.DEFAULT_LOCALE)
838
927
  * @returns Age
839
928
  */
840
929
  function getAge(birthdate) {
930
+ if (!birthdate)
931
+ return null;
841
932
  const now = new Date();
842
933
  let age = now.getFullYear() - birthdate.getFullYear();
843
934
  const monthDifference = now.getMonth() - birthdate.getMonth();
@@ -898,11 +989,6 @@ function removePropertyFromObject(obj, property) {
898
989
  delete obj[property];
899
990
  }
900
991
  }
901
- /**
902
- * Deep merge object with others
903
- * @param target Object to merge
904
- * @param sources
905
- */
906
992
  /**
907
993
  * Deep merge object with others
908
994
  * @param target Object to merge
@@ -935,12 +1021,20 @@ function mergeDeep(target, ...sources) {
935
1021
  const nameof = (name) => name;
936
1022
  /**
937
1023
  * Determines if the input is a Number or something that can be coerced to a Number
938
- * @param - The input to be tested
1024
+ * @param number The input to be tested
939
1025
  * @returns - An indication if the input is a Number or can be coerced to a Number
940
1026
  */
941
1027
  function isNumeric(number) {
942
1028
  return !isNaN(parseFloat(number));
943
1029
  }
1030
+ /**
1031
+ * Determines if the input is a string
1032
+ * @param value The input to be tested
1033
+ * @returns An indication if the input is a string
1034
+ */
1035
+ function isString(value) {
1036
+ return typeof value === 'string';
1037
+ }
944
1038
  /**
945
1039
  * Return true if current browser is Chrome
946
1040
  * @returns If current browser is Chrome
@@ -1003,6 +1097,11 @@ function isEqual(obj1, obj2) {
1003
1097
  // If no errors, return true
1004
1098
  return true;
1005
1099
  }
1100
+ function areFilesEqual() {
1101
+ return obj1.lastModified === obj2.lastModified
1102
+ && obj1.size === obj2.size
1103
+ && obj1.type === obj2.type;
1104
+ }
1006
1105
  function areFunctionsEqual() {
1007
1106
  return obj1.toString() === obj2.toString();
1008
1107
  }
@@ -1022,6 +1121,8 @@ function isEqual(obj1, obj2) {
1022
1121
  return areArraysEqual();
1023
1122
  if (type === 'date')
1024
1123
  return areDatesEqual();
1124
+ if (type === 'file')
1125
+ return areFilesEqual();
1025
1126
  if (type === 'object')
1026
1127
  return areObjectsEqual();
1027
1128
  if (type === 'function')
@@ -1037,6 +1138,28 @@ function generateGuid() {
1037
1138
  return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
1038
1139
  };
1039
1140
  return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
1141
+ }
1142
+ /**
1143
+ * Check if value is Json parsable string
1144
+ * @param value string value
1145
+ * @returns True if string can be JSON parsed
1146
+ */
1147
+ function isJsonString(value) {
1148
+ try {
1149
+ const json = JSON.parse(value);
1150
+ return (typeof json === 'object');
1151
+ }
1152
+ catch (e) {
1153
+ return false;
1154
+ }
1155
+ }
1156
+ /**
1157
+ * Stop propagation and prevent default
1158
+ * @param event Event object
1159
+ */
1160
+ function stopAndPreventPropagation(event) {
1161
+ event.preventDefault();
1162
+ event.stopPropagation();
1040
1163
  }
1041
1164
 
1042
1165
  /**
@@ -1272,6 +1395,15 @@ property, value) {
1272
1395
  && collection.findIndex(item => item.hasOwnProperty(property)
1273
1396
  && item[property] === value) !== CommonConstants.NOT_FOUND_INDEX;
1274
1397
  }
1398
+ /**
1399
+ * Return true if first collection has item in second collection
1400
+ * @param collection1 Array of objects where search
1401
+ * @param collection2 Array of objects where try to find
1402
+ * @returns
1403
+ */
1404
+ function hasAnyItem(collection1, collection2) {
1405
+ return collection1.some(item => collection2.includes(item));
1406
+ }
1275
1407
  /**
1276
1408
  * Return value from collection by predicate function
1277
1409
  * @param collection Array of items
@@ -1503,6 +1635,23 @@ function updateItemBy(collection, predicate, newItem) {
1503
1635
  */
1504
1636
  function getCollectionOrEmpty(collection) {
1505
1637
  return isDefined(collection) ? collection : [];
1638
+ }
1639
+ /**
1640
+ * Check if arrays are equal
1641
+ * @param a First array
1642
+ * @param b Second array
1643
+ * @returns True if arrays are equal
1644
+ */
1645
+ function isArraysEquals(a, b) {
1646
+ if (a.length !== b.length)
1647
+ return false;
1648
+ a.sort();
1649
+ b.sort();
1650
+ for (let i = 0; i < a.length; i++) {
1651
+ if (a[i] !== b[i])
1652
+ return false;
1653
+ }
1654
+ return true;
1506
1655
  }
1507
1656
 
1508
1657
  /**
@@ -1517,6 +1666,8 @@ function buildHttpParams(value) {
1517
1666
  return httpParams;
1518
1667
  function _build(params, value, path, isArray = false) {
1519
1668
  const ARRAY_PART = ']';
1669
+ if (!value)
1670
+ return;
1520
1671
  Object.keys(value).forEach(key => {
1521
1672
  if (value[key] instanceof Array) {
1522
1673
  _build(params, value[key], `${path}${key}[`, true);
@@ -1918,11 +2069,10 @@ SwitchMultiCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
1918
2069
  SwitchMultiCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, name: "sfcSwitchMultiCase" });
1919
2070
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, decorators: [{
1920
2071
  type: Pipe,
1921
- args: [{
1922
- name: 'sfcSwitchMultiCase'
1923
- }]
2072
+ args: [{ name: 'sfcSwitchMultiCase' }]
1924
2073
  }] });
1925
2074
 
2075
+ // This pipe has "pure: false" (impure pipe) which has huge impact on performance!
1926
2076
  class SortByPipe {
1927
2077
  transform(value, path, direction = SortingDirection.Ascending) {
1928
2078
  if (!any(value)) {
@@ -1938,10 +2088,22 @@ class SortByPipe {
1938
2088
  }
1939
2089
  }
1940
2090
  SortByPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1941
- SortByPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, name: "sfcSortBy" });
2091
+ SortByPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, name: "sfcSortBy", pure: false });
1942
2092
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, decorators: [{
1943
2093
  type: Pipe,
1944
- args: [{ name: 'sfcSortBy' }]
2094
+ args: [{ name: 'sfcSortBy', pure: false }]
2095
+ }] });
2096
+
2097
+ class RepeatPipe {
2098
+ transform(value) {
2099
+ return [].constructor(value);
2100
+ }
2101
+ }
2102
+ RepeatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RepeatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2103
+ RepeatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: RepeatPipe, name: "sfcRepeat" });
2104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RepeatPipe, decorators: [{
2105
+ type: Pipe,
2106
+ args: [{ name: 'sfcRepeat' }]
1945
2107
  }] });
1946
2108
 
1947
2109
  var ButtonType;
@@ -2251,21 +2413,25 @@ var ModalTemplate;
2251
2413
 
2252
2414
  class ModalService {
2253
2415
  constructor() {
2254
- this.subject = new BehaviorSubject({ open: false });
2255
- this.modal$ = this.subject.asObservable();
2416
+ this.model = new ObservableModel();
2417
+ this.isOpen = false;
2256
2418
  }
2257
- get isOpen() {
2258
- return this.subject.value.open;
2419
+ /* Properties */
2420
+ get modal$() { return this.model.value$; }
2421
+ /* End Properties */
2422
+ toggle(id, args) {
2423
+ this.emit({ open: !this.isOpen, id: id, args: args });
2259
2424
  }
2260
- toggle() {
2261
- this.subject.next({ open: !this.isOpen });
2425
+ close(id, args) {
2426
+ this.emit({ open: false, id: id, args: args });
2262
2427
  }
2263
- close() {
2264
- this.subject.next({ open: false });
2428
+ open(id, args) {
2429
+ this.emit({ open: true, id: id, args: args });
2265
2430
  }
2266
- open(args) {
2267
- this.args = args;
2268
- this.subject.next({ open: true, args: args });
2431
+ emit(event) {
2432
+ this.args = event.args;
2433
+ this.isOpen = event.open;
2434
+ this.model.subject.next(event);
2269
2435
  }
2270
2436
  }
2271
2437
  ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -2277,6 +2443,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2277
2443
  }]
2278
2444
  }] });
2279
2445
 
2446
+ class ModalOpenDirective {
2447
+ /* End Subscriptions */
2448
+ constructor(templateRef, viewContainer, modalService) {
2449
+ this.templateRef = templateRef;
2450
+ this.viewContainer = viewContainer;
2451
+ this.modalService = modalService;
2452
+ this._openSubscription = this.modalService.modal$
2453
+ .pipe(filter((event) => event.id === this.id))
2454
+ .subscribe((event) => {
2455
+ this.viewContainer.clear();
2456
+ if (event.open)
2457
+ this.viewContainer.createEmbeddedView(this.templateRef);
2458
+ });
2459
+ }
2460
+ ngOnDestroy() {
2461
+ this._openSubscription.unsubscribe();
2462
+ }
2463
+ }
2464
+ ModalOpenDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
2465
+ ModalOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenDirective, selector: "[sfcModalOpen]", inputs: { id: ["sfcModalOpen", "id"] }, ngImport: i0 });
2466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, decorators: [{
2467
+ type: Directive,
2468
+ args: [{
2469
+ selector: '[sfcModalOpen]'
2470
+ }]
2471
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { id: [{
2472
+ type: Input,
2473
+ args: ['sfcModalOpen']
2474
+ }] } });
2475
+
2476
+ class ModalOpenOnClickDirective {
2477
+ /* End Subscriptions */
2478
+ constructor(templateRef, viewContainer, modalService) {
2479
+ this.templateRef = templateRef;
2480
+ this.viewContainer = viewContainer;
2481
+ this.modalService = modalService;
2482
+ this.elements = [];
2483
+ this.clickHandler = (() => {
2484
+ this.viewContainer.clear();
2485
+ this.viewContainer.createEmbeddedView(this.templateRef);
2486
+ this.modalService.toggle(this.id);
2487
+ }).bind(this);
2488
+ }
2489
+ /* Inputs */
2490
+ set modalOpenOnClick(model) {
2491
+ if (!isDefined(model.elements) || !isDefined(model.id))
2492
+ return;
2493
+ this._id = model.id;
2494
+ if (model.elements instanceof HTMLElement)
2495
+ this.elements = [model.elements];
2496
+ else
2497
+ this.elements = model.elements;
2498
+ this.elements.forEach(el => el.addEventListener('click', this.clickHandler));
2499
+ }
2500
+ get id() { return this._id; }
2501
+ ngOnInit() {
2502
+ this._closeSubscription = this.modalService.modal$
2503
+ .pipe(filter((event) => !event.open && this.id === event.id))
2504
+ .subscribe(() => this.viewContainer.clear());
2505
+ }
2506
+ ngOnDestroy() {
2507
+ var _a;
2508
+ (_a = this._closeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2509
+ this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
2510
+ }
2511
+ }
2512
+ ModalOpenOnClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
2513
+ ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
2514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
2515
+ type: Directive,
2516
+ args: [{
2517
+ selector: '[sfcModalOpenOnClick]'
2518
+ }]
2519
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { modalOpenOnClick: [{
2520
+ type: Input,
2521
+ args: ['sfcModalOpenOnClick']
2522
+ }] } });
2523
+
2280
2524
  class TemplateContentComponent {
2281
2525
  get showDefault() {
2282
2526
  return !isDefined(this.referenceContent)
@@ -2305,6 +2549,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2305
2549
  type: Input
2306
2550
  }] } });
2307
2551
 
2552
+ class DefaultModalHeaderConstants {
2553
+ }
2554
+ DefaultModalHeaderConstants.DEFAULT_MODAL_HEADER_MODEL = {
2555
+ icon: faWindowRestore,
2556
+ showCloseIcon: true,
2557
+ text: 'Modal'
2558
+ };
2559
+
2308
2560
  class CloseComponent {
2309
2561
  constructor() {
2310
2562
  this.faTimes = faTimes;
@@ -2318,61 +2570,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2318
2570
  }] });
2319
2571
 
2320
2572
  class DefaultModalHeaderComponent {
2573
+ /* End Properties */
2321
2574
  constructor(modalService) {
2322
2575
  this.modalService = modalService;
2323
- this.DEFAULT_MODAL_HEADER_MODEL = {
2324
- icon: faWindowRestore,
2325
- showCloseIcon: true,
2326
- text: 'Modal'
2327
- };
2328
- }
2329
- get icon() {
2330
- var _a;
2331
- return ((_a = this.model) === null || _a === void 0 ? void 0 : _a.icon) || faWindowRestore;
2332
2576
  }
2577
+ /* End Inputs */
2578
+ /* Properties */
2579
+ get icon() { var _a; return ((_a = this.model) === null || _a === void 0 ? void 0 : _a.icon) || faWindowRestore; }
2333
2580
  ngOnInit() {
2334
2581
  if (!isDefined(this.model))
2335
- this.model = this.DEFAULT_MODAL_HEADER_MODEL;
2582
+ this.model = DefaultModalHeaderConstants.DEFAULT_MODAL_HEADER_MODEL;
2336
2583
  }
2337
2584
  onClose() {
2338
- this.modalService.close();
2585
+ this.modalService.close(this.id);
2339
2586
  }
2340
2587
  }
2341
2588
  DefaultModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalHeaderComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
2342
- DefaultModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <fa-icon *ngIf=\"icon\" class=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <span *ngIf=\"model.text\" class=\"label\">{{model.text}}</span>\r\n <sfc-close *ngIf=\"model.showCloseIcon\" (click)=\"onClose()\"></sfc-close>\r\n </div>\r\n\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{width:100%;padding-bottom:.5em}:host .container .content{display:flex;align-items:center;justify-content:center;padding:.5em 0}:host .container .content .icon{position:absolute;left:1.5em;font-size:1.3em}:host .container .content .label{font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em}:host .container .content sfc-close{position:absolute;right:1.5em;color:#545e61}:host .container .content sfc-close:hover{color:#ffce54}:host .container sfc-delimeter.horizontal:before{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal:after{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal span{color:#545e61}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }, { kind: "component", type: CloseComponent, selector: "sfc-close" }] });
2589
+ DefaultModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: { id: "id", model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <fa-icon *ngIf=\"icon\" class=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <span *ngIf=\"model.text\" class=\"label\">{{model.text}}</span>\r\n <sfc-close *ngIf=\"model.showCloseIcon\" (click)=\"onClose()\"></sfc-close>\r\n </div>\r\n\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{width:100%;padding-bottom:.5em}:host .container .content{display:flex;align-items:center;justify-content:center;padding:.5em 0}:host .container .content .icon{position:absolute;left:1.5em;font-size:1.3em}:host .container .content .label{width:80%;font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em;white-space:normal;text-align:center}:host .container .content sfc-close{position:absolute;right:1.5em;color:#545e61}:host .container .content sfc-close:hover{color:#ffce54}:host .container sfc-delimeter.horizontal:before{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal:after{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal span{color:#545e61}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }, { kind: "component", type: CloseComponent, selector: "sfc-close" }] });
2343
2590
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalHeaderComponent, decorators: [{
2344
2591
  type: Component,
2345
- args: [{ selector: 'sfc-default-modal-header', template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <fa-icon *ngIf=\"icon\" class=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <span *ngIf=\"model.text\" class=\"label\">{{model.text}}</span>\r\n <sfc-close *ngIf=\"model.showCloseIcon\" (click)=\"onClose()\"></sfc-close>\r\n </div>\r\n\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{width:100%;padding-bottom:.5em}:host .container .content{display:flex;align-items:center;justify-content:center;padding:.5em 0}:host .container .content .icon{position:absolute;left:1.5em;font-size:1.3em}:host .container .content .label{font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em}:host .container .content sfc-close{position:absolute;right:1.5em;color:#545e61}:host .container .content sfc-close:hover{color:#ffce54}:host .container sfc-delimeter.horizontal:before{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal:after{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal span{color:#545e61}\n"] }]
2346
- }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { model: [{
2592
+ args: [{ selector: 'sfc-default-modal-header', template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <fa-icon *ngIf=\"icon\" class=\"icon\" [icon]=\"icon\"></fa-icon>\r\n <span *ngIf=\"model.text\" class=\"label\">{{model.text}}</span>\r\n <sfc-close *ngIf=\"model.showCloseIcon\" (click)=\"onClose()\"></sfc-close>\r\n </div>\r\n\r\n <sfc-delimeter></sfc-delimeter>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{width:100%;padding-bottom:.5em}:host .container .content{display:flex;align-items:center;justify-content:center;padding:.5em 0}:host .container .content .icon{position:absolute;left:1.5em;font-size:1.3em}:host .container .content .label{width:80%;font-size:1.2em;font-weight:700;-webkit-user-select:none;user-select:none;padding:0 .7em;white-space:normal;text-align:center}:host .container .content sfc-close{position:absolute;right:1.5em;color:#545e61}:host .container .content sfc-close:hover{color:#ffce54}:host .container sfc-delimeter.horizontal:before{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:before,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:before{border-image:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal:after{transition:border-image .5s ease}:host .container sfc-delimeter.horizontal:after,:host-context(.sfc-default-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host-context(.sfc-dark-theme) :host .container sfc-delimeter.horizontal:after{border-image:linear-gradient(to left,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 47%,rgba(0,0,0,.3) 53%,rgba(0,0,0,.3) 100%) 100% 1}:host .container sfc-delimeter.horizontal span{color:#545e61}\n"] }]
2593
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { id: [{
2594
+ type: Input
2595
+ }], model: [{
2347
2596
  type: Input
2348
2597
  }] } });
2349
2598
 
2599
+ class DefaultModalFooterConstants {
2600
+ }
2601
+ DefaultModalFooterConstants.BUTTON_CUSTOM_SIZE = 0.9;
2602
+ DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL = {
2603
+ cancelButton: true,
2604
+ applyButton: true,
2605
+ applyButtonText: 'Ok',
2606
+ cancelButtonText: 'Cancel'
2607
+ };
2608
+
2350
2609
  class DefaultModalFooterComponent {
2610
+ /* End Inputs */
2351
2611
  constructor(modalService) {
2352
2612
  this.modalService = modalService;
2353
- this.DEFAULT_MODAL_FOOTER_MODEL = {
2354
- cancelButton: true,
2355
- applyButton: true,
2356
- applyButtonText: 'Ok',
2357
- cancelButtonText: 'Cancel'
2358
- };
2359
- this.BUTTON_CUSTOM_SIZE = 0.9;
2360
2613
  this.ComponentSize = ComponentSize;
2361
2614
  this.ButtonType = ButtonType;
2615
+ // component
2616
+ this.Constants = DefaultModalFooterConstants;
2362
2617
  }
2363
2618
  ngOnInit() {
2364
2619
  if (!this.model) {
2365
- this.model = Object.assign({}, this.DEFAULT_MODAL_FOOTER_MODEL);
2620
+ this.model = Object.assign({}, DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL);
2366
2621
  }
2367
2622
  else {
2368
2623
  if (isNullOrEmptyString(this.model.applyButtonText))
2369
- this.model.applyButtonText = this.DEFAULT_MODAL_FOOTER_MODEL.applyButtonText;
2624
+ this.model.applyButtonText = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.applyButtonText;
2370
2625
  if (isNullOrEmptyString(this.model.cancelButtonText))
2371
- this.model.cancelButtonText = this.DEFAULT_MODAL_FOOTER_MODEL.cancelButtonText;
2626
+ this.model.cancelButtonText = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.cancelButtonText;
2372
2627
  if (!isDefined(this.model.applyButton))
2373
- this.model.applyButton = this.DEFAULT_MODAL_FOOTER_MODEL.applyButton;
2628
+ this.model.applyButton = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.applyButton;
2374
2629
  if (!isDefined(this.model.cancelButton))
2375
- this.model.cancelButton = this.DEFAULT_MODAL_FOOTER_MODEL.cancelButton;
2630
+ this.model.cancelButton = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.cancelButton;
2376
2631
  }
2377
2632
  }
2378
2633
  onButtonClick(isCancelButton = false) {
@@ -2387,21 +2642,27 @@ class DefaultModalFooterComponent {
2387
2642
  return this.model.onApply(this.modalService.args);
2388
2643
  }
2389
2644
  }
2390
- this.modalService.toggle();
2645
+ this.modalService.toggle(this.id);
2391
2646
  }
2392
2647
  }
2393
2648
  DefaultModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalFooterComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
2394
- DefaultModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.applyButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model.cancelButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.cancelButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick(true)\">\r\n </sfc-button>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;justify-content:center;align-items:center;width:100%}:host .container sfc-button:first-child{padding-right:.3em}:host .container sfc-button:nth-child(2){padding-left:.3em}:host .container ::ng-deep sfc-button .button.rounded{min-width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }, { kind: "component", type: ButtonComponent, selector: "sfc-button", inputs: ["text", "iconBefore", "iconAfter", "disabled", "types"] }] });
2649
+ DefaultModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: { id: "id", model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"Constants.BUTTON_CUSTOM_SIZE\"\r\n [text]=\"model.applyButtonText\" [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model.cancelButton\" [sfcComponentSize] [customSize]=\"Constants.BUTTON_CUSTOM_SIZE\"\r\n [text]=\"model.cancelButtonText\" [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick(true)\">\r\n </sfc-button>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;justify-content:center;align-items:center;width:100%}:host .container sfc-button:first-child{padding-right:.3em}:host .container sfc-button:nth-child(2){padding-left:.3em}:host .container ::ng-deep sfc-button .button.rounded{min-width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }, { kind: "component", type: ButtonComponent, selector: "sfc-button", inputs: ["text", "iconBefore", "iconAfter", "disabled", "types"] }] });
2395
2650
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalFooterComponent, decorators: [{
2396
2651
  type: Component,
2397
- args: [{ selector: 'sfc-default-modal-footer', template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.applyButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model.cancelButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\" [text]=\"model.cancelButtonText\"\r\n [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick(true)\">\r\n </sfc-button>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;justify-content:center;align-items:center;width:100%}:host .container sfc-button:first-child{padding-right:.3em}:host .container sfc-button:nth-child(2){padding-left:.3em}:host .container ::ng-deep sfc-button .button.rounded{min-width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"] }]
2398
- }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { model: [{
2652
+ args: [{ selector: 'sfc-default-modal-footer', template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"Constants.BUTTON_CUSTOM_SIZE\"\r\n [text]=\"model.applyButtonText\" [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick()\">\r\n </sfc-button>\r\n <sfc-button *ngIf=\"model.cancelButton\" [sfcComponentSize] [customSize]=\"Constants.BUTTON_CUSTOM_SIZE\"\r\n [text]=\"model.cancelButtonText\" [types]=\"[ButtonType.Rounded]\" (click)=\"onButtonClick(true)\">\r\n </sfc-button>\r\n</div>", styles: [":host{display:inline-flex;width:100%}:host .container{display:flex;justify-content:center;align-items:center;width:100%}:host .container sfc-button:first-child{padding-right:.3em}:host .container sfc-button:nth-child(2){padding-left:.3em}:host .container ::ng-deep sfc-button .button.rounded{min-width:5em}:host .container ::ng-deep sfc-button .button:not(:hover){color:#545e61!important;border-color:#545e61!important}\n"] }]
2653
+ }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { id: [{
2654
+ type: Input
2655
+ }], model: [{
2399
2656
  type: Input
2400
2657
  }] } });
2401
2658
 
2402
2659
  class ModalComponent {
2403
- constructor(modalService) {
2660
+ /* End Properties */
2661
+ constructor(modalService, document, openDirective, openOnClickDirective) {
2404
2662
  this.modalService = modalService;
2663
+ this.document = document;
2664
+ this.openDirective = openDirective;
2665
+ this.openOnClickDirective = openOnClickDirective;
2405
2666
  this.ModalTemplate = ModalTemplate;
2406
2667
  // End Defaults
2407
2668
  this.hideOnEsc = true;
@@ -2410,17 +2671,32 @@ class ModalComponent {
2410
2671
  this.showHeader = true;
2411
2672
  // hide modal footer (even default)
2412
2673
  this.showFooter = true;
2674
+ // remember body overflow
2675
+ this.bodyOverflow = this.document.body.style.overflow;
2413
2676
  }
2414
2677
  onEscapeKeyDownHandler() {
2415
2678
  if (this.hideOnEsc)
2416
2679
  this.close();
2417
2680
  }
2681
+ /* Properties */
2682
+ get id() {
2683
+ return isDefined(this.openOnClickDirective)
2684
+ ? this.openOnClickDirective.id : this.openDirective.id;
2685
+ }
2686
+ ngAfterViewInit() {
2687
+ // set body overflow to hidden, to prevent page scrolling
2688
+ this.document.body.style.overflow = UIConstants.CSS_VISIBILITY_HIDDEN;
2689
+ }
2690
+ ngOnDestroy() {
2691
+ // return back body overflow value when modal has closed
2692
+ this.document.body.style.overflow = this.bodyOverflow;
2693
+ }
2418
2694
  close() {
2419
- this.modalService.close();
2695
+ this.modalService.close(this.id);
2420
2696
  }
2421
2697
  }
2422
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
2423
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalComponent, selector: "sfc-modal", inputs: { body: "body", header: "header", footer: "footer", defaultHeaderModel: "defaultHeaderModel", defaultFooterModel: "defaultFooterModel", hideOnEsc: "hideOnEsc", hideOnClickOutside: "hideOnClickOutside", showHeader: "showHeader", showFooter: "showFooter" }, host: { listeners: { "document:keydown.escape": "onEscapeKeyDownHandler()" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div *ngIf=\"showHeader\" class=\"header\">\r\n\r\n <sfc-template-content [referenceContent]=\"header\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Header\" [defaultContent]=\"defaultHeader\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultHeader>\r\n <sfc-default-modal-header [model]=\"defaultHeaderModel\"> </sfc-default-modal-header>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n <div class=\"body\">\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Body\">\r\n </sfc-template-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"footer\">\r\n\r\n <sfc-template-content [referenceContent]=\"footer\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Footer\" [defaultContent]=\"defaultFooter\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultFooter>\r\n <sfc-default-modal-footer [model]=\"defaultFooterModel\"></sfc-default-modal-footer>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".overlay{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#0009;-webkit-backface-visibility:visible;backface-visibility:visible;animation:expand-overlay .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-overlay{0%{visibility:hidden;opacity:0}}.overlay .content{display:flex;align-items:center;position:relative;padding:.9em 1.5em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;box-shadow:0 .125em .625em #656d78;transform:scale(1);flex-direction:column;animation:expand-modal .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-modal{0%{visibility:hidden;opacity:0;transform:scale(1.2)}}.overlay .content>div{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#545e61;flex-direction:row;display:flex;flex:0 0 auto;justify-content:center}.overlay .content>div.body{overflow-y:auto;flex:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { kind: "component", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: ["model"] }, { kind: "component", type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: ["model"] }], animations: [
2698
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: [{ token: ModalService }, { token: DOCUMENT }, { token: ModalOpenDirective, optional: true }, { token: ModalOpenOnClickDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2699
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalComponent, selector: "sfc-modal", inputs: { body: "body", header: "header", footer: "footer", defaultHeaderModel: "defaultHeaderModel", defaultFooterModel: "defaultFooterModel", hideOnEsc: "hideOnEsc", hideOnClickOutside: "hideOnClickOutside", showHeader: "showHeader", showFooter: "showFooter" }, host: { listeners: { "document:keydown.escape": "onEscapeKeyDownHandler()" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div *ngIf=\"showHeader\" class=\"header\">\r\n <sfc-template-content [referenceContent]=\"header\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Header\" [defaultContent]=\"defaultHeader\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultHeader>\r\n <sfc-default-modal-header [id]=\"id\" [model]=\"defaultHeaderModel\"></sfc-default-modal-header>\r\n </ng-template>\r\n </div>\r\n\r\n <div class=\"body\">\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Body\" [contextData]=\"modalService.args\">\r\n </sfc-template-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"footer\">\r\n <sfc-template-content [referenceContent]=\"footer\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Footer\" [defaultContent]=\"defaultFooter\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultFooter>\r\n <sfc-default-modal-footer [id]=\"id\" [model]=\"defaultFooterModel\"></sfc-default-modal-footer>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>", styles: [".overlay{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#0009;-webkit-backface-visibility:visible;backface-visibility:visible;animation:expand-overlay .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-overlay{0%{visibility:hidden;opacity:0}}.overlay .content{display:flex;align-items:center;position:relative;padding:.9em 1.5em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;box-shadow:0 .125em .625em #656d78;transform:scale(1);flex-direction:column;animation:expand-modal .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-modal{0%{visibility:hidden;opacity:0;transform:scale(1.2)}}.overlay .content>div{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#545e61;flex-direction:row;display:flex;flex:0 0 auto;justify-content:center}.overlay .content>div.body{overflow-y:auto;flex:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { kind: "component", type: DefaultModalHeaderComponent, selector: "sfc-default-modal-header", inputs: ["id", "model"] }, { kind: "component", type: DefaultModalFooterComponent, selector: "sfc-default-modal-footer", inputs: ["id", "model"] }], animations: [
2424
2700
  trigger('hideOverlay', [
2425
2701
  state('initial', style({ opacity: 1, visibility: 'visible' })),
2426
2702
  state('void', style({ opacity: 0, visibility: 'hidden' })),
@@ -2465,8 +2741,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2465
2741
  state('void', style({ opacity: 0, visibility: 'hidden', transform: 'scale(1.2)' })),
2466
2742
  transition('* => void', animate('400ms cubic-bezier(.55, 0, .1, 1)'))
2467
2743
  ])
2468
- ], template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div *ngIf=\"showHeader\" class=\"header\">\r\n\r\n <sfc-template-content [referenceContent]=\"header\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Header\" [defaultContent]=\"defaultHeader\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultHeader>\r\n <sfc-default-modal-header [model]=\"defaultHeaderModel\"> </sfc-default-modal-header>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n <div class=\"body\">\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Body\">\r\n </sfc-template-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"footer\">\r\n\r\n <sfc-template-content [referenceContent]=\"footer\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Footer\" [defaultContent]=\"defaultFooter\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultFooter>\r\n <sfc-default-modal-footer [model]=\"defaultFooterModel\"></sfc-default-modal-footer>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".overlay{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#0009;-webkit-backface-visibility:visible;backface-visibility:visible;animation:expand-overlay .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-overlay{0%{visibility:hidden;opacity:0}}.overlay .content{display:flex;align-items:center;position:relative;padding:.9em 1.5em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;box-shadow:0 .125em .625em #656d78;transform:scale(1);flex-direction:column;animation:expand-modal .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-modal{0%{visibility:hidden;opacity:0;transform:scale(1.2)}}.overlay .content>div{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#545e61;flex-direction:row;display:flex;flex:0 0 auto;justify-content:center}.overlay .content>div.body{overflow-y:auto;flex:0}\n"] }]
2469
- }], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { body: [{
2744
+ ], template: "<div class=\"overlay\" [@hideOverlay] (click)=\"hideOnClickOutside && close()\">\r\n <div class=\"content\" [@hideContent] (click)=\"$event.stopPropagation()\">\r\n\r\n <div *ngIf=\"showHeader\" class=\"header\">\r\n <sfc-template-content [referenceContent]=\"header\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Header\" [defaultContent]=\"defaultHeader\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultHeader>\r\n <sfc-default-modal-header [id]=\"id\" [model]=\"defaultHeaderModel\"></sfc-default-modal-header>\r\n </ng-template>\r\n </div>\r\n\r\n <div class=\"body\">\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Body\" [contextData]=\"modalService.args\">\r\n </sfc-template-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"footer\">\r\n <sfc-template-content [referenceContent]=\"footer\" [templatesContent]=\"templates\"\r\n [templateType]=\"ModalTemplate.Footer\" [defaultContent]=\"defaultFooter\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultFooter>\r\n <sfc-default-modal-footer [id]=\"id\" [model]=\"defaultFooterModel\"></sfc-default-modal-footer>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>", styles: [".overlay{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#0009;-webkit-backface-visibility:visible;backface-visibility:visible;animation:expand-overlay .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-overlay{0%{visibility:hidden;opacity:0}}.overlay .content{display:flex;align-items:center;position:relative;padding:.9em 1.5em;margin:auto;background-color:#f5f7fa;max-width:calc(100% - 3em);max-height:calc(100% - 3em);border-radius:3px;box-shadow:0 .125em .625em #656d78;transform:scale(1);flex-direction:column;animation:expand-modal .4s cubic-bezier(.55,0,.1,1)}@keyframes expand-modal{0%{visibility:hidden;opacity:0;transform:scale(1.2)}}.overlay .content>div{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#545e61;flex-direction:row;display:flex;flex:0 0 auto;justify-content:center}.overlay .content>div.body{overflow-y:auto;flex:0}\n"] }]
2745
+ }], ctorParameters: function () {
2746
+ return [{ type: ModalService }, { type: Document, decorators: [{
2747
+ type: Inject,
2748
+ args: [DOCUMENT]
2749
+ }] }, { type: ModalOpenDirective, decorators: [{
2750
+ type: Optional
2751
+ }] }, { type: ModalOpenOnClickDirective, decorators: [{
2752
+ type: Optional
2753
+ }] }];
2754
+ }, propDecorators: { body: [{
2470
2755
  type: Input
2471
2756
  }], header: [{
2472
2757
  type: Input
@@ -2492,77 +2777,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2492
2777
  args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
2493
2778
  }] } });
2494
2779
 
2495
- class ModalOpenOnClickDirective {
2496
- constructor(templateRef, viewContainer, modalService) {
2497
- this.templateRef = templateRef;
2498
- this.viewContainer = viewContainer;
2499
- this.modalService = modalService;
2500
- this.clickHandler = (() => {
2501
- this.viewContainer.clear();
2502
- this.viewContainer.createEmbeddedView(this.templateRef);
2503
- this.modalService.toggle();
2504
- }).bind(this);
2505
- this.elements = [];
2506
- }
2507
- set modalOpenOnClick(elements) {
2508
- if (!isDefined(elements))
2509
- return;
2510
- if (elements instanceof HTMLElement)
2511
- this.elements = [elements];
2512
- else
2513
- this.elements = elements;
2514
- this.elements.forEach(el => {
2515
- el.addEventListener('click', this.clickHandler);
2516
- });
2517
- }
2518
- ngOnInit() {
2519
- this._closeSubscription = this.modalService.modal$
2520
- .pipe(filter((event) => !event.open))
2521
- .subscribe(() => this.viewContainer.clear());
2522
- }
2523
- ngOnDestroy() {
2524
- var _a;
2525
- (_a = this._closeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2526
- this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
2527
- }
2528
- }
2529
- ModalOpenOnClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
2530
- ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
2531
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
2532
- type: Directive,
2533
- args: [{
2534
- selector: '[sfcModalOpenOnClick]'
2535
- }]
2536
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { modalOpenOnClick: [{
2537
- type: Input,
2538
- args: ['sfcModalOpenOnClick']
2539
- }] } });
2540
-
2541
- class ModalOpenDirective {
2542
- constructor(templateRef, viewContainer, modalService) {
2543
- this.templateRef = templateRef;
2544
- this.viewContainer = viewContainer;
2545
- this.modalService = modalService;
2546
- this._openSubscription = this.modalService.modal$
2547
- .subscribe((event) => {
2548
- this.viewContainer.clear();
2549
- if (event.open)
2550
- this.viewContainer.createEmbeddedView(this.templateRef);
2551
- });
2552
- }
2553
- ngOnDestroy() {
2554
- this._openSubscription.unsubscribe();
2555
- }
2556
- }
2557
- ModalOpenDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Directive });
2558
- ModalOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenDirective, selector: "[sfcModalOpen]", ngImport: i0 });
2559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, decorators: [{
2560
- type: Directive,
2561
- args: [{
2562
- selector: '[sfcModalOpen]'
2563
- }]
2564
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; } });
2565
-
2566
2780
  class HamburgerBaseComponent {
2567
2781
  constructor() {
2568
2782
  this.open = false;
@@ -2661,13 +2875,17 @@ class ToggleSwitcherComponent {
2661
2875
  constructor() {
2662
2876
  this.active = false;
2663
2877
  this.disabled = false;
2664
- this.onClick = () => this.active = !this.active;
2878
+ this.toggle = new EventEmitter(this.active);
2879
+ this.onClick = () => {
2880
+ this.active = !this.active;
2881
+ this.toggle.emit(this.active);
2882
+ };
2665
2883
  this.leftModel = { label: 'Left' };
2666
2884
  this.rightModel = { label: 'Right' };
2667
2885
  }
2668
2886
  }
2669
2887
  ToggleSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToggleSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2670
- ToggleSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToggleSwitcherComponent, selector: "sfc-toggle-switcher", inputs: { active: "active", disabled: "disabled", leftModel: "leftModel", rightModel: "rightModel" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active", "class.disabled": "this.disabled" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"toggle\"></div>\r\n <div class=\"names\">\r\n <p class=\"left\" *ngIf=\"leftModel\">\r\n <fa-icon *ngIf=\"leftModel.icon\" [icon]=\"leftModel.icon\"></fa-icon>\r\n <span *ngIf=\"leftModel.label\">{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\" *ngIf=\"rightModel\">\r\n <fa-icon *ngIf=\"rightModel.icon\" [icon]=\"rightModel.icon\"></fa-icon>\r\n <span *ngIf=\"rightModel.label\">{{rightModel.label}}</span>\r\n </p>\r\n </div>\r\n</div>", styles: [":host .container,:host .toggle{height:100%;border-radius:100px}:host .container{background-color:#e6e9ed;color:#545e61;border:.1875em solid;border-radius:100px;border-color:#e6e9ed;position:relative;cursor:pointer}:host .container .toggle{position:absolute;width:50%;background-color:#fff;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 span{padding-left:.3em}:host .container .names p.right{opacity:.5}:host.active .container{background-color:#e6e9ed}:host.active .container .toggle{transform:translate(100%);background-color:#fff}:host.active .container .names{color:#545e61}:host.active .container .names .left{opacity:.5}:host.active .container .names .right{opacity:1}:host.disabled{pointer-events:none}:host.disabled .container{transition:background-color .5s ease;transition:border-color .5s ease}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{background-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{background-color:#656d78}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{border-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{border-color:#656d78}:host.disabled .container .toggle{transition:background-color .5s ease;box-shadow:none}:host.disabled .container .toggle,:host-context(.sfc-default-theme) :host.disabled .container .toggle{background-color:#e6e9ed}:host-context(.sfc-dark-theme) :host.disabled .container .toggle{background-color:#aab2bd}:host.disabled .container .names{transition:color .5s ease}:host.disabled .container .names,:host-context(.sfc-default-theme) :host.disabled .container .names{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .container .names{color:#e9e9e9}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
2888
+ ToggleSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToggleSwitcherComponent, selector: "sfc-toggle-switcher", inputs: { active: "active", disabled: "disabled", leftModel: "leftModel", rightModel: "rightModel" }, outputs: { toggle: "toggle" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active", "class.disabled": "this.disabled" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"toggle\"></div>\r\n <div class=\"names\">\r\n <p class=\"left\" *ngIf=\"leftModel\">\r\n <fa-icon *ngIf=\"leftModel.icon\" [icon]=\"leftModel.icon\"></fa-icon>\r\n <span *ngIf=\"leftModel.label\">{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\" *ngIf=\"rightModel\">\r\n <fa-icon *ngIf=\"rightModel.icon\" [icon]=\"rightModel.icon\"></fa-icon>\r\n <span *ngIf=\"rightModel.label\">{{rightModel.label}}</span>\r\n </p>\r\n </div>\r\n</div>", styles: [":host .container,:host .toggle{height:100%;border-radius:100px}:host .container{background-color:#e6e9ed;color:#545e61;border:.1875em solid;border-radius:100px;border-color:#e6e9ed;position:relative;cursor:pointer}:host .container .toggle{position:absolute;width:50%;background-color:#fff;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 span{padding-left:.3em}:host .container .names p.right{opacity:.5}:host.active .container{background-color:#e6e9ed}:host.active .container .toggle{transform:translate(100%);background-color:#fff}:host.active .container .names{color:#545e61}:host.active .container .names .left{opacity:.5}:host.active .container .names .right{opacity:1}:host.disabled{pointer-events:none}:host.disabled .container{transition:background-color .5s ease;transition:border-color .5s ease}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{background-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{background-color:#656d78}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{border-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{border-color:#656d78}:host.disabled .container .toggle{transition:background-color .5s ease;box-shadow:none}:host.disabled .container .toggle,:host-context(.sfc-default-theme) :host.disabled .container .toggle{background-color:#e6e9ed}:host-context(.sfc-dark-theme) :host.disabled .container .toggle{background-color:#aab2bd}:host.disabled .container .names{transition:color .5s ease}:host.disabled .container .names,:host-context(.sfc-default-theme) :host.disabled .container .names{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .container .names{color:#e9e9e9}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
2671
2889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToggleSwitcherComponent, decorators: [{
2672
2890
  type: Component,
2673
2891
  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\" *ngIf=\"leftModel\">\r\n <fa-icon *ngIf=\"leftModel.icon\" [icon]=\"leftModel.icon\"></fa-icon>\r\n <span *ngIf=\"leftModel.label\">{{leftModel.label}}</span>\r\n </p>\r\n <p class=\"right\" *ngIf=\"rightModel\">\r\n <fa-icon *ngIf=\"rightModel.icon\" [icon]=\"rightModel.icon\"></fa-icon>\r\n <span *ngIf=\"rightModel.label\">{{rightModel.label}}</span>\r\n </p>\r\n </div>\r\n</div>", styles: [":host .container,:host .toggle{height:100%;border-radius:100px}:host .container{background-color:#e6e9ed;color:#545e61;border:.1875em solid;border-radius:100px;border-color:#e6e9ed;position:relative;cursor:pointer}:host .container .toggle{position:absolute;width:50%;background-color:#fff;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 span{padding-left:.3em}:host .container .names p.right{opacity:.5}:host.active .container{background-color:#e6e9ed}:host.active .container .toggle{transform:translate(100%);background-color:#fff}:host.active .container .names{color:#545e61}:host.active .container .names .left{opacity:.5}:host.active .container .names .right{opacity:1}:host.disabled{pointer-events:none}:host.disabled .container{transition:background-color .5s ease;transition:border-color .5s ease}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{background-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{background-color:#656d78}:host.disabled .container,:host-context(.sfc-default-theme) :host.disabled .container{border-color:#f6f6f6}:host-context(.sfc-dark-theme) :host.disabled .container{border-color:#656d78}:host.disabled .container .toggle{transition:background-color .5s ease;box-shadow:none}:host.disabled .container .toggle,:host-context(.sfc-default-theme) :host.disabled .container .toggle{background-color:#e6e9ed}:host-context(.sfc-dark-theme) :host.disabled .container .toggle{background-color:#aab2bd}:host.disabled .container .names{transition:color .5s ease}:host.disabled .container .names,:host-context(.sfc-default-theme) :host.disabled .container .names{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .container .names{color:#e9e9e9}\n"] }]
@@ -2685,6 +2903,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2685
2903
  type: Input
2686
2904
  }], rightModel: [{
2687
2905
  type: Input
2906
+ }], toggle: [{
2907
+ type: Output
2688
2908
  }], onClick: [{
2689
2909
  type: HostListener,
2690
2910
  args: ['click']
@@ -2704,12 +2924,13 @@ class CheckmarkComponent {
2704
2924
  this.icon = faCheck;
2705
2925
  this.type = CheckmarkType.Rounded;
2706
2926
  }
2927
+ onClick() { this.active = !this.active; }
2707
2928
  }
2708
2929
  CheckmarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckmarkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2709
- CheckmarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CheckmarkComponent, selector: "sfc-checkmark", inputs: { active: "active", disabled: "disabled", icon: "icon", type: "type" }, host: { properties: { "class.active": "this.active", "class.disabled": "this.disabled", "class": "this.type" } }, ngImport: i0, template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <fa-icon [sfcShowHideElement]=\"active\" [icon]=\"icon\"></fa-icon>\r\n </span>\r\n</div>", styles: [":host{display:inline-block;transition:color .5s ease}:host,:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#fff}:host .check{border:.125em solid;background:transparent;transition:border-color .5s ease,background .5s ease;transition:border-color .5s ease;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center}:host .check,:host-context(.sfc-default-theme) :host .check{border-color:#545e61}:host-context(.sfc-dark-theme) :host .check{border-color:#fff}:host .check fa-icon{transition:opacity .5s ease;color:#fff;font-size:.8em;transition:opacity .3s ease}:host .check fa-icon,:host-context(.sfc-default-theme) :host .check fa-icon{opacity:.5}:host-context(.sfc-dark-theme) :host .check fa-icon{opacity:.8}:host .check:hover{border-color:#ffce54}:host .check:hover fa-icon{transition:opacity .5s ease}:host .check:hover fa-icon,:host-context(.sfc-default-theme) :host .check:hover fa-icon{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover fa-icon{opacity:1}:host.active .check{border-color:#ffce54;background:#ffce54}:host.active .check fa-icon{opacity:1;transform:scale(0);-webkit-text-stroke:0;animation:icon .3s cubic-bezier(1,.008,.565,1.65) .1s 1 forwards}@keyframes icon{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}:host.circle .check{border-radius:50%}:host.rounded .check{border-radius:15%}:host.disabled{pointer-events:none}:host.disabled .check{color:#fff;border-style:dashed;transition:border-color .5s ease}:host.disabled .check,:host-context(.sfc-default-theme) :host.disabled .check{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .check{border-color:#656d78}:host.disabled.active .check{transition:background .5s ease}:host.disabled.active .check,:host-context(.sfc-default-theme) :host.disabled.active .check{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled.active .check{background:#656d78}\n"], dependencies: [{ kind: "component", type: i1$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }] });
2930
+ CheckmarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CheckmarkComponent, selector: "sfc-checkmark", inputs: { active: "active", disabled: "disabled", icon: "icon", type: "type" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active", "class.disabled": "this.disabled", "class": "this.type" } }, ngImport: i0, template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <fa-icon [sfcShowHideElement]=\"active\" [icon]=\"icon\"></fa-icon>\r\n </span>\r\n</div>", styles: [":host{display:inline-block;transition:color .5s ease}:host,:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#fff}:host .check{border:.125em solid;background:transparent;transition:border-color .5s ease,background .5s ease;transition:border-color .5s ease;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.1em}:host .check,:host-context(.sfc-default-theme) :host .check{border-color:#545e61}:host-context(.sfc-dark-theme) :host .check{border-color:#fff}:host .check fa-icon{transition:opacity .5s ease;color:#fff;transition:opacity .3s ease}:host .check fa-icon,:host-context(.sfc-default-theme) :host .check fa-icon{opacity:.5}:host-context(.sfc-dark-theme) :host .check fa-icon{opacity:.8}:host .check:hover{border-color:#ffce54}:host .check:hover fa-icon{transition:opacity .5s ease}:host .check:hover fa-icon,:host-context(.sfc-default-theme) :host .check:hover fa-icon{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover fa-icon{opacity:1}:host.active .check{border-color:#ffce54;background:#ffce54}:host.active .check fa-icon{opacity:1;transform:scale(0);-webkit-text-stroke:0;animation:icon .3s cubic-bezier(1,.008,.565,1.65) .1s 1 forwards}@keyframes icon{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}:host.circle .check{border-radius:50%}:host.rounded .check{border-radius:15%}:host.disabled{pointer-events:none}:host.disabled .check{color:#fff;border-style:dashed;transition:border-color .5s ease}:host.disabled .check,:host-context(.sfc-default-theme) :host.disabled .check{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .check{border-color:#656d78}:host.disabled.active .check{transition:background .5s ease}:host.disabled.active .check,:host-context(.sfc-default-theme) :host.disabled.active .check{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled.active .check{background:#656d78}\n"], dependencies: [{ kind: "component", type: i1$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }] });
2710
2931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckmarkComponent, decorators: [{
2711
2932
  type: Component,
2712
- args: [{ selector: 'sfc-checkmark', template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <fa-icon [sfcShowHideElement]=\"active\" [icon]=\"icon\"></fa-icon>\r\n </span>\r\n</div>", styles: [":host{display:inline-block;transition:color .5s ease}:host,:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#fff}:host .check{border:.125em solid;background:transparent;transition:border-color .5s ease,background .5s ease;transition:border-color .5s ease;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center}:host .check,:host-context(.sfc-default-theme) :host .check{border-color:#545e61}:host-context(.sfc-dark-theme) :host .check{border-color:#fff}:host .check fa-icon{transition:opacity .5s ease;color:#fff;font-size:.8em;transition:opacity .3s ease}:host .check fa-icon,:host-context(.sfc-default-theme) :host .check fa-icon{opacity:.5}:host-context(.sfc-dark-theme) :host .check fa-icon{opacity:.8}:host .check:hover{border-color:#ffce54}:host .check:hover fa-icon{transition:opacity .5s ease}:host .check:hover fa-icon,:host-context(.sfc-default-theme) :host .check:hover fa-icon{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover fa-icon{opacity:1}:host.active .check{border-color:#ffce54;background:#ffce54}:host.active .check fa-icon{opacity:1;transform:scale(0);-webkit-text-stroke:0;animation:icon .3s cubic-bezier(1,.008,.565,1.65) .1s 1 forwards}@keyframes icon{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}:host.circle .check{border-radius:50%}:host.rounded .check{border-radius:15%}:host.disabled{pointer-events:none}:host.disabled .check{color:#fff;border-style:dashed;transition:border-color .5s ease}:host.disabled .check,:host-context(.sfc-default-theme) :host.disabled .check{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .check{border-color:#656d78}:host.disabled.active .check{transition:background .5s ease}:host.disabled.active .check,:host-context(.sfc-default-theme) :host.disabled.active .check{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled.active .check{background:#656d78}\n"] }]
2933
+ args: [{ selector: 'sfc-checkmark', template: "<div class=\"container\">\r\n <span class=\"check\">\r\n <fa-icon [sfcShowHideElement]=\"active\" [icon]=\"icon\"></fa-icon>\r\n </span>\r\n</div>", styles: [":host{display:inline-block;transition:color .5s ease}:host,:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#fff}:host .check{border:.125em solid;background:transparent;transition:border-color .5s ease,background .5s ease;transition:border-color .5s ease;width:1em;height:1em;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.1em}:host .check,:host-context(.sfc-default-theme) :host .check{border-color:#545e61}:host-context(.sfc-dark-theme) :host .check{border-color:#fff}:host .check fa-icon{transition:opacity .5s ease;color:#fff;transition:opacity .3s ease}:host .check fa-icon,:host-context(.sfc-default-theme) :host .check fa-icon{opacity:.5}:host-context(.sfc-dark-theme) :host .check fa-icon{opacity:.8}:host .check:hover{border-color:#ffce54}:host .check:hover fa-icon{transition:opacity .5s ease}:host .check:hover fa-icon,:host-context(.sfc-default-theme) :host .check:hover fa-icon{opacity:.8}:host-context(.sfc-dark-theme) :host .check:hover fa-icon{opacity:1}:host.active .check{border-color:#ffce54;background:#ffce54}:host.active .check fa-icon{opacity:1;transform:scale(0);-webkit-text-stroke:0;animation:icon .3s cubic-bezier(1,.008,.565,1.65) .1s 1 forwards}@keyframes icon{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}:host.circle .check{border-radius:50%}:host.rounded .check{border-radius:15%}:host.disabled{pointer-events:none}:host.disabled .check{color:#fff;border-style:dashed;transition:border-color .5s ease}:host.disabled .check,:host-context(.sfc-default-theme) :host.disabled .check{border-color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled .check{border-color:#656d78}:host.disabled.active .check{transition:background .5s ease}:host.disabled.active .check,:host-context(.sfc-default-theme) :host.disabled.active .check{background:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled.active .check{background:#656d78}\n"] }]
2713
2934
  }], propDecorators: { active: [{
2714
2935
  type: Input
2715
2936
  }, {
@@ -2727,6 +2948,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2727
2948
  }, {
2728
2949
  type: HostBinding,
2729
2950
  args: ['class']
2951
+ }], onClick: [{
2952
+ type: HostListener,
2953
+ args: ['click']
2730
2954
  }] } });
2731
2955
 
2732
2956
  var _a;
@@ -2836,6 +3060,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2836
3060
 
2837
3061
  var LoadContainerLoadType;
2838
3062
  (function (LoadContainerLoadType) {
3063
+ LoadContainerLoadType["Common"] = "common";
2839
3064
  LoadContainerLoadType["Button"] = "button";
2840
3065
  LoadContainerLoadType["Scroll"] = "scroll";
2841
3066
  LoadContainerLoadType["Pagination"] = "pagination";
@@ -2860,6 +3085,7 @@ var LoadContainerType;
2860
3085
  (function (LoadContainerType) {
2861
3086
  LoadContainerType["Dropdown"] = "dropdown";
2862
3087
  LoadContainerType["Table"] = "table";
3088
+ LoadContainerType["Container"] = "container";
2863
3089
  })(LoadContainerType || (LoadContainerType = {}));
2864
3090
 
2865
3091
  class LoadMoreButtonComponent {
@@ -2887,11 +3113,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2887
3113
  }] } });
2888
3114
 
2889
3115
  class LoadContainerComponent {
2890
- constructor(loaderService, loadMoreService, paginationService, sortingService) {
3116
+ constructor(loaderService, loadMoreService, paginationService, sortingService, reloadService) {
2891
3117
  this.loaderService = loaderService;
2892
3118
  this.loadMoreService = loadMoreService;
2893
3119
  this.paginationService = paginationService;
2894
3120
  this.sortingService = sortingService;
3121
+ this.reloadService = reloadService;
2895
3122
  this.ComponentSize = ComponentSize;
2896
3123
  this.Position = Position;
2897
3124
  this.type = LoadContainerType.Dropdown;
@@ -2946,7 +3173,7 @@ class LoadContainerComponent {
2946
3173
  this.source == LoadContainerChangesSource.Page ||
2947
3174
  this.source == LoadContainerChangesSource.Data;
2948
3175
  }
2949
- get pagination() { return this.model.loadType == LoadContainerLoadType.Pagination; }
3176
+ get pagination() { return this.model.loadType == LoadContainerLoadType.Pagination && isDefined(this.model.pagination); }
2950
3177
  ngOnDestroy() {
2951
3178
  if (this._subscription)
2952
3179
  this._subscription.unsubscribe();
@@ -2977,11 +3204,14 @@ class LoadContainerComponent {
2977
3204
  var _a;
2978
3205
  if (!this.model)
2979
3206
  return;
2980
- if (!isDefined(this.model.pagination))
2981
- this.model.pagination = PaginationConstants.DEFAULT_PAGINATION;
2982
- else
2983
- this.paginationService.pageValue = (_a = this.model.pagination) === null || _a === void 0 ? void 0 : _a.page;
2984
- const parameters$ = this.buildParameters(this.model.predicate$), data$ = isDefined(this.model.loader)
3207
+ this.paginationService.pageValue = ((_a = this.model.pagination) === null || _a === void 0 ? void 0 : _a.page) || PaginationConstants.DEFAULT_PAGINATION.page;
3208
+ if (!this.model.predicate$) {
3209
+ this.model.predicate$ = EMPTY.pipe(startWith(null));
3210
+ }
3211
+ const predicate$ = combineLatest([
3212
+ this.model.predicate$,
3213
+ this.reloadService.reload$.pipe(startWith(null))
3214
+ ]).pipe(map(([model, _]) => model)), parameters$ = this.buildParameters(predicate$), data$ = isDefined(this.model.loader)
2985
3215
  ? this.buildDynamic(parameters$, this.model.loader)
2986
3216
  : this.buildStatic(parameters$, this.model);
2987
3217
  if (isDefined(this._subscription))
@@ -2992,8 +3222,8 @@ class LoadContainerComponent {
2992
3222
  });
2993
3223
  }
2994
3224
  buildParameters(predicate$) {
2995
- const parameters$ = (predicate$ || EMPTY.pipe(startWith(null))).pipe(tap(() => {
2996
- if (this.source != LoadContainerChangesSource.Initial)
3225
+ const parameters$ = predicate$.pipe(tap((params) => {
3226
+ if (this.source != LoadContainerChangesSource.Initial && !(params === null || params === void 0 ? void 0 : params.reload))
2997
3227
  this.resetParameters();
2998
3228
  this.source = LoadContainerChangesSource.Predicate;
2999
3229
  this.predicateChanged = true;
@@ -3027,8 +3257,8 @@ class LoadContainerComponent {
3027
3257
  parameters = { params: parameters.params, page: this.page, sorting: parameters.sorting };
3028
3258
  }
3029
3259
  const filtered = model.filter ? model.filter(items, parameters) : items, sorted = parameters.sorting ? sortBy([...filtered], parameters.sorting.id, parameters.sorting.direction) : filtered, data = sorted ? {
3030
- items: skip(sorted, parameters.page, (_a = this.model.pagination) === null || _a === void 0 ? void 0 : _a.size),
3031
- next: parameters.page < Math.ceil(sorted.length / ((_b = this.model.pagination) === null || _b === void 0 ? void 0 : _b.size)),
3260
+ items: this.model.pagination ? skip(sorted, parameters.page, (_a = this.model.pagination) === null || _a === void 0 ? void 0 : _a.size) : sorted,
3261
+ next: this.model.pagination ? parameters.page < Math.ceil(sorted.length / ((_b = this.model.pagination) === null || _b === void 0 ? void 0 : _b.size)) : false,
3032
3262
  reset: this.reset,
3033
3263
  total: sorted.length,
3034
3264
  page: parameters.page
@@ -3045,12 +3275,12 @@ class LoadContainerComponent {
3045
3275
  this.loadMoreService.reset();
3046
3276
  }
3047
3277
  }
3048
- LoadContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadContainerComponent, deps: [{ token: LoaderService }, { token: LoadMoreService }, { token: PaginationService }, { token: SortingService }], target: i0.ɵɵFactoryTarget.Component });
3049
- LoadContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoadContainerComponent, selector: "sfc-load-container", inputs: { id: "id", type: "type", open: "open", loadMore: "loadMore", loadMoreLabel: "loadMoreLabel", showEmpty: "showEmpty", emptyLabel: "emptyLabel", model: "model", scrollTarget: "scrollTarget", paginationCount: "paginationCount", paginationLimits: "paginationLimits", showLoading: "showLoading" }, outputs: { handleError: "handleError", handleSuccess: "handleSuccess", handleLoading: "handleLoading" }, host: { properties: { "class": "this.type", "class.open": "this.open", "class.empty": "this.isEmpty", "class.loading": "this._loading" } }, providers: [LoadMoreService, PaginationService], viewQueries: [{ propertyName: "contentEl", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div class=\"container\">\r\n <sfc-bounce-loader *ngIf=\"showLoading\" [id]=\"id\" [sfcComponentSize]=\"ComponentSize.Small\"></sfc-bounce-loader>\r\n <div #content class=\"content\" [sfcScrollIntoView]=\"scrollTarget\" (sfcScrollTracker)=\"onScroll()\"\r\n [positions]=\"scrollPosition\">\r\n <div class=\"items\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"actions\" (sfcMouseDown)=\"$event.preventDefault()\">\r\n <sfc-load-more-button [hidden]=\"hideLoadMoreButton\" (more)=\"more($event)\" [label]=\"loadMoreLabel\">\r\n </sfc-load-more-button>\r\n <sfc-pagination *ngIf=\"showPagination\" [limits]=\"paginationLimits\" [count]=\"paginationCount\" [full]=\"false\"\r\n [total]=\"total\" [size]=\"model.pagination?.size!\" [page]=\"page\">\r\n </sfc-pagination>\r\n <sfc-delimeter *ngIf=\"isEmpty\" [label]=\"emptyLabel\"></sfc-delimeter>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;height:inherit;position:relative}:host .container{height:inherit}:host .container .content{transition:background .5s ease;cursor:initial;overflow-y:auto;overflow-x:hidden;height:inherit}:host .container .content,:host-context(.sfc-default-theme) :host .container .content{background:transparent}:host-context(.sfc-dark-theme) :host .container .content{background:transparent}:host .container .content sfc-delimeter{font-style:italic;font-weight:700}:host.dropdown .container .content{display:none;opacity:0;max-height:12.5em;box-shadow:0 .125em .125em #00000024,0 .18em .06em -.125em #0000001f,0 .06em .31em #0003}:host.dropdown.open .container .content{display:block;opacity:1}:host ::ng-deep ::-webkit-scrollbar{width:.375em;height:.375em}:host ::ng-deep ::-webkit-scrollbar-track{border-radius:.625em;background:#e9e9e9}:host ::ng-deep ::-webkit-scrollbar-thumb{border-radius:.625em;background:rgba(0,0,0,.2)}:host ::ng-deep ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}:host ::ng-deep ::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.6)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MouseDownDirective, selector: "[sfcMouseDown]", inputs: ["button"], outputs: ["sfcMouseDown"] }, { kind: "directive", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }, { kind: "directive", type: ScrollTrackerDirective, selector: "[sfcScrollTracker]", inputs: ["positions"], outputs: ["sfcScrollTracker"] }, { kind: "directive", type: ScrollIntoViewDirective, selector: "[sfcScrollIntoView]", inputs: ["sfcScrollIntoView", "local", "options"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }, { kind: "component", type: PaginationComponent, selector: "sfc-pagination", inputs: ["count", "full", "limits", "page", "total", "size"] }, { kind: "component", type: LoadMoreButtonComponent, selector: "sfc-load-more-button", inputs: ["label", "icon"], outputs: ["more"] }, { kind: "component", type: BounceLoaderComponent, selector: "sfc-bounce-loader" }] });
3278
+ LoadContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadContainerComponent, deps: [{ token: LoaderService }, { token: LoadMoreService }, { token: PaginationService }, { token: SortingService }, { token: ReloadService }], target: i0.ɵɵFactoryTarget.Component });
3279
+ LoadContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoadContainerComponent, selector: "sfc-load-container", inputs: { id: "id", type: "type", open: "open", loadMore: "loadMore", loadMoreLabel: "loadMoreLabel", showEmpty: "showEmpty", emptyLabel: "emptyLabel", model: "model", scrollTarget: "scrollTarget", paginationCount: "paginationCount", paginationLimits: "paginationLimits", showLoading: "showLoading" }, outputs: { handleError: "handleError", handleSuccess: "handleSuccess", handleLoading: "handleLoading" }, host: { properties: { "class": "this.type", "class.open": "this.open", "class.empty": "this.isEmpty", "class.loading": "this._loading" } }, providers: [LoadMoreService, PaginationService, ReloadService], viewQueries: [{ propertyName: "contentEl", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div class=\"container\">\r\n <sfc-bounce-loader *ngIf=\"showLoading\" [id]=\"id\" [sfcComponentSize]=\"ComponentSize.Small\"></sfc-bounce-loader>\r\n <div #content class=\"content\" [sfcScrollIntoView]=\"scrollTarget\" (sfcScrollTracker)=\"onScroll()\"\r\n [positions]=\"scrollPosition\">\r\n <div class=\"items\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"actions\" (sfcMouseDown)=\"$event.preventDefault()\">\r\n <sfc-load-more-button [hidden]=\"hideLoadMoreButton\" (more)=\"more($event)\" [label]=\"loadMoreLabel\">\r\n </sfc-load-more-button>\r\n <sfc-pagination *ngIf=\"showPagination\" [limits]=\"paginationLimits\" [count]=\"paginationCount\" [full]=\"false\"\r\n [total]=\"total\" [size]=\"model.pagination?.size!\" [page]=\"page\">\r\n </sfc-pagination>\r\n <sfc-delimeter *ngIf=\"isEmpty\" [label]=\"emptyLabel\"></sfc-delimeter>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;height:inherit;position:relative}:host .container{height:inherit}:host .container .content{transition:background .5s ease;cursor:initial;overflow-y:auto;overflow-x:hidden;height:inherit}:host .container .content,:host-context(.sfc-default-theme) :host .container .content{background:transparent}:host-context(.sfc-dark-theme) :host .container .content{background:transparent}:host .container .content sfc-delimeter{padding:.5em 0;font-size:.8em;font-style:italic;font-weight:700}:host.dropdown .container .content{display:none;opacity:0;max-height:12.5em;box-shadow:0 .125em .125em #00000024,0 .18em .06em -.125em #0000001f,0 .06em .31em #0003}:host.dropdown.open .container .content{display:block;opacity:1}:host ::ng-deep ::-webkit-scrollbar{width:.375em;height:.375em}:host ::ng-deep ::-webkit-scrollbar-track{border-radius:.625em;background:#e9e9e9}:host ::ng-deep ::-webkit-scrollbar-thumb{border-radius:.625em;background:rgba(0,0,0,.2)}:host ::ng-deep ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}:host ::ng-deep ::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.6)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MouseDownDirective, selector: "[sfcMouseDown]", inputs: ["button"], outputs: ["sfcMouseDown"] }, { kind: "directive", type: ComponentSizeDirective, selector: "[sfcComponentSize]", inputs: ["sfcComponentSize", "customSize"] }, { kind: "directive", type: ScrollTrackerDirective, selector: "[sfcScrollTracker]", inputs: ["positions"], outputs: ["sfcScrollTracker"] }, { kind: "directive", type: ScrollIntoViewDirective, selector: "[sfcScrollIntoView]", inputs: ["sfcScrollIntoView", "local", "options"] }, { kind: "component", type: DelimeterComponent, selector: "sfc-delimeter", inputs: ["label", "direction"] }, { kind: "component", type: PaginationComponent, selector: "sfc-pagination", inputs: ["count", "full", "limits", "page", "total", "size"] }, { kind: "component", type: LoadMoreButtonComponent, selector: "sfc-load-more-button", inputs: ["label", "icon"], outputs: ["more"] }, { kind: "component", type: BounceLoaderComponent, selector: "sfc-bounce-loader" }] });
3050
3280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadContainerComponent, decorators: [{
3051
3281
  type: Component,
3052
- args: [{ selector: 'sfc-load-container', providers: [LoadMoreService, PaginationService], template: "<div class=\"container\">\r\n <sfc-bounce-loader *ngIf=\"showLoading\" [id]=\"id\" [sfcComponentSize]=\"ComponentSize.Small\"></sfc-bounce-loader>\r\n <div #content class=\"content\" [sfcScrollIntoView]=\"scrollTarget\" (sfcScrollTracker)=\"onScroll()\"\r\n [positions]=\"scrollPosition\">\r\n <div class=\"items\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"actions\" (sfcMouseDown)=\"$event.preventDefault()\">\r\n <sfc-load-more-button [hidden]=\"hideLoadMoreButton\" (more)=\"more($event)\" [label]=\"loadMoreLabel\">\r\n </sfc-load-more-button>\r\n <sfc-pagination *ngIf=\"showPagination\" [limits]=\"paginationLimits\" [count]=\"paginationCount\" [full]=\"false\"\r\n [total]=\"total\" [size]=\"model.pagination?.size!\" [page]=\"page\">\r\n </sfc-pagination>\r\n <sfc-delimeter *ngIf=\"isEmpty\" [label]=\"emptyLabel\"></sfc-delimeter>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;height:inherit;position:relative}:host .container{height:inherit}:host .container .content{transition:background .5s ease;cursor:initial;overflow-y:auto;overflow-x:hidden;height:inherit}:host .container .content,:host-context(.sfc-default-theme) :host .container .content{background:transparent}:host-context(.sfc-dark-theme) :host .container .content{background:transparent}:host .container .content sfc-delimeter{font-style:italic;font-weight:700}:host.dropdown .container .content{display:none;opacity:0;max-height:12.5em;box-shadow:0 .125em .125em #00000024,0 .18em .06em -.125em #0000001f,0 .06em .31em #0003}:host.dropdown.open .container .content{display:block;opacity:1}:host ::ng-deep ::-webkit-scrollbar{width:.375em;height:.375em}:host ::ng-deep ::-webkit-scrollbar-track{border-radius:.625em;background:#e9e9e9}:host ::ng-deep ::-webkit-scrollbar-thumb{border-radius:.625em;background:rgba(0,0,0,.2)}:host ::ng-deep ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}:host ::ng-deep ::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.6)}\n"] }]
3053
- }], ctorParameters: function () { return [{ type: LoaderService }, { type: LoadMoreService }, { type: PaginationService }, { type: SortingService }]; }, propDecorators: { id: [{
3282
+ args: [{ selector: 'sfc-load-container', providers: [LoadMoreService, PaginationService, ReloadService], template: "<div class=\"container\">\r\n <sfc-bounce-loader *ngIf=\"showLoading\" [id]=\"id\" [sfcComponentSize]=\"ComponentSize.Small\"></sfc-bounce-loader>\r\n <div #content class=\"content\" [sfcScrollIntoView]=\"scrollTarget\" (sfcScrollTracker)=\"onScroll()\"\r\n [positions]=\"scrollPosition\">\r\n <div class=\"items\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"actions\" (sfcMouseDown)=\"$event.preventDefault()\">\r\n <sfc-load-more-button [hidden]=\"hideLoadMoreButton\" (more)=\"more($event)\" [label]=\"loadMoreLabel\">\r\n </sfc-load-more-button>\r\n <sfc-pagination *ngIf=\"showPagination\" [limits]=\"paginationLimits\" [count]=\"paginationCount\" [full]=\"false\"\r\n [total]=\"total\" [size]=\"model.pagination?.size!\" [page]=\"page\">\r\n </sfc-pagination>\r\n <sfc-delimeter *ngIf=\"isEmpty\" [label]=\"emptyLabel\"></sfc-delimeter>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;height:inherit;position:relative}:host .container{height:inherit}:host .container .content{transition:background .5s ease;cursor:initial;overflow-y:auto;overflow-x:hidden;height:inherit}:host .container .content,:host-context(.sfc-default-theme) :host .container .content{background:transparent}:host-context(.sfc-dark-theme) :host .container .content{background:transparent}:host .container .content sfc-delimeter{padding:.5em 0;font-size:.8em;font-style:italic;font-weight:700}:host.dropdown .container .content{display:none;opacity:0;max-height:12.5em;box-shadow:0 .125em .125em #00000024,0 .18em .06em -.125em #0000001f,0 .06em .31em #0003}:host.dropdown.open .container .content{display:block;opacity:1}:host ::ng-deep ::-webkit-scrollbar{width:.375em;height:.375em}:host ::ng-deep ::-webkit-scrollbar-track{border-radius:.625em;background:#e9e9e9}:host ::ng-deep ::-webkit-scrollbar-thumb{border-radius:.625em;background:rgba(0,0,0,.2)}:host ::ng-deep ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.4)}:host ::ng-deep ::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.6)}\n"] }]
3283
+ }], ctorParameters: function () { return [{ type: LoaderService }, { type: LoadMoreService }, { type: PaginationService }, { type: SortingService }, { type: ReloadService }]; }, propDecorators: { id: [{
3054
3284
  type: Input
3055
3285
  }], type: [{
3056
3286
  type: Input
@@ -3198,6 +3428,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3198
3428
  args: ['click']
3199
3429
  }] } });
3200
3430
 
3431
+ class MessageComponent {
3432
+ constructor() {
3433
+ this.type = NotificationType.Info;
3434
+ }
3435
+ }
3436
+ MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3437
+ MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: MessageComponent, selector: "sfc-message", inputs: { message: "message", type: "type" }, host: { properties: { "class": "this.type" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <span class=\"message\">{{message}}</span>\r\n </div> \r\n</div>", styles: [":host .container .content .message{text-align:center;font-weight:700;font-size:.8em;padding:0}:host .container .content .message:empty{display:none}:host.info .container .content .message{color:#4fc1e9}:host.success .container .content .message{color:#4ec07d}:host.failed .container .content .message{color:#e96075}\n"] });
3438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MessageComponent, decorators: [{
3439
+ type: Component,
3440
+ args: [{ selector: 'sfc-message', template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <span class=\"message\">{{message}}</span>\r\n </div> \r\n</div>", styles: [":host .container .content .message{text-align:center;font-weight:700;font-size:.8em;padding:0}:host .container .content .message:empty{display:none}:host.info .container .content .message{color:#4fc1e9}:host.success .container .content .message{color:#4ec07d}:host.failed .container .content .message{color:#e96075}\n"] }]
3441
+ }], propDecorators: { message: [{
3442
+ type: Input
3443
+ }], type: [{
3444
+ type: Input
3445
+ }, {
3446
+ type: HostBinding,
3447
+ args: ['class']
3448
+ }] } });
3449
+
3201
3450
  class NgxSfcCommonModule {
3202
3451
  }
3203
3452
  NgxSfcCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -3236,6 +3485,7 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
3236
3485
  CollapseExpandComponent,
3237
3486
  CollapseExpandContainerComponent,
3238
3487
  ToggleComponent,
3488
+ MessageComponent,
3239
3489
  // loaders
3240
3490
  BounceLoaderComponent,
3241
3491
  CircleLoaderComponent,
@@ -3247,7 +3497,8 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
3247
3497
  DefaultModalFooterComponent,
3248
3498
  // pipes
3249
3499
  SwitchMultiCasePipe,
3250
- SortByPipe
3500
+ SortByPipe,
3501
+ RepeatPipe
3251
3502
  ], imports: [CommonModule,
3252
3503
  FontAwesomeModule], exports: [
3253
3504
  // directives
@@ -3284,6 +3535,7 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
3284
3535
  CollapseExpandComponent,
3285
3536
  CollapseExpandContainerComponent,
3286
3537
  ToggleComponent,
3538
+ MessageComponent,
3287
3539
  // loaders
3288
3540
  BounceLoaderComponent,
3289
3541
  CircleLoaderComponent,
@@ -3295,7 +3547,8 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
3295
3547
  DefaultModalFooterComponent,
3296
3548
  // pipes
3297
3549
  SwitchMultiCasePipe,
3298
- SortByPipe
3550
+ SortByPipe,
3551
+ RepeatPipe
3299
3552
  ] });
3300
3553
  NgxSfcCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS], imports: [CommonModule,
3301
3554
  FontAwesomeModule] });
@@ -3337,6 +3590,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3337
3590
  CollapseExpandComponent,
3338
3591
  CollapseExpandContainerComponent,
3339
3592
  ToggleComponent,
3593
+ MessageComponent,
3340
3594
  // loaders
3341
3595
  BounceLoaderComponent,
3342
3596
  CircleLoaderComponent,
@@ -3348,7 +3602,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3348
3602
  DefaultModalFooterComponent,
3349
3603
  // pipes
3350
3604
  SwitchMultiCasePipe,
3351
- SortByPipe
3605
+ SortByPipe,
3606
+ RepeatPipe
3352
3607
  ],
3353
3608
  imports: [
3354
3609
  CommonModule,
@@ -3389,6 +3644,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3389
3644
  CollapseExpandComponent,
3390
3645
  CollapseExpandContainerComponent,
3391
3646
  ToggleComponent,
3647
+ MessageComponent,
3392
3648
  // loaders
3393
3649
  BounceLoaderComponent,
3394
3650
  CircleLoaderComponent,
@@ -3400,7 +3656,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3400
3656
  DefaultModalFooterComponent,
3401
3657
  // pipes
3402
3658
  SwitchMultiCasePipe,
3403
- SortByPipe
3659
+ SortByPipe,
3660
+ RepeatPipe
3404
3661
  ],
3405
3662
  providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS]
3406
3663
  }]
@@ -3414,5 +3671,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3414
3671
  * Generated bundle index. Do not edit.
3415
3672
  */
3416
3673
 
3417
- export { BounceLoaderComponent, BrowserDocumentRef, BrowserWindowRef, ButtonComponent, ButtonType, CheckmarkComponent, CheckmarkType, CircleLoaderComponent, CircleLoaderType, ClickOutsideDirective, CloseComponent, CollapseExpandComponent, CollapseExpandContainerComponent, CollapseExpandDirective, CommonConstants, Compare, ComponentReferenceDirective, ComponentSize, ComponentSizeDirective, DOCUMENT, DOCUMENT_PROVIDERS, DateTimeConstants, DefaultModalFooterComponent, DefaultModalHeaderComponent, DelimeterComponent, DestroyParentDirective, Direction, DocumentRef, DomChangesDirective, DotComponent, DotsComponent, HamburgerComponent, HamburgerMenuComponent, IconComponent, IfDirective, ImageLoadDirective, ImageLoadService, LoadContainerChangesSource, LoadContainerComponent, LoadContainerLoadType, LoadContainerType, LoadMoreButtonComponent, LoadMoreService, LoaderService, MediaLimits, ModalComponent, ModalOpenDirective, ModalOpenOnClickDirective, ModalService, ModalTemplate, MouseDownDirective, NgxSfcCommonModule, PaginationComponent, PaginationConstants, PaginationService, Position, ResizeService, ScrollIntoViewDirective, ScrollTrackerDirective, Sequence, ShowHideElementDirective, SortByPipe, SortingDirection, SortingService, SwitchMultiCasePipe, TemplateContentComponent, TemplateReferenceDirective, Theme, ThrowElementOnHoverDirective, ToggleComponent, ToggleSwitcherComponent, TooltipComponent, TooltipType, UIClass, UIConstants, WINDOW, WINDOW_PROVIDERS, WindowRef, addClasses, addItem, addPropertyToObject, all, any, browserDocumentProvider, browserWindowProvider, buildHttpParams, contains, convertDateToTimestamp, convertFromBase64String, convertTimestampToDate, convertToBase64String, convertUTCDateToLocalDate, count, distinct, documentFactory, documentProvider, firstItem, firstOrDefault, generateGuid, getAge, getCalcValue, getCollectionOrEmpty, getCssLikeValue, getFileExtension, getFirstDayOfMonth, getFirstDayOfMonthByYearAndMonth, getFirstDayOfYear, getLastDayOfMonth, getLastDayOfMonthByYearAndMonth, getLastDayOfYear, getNextDate, getNextMonth, getNextYear, getPreviousDate, getPreviousMonth, getPreviousYear, getRotateValue, getValueFromCssLikeValue, getWeeksNumberInMonth, hasItem, hasItemBy, hasObjectItem, hexToRgb, isAsyncData, isChromeBrowser, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual, isDefined, isEmail, isEqual, isEqualDateTimes, isEqualDates, isImage, isNullOrEmptyString, isNumeric, isObject, lastItem, max, mergeDeep, nameof, parseBoolean, parseFileSize, readAsDataURL, remove, removeClasses, removeItem, removeItemBy, removePropertyFromObject, replaceRgbOpacity, rgbToHex, setDay, setDefaultSecondsAndMiliseconds, setHours, setMilliseconds, setMinutes, setSeconds, setYear, skip, sort, sortBy, sortByPath, sum, trim, updateItemBy, where, windowFactory, windowProvider };
3674
+ export { BounceLoaderComponent, BrowserDocumentRef, BrowserWindowRef, ButtonComponent, ButtonType, CheckmarkComponent, CheckmarkType, CircleLoaderComponent, CircleLoaderType, ClickOutsideDirective, CloseComponent, CollapseExpandComponent, CollapseExpandContainerComponent, CollapseExpandDirective, CommonConstants, Compare, ComponentReferenceDirective, ComponentSize, ComponentSizeDirective, DOCUMENT, DOCUMENT_PROVIDERS, DateTimeConstants, DefaultModalFooterComponent, DefaultModalHeaderComponent, DelimeterComponent, DestroyParentDirective, Direction, DocumentRef, DomChangesDirective, DotComponent, DotsComponent, HamburgerComponent, HamburgerMenuComponent, IconComponent, IfDirective, ImageLoadDirective, ImageLoadService, ItemsView, LoadContainerChangesSource, LoadContainerComponent, LoadContainerLoadType, LoadContainerType, LoadMoreButtonComponent, LoadMoreService, LoaderService, MediaLimits, MessageComponent, ModalComponent, ModalOpenDirective, ModalOpenOnClickDirective, ModalService, ModalTemplate, MouseDownDirective, NgxSfcCommonModule, NotificationType, ObservableModel, PaginationComponent, PaginationConstants, PaginationService, Position, ReloadService, RepeatPipe, ResizeService, ScrollIntoViewDirective, ScrollTrackerDirective, Select, Sequence, ShowHideElementDirective, SortByPipe, SortingDirection, SortingService, State, SwitchMultiCasePipe, TemplateContentComponent, TemplateReferenceDirective, Theme, ThrowElementOnHoverDirective, ToggleComponent, ToggleSwitcherComponent, TooltipComponent, TooltipType, UIClass, UIConstants, WINDOW, WINDOW_PROVIDERS, WindowRef, addClasses, addItem, addPropertyToObject, all, any, browserDocumentProvider, browserWindowProvider, buildHttpParams, contains, convertDateToTimestamp, convertFromBase64String, convertTimestampToDate, convertToBase64String, convertUTCDateToLocalDate, count, distinct, documentFactory, documentProvider, firstItem, firstOrDefault, generateGuid, getAge, getCalcValue, getCollectionOrEmpty, getCssLikeValue, getFileExtension, getFirstDayOfMonth, getFirstDayOfMonthByYearAndMonth, getFirstDayOfYear, getLastDayOfMonth, getLastDayOfMonthByYearAndMonth, getLastDayOfYear, getNextDate, getNextMonth, getNextYear, getPreviousDate, getPreviousMonth, getPreviousYear, getRotateValue, getValueFromCssLikeValue, getWeeksNumberInMonth, hasAnyItem, hasItem, hasItemBy, hasObjectItem, hexToRgb, isArraysEquals, isAsyncData, isChromeBrowser, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual, isDateTimeLessOrEqual, isDefined, isEmail, isEqual, isEqualDateTimes, isEqualDates, isImage, isJsonString, isNullOrEmptyString, isNumeric, isObject, isString, isTimeGreatOrEqual, isTimeLessOrEqual, lastItem, max, mergeDeep, nameof, parseBoolean, parseFileSize, readAsDataURL, remove, removeClasses, removeItem, removeItemBy, removePropertyFromObject, replaceRgbOpacity, rgbToHex, setDay, setDefaultSecondsAndMiliseconds, setHours, setMilliseconds, setMinutes, setSeconds, setYear, skip, sort, sortBy, sortByPath, stopAndPreventPropagation, sum, trim, updateItemBy, where, windowFactory, windowProvider };
3418
3675
  //# sourceMappingURL=ngx-sfc-common.mjs.map