diff --git a/dist/esm2020/ngx-awesome-popup/types/confirm-box/core/confirm-box-service.mjs b/dist/esm2020/ngx-awesome-popup/types/confirm-box/core/confirm-box-service.mjs index c654a81..7ee6216 100644 --- a/dist/esm2020/ngx-awesome-popup/types/confirm-box/core/confirm-box-service.mjs +++ b/dist/esm2020/ngx-awesome-popup/types/confirm-box/core/confirm-box-service.mjs @@ -4,11 +4,13 @@ import { DialogInjector } from '../../../core/dialog-injector'; import { ConfirmBoxWrapperComponent } from '../confirm-box-wrapper/confirm-box-wrapper.component'; import { ConfirmBoxeventsController } from './classes'; import * as i0 from "@angular/core"; +import * as i1 from "../../../core/global-config.service"; export class ConfirmBoxService { - constructor(componentFactoryResolver, injector, appRef) { + constructor(componentFactoryResolver, injector, appRef, gConfigService) { this.componentFactoryResolver = componentFactoryResolver; this.injector = injector; this.appRef = appRef; + this.gConfigService = gConfigService; this.confirmBoxComponentRefList = []; } open(_ConfirmBoxBelonging) { @@ -65,12 +67,12 @@ export class ConfirmBoxService { }); } } -ConfirmBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable }); +ConfirmBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ApplicationRef }, { token: i1.GlobalConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); ConfirmBoxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, providedIn: 'root' }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] - }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ApplicationRef }]; } }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1ib3gtc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL25neC1hd2Vzb21lLXBvcHVwL3R5cGVzL2NvbmZpcm0tYm94L2NvcmUvY29uZmlybS1ib3gtc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBS0wsVUFBVSxFQUVYLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxJQUFJLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDM0MsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQy9ELE9BQU8sRUFBRSwwQkFBMEIsRUFBRSxNQUFNLHNEQUFzRCxDQUFDO0FBQ2xHLE9BQU8sRUFBdUIsMEJBQTBCLEVBQUUsTUFBTSxXQUFXLENBQUM7O0FBSzVFLE1BQU0sT0FBTyxpQkFBaUI7SUFHNUIsWUFDVSx3QkFBa0QsRUFDbEQsUUFBa0IsRUFDbEIsTUFBc0I7UUFGdEIsNkJBQXdCLEdBQXhCLHdCQUF3QixDQUEwQjtRQUNsRCxhQUFRLEdBQVIsUUFBUSxDQUFVO1FBQ2xCLFdBQU0sR0FBTixNQUFNLENBQWdCO1FBTGhDLCtCQUEwQixHQUErQyxFQUFFLENBQUM7SUFNekUsQ0FBQztJQUVKLElBQUksQ0FBQyxvQkFBeUM7UUFDNUMsTUFBTSxnQkFBZ0IsR0FBRyxvQkFBb0IsQ0FBQyxnQkFBZ0IsQ0FBQztRQUMvRCxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsZUFBZSxDQUFDLGdCQUFnQixFQUFFLG9CQUFvQix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92ZUZyb21Cb2R5UGFyZW50Q29tcG9uZW50KG1vZGFsSW5kZXgpO1xuICB9XG5cbiAgcmVtb3ZlRnJvbUJvZHlQYXJlbnRDb21wb25lbnQoX0RpYWxvZ0luZGV4OiBudW1iZXIpOiB2b2lkIHtcbiAgICBpZiAoX0RpYWxvZ0luZGV4ID4gLTEpIHtcbiAgICAgIHRoaXMuY29uZmlybUJveENvbXBvbmVudFJlZkxpc3RbX0RpYWxvZ0luZGV4XS5pbnN0YW5jZVxuICAgICAgICAuY2xvc2VQYXJlbnQkKClcbiAgICAgICAgLnBpcGUoXG4gICAgICAgICAgdGFwKGl0ZW0gPT4ge1xuICAgICAgICAgICAgdGhpcy5hcHBSZWYuZGV0YWNoVmlldyh0aGlzLmNvbmZpcm1Cb3hDb21wb25lbnRSZWZMaXN0W19EaWFsb2dJbmRleF0uaG9zdFZpZXcpO1xuICAgICAgICAgICAgdGhpcy5jb25maXJtQm94Q29tcG9uZW50UmVmTGlzdFtfRGlhbG9nSW5kZXhdLmRlc3Ryb3koKTtcbiAgICAgICAgICAgIHRoaXMuY29uZmlybUJveENvbXBvbmVudFJlZkxpc3Quc3BsaWNlKF9EaWFsb2dJbmRleCwgMSk7XG4gICAgICAgICAgfSksXG4gICAgICAgICAgdGFrZSgxKVxuICAgICAgICApXG4gICAgICAgIC5zdWJzY3JpYmUoKTtcbiAgICB9XG4gIH1cblxuICBmaW5kRGlhbG9nSW5kZXgoX0RpYWxvZ1VuaXF1ZUlEOiBzdHJpbmcpOiBudW1iZXIge1xuICAgIHJldHVybiB0aGlzLmNvbmZpcm1Cb3hDb21wb25lbnRSZWZMaXN0LmZpbmRJbmRleChpdGVtID0+IHtcbiAgICAgIHJldHVybiBfRGlhbG9nVW5pcXVlSUQgPT09IGl0ZW0uaW5zdGFuY2UuY29uZmlybUJveEJlbG9uZ2luZy5lbnRpdHlVbmlxdWVJRDtcbiAgICB9KTtcbiAgfVxufVxuIl19 \ No newline at end of file + }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ApplicationRef }, { type: i1.GlobalConfigService }]; } }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1ib3gtc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL25neC1hd2Vzb21lLXBvcHVwL3R5cGVzL2NvbmZpcm0tYm94L2NvcmUvY29uZmlybS1ib3gtc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQTJFLFVBQVUsRUFBWSxNQUFNLGVBQWUsQ0FBQztBQUM5SCxPQUFPLEVBQUUsSUFBSSxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUUvRCxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxzREFBc0QsQ0FBQztBQUNsRyxPQUFPLEVBQXVCLDBCQUEwQixFQUFFLE1BQU0sV0FBVyxDQUFDOzs7QUFLNUUsTUFBTSxPQUFPLGlCQUFpQjtJQUc1QixZQUNVLHdCQUFrRCxFQUNsRCxRQUFrQixFQUNsQixNQUFzQixFQUN0QixjQUFtQztRQUhuQyw2QkFBd0IsR0FBeEIsd0JBQXdCLENBQTBCO1FBQ2xELGFBQVEsR0FBUixRQUFRLENBQVU7UUFDbEIsV0FBTSxHQUFOLE1BQU0sQ0FBZ0I7UUFDdEIsbUJBQWMsR0FBZCxjQUFjLENBQXFCO1FBTjdDLCtCQUEwQixHQUErQyxFQUFFLENBQUM7SUFPekUsQ0FBQztJQUVKLElBQUksQ0FBQyxvQkFBeUM7UUFDNUMsTUFBTSxnQkFBZ0IsR0FBRyxvQkFBb0IsQ0FBQyxnQkFBZ0IsQ0FBQztRQUMvRCxNQUFNLFlBQVksR0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ByZXR1cm4gX0RpYWxvZ1VuaXF1ZUlEID09PSBpdGVtLmluc3RhbmNlLmNvbmZpcm1Cb3hCZWxvbmdpbmcuZW50aXR5VW5pcXVlSUQ7XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/esm2020/ngx-awesome-popup/types/dialog/core/dialog-config.service.mjs b/dist/esm2020/ngx-awesome-popup/types/dialog/core/dialog-config.service.mjs index f0b8e8f..b7eddd1 100644 --- a/dist/esm2020/ngx-awesome-popup/types/dialog/core/dialog-config.service.mjs +++ b/dist/esm2020/ngx-awesome-popup/types/dialog/core/dialog-config.service.mjs @@ -4,9 +4,11 @@ import { DataControl } from '../../../core/global-classes'; import { DefaultLoaderComponent } from '../../../default-loader/default-loader.component'; import { DialogCustomStyles, DialogSettings } from './classes'; import * as i0 from "@angular/core"; +import * as i1 from "../../../core/global-config.service"; export class DialogConfigService { - constructor(userConfig = {}) { + constructor(userConfig = {}, gConfigService) { this.userConfig = userConfig; + this.gConfigService = gConfigService; this.authorConfig = new DialogSettings(); this.productionConfig = new DialogSettings(); const userConfigBase = new DialogSettings(); @@ -32,7 +34,7 @@ export class DialogConfigService { dataControl.copyValuesFrom(userConfig.dialogCoreConfig, this.productionConfig.dialogCoreConfig); } } -DialogConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, deps: [{ token: 'dialogConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); +DialogConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, deps: [{ token: 'dialogConfig' }, { token: i1.GlobalConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); DialogConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, providedIn: 'root' }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, decorators: [{ type: Injectable, @@ -42,5 +44,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor }], ctorParameters: function () { return [{ type: undefined, decorators: [{ type: Inject, args: ['dialogConfig'] - }] }]; } }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWNvbmZpZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbmd4LWF3ZXNvbWUtcG9wdXAvdHlwZXMvZGlhbG9nL2NvcmUvZGlhbG9nLWNvbmZpZy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxtQkFBbUIsRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3ZHLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxrREFBa0QsQ0FBQztBQUMxRixPQUFPLEVBQUUsa0JBQWtCLEVBQUUsY0FBYyxFQUFFLE1BQU0sV0FBVyxDQUFDOztBQU0vRCxNQUFNLE9BQU8sbUJBQW1CO0lBSTlCLFlBRVUsYUFBZ0MsRUFBRTtRQUFsQyxlQUFVLEdBQVYsVUFBVSxDQUF3QjtRQUw1QyxpQkFBWSxHQUFzQixJQUFJLGNBQWMsRUFBRSxDQUFDO1FBQ3ZELHFCQUFnQixHQUFzQixJQUFJLGNBQWMsRUFBRSxDQUFDO1FBT3pELE1BQU0sY0FBYyxHQUFHLElBQUksY0FBYyxFQUFFLENBQUM7UUFDNUMsTUFBTSxXQU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db25maWcuZGlhbG9nQ29yZUNvbmZpZyk7XG5cbiAgICAvLyBidXR0b25zXG4gICAgLyppZih1c2VyQ29uZmlnLmJ1dHRvbnMpe1xuXHRcdFx0dGhpcy5jb25maWcuYnV0dG9ucy5wdXNoKFxuXHRcdFx0XHRuZXcgQnV0dG9uTWFrZXIoJ09rJywgJ29rJywgQnV0dG9uTGF5b3V0RGlzcGxheS5QUklNQVJZKVxuXHRcdFx0XHQsbmV3IEJ1dHRvbk1ha2VyKCdDYW5jZWwnLCAnY2FuY2VsJywgQnV0dG9uTGF5b3V0RGlzcGxheS5TRUNPTkRBUlkpXG5cdFx0XHQpO1xuXHRcdH0qL1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs b/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs index 6f9a041..6fdbfe1 100644 --- a/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs +++ b/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs @@ -986,11 +986,188 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor args: ['elButton'] }] } }); +class ResetGlobalConfig { + constructor(globalConfig) { + const globalConfigService = ServiceLocator.injector.get(GlobalConfigService); + if (globalConfig) { + globalConfigService.setUserColors(globalConfig.colorList); + globalConfigService.setNodeStyles(globalConfigService.productionGlobalConfig.displayColor, true); + } + else { + globalConfigService.resetStyles(); + } + } +} +class GlobalConfigService { + constructor(userGlobalConfig) { + this.userGlobalConfig = userGlobalConfig; + this.authorGlobalConfig = new GlobalConfig(); + this.productionGlobalConfig = new GlobalConfig(); + this.userGeneratedConfig = new GlobalUserConfig(userGlobalConfig); + this.authorGlobalConfig.displayColor.primary = null; + this.authorGlobalConfig.displayColor.secondary = null; + this.authorGlobalConfig.displayColor.success = null; + this.authorGlobalConfig.displayColor.info = null; + this.authorGlobalConfig.displayColor.warning = null; + this.authorGlobalConfig.displayColor.danger = null; + this.authorGlobalConfig.displayColor.light = null; + this.authorGlobalConfig.displayColor.dark = null; + this.authorGlobalConfig.displayColor.customOne = null; + this.authorGlobalConfig.displayColor.customTwo = null; + this.authorGlobalConfig.displayColor.customThree = null; + this.authorGlobalConfig.displayColor.customFour = null; + this.authorGlobalConfig.displayColor.customFive = null; + this.productionGlobalConfig.displayColor = this.authorGlobalConfig.displayColor; + this.setUserColors(this.userGeneratedConfig.colorList); + this.setNodeStyles(this.productionGlobalConfig.displayColor); + } + resetStyles() { + this.setUserColors(this.userGeneratedConfig.colorList); + this.setNodeStyles(this.productionGlobalConfig.displayColor, true); + } + setNodeStyles(_ProductionColorTypes, _Reset = false) { + if (_Reset) { + const evolveDialogStyleNode = document.getElementById('ngx-awesome-popup-glob-styles'); + if (evolveDialogStyleNode) { + evolveDialogStyleNode.remove(); + } + } + this.setToastStyles(); + Object.keys(_ProductionColorTypes).forEach(key => { + if (_ProductionColorTypes[key]) { + this.setButtonStyling(key, _ProductionColorTypes[key]); + this.setIconStyling(key, _ProductionColorTypes[key]); + this.setToastStyling(key, _ProductionColorTypes[key]); + this.setDialogFrame(key, _ProductionColorTypes[key]); + if (ColorVariance[key.toUpperCase()] === ColorVariance.PRIMARY) { + this.getSheet('ngx-awesome-popup-styles').addRule('.ngx-awesome-popup-overlay', `background: ${_ProductionColorTypes[key].TransparentDarkenVariance}!important;`); + } + } + }); + } + setUserColors(_UserColorTypes) { + if (typeof _UserColorTypes !== 'object') { + return; + } + const userKeys = Object.keys(_UserColorTypes); + const productionObjectKeys = Object.keys(this.productionGlobalConfig.displayColor); + userKeys.forEach(key => { + if (productionObjectKeys.find(tKey => tKey === key)) { + if (_UserColorTypes[key]) { + const baseColorProvider = new ColorProvider(_UserColorTypes[key]); + if (baseColorProvider.Base) { + this.productionGlobalConfig.displayColor[key] = baseColorProvider; + } + } + else { + this.productionGlobalConfig.displayColor[key] = null; + } + } + }); + } + getSheet(_StyleID) { + let evolveDialogStyleNode = document.getElementById(_StyleID); + if (!evolveDialogStyleNode) { + const headNode = document.head || document.getElementsByTagName('head')[0]; + if (!headNode) { + return; + } + evolveDialogStyleNode = document.createElement('style'); + evolveDialogStyleNode.setAttribute('id', _StyleID); + evolveDialogStyleNode.appendChild(document.createTextNode('')); + headNode.appendChild(evolveDialogStyleNode); + } + return evolveDialogStyleNode ? evolveDialogStyleNode.sheet : null; + } + setToastStyling(_Key, _ColorProvider) { + const standardToast = `.toast-wrapper.standard-toast .evolve-toast.${_Key.toLowerCase()}-dialog`; + const standardToastStyle = ` + background: ${_ColorProvider.BrightShade}!important; + border-color: ${_ColorProvider.Brighten}!important; + `; + const simpleToast = `.toast-wrapper.simple-toast .evolve-toast.${_Key.toLowerCase()}-dialog`; + const simpleToastStyle = ` + background: ${_ColorProvider.BrightWarmly}!important; + color: ${_ColorProvider.Darken}!important; + `; + const baseProgress = `.toast-wrapper .evolve-toast.${_Key.toLowerCase()}-dialog .progress-bar`; + const baseProgressStyle = ` + background-color: ${_ColorProvider.Brighten}!important; + `; + this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseProgress, baseProgressStyle); + this.getSheet('ngx-awesome-popup-glob-styles').addRule(standardToast, standardToastStyle); + this.getSheet('ngx-awesome-popup-glob-styles').addRule(simpleToast, simpleToastStyle); + } + setButtonStyling(_Key, _ColorProvider) { + const baseButtonClass = `.ed-btn-${_Key.toLowerCase()}`; + const baseStyle = ` + color: ${_ColorProvider.ContrastColor}!important; + background: ${_ColorProvider.Base}!important; + border-color: ${_ColorProvider.BrightenForShade}!important; + `; + const hoverButtonClass = `.ed-btn-${_Key.toLowerCase()}:hover`; + const hoverStyle = ` + background: ${_ColorProvider.IsBaseBright ? _ColorProvider.DarkenForShade : _ColorProvider.BrightenForShade}!important; + border-color: ${_ColorProvider.IsBaseBright ? _ColorProvider.Darken : _ColorProvider.Brighten}!important; + `; + const focusActiveButtonClass = `.ed-btn-${_Key.toLowerCase()}:focus, .ed-btn-${_Key.toLowerCase()}:active`; + const focusActiveStyle = ` + box-shadow: 0 0 1px 2px ${_ColorProvider.IsBaseBright ? _ColorProvider.Darken : _ColorProvider.Brighten}!important; + `; + this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseButtonClass, baseStyle); + this.getSheet('ngx-awesome-popup-glob-styles').addRule(hoverButtonClass, hoverStyle); + this.getSheet('ngx-awesome-popup-glob-styles').addRule(focusActiveButtonClass, focusActiveStyle); + } + setIconStyling(_Key, _ColorProvider) { + const baseIconClass = `.ap-icon-${_Key.toLowerCase()}`; + const baseStyle = `color: ${_ColorProvider.BrightenForShade}!important;`; + this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseIconClass, baseStyle); + } + setDialogFrame(_Key, _ColorProvider) { + const baseDialogFrameClass = `.ngx-awesome-popup-overlay .${_Key.toLowerCase()}-dialog`; + const baseStyle = ` + border-color: ${_ColorProvider.Brighten}!important; + `; + this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseDialogFrameClass, baseStyle); + } + setToastStyles() { + this.getSheet('ngx-awesome-popup-styles').addRule(`.toast-entity`, `all 0.5s ease;`); + this.getSheet('ngx-awesome-popup-styles').addRule(`.toast-entity:first-child`, `animation: move 0.7s ease-out;`); + const isIEOrEdge = /msie\s|trident\//i.test(window.navigator.userAgent); + if (!isIEOrEdge) { + this.getSheet('ngx-awesome-popup-styles').addRule(`@-webkit-keyframes move`, ` + 0% {margin-top: -5px; opacity: 0.4;} + 30% {margin-top: -4px; opacity: 0.7;} + 100% {margin-top: 0px; opacity: 1;} + `); + this.getSheet('ngx-awesome-popup-styles').addRule(`@keyframes move`, ` + 0% {margin-top: -5px; opacity: 0.4;} + 30% {margin-top: -4px; opacity: 0.7;} + 100% {margin-top: 0px; opacity: 1;} + `); + } + } +} +GlobalConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: GlobalConfigService, deps: [{ token: 'cdGlobalConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); +GlobalConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: GlobalConfigService, providedIn: 'root' }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: GlobalConfigService, decorators: [{ + type: Injectable, + args: [{ + providedIn: 'root' + }] + }], ctorParameters: function () { + return [{ type: undefined, decorators: [{ + type: Inject, + args: ['cdGlobalConfig'] + }] }]; + } }); + class ConfirmBoxService { - constructor(componentFactoryResolver, injector, appRef) { + constructor(componentFactoryResolver, injector, appRef, gConfigService) { this.componentFactoryResolver = componentFactoryResolver; this.injector = injector; this.appRef = appRef; + this.gConfigService = gConfigService; this.confirmBoxComponentRefList = []; } open(_ConfirmBoxBelonging) { @@ -1047,14 +1224,14 @@ class ConfirmBoxService { }); } } -ConfirmBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable }); +ConfirmBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ApplicationRef }, { token: GlobalConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); ConfirmBoxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, providedIn: 'root' }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ConfirmBoxService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] - }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ApplicationRef }]; } }); + }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ApplicationRef }, { type: GlobalConfigService }]; } }); class ConfirmBoxInitializer { constructor() { @@ -1221,8 +1398,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor }] }); class DialogConfigService { - constructor(userConfig = {}) { + constructor(userConfig = {}, gConfigService) { this.userConfig = userConfig; + this.gConfigService = gConfigService; this.authorConfig = new DialogSettings(); this.productionConfig = new DialogSettings(); const userConfigBase = new DialogSettings(); @@ -1248,7 +1426,7 @@ class DialogConfigService { dataControl.copyValuesFrom(userConfig.dialogCoreConfig, this.productionConfig.dialogCoreConfig); } } -DialogConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, deps: [{ token: 'dialogConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); +DialogConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, deps: [{ token: 'dialogConfig' }, { token: GlobalConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); DialogConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, providedIn: 'root' }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DialogConfigService, decorators: [{ type: Injectable, @@ -1259,7 +1437,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor return [{ type: undefined, decorators: [{ type: Inject, args: ['dialogConfig'] - }] }]; + }] }, { type: GlobalConfigService }]; } }); class InsertionLoaderDirective { @@ -1883,182 +2061,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor args: ['elButton'] }] } }); -class ResetGlobalConfig { - constructor(globalConfig) { - const globalConfigService = ServiceLocator.injector.get(GlobalConfigService); - if (globalConfig) { - globalConfigService.setUserColors(globalConfig.colorList); - globalConfigService.setNodeStyles(globalConfigService.productionGlobalConfig.displayColor, true); - } - else { - globalConfigService.resetStyles(); - } - } -} -class GlobalConfigService { - constructor(userGlobalConfig) { - this.userGlobalConfig = userGlobalConfig; - this.authorGlobalConfig = new GlobalConfig(); - this.productionGlobalConfig = new GlobalConfig(); - this.userGeneratedConfig = new GlobalUserConfig(userGlobalConfig); - this.authorGlobalConfig.displayColor.primary = null; - this.authorGlobalConfig.displayColor.secondary = null; - this.authorGlobalConfig.displayColor.success = null; - this.authorGlobalConfig.displayColor.info = null; - this.authorGlobalConfig.displayColor.warning = null; - this.authorGlobalConfig.displayColor.danger = null; - this.authorGlobalConfig.displayColor.light = null; - this.authorGlobalConfig.displayColor.dark = null; - this.authorGlobalConfig.displayColor.customOne = null; - this.authorGlobalConfig.displayColor.customTwo = null; - this.authorGlobalConfig.displayColor.customThree = null; - this.authorGlobalConfig.displayColor.customFour = null; - this.authorGlobalConfig.displayColor.customFive = null; - this.productionGlobalConfig.displayColor = this.authorGlobalConfig.displayColor; - this.setUserColors(this.userGeneratedConfig.colorList); - this.setNodeStyles(this.productionGlobalConfig.displayColor); - } - resetStyles() { - this.setUserColors(this.userGeneratedConfig.colorList); - this.setNodeStyles(this.productionGlobalConfig.displayColor, true); - } - setNodeStyles(_ProductionColorTypes, _Reset = false) { - if (_Reset) { - const evolveDialogStyleNode = document.getElementById('ngx-awesome-popup-glob-styles'); - if (evolveDialogStyleNode) { - evolveDialogStyleNode.remove(); - } - } - this.setToastStyles(); - Object.keys(_ProductionColorTypes).forEach(key => { - if (_ProductionColorTypes[key]) { - this.setButtonStyling(key, _ProductionColorTypes[key]); - this.setIconStyling(key, _ProductionColorTypes[key]); - this.setToastStyling(key, _ProductionColorTypes[key]); - this.setDialogFrame(key, _ProductionColorTypes[key]); - if (ColorVariance[key.toUpperCase()] === ColorVariance.PRIMARY) { - this.getSheet('ngx-awesome-popup-styles').addRule('.ngx-awesome-popup-overlay', `background: ${_ProductionColorTypes[key].TransparentDarkenVariance}!important;`); - } - } - }); - } - setUserColors(_UserColorTypes) { - if (typeof _UserColorTypes !== 'object') { - return; - } - const userKeys = Object.keys(_UserColorTypes); - const productionObjectKeys = Object.keys(this.productionGlobalConfig.displayColor); - userKeys.forEach(key => { - if (productionObjectKeys.find(tKey => tKey === key)) { - if (_UserColorTypes[key]) { - const baseColorProvider = new ColorProvider(_UserColorTypes[key]); - if (baseColorProvider.Base) { - this.productionGlobalConfig.displayColor[key] = baseColorProvider; - } - } - else { - this.productionGlobalConfig.displayColor[key] = null; - } - } - }); - } - getSheet(_StyleID) { - let evolveDialogStyleNode = document.getElementById(_StyleID); - if (!evolveDialogStyleNode) { - const headNode = document.head || document.getElementsByTagName('head')[0]; - if (!headNode) { - return; - } - evolveDialogStyleNode = document.createElement('style'); - evolveDialogStyleNode.setAttribute('id', _StyleID); - evolveDialogStyleNode.appendChild(document.createTextNode('')); - headNode.appendChild(evolveDialogStyleNode); - } - return evolveDialogStyleNode ? evolveDialogStyleNode.sheet : null; - } - setToastStyling(_Key, _ColorProvider) { - const standardToast = `.toast-wrapper.standard-toast .evolve-toast.${_Key.toLowerCase()}-dialog`; - const standardToastStyle = ` - background: ${_ColorProvider.BrightShade}!important; - border-color: ${_ColorProvider.Brighten}!important; - `; - const simpleToast = `.toast-wrapper.simple-toast .evolve-toast.${_Key.toLowerCase()}-dialog`; - const simpleToastStyle = ` - background: ${_ColorProvider.BrightWarmly}!important; - color: ${_ColorProvider.Darken}!important; - `; - const baseProgress = `.toast-wrapper .evolve-toast.${_Key.toLowerCase()}-dialog .progress-bar`; - const baseProgressStyle = ` - background-color: ${_ColorProvider.Brighten}!important; - `; - this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseProgress, baseProgressStyle); - this.getSheet('ngx-awesome-popup-glob-styles').addRule(standardToast, standardToastStyle); - this.getSheet('ngx-awesome-popup-glob-styles').addRule(simpleToast, simpleToastStyle); - } - setButtonStyling(_Key, _ColorProvider) { - const baseButtonClass = `.ed-btn-${_Key.toLowerCase()}`; - const baseStyle = ` - color: ${_ColorProvider.ContrastColor}!important; - background: ${_ColorProvider.Base}!important; - border-color: ${_ColorProvider.BrightenForShade}!important; - `; - const hoverButtonClass = `.ed-btn-${_Key.toLowerCase()}:hover`; - const hoverStyle = ` - background: ${_ColorProvider.IsBaseBright ? _ColorProvider.DarkenForShade : _ColorProvider.BrightenForShade}!important; - border-color: ${_ColorProvider.IsBaseBright ? _ColorProvider.Darken : _ColorProvider.Brighten}!important; - `; - const focusActiveButtonClass = `.ed-btn-${_Key.toLowerCase()}:focus, .ed-btn-${_Key.toLowerCase()}:active`; - const focusActiveStyle = ` - box-shadow: 0 0 1px 2px ${_ColorProvider.IsBaseBright ? _ColorProvider.Darken : _ColorProvider.Brighten}!important; - `; - this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseButtonClass, baseStyle); - this.getSheet('ngx-awesome-popup-glob-styles').addRule(hoverButtonClass, hoverStyle); - this.getSheet('ngx-awesome-popup-glob-styles').addRule(focusActiveButtonClass, focusActiveStyle); - } - setIconStyling(_Key, _ColorProvider) { - const baseIconClass = `.ap-icon-${_Key.toLowerCase()}`; - const baseStyle = `color: ${_ColorProvider.BrightenForShade}!important;`; - this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseIconClass, baseStyle); - } - setDialogFrame(_Key, _ColorProvider) { - const baseDialogFrameClass = `.ngx-awesome-popup-overlay .${_Key.toLowerCase()}-dialog`; - const baseStyle = ` - border-color: ${_ColorProvider.Brighten}!important; - `; - this.getSheet('ngx-awesome-popup-glob-styles').addRule(baseDialogFrameClass, baseStyle); - } - setToastStyles() { - this.getSheet('ngx-awesome-popup-styles').addRule(`.toast-entity`, `all 0.5s ease;`); - this.getSheet('ngx-awesome-popup-styles').addRule(`.toast-entity:first-child`, `animation: move 0.7s ease-out;`); - const isIEOrEdge = /msie\s|trident\//i.test(window.navigator.userAgent); - if (!isIEOrEdge) { - this.getSheet('ngx-awesome-popup-styles').addRule(`@-webkit-keyframes move`, ` - 0% {margin-top: -5px; opacity: 0.4;} - 30% {margin-top: -4px; opacity: 0.7;} - 100% {margin-top: 0px; opacity: 1;} - `); - this.getSheet('ngx-awesome-popup-styles').addRule(`@keyframes move`, ` - 0% {margin-top: -5px; opacity: 0.4;} - 30% {margin-top: -4px; opacity: 0.7;} - 100% {margin-top: 0px; opacity: 1;} - `); - } - } -} -GlobalConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: GlobalConfigService, deps: [{ token: 'cdGlobalConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); -GlobalConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: GlobalConfigService, providedIn: 'root' }); -i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: GlobalConfigService, decorators: [{ - type: Injectable, - args: [{ - providedIn: 'root' - }] - }], ctorParameters: function () { - return [{ type: undefined, decorators: [{ - type: Inject, - args: ['cdGlobalConfig'] - }] }]; - } }); - class ToastNotificationSimpleWrapperComponent extends WrapperAbstraction { constructor(toastNotificationBelonging, gConfig, cd, layoutHelper) { super(toastNotificationBelonging, layoutHelper); diff --git a/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs.map b/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs.map index b7444c3..869ee52 100644 --- a/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs.map +++ b/dist/fesm2015/costlydeveloper-ngx-awesome-popup.mjs.map @@ -1 +1 @@ -{"version":3,"file":"costlydeveloper-ngx-awesome-popup.mjs","sources":["../../ngx-awesome-popup/core/enums.ts","../../ngx-awesome-popup/core/global-classes.ts","../../ngx-awesome-popup/locator.service.ts","../../ngx-awesome-popup/types/confirm-box/core/confirm-box-config.service.ts","../../ngx-awesome-popup/core/dialog-injector.ts","../../ngx-awesome-popup/core/animations/keyframes.ts","../../ngx-awesome-popup/core/animations/box.animations.ts","../../ngx-awesome-popup/core/animations/fade-in-out.animation.ts","../../ngx-awesome-popup/core/layout-helper.service.ts","../../ngx-awesome-popup/types/confirm-box/confirm-box-wrapper/confirm-box-wrapper.component.ts","../../ngx-awesome-popup/types/confirm-box/confirm-box-wrapper/confirm-box-wrapper.component.html","../../ngx-awesome-popup/types/confirm-box/core/confirm-box-service.ts","../../ngx-awesome-popup/types/confirm-box/core/classes.ts","../../ngx-awesome-popup/default-loader/default-loader.component.ts","../../ngx-awesome-popup/default-loader/default-loader.component.html","../../ngx-awesome-popup/types/dialog/core/dialog-config.service.ts","../../ngx-awesome-popup/core/insertion-loader.directive.ts","../../ngx-awesome-popup/core/insertion.directive.ts","../../ngx-awesome-popup/types/dialog/dialog-wrapper/dialog-wrapper.component.ts","../../ngx-awesome-popup/types/dialog/dialog-wrapper/dialog-wrapper.component.html","../../ngx-awesome-popup/types/dialog/core/dialog.service.ts","../../ngx-awesome-popup/types/dialog/core/classes.ts","../../ngx-awesome-popup/types/toast-notification/core/enums.ts","../../ngx-awesome-popup/types/toast-notification/core/toast-notification-config.service.ts","../../ngx-awesome-popup/types/toast-notification/core/wrapper-abstraction.ts","../../ngx-awesome-popup/core/global-config.service.ts","../../ngx-awesome-popup/types/toast-notification/toast-notification-simple-wrapper/toast-notification-simple-wrapper.component.ts","../../ngx-awesome-popup/types/toast-notification/toast-notification-simple-wrapper/toast-notification-simple-wrapper.component.html","../../ngx-awesome-popup/types/toast-notification/toast-notification-wrapper/toast-notification-wrapper.component.ts","../../ngx-awesome-popup/types/toast-notification/toast-notification-wrapper/toast-notification-wrapper.component.html","../../ngx-awesome-popup/types/toast-notification/core/toast-notification.service.ts","../../ngx-awesome-popup/types/toast-notification/core/classes.ts","../../ngx-awesome-popup/ngx-awesome-popup.module.ts","../../ngx-awesome-popup/types/confirm-box/core/confirm-box-evoke.service.ts","../../ngx-awesome-popup/types/toast-notification/core/toast-evoke.service.ts"],"sourcesContent":["/*\nenum None {\n NONE = 0\n}\n\nenum CustomColors {\n CUSTOM_ONE = 20,\n CUSTOM_TWO = 21,\n CUSTOM_THREE = 22,\n CUSTOM_FOUR = 23,\n CUSTOM_FIVE = 24\n}\n\nenum BaseColors {\n SUCCESS = 1,\n INFO = 2,\n WARNING = 3,\n DANGER = 4\n}\n\nenum ExtraColors {\n DARK = 5,\n LIGHT = 6,\n PRIMARY = 7,\n SECONDARY = 8\n}\n\nenum ButtonExpand {\n LINK = 9\n}\n*/\n\nexport enum DialogLayoutDisplay {\n NONE = 0,\n SUCCESS = 1,\n INFO = 2,\n WARNING = 3,\n DANGER = 4,\n CUSTOM_ONE = 20,\n CUSTOM_TWO = 21,\n CUSTOM_THREE = 22,\n CUSTOM_FOUR = 23,\n CUSTOM_FIVE = 24\n}\n\nexport enum ButtonLayoutDisplay {\n NONE = 0,\n SUCCESS = 1,\n INFO = 2,\n WARNING = 3,\n DANGER = 4,\n DARK = 5,\n LIGHT = 6,\n PRIMARY = 7,\n SECONDARY = 8,\n LINK = 9,\n CUSTOM_ONE = 20,\n CUSTOM_TWO = 21,\n CUSTOM_THREE = 22,\n CUSTOM_FOUR = 23,\n CUSTOM_FIVE = 24\n}\n\nexport enum ColorVariance {\n SUCCESS = 1,\n INFO = 2,\n WARNING = 3,\n DANGER = 4,\n DARK = 5,\n LIGHT = 6,\n PRIMARY = 7,\n SECONDARY = 8,\n LINK = 9,\n CUSTOM_ONE = 20,\n CUSTOM_TWO = 21,\n CUSTOM_THREE = 22,\n CUSTOM_FOUR = 23,\n CUSTOM_FIVE = 24\n}\n\nexport enum AppearanceAnimation {\n NONE = 'noneIn',\n BOUNCE_IN = 'bounceIn',\n SWING = 'swing',\n ZOOM_IN = 'zoomIn',\n ZOOM_IN_ROTATE = 'zoomInRotate',\n ELASTIC = 'elastic',\n JELLO = 'jello',\n FADE_IN = 'fadeIn',\n SLIDE_IN_UP = 'slideInUp',\n SLIDE_IN_DOWN = 'slideInDown',\n SLIDE_IN_LEFT = 'slideInLeft',\n SLIDE_IN_RIGHT = 'slideInRight'\n}\n\nexport enum DisappearanceAnimation {\n NONE = 'noneOut',\n FADE_OUT = 'fadeOut',\n ZOOM_OUT_WIND = 'zoomOutWind',\n BOUNCE_OUT = 'bounceOut',\n FLIP_OUT = 'flipOutY',\n ZOOM_OUT = 'zoomOut',\n ZOOM_OUT_ROTATE = 'zoomOutRotate',\n SLIDE_OUT_UP = 'slideOutUp',\n SLIDE_OUT_DOWN = 'slideOutDown',\n SLIDE_OUT_LEFT = 'slideOutLeft',\n SLIDE_OUT_RIGHT = 'slideOutRight'\n}\n\nexport enum MotionBlockAnimation {\n NONE = 0,\n WOBBLE = 'wobble'\n}\n\nexport type VerticalPosition = 'left' | 'center' | 'right';\n","import { ButtonLayoutDisplay } from './enums';\nimport { IButton, IColorObject, IColorTypes, IGlobalConfig, IGlobalUserConfig, ISizes } from './global-interfaces';\n\nexport class Sizes implements ISizes {\n width: string = null;\n minWidth: string = null;\n maxWidth: string = null;\n height: string = null;\n minHeight: string = null;\n maxHeight: string = null;\n fullScreen: boolean = null;\n}\n\nexport class dispatch {\n title: string = null;\n message: string = null;\n}\n\nexport class ButtonMaker implements IButton {\n constructor(public label: string, public ID: string, public layoutType: ButtonLayoutDisplay = ButtonLayoutDisplay.PRIMARY) {}\n}\n\nexport class GlobalUserConfig implements IGlobalUserConfig {\n colorList: IColorTypes = new ColorTypes();\n\n constructor(_GlobalUserConfig: IGlobalUserConfig) {\n if (_GlobalUserConfig) {\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(_GlobalUserConfig, this);\n const colorList = new ColorTypes();\n this.colorList = dataControl.copyValuesFrom(this.colorList, colorList);\n }\n }\n}\n\nexport class ColorTypes implements IColorTypes {\n primary: string = null;\n secondary: string = null;\n success: string = null;\n info: string = null;\n warning: string = null;\n danger: string = null;\n light: string = null;\n dark: string = null;\n customOne: string = null;\n customTwo: string = null;\n customThree: string = null;\n customFour: string = null;\n customFive: string = null;\n}\n\nexport class GlobalConfig implements IGlobalConfig {\n displayColor: IColorObject = new DisplayColor();\n}\n\nexport class DisplayColor implements IColorObject {\n primary: ColorProvider = null;\n secondary: ColorProvider = null;\n success: ColorProvider = null;\n info: ColorProvider = null;\n warning: ColorProvider = null;\n danger: ColorProvider = null;\n light: ColorProvider = null;\n dark: ColorProvider = null;\n customOne: ColorProvider = null;\n customTwo: ColorProvider = null;\n customThree: ColorProvider = null;\n customFour: ColorProvider = null;\n customFive: ColorProvider = null;\n}\n\nexport class ColorProvider {\n Base: string = null;\n Brighten: string = null;\n BrightenForShade: string = null;\n Darken: string = null;\n DarkenForShade: string = null;\n ContrastColor: string = null;\n TransparentDarkenVariance: string = null;\n BrightShade: string = null;\n BrightWarmly: string = null;\n IsBaseBright: boolean = null;\n\n constructor(_Color: string) {\n if ((this.Base = this.isColor(_Color))) {\n this.Brighten = this.brightness(this.Base, 'brighten', 25);\n this.BrightenForShade = this.brightness(this.Base, 'brighten', 10);\n this.Darken = this.brightness(this.Base, 'darken', 20);\n this.DarkenForShade = this.brightness(this.Base, 'darken', 10);\n const luminance = Math.floor(this.luminance(this.Base) * 100);\n const darken = luminance > 50 ? 5 : luminance > 40 ? 10 : luminance > 20 ? 15 : luminance;\n const brighten = luminance > 55 ? 65 : luminance > 45 ? 60 : luminance > 20 ? 55 : luminance > 10 ? 45 : 80;\n this.BrightShade = this.brightness(this.brightness(this.Base, 'darken', darken), 'brighten', brighten);\n this.BrightWarmly = this.brightness(this.brightness(this.saturate(this.Base), 'darken', darken - 10), 'brighten', brighten - 5);\n this.TransparentDarkenVariance = this.brightness(this.transparentize(this.Base, 80), 'darken', 40);\n if (this.isBright(this.Base)) {\n this.ContrastColor = 'rgba(58,65,71,0.5)';\n this.IsBaseBright = true;\n } else {\n this.ContrastColor = 'rgb(255,255,255, 0.7)';\n this.IsBaseBright = false;\n }\n\n /*\t console.log('%c BrightShade ', `background: ${this.BrightShade}; color: ${this.ContrastColor}`, this.BrightShade);\n\t\t\t\t\t console.log('%c BrightWarmly ', `background: ${this.BrightWarmly}; color: ${this.ContrastColor}`, this.BrightWarmly);\n\t\t\t\t\t\t console.log('%c Brighten ', `background: ${this.Brighten}; color: ${this.ContrastColor}`, this.Brighten);\n\t\t\t\t\t\t console.log('%c BrightenForShade ', `background: ${this.BrightenForShade}; color: ${this.ContrastColor}`, this.BrightenForShade);\n\t\t\t\t\t console.log('%c Base ', `background: ${this.Base}; color: ${this.ContrastColor}`, this.Base);\n\t\t\t\t\t console.log('%c DarkenForShade ', `background: ${this.DarkenForShade}; color: ${this.ContrastColor}`, this.DarkenForShade);\n\t\t\t\t\t console.log('%c Darken ', `background: ${this.Darken}; color: ${this.ContrastColor}`, this.Darken);\n\t\t\t\t\t\t console.log('%c TransparentDarkenVariance ', `background: ${this.TransparentDarkenVariance}; color: ${this.ContrastColor}`, this.TransparentDarkenVariance);\n\t\t\t*/\n }\n }\n\n saturate(_Rgb: string): string {\n const rgbIntArray = this.getRGBArray(_Rgb);\n const greyVal = this.getLightnessOfRGB(_Rgb) * 55;\n const [lowest, middle, highest] = this.getLowMidHi(rgbIntArray);\n\n if (lowest.val === highest.val) {\n return _Rgb;\n }\n\n const saturationRange = Math.round(Math.min(255 - greyVal, greyVal));\n const maxChange = Math.min(255 - highest.val, lowest.val);\n const changeAmount = Math.min(saturationRange / 10, maxChange);\n const middleValueRatio = (greyVal - middle.val) / (greyVal - highest.val) + 0.07;\n\n const returnArray = [];\n returnArray[highest.index] = Math.round(highest.val + changeAmount);\n returnArray[lowest.index] = Math.round(lowest.val - changeAmount);\n returnArray[middle.index] = Math.round(greyVal + (returnArray[highest.index] - greyVal) * middleValueRatio + 5);\n return `rgb(${[returnArray].join()})`;\n }\n\n public brightness(_Rgb: string, _Action: 'brighten' | 'darken', _Percentage: number): string {\n const rgbIntArray = this.getRGBArray(_Rgb);\n const [lowest, middle, highest] = this.getLowMidHi(rgbIntArray);\n\n if (_Action === 'brighten' && lowest.val === 255) {\n return _Rgb;\n }\n\n if (_Action === 'darken' && highest.val === 0) {\n return _Rgb;\n }\n\n const amount = (_Percentage / 100) * 255;\n\n let returnList = [];\n\n if (_Action === 'brighten') {\n returnList[lowest.index] = Math.round(lowest.val + Math.min(255 - lowest.val, amount));\n const increaseFraction = (returnList[lowest.index] - lowest.val) / (255 - lowest.val);\n returnList[middle.index] = middle.val + (255 - middle.val) * increaseFraction;\n returnList[highest.index] = highest.val + (255 - highest.val) * increaseFraction;\n }\n if (_Action === 'darken') {\n returnList[highest.index] = highest.val - Math.min(highest.val, amount);\n const decreaseFraction = (highest.val - returnList[highest.index]) / highest.val;\n returnList[middle.index] = middle.val - middle.val * decreaseFraction;\n returnList[lowest.index] = lowest.val - lowest.val * decreaseFraction;\n }\n\n returnList = returnList.map(item => Math.round(item));\n if (rgbIntArray.length > 3) {\n returnList.push(rgbIntArray[3]);\n return `rgba(${returnList.join()})`;\n }\n return `rgb(${returnList.join()})`;\n }\n\n getLightnessOfRGB(_Rgb: string): number {\n const rgbIntArray = this.getRGBArray(_Rgb);\n\n const highest = Math.max(...rgbIntArray);\n const lowest = Math.min(...rgbIntArray);\n return (highest + lowest) / 2 / 255;\n }\n\n private isBright(_Rgb: string): boolean {\n return this.contrast(this.luminance(_Rgb));\n }\n\n //\n private getLowMidHi(_RgbArray: number[]): { index: number; val: number }[] {\n const rgbArrayCopy = _RgbArray.slice();\n const rgbArrayWithoutAlpha = _RgbArray.length > 3 ? rgbArrayCopy.reverse().slice(1).reverse() : _RgbArray;\n let highest = { val: -1, index: -1 };\n let lowest = { val: Infinity, index: -1 };\n\n rgbArrayWithoutAlpha.map((val, index) => {\n if (val > highest.val) {\n highest = { val: val, index: index };\n }\n if (val < lowest.val) {\n lowest = { val: val, index: index };\n }\n });\n\n if (lowest.index === highest.index) {\n lowest.index = highest.index + 1;\n }\n\n const middleIndex = 3 - highest.index - lowest.index;\n const middle = {\n val: rgbArrayWithoutAlpha[middleIndex],\n index: middleIndex\n };\n return [lowest, middle, highest];\n }\n\n private contrast(_Luminance): boolean {\n const brightest = Math.max(1.05, _Luminance + 0.05);\n const darkest = Math.min(1.05, _Luminance + 0.05);\n const contrast = brightest / darkest;\n return contrast < 2.7;\n }\n\n private isColor(_StrColor): string {\n const CSSDeclaration = new Option().style;\n CSSDeclaration.color = _StrColor;\n return CSSDeclaration.color ? CSSDeclaration.color : null;\n }\n\n private getRGBArray(_Rgb: string): number[] {\n return _Rgb\n .replace(/^(rgb|rgba)\\(/, '')\n .replace(/\\)$/, '')\n .replace(/\\s/g, '')\n .split(',')\n .map(x => +x);\n }\n\n private luminance(_Rgb: string): number {\n const rgbIntArray = this.getRGBArray(_Rgb);\n const W3algorithm = rgbIntArray.map(item => {\n item /= 255;\n return item <= 0.03928 ? item / 12.92 : Math.pow((item + 0.055) / 1.055, 2.4);\n });\n return W3algorithm[0] * 0.2126 + W3algorithm[1] * 0.7152 + W3algorithm[2] * 0.0722;\n }\n\n private transparentize(_Rgb: string, _Percentage: number): string {\n const baseArray = this.Base.replace(/^(rgb|rgba)\\(/, '')\n .replace(/\\)$/, '')\n .replace(/\\s/g, '')\n .split(',')\n .map(x => +x);\n if (baseArray.length > 3) {\n baseArray.pop();\n }\n const amount = (100 - _Percentage) / 100;\n baseArray.push(amount);\n return `rgb(${baseArray.join()})`;\n }\n}\n\nexport class DataControl {\n /**\n * @ignore\n */\n public copyValuesFrom(_Data: any, _DestinationObject: any): any {\n if (typeof _Data !== 'object') {\n return _DestinationObject;\n }\n\n const dataKeys = Object.keys(_Data);\n const destinationObjectKeys = Object.keys(_DestinationObject);\n\n dataKeys.forEach(key => {\n if (destinationObjectKeys.find(tKey => tKey === key || tKey === '_' + key)) {\n if (key.includes('Date')) {\n const date = Date.parse(_Data[key]);\n if (date) {\n _DestinationObject[key] = new Date(date);\n } else {\n if (_Data[key] !== null) {\n _DestinationObject[key] = _Data[key];\n }\n }\n } else {\n if (_Data[key] !== null) {\n _DestinationObject[key] = _Data[key];\n }\n }\n }\n });\n\n return _DestinationObject;\n }\n}\n\nexport class Timer {\n TimePassed = 0;\n Timer: any;\n Progress = 0;\n Remaining = 100;\n Milliseconds: number;\n\n constructor() {}\n\n setMilliseconds(_Milliseconds: number): void {\n this.Milliseconds = _Milliseconds;\n }\n\n reset(): void {\n this.TimePassed = 0;\n this.Progress = 0;\n }\n\n pause(): void {\n this.TimePassed = 0;\n this.Progress = 0;\n }\n\n stop(): void {\n this.TimePassed = 0;\n clearInterval(this.Timer);\n }\n\n start(): void {\n this.Timer = setInterval(() => {\n if (this.TimePassed >= this.Milliseconds) {\n clearInterval(this.Timer);\n return;\n }\n this.TimePassed += 100;\n this.Progress = (this.TimePassed * 100) / this.Milliseconds;\n this.Remaining = 100 - this.Progress;\n }, 100);\n }\n}\n","import { Injector } from '@angular/core'; // @dynamic\n\n// @dynamic\nexport class ServiceLocator {\n static injector: Injector;\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { AppearanceAnimation, DialogLayoutDisplay, DisappearanceAnimation } from '../../../core/enums';\nimport { DataControl } from '../../../core/global-classes';\nimport { ConfirmBoxCustomStyles, ConfirmBoxSettings } from './classes';\nimport { IConfirmBoxUserConfig } from './interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfirmBoxConfigService {\n authorConfig: IConfirmBoxUserConfig = new ConfirmBoxSettings();\n productionConfig: IConfirmBoxUserConfig = new ConfirmBoxSettings();\n\n constructor(\n @Inject('confirmBoxConfig')\n private userConfig: IConfirmBoxUserConfig = {}\n ) {\n // region *** confirmBox userConfig (user input app-module) ***\n const userConfigBase = new ConfirmBoxSettings();\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(userConfig.confirmBoxCoreConfig, userConfigBase.confirmBoxCoreConfig); // this will make sure that object has right properties\n userConfig.confirmBoxCoreConfig = userConfigBase.confirmBoxCoreConfig;\n // endregion\n\n // region *** author default config values (if there is no user input) ***\n this.authorConfig.confirmBoxCoreConfig.width = 'auto';\n this.authorConfig.confirmBoxCoreConfig.height = 'auto';\n this.authorConfig.confirmBoxCoreConfig.buttonPosition = 'center';\n this.authorConfig.confirmBoxCoreConfig.confirmLabel = 'Confirm';\n this.authorConfig.confirmBoxCoreConfig.declineLabel = 'Decline';\n this.authorConfig.confirmBoxCoreConfig.disableIcon = false;\n this.authorConfig.confirmBoxCoreConfig.allowHtmlMessage = false;\n this.authorConfig.confirmBoxCoreConfig.layoutType = DialogLayoutDisplay.NONE;\n this.authorConfig.confirmBoxCoreConfig.animationIn = AppearanceAnimation.ZOOM_IN;\n this.authorConfig.confirmBoxCoreConfig.animationOut = DisappearanceAnimation.ZOOM_OUT;\n this.authorConfig.confirmBoxCoreConfig.customStyles = new ConfirmBoxCustomStyles();\n this.authorConfig.confirmBoxCoreConfig.iconStyleClass = null;\n\n // endregion\n\n // region *** Production setup ***\n dataControl.copyValuesFrom(this.authorConfig.confirmBoxCoreConfig, this.productionConfig.confirmBoxCoreConfig);\n dataControl.copyValuesFrom(userConfig.confirmBoxCoreConfig, this.productionConfig.confirmBoxCoreConfig);\n // endregion\n }\n}\n","import { InjectFlags, InjectionToken, Injector, Type } from '@angular/core';\n\nexport class DialogInjector implements Injector {\n constructor(private ParentInjector: Injector, private AdditionalTokens: WeakMap) {}\n\n get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): T;\n get(token: any, notFoundValue?: any): any;\n get(token: any, notFoundValue?: any, flags?: any): any {\n const value = this.AdditionalTokens.get(token);\n\n if (value) {\n return value;\n }\n\n return this.ParentInjector.get(token, notFoundValue);\n }\n}\n","import { style } from '@angular/animations';\n\n// in\nexport const bounceIn = [\n style({\n transform: 'scale3d(0.7, 0.7, 0.7)',\n offset: 0,\n opacity: 0\n }),\n style({\n transform: 'scale3d(1.3, 1.3, 1.3)',\n offset: 0.3,\n opacity: 0.3\n }),\n style({\n transform: 'scale3d(0.95, 0.95, 0.95)',\n offset: 0.6,\n opacity: 1\n }),\n style({\n transform: 'scale3d(1.03, 1.03, 1.03)',\n opacity: 1,\n offset: 0.8\n }),\n style({\n transform: 'scale3d(0.97, 0.97, 0.97)',\n offset: 0.9\n }),\n style({\n transform: 'scale3d(1, 1, 1)',\n offset: 1,\n opacity: 1\n })\n];\n\nexport const swing = [\n style({ offset: 0, opacity: 0 }),\n style({ transform: 'rotate3d(0, 0, 1, 10deg)', offset: 0.2 }),\n style({ transform: 'rotate3d(0, 0, 1, -7deg)', offset: 0.3, opacity: 1 }),\n style({ transform: 'rotate3d(0, 0, 1, 3deg)', offset: 0.55 }),\n style({ transform: 'rotate3d(0, 0, 1, -3deg)', offset: 0.8 }),\n style({ transform: 'none', offset: 1 })\n];\n\nexport const zoomIn = [\n style({\n transform: 'scale3d(0.3, 0.3, 0.3)',\n offset: 0\n }),\n style({\n offset: 0.1,\n opacity: 1\n }),\n style({\n transform: 'scale3d(1, 1, 1)',\n offset: 1\n })\n];\n\nexport const zoomInRotate = [\n style({\n transform: 'scale(0.1) rotate(30deg)',\n offset: 0,\n opacity: 0\n }),\n style({\n transform: 'rotate(-10deg)',\n offset: 0.5,\n opacity: 1\n }),\n style({\n transform: 'rotate(3deg)',\n offset: 0.7\n }),\n style({\n transform: 'scale(1)',\n offset: 1\n })\n];\n\nexport const elastic = [\n style({ transform: 'scale3d(1, 1, 1)', offset: 0, opacity: 0 }),\n style({ transform: 'scale3d(1.25, 0.75, 1)', offset: 0.3 }),\n style({ transform: 'scale3d(0.75, 1.25, 1)', offset: 0.4, opacity: 1 }),\n style({ transform: 'scale3d(1.15, 0.85, 1)', offset: 0.5 }),\n style({ transform: 'scale3d(0.95, 1.05, 1)', offset: 0.6 }),\n style({ transform: 'scale3d(1.05, 0.95, 1)', offset: 0.7 }),\n style({ transform: 'scale3d(1, 1, 1)', offset: 1 })\n];\n\nexport const jello = [\n style({ offset: 0, opacity: 0 }),\n style({ transform: 'skewX(-12.5deg) skewY(-12.5deg)', offset: 0.111 }),\n style({ transform: 'skewX(6.25deg) skewY(6.25deg)', offset: 0.222 }),\n style({ transform: 'skewX(-3.125deg) skewY(-3.125deg)', offset: 0.333, opacity: 1 }),\n style({ transform: 'skewX(1.5625deg) skewY(1.5625deg)', offset: 0.444 }),\n style({ transform: 'skewX(-0.78125deg) skewY(-0.78125deg)', offset: 0.555 }),\n style({ transform: 'skewX(0.390625deg) skewY(0.390625deg)', offset: 0.666 }),\n style({ transform: 'skewX(0.390625deg) skewY(0.390625deg)', offset: 0.777 }),\n style({\n transform: 'skewX(-0.1953125deg) skewY(-0.1953125deg)',\n offset: 0.888\n }),\n style({ transform: 'none', offset: 1 })\n];\n\nexport const fadeIn = [style({ offset: 0, opacity: 0 }), style({ offset: 1, opacity: 1 })];\n\nexport const slideInUp = [\n style({ offset: 0, opacity: 0, transform: 'translate3d(0, 100%, 0)' }),\n style({ offset: 1, opacity: 1, transform: 'translate3d(0, 0, 0)' })\n];\n\nexport const slideInDown = [\n style({ offset: 0, opacity: 0, transform: 'translate3d(0, -100%, 0)' }),\n style({ offset: 1, opacity: 1, transform: 'translate3d(0, 0, 0)' })\n];\n\nexport const slideInLeft = [\n style({ offset: 0, opacity: 0, transform: 'translate3d(-100%, 0, 0)' }),\n style({ offset: 1, opacity: 1, transform: 'translate3d(0, 0, 0)' })\n];\n\nexport const slideInRight = [\n style({ offset: 0, opacity: 0, transform: 'translate3d(100%, 0, 0)' }),\n style({ offset: 1, opacity: 1, transform: 'translate3d(0, 0, 0)' })\n];\n\n// out\n\nexport const fadeOut = [style({ offset: 0, opacity: 1 }), style({ offset: 1, opacity: 0 })];\n\nexport const zoomOutWind = [\n style({\n transform: 'scale3d(.475, .475, .475) translate3d(-42px, 0, 0)',\n offset: 0.4\n }),\n style({\n transform: 'scale(.1) translate3d(400px, 0, 0)',\n 'transform-origin': 'top center',\n offset: 1,\n opacity: 0\n })\n];\n\nexport const bounceOut = [\n style({\n transform: 'scale3d(1.3, 1.3, 1.3)',\n offset: 0.3\n }),\n style({\n transform: 'scale3d(0.9, 0.9, 0.9)',\n offset: 0.5\n }),\n style({\n transform: 'scale3d(0.3, 0.3, 0.3)',\n opacity: 0,\n offset: 1\n })\n];\n\nexport const flipOutY = [\n style({ transform: 'perspective(400px)', offset: 0 }),\n style({\n transform: 'perspective(400px) rotate3d(0, 1, 0, -15deg)',\n opacity: 1,\n offset: 0.33\n }),\n style({\n transform: 'perspective(400px) rotate3d(0, 1, 0, 90deg)',\n opacity: 0,\n offset: 0.9\n })\n];\n\nexport const zoomOut = [\n style({\n opacity: 1,\n offset: 0\n }),\n style({\n offset: 0.5,\n transform: 'scale3d(0.3, 0.3, 0.3)',\n opacity: 0\n }),\n style({\n offset: 1,\n opacity: 0\n })\n];\n\nexport const zoomOutRotate = [\n style({\n opacity: 1,\n offset: 0\n }),\n style({\n offset: 0.9,\n transform: 'rotate(200deg) scale(0.1)',\n opacity: 0\n })\n];\n\nexport const slideOutUp = [\n style({ transform: 'translate3d(0, 0, 0)', offset: 0 }),\n style({ transform: 'translate3d(0, -100%, 0)', opacity: 0, offset: 1 })\n];\n\nexport const slideOutDown = [\n style({ transform: 'translate3d(0, 0, 0)', offset: 0 }),\n style({ transform: 'translate3d(0, 100%, 0)', opacity: 0, offset: 1 })\n];\n\nexport const slideOutLeft = [\n style({ transform: 'translate3d(0, 0, 0)', offset: 0 }),\n style({ transform: 'translate3d(-100%, 0, 0)', opacity: 0, offset: 1 })\n];\n\nexport const slideOutRight = [\n style({ transform: 'translate3d(0, 0, 0)', offset: 0 }),\n style({ transform: 'translate3d(100%, 0, 0)', opacity: 0, offset: 1 })\n];\n\n// motion\n\nexport const wobble = [\n style({\n transform: 'translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg)',\n offset: 0.15\n }),\n style({\n transform: 'translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)',\n offset: 0.3\n }),\n style({\n transform: 'translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)',\n offset: 0.45\n }),\n style({\n transform: 'translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)',\n offset: 0.6\n }),\n style({\n transform: 'translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)',\n offset: 0.75\n }),\n style({ transform: 'none', offset: 1 })\n];\n","import { animate, AnimationTriggerMetadata, keyframes, state, style, transition, trigger } from '@angular/animations';\nimport * as kf from './keyframes';\n\nexport function boxAnimations(): AnimationTriggerMetadata {\n return trigger('boxAnimations', [\n state('reset', style({ opacity: 1 })),\n // in\n state('noneIn', style({ opacity: 1 })),\n state('bounceIn', style({ opacity: 1 })),\n state('swing', style({ opacity: 1 })),\n state('zoomIn', style({ opacity: 1 })),\n state('zoomInRotate', style({ opacity: 1 })),\n state('elastic', style({ opacity: 1 })),\n state('jello', style({ opacity: 1 })),\n state('fadeIn', style({ opacity: 1 })),\n state('slideInUp', style({ opacity: 1 })),\n state('slideInDown', style({ opacity: 1 })),\n state('slideInLeft', style({ opacity: 1 })),\n state('slideInRight', style({ opacity: 1 })),\n\n transition('* => noneIn', animate('10ms', keyframes(kf.fadeIn))),\n transition('* => bounceIn', animate('1000ms cubic-bezier(0.215, 0.61, 0.355, 1)', keyframes(kf.bounceIn))),\n transition('* => swing', animate('800ms', keyframes(kf.swing))),\n transition('* => zoomIn', animate('400ms ease-in', keyframes(kf.zoomIn))),\n transition('* => zoomInRotate', animate('800ms ease-in', keyframes(kf.zoomInRotate))),\n transition('* => elastic', animate('1000ms', keyframes(kf.elastic))),\n transition('* => jello', animate(1000, keyframes(kf.jello))),\n transition('* => fadeIn', animate('400ms ease-in', keyframes(kf.fadeIn))),\n transition('* => slideInUp', animate('400ms ease-in', keyframes(kf.slideInUp))),\n transition('* => slideInDown', animate('400ms ease-in', keyframes(kf.slideInDown))),\n transition('* => slideInLeft', animate('400ms ease-in', keyframes(kf.slideInLeft))),\n transition('* => slideInRight', animate('400ms ease-in', keyframes(kf.slideInRight))),\n transition('* => reset', style({ opacity: 1 })),\n\n // out\n state('noneOut', style({ opacity: 0 })),\n state('fadeOut', style({ opacity: 0 })),\n state('zoomOutWind', style({ opacity: 0 })),\n state('bounceOut', style({ opacity: 0 })),\n state('flipOutY', style({ opacity: 0 })),\n state('zoomOut', style({ opacity: 0 })),\n state('zoomOutRotate', style({ opacity: 0 })),\n state('slideOutUp', style({ opacity: 0 })),\n state('slideOutDown', style({ opacity: 0 })),\n state('slideOutLeft', style({ opacity: 0 })),\n state('slideOutRight', style({ opacity: 0 })),\n\n transition('* => noneOut', animate('100ms ease-out', keyframes(kf.fadeOut))),\n transition('* => fadeOut', animate('300ms ease-out', keyframes(kf.fadeOut))),\n transition('* => zoomOutWind', animate('400ms ease-out', keyframes(kf.zoomOutWind))),\n transition('* => bounceOut', animate('400ms ease-out', keyframes(kf.bounceOut))),\n transition('* => flipOutY', animate('400ms ease-out', keyframes(kf.flipOutY))),\n transition('* => zoomOut', animate('400ms ease-out', keyframes(kf.zoomOut))),\n transition('* => zoomOutRotate', animate('400ms ease-out', keyframes(kf.zoomOutRotate))),\n transition('* => slideOutUp', animate('300ms ease-out', keyframes(kf.slideOutUp))),\n transition('* => slideOutDown', animate('300ms ease-out', keyframes(kf.slideOutDown))),\n transition('* => slideOutLeft', animate('300ms ease-out', keyframes(kf.slideOutLeft))),\n transition('* => slideOutRight', animate('300ms ease-out', keyframes(kf.slideOutRight))),\n\n // motion\n transition('* => wobble', animate(1000, keyframes(kf.wobble)))\n ]);\n}\n","import {\n animate,\n animateChild,\n AnimationTriggerMetadata,\n query,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport function fadeInOut(): AnimationTriggerMetadata {\n return trigger('fadeInOut', [\n state(\n 'open',\n style({\n opacity: 1\n })\n ),\n state(\n 'close-fast',\n style({\n opacity: 0\n })\n ),\n state(\n 'close-instant',\n style({\n opacity: 0\n })\n ),\n transition('* => close-fast', [query('*', [animateChild()]), animate('{{closeDelay}}')]),\n transition('* => open', [animate(100)]),\n transition('* => close-instant', [animate(0)])\n ]);\n}\n","import { Injectable } from '@angular/core';\nimport { ButtonLayoutDisplay, DialogLayoutDisplay } from './enums';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LayoutHelperService {\n getIconClasses(layoutType: DialogLayoutDisplay, iconStyleClass: string): string {\n let returnString = '';\n if (iconStyleClass) {\n returnString += iconStyleClass;\n return returnString;\n }\n switch (layoutType) {\n case DialogLayoutDisplay.SUCCESS: {\n returnString += 'ap-icon-success icon-check-circle';\n break;\n }\n case DialogLayoutDisplay.INFO: {\n returnString += 'ap-icon-info icon-info-circle';\n break;\n }\n case DialogLayoutDisplay.WARNING: {\n returnString += 'ap-icon-warning icon-warning';\n break;\n }\n case DialogLayoutDisplay.DANGER: {\n returnString += 'ap-icon-danger icon-times-circle';\n break;\n }\n }\n return returnString;\n }\n\n getButtonClasses(layoutType: ButtonLayoutDisplay | DialogLayoutDisplay | null, perm: string = '', type?: 'auto-button'): string {\n let returnString = perm + ' ';\n if (type === 'auto-button' && layoutType === DialogLayoutDisplay.NONE) {\n layoutType = ButtonLayoutDisplay.PRIMARY;\n }\n switch (layoutType) {\n case ButtonLayoutDisplay.SUCCESS: {\n returnString += 'ed-btn-success';\n break;\n }\n case ButtonLayoutDisplay.INFO: {\n returnString += 'ed-btn-info';\n break;\n }\n case ButtonLayoutDisplay.WARNING: {\n returnString += 'ed-btn-warning';\n break;\n }\n case ButtonLayoutDisplay.DANGER: {\n returnString += 'ed-btn-danger';\n break;\n }\n case ButtonLayoutDisplay.DARK: {\n returnString += 'ed-btn-dark';\n break;\n }\n case ButtonLayoutDisplay.LIGHT: {\n returnString += 'ed-btn-light';\n break;\n }\n case ButtonLayoutDisplay.PRIMARY: {\n returnString += 'ed-btn-primary';\n break;\n }\n case ButtonLayoutDisplay.SECONDARY: {\n returnString += 'ed-btn-secondary';\n break;\n }\n case ButtonLayoutDisplay.LINK: {\n returnString += 'ed-btn-link';\n break;\n }\n case ButtonLayoutDisplay.CUSTOM_ONE: {\n returnString += 'ed-btn-customone';\n break;\n }\n case ButtonLayoutDisplay.CUSTOM_TWO: {\n returnString += 'ed-btn-customtwo';\n break;\n }\n case ButtonLayoutDisplay.CUSTOM_THREE: {\n returnString += 'ed-btn-customthree';\n break;\n }\n case ButtonLayoutDisplay.CUSTOM_FOUR: {\n returnString += 'ed-btn-customfour';\n break;\n }\n case ButtonLayoutDisplay.CUSTOM_FIVE: {\n returnString += 'ed-btn-customfive';\n break;\n }\n }\n return returnString;\n }\n\n getBoxClasses(layoutType: DialogLayoutDisplay, perm: string = ''): string {\n let returnString = perm + ' ';\n switch (layoutType) {\n case DialogLayoutDisplay.NONE: {\n returnString += 'standard-dialog';\n break;\n }\n case DialogLayoutDisplay.SUCCESS: {\n returnString += 'success-dialog';\n break;\n }\n case DialogLayoutDisplay.INFO: {\n returnString += 'info-dialog';\n break;\n }\n case DialogLayoutDisplay.WARNING: {\n returnString += 'warning-dialog';\n break;\n }\n case DialogLayoutDisplay.DANGER: {\n returnString += 'danger-dialog';\n break;\n }\n case DialogLayoutDisplay.CUSTOM_ONE: {\n returnString += 'customone-dialog';\n break;\n }\n case DialogLayoutDisplay.CUSTOM_TWO: {\n returnString += 'customtwo-dialog';\n break;\n }\n case DialogLayoutDisplay.CUSTOM_THREE: {\n returnString += 'customthree-dialog';\n break;\n }\n case DialogLayoutDisplay.CUSTOM_FOUR: {\n returnString += 'customfour-dialog';\n break;\n }\n case DialogLayoutDisplay.CUSTOM_FIVE: {\n returnString += 'customfive-dialog';\n break;\n }\n }\n return returnString;\n }\n}\n","import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { Observable, Observer } from 'rxjs';\nimport { delay } from 'rxjs/operators';\nimport { boxAnimations } from '../../../core/animations/box.animations';\nimport { fadeInOut } from '../../../core/animations/fade-in-out.animation';\nimport { AppearanceAnimation, ButtonLayoutDisplay, DisappearanceAnimation } from '../../../core/enums';\nimport { IButton } from '../../../core/global-interfaces';\nimport { LayoutHelperService } from '../../../core/layout-helper.service';\nimport { ConfirmBoxBelonging, ConfirmBoxDefaultResponse } from '../core/classes';\n\n@Component({\n selector: 'app-confirm-box-wrapper',\n templateUrl: './confirm-box-wrapper.component.html',\n animations: [fadeInOut(), boxAnimations()],\n providers: [LayoutHelperService]\n})\nexport class ConfirmBoxWrapperComponent implements AfterViewInit {\n @ViewChild('elConfirmBoxWrapper') elConfirmBoxWrapper: ElementRef;\n @ViewChild('elTextWrapper') elTextWrapper: ElementRef;\n @ViewChild('elTitleWrapper') elTitleWrapper: ElementRef;\n @ViewChild('elButtonWrapper') elButtonWrapper: ElementRef;\n @ViewChildren('elButton') elButton: QueryList;\n fadeInOutAnimation = 'open';\n boxAnimation: AppearanceAnimation | DisappearanceAnimation;\n appearanceAnimation = AppearanceAnimation;\n disappearanceAnimation = DisappearanceAnimation;\n\n constructor(\n @Inject('confirmBoxBelonging')\n public confirmBoxBelonging: ConfirmBoxBelonging,\n private cd: ChangeDetectorRef,\n public layoutHelper: LayoutHelperService\n ) {\n setTimeout(() => {\n this.boxAnimation = this.confirmBoxBelonging.confirmBoxCoreConfig.animationIn;\n }, 1);\n }\n\n ngAfterViewInit(): void {\n this.setResponse(false);\n this.cd.detectChanges();\n this.setCustomStyles();\n }\n\n setResponse(_IsSuccess: boolean, _ClickedButtonID?: string): void {\n const response = new ConfirmBoxDefaultResponse();\n if (_ClickedButtonID) {\n response.clickedButtonID = _ClickedButtonID;\n }\n\n response.setSuccess(_IsSuccess);\n response.setBelonging(this.confirmBoxBelonging);\n this.confirmBoxBelonging.eventsController.setDefaultResponse(response);\n }\n\n onOverlayClicked(evt: MouseEvent): void {\n // console.log('onOverlayClicked');\n }\n\n onCustomButton(_Button: IButton): void {\n this.confirmBoxBelonging.eventsController.onButtonClick(_Button);\n this.setResponse(true, _Button.ID);\n this.confirmBoxBelonging.eventsController.close();\n }\n\n onButtonClick(_Type: 'confirm' | 'decline'): void {\n let buttonID;\n if (_Type === 'confirm') {\n buttonID = this.confirmBoxBelonging.confirmBoxCoreConfig.confirmLabel.toLowerCase();\n } else if (_Type === 'decline') {\n buttonID = this.confirmBoxBelonging.confirmBoxCoreConfig.declineLabel.toLowerCase();\n }\n\n this.setResponse(_Type === 'confirm', buttonID);\n\n this.confirmBoxBelonging.eventsController.close();\n }\n\n closeParent$(): Observable {\n this.boxAnimation = this.confirmBoxBelonging.confirmBoxCoreConfig.animationOut;\n const closeDuration = this.confirmBoxBelonging.confirmBoxCoreConfig.animationOut ? 800 : 200;\n this.fadeInOutAnimation = 'close-fast';\n return new Observable((observer: Observer) => {\n observer.next('');\n observer.complete();\n }).pipe(delay(closeDuration));\n }\n\n setCustomStyles(): void {\n if (this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.wrapperCSS && this.elConfirmBoxWrapper) {\n this.elConfirmBoxWrapper.nativeElement.style.cssText += this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.wrapperCSS;\n }\n if (this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.textCSS && this.elTextWrapper) {\n this.elTextWrapper.nativeElement.style.cssText += this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.textCSS;\n }\n if (this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.titleCSS && this.elTitleWrapper) {\n this.elTitleWrapper.nativeElement.style.cssText += this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.titleCSS;\n }\n if (this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.buttonSectionCSS && this.elButtonWrapper) {\n this.elButtonWrapper.nativeElement.style.cssText += this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.buttonSectionCSS;\n }\n if (this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.buttonCSS && this.elButton) {\n this.elButton.forEach(el => {\n el.nativeElement.style.cssText += this.confirmBoxBelonging.confirmBoxCoreConfig.customStyles.buttonCSS;\n });\n }\n }\n\n getIconClasses(): string {\n return (\n 'icon-type-confirm-box ' +\n this.layoutHelper.getIconClasses(\n this.confirmBoxBelonging.confirmBoxCoreConfig.layoutType,\n this.confirmBoxBelonging.confirmBoxCoreConfig.iconStyleClass\n )\n );\n }\n\n getButtonClasses(layoutType: ButtonLayoutDisplay | null): string {\n return this.layoutHelper.getButtonClasses(layoutType);\n }\n}\n","\n \n
\n
\n
\n
\n {{ confirmBoxBelonging.dispatch.title }}\n
\n
\n
\n
\n\n \n
\n \n
\n
\n
\n
\n
\n
\n \n
\n \n \n {{ button.label }}\n \n
\n \n \n {{ confirmBoxBelonging.confirmBoxCoreConfig.confirmLabel }}\n \n \n {{ confirmBoxBelonging.confirmBoxCoreConfig.declineLabel }}\n \n \n \n \n\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n Injectable,\n Injector\n} from '@angular/core';\nimport { take, tap } from 'rxjs/operators';\nimport { DialogInjector } from '../../../core/dialog-injector';\nimport { ConfirmBoxWrapperComponent } from '../confirm-box-wrapper/confirm-box-wrapper.component';\nimport { ConfirmBoxBelonging, ConfirmBoxeventsController } from './classes';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfirmBoxService {\n confirmBoxComponentRefList: ComponentRef[] = [];\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private injector: Injector,\n private appRef: ApplicationRef\n ) {}\n\n open(_ConfirmBoxBelonging: ConfirmBoxBelonging): ConfirmBoxeventsController {\n const dialogController = _ConfirmBoxBelonging.eventsController;\n const componentRef = this.getComponentRef(dialogController, _ConfirmBoxBelonging);\n\n this.confirmBoxComponentRefList.push(componentRef);\n componentRef.instance.confirmBoxBelonging = _ConfirmBoxBelonging;\n\n this.appendToBodyParentComponent(componentRef);\n\n this.listeners(dialogController);\n\n return dialogController;\n }\n\n getComponentRef(\n _eventsController: ConfirmBoxeventsController,\n _ConfirmBoxBelonging: ConfirmBoxBelonging\n ): ComponentRef | null {\n let componentFactory;\n\n const dialogIndex = this.findDialogIndex(_ConfirmBoxBelonging.entityUniqueID);\n if (dialogIndex === -1) {\n const weakMap = new WeakMap();\n weakMap.set(ConfirmBoxeventsController, _eventsController);\n\n componentFactory = this.componentFactoryResolver.resolveComponentFactory(ConfirmBoxWrapperComponent);\n return componentFactory.create(new DialogInjector(this.injector, weakMap));\n }\n\n return null;\n }\n\n listeners(_eventsController: ConfirmBoxeventsController): void {\n // Listener for closing dialog\n const closeDialogSubscription = _eventsController.afterClosed$.subscribe(response => {\n const modalIndex = this.findDialogIndex(response.confirmBoxBelonging.entityUniqueID);\n this.removeFromBodyParentComponent(modalIndex);\n closeDialogSubscription.unsubscribe();\n });\n }\n\n appendToBodyParentComponent(_ComponentRef: ComponentRef): void {\n // attach view to ignite lifecycle hooks\n this.appRef.attachView(_ComponentRef.hostView);\n\n // DOM\n const domElem = (_ComponentRef.hostView as EmbeddedViewRef).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n }\n\n closeDialogWrapperComponent(_DialogUniqueID: string): void {\n const modalIndex = this.findDialogIndex(_DialogUniqueID);\n this.removeFromBodyParentComponent(modalIndex);\n }\n\n removeFromBodyParentComponent(_DialogIndex: number): void {\n if (_DialogIndex > -1) {\n this.confirmBoxComponentRefList[_DialogIndex].instance\n .closeParent$()\n .pipe(\n tap(item => {\n this.appRef.detachView(this.confirmBoxComponentRefList[_DialogIndex].hostView);\n this.confirmBoxComponentRefList[_DialogIndex].destroy();\n this.confirmBoxComponentRefList.splice(_DialogIndex, 1);\n }),\n take(1)\n )\n .subscribe();\n }\n }\n\n findDialogIndex(_DialogUniqueID: string): number {\n return this.confirmBoxComponentRefList.findIndex(item => {\n return _DialogUniqueID === item.instance.confirmBoxBelonging.entityUniqueID;\n });\n }\n}\n","import { Observable, Subject } from 'rxjs';\nimport { map, take } from 'rxjs/operators';\nimport { AppearanceAnimation, DialogLayoutDisplay, DisappearanceAnimation, VerticalPosition } from '../../../core/enums';\nimport { DataControl, dispatch } from '../../../core/global-classes';\nimport { IButton, IDispatch } from '../../../core/global-interfaces';\nimport { ServiceLocator } from '../../../locator.service';\nimport { ConfirmBoxConfigService } from './confirm-box-config.service';\nimport { ConfirmBoxService } from './confirm-box-service';\nimport {\n IConfirmBoxBelonging,\n IConfirmBoxCoreConfig,\n IConfirmBoxCustomStyles,\n IConfirmBoxPublicResponse,\n IConfirmBoxResponse,\n IPrivateResponseMerged\n} from './interfaces';\n\nexport class ConfirmBoxInitializer {\n /** @internal */\n private confirmBoxCarrier: ConfirmBoxCarrier = new ConfirmBoxCarrier();\n\n constructor() {}\n\n openConfirmBox$(): Observable {\n return this.confirmBoxCarrier.openConfirmBox$().pipe(\n map(resp => {\n const basicConfirmBoxResponse = new ConfirmBoxResponse();\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(resp, basicConfirmBoxResponse);\n return basicConfirmBoxResponse;\n }),\n take(1)\n );\n }\n\n setButtons(_Buttons: IButton[]): void {\n this.confirmBoxCarrier.setButtons(_Buttons);\n }\n\n setConfig(_ConfirmBoxCoreConfig: IConfirmBoxCoreConfig): void {\n this.confirmBoxCarrier.setConfig(_ConfirmBoxCoreConfig);\n }\n\n setDispatch(_Title: string, _Message: string = null): void {\n this.confirmBoxCarrier.setTitle(_Title);\n this.confirmBoxCarrier.setMessage(_Message);\n }\n\n setTitle(_Title: string): void {\n this.confirmBoxCarrier.setTitle(_Title);\n }\n\n setMessage(_Message: string): void {\n this.confirmBoxCarrier.setMessage(_Message);\n }\n\n setButtonLabels(_Confirm: string, _Decline?: string): void {\n this.confirmBoxCarrier.setButtonLabels(_Confirm, _Decline);\n }\n}\n\nexport class ConfirmBoxResponse extends DataControl implements IConfirmBoxResponse, IConfirmBoxPublicResponse {\n // private Response: DialogPrepareResponse = new DialogPrepareResponse();\n\n success: boolean = null;\n clickedButtonID: string = null;\n\n constructor() {\n super();\n }\n\n setSuccess(_IsSuccess: boolean): void {\n this.success = _IsSuccess;\n }\n\n setClickedButtonID(_ClickedButtonID): void {\n this.clickedButtonID = _ClickedButtonID;\n }\n}\n\nexport class ConfirmBoxeventsController {\n private readonly _afterClosed: Subject = new Subject();\n private readonly _onButtonClick: Subject = new Subject();\n private readonly _buttonList: Subject = new Subject();\n defaultResponse: IPrivateResponseMerged;\n afterClosed$: Observable = this._afterClosed.asObservable();\n onButtonClick$: Observable = this._onButtonClick.asObservable();\n buttonList$: Observable = this._buttonList.asObservable();\n\n constructor(private entityUniqueID: string) {}\n\n close(_Response?: IPrivateResponseMerged): void {\n const response = _Response ? _Response : this.defaultResponse;\n this._afterClosed.next(response);\n }\n\n onButtonClick(_Button: IButton): void {\n this.defaultResponse.setClickedButtonID(_Button.ID);\n this._onButtonClick.next(_Button);\n }\n\n setButtonList(_ButtonList: IButton[]): void {\n this._buttonList.next(_ButtonList);\n }\n\n setDefaultResponse(_Response: IPrivateResponseMerged): void {\n this.defaultResponse = _Response;\n }\n}\n\n// endregion\n\nexport class ConfirmBoxDefaultResponse extends ConfirmBoxResponse implements IPrivateResponseMerged {\n confirmBoxBelonging: ConfirmBoxBelonging = null;\n\n constructor() {\n super();\n }\n\n setBelonging(_ConfirmBoxBelonging): void {\n this.confirmBoxBelonging = _ConfirmBoxBelonging;\n }\n}\n\nexport class ConfirmBoxCarrier {\n confirmBoxBelonging: ConfirmBoxBelonging = new ConfirmBoxBelonging();\n\n constructor() {}\n\n setButtons(_Buttons: IButton[]): void {\n if (_Buttons.length) {\n this.confirmBoxBelonging.buttons = _Buttons;\n }\n }\n\n setTitle(_Title: string): void {\n this.confirmBoxBelonging.dispatch.title = _Title;\n }\n\n setMessage(_Message: string): void {\n this.confirmBoxBelonging.dispatch.message = _Message;\n }\n\n setButtonLabels(_Confirm: string, _Decline: string): void {\n this.confirmBoxBelonging.confirmBoxCoreConfig.confirmLabel = _Confirm;\n this.confirmBoxBelonging.confirmBoxCoreConfig.declineLabel = _Decline;\n }\n\n setConfig(_ConfirmBoxBelonging: IConfirmBoxCoreConfig): void {\n // region *** local UserConfig (defined on place where dialog is called) ***\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(_ConfirmBoxBelonging, this.confirmBoxBelonging.confirmBoxCoreConfig);\n // endregion\n }\n\n openConfirmBox$(): Observable {\n const service: ConfirmBoxService = ServiceLocator.injector.get(ConfirmBoxService);\n const confirmBoxController = service.open(this.confirmBoxBelonging);\n return confirmBoxController.afterClosed$;\n }\n}\n\nexport class ConfirmBoxSettings {\n buttons: IButton[] = [];\n confirmBoxCoreConfig: IConfirmBoxCoreConfig = new confirmBoxCoreConfig();\n dispatch: IDispatch = new dispatch();\n}\n\nexport class ConfirmBoxCustomStyles implements IConfirmBoxCustomStyles {\n titleCSS: string = null;\n textCSS: string = null;\n buttonSectionCSS: string = null;\n buttonCSS: string = null;\n wrapperCSS: string = null;\n}\n\nexport class confirmBoxCoreConfig implements IConfirmBoxCoreConfig {\n width: string = null;\n height: string = null;\n buttonPosition: VerticalPosition = null;\n layoutType: DialogLayoutDisplay = null;\n dispatch: IDispatch = null;\n confirmLabel: string = null;\n declineLabel: string = null;\n disableIcon: boolean = null;\n allowHtmlMessage: boolean = null;\n animationIn: AppearanceAnimation = null;\n animationOut: DisappearanceAnimation = null;\n customStyles: ConfirmBoxCustomStyles = new ConfirmBoxCustomStyles();\n iconStyleClass: string = null;\n}\n\nexport class ConfirmBoxBelonging extends ConfirmBoxSettings implements IConfirmBoxBelonging {\n entityUniqueID: string = 'C' + Math.random().toString(36).substr(2, 9);\n eventsController: ConfirmBoxeventsController;\n\n constructor() {\n super();\n this.eventsController = new ConfirmBoxeventsController(this.entityUniqueID);\n const ConfirmBoxCoreConfigurator: ConfirmBoxConfigService = ServiceLocator.injector.get(ConfirmBoxConfigService);\n const baseSettings = new ConfirmBoxSettings();\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(ConfirmBoxCoreConfigurator.productionConfig.confirmBoxCoreConfig, baseSettings.confirmBoxCoreConfig);\n this.confirmBoxCoreConfig = baseSettings.confirmBoxCoreConfig;\n this.buttons = ConfirmBoxCoreConfigurator.productionConfig.buttons.slice();\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n templateUrl: './default-loader.component.html',\n styleUrls: ['./default-loader.component.scss']\n})\nexport class DefaultLoaderComponent {}\n","
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n","import { Inject, Injectable } from '@angular/core';\nimport { AppearanceAnimation, DialogLayoutDisplay, DisappearanceAnimation } from '../../../core/enums';\nimport { DataControl } from '../../../core/global-classes';\nimport { DefaultLoaderComponent } from '../../../default-loader/default-loader.component';\nimport { DialogCustomStyles, DialogSettings } from './classes';\nimport { IDialogUserConfig } from './interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogConfigService {\n authorConfig: IDialogUserConfig = new DialogSettings();\n productionConfig: IDialogUserConfig = new DialogSettings();\n\n constructor(\n @Inject('dialogConfig')\n private userConfig: IDialogUserConfig = {}\n ) {\n // region *** dialog userConfig (user input app-module) ***\n const userConfigBase = new DialogSettings();\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(userConfig.dialogCoreConfig, userConfigBase.dialogCoreConfig); // this will make sure that object has right properties\n userConfig.dialogCoreConfig = userConfigBase.dialogCoreConfig;\n\n if (userConfig.dialogCoreConfig.loaderComponent !== null) {\n userConfig.dialogCoreConfig.displayLoader = userConfig.dialogCoreConfig.displayLoader === null;\n }\n // endregion\n\n // region *** author default config values (if there is no user input) ***\n this.authorConfig.dialogCoreConfig.width = 'auto';\n this.authorConfig.dialogCoreConfig.height = 'auto';\n this.authorConfig.dialogCoreConfig.hideScrollbar = false;\n this.authorConfig.dialogCoreConfig.escapeKeyClose = false;\n this.authorConfig.dialogCoreConfig.buttonPosition = 'right';\n this.authorConfig.dialogCoreConfig.displayLoader = false;\n this.authorConfig.dialogCoreConfig.fullScreen = false;\n this.authorConfig.dialogCoreConfig.layoutType = DialogLayoutDisplay.NONE;\n this.authorConfig.dialogCoreConfig.loaderComponent = DefaultLoaderComponent;\n this.authorConfig.dialogCoreConfig.animationIn = AppearanceAnimation.ZOOM_IN;\n this.authorConfig.dialogCoreConfig.animationOut = DisappearanceAnimation.ZOOM_OUT;\n this.authorConfig.dialogCoreConfig.customStyles = new DialogCustomStyles();\n\n // endregion\n\n dataControl.copyValuesFrom(this.authorConfig.dialogCoreConfig, this.productionConfig.dialogCoreConfig);\n dataControl.copyValuesFrom(userConfig.dialogCoreConfig, this.productionConfig.dialogCoreConfig);\n\n // buttons\n /*if(userConfig.buttons){\n\t\t\tthis.config.buttons.push(\n\t\t\t\tnew ButtonMaker('Ok', 'ok', ButtonLayoutDisplay.PRIMARY)\n\t\t\t\t,new ButtonMaker('Cancel', 'cancel', ButtonLayoutDisplay.SECONDARY)\n\t\t\t);\n\t\t}*/\n }\n}\n","import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[appInsertionLoader]'\n})\nexport class InsertionLoaderDirective {\n constructor(public viewContainerRef: ViewContainerRef) {}\n}\n","import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[appInsertion]'\n})\nexport class InsertionDirective {\n constructor(public viewContainerRef: ViewContainerRef) {}\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ComponentFactoryResolver,\n ComponentRef,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n QueryList,\n Type,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport { Observable, Observer } from 'rxjs';\nimport { delay } from 'rxjs/operators';\nimport { boxAnimations } from '../../../core/animations/box.animations';\nimport { fadeInOut } from '../../../core/animations/fade-in-out.animation';\nimport { AppearanceAnimation, DisappearanceAnimation } from '../../../core/enums';\nimport { InsertionLoaderDirective } from '../../../core/insertion-loader.directive';\nimport { InsertionDirective } from '../../../core/insertion.directive';\nimport { LayoutHelperService } from '../../../core/layout-helper.service';\nimport { DialogBelonging, DialogDefaultResponse } from '../core/classes';\n\n@Component({\n selector: 'dialog-popup-wrapper',\n templateUrl: './dialog-wrapper.component.html',\n animations: [fadeInOut(), boxAnimations()],\n providers: [LayoutHelperService]\n})\nexport class DialogWrapperComponent implements AfterViewInit, OnDestroy {\n @ViewChild('elDialogWrapper') elDialogWrapper: ElementRef;\n @ViewChild('elButtonWrapper') elButtonWrapper: ElementRef;\n @ViewChildren('elButton') elButton: QueryList;\n fadeInOutAnimation = 'open';\n showLoader = true;\n bodyOverflow: string;\n appearanceAnimation = AppearanceAnimation;\n disappearanceAnimation = DisappearanceAnimation;\n\n childComponentRef: ComponentRef;\n childComponentType: Type;\n loaderComponentRef: ComponentRef;\n\n @ViewChild(InsertionDirective, { static: true })\n insertionPoint: InsertionDirective;\n @ViewChild(InsertionLoaderDirective, { static: true })\n loaderInsertionPoint: InsertionLoaderDirective;\n\n boxAnimation: AppearanceAnimation | DisappearanceAnimation;\n\n constructor(\n @Inject('dialogBelonging')\n public dialogBelonging: DialogBelonging,\n private componentFactoryResolver: ComponentFactoryResolver,\n private cd: ChangeDetectorRef,\n public layoutHelper: LayoutHelperService\n ) {\n setTimeout(() => {\n this.boxAnimation = this.dialogBelonging.dialogCoreConfig.animationIn;\n }, 1);\n }\n\n ngAfterViewInit(): void {\n this.hideScrollbar(); // hide scrollbar if config enabled\n\n this.loadChildComponent(this.childComponentType);\n this.loadLoaderComponent(this.dialogBelonging.dialogCoreConfig.loaderComponent);\n this.setDefaultResponse();\n this.cd.detectChanges();\n this.setCustomStyles();\n }\n\n hideScrollbar(): void {\n if (this.dialogBelonging.dialogCoreConfig.hideScrollbar) {\n this.bodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n }\n\n revertScrollbarSettings(): void {\n if (this.dialogBelonging.dialogCoreConfig.hideScrollbar) {\n document.body.style.overflow = this.bodyOverflow;\n }\n }\n\n setDefaultResponse(): void {\n const dialogResponse = new DialogDefaultResponse();\n dialogResponse.setBelonging(this.dialogBelonging);\n this.dialogBelonging.eventsController.setDefaultResponse(dialogResponse);\n }\n\n ngOnDestroy(): void {\n this.revertScrollbarSettings();\n\n if (this.childComponentRef) {\n this.childComponentRef.destroy();\n }\n if (this.loaderComponentRef) {\n this.loaderComponentRef.destroy();\n }\n }\n\n hideScroller(): void {}\n\n loadChildComponent(_ComponentType: Type): void {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(_ComponentType);\n const viewContainerRef = this.insertionPoint.viewContainerRef;\n viewContainerRef.clear();\n\n this.childComponentRef = viewContainerRef.createComponent(componentFactory);\n\n this.childComponentRef.instance.dialogBelonging = this.dialogBelonging;\n }\n\n loadLoaderComponent(_LoaderRef: Type): void {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(_LoaderRef);\n const viewContainerRef = this.loaderInsertionPoint.viewContainerRef;\n viewContainerRef.clear();\n\n this.loaderComponentRef = viewContainerRef.createComponent(componentFactory);\n }\n\n close(): void {\n this.dialogBelonging.eventsController.close();\n }\n\n closeParent$(): Observable {\n this.boxAnimation = this.dialogBelonging.dialogCoreConfig.animationOut;\n const closeDuration = this.dialogBelonging.dialogCoreConfig.animationOut ? 800 : 200;\n this.fadeInOutAnimation = 'close-fast';\n return new Observable((observer: Observer) => {\n observer.next('');\n observer.complete();\n }).pipe(delay(closeDuration));\n }\n\n onOverlayClicked(evt: MouseEvent): void {\n // console.log('onOverlayClicked');\n }\n\n onCustomButton(_Button: any): void {\n this.dialogBelonging.eventsController.onButtonClick(_Button);\n }\n\n closeLoader(): void {\n this.showLoader = false;\n }\n\n setCustomStyles(): void {\n if (this.dialogBelonging.dialogCoreConfig.customStyles.wrapperCSS && this.elDialogWrapper) {\n this.elDialogWrapper.nativeElement.style.cssText += this.dialogBelonging.dialogCoreConfig.customStyles.wrapperCSS;\n }\n if (this.dialogBelonging.dialogCoreConfig.customStyles.buttonSectionCSS && this.elButtonWrapper) {\n this.elButtonWrapper.nativeElement.style.cssText += this.dialogBelonging.dialogCoreConfig.customStyles.buttonSectionCSS;\n }\n if (this.dialogBelonging.dialogCoreConfig.customStyles.buttonCSS && this.elButton) {\n this.elButton.forEach(el => {\n el.nativeElement.style.cssText += this.dialogBelonging.dialogCoreConfig.customStyles.buttonCSS;\n });\n }\n }\n\n @HostListener('window:keyup', ['$event'])\n keyEvent(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.dialogBelonging.dialogCoreConfig.escapeKeyClose) {\n this.close();\n }\n }\n}\n","\n \n \n
\n \n
\n \n \n \n \n \n \n \n \n\n
\n 0\"\n [ngStyle]=\"{\n 'text-align': dialogBelonging.dialogCoreConfig.buttonPosition\n }\">\n \n {{ button.label }}\n \n
\n \n \n\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n Injectable,\n Injector,\n Type\n} from '@angular/core';\nimport { take, tap } from 'rxjs/operators';\nimport { DialogInjector } from '../../../core/dialog-injector';\nimport { DialogWrapperComponent } from '../dialog-wrapper/dialog-wrapper.component';\nimport { DialogBelonging, DialogeventsController } from './classes';\nimport { IDialogeventsController } from './interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogService {\n dialogParentComponentRefList: ComponentRef[] = [];\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private injector: Injector,\n private appRef: ApplicationRef\n ) {}\n\n open(_ComponentType: Type, _DialogBelonging: DialogBelonging): IDialogeventsController {\n const dialogController = _DialogBelonging.eventsController;\n const componentRef = this.getComponentRef(dialogController, _DialogBelonging);\n\n this.dialogParentComponentRefList.push(componentRef);\n componentRef.instance.dialogBelonging = _DialogBelonging;\n componentRef.instance.childComponentType = _ComponentType;\n\n this.appendToBodyParentComponent(componentRef);\n\n this.listeners(dialogController);\n\n return dialogController;\n }\n\n getComponentRef(\n _eventsController: IDialogeventsController,\n _DialogBelonging: DialogBelonging\n ): ComponentRef | null {\n let componentFactory;\n\n const dialogIndex = this.findDialogIndex(_DialogBelonging.entityUniqueID);\n if (dialogIndex === -1) {\n const weakMap = new WeakMap();\n weakMap.set(DialogeventsController, _eventsController);\n\n componentFactory = this.componentFactoryResolver.resolveComponentFactory(DialogWrapperComponent);\n return componentFactory.create(new DialogInjector(this.injector, weakMap));\n }\n\n return null;\n }\n\n listeners(_eventsController: IDialogeventsController): void {\n // Listener for closing dialog\n const closeDialogSubscription = _eventsController.afterClosed$.subscribe(response => {\n const modalIndex = this.findDialogIndex(response.DialogBelonging.entityUniqueID);\n this.removeFromBodyDialogWrapperComponent(modalIndex);\n closeDialogSubscription.unsubscribe();\n });\n\n // Listener for turning off loader\n const closeLoaderSubscription = _eventsController.afterLoader$.subscribe((_DialogUniqueID: string) => {\n if (_DialogUniqueID) {\n const modalIndex = this.findDialogIndex(_DialogUniqueID);\n if (modalIndex !== -1) {\n this.dialogParentComponentRefList[modalIndex].instance.closeLoader();\n }\n }\n\n closeLoaderSubscription.unsubscribe();\n });\n }\n\n childComponentResolver(): void {}\n\n appendToBodyParentComponent(_ComponentRef: ComponentRef): void {\n // attach view to ignite lifecycle hooks\n this.appRef.attachView(_ComponentRef.hostView);\n\n // DOM\n const domElem = (_ComponentRef.hostView as EmbeddedViewRef).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n }\n\n closeDialogWrapperComponent(_DialogUniqueID: string): void {\n const modalIndex = this.findDialogIndex(_DialogUniqueID);\n this.removeFromBodyDialogWrapperComponent(modalIndex);\n }\n\n removeFromBodyDialogWrapperComponent(_DialogIndex: number): void {\n if (_DialogIndex > -1) {\n this.dialogParentComponentRefList[_DialogIndex].instance\n .closeParent$()\n .pipe(\n tap(item => {\n this.appRef.detachView(this.dialogParentComponentRefList[_DialogIndex].hostView);\n this.dialogParentComponentRefList[_DialogIndex].destroy();\n this.dialogParentComponentRefList.splice(_DialogIndex, 1);\n }),\n take(1)\n )\n .subscribe();\n }\n }\n\n findDialogIndex(_DialogUniqueID: string): number {\n return this.dialogParentComponentRefList.findIndex(item => {\n return _DialogUniqueID === item.instance.dialogBelonging.entityUniqueID;\n });\n }\n}\n","import { Type } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { map, take } from 'rxjs/operators';\nimport {\n AppearanceAnimation,\n DialogLayoutDisplay,\n DisappearanceAnimation,\n VerticalPosition\n} from '../../../core/enums';\nimport { DataControl, Sizes } from '../../../core/global-classes';\nimport { IButton } from '../../../core/global-interfaces';\nimport { ServiceLocator } from '../../../locator.service';\nimport { DialogConfigService } from './dialog-config.service';\nimport { DialogService } from './dialog.service';\nimport {\n IDialogBelonging,\n IDialogCoreConfig,\n IDialogCustomStyles,\n IDialogeventsController,\n IDialogPublicResponse,\n IDialogResponse,\n IPrivateResponseMerged\n} from './interfaces';\n\n// region *** Public ***\n\nexport class DialogInitializer {\n private dialogCarrier: DialogCarrier = new DialogCarrier();\n\n constructor(private component: Type) {\n this.dialogCarrier.setComponent(this.component);\n }\n\n /** Generic method accept expected payload from dynamic child component.*/\n openDialog$(): Observable> {\n return this.dialogCarrier.openDialog$().pipe(\n map(resp => {\n const basicDialogResponse = new DialogResponse();\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(resp, basicDialogResponse);\n return basicDialogResponse;\n }),\n take(1)\n );\n }\n\n /** It accepts list of custom buttons */\n setButtons(_Buttons: IButton[]): void {\n this.dialogCarrier.setButtons(_Buttons);\n }\n\n setCustomData(_CustomData: any): void {\n this.dialogCarrier.setCustomData(_CustomData);\n }\n\n setConfig(_DialogConfig: IDialogCoreConfig): void {\n this.dialogCarrier.setConfig(_DialogConfig);\n }\n}\n\nexport class DialogResponse extends DataControl implements IDialogResponse, IDialogPublicResponse {\n // private Response: DialogPrepareResponse = new DialogPrepareResponse();\n\n payload: any = null;\n success: boolean = null;\n clickedButtonID: string = null;\n\n constructor() {\n super();\n }\n\n /**\n * @ignore\n */\n setPayload(_Payload: any): void {\n this.payload = _Payload;\n }\n\n /**\n * @ignore\n */\n setClickedButtonID(_ClickedButtonID): void {\n this.clickedButtonID = _ClickedButtonID;\n }\n}\n\nexport class DialogeventsController implements IDialogeventsController {\n private readonly _afterClosed: Subject = new Subject();\n private readonly _afterLoader: any = new Subject();\n private readonly _onButtonClick: Subject = new Subject();\n private readonly _buttonList: Subject = new Subject();\n defaultResponse: IPrivateResponseMerged;\n onButtonClick$: Observable = this._onButtonClick.asObservable();\n afterClosed$: Observable = this._afterClosed.asObservable();\n afterLoader$: Observable = this._afterLoader.asObservable();\n buttonList$: Observable = this._buttonList.asObservable();\n\n constructor(private entityUniqueID: string) {}\n\n close(_Payload: any = null): void {\n this.defaultResponse.setPayload(_Payload);\n this._afterClosed.next(this.defaultResponse);\n }\n\n onButtonClick(_Button: IButton): void {\n this.defaultResponse.setClickedButtonID(_Button.ID);\n this._onButtonClick.next(_Button);\n }\n\n setButtonList(_ButtonList: IButton[]): void {\n this._buttonList.next(_ButtonList);\n }\n\n closeLoader(): void {\n setTimeout(() => {\n this._afterLoader.next(this.entityUniqueID);\n }, 0);\n }\n\n setDefaultResponse(_Response: IPrivateResponseMerged): void {\n this.defaultResponse = _Response;\n }\n}\n\n// endregion\n\nexport class DialogDefaultResponse extends DialogResponse implements IPrivateResponseMerged {\n DialogBelonging: IDialogBelonging = null;\n\n constructor() {\n super();\n }\n\n setBelonging(_DialogBelonging): void {\n this.DialogBelonging = _DialogBelonging;\n }\n}\n\nexport class DialogCarrier {\n private component: Type;\n dialogBelonging: DialogBelonging = new DialogBelonging();\n\n constructor() {}\n\n setComponent(_Component: Type): void {\n this.component = _Component;\n }\n\n setButtons(_Buttons: IButton[]): void {\n if (_Buttons.length) {\n this.dialogBelonging.buttons = _Buttons;\n }\n }\n\n setCustomData(_CustomData: any): void {\n this.dialogBelonging.customData = _CustomData;\n }\n\n setConfig(_DialogConfig: IDialogCoreConfig): void {\n // region *** local UserConfig (defined on place where dialog is called) ***\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(_DialogConfig, this.dialogBelonging.dialogCoreConfig);\n if (_DialogConfig?.loaderComponent) {\n this.dialogBelonging.dialogCoreConfig.displayLoader = true;\n }\n // endregion\n }\n\n openDialog$(): Observable {\n const service: DialogService = ServiceLocator.injector.get(DialogService);\n const dialogController = service.open(this.component, this.dialogBelonging);\n return dialogController.afterClosed$;\n }\n}\n\nexport class DialogCustomStyles implements IDialogCustomStyles {\n buttonSectionCSS: string = null;\n buttonCSS: string = null;\n wrapperCSS: string = null;\n}\n\nexport class dialogCoreConfig extends Sizes implements IDialogCoreConfig {\n escapeKeyClose: boolean = null;\n hideScrollbar: boolean = null;\n buttonPosition: VerticalPosition = null;\n layoutType: DialogLayoutDisplay = null;\n displayLoader: boolean = null;\n loaderComponent: Type = null;\n animationIn: AppearanceAnimation = null;\n animationOut: DisappearanceAnimation = null;\n customStyles: IDialogCustomStyles = new DialogCustomStyles();\n}\n\nexport class DialogSettings {\n buttons: IButton[] = [];\n dialogCoreConfig: IDialogCoreConfig = new dialogCoreConfig();\n}\n\nexport class DialogBelonging extends DialogSettings implements IDialogBelonging {\n /** @internal */\n entityUniqueID: string = 'D' + Math.random().toString(36).substr(2, 9);\n\n customData: CustomData = null;\n eventsController: IDialogeventsController;\n\n constructor() {\n super();\n this.eventsController = new DialogeventsController(this.entityUniqueID);\n const dialogConfigurator: DialogConfigService = ServiceLocator.injector.get(DialogConfigService);\n const baseSettings = new DialogSettings();\n const dataControl = new DataControl();\n dataControl.copyValuesFrom(dialogConfigurator.productionConfig.dialogCoreConfig, baseSettings.dialogCoreConfig);\n this.dialogCoreConfig = baseSettings.dialogCoreConfig;\n this.buttons = dialogConfigurator.productionConfig.buttons.slice();\n }\n}\n","export enum ToastProgressBarEnum {\n NONE = 0,\n INCREASE = 1,\n DECREASE = 2\n}\n\nexport enum ToastPositionEnum {\n TOP_LEFT = 'top-left',\n TOP_CENTER = 'top-center',\n TOP_RIGHT = 'top-right',\n TOP_FULL_WIDTH = 'top-fullwidth',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_CENTER = 'bottom-center',\n BOTTOM_RIGHT = 'bottom-right',\n BOTTOM_FULL_WIDTH = 'bottom-fullwidth'\n}\n\nexport enum ToastUserViewTypeEnum {\n SIMPLE = 'simple',\n STANDARD = 'standard'\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { AppearanceAnimation, DialogLayoutDisplay, DisappearanceAnimation } from '../../../core/enums';\nimport { DataControl } from '../../../core/global-classes';\nimport { ToastCustomStyles, ToastSettings } from './classes';\nimport { ToastPositionEnum, ToastProgressBarEnum, ToastUserViewTypeEnum } from './enums';\nimport { IGlobalToastSettings, IToastNotificationUserConfig } from './interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ToastNotificationConfigService {\n private dataControl = new DataControl();\n authorConfig: IToastNotificationUserConfig = new ToastSettings();\n productionConfig: IToastNotificationUserConfig = new ToastSettings();\n\n constructor(\n @Inject('toastNotificationConfig')\n private userConfig: IToastNotificationUserConfig = {}\n ) {\n // region *** toastNotification userConfig (user input app-module) ***\n const userConfigBase = new ToastSettings();\n\n this.dataControl.copyValuesFrom(userConfig.toastCoreConfig, userConfigBase.toastCoreConfig); // this will make sure that object has right properties\n\n userConfig.toastCoreConfig = userConfigBase.toastCoreConfig;\n // endregion\n\n // region *** author default config values (if there is no user input) ***\n this.authorConfig.toastCoreConfig.buttonPosition = 'right';\n this.authorConfig.toastCoreConfig.textPosition = 'left';\n this.authorConfig.toastCoreConfig.toastPosition = ToastPositionEnum.TOP_RIGHT;\n this.authorConfig.toastCoreConfig.progressBar = ToastProgressBarEnum.INCREASE;\n this.authorConfig.toastCoreConfig.toastUserViewType = ToastUserViewTypeEnum.SIMPLE;\n this.authorConfig.toastCoreConfig.autoCloseDelay = 2500;\n this.authorConfig.toastCoreConfig.disableIcon = false;\n this.authorConfig.toastCoreConfig.allowHtmlMessage = true;\n this.authorConfig.toastCoreConfig.layoutType = DialogLayoutDisplay.NONE;\n this.authorConfig.globalSettings.allowedNotificationsAtOnce = 5;\n this.authorConfig.toastCoreConfig.animationIn = AppearanceAnimation.ZOOM_IN;\n this.authorConfig.toastCoreConfig.animationOut = DisappearanceAnimation.ZOOM_OUT;\n this.authorConfig.toastCoreConfig.customStyles = new ToastCustomStyles();\n this.authorConfig.toastCoreConfig.iconStyleClass = null;\n\n // endregion\n\n // region *** Production setup ***\n\n this.setResetGlobalToastConfig();\n this.dataControl.copyValuesFrom(this.authorConfig.toastCoreConfig, this.productionConfig.toastCoreConfig);\n this.dataControl.copyValuesFrom(this.userConfig.toastCoreConfig, this.productionConfig.toastCoreConfig);\n // endregion\n }\n\n setResetGlobalToastConfig(globalToastConfig?: IGlobalToastSettings): void {\n this.dataControl.copyValuesFrom(this.authorConfig.globalSettings, this.productionConfig.globalSettings);\n this.dataControl.copyValuesFrom(\n globalToastConfig ? globalToastConfig : this.userConfig.globalSettings,\n this.productionConfig.globalSettings\n );\n }\n}\n","import { Directive, ElementRef, Inject, OnDestroy, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { BehaviorSubject, Observable, of, Subscription } from 'rxjs';\nimport { delay, take, tap } from 'rxjs/operators';\nimport { AppearanceAnimation, DisappearanceAnimation } from '../../../core/enums';\nimport { Timer } from '../../../core/global-classes';\nimport { IButton } from '../../../core/global-interfaces';\nimport { LayoutHelperService } from '../../../core/layout-helper.service';\n\nimport { ToastNotificationBelonging, ToastNotificationDefaultResponse } from './classes';\n\n@Directive()\nexport abstract class WrapperAbstraction implements OnDestroy {\n private closeIsClicked = false;\n private autoClosingHasStarted = false;\n @ViewChild('elTextWrapper') elTextWrapper: ElementRef;\n @ViewChild('elTitleWrapper') elTitleWrapper: ElementRef;\n @ViewChild('elButtonWrapper') elButtonWrapper: ElementRef;\n @ViewChildren('elButton') elButton: QueryList;\n fadeInOutAnimation = 'open';\n timerStarted$ = new BehaviorSubject('start-counter');\n subsToClosingDelay: Subscription;\n subTimer: Subscription;\n isTimerStarted = false;\n timeout;\n timer: Timer = new Timer();\n boxAnimation: AppearanceAnimation | DisappearanceAnimation | 'reset';\n appearanceAnimation = AppearanceAnimation;\n disappearanceAnimation = DisappearanceAnimation;\n\n protected constructor(\n @Inject('toastNotificationBelonging') public toastNotificationBelonging: ToastNotificationBelonging,\n public layoutHelper: LayoutHelperService\n ) {\n setTimeout(() => {\n this.boxAnimation = this.toastNotificationBelonging.toastCoreConfig.animationIn;\n }, 1);\n }\n\n get autoCloseCondition(): boolean {\n return (\n this.toastNotificationBelonging.toastCoreConfig.autoCloseDelay &&\n !(\n this.toastNotificationBelonging.buttons.length ||\n this.toastNotificationBelonging.toastCoreConfig.declineLabel ||\n this.toastNotificationBelonging.toastCoreConfig.confirmLabel\n )\n );\n }\n\n get buttonsExist(): boolean {\n return (\n !!this.toastNotificationBelonging.buttons.length ||\n !!this.toastNotificationBelonging.toastCoreConfig.declineLabel ||\n !!this.toastNotificationBelonging.toastCoreConfig.confirmLabel\n );\n }\n\n setCustomStyles(): void {\n if (this.toastNotificationBelonging.toastCoreConfig.customStyles.textCSS && this.elTextWrapper) {\n this.elTextWrapper.nativeElement.style.cssText += this.toastNotificationBelonging.toastCoreConfig.customStyles.textCSS;\n }\n if (this.toastNotificationBelonging.toastCoreConfig.customStyles.titleCSS && this.elTitleWrapper) {\n this.elTitleWrapper.nativeElement.style.cssText += this.toastNotificationBelonging.toastCoreConfig.customStyles.titleCSS;\n }\n if (this.toastNotificationBelonging.toastCoreConfig.customStyles.buttonSectionCSS && this.elButtonWrapper) {\n this.elButtonWrapper.nativeElement.style.cssText += this.toastNotificationBelonging.toastCoreConfig.customStyles.buttonSectionCSS;\n }\n if (this.toastNotificationBelonging.toastCoreConfig.customStyles.buttonCSS && this.elButton) {\n this.elButton.forEach(el => {\n el.nativeElement.style.cssText += this.toastNotificationBelonging.toastCoreConfig.customStyles.buttonCSS;\n });\n }\n }\n\n mouseOver(): void {\n if (!this.buttonsExist && !this.closeIsClicked && !this.autoClosingHasStarted) {\n this.timerStarted$.next('stop-counter');\n this.fadeInOutAnimation = 'open';\n this.subsToClosingDelay?.unsubscribe();\n this.boxAnimation = 'reset';\n }\n }\n\n mouseOut(): void {\n if (!this.buttonsExist && !this.closeIsClicked && !this.autoClosingHasStarted) {\n this.timerStarted$.next('start-counter');\n }\n }\n\n onOverlayClicked(evt: MouseEvent): void {\n // console.log('onOverlayClicked');\n }\n\n onToastClicked(evt: MouseEvent): void {\n // console.log('onOverlayClicked');\n }\n\n setResponse(_IsSuccess: boolean, _ClickedButtonID?: string): void {\n const response = new ToastNotificationDefaultResponse();\n if (_ClickedButtonID) {\n response.clickedButtonID = _ClickedButtonID;\n }\n\n response.setSuccess(_IsSuccess);\n response.setBelonging(this.toastNotificationBelonging);\n this.toastNotificationBelonging.eventsController.setDefaultResponse(response);\n }\n\n onCustomButton(_Button: IButton): void {\n this.toastNotificationBelonging.eventsController.onButtonClick(_Button);\n this.setResponse(true, _Button.ID);\n this.toastNotificationBelonging.eventsController.close();\n }\n\n onButtonClick(_Type: 'confirm' | 'decline'): void {\n let buttonID;\n if (_Type === 'confirm') {\n buttonID = this.toastNotificationBelonging.toastCoreConfig.confirmLabel.toLowerCase();\n } else if (_Type === 'decline') {\n buttonID = this.toastNotificationBelonging.toastCoreConfig.declineLabel.toLowerCase();\n }\n\n this.setResponse(_Type === 'confirm', buttonID);\n this.toastNotificationBelonging.eventsController.close();\n }\n\n autoClose(): void {\n if (this.autoCloseCondition) {\n this.timer.setMilliseconds(this.toastNotificationBelonging.toastCoreConfig.autoCloseDelay);\n this.subTimer = this.timerStarted$\n .pipe(\n tap(next => {\n if ('start-counter' === next) {\n this.timer.start();\n this.isTimerStarted = true;\n this.timeout = setTimeout(() => {\n this.subsToClosingDelay = this.closeParent$().subscribe(resp => {\n this.toastNotificationBelonging.eventsController.close();\n });\n }, this.toastNotificationBelonging.toastCoreConfig.autoCloseDelay);\n } else if ('stop-counter' === next) {\n if (this.isTimerStarted) {\n this.timer.stop();\n clearTimeout(this.timeout);\n this.isTimerStarted = false;\n }\n }\n })\n )\n .subscribe();\n }\n }\n\n closeParent$(): Observable {\n this.autoClosingHasStarted = true;\n this.boxAnimation = this.toastNotificationBelonging.toastCoreConfig.animationOut;\n const closeDuration = this.toastNotificationBelonging.toastCoreConfig.animationOut ? 400 : 200;\n this.fadeInOutAnimation = 'close-fast';\n return of('').pipe(delay(closeDuration));\n }\n\n close(): void {\n this.toastNotificationBelonging.eventsController.close();\n }\n\n closeIcon(): void {\n this.closeIsClicked = true;\n this.subsToClosingDelay?.unsubscribe();\n this.closeParent$()\n .pipe(take(1))\n .subscribe(resp => {\n this.toastNotificationBelonging.eventsController.close();\n });\n }\n\n ngOnDestroy(): void {\n this.subsToClosingDelay?.unsubscribe();\n this.subTimer?.unsubscribe();\n }\n\n getIconClasses(): string {\n return (\n 'icon-type-toast ' +\n this.layoutHelper.getIconClasses(\n this.toastNotificationBelonging.toastCoreConfig.layoutType,\n this.toastNotificationBelonging.toastCoreConfig.iconStyleClass\n )\n );\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { ServiceLocator } from '../locator.service';\nimport { ColorVariance } from './enums';\nimport { ColorProvider, GlobalConfig, GlobalUserConfig } from './global-classes';\nimport { IColorObject, IColorProvider, IColorTypes, IGlobalConfig, IGlobalUserConfig } from './global-interfaces';\n\nexport class ResetGlobalConfig {\n constructor(globalConfig?: IGlobalUserConfig) {\n const globalConfigService: GlobalConfigService = ServiceLocator.injector.get(GlobalConfigService);\n if (globalConfig) {\n globalConfigService.setUserColors(globalConfig.colorList);\n globalConfigService.setNodeStyles(globalConfigService.productionGlobalConfig.displayColor, true);\n } else {\n globalConfigService.resetStyles();\n }\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GlobalConfigService {\n private authorGlobalConfig: IGlobalConfig = new GlobalConfig();\n private userGeneratedConfig: IGlobalUserConfig;\n productionGlobalConfig: IGlobalConfig = new GlobalConfig();\n\n constructor(\n @Inject('cdGlobalConfig')\n private userGlobalConfig: IGlobalUserConfig\n ) {\n this.userGeneratedConfig = new GlobalUserConfig(userGlobalConfig);\n\n // region *** author global config values (if there is no user input) ***\n this.authorGlobalConfig.displayColor.primary = null; // new ColorProvider('#ff9e00');\n this.authorGlobalConfig.displayColor.secondary = null; // new ColorProvider('#989ea5');\n this.authorGlobalConfig.displayColor.success = null; // new ColorProvider('#3caea3');\n this.authorGlobalConfig.displayColor.info = null; // new ColorProvider('#2f8ee5');\n this.authorGlobalConfig.displayColor.warning = null; // new ColorProvider('#ffc107');\n this.authorGlobalConfig.displayColor.danger = null; // new ColorProvider('#e46464');\n this.authorGlobalConfig.displayColor.light = null; // new ColorProvider('#f8f9fa');\n this.authorGlobalConfig.displayColor.dark = null; // new ColorProvider('#343a40');\n this.authorGlobalConfig.displayColor.customOne = null; // new ColorProvider('#343a40');\n this.authorGlobalConfig.displayColor.customTwo = null; // new ColorProvider('#343a40');\n this.authorGlobalConfig.displayColor.customThree = null; // new ColorProvider('#343a40');\n this.authorGlobalConfig.displayColor.customFour = null; // new ColorProvider('#343a40');\n this.authorGlobalConfig.displayColor.customFive = null; // new ColorProvider('#343a40');\n // endregion\n\n this.productionGlobalConfig.displayColor = this.authorGlobalConfig.displayColor;\n\n // region *** global userConfig (user input app-module) ***\n this.setUserColors(this.userGeneratedConfig.colorList);\n\n // endregion\n\n this.setNodeStyles(this.productionGlobalConfig.displayColor);\n }\n\n resetStyles(): void {\n this.setUserColors(this.userGeneratedConfig.colorList);\n this.setNodeStyles(this.productionGlobalConfig.displayColor, true);\n }\n\n setNodeStyles(_ProductionColorTypes: IColorObject, _Reset: boolean = false): void {\n if (_Reset) {\n const evolveDialogStyleNode = document.getElementById('ngx-awesome-popup-glob-styles') as HTMLStyleElement;\n if (evolveDialogStyleNode) {\n evolveDialogStyleNode.remove();\n }\n }\n this.setToastStyles();\n\n Object.keys(_ProductionColorTypes).forEach(key => {\n if (_ProductionColorTypes[key]) {\n this.setButtonStyling(key, _ProductionColorTypes[key]);\n this.setIconStyling(key, _ProductionColorTypes[key]);\n this.setToastStyling(key, _ProductionColorTypes[key]);\n this.setDialogFrame(key, _ProductionColorTypes[key]);\n\n if (ColorVariance[key.toUpperCase()] === ColorVariance.PRIMARY) {\n this.getSheet('ngx-awesome-popup-styles').addRule(\n '.ngx-awesome-popup-overlay',\n `background: ${_ProductionColorTypes[key].TransparentDarkenVariance}!important;`\n );\n }\n }\n });\n }\n\n public setUserColors(_UserColorTypes: IColorTypes): void {\n if (typeof _UserColorTypes !== 'object') {\n return;\n }\n\n const userKeys = Object.keys(_UserColorTypes);\n const productionObjectKeys = Object.keys(this.productionGlobalConfig.displayColor);\n\n userKeys.forEach(key => {\n if (productionObjectKeys.find(tKey => tKey === key)) {\n if (_UserColorTypes[key]) {\n const baseColorProvider = new ColorProvider(_UserColorTypes[key]);\n if (baseColorProvider.Base) {\n this.productionGlobalConfig.displayColor[key] = baseColorProvider;\n }\n } else {\n this.productionGlobalConfig.displayColor[key] = null;\n }\n }\n });\n }\n\n public getSheet(_StyleID: string): undefined | CSSStyleSheet {\n // Create the