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.
- package/components/button/button.component.mixins.scss +28 -0
- package/esm2020/lib/components/checkmark/checkmark.component.mjs +8 -4
- package/esm2020/lib/components/index.mjs +2 -1
- package/esm2020/lib/components/load-container/enums/load-container-load-type.enum.mjs +2 -1
- package/esm2020/lib/components/load-container/enums/load-container-type.enum.mjs +2 -1
- package/esm2020/lib/components/load-container/load-container.component.mjs +21 -17
- package/esm2020/lib/components/load-container/models/load-container-predicate-parameters.model.mjs +1 -1
- package/esm2020/lib/components/message/message.component.mjs +22 -0
- package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +14 -12
- package/esm2020/lib/components/modal/directive/click/modal-open-on-click.model.mjs +2 -0
- package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +10 -4
- package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +16 -17
- package/esm2020/lib/components/modal/footer/default/default-modal-footer.constants.mjs +10 -0
- package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +13 -14
- package/esm2020/lib/components/modal/header/default/default-modal-header.constants.mjs +9 -0
- package/esm2020/lib/components/modal/modal.component.mjs +43 -12
- package/esm2020/lib/components/modal/service/modal.event.mjs +1 -1
- package/esm2020/lib/components/modal/service/modal.service.mjs +17 -13
- package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +10 -4
- package/esm2020/lib/constants/ui.constants.mjs +2 -1
- package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -2
- package/esm2020/lib/directives/if/if.directive.mjs +5 -1
- package/esm2020/lib/enums/index.mjs +5 -1
- package/esm2020/lib/enums/items-view.enum.mjs +7 -0
- package/esm2020/lib/enums/notification-type.enum.mjs +7 -0
- package/esm2020/lib/enums/select.enum.mjs +6 -0
- package/esm2020/lib/enums/state.enum.mjs +6 -0
- package/esm2020/lib/models/index.mjs +2 -2
- package/esm2020/lib/models/observable.model.mjs +10 -0
- package/esm2020/lib/models/select.model.mjs +2 -0
- package/esm2020/lib/ngx-sfc-common.module.mjs +15 -7
- package/esm2020/lib/pipes/index.mjs +2 -1
- package/esm2020/lib/pipes/repeat/repeat.pipe.mjs +14 -0
- package/esm2020/lib/pipes/sort-by/sort-by.pipe.mjs +4 -3
- package/esm2020/lib/pipes/switch-multi-case/switch-multi-case.pipe.mjs +2 -4
- package/esm2020/lib/services/index.mjs +2 -1
- package/esm2020/lib/services/reload/reload.service.mjs +21 -0
- package/esm2020/lib/utils/collections.utils.mjs +27 -1
- package/esm2020/lib/utils/common.utils.mjs +39 -7
- package/esm2020/lib/utils/date-time.utils.mjs +33 -1
- package/esm2020/lib/utils/http.utils.mjs +3 -1
- package/esm2020/lib/utils/index.mjs +4 -4
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/ngx-sfc-common.mjs +414 -157
- package/fesm2015/ngx-sfc-common.mjs.map +1 -1
- package/fesm2020/ngx-sfc-common.mjs +411 -155
- package/fesm2020/ngx-sfc-common.mjs.map +1 -1
- package/lib/components/checkmark/checkmark.component.d.ts +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/load-container/enums/load-container-load-type.enum.d.ts +1 -0
- package/lib/components/load-container/enums/load-container-type.enum.d.ts +2 -1
- package/lib/components/load-container/load-container.component.d.ts +3 -2
- package/lib/components/load-container/models/load-container-predicate-parameters.model.d.ts +1 -0
- package/lib/components/message/message.component.d.ts +9 -0
- package/lib/components/modal/directive/click/modal-open-on-click.directive.d.ts +5 -2
- package/lib/components/modal/directive/click/modal-open-on-click.model.d.ts +4 -0
- package/lib/components/modal/directive/open/modal-open.directive.d.ts +2 -1
- package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +4 -3
- package/lib/components/modal/footer/default/default-modal-footer.constants.d.ts +5 -0
- package/lib/components/modal/header/default/default-modal-header.component.d.ts +2 -2
- package/lib/components/modal/header/default/default-modal-header.constants.d.ts +4 -0
- package/lib/components/modal/modal.component.d.ts +14 -5
- package/lib/components/modal/service/modal.event.d.ts +1 -0
- package/lib/components/modal/service/modal.service.d.ts +7 -6
- package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +4 -2
- package/lib/constants/ui.constants.d.ts +1 -0
- package/lib/directives/if/if.directive.d.ts +1 -1
- package/lib/enums/index.d.ts +4 -0
- package/lib/enums/items-view.enum.d.ts +5 -0
- package/lib/enums/notification-type.enum.d.ts +5 -0
- package/lib/enums/select.enum.d.ts +4 -0
- package/lib/enums/state.enum.d.ts +4 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/observable.model.d.ts +8 -0
- package/lib/models/select.model.d.ts +4 -0
- package/lib/ngx-sfc-common.module.d.ts +14 -12
- package/lib/pipes/index.d.ts +1 -0
- package/lib/pipes/repeat/repeat.pipe.d.ts +7 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/reload/reload.service.d.ts +9 -0
- package/lib/utils/collections.utils.d.ts +14 -0
- package/lib/utils/common.utils.d.ts +18 -6
- package/lib/utils/date-time.utils.d.ts +22 -1
- package/lib/utils/index.d.ts +3 -3
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/styles/_mixins.scss +11 -0
|
@@ -1,14 +1,14 @@
|
|
|
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,
|
|
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 { HttpParams } from '@angular/common/http';
|
|
10
10
|
import { trigger, state, style, transition, group, query, animate, animateChild } from '@angular/animations';
|
|
11
|
-
import {
|
|
11
|
+
import { faWindowRestore, faTimes, faCheck, faChevronLeft, faChevronRight, faChevronCircleDown, faChevronUp, faChevronDown } from '@fortawesome/free-solid-svg-icons';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Component sizes
|
|
@@ -123,6 +123,32 @@ var Compare;
|
|
|
123
123
|
})(Compare || (Compare = {}));
|
|
124
124
|
;
|
|
125
125
|
|
|
126
|
+
var State;
|
|
127
|
+
(function (State) {
|
|
128
|
+
State["Added"] = "added";
|
|
129
|
+
State["Removed"] = "removed";
|
|
130
|
+
})(State || (State = {}));
|
|
131
|
+
|
|
132
|
+
var NotificationType;
|
|
133
|
+
(function (NotificationType) {
|
|
134
|
+
NotificationType["Info"] = "info";
|
|
135
|
+
NotificationType["Success"] = "success";
|
|
136
|
+
NotificationType["Failed"] = "failed";
|
|
137
|
+
})(NotificationType || (NotificationType = {}));
|
|
138
|
+
|
|
139
|
+
var Select;
|
|
140
|
+
(function (Select) {
|
|
141
|
+
Select["Single"] = "single";
|
|
142
|
+
Select["Multiple"] = "multiple";
|
|
143
|
+
})(Select || (Select = {}));
|
|
144
|
+
|
|
145
|
+
var ItemsView;
|
|
146
|
+
(function (ItemsView) {
|
|
147
|
+
ItemsView["List"] = "list";
|
|
148
|
+
ItemsView["Icons"] = "icons";
|
|
149
|
+
ItemsView["Cards"] = "cards";
|
|
150
|
+
})(ItemsView || (ItemsView = {}));
|
|
151
|
+
|
|
126
152
|
/**
|
|
127
153
|
* Create a new injection token for injecting the Document into a component.
|
|
128
154
|
*/
|
|
@@ -361,6 +387,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
361
387
|
}]
|
|
362
388
|
}] });
|
|
363
389
|
|
|
390
|
+
class ObservableModel {
|
|
391
|
+
constructor(defaultValue = null) {
|
|
392
|
+
this.defaultValue = defaultValue;
|
|
393
|
+
this.subject = new BehaviorSubject(this.defaultValue);
|
|
394
|
+
this.value$ = this.subject.asObservable();
|
|
395
|
+
}
|
|
396
|
+
get value() { return this.subject.value; }
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
class ReloadService {
|
|
400
|
+
constructor() {
|
|
401
|
+
/* Properties */
|
|
402
|
+
this.model = new ObservableModel();
|
|
403
|
+
}
|
|
404
|
+
get reload$() { return this.model.value$; }
|
|
405
|
+
/* End Properties */
|
|
406
|
+
reload(...ids) {
|
|
407
|
+
this.model.subject.next(ids);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
ReloadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
411
|
+
ReloadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReloadService, providedIn: 'root' });
|
|
412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReloadService, decorators: [{
|
|
413
|
+
type: Injectable,
|
|
414
|
+
args: [{ providedIn: 'root' }]
|
|
415
|
+
}] });
|
|
416
|
+
|
|
364
417
|
class ClickOutsideDirective {
|
|
365
418
|
constructor(elementRef, document) {
|
|
366
419
|
this.elementRef = elementRef;
|
|
@@ -375,7 +428,8 @@ class ClickOutsideDirective {
|
|
|
375
428
|
this.action = new EventEmitter();
|
|
376
429
|
}
|
|
377
430
|
ngAfterViewInit() {
|
|
378
|
-
|
|
431
|
+
// capture: true allow to catch event in early state (ignore stop propagation)
|
|
432
|
+
this._clickSubscription = fromEvent(this.document, 'click', { capture: true })
|
|
379
433
|
.subscribe(event => this.onClick(event));
|
|
380
434
|
}
|
|
381
435
|
ngOnDestroy() {
|
|
@@ -463,6 +517,7 @@ UIConstants.CSS_CENTER = 'center';
|
|
|
463
517
|
UIConstants.CSS_CLASS_FIXED = 'fixed';
|
|
464
518
|
UIConstants.CSS_CLASS_BACKGROUND = 'background';
|
|
465
519
|
UIConstants.CSS_CLASS_TOP = 'top';
|
|
520
|
+
UIConstants.CSS_CLASS_SCROLL = 'scroll';
|
|
466
521
|
UIConstants.RGB_OPACITY_PLACEHOLDER = '{opacity}';
|
|
467
522
|
|
|
468
523
|
class ShowHideElementDirective {
|
|
@@ -505,15 +560,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
505
560
|
}] } });
|
|
506
561
|
|
|
507
562
|
class IfDirective {
|
|
563
|
+
/* End Properties */
|
|
508
564
|
constructor(el) {
|
|
509
565
|
this.el = el;
|
|
510
566
|
this.display = this.style.display;
|
|
511
567
|
}
|
|
568
|
+
/* Inputs */
|
|
512
569
|
set sfcIf(show) {
|
|
513
570
|
this.style.display = show
|
|
514
571
|
? this.display || UIConstants.CSS_INITIAL
|
|
515
572
|
: UIConstants.CSS_NONE;
|
|
516
573
|
}
|
|
574
|
+
/* End Inputs */
|
|
575
|
+
/* Properties */
|
|
517
576
|
get style() { return this.el.nativeElement.style; }
|
|
518
577
|
}
|
|
519
578
|
IfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IfDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -799,6 +858,36 @@ function isDateTimeGreatOrEqual(date1, date2) {
|
|
|
799
858
|
return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
|
|
800
859
|
>= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
|
|
801
860
|
}
|
|
861
|
+
/**
|
|
862
|
+
* Return true if first time greater or equal to second time
|
|
863
|
+
* @param date1 First date time value
|
|
864
|
+
* @param date2 Second date time value
|
|
865
|
+
* @returns True if first time greater or equal to second time
|
|
866
|
+
*/
|
|
867
|
+
function isTimeGreatOrEqual(date1, date2) {
|
|
868
|
+
return new Date(0, 0, 0, date1.getHours(), date1.getMinutes())
|
|
869
|
+
>= new Date(0, 0, 0, date2.getHours(), date2.getMinutes());
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Return true if first time less or equal to second time
|
|
873
|
+
* @param date1 First date time value
|
|
874
|
+
* @param date2 Second date time value
|
|
875
|
+
* @returns True if first time less or equal to second time
|
|
876
|
+
*/
|
|
877
|
+
function isDateTimeLessOrEqual(date1, date2) {
|
|
878
|
+
return new Date(0, 0, 0, date1.getHours(), date1.getMinutes())
|
|
879
|
+
<= new Date(0, 0, 0, date2.getHours(), date2.getMinutes());
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Return true if first time less or equal to second time
|
|
883
|
+
* @param date1 First date time value
|
|
884
|
+
* @param date2 Second date time value
|
|
885
|
+
* @returns True if first time less or equal to second time
|
|
886
|
+
*/
|
|
887
|
+
function isTimeLessOrEqual(date1, date2) {
|
|
888
|
+
return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate(), date1.getHours(), date1.getMinutes())
|
|
889
|
+
<= new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes());
|
|
890
|
+
}
|
|
802
891
|
/**
|
|
803
892
|
* Convert UTC date to local
|
|
804
893
|
* @param date Date value
|
|
@@ -834,6 +923,8 @@ function convertDateToTimestamp(date, locale = DateTimeConstants.DEFAULT_LOCALE)
|
|
|
834
923
|
* @returns Age
|
|
835
924
|
*/
|
|
836
925
|
function getAge(birthdate) {
|
|
926
|
+
if (!birthdate)
|
|
927
|
+
return null;
|
|
837
928
|
const now = new Date();
|
|
838
929
|
let age = now.getFullYear() - birthdate.getFullYear();
|
|
839
930
|
const monthDifference = now.getMonth() - birthdate.getMonth();
|
|
@@ -894,11 +985,6 @@ function removePropertyFromObject(obj, property) {
|
|
|
894
985
|
delete obj[property];
|
|
895
986
|
}
|
|
896
987
|
}
|
|
897
|
-
/**
|
|
898
|
-
* Deep merge object with others
|
|
899
|
-
* @param target Object to merge
|
|
900
|
-
* @param sources
|
|
901
|
-
*/
|
|
902
988
|
/**
|
|
903
989
|
* Deep merge object with others
|
|
904
990
|
* @param target Object to merge
|
|
@@ -931,12 +1017,20 @@ function mergeDeep(target, ...sources) {
|
|
|
931
1017
|
const nameof = (name) => name;
|
|
932
1018
|
/**
|
|
933
1019
|
* Determines if the input is a Number or something that can be coerced to a Number
|
|
934
|
-
* @param
|
|
1020
|
+
* @param number The input to be tested
|
|
935
1021
|
* @returns - An indication if the input is a Number or can be coerced to a Number
|
|
936
1022
|
*/
|
|
937
1023
|
function isNumeric(number) {
|
|
938
1024
|
return !isNaN(parseFloat(number));
|
|
939
1025
|
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Determines if the input is a string
|
|
1028
|
+
* @param value The input to be tested
|
|
1029
|
+
* @returns An indication if the input is a string
|
|
1030
|
+
*/
|
|
1031
|
+
function isString(value) {
|
|
1032
|
+
return typeof value === 'string';
|
|
1033
|
+
}
|
|
940
1034
|
/**
|
|
941
1035
|
* Return true if current browser is Chrome
|
|
942
1036
|
* @returns If current browser is Chrome
|
|
@@ -999,6 +1093,11 @@ function isEqual(obj1, obj2) {
|
|
|
999
1093
|
// If no errors, return true
|
|
1000
1094
|
return true;
|
|
1001
1095
|
}
|
|
1096
|
+
function areFilesEqual() {
|
|
1097
|
+
return obj1.lastModified === obj2.lastModified
|
|
1098
|
+
&& obj1.size === obj2.size
|
|
1099
|
+
&& obj1.type === obj2.type;
|
|
1100
|
+
}
|
|
1002
1101
|
function areFunctionsEqual() {
|
|
1003
1102
|
return obj1.toString() === obj2.toString();
|
|
1004
1103
|
}
|
|
@@ -1018,6 +1117,8 @@ function isEqual(obj1, obj2) {
|
|
|
1018
1117
|
return areArraysEqual();
|
|
1019
1118
|
if (type === 'date')
|
|
1020
1119
|
return areDatesEqual();
|
|
1120
|
+
if (type === 'file')
|
|
1121
|
+
return areFilesEqual();
|
|
1021
1122
|
if (type === 'object')
|
|
1022
1123
|
return areObjectsEqual();
|
|
1023
1124
|
if (type === 'function')
|
|
@@ -1033,6 +1134,28 @@ function generateGuid() {
|
|
|
1033
1134
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
1034
1135
|
};
|
|
1035
1136
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Check if value is Json parsable string
|
|
1140
|
+
* @param value string value
|
|
1141
|
+
* @returns True if string can be JSON parsed
|
|
1142
|
+
*/
|
|
1143
|
+
function isJsonString(value) {
|
|
1144
|
+
try {
|
|
1145
|
+
const json = JSON.parse(value);
|
|
1146
|
+
return (typeof json === 'object');
|
|
1147
|
+
}
|
|
1148
|
+
catch (e) {
|
|
1149
|
+
return false;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Stop propagation and prevent default
|
|
1154
|
+
* @param event Event object
|
|
1155
|
+
*/
|
|
1156
|
+
function stopAndPreventPropagation(event) {
|
|
1157
|
+
event.preventDefault();
|
|
1158
|
+
event.stopPropagation();
|
|
1036
1159
|
}
|
|
1037
1160
|
|
|
1038
1161
|
/**
|
|
@@ -1266,6 +1389,15 @@ property, value) {
|
|
|
1266
1389
|
&& collection.findIndex(item => item.hasOwnProperty(property)
|
|
1267
1390
|
&& item[property] === value) !== CommonConstants.NOT_FOUND_INDEX;
|
|
1268
1391
|
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Return true if first collection has item in second collection
|
|
1394
|
+
* @param collection1 Array of objects where search
|
|
1395
|
+
* @param collection2 Array of objects where try to find
|
|
1396
|
+
* @returns
|
|
1397
|
+
*/
|
|
1398
|
+
function hasAnyItem(collection1, collection2) {
|
|
1399
|
+
return collection1.some(item => collection2.includes(item));
|
|
1400
|
+
}
|
|
1269
1401
|
/**
|
|
1270
1402
|
* Return value from collection by predicate function
|
|
1271
1403
|
* @param collection Array of items
|
|
@@ -1500,6 +1632,23 @@ function updateItemBy(collection, predicate, newItem) {
|
|
|
1500
1632
|
*/
|
|
1501
1633
|
function getCollectionOrEmpty(collection) {
|
|
1502
1634
|
return isDefined(collection) ? collection : [];
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Check if arrays are equal
|
|
1638
|
+
* @param a First array
|
|
1639
|
+
* @param b Second array
|
|
1640
|
+
* @returns True if arrays are equal
|
|
1641
|
+
*/
|
|
1642
|
+
function isArraysEquals(a, b) {
|
|
1643
|
+
if (a.length !== b.length)
|
|
1644
|
+
return false;
|
|
1645
|
+
a.sort();
|
|
1646
|
+
b.sort();
|
|
1647
|
+
for (let i = 0; i < a.length; i++) {
|
|
1648
|
+
if (a[i] !== b[i])
|
|
1649
|
+
return false;
|
|
1650
|
+
}
|
|
1651
|
+
return true;
|
|
1503
1652
|
}
|
|
1504
1653
|
|
|
1505
1654
|
/**
|
|
@@ -1514,6 +1663,8 @@ function buildHttpParams(value) {
|
|
|
1514
1663
|
return httpParams;
|
|
1515
1664
|
function _build(params, value, path, isArray = false) {
|
|
1516
1665
|
const ARRAY_PART = ']';
|
|
1666
|
+
if (!value)
|
|
1667
|
+
return;
|
|
1517
1668
|
Object.keys(value).forEach(key => {
|
|
1518
1669
|
if (value[key] instanceof Array) {
|
|
1519
1670
|
_build(params, value[key], `${path}${key}[`, true);
|
|
@@ -1915,11 +2066,10 @@ SwitchMultiCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
1915
2066
|
SwitchMultiCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, name: "sfcSwitchMultiCase" });
|
|
1916
2067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SwitchMultiCasePipe, decorators: [{
|
|
1917
2068
|
type: Pipe,
|
|
1918
|
-
args: [{
|
|
1919
|
-
name: 'sfcSwitchMultiCase'
|
|
1920
|
-
}]
|
|
2069
|
+
args: [{ name: 'sfcSwitchMultiCase' }]
|
|
1921
2070
|
}] });
|
|
1922
2071
|
|
|
2072
|
+
// This pipe has "pure: false" (impure pipe) which has huge impact on performance!
|
|
1923
2073
|
class SortByPipe {
|
|
1924
2074
|
transform(value, path, direction = SortingDirection.Ascending) {
|
|
1925
2075
|
if (!any(value)) {
|
|
@@ -1935,10 +2085,22 @@ class SortByPipe {
|
|
|
1935
2085
|
}
|
|
1936
2086
|
}
|
|
1937
2087
|
SortByPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1938
|
-
SortByPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, name: "sfcSortBy" });
|
|
2088
|
+
SortByPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, name: "sfcSortBy", pure: false });
|
|
1939
2089
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortByPipe, decorators: [{
|
|
1940
2090
|
type: Pipe,
|
|
1941
|
-
args: [{ name: 'sfcSortBy' }]
|
|
2091
|
+
args: [{ name: 'sfcSortBy', pure: false }]
|
|
2092
|
+
}] });
|
|
2093
|
+
|
|
2094
|
+
class RepeatPipe {
|
|
2095
|
+
transform(value) {
|
|
2096
|
+
return [].constructor(value);
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
RepeatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RepeatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2100
|
+
RepeatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: RepeatPipe, name: "sfcRepeat" });
|
|
2101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RepeatPipe, decorators: [{
|
|
2102
|
+
type: Pipe,
|
|
2103
|
+
args: [{ name: 'sfcRepeat' }]
|
|
1942
2104
|
}] });
|
|
1943
2105
|
|
|
1944
2106
|
var ButtonType;
|
|
@@ -2245,21 +2407,25 @@ var ModalTemplate;
|
|
|
2245
2407
|
|
|
2246
2408
|
class ModalService {
|
|
2247
2409
|
constructor() {
|
|
2248
|
-
this.
|
|
2249
|
-
this.
|
|
2410
|
+
this.model = new ObservableModel();
|
|
2411
|
+
this.isOpen = false;
|
|
2250
2412
|
}
|
|
2251
|
-
|
|
2252
|
-
|
|
2413
|
+
/* Properties */
|
|
2414
|
+
get modal$() { return this.model.value$; }
|
|
2415
|
+
/* End Properties */
|
|
2416
|
+
toggle(id, args) {
|
|
2417
|
+
this.emit({ open: !this.isOpen, id: id, args: args });
|
|
2253
2418
|
}
|
|
2254
|
-
|
|
2255
|
-
this.
|
|
2419
|
+
close(id, args) {
|
|
2420
|
+
this.emit({ open: false, id: id, args: args });
|
|
2256
2421
|
}
|
|
2257
|
-
|
|
2258
|
-
this.
|
|
2422
|
+
open(id, args) {
|
|
2423
|
+
this.emit({ open: true, id: id, args: args });
|
|
2259
2424
|
}
|
|
2260
|
-
|
|
2261
|
-
this.args = args;
|
|
2262
|
-
this.
|
|
2425
|
+
emit(event) {
|
|
2426
|
+
this.args = event.args;
|
|
2427
|
+
this.isOpen = event.open;
|
|
2428
|
+
this.model.subject.next(event);
|
|
2263
2429
|
}
|
|
2264
2430
|
}
|
|
2265
2431
|
ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -2271,6 +2437,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2271
2437
|
}]
|
|
2272
2438
|
}] });
|
|
2273
2439
|
|
|
2440
|
+
class ModalOpenDirective {
|
|
2441
|
+
/* End Subscriptions */
|
|
2442
|
+
constructor(templateRef, viewContainer, modalService) {
|
|
2443
|
+
this.templateRef = templateRef;
|
|
2444
|
+
this.viewContainer = viewContainer;
|
|
2445
|
+
this.modalService = modalService;
|
|
2446
|
+
this._openSubscription = this.modalService.modal$
|
|
2447
|
+
.pipe(filter((event) => event.id === this.id))
|
|
2448
|
+
.subscribe((event) => {
|
|
2449
|
+
this.viewContainer.clear();
|
|
2450
|
+
if (event.open)
|
|
2451
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
2452
|
+
});
|
|
2453
|
+
}
|
|
2454
|
+
ngOnDestroy() {
|
|
2455
|
+
this._openSubscription.unsubscribe();
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
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 });
|
|
2459
|
+
ModalOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenDirective, selector: "[sfcModalOpen]", inputs: { id: ["sfcModalOpen", "id"] }, ngImport: i0 });
|
|
2460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, decorators: [{
|
|
2461
|
+
type: Directive,
|
|
2462
|
+
args: [{
|
|
2463
|
+
selector: '[sfcModalOpen]'
|
|
2464
|
+
}]
|
|
2465
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { id: [{
|
|
2466
|
+
type: Input,
|
|
2467
|
+
args: ['sfcModalOpen']
|
|
2468
|
+
}] } });
|
|
2469
|
+
|
|
2470
|
+
class ModalOpenOnClickDirective {
|
|
2471
|
+
/* End Subscriptions */
|
|
2472
|
+
constructor(templateRef, viewContainer, modalService) {
|
|
2473
|
+
this.templateRef = templateRef;
|
|
2474
|
+
this.viewContainer = viewContainer;
|
|
2475
|
+
this.modalService = modalService;
|
|
2476
|
+
this.elements = [];
|
|
2477
|
+
this.clickHandler = (() => {
|
|
2478
|
+
this.viewContainer.clear();
|
|
2479
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
2480
|
+
this.modalService.toggle(this.id);
|
|
2481
|
+
}).bind(this);
|
|
2482
|
+
}
|
|
2483
|
+
/* Inputs */
|
|
2484
|
+
set modalOpenOnClick(model) {
|
|
2485
|
+
if (!isDefined(model.elements) || !isDefined(model.id))
|
|
2486
|
+
return;
|
|
2487
|
+
this._id = model.id;
|
|
2488
|
+
if (model.elements instanceof HTMLElement)
|
|
2489
|
+
this.elements = [model.elements];
|
|
2490
|
+
else
|
|
2491
|
+
this.elements = model.elements;
|
|
2492
|
+
this.elements.forEach(el => el.addEventListener('click', this.clickHandler));
|
|
2493
|
+
}
|
|
2494
|
+
get id() { return this._id; }
|
|
2495
|
+
ngOnInit() {
|
|
2496
|
+
this._closeSubscription = this.modalService.modal$
|
|
2497
|
+
.pipe(filter((event) => !event.open && this.id === event.id))
|
|
2498
|
+
.subscribe(() => this.viewContainer.clear());
|
|
2499
|
+
}
|
|
2500
|
+
ngOnDestroy() {
|
|
2501
|
+
this._closeSubscription?.unsubscribe();
|
|
2502
|
+
this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
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 });
|
|
2506
|
+
ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
|
|
2507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
|
|
2508
|
+
type: Directive,
|
|
2509
|
+
args: [{
|
|
2510
|
+
selector: '[sfcModalOpenOnClick]'
|
|
2511
|
+
}]
|
|
2512
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { modalOpenOnClick: [{
|
|
2513
|
+
type: Input,
|
|
2514
|
+
args: ['sfcModalOpenOnClick']
|
|
2515
|
+
}] } });
|
|
2516
|
+
|
|
2274
2517
|
class TemplateContentComponent {
|
|
2275
2518
|
get showDefault() {
|
|
2276
2519
|
return !isDefined(this.referenceContent)
|
|
@@ -2298,6 +2541,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2298
2541
|
type: Input
|
|
2299
2542
|
}] } });
|
|
2300
2543
|
|
|
2544
|
+
class DefaultModalHeaderConstants {
|
|
2545
|
+
}
|
|
2546
|
+
DefaultModalHeaderConstants.DEFAULT_MODAL_HEADER_MODEL = {
|
|
2547
|
+
icon: faWindowRestore,
|
|
2548
|
+
showCloseIcon: true,
|
|
2549
|
+
text: 'Modal'
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2301
2552
|
class CloseComponent {
|
|
2302
2553
|
constructor() {
|
|
2303
2554
|
this.faTimes = faTimes;
|
|
@@ -2311,60 +2562,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2311
2562
|
}] });
|
|
2312
2563
|
|
|
2313
2564
|
class DefaultModalHeaderComponent {
|
|
2565
|
+
/* End Properties */
|
|
2314
2566
|
constructor(modalService) {
|
|
2315
2567
|
this.modalService = modalService;
|
|
2316
|
-
this.DEFAULT_MODAL_HEADER_MODEL = {
|
|
2317
|
-
icon: faWindowRestore,
|
|
2318
|
-
showCloseIcon: true,
|
|
2319
|
-
text: 'Modal'
|
|
2320
|
-
};
|
|
2321
|
-
}
|
|
2322
|
-
get icon() {
|
|
2323
|
-
return this.model?.icon || faWindowRestore;
|
|
2324
2568
|
}
|
|
2569
|
+
/* End Inputs */
|
|
2570
|
+
/* Properties */
|
|
2571
|
+
get icon() { return this.model?.icon || faWindowRestore; }
|
|
2325
2572
|
ngOnInit() {
|
|
2326
2573
|
if (!isDefined(this.model))
|
|
2327
|
-
this.model =
|
|
2574
|
+
this.model = DefaultModalHeaderConstants.DEFAULT_MODAL_HEADER_MODEL;
|
|
2328
2575
|
}
|
|
2329
2576
|
onClose() {
|
|
2330
|
-
this.modalService.close();
|
|
2577
|
+
this.modalService.close(this.id);
|
|
2331
2578
|
}
|
|
2332
2579
|
}
|
|
2333
2580
|
DefaultModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalHeaderComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2334
|
-
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" }] });
|
|
2581
|
+
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" }] });
|
|
2335
2582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalHeaderComponent, decorators: [{
|
|
2336
2583
|
type: Component,
|
|
2337
|
-
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"] }]
|
|
2338
|
-
}], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: {
|
|
2584
|
+
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"] }]
|
|
2585
|
+
}], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { id: [{
|
|
2586
|
+
type: Input
|
|
2587
|
+
}], model: [{
|
|
2339
2588
|
type: Input
|
|
2340
2589
|
}] } });
|
|
2341
2590
|
|
|
2591
|
+
class DefaultModalFooterConstants {
|
|
2592
|
+
}
|
|
2593
|
+
DefaultModalFooterConstants.BUTTON_CUSTOM_SIZE = 0.9;
|
|
2594
|
+
DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL = {
|
|
2595
|
+
cancelButton: true,
|
|
2596
|
+
applyButton: true,
|
|
2597
|
+
applyButtonText: 'Ok',
|
|
2598
|
+
cancelButtonText: 'Cancel'
|
|
2599
|
+
};
|
|
2600
|
+
|
|
2342
2601
|
class DefaultModalFooterComponent {
|
|
2602
|
+
/* End Inputs */
|
|
2343
2603
|
constructor(modalService) {
|
|
2344
2604
|
this.modalService = modalService;
|
|
2345
|
-
this.DEFAULT_MODAL_FOOTER_MODEL = {
|
|
2346
|
-
cancelButton: true,
|
|
2347
|
-
applyButton: true,
|
|
2348
|
-
applyButtonText: 'Ok',
|
|
2349
|
-
cancelButtonText: 'Cancel'
|
|
2350
|
-
};
|
|
2351
|
-
this.BUTTON_CUSTOM_SIZE = 0.9;
|
|
2352
2605
|
this.ComponentSize = ComponentSize;
|
|
2353
2606
|
this.ButtonType = ButtonType;
|
|
2607
|
+
// component
|
|
2608
|
+
this.Constants = DefaultModalFooterConstants;
|
|
2354
2609
|
}
|
|
2355
2610
|
ngOnInit() {
|
|
2356
2611
|
if (!this.model) {
|
|
2357
|
-
this.model = Object.assign({},
|
|
2612
|
+
this.model = Object.assign({}, DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL);
|
|
2358
2613
|
}
|
|
2359
2614
|
else {
|
|
2360
2615
|
if (isNullOrEmptyString(this.model.applyButtonText))
|
|
2361
|
-
this.model.applyButtonText =
|
|
2616
|
+
this.model.applyButtonText = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.applyButtonText;
|
|
2362
2617
|
if (isNullOrEmptyString(this.model.cancelButtonText))
|
|
2363
|
-
this.model.cancelButtonText =
|
|
2618
|
+
this.model.cancelButtonText = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.cancelButtonText;
|
|
2364
2619
|
if (!isDefined(this.model.applyButton))
|
|
2365
|
-
this.model.applyButton =
|
|
2620
|
+
this.model.applyButton = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.applyButton;
|
|
2366
2621
|
if (!isDefined(this.model.cancelButton))
|
|
2367
|
-
this.model.cancelButton =
|
|
2622
|
+
this.model.cancelButton = DefaultModalFooterConstants.DEFAULT_MODAL_FOOTER_MODEL.cancelButton;
|
|
2368
2623
|
}
|
|
2369
2624
|
}
|
|
2370
2625
|
onButtonClick(isCancelButton = false) {
|
|
@@ -2378,21 +2633,27 @@ class DefaultModalFooterComponent {
|
|
|
2378
2633
|
return this.model.onApply(this.modalService.args);
|
|
2379
2634
|
}
|
|
2380
2635
|
}
|
|
2381
|
-
this.modalService.toggle();
|
|
2636
|
+
this.modalService.toggle(this.id);
|
|
2382
2637
|
}
|
|
2383
2638
|
}
|
|
2384
2639
|
DefaultModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalFooterComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2385
|
-
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\"
|
|
2640
|
+
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"] }] });
|
|
2386
2641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DefaultModalFooterComponent, decorators: [{
|
|
2387
2642
|
type: Component,
|
|
2388
|
-
args: [{ selector: 'sfc-default-modal-footer', template: "<div class=\"container\">\r\n <sfc-button *ngIf=\"model.applyButton\" [sfcComponentSize] [customSize]=\"BUTTON_CUSTOM_SIZE\"
|
|
2389
|
-
}], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: {
|
|
2643
|
+
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"] }]
|
|
2644
|
+
}], ctorParameters: function () { return [{ type: ModalService }]; }, propDecorators: { id: [{
|
|
2645
|
+
type: Input
|
|
2646
|
+
}], model: [{
|
|
2390
2647
|
type: Input
|
|
2391
2648
|
}] } });
|
|
2392
2649
|
|
|
2393
2650
|
class ModalComponent {
|
|
2394
|
-
|
|
2651
|
+
/* End Properties */
|
|
2652
|
+
constructor(modalService, document, openDirective, openOnClickDirective) {
|
|
2395
2653
|
this.modalService = modalService;
|
|
2654
|
+
this.document = document;
|
|
2655
|
+
this.openDirective = openDirective;
|
|
2656
|
+
this.openOnClickDirective = openOnClickDirective;
|
|
2396
2657
|
this.ModalTemplate = ModalTemplate;
|
|
2397
2658
|
// End Defaults
|
|
2398
2659
|
this.hideOnEsc = true;
|
|
@@ -2401,17 +2662,32 @@ class ModalComponent {
|
|
|
2401
2662
|
this.showHeader = true;
|
|
2402
2663
|
// hide modal footer (even default)
|
|
2403
2664
|
this.showFooter = true;
|
|
2665
|
+
// remember body overflow
|
|
2666
|
+
this.bodyOverflow = this.document.body.style.overflow;
|
|
2404
2667
|
}
|
|
2405
2668
|
onEscapeKeyDownHandler() {
|
|
2406
2669
|
if (this.hideOnEsc)
|
|
2407
2670
|
this.close();
|
|
2408
2671
|
}
|
|
2672
|
+
/* Properties */
|
|
2673
|
+
get id() {
|
|
2674
|
+
return isDefined(this.openOnClickDirective)
|
|
2675
|
+
? this.openOnClickDirective.id : this.openDirective.id;
|
|
2676
|
+
}
|
|
2677
|
+
ngAfterViewInit() {
|
|
2678
|
+
// set body overflow to hidden, to prevent page scrolling
|
|
2679
|
+
this.document.body.style.overflow = UIConstants.CSS_VISIBILITY_HIDDEN;
|
|
2680
|
+
}
|
|
2681
|
+
ngOnDestroy() {
|
|
2682
|
+
// return back body overflow value when modal has closed
|
|
2683
|
+
this.document.body.style.overflow = this.bodyOverflow;
|
|
2684
|
+
}
|
|
2409
2685
|
close() {
|
|
2410
|
-
this.modalService.close();
|
|
2686
|
+
this.modalService.close(this.id);
|
|
2411
2687
|
}
|
|
2412
2688
|
}
|
|
2413
|
-
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2414
|
-
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
|
|
2689
|
+
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 });
|
|
2690
|
+
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: [
|
|
2415
2691
|
trigger('hideOverlay', [
|
|
2416
2692
|
state('initial', style({ opacity: 1, visibility: 'visible' })),
|
|
2417
2693
|
state('void', style({ opacity: 0, visibility: 'hidden' })),
|
|
@@ -2456,8 +2732,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2456
2732
|
state('void', style({ opacity: 0, visibility: 'hidden', transform: 'scale(1.2)' })),
|
|
2457
2733
|
transition('* => void', animate('400ms cubic-bezier(.55, 0, .1, 1)'))
|
|
2458
2734
|
])
|
|
2459
|
-
], 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
|
|
2460
|
-
}], ctorParameters: function () { return [{ type: ModalService }
|
|
2735
|
+
], 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"] }]
|
|
2736
|
+
}], ctorParameters: function () { return [{ type: ModalService }, { type: Document, decorators: [{
|
|
2737
|
+
type: Inject,
|
|
2738
|
+
args: [DOCUMENT]
|
|
2739
|
+
}] }, { type: ModalOpenDirective, decorators: [{
|
|
2740
|
+
type: Optional
|
|
2741
|
+
}] }, { type: ModalOpenOnClickDirective, decorators: [{
|
|
2742
|
+
type: Optional
|
|
2743
|
+
}] }]; }, propDecorators: { body: [{
|
|
2461
2744
|
type: Input
|
|
2462
2745
|
}], header: [{
|
|
2463
2746
|
type: Input
|
|
@@ -2483,76 +2766,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2483
2766
|
args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
|
|
2484
2767
|
}] } });
|
|
2485
2768
|
|
|
2486
|
-
class ModalOpenOnClickDirective {
|
|
2487
|
-
constructor(templateRef, viewContainer, modalService) {
|
|
2488
|
-
this.templateRef = templateRef;
|
|
2489
|
-
this.viewContainer = viewContainer;
|
|
2490
|
-
this.modalService = modalService;
|
|
2491
|
-
this.clickHandler = (() => {
|
|
2492
|
-
this.viewContainer.clear();
|
|
2493
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
2494
|
-
this.modalService.toggle();
|
|
2495
|
-
}).bind(this);
|
|
2496
|
-
this.elements = [];
|
|
2497
|
-
}
|
|
2498
|
-
set modalOpenOnClick(elements) {
|
|
2499
|
-
if (!isDefined(elements))
|
|
2500
|
-
return;
|
|
2501
|
-
if (elements instanceof HTMLElement)
|
|
2502
|
-
this.elements = [elements];
|
|
2503
|
-
else
|
|
2504
|
-
this.elements = elements;
|
|
2505
|
-
this.elements.forEach(el => {
|
|
2506
|
-
el.addEventListener('click', this.clickHandler);
|
|
2507
|
-
});
|
|
2508
|
-
}
|
|
2509
|
-
ngOnInit() {
|
|
2510
|
-
this._closeSubscription = this.modalService.modal$
|
|
2511
|
-
.pipe(filter((event) => !event.open))
|
|
2512
|
-
.subscribe(() => this.viewContainer.clear());
|
|
2513
|
-
}
|
|
2514
|
-
ngOnDestroy() {
|
|
2515
|
-
this._closeSubscription?.unsubscribe();
|
|
2516
|
-
this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
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 });
|
|
2520
|
-
ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
|
|
2521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
|
|
2522
|
-
type: Directive,
|
|
2523
|
-
args: [{
|
|
2524
|
-
selector: '[sfcModalOpenOnClick]'
|
|
2525
|
-
}]
|
|
2526
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { modalOpenOnClick: [{
|
|
2527
|
-
type: Input,
|
|
2528
|
-
args: ['sfcModalOpenOnClick']
|
|
2529
|
-
}] } });
|
|
2530
|
-
|
|
2531
|
-
class ModalOpenDirective {
|
|
2532
|
-
constructor(templateRef, viewContainer, modalService) {
|
|
2533
|
-
this.templateRef = templateRef;
|
|
2534
|
-
this.viewContainer = viewContainer;
|
|
2535
|
-
this.modalService = modalService;
|
|
2536
|
-
this._openSubscription = this.modalService.modal$
|
|
2537
|
-
.subscribe((event) => {
|
|
2538
|
-
this.viewContainer.clear();
|
|
2539
|
-
if (event.open)
|
|
2540
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
2541
|
-
});
|
|
2542
|
-
}
|
|
2543
|
-
ngOnDestroy() {
|
|
2544
|
-
this._openSubscription.unsubscribe();
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
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 });
|
|
2548
|
-
ModalOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalOpenDirective, selector: "[sfcModalOpen]", ngImport: i0 });
|
|
2549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalOpenDirective, decorators: [{
|
|
2550
|
-
type: Directive,
|
|
2551
|
-
args: [{
|
|
2552
|
-
selector: '[sfcModalOpen]'
|
|
2553
|
-
}]
|
|
2554
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ModalService }]; } });
|
|
2555
|
-
|
|
2556
2769
|
class HamburgerBaseComponent {
|
|
2557
2770
|
constructor() {
|
|
2558
2771
|
this.open = false;
|
|
@@ -2651,13 +2864,17 @@ class ToggleSwitcherComponent {
|
|
|
2651
2864
|
constructor() {
|
|
2652
2865
|
this.active = false;
|
|
2653
2866
|
this.disabled = false;
|
|
2654
|
-
this.
|
|
2867
|
+
this.toggle = new EventEmitter(this.active);
|
|
2868
|
+
this.onClick = () => {
|
|
2869
|
+
this.active = !this.active;
|
|
2870
|
+
this.toggle.emit(this.active);
|
|
2871
|
+
};
|
|
2655
2872
|
this.leftModel = { label: 'Left' };
|
|
2656
2873
|
this.rightModel = { label: 'Right' };
|
|
2657
2874
|
}
|
|
2658
2875
|
}
|
|
2659
2876
|
ToggleSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToggleSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2660
|
-
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"] }] });
|
|
2877
|
+
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"] }] });
|
|
2661
2878
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToggleSwitcherComponent, decorators: [{
|
|
2662
2879
|
type: Component,
|
|
2663
2880
|
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"] }]
|
|
@@ -2675,6 +2892,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2675
2892
|
type: Input
|
|
2676
2893
|
}], rightModel: [{
|
|
2677
2894
|
type: Input
|
|
2895
|
+
}], toggle: [{
|
|
2896
|
+
type: Output
|
|
2678
2897
|
}], onClick: [{
|
|
2679
2898
|
type: HostListener,
|
|
2680
2899
|
args: ['click']
|
|
@@ -2694,12 +2913,13 @@ class CheckmarkComponent {
|
|
|
2694
2913
|
this.icon = faCheck;
|
|
2695
2914
|
this.type = CheckmarkType.Rounded;
|
|
2696
2915
|
}
|
|
2916
|
+
onClick() { this.active = !this.active; }
|
|
2697
2917
|
}
|
|
2698
2918
|
CheckmarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckmarkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2699
|
-
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;
|
|
2919
|
+
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"] }] });
|
|
2700
2920
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckmarkComponent, decorators: [{
|
|
2701
2921
|
type: Component,
|
|
2702
|
-
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;
|
|
2922
|
+
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"] }]
|
|
2703
2923
|
}], propDecorators: { active: [{
|
|
2704
2924
|
type: Input
|
|
2705
2925
|
}, {
|
|
@@ -2717,6 +2937,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2717
2937
|
}, {
|
|
2718
2938
|
type: HostBinding,
|
|
2719
2939
|
args: ['class']
|
|
2940
|
+
}], onClick: [{
|
|
2941
|
+
type: HostListener,
|
|
2942
|
+
args: ['click']
|
|
2720
2943
|
}] } });
|
|
2721
2944
|
|
|
2722
2945
|
var _a;
|
|
@@ -2826,6 +3049,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2826
3049
|
|
|
2827
3050
|
var LoadContainerLoadType;
|
|
2828
3051
|
(function (LoadContainerLoadType) {
|
|
3052
|
+
LoadContainerLoadType["Common"] = "common";
|
|
2829
3053
|
LoadContainerLoadType["Button"] = "button";
|
|
2830
3054
|
LoadContainerLoadType["Scroll"] = "scroll";
|
|
2831
3055
|
LoadContainerLoadType["Pagination"] = "pagination";
|
|
@@ -2850,6 +3074,7 @@ var LoadContainerType;
|
|
|
2850
3074
|
(function (LoadContainerType) {
|
|
2851
3075
|
LoadContainerType["Dropdown"] = "dropdown";
|
|
2852
3076
|
LoadContainerType["Table"] = "table";
|
|
3077
|
+
LoadContainerType["Container"] = "container";
|
|
2853
3078
|
})(LoadContainerType || (LoadContainerType = {}));
|
|
2854
3079
|
|
|
2855
3080
|
class LoadMoreButtonComponent {
|
|
@@ -2877,11 +3102,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2877
3102
|
}] } });
|
|
2878
3103
|
|
|
2879
3104
|
class LoadContainerComponent {
|
|
2880
|
-
constructor(loaderService, loadMoreService, paginationService, sortingService) {
|
|
3105
|
+
constructor(loaderService, loadMoreService, paginationService, sortingService, reloadService) {
|
|
2881
3106
|
this.loaderService = loaderService;
|
|
2882
3107
|
this.loadMoreService = loadMoreService;
|
|
2883
3108
|
this.paginationService = paginationService;
|
|
2884
3109
|
this.sortingService = sortingService;
|
|
3110
|
+
this.reloadService = reloadService;
|
|
2885
3111
|
this.ComponentSize = ComponentSize;
|
|
2886
3112
|
this.Position = Position;
|
|
2887
3113
|
this.type = LoadContainerType.Dropdown;
|
|
@@ -2936,7 +3162,7 @@ class LoadContainerComponent {
|
|
|
2936
3162
|
this.source == LoadContainerChangesSource.Page ||
|
|
2937
3163
|
this.source == LoadContainerChangesSource.Data;
|
|
2938
3164
|
}
|
|
2939
|
-
get pagination() { return this.model.loadType == LoadContainerLoadType.Pagination; }
|
|
3165
|
+
get pagination() { return this.model.loadType == LoadContainerLoadType.Pagination && isDefined(this.model.pagination); }
|
|
2940
3166
|
ngOnDestroy() {
|
|
2941
3167
|
if (this._subscription)
|
|
2942
3168
|
this._subscription.unsubscribe();
|
|
@@ -2966,11 +3192,14 @@ class LoadContainerComponent {
|
|
|
2966
3192
|
subscribe() {
|
|
2967
3193
|
if (!this.model)
|
|
2968
3194
|
return;
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
const
|
|
3195
|
+
this.paginationService.pageValue = this.model.pagination?.page || PaginationConstants.DEFAULT_PAGINATION.page;
|
|
3196
|
+
if (!this.model.predicate$) {
|
|
3197
|
+
this.model.predicate$ = EMPTY.pipe(startWith(null));
|
|
3198
|
+
}
|
|
3199
|
+
const predicate$ = combineLatest([
|
|
3200
|
+
this.model.predicate$,
|
|
3201
|
+
this.reloadService.reload$.pipe(startWith(null))
|
|
3202
|
+
]).pipe(map(([model, _]) => model)), parameters$ = this.buildParameters(predicate$), data$ = isDefined(this.model.loader)
|
|
2974
3203
|
? this.buildDynamic(parameters$, this.model.loader)
|
|
2975
3204
|
: this.buildStatic(parameters$, this.model);
|
|
2976
3205
|
if (isDefined(this._subscription))
|
|
@@ -2981,8 +3210,8 @@ class LoadContainerComponent {
|
|
|
2981
3210
|
});
|
|
2982
3211
|
}
|
|
2983
3212
|
buildParameters(predicate$) {
|
|
2984
|
-
const parameters$ =
|
|
2985
|
-
if (this.source != LoadContainerChangesSource.Initial)
|
|
3213
|
+
const parameters$ = predicate$.pipe(tap((params) => {
|
|
3214
|
+
if (this.source != LoadContainerChangesSource.Initial && !params?.reload)
|
|
2986
3215
|
this.resetParameters();
|
|
2987
3216
|
this.source = LoadContainerChangesSource.Predicate;
|
|
2988
3217
|
this.predicateChanged = true;
|
|
@@ -3014,8 +3243,8 @@ class LoadContainerComponent {
|
|
|
3014
3243
|
parameters = { params: parameters.params, page: this.page, sorting: parameters.sorting };
|
|
3015
3244
|
}
|
|
3016
3245
|
const filtered = model.filter ? model.filter(items, parameters) : items, sorted = parameters.sorting ? sortBy([...filtered], parameters.sorting.id, parameters.sorting.direction) : filtered, data = sorted ? {
|
|
3017
|
-
items: skip(sorted, parameters.page, this.model.pagination?.size),
|
|
3018
|
-
next: parameters.page < Math.ceil(sorted.length / this.model.pagination?.size),
|
|
3246
|
+
items: this.model.pagination ? skip(sorted, parameters.page, this.model.pagination?.size) : sorted,
|
|
3247
|
+
next: this.model.pagination ? parameters.page < Math.ceil(sorted.length / this.model.pagination?.size) : false,
|
|
3019
3248
|
reset: this.reset,
|
|
3020
3249
|
total: sorted.length,
|
|
3021
3250
|
page: parameters.page
|
|
@@ -3032,12 +3261,12 @@ class LoadContainerComponent {
|
|
|
3032
3261
|
this.loadMoreService.reset();
|
|
3033
3262
|
}
|
|
3034
3263
|
}
|
|
3035
|
-
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 });
|
|
3036
|
-
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" }] });
|
|
3264
|
+
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 });
|
|
3265
|
+
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" }] });
|
|
3037
3266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadContainerComponent, decorators: [{
|
|
3038
3267
|
type: Component,
|
|
3039
|
-
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"] }]
|
|
3040
|
-
}], ctorParameters: function () { return [{ type: LoaderService }, { type: LoadMoreService }, { type: PaginationService }, { type: SortingService }]; }, propDecorators: { id: [{
|
|
3268
|
+
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"] }]
|
|
3269
|
+
}], ctorParameters: function () { return [{ type: LoaderService }, { type: LoadMoreService }, { type: PaginationService }, { type: SortingService }, { type: ReloadService }]; }, propDecorators: { id: [{
|
|
3041
3270
|
type: Input
|
|
3042
3271
|
}], type: [{
|
|
3043
3272
|
type: Input
|
|
@@ -3185,6 +3414,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3185
3414
|
args: ['click']
|
|
3186
3415
|
}] } });
|
|
3187
3416
|
|
|
3417
|
+
class MessageComponent {
|
|
3418
|
+
constructor() {
|
|
3419
|
+
this.type = NotificationType.Info;
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3423
|
+
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"] });
|
|
3424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MessageComponent, decorators: [{
|
|
3425
|
+
type: Component,
|
|
3426
|
+
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"] }]
|
|
3427
|
+
}], propDecorators: { message: [{
|
|
3428
|
+
type: Input
|
|
3429
|
+
}], type: [{
|
|
3430
|
+
type: Input
|
|
3431
|
+
}, {
|
|
3432
|
+
type: HostBinding,
|
|
3433
|
+
args: ['class']
|
|
3434
|
+
}] } });
|
|
3435
|
+
|
|
3188
3436
|
class NgxSfcCommonModule {
|
|
3189
3437
|
}
|
|
3190
3438
|
NgxSfcCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -3223,6 +3471,7 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
3223
3471
|
CollapseExpandComponent,
|
|
3224
3472
|
CollapseExpandContainerComponent,
|
|
3225
3473
|
ToggleComponent,
|
|
3474
|
+
MessageComponent,
|
|
3226
3475
|
// loaders
|
|
3227
3476
|
BounceLoaderComponent,
|
|
3228
3477
|
CircleLoaderComponent,
|
|
@@ -3234,7 +3483,8 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
3234
3483
|
DefaultModalFooterComponent,
|
|
3235
3484
|
// pipes
|
|
3236
3485
|
SwitchMultiCasePipe,
|
|
3237
|
-
SortByPipe
|
|
3486
|
+
SortByPipe,
|
|
3487
|
+
RepeatPipe], imports: [CommonModule,
|
|
3238
3488
|
FontAwesomeModule], exports: [
|
|
3239
3489
|
// directives
|
|
3240
3490
|
ClickOutsideDirective,
|
|
@@ -3270,6 +3520,7 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
3270
3520
|
CollapseExpandComponent,
|
|
3271
3521
|
CollapseExpandContainerComponent,
|
|
3272
3522
|
ToggleComponent,
|
|
3523
|
+
MessageComponent,
|
|
3273
3524
|
// loaders
|
|
3274
3525
|
BounceLoaderComponent,
|
|
3275
3526
|
CircleLoaderComponent,
|
|
@@ -3281,7 +3532,8 @@ NgxSfcCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
3281
3532
|
DefaultModalFooterComponent,
|
|
3282
3533
|
// pipes
|
|
3283
3534
|
SwitchMultiCasePipe,
|
|
3284
|
-
SortByPipe
|
|
3535
|
+
SortByPipe,
|
|
3536
|
+
RepeatPipe] });
|
|
3285
3537
|
NgxSfcCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS], imports: [CommonModule,
|
|
3286
3538
|
FontAwesomeModule] });
|
|
3287
3539
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxSfcCommonModule, decorators: [{
|
|
@@ -3322,6 +3574,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3322
3574
|
CollapseExpandComponent,
|
|
3323
3575
|
CollapseExpandContainerComponent,
|
|
3324
3576
|
ToggleComponent,
|
|
3577
|
+
MessageComponent,
|
|
3325
3578
|
// loaders
|
|
3326
3579
|
BounceLoaderComponent,
|
|
3327
3580
|
CircleLoaderComponent,
|
|
@@ -3333,7 +3586,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3333
3586
|
DefaultModalFooterComponent,
|
|
3334
3587
|
// pipes
|
|
3335
3588
|
SwitchMultiCasePipe,
|
|
3336
|
-
SortByPipe
|
|
3589
|
+
SortByPipe,
|
|
3590
|
+
RepeatPipe
|
|
3337
3591
|
],
|
|
3338
3592
|
imports: [
|
|
3339
3593
|
CommonModule,
|
|
@@ -3374,6 +3628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3374
3628
|
CollapseExpandComponent,
|
|
3375
3629
|
CollapseExpandContainerComponent,
|
|
3376
3630
|
ToggleComponent,
|
|
3631
|
+
MessageComponent,
|
|
3377
3632
|
// loaders
|
|
3378
3633
|
BounceLoaderComponent,
|
|
3379
3634
|
CircleLoaderComponent,
|
|
@@ -3385,7 +3640,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3385
3640
|
DefaultModalFooterComponent,
|
|
3386
3641
|
// pipes
|
|
3387
3642
|
SwitchMultiCasePipe,
|
|
3388
|
-
SortByPipe
|
|
3643
|
+
SortByPipe,
|
|
3644
|
+
RepeatPipe
|
|
3389
3645
|
],
|
|
3390
3646
|
providers: [DOCUMENT_PROVIDERS, WINDOW_PROVIDERS]
|
|
3391
3647
|
}]
|
|
@@ -3399,5 +3655,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3399
3655
|
* Generated bundle index. Do not edit.
|
|
3400
3656
|
*/
|
|
3401
3657
|
|
|
3402
|
-
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 };
|
|
3658
|
+
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 };
|
|
3403
3659
|
//# sourceMappingURL=ngx-sfc-common.mjs.map
|