codefoxcore 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"codefoxcore.mjs","sources":["../../../projects/codefoxcore/src/lib/classes/dialog.ref.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.config.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.injector.class.ts","../../../projects/codefoxcore/src/lib/tokens/alert.token.ts","../../../projects/codefoxcore/src/lib/tokens/dialog.token.ts","../../../projects/codefoxcore/src/lib/tokens/confirm.token.ts","../../../projects/codefoxcore/src/lib/interfaces.ts","../../../projects/codefoxcore/src/lib/tokens/message.token.ts","../../../projects/codefoxcore/src/lib/tokens/loglevel.token.ts","../../../projects/codefoxcore/src/lib/services/dialog.service.ts","../../../projects/codefoxcore/src/lib/services/message.service.ts","../../../projects/codefoxcore/src/lib/services/logger.service.ts","../../../projects/codefoxcore/src/lib/services/api.service.ts","../../../projects/codefoxcore/src/codefoxcore.ts"],"sourcesContent":["import { filter, Observable, Subject, takeUntil } from \"rxjs\";\r\nimport { CfDialogCloseParams } from \"../interfaces\";\r\nimport { MessageService } from \"../services\";\r\nimport { DialogConfig } from \"../classes\";\r\n\r\nexport class DialogRef<T = any> {\r\n\tmessageService: MessageService | null = null;\r\n dialogConfig: DialogConfig | null = null;\r\n\tprivate readonly _onClose: Subject<any> = new Subject<any>();\r\n onClose: Observable<T | undefined> = this._onClose.asObservable();\r\n onCloseValue: Observable<T> = this._onClose.pipe(filter(result => result !== undefined && result !== null));\r\n onCloseOnValue: (value: any) => Observable<any> = (value: any) => this._onClose.pipe(filter(result => result === value));\r\n private readonly _onMessage: Subject<any> = new Subject<any>();\r\n\tonMessage: Observable<any> = this._onMessage.asObservable();\r\n private readonly _onDestroy = new Subject<any>();\r\n onDestroy: Observable<any> = this._onDestroy.asObservable();\r\n\tsavedTitle: string = '';\r\n\ttitle: string | null = null;\r\n\topened: Date = new Date();\r\n\tprivate doClose(result?: any, params: CfDialogCloseParams = {}): void {\r\n\t\tif (params.message !== undefined && this.messageService !== null) {\r\n\t\t\tthis.messageService.show(params.message.title, params.message.message, params.message);\r\n\t\t}\r\n\t\tthis._onClose.next(result); \r\n\t}\r\n close(result?: any, params: CfDialogCloseParams = {}): void { \r\n\t\tif (this.dialogConfig === null || this.dialogConfig.beforeClose === null) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.dialogConfig.beforeClose instanceof Promise) {\r\n\t\t\tthis.dialogConfig.beforeClose.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.dialogConfig.beforeClose instanceof Observable) {\r\n\t\t\tthis.dialogConfig.beforeClose.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tconst beforeCloseResult: boolean | Observable<boolean> | Promise<boolean> = this.dialogConfig.beforeClose();\r\n\r\n\t\tif (beforeCloseResult instanceof Promise) {\r\n\t\t\tbeforeCloseResult.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult instanceof Observable) {\r\n\t\t\tbeforeCloseResult.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t}\r\n\t}\r\n forceClose(result?: any): void {\r\n this.doClose(result);\r\n }\r\n\tmessage(message: any): void { this._onMessage.next(message); }\r\n destroy(): void { this._onDestroy.next(undefined); }\r\n}\r\n","import { ResolveData } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogConfiguration } from \"../interfaces\";\r\n\r\nexport class DialogConfig implements DialogConfiguration {\r\n showCloseIcon: boolean = true;\r\n\tbeforeClose: null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean> = null;\r\n\tignoreKeyUp: boolean = false;\r\n data: {[key: (string | number)]: any} = {};\r\n noPadding: boolean = false;\r\n\tkeepActiveElement: boolean = false;\r\n\tcontainerClasses: string[] = [];\r\n\tdialogClasses: string[] = [];\r\n resolve: ResolveData = {};\r\n\ttitle: string | null = null;\r\n contentElement: Element | null = null;\r\n single: boolean = false;\r\n width: string | null = null;\r\n\theight: string | null = null;\r\n getData(key: string | number, defaultOnUndefined: any = null): any {\r\n return this.data[key] !== undefined ? this.data[key] : defaultOnUndefined;\r\n }\r\n}\r\n","import { InjectionToken, Injector, Type } from \"@angular/core\";\r\n\r\nexport class DialogInjector implements Injector {\r\n constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: {}): T;\r\n get(token: any, notFoundValue?: any): any;\r\n get(token: any, notFoundValue?: any, _?: any): any {\r\n const value = this._additionalTokens.get(token);\r\n if (value) { return value; }\r\n return this._parentInjector.get<any>(token, notFoundValue);\r\n }\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { AlertButtonConfiguration, AlertConfiguration } from \"../interfaces\";\r\n\r\nexport const ALERT_DEFAULT_BUTTON_CONFIGURATION: InjectionToken<AlertButtonConfiguration> = new InjectionToken('Alert default button', {\r\n\tfactory: (): AlertButtonConfiguration => {\r\n\t\treturn {\r\n\t\t\tlabel: 'alert.ok',\r\n\t\t\tseverity: 'success',\r\n\t\t\tcallback: ({ dialogRef }) => {\r\n\t\t\t\tdialogRef.close();\r\n\t\t\t},\r\n\t\t\tfocus: true,\r\n\t\t\ttranslateLabel: true\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport const ALERT_CONFIGURATIONS: InjectionToken<{[key: string]: AlertConfiguration}> = new InjectionToken('Alert configurations predefined', {\r\n factory: (): {[key: string]: AlertConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { PredefinedDialogs } from \"../interfaces\";\r\n\r\nexport const CF_PREDEFINED_DIALOGS: InjectionToken<PredefinedDialogs> = new InjectionToken('Predefined dialogs', {\r\n factory: () => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { ConfirmConfiguration } from \"../interfaces\";\r\n\r\nexport const CONFIRM_CONFIGURATIONS: InjectionToken<{[key: string]: ConfirmConfiguration}> = new InjectionToken('Confirm configurations predefined', {\r\n factory: (): {[key: string]: ConfirmConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { ComponentRef, Type } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogRef } from \"./classes/dialog.ref.class\";\r\n\r\nexport interface DialogComponentRefContainer {\r\n componentRef: ComponentRef<any>;\r\n container: HTMLDivElement;\r\n\topenIndex: number;\r\n}\r\n\r\nexport type PredefinedDialogs = {[key: string]: (() => Promise<Type<any>>) | {component: () => Promise<Type<any>>, configuration: DialogConfiguration}};\r\n\r\nexport interface DialogConfiguration {\r\n showCloseIcon?: boolean;\r\n\tbeforeClose?: CfDialogConfigurationBeforeClose;\r\n\tignoreKeyUp?: boolean;\r\n data?: any;\r\n noPadding?: boolean;\r\n\tkeepActiveElement?: boolean;\r\n\tcontainerClasses?: string[];\r\n\tdialogClasses?: string[];\r\n\ttitle?: string | null;\r\n contentElement?: Element | null;\r\n single?: boolean;\r\n width?: string | null;\r\n\theight?: string | null;\r\n}\r\n\r\nexport type CfDialogConfigurationBeforeClose = null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean>;\r\n\r\nexport interface ConfirmConfiguration {\r\n title: string;\r\n text: string;\r\n acceptText: string;\r\n declineText: string;\r\n\thideDeclineButton?: boolean;\r\n switchButtonColors?: boolean;\r\n acceptTimeout?: number;\r\n acceptValidationText?: string;\r\n acceptValidationMode?: AcceptValidationMode;\r\n acceptValidationLabel?: string;\r\n}\r\n\r\nexport interface AlertConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbutton?: Partial<AlertButtonConfiguration>;\r\n}\r\n\r\nexport enum AcceptValidationMode {\r\n PATTERN = 'PATTERN',\r\n TEXT = 'TEXT'\r\n}\r\n\r\nexport interface AlertButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback: (params: {dialogRef: DialogRef}) => void;\r\n\ttranslateLabel: boolean;\r\n\tfocus: boolean;\r\n}\r\n\r\nexport interface CfDialogCloseParams {\r\n message?: MessagePartial;\r\n}\r\n\r\nexport interface MessagePartial extends Partial<MessageConfiguration> {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport interface MessageConfiguration {\r\n closeable: boolean;\r\n position: MessagePosition;\r\n lifetime: number | null;\r\n severity: MessageSeverity;\r\n\tkeepOnHover: boolean;\r\n}\r\nexport enum MessagePosition {\r\n TOP = 'top',\r\n BOTTOM = 'bottom'\r\n}\r\n\r\nexport enum MessageSeverity {\r\n SUCCESS = 'success',\r\n WARNING = 'warning',\r\n DANGER = 'danger',\r\n INFO = 'info'\r\n}\r\n\r\nexport interface LoadingConfiguration {\r\n title: string;\r\n text: string;\r\n\tloadingIcon?: string;\r\n iconSize?: number;\r\n}\r\n\r\nexport interface ModalWithButtonsConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbuttons: ButtonConfiguration[];\r\n}\r\n\r\nexport interface ButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback?: (params: {dialogRef: DialogRef}) => void;\r\n\trouterLink?: any;\r\n\tfocus?: boolean;\r\n\tpermission?: string | string[];\r\n\ttranslateLabel?: boolean;\r\n}\r\n\r\nexport interface Message extends MessageConfiguration {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport enum LogLevel {\r\n All = 0,\r\n Debug = 1,\r\n Info = 2,\r\n Warn = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n Off = 6\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { MessageConfiguration, MessagePosition, MessageSeverity } from \"../interfaces\";\r\n\r\nexport const MESSAGE_DEFAULT_CONFIGURATION: InjectionToken<MessageConfiguration> = new InjectionToken('Message default configuration', {\r\n\tfactory: (): MessageConfiguration => {\r\n\t\treturn {\r\n\t\t\tcloseable: true,\r\n\t\t\tlifetime: 3000,\r\n\t\t\tposition: MessagePosition.TOP,\r\n\t\t\tseverity: MessageSeverity.SUCCESS,\r\n\t\t\tkeepOnHover: false\r\n\t\t};\r\n\t}\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { LogLevel } from \"../interfaces\";\r\n\r\nexport const LOG_LEVEL: InjectionToken<LogLevel> = new InjectionToken('Log level', {\r\n factory: (): LogLevel => {\r\n return LogLevel.All;\r\n }\r\n});\r\n","import { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n ApplicationRef,\r\n ComponentRef,\r\n createComponent,\r\n EmbeddedViewRef,\r\n inject,\r\n Injectable,\r\n Injector,\r\n PLATFORM_ID,\r\n Type\r\n} from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { filter, Subscription } from 'rxjs';\r\nimport { AlertConfiguration, DialogConfiguration, ConfirmConfiguration, LoadingConfiguration, ModalWithButtonsConfiguration, PredefinedDialogs, DialogComponentRefContainer } from '../interfaces';\r\nimport { DialogConfig, DialogInjector, DialogRef } from '../classes';\r\nimport { ALERT_CONFIGURATIONS, CF_PREDEFINED_DIALOGS, CONFIRM_CONFIGURATIONS } from '../tokens';\r\nimport { MessageService } from '../services';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DialogService {\r\n\r\n\tprivate injector: Injector = inject(Injector);\r\n\tprivate predefinedConfirmConfigurations: {[key: string]: ConfirmConfiguration} = inject(CONFIRM_CONFIGURATIONS);\r\n\tprivate predefinedAlertConfigurations: {[key: string]: AlertConfiguration} = inject(ALERT_CONFIGURATIONS);\r\n\tprivate predefinedDialogs: PredefinedDialogs = inject(CF_PREDEFINED_DIALOGS);\r\n\r\n\ttitle: Title = inject(Title);\r\n\tmessageService: MessageService = inject(MessageService);\r\n\r\n\tdialogs: Map<DialogRef, DialogComponentRefContainer> = new Map();\r\n\topenIndex: number = 1;\r\n\tplatformId: Object = inject(PLATFORM_ID);\r\n\r\n constructor() {\r\n\t\tif (isPlatformBrowser(this.platformId)) {\r\n\t\t\tdocument.addEventListener(\"keyup\", (keyboardEvent: KeyboardEvent) => {\r\n\t\t\t\tif (keyboardEvent.key.toLowerCase() === 'escape') {\r\n\t\t\t\t\tlet lastOpenIndex: number = 0;\r\n\t\t\t\t\tlet lastOpenedDialogRef: DialogRef | null = null;\r\n\t\t\t\t\tfor (const [dialogRef, cfDialogComponentRefContainer] of this.dialogs.entries()) {\r\n\t\t\t\t\t\tif (cfDialogComponentRefContainer.openIndex > lastOpenIndex) {\r\n\t\t\t\t\t\t\tlastOpenIndex = cfDialogComponentRefContainer.openIndex;\r\n\t\t\t\t\t\t\tlastOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif (lastOpenedDialogRef !== null && lastOpenedDialogRef.dialogConfig !== null) {\r\n\t\t\t\t\t\tif (lastOpenedDialogRef.dialogConfig.ignoreKeyUp || document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tlastOpenedDialogRef.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tasync openPredefined<T = any>(name: string, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\tif (this.predefinedDialogs[name] === undefined) {\r\n\t\t\tthrow Error('Dialog with name \"' + name + '\" not found!');\r\n\t\t}\r\n\t\tconst predefinedDialog = this.predefinedDialogs[name];\r\n\t\tif (typeof predefinedDialog === 'function') {\r\n\t\t\treturn this.openImport(predefinedDialog, dialogConfiguration);\r\n\t\t}\r\n\t\treturn this.openImport(predefinedDialog.component, {...predefinedDialog.configuration, ...dialogConfiguration});\r\n\t}\r\n\r\n\tasync openImport<T = any>(component: () => Promise<Type<any>>, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\treturn new Promise(async (resolve) => {\r\n\t\t\tresolve(this.open<T>(await component(), dialogConfiguration));\r\n\t\t});\r\n\t}\r\n\r\n open<T = any>(component: Type<any>, dialogConfiguration: DialogConfiguration = {}): DialogRef<T> {\r\n\r\n\t\tfor (let dialog of this.dialogs.entries()) {\r\n\t\t\tif (\r\n\t\t\t\t(dialogConfiguration.single && dialog[1].componentRef.componentType.name === component.name) ||\r\n\t\t\t\t(dialog[0].dialogConfig !== null && dialog[0].dialogConfig.single && dialog[1].componentRef.componentType.name === component.name)\r\n\t\t\t) {\r\n\t\t\t\treturn dialog[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogConfig: DialogConfig = this.createDialogConfig(dialogConfiguration);\r\n\r\n\t\tif (!dialogConfig.keepActiveElement) {\r\n\t\t\tif (document.activeElement instanceof HTMLElement) {\r\n\t\t\t\tdocument.activeElement.blur();\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogRef: DialogRef<T> = this.appendToBody(component, dialogConfig);\r\n\t\tdialogRef.messageService = this.messageService;\r\n\t\tdialogRef.dialogConfig = dialogConfig;\r\n\r\n\t\tthis.changeAndStoreTitle(dialogRef);\r\n\r\n return dialogRef;\r\n }\r\n\r\n\tchangeAndStoreTitle(dialogRef: DialogRef): void {\r\n\t\tdialogRef.savedTitle = this.title.getTitle();\r\n\t\tif (dialogRef.dialogConfig !== null && dialogRef.dialogConfig.title !== null) {\r\n\t\t\tthis.title.setTitle(dialogRef.dialogConfig.title);\r\n\t\t}\r\n\t}\r\n\r\n createDialogConfig(dialogConfiguration: DialogConfiguration): DialogConfig {\r\n const dialogConfig: DialogConfig = new DialogConfig();\r\n if (dialogConfiguration.showCloseIcon !== undefined) {\r\n dialogConfig.showCloseIcon = dialogConfiguration.showCloseIcon;\r\n }\r\n\t\tif (dialogConfiguration.beforeClose !== undefined) {\r\n dialogConfig.beforeClose = dialogConfiguration.beforeClose;\r\n }\r\n\t\tif (dialogConfiguration.ignoreKeyUp !== undefined) {\r\n dialogConfig.ignoreKeyUp = dialogConfiguration.ignoreKeyUp;\r\n }\r\n if (dialogConfiguration.data !== undefined) {\r\n dialogConfig.data = dialogConfiguration.data;\r\n }\r\n if (dialogConfiguration.noPadding !== undefined) {\r\n dialogConfig.noPadding = dialogConfiguration.noPadding;\r\n }\r\n\t\tif (dialogConfiguration.keepActiveElement !== undefined) {\r\n\t\t\tdialogConfig.keepActiveElement = dialogConfiguration.keepActiveElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.containerClasses !== undefined) {\r\n\t\t\tdialogConfig.containerClasses = dialogConfiguration.containerClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.dialogClasses !== undefined) {\r\n\t\t\tdialogConfig.dialogClasses = dialogConfiguration.dialogClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.title !== undefined) {\r\n\t\t\tdialogConfig.title = dialogConfiguration.title;\r\n\t\t}\r\n\t\tif (dialogConfiguration.contentElement !== undefined) {\r\n\t\t\tdialogConfig.contentElement = dialogConfiguration.contentElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.single !== undefined) {\r\n\t\t\tdialogConfig.single = dialogConfiguration.single;\r\n\t\t}\r\n\t\tif (dialogConfiguration.width !== undefined) {\r\n\t\t\tdialogConfig.width = dialogConfiguration.width;\r\n\t\t}\r\n\t\tif (dialogConfiguration.height !== undefined) {\r\n\t\t\tdialogConfig.height = dialogConfiguration.height;\r\n\t\t}\r\n return dialogConfig;\r\n }\r\n\r\n appendToBody(component: Type<any>, dialogConfig: DialogConfig): DialogRef {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n // CREATE INJECTION TOKENS\r\n const tokens: WeakMap<any, any> = new WeakMap();\r\n\r\n // CREATE DIALOG CONFIGURATION CLASS\r\n tokens.set(DialogConfig, dialogConfig);\r\n\r\n // CREATE DIALOG REFERENCE CLASS\r\n const dialogRef: DialogRef = new DialogRef();\r\n tokens.set(DialogRef, dialogRef);\r\n\r\n // LISTEN ON DIALOG CLOSE\r\n const closeSub: Subscription = dialogRef.onClose.subscribe(() => {\r\n this.removeFromBody(dialogRef);\r\n closeSub.unsubscribe();\r\n });\r\n\r\n // CREATE COMPONENT REF\r\n const componentRef: ComponentRef<any> = createComponent(component, {\r\n\t\t\tenvironmentInjector: appRef.injector,\r\n\t\t\telementInjector: new DialogInjector(this.injector, tokens)\r\n\t\t});\r\n\r\n // ATTACH VIEW TO ANGULAR\r\n appRef.attachView(componentRef.hostView);\r\n\r\n // CREATE DIALOG CONTAINER ELEMENT\r\n const dialogContainer: HTMLDivElement = document.createElement('div');\r\n dialogContainer.classList.add('cf-dialog-container');\r\n\t\tif (dialogConfig.containerClasses.length > 0) {\r\n\t\t\tdialogContainer.classList.add(...dialogConfig.containerClasses);\r\n\t\t}\r\n\r\n\t\t// APPEND DOM ELEMENT TO DIALOG\r\n\t\tconst childDomElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n\t\tchildDomElem.classList.add('cf-dialog');\r\n\t\t\r\n\t\tif (dialogConfig.width !== null) {\r\n\t\t\tchildDomElem.style.width = dialogConfig.width;\r\n\t\t}\r\n\t\tif (dialogConfig.height !== null) {\r\n\t\t\tchildDomElem.style.height = dialogConfig.height;\r\n\t\t}\r\n\t\tif (dialogConfig.noPadding) {\r\n childDomElem.classList.add('no-padding');\r\n }\r\n\t\tif (dialogConfig.dialogClasses.length > 0) {\r\n\t\t\tchildDomElem.classList.add(...dialogConfig.dialogClasses);\r\n\t\t}\r\n\r\n\t\tif (dialogConfig.contentElement !== null) {\r\n\t\t\tchildDomElem.appendChild(dialogConfig.contentElement);\r\n\t\t}\r\n\r\n\t\tdialogContainer.appendChild(childDomElem);\r\n\r\n // CLOSEABLE? APPEND BUTTON\r\n if (dialogConfig.showCloseIcon) {\r\n const closeElement: HTMLDivElement = document.createElement('div');\r\n closeElement.classList.add(...['cf-dialog-close', 'remixicon', 'close-line']);\r\n closeElement.onclick = () => {\r\n dialogRef.close();\r\n };\r\n childDomElem.appendChild(closeElement);\r\n }\r\n\r\n // APPEND DIALOG CONTAINER TO BODY\r\n document.body.appendChild(dialogContainer);\r\n\r\n this.dialogs.set(dialogRef, {\r\n componentRef,\r\n container: dialogContainer,\r\n\t\t\topenIndex: this.openIndex \r\n });\r\n\r\n\t\tthis.openIndex++;\r\n\r\n return dialogRef;\r\n }\r\n\r\n removeFromBody(dialogRef: DialogRef): void {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n if (!dialogRef || !this.dialogs.has(dialogRef)) {\r\n return;\r\n }\r\n const dialogComponentRefContainer: DialogComponentRefContainer | undefined = this.dialogs.get(dialogRef);\r\n if (dialogComponentRefContainer == undefined) {\r\n return;\r\n }\r\n\t\t\r\n appRef.detachView(dialogComponentRefContainer.componentRef.hostView);\r\n\r\n if (dialogComponentRefContainer.container !== null) {\r\n dialogComponentRefContainer.container.remove();\r\n }\r\n dialogComponentRefContainer.componentRef.destroy();\r\n this.dialogs.delete(dialogRef);\r\n\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.openIndex = 1;\r\n\t\t}\r\n\r\n\t\t// Restore title\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t} else {\r\n\t\t\tlet latestOpenedDialogRef: DialogRef | null = null;\r\n\t\t\tthis.dialogs.forEach((_, dialogRef: DialogRef) => {\r\n\t\t\t\tif (latestOpenedDialogRef === null) {\r\n\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (latestOpenedDialogRef.opened < dialogRef.opened) {\r\n\t\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif (latestOpenedDialogRef !== null) {\r\n\t\t\t\t//this.title.setTitle(latestOpenedDialogRef.savedTitle);\r\n\t\t\t} else {\r\n\t\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n\tconfirm(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedConfirmConfiguration: ConfirmConfiguration | undefined = this.predefinedConfirmConfigurations[configuration];\r\n\t\t\tif (predefinedConfirmConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined confirm configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedConfirmConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.pipe(filter(value => value !== undefined)).subscribe((accepted: boolean) => {\r\n\t\t\t\tif (accepted) {\r\n\t\t\t\t\tresolve(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treject(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n async confirmAsync(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n return await new Promise((resolve) => {\r\n this.confirm(configuration, dialogConfiguration, component).then(() => {\r\n resolve(true);\r\n }).catch(() => {\r\n resolve(false);\r\n });\r\n });\r\n }\r\n\t\r\n\tconfirmAccept(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => resolve(true)).catch(() => {});\r\n\t\t});\r\n\t}\r\n\t\r\n\tconfirmDecline(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => {}).catch(() => resolve(true));\r\n\t\t});\r\n\t}\r\n\r\n\tshowLoading(\r\n\t\tconfiguration: LoadingConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tshowCloseIcon: false,\r\n\t\t\tignoreKeyUp: true,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tshowAlert(\r\n\t\tconfiguration: AlertConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<void> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedAlertConfiguration: AlertConfiguration | undefined = this.predefinedAlertConfigurations[configuration];\r\n\t\t\tif (predefinedAlertConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined alert configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedAlertConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\treturn this.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.subscribe(() => {\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tshowModalWithButtons(\r\n\t\tconfiguration: ModalWithButtonsConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { Subject, Subscription, timer } from 'rxjs';\r\nimport { Message, MessageConfiguration, MessageSeverity } from '../interfaces';\r\nimport { MESSAGE_DEFAULT_CONFIGURATION } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class MessageService {\r\n\r\n /**\r\n * Default configuration\r\n * \r\n * Can be changed if you overwrite it or use the `MESSAGE_DEFAULT_CONFIGURATION` InjectionToken\r\n */\r\n public defaultConfiguration: MessageConfiguration = inject(MESSAGE_DEFAULT_CONFIGURATION);\r\n \r\n /**\r\n * Message subject\r\n */\r\n private messageSubject: Subject<Message> = new Subject();\r\n\r\n /**\r\n * Show\r\n * \r\n * Displays message with the given configuration\r\n * \r\n * @param messageConfiguration `Partial<MessageConfiguration>`\r\n */\r\n public show(title: string, message: string, configuration?: Partial<MessageConfiguration>): void {\r\n this.messageSubject.next({\r\n\t\t\t...this.defaultConfiguration,\r\n ...configuration,\r\n\t\t\ttitle,\r\n\t\t\tmessage\r\n });\r\n }\r\n\r\n /**\r\n * Show success message\r\n * \r\n * Display a message with default success severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showSuccessMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.SUCCESS\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show danger message\r\n * \r\n * Display a message with default danger severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showDangerMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.DANGER,\r\n\t\t\tkeepOnHover: true\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show warning message\r\n * \r\n * Display a message with default warning severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showWarningMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.WARNING\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show info message\r\n * \r\n * Display a message with default info severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showInfoMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.INFO\r\n\t\t});\r\n\t}\r\n\r\n private showMessage(message: Message): void {\r\n let container: HTMLElement | null = document.getElementById('cf-toasts-' + message.position + '-container');\r\n if (container === null) {\r\n container = document.createElement('div');\r\n container.id = 'cf-toasts-' + message.position + '-container';\r\n document.body.appendChild(container);\r\n }\r\n\r\n const div: HTMLElement = this.createMessageHtmlElement(message);\r\n\r\n container.appendChild(div);\r\n\r\n if (message.lifetime !== null) {\r\n\r\n\t\t\tlet disposeTimerSubscription: Subscription | null = timer(message.lifetime + 500).subscribe(() => {\r\n\t\t\t\tthis.hideMessage(div);\r\n\t\t\t});\r\n\r\n\t\t\tif (message.keepOnHover) {\r\n\t\t\t\tdiv.addEventListener('mouseenter', () => {\r\n\t\t\t\t\tif (disposeTimerSubscription !== null) {\r\n\t\t\t\t\t\tdisposeTimerSubscription.unsubscribe();\r\n\t\t\t\t\t\tdisposeTimerSubscription = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n }\r\n }\r\n\r\n private createMessageHtmlElement(message: Message): HTMLElement {\r\n const div: HTMLElement = document.createElement('div');\r\n div.classList.add('cf-toast', 'cf-' + message.severity + '-toast');\r\n const titleDiv: HTMLElement = document.createElement('div');\r\n titleDiv.classList.add('cf-toast-title');\r\n titleDiv.innerText = message.title;\r\n const messageDiv: HTMLElement = document.createElement('div');\r\n messageDiv.classList.add('cf-toast-message');\r\n messageDiv.innerText = message.message;\r\n div.appendChild(titleDiv);\r\n div.appendChild(messageDiv);\r\n if (message.closeable) {\r\n const closeIcon: HTMLElement = document.createElement('i');\r\n closeIcon.classList.add('close-icon', 'remixicon', 'close-line');\r\n closeIcon.onclick = () => {\r\n this.hideMessage(div, true);\r\n };\r\n div.appendChild(closeIcon);\r\n }\r\n return div;\r\n }\r\n\r\n private hideMessage(messageElement: HTMLElement, forceClose: boolean = false): void {\r\n messageElement.classList.add('hidden-toast');\r\n\r\n let remainOpen = false;\r\n messageElement.addEventListener('mouseenter', (() => {\r\n remainOpen = true;\r\n }));\r\n\r\n timer(500).subscribe(() => {\r\n if (remainOpen && !forceClose) {\r\n messageElement.classList.remove('hidden-toast');\r\n return;\r\n }\r\n messageElement.removeEventListener('mouseenter', (() => {}));\r\n messageElement.remove();\r\n });\r\n }\r\n\r\n constructor() {\r\n this.messageSubject.subscribe((message: Message) => {\r\n this.showMessage(message);\r\n });\r\n }\r\n\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { LogLevel } from '../interfaces';\r\nimport { LOG_LEVEL } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class LoggerService {\r\n\r\n\tprivate _logLevel: LogLevel | null = inject(LOG_LEVEL);\r\n\r\n\tprivate logLevelColors: string[] = [\r\n\t\t'',\r\n\t\t'background-color: #D2BDF3; padding: 5px 10px;',\r\n\t\t'background-color: #A2DDFF; padding: 5px 10px;',\r\n\t\t'background-color: #FFD5C5; padding: 5px 10px;',\r\n\t\t'background-color: #EA4331; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t'background-color: #F71900; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t''\r\n\t];\r\n\r\n\tpublic debug(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Debug, group });\r\n\t}\r\n\r\n\tpublic info(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Info, group });\r\n\t}\r\n\r\n\tpublic warn(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Warn, group });\r\n\t}\r\n\r\n\tpublic error(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Error, group });\r\n\t}\r\n\r\n\tpublic fatal(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Fatal, group });\r\n\t}\r\n\r\n\tpublic groupEnd(): void {\r\n\t\tconsole.groupEnd();\r\n\t}\r\n\r\n\tprivate log(configuration: {\r\n\t\tlog: any,\r\n\t\tlogLevel: LogLevel,\r\n\t\tgroup: boolean\r\n\t}): void {\r\n\t\tif (this._logLevel === null || this._logLevel === LogLevel.Off || this._logLevel > configuration.logLevel) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (configuration.group) {\r\n\t\t\tconsole.group(configuration.log);\r\n\t\t} else {\r\n\t\t\tconsole.log('%c' + configuration.log, this.logLevelColors[configuration.logLevel]);\r\n\t\t}\r\n\t}\r\n\r\n\tset logLevel(logLevel: LogLevel | null) {\r\n\t\tthis._logLevel = logLevel;\r\n\t}\r\n\r\n\tget logLevel(): LogLevel | null {\r\n\t\treturn this._logLevel;\r\n\t}\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApiService {\r\n\r\n\thttpClient: HttpClient = inject(HttpClient);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\tprivate _apiBaseUrl: string | null = null;\r\n\r\n\tpublic post<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.post<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic get<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic getFileArrayBuffer(endPoint: (string|number)[]): Observable<ArrayBuffer> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'arraybuffer'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getFileText(endPoint: (string|number)[]): Observable<string> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'text'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getWithHttpParams<T>(endPoint: (string|number)[], params: HttpParams | null = null): Observable<any> {\r\n\t\tif (params === null) {\r\n\t\t\treturn this.get(endPoint);\r\n\t\t} else {\r\n\t\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint), {\r\n\t\t\t\tparams\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.delete<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic patch<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.patch<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic head<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.head<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic options<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.options<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic put<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.put<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic generateUrl(endPoint: (string|number)[]): string {\r\n\t\tif (this._apiBaseUrl === null) {\r\n\t\t\tthrow new Error('No API base url set in generateUrl call!');\r\n\t\t}\r\n if (endPoint.length === 0) {\r\n return this._apiBaseUrl;\r\n }\r\n\t\tif (typeof endPoint[0] === 'string' && endPoint[0].startsWith('#')) {\r\n endPoint[0] = endPoint[0].slice(1);\r\n\t\t\treturn endPoint.map((v, i) => i === 0 ? v : encodeURIComponent(v)).join('/');\r\n\t\t}\r\n\t\treturn [this._apiBaseUrl, ...endPoint.map((v) => encodeURIComponent(v))].join('/');\r\n\t}\r\n\r\n\tset apiBaseUrl(apiBaseUrl: string) {\r\n\t\tthis.loggerService.info('Api Service base url set to: ' + apiBaseUrl);\r\n\t\tif (apiBaseUrl[apiBaseUrl.length - 1] === '/') {\r\n\t\t\tapiBaseUrl = apiBaseUrl.slice(0, apiBaseUrl.length - 1);\r\n\t\t}\r\n\t\tthis._apiBaseUrl = apiBaseUrl;\r\n\t}\r\n\r\n\tget apiBaseUrl(): string | null {\r\n\t\treturn this._apiBaseUrl;\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,SAAS,CAAA;AAAtB,IAAA,WAAA,GAAA;QACC,IAAc,CAAA,cAAA,GAA0B,IAAI,CAAC;QAC1C,IAAY,CAAA,YAAA,GAAwB,IAAI,CAAC;AAC3B,QAAA,IAAA,CAAA,QAAQ,GAAiB,IAAI,OAAO,EAAO,CAAC;AAC1D,QAAA,IAAA,CAAA,OAAO,GAA8B,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;QAClE,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC;QAC5G,IAAc,CAAA,cAAA,GAAoC,CAAC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AC,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACxD,SAAA;AACD,QAAA,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;KAC9B;AAED,IAAA,IAAI,UAAU,GAAA;QACb,OAAO,IAAI,CAAC,WAAW,CAAC;KACxB;+GAjFW,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cAFV,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAEN,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"codefoxcore.mjs","sources":["../../../projects/codefoxcore/src/lib/classes/dialog.ref.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.config.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.injector.class.ts","../../../projects/codefoxcore/src/lib/tokens/alert.token.ts","../../../projects/codefoxcore/src/lib/tokens/dialog.token.ts","../../../projects/codefoxcore/src/lib/tokens/confirm.token.ts","../../../projects/codefoxcore/src/lib/interfaces.ts","../../../projects/codefoxcore/src/lib/tokens/message.token.ts","../../../projects/codefoxcore/src/lib/tokens/loglevel.token.ts","../../../projects/codefoxcore/src/lib/services/dialog.service.ts","../../../projects/codefoxcore/src/lib/services/message.service.ts","../../../projects/codefoxcore/src/lib/services/logger.service.ts","../../../projects/codefoxcore/src/lib/services/api.service.ts","../../../projects/codefoxcore/src/lib/helpers.ts","../../../projects/codefoxcore/src/lib/services/cookie.service.ts","../../../projects/codefoxcore/src/lib/services/token.service.ts","../../../projects/codefoxcore/src/lib/services/interceptors.service.ts","../../../projects/codefoxcore/src/lib/interceptors/base.interceptor.ts","../../../projects/codefoxcore/src/lib/interceptors/token.interceptor.ts","../../../projects/codefoxcore/src/lib/providers.ts","../../../projects/codefoxcore/src/codefoxcore.ts"],"sourcesContent":["import { filter, Observable, Subject, takeUntil } from \"rxjs\";\r\nimport { CfDialogCloseParams } from \"../interfaces\";\r\nimport { MessageService } from \"../services\";\r\nimport { DialogConfig } from \"../classes\";\r\n\r\nexport class DialogRef<T = any> {\r\n\tmessageService: MessageService | null = null;\r\n dialogConfig: DialogConfig | null = null;\r\n\tprivate readonly _onClose: Subject<any> = new Subject<any>();\r\n onClose: Observable<T | undefined> = this._onClose.asObservable();\r\n onCloseValue: Observable<T> = this._onClose.pipe(filter(result => result !== undefined && result !== null));\r\n onCloseOnValue: (value: any) => Observable<any> = (value: any) => this._onClose.pipe(filter(result => result === value));\r\n private readonly _onMessage: Subject<any> = new Subject<any>();\r\n\tonMessage: Observable<any> = this._onMessage.asObservable();\r\n private readonly _onDestroy = new Subject<any>();\r\n onDestroy: Observable<any> = this._onDestroy.asObservable();\r\n\tsavedTitle: string = '';\r\n\ttitle: string | null = null;\r\n\topened: Date = new Date();\r\n\tprivate doClose(result?: any, params: CfDialogCloseParams = {}): void {\r\n\t\tif (params.message !== undefined && this.messageService !== null) {\r\n\t\t\tthis.messageService.show(params.message.title, params.message.message, params.message);\r\n\t\t}\r\n\t\tthis._onClose.next(result); \r\n\t}\r\n close(result?: any, params: CfDialogCloseParams = {}): void { \r\n\t\tif (this.dialogConfig === null || this.dialogConfig.beforeClose === null) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.dialogConfig.beforeClose instanceof Promise) {\r\n\t\t\tthis.dialogConfig.beforeClose.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.dialogConfig.beforeClose instanceof Observable) {\r\n\t\t\tthis.dialogConfig.beforeClose.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tconst beforeCloseResult: boolean | Observable<boolean> | Promise<boolean> = this.dialogConfig.beforeClose();\r\n\r\n\t\tif (beforeCloseResult instanceof Promise) {\r\n\t\t\tbeforeCloseResult.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult instanceof Observable) {\r\n\t\t\tbeforeCloseResult.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t}\r\n\t}\r\n forceClose(result?: any): void {\r\n this.doClose(result);\r\n }\r\n\tmessage(message: any): void { this._onMessage.next(message); }\r\n destroy(): void { this._onDestroy.next(undefined); }\r\n}\r\n","import { ResolveData } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogConfiguration } from \"../interfaces\";\r\n\r\nexport class DialogConfig implements DialogConfiguration {\r\n showCloseIcon: boolean = true;\r\n\tbeforeClose: null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean> = null;\r\n\tignoreKeyUp: boolean = false;\r\n data: {[key: (string | number)]: any} = {};\r\n noPadding: boolean = false;\r\n\tkeepActiveElement: boolean = false;\r\n\tcontainerClasses: string[] = [];\r\n\tdialogClasses: string[] = [];\r\n resolve: ResolveData = {};\r\n\ttitle: string | null = null;\r\n contentElement: Element | null = null;\r\n single: boolean = false;\r\n width: string | null = null;\r\n\theight: string | null = null;\r\n getData(key: string | number, defaultOnUndefined: any = null): any {\r\n return this.data[key] !== undefined ? this.data[key] : defaultOnUndefined;\r\n }\r\n}\r\n","import { InjectionToken, Injector, Type } from \"@angular/core\";\r\n\r\nexport class DialogInjector implements Injector {\r\n constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: {}): T;\r\n get(token: any, notFoundValue?: any): any;\r\n get(token: any, notFoundValue?: any, _?: any): any {\r\n const value = this._additionalTokens.get(token);\r\n if (value) { return value; }\r\n return this._parentInjector.get<any>(token, notFoundValue);\r\n }\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { AlertButtonConfiguration, AlertConfiguration } from \"../interfaces\";\r\n\r\nexport const ALERT_DEFAULT_BUTTON_CONFIGURATION: InjectionToken<AlertButtonConfiguration> = new InjectionToken('Alert default button', {\r\n\tfactory: (): AlertButtonConfiguration => {\r\n\t\treturn {\r\n\t\t\tlabel: 'alert.ok',\r\n\t\t\tseverity: 'success',\r\n\t\t\tcallback: ({ dialogRef }) => {\r\n\t\t\t\tdialogRef.close();\r\n\t\t\t},\r\n\t\t\tfocus: true,\r\n\t\t\ttranslateLabel: true\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport const ALERT_CONFIGURATIONS: InjectionToken<{[key: string]: AlertConfiguration}> = new InjectionToken('Alert configurations predefined', {\r\n factory: (): {[key: string]: AlertConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { PredefinedDialogs } from \"../interfaces\";\r\n\r\nexport const CF_PREDEFINED_DIALOGS: InjectionToken<PredefinedDialogs> = new InjectionToken('Predefined dialogs', {\r\n factory: () => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { ConfirmConfiguration } from \"../interfaces\";\r\n\r\nexport const CONFIRM_CONFIGURATIONS: InjectionToken<{[key: string]: ConfirmConfiguration}> = new InjectionToken('Confirm configurations predefined', {\r\n factory: (): {[key: string]: ConfirmConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { ComponentRef, Type } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogRef } from \"./classes/dialog.ref.class\";\r\n\r\nexport interface DialogComponentRefContainer {\r\n componentRef: ComponentRef<any>;\r\n container: HTMLDivElement;\r\n\topenIndex: number;\r\n}\r\n\r\nexport type PredefinedDialogs = {[key: string]: (() => Promise<Type<any>>) | {component: () => Promise<Type<any>>, configuration: DialogConfiguration}};\r\n\r\nexport interface DialogConfiguration {\r\n showCloseIcon?: boolean;\r\n\tbeforeClose?: CfDialogConfigurationBeforeClose;\r\n\tignoreKeyUp?: boolean;\r\n data?: any;\r\n noPadding?: boolean;\r\n\tkeepActiveElement?: boolean;\r\n\tcontainerClasses?: string[];\r\n\tdialogClasses?: string[];\r\n\ttitle?: string | null;\r\n contentElement?: Element | null;\r\n single?: boolean;\r\n width?: string | null;\r\n\theight?: string | null;\r\n}\r\n\r\nexport type CfDialogConfigurationBeforeClose = null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean>;\r\n\r\nexport interface ConfirmConfiguration {\r\n title: string;\r\n text: string;\r\n acceptText: string;\r\n declineText: string;\r\n\thideDeclineButton?: boolean;\r\n switchButtonColors?: boolean;\r\n acceptTimeout?: number;\r\n acceptValidationText?: string;\r\n acceptValidationMode?: AcceptValidationMode;\r\n acceptValidationLabel?: string;\r\n}\r\n\r\nexport interface AlertConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbutton?: Partial<AlertButtonConfiguration>;\r\n}\r\n\r\nexport enum AcceptValidationMode {\r\n PATTERN = 'PATTERN',\r\n TEXT = 'TEXT'\r\n}\r\n\r\nexport interface AlertButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback: (params: {dialogRef: DialogRef}) => void;\r\n\ttranslateLabel: boolean;\r\n\tfocus: boolean;\r\n}\r\n\r\nexport interface CfDialogCloseParams {\r\n message?: MessagePartial;\r\n}\r\n\r\nexport interface MessagePartial extends Partial<MessageConfiguration> {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport interface MessageConfiguration {\r\n closeable: boolean;\r\n position: MessagePosition;\r\n lifetime: number | null;\r\n severity: MessageSeverity;\r\n\tkeepOnHover: boolean;\r\n}\r\nexport enum MessagePosition {\r\n TOP = 'top',\r\n BOTTOM = 'bottom'\r\n}\r\n\r\nexport enum MessageSeverity {\r\n SUCCESS = 'success',\r\n WARNING = 'warning',\r\n DANGER = 'danger',\r\n INFO = 'info'\r\n}\r\n\r\nexport interface LoadingConfiguration {\r\n title: string;\r\n text: string;\r\n\tloadingIcon?: string;\r\n iconSize?: number;\r\n}\r\n\r\nexport interface ModalWithButtonsConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbuttons: ButtonConfiguration[];\r\n}\r\n\r\nexport interface ButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback?: (params: {dialogRef: DialogRef}) => void;\r\n\trouterLink?: any;\r\n\tfocus?: boolean;\r\n\tpermission?: string | string[];\r\n\ttranslateLabel?: boolean;\r\n}\r\n\r\nexport interface Message extends MessageConfiguration {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport enum LogLevel {\r\n All = 0,\r\n Debug = 1,\r\n Info = 2,\r\n Warn = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n Off = 6\r\n}\r\n\r\nexport enum TokenServiceMode {\r\n LOCALSTORAGE = 0,\r\n SESSIONSTORAGE = 1,\r\n COOKIE = 2\r\n}\r\n\r\nexport enum InterceptorType {\r\n ALL = 'ALL',\r\n ERROR = 'ERROR',\r\n LOADER = 'LOADER',\r\n MOCK = 'MOCK',\r\n TOKEN = 'TOKEN',\r\n PRECHECK = 'PRECHECK',\r\n LOCK = 'LOCK',\r\n\tREQUESTID = 'REQUESTID'\r\n}\r\n\r\nexport enum Precheck {\r\n ERROR = \"ERROR\",\r\n WARNING = \"WARNING\"\r\n}\r\n\r\nexport type PrecheckNullable = Precheck | null;\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { MessageConfiguration, MessagePosition, MessageSeverity } from \"../interfaces\";\r\n\r\nexport const MESSAGE_DEFAULT_CONFIGURATION: InjectionToken<MessageConfiguration> = new InjectionToken('Message default configuration', {\r\n\tfactory: (): MessageConfiguration => {\r\n\t\treturn {\r\n\t\t\tcloseable: true,\r\n\t\t\tlifetime: 3000,\r\n\t\t\tposition: MessagePosition.TOP,\r\n\t\t\tseverity: MessageSeverity.SUCCESS,\r\n\t\t\tkeepOnHover: false\r\n\t\t};\r\n\t}\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { LogLevel } from \"../interfaces\";\r\n\r\nexport const LOG_LEVEL: InjectionToken<LogLevel> = new InjectionToken('Log level', {\r\n factory: (): LogLevel => {\r\n return LogLevel.All;\r\n }\r\n});\r\n","import { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n ApplicationRef,\r\n ComponentRef,\r\n createComponent,\r\n EmbeddedViewRef,\r\n inject,\r\n Injectable,\r\n Injector,\r\n PLATFORM_ID,\r\n Type\r\n} from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { filter, Subscription } from 'rxjs';\r\nimport { AlertConfiguration, DialogConfiguration, ConfirmConfiguration, LoadingConfiguration, ModalWithButtonsConfiguration, PredefinedDialogs, DialogComponentRefContainer } from '../interfaces';\r\nimport { DialogConfig, DialogInjector, DialogRef } from '../classes';\r\nimport { ALERT_CONFIGURATIONS, CF_PREDEFINED_DIALOGS, CONFIRM_CONFIGURATIONS } from '../tokens';\r\nimport { MessageService } from '../services';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DialogService {\r\n\r\n\tprivate injector: Injector = inject(Injector);\r\n\tprivate predefinedConfirmConfigurations: {[key: string]: ConfirmConfiguration} = inject(CONFIRM_CONFIGURATIONS);\r\n\tprivate predefinedAlertConfigurations: {[key: string]: AlertConfiguration} = inject(ALERT_CONFIGURATIONS);\r\n\tprivate predefinedDialogs: PredefinedDialogs = inject(CF_PREDEFINED_DIALOGS);\r\n\r\n\ttitle: Title = inject(Title);\r\n\tmessageService: MessageService = inject(MessageService);\r\n\r\n\tdialogs: Map<DialogRef, DialogComponentRefContainer> = new Map();\r\n\topenIndex: number = 1;\r\n\tplatformId: Object = inject(PLATFORM_ID);\r\n\r\n constructor() {\r\n\t\tif (isPlatformBrowser(this.platformId)) {\r\n\t\t\tdocument.addEventListener(\"keyup\", (keyboardEvent: KeyboardEvent) => {\r\n\t\t\t\tif (keyboardEvent.key.toLowerCase() === 'escape') {\r\n\t\t\t\t\tlet lastOpenIndex: number = 0;\r\n\t\t\t\t\tlet lastOpenedDialogRef: DialogRef | null = null;\r\n\t\t\t\t\tfor (const [dialogRef, cfDialogComponentRefContainer] of this.dialogs.entries()) {\r\n\t\t\t\t\t\tif (cfDialogComponentRefContainer.openIndex > lastOpenIndex) {\r\n\t\t\t\t\t\t\tlastOpenIndex = cfDialogComponentRefContainer.openIndex;\r\n\t\t\t\t\t\t\tlastOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif (lastOpenedDialogRef !== null && lastOpenedDialogRef.dialogConfig !== null) {\r\n\t\t\t\t\t\tif (lastOpenedDialogRef.dialogConfig.ignoreKeyUp || document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tlastOpenedDialogRef.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tasync openPredefined<T = any>(name: string, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\tif (this.predefinedDialogs[name] === undefined) {\r\n\t\t\tthrow Error('Dialog with name \"' + name + '\" not found!');\r\n\t\t}\r\n\t\tconst predefinedDialog = this.predefinedDialogs[name];\r\n\t\tif (typeof predefinedDialog === 'function') {\r\n\t\t\treturn this.openImport(predefinedDialog, dialogConfiguration);\r\n\t\t}\r\n\t\treturn this.openImport(predefinedDialog.component, {...predefinedDialog.configuration, ...dialogConfiguration});\r\n\t}\r\n\r\n\tasync openImport<T = any>(component: () => Promise<Type<any>>, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\treturn new Promise(async (resolve) => {\r\n\t\t\tresolve(this.open<T>(await component(), dialogConfiguration));\r\n\t\t});\r\n\t}\r\n\r\n open<T = any>(component: Type<any>, dialogConfiguration: DialogConfiguration = {}): DialogRef<T> {\r\n\r\n\t\tfor (let dialog of this.dialogs.entries()) {\r\n\t\t\tif (\r\n\t\t\t\t(dialogConfiguration.single && dialog[1].componentRef.componentType.name === component.name) ||\r\n\t\t\t\t(dialog[0].dialogConfig !== null && dialog[0].dialogConfig.single && dialog[1].componentRef.componentType.name === component.name)\r\n\t\t\t) {\r\n\t\t\t\treturn dialog[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogConfig: DialogConfig = this.createDialogConfig(dialogConfiguration);\r\n\r\n\t\tif (!dialogConfig.keepActiveElement) {\r\n\t\t\tif (document.activeElement instanceof HTMLElement) {\r\n\t\t\t\tdocument.activeElement.blur();\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogRef: DialogRef<T> = this.appendToBody(component, dialogConfig);\r\n\t\tdialogRef.messageService = this.messageService;\r\n\t\tdialogRef.dialogConfig = dialogConfig;\r\n\r\n\t\tthis.changeAndStoreTitle(dialogRef);\r\n\r\n return dialogRef;\r\n }\r\n\r\n\tchangeAndStoreTitle(dialogRef: DialogRef): void {\r\n\t\tdialogRef.savedTitle = this.title.getTitle();\r\n\t\tif (dialogRef.dialogConfig !== null && dialogRef.dialogConfig.title !== null) {\r\n\t\t\tthis.title.setTitle(dialogRef.dialogConfig.title);\r\n\t\t}\r\n\t}\r\n\r\n createDialogConfig(dialogConfiguration: DialogConfiguration): DialogConfig {\r\n const dialogConfig: DialogConfig = new DialogConfig();\r\n if (dialogConfiguration.showCloseIcon !== undefined) {\r\n dialogConfig.showCloseIcon = dialogConfiguration.showCloseIcon;\r\n }\r\n\t\tif (dialogConfiguration.beforeClose !== undefined) {\r\n dialogConfig.beforeClose = dialogConfiguration.beforeClose;\r\n }\r\n\t\tif (dialogConfiguration.ignoreKeyUp !== undefined) {\r\n dialogConfig.ignoreKeyUp = dialogConfiguration.ignoreKeyUp;\r\n }\r\n if (dialogConfiguration.data !== undefined) {\r\n dialogConfig.data = dialogConfiguration.data;\r\n }\r\n if (dialogConfiguration.noPadding !== undefined) {\r\n dialogConfig.noPadding = dialogConfiguration.noPadding;\r\n }\r\n\t\tif (dialogConfiguration.keepActiveElement !== undefined) {\r\n\t\t\tdialogConfig.keepActiveElement = dialogConfiguration.keepActiveElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.containerClasses !== undefined) {\r\n\t\t\tdialogConfig.containerClasses = dialogConfiguration.containerClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.dialogClasses !== undefined) {\r\n\t\t\tdialogConfig.dialogClasses = dialogConfiguration.dialogClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.title !== undefined) {\r\n\t\t\tdialogConfig.title = dialogConfiguration.title;\r\n\t\t}\r\n\t\tif (dialogConfiguration.contentElement !== undefined) {\r\n\t\t\tdialogConfig.contentElement = dialogConfiguration.contentElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.single !== undefined) {\r\n\t\t\tdialogConfig.single = dialogConfiguration.single;\r\n\t\t}\r\n\t\tif (dialogConfiguration.width !== undefined) {\r\n\t\t\tdialogConfig.width = dialogConfiguration.width;\r\n\t\t}\r\n\t\tif (dialogConfiguration.height !== undefined) {\r\n\t\t\tdialogConfig.height = dialogConfiguration.height;\r\n\t\t}\r\n return dialogConfig;\r\n }\r\n\r\n appendToBody(component: Type<any>, dialogConfig: DialogConfig): DialogRef {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n // CREATE INJECTION TOKENS\r\n const tokens: WeakMap<any, any> = new WeakMap();\r\n\r\n // CREATE DIALOG CONFIGURATION CLASS\r\n tokens.set(DialogConfig, dialogConfig);\r\n\r\n // CREATE DIALOG REFERENCE CLASS\r\n const dialogRef: DialogRef = new DialogRef();\r\n tokens.set(DialogRef, dialogRef);\r\n\r\n // LISTEN ON DIALOG CLOSE\r\n const closeSub: Subscription = dialogRef.onClose.subscribe(() => {\r\n this.removeFromBody(dialogRef);\r\n closeSub.unsubscribe();\r\n });\r\n\r\n // CREATE COMPONENT REF\r\n const componentRef: ComponentRef<any> = createComponent(component, {\r\n\t\t\tenvironmentInjector: appRef.injector,\r\n\t\t\telementInjector: new DialogInjector(this.injector, tokens)\r\n\t\t});\r\n\r\n // ATTACH VIEW TO ANGULAR\r\n appRef.attachView(componentRef.hostView);\r\n\r\n // CREATE DIALOG CONTAINER ELEMENT\r\n const dialogContainer: HTMLDivElement = document.createElement('div');\r\n dialogContainer.classList.add('cf-dialog-container');\r\n\t\tif (dialogConfig.containerClasses.length > 0) {\r\n\t\t\tdialogContainer.classList.add(...dialogConfig.containerClasses);\r\n\t\t}\r\n\r\n\t\t// APPEND DOM ELEMENT TO DIALOG\r\n\t\tconst childDomElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n\t\tchildDomElem.classList.add('cf-dialog');\r\n\t\t\r\n\t\tif (dialogConfig.width !== null) {\r\n\t\t\tchildDomElem.style.width = dialogConfig.width;\r\n\t\t}\r\n\t\tif (dialogConfig.height !== null) {\r\n\t\t\tchildDomElem.style.height = dialogConfig.height;\r\n\t\t}\r\n\t\tif (dialogConfig.noPadding) {\r\n childDomElem.classList.add('no-padding');\r\n }\r\n\t\tif (dialogConfig.dialogClasses.length > 0) {\r\n\t\t\tchildDomElem.classList.add(...dialogConfig.dialogClasses);\r\n\t\t}\r\n\r\n\t\tif (dialogConfig.contentElement !== null) {\r\n\t\t\tchildDomElem.appendChild(dialogConfig.contentElement);\r\n\t\t}\r\n\r\n\t\tdialogContainer.appendChild(childDomElem);\r\n\r\n // CLOSEABLE? APPEND BUTTON\r\n if (dialogConfig.showCloseIcon) {\r\n const closeElement: HTMLDivElement = document.createElement('div');\r\n closeElement.classList.add(...['cf-dialog-close', 'remixicon', 'close-line']);\r\n closeElement.onclick = () => {\r\n dialogRef.close();\r\n };\r\n childDomElem.appendChild(closeElement);\r\n }\r\n\r\n // APPEND DIALOG CONTAINER TO BODY\r\n document.body.appendChild(dialogContainer);\r\n\r\n this.dialogs.set(dialogRef, {\r\n componentRef,\r\n container: dialogContainer,\r\n\t\t\topenIndex: this.openIndex \r\n });\r\n\r\n\t\tthis.openIndex++;\r\n\r\n return dialogRef;\r\n }\r\n\r\n removeFromBody(dialogRef: DialogRef): void {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n if (!dialogRef || !this.dialogs.has(dialogRef)) {\r\n return;\r\n }\r\n const dialogComponentRefContainer: DialogComponentRefContainer | undefined = this.dialogs.get(dialogRef);\r\n if (dialogComponentRefContainer == undefined) {\r\n return;\r\n }\r\n\t\t\r\n appRef.detachView(dialogComponentRefContainer.componentRef.hostView);\r\n\r\n if (dialogComponentRefContainer.container !== null) {\r\n dialogComponentRefContainer.container.remove();\r\n }\r\n dialogComponentRefContainer.componentRef.destroy();\r\n this.dialogs.delete(dialogRef);\r\n\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.openIndex = 1;\r\n\t\t}\r\n\r\n\t\t// Restore title\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t} else {\r\n\t\t\tlet latestOpenedDialogRef: DialogRef | null = null;\r\n\t\t\tthis.dialogs.forEach((_, dialogRef: DialogRef) => {\r\n\t\t\t\tif (latestOpenedDialogRef === null) {\r\n\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (latestOpenedDialogRef.opened < dialogRef.opened) {\r\n\t\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif (latestOpenedDialogRef !== null) {\r\n\t\t\t\t//this.title.setTitle(latestOpenedDialogRef.savedTitle);\r\n\t\t\t} else {\r\n\t\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n\tconfirm(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedConfirmConfiguration: ConfirmConfiguration | undefined = this.predefinedConfirmConfigurations[configuration];\r\n\t\t\tif (predefinedConfirmConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined confirm configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedConfirmConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.pipe(filter(value => value !== undefined)).subscribe((accepted: boolean) => {\r\n\t\t\t\tif (accepted) {\r\n\t\t\t\t\tresolve(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treject(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n async confirmAsync(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n return await new Promise((resolve) => {\r\n this.confirm(configuration, dialogConfiguration, component).then(() => {\r\n resolve(true);\r\n }).catch(() => {\r\n resolve(false);\r\n });\r\n });\r\n }\r\n\t\r\n\tconfirmAccept(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => resolve(true)).catch(() => {});\r\n\t\t});\r\n\t}\r\n\t\r\n\tconfirmDecline(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => {}).catch(() => resolve(true));\r\n\t\t});\r\n\t}\r\n\r\n\tshowLoading(\r\n\t\tconfiguration: LoadingConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tshowCloseIcon: false,\r\n\t\t\tignoreKeyUp: true,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tshowAlert(\r\n\t\tconfiguration: AlertConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<void> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedAlertConfiguration: AlertConfiguration | undefined = this.predefinedAlertConfigurations[configuration];\r\n\t\t\tif (predefinedAlertConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined alert configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedAlertConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\treturn this.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.subscribe(() => {\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tshowModalWithButtons(\r\n\t\tconfiguration: ModalWithButtonsConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { Subject, Subscription, timer } from 'rxjs';\r\nimport { Message, MessageConfiguration, MessageSeverity } from '../interfaces';\r\nimport { MESSAGE_DEFAULT_CONFIGURATION } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class MessageService {\r\n\r\n /**\r\n * Default configuration\r\n * \r\n * Can be changed if you overwrite it or use the `MESSAGE_DEFAULT_CONFIGURATION` InjectionToken\r\n */\r\n public defaultConfiguration: MessageConfiguration = inject(MESSAGE_DEFAULT_CONFIGURATION);\r\n \r\n /**\r\n * Message subject\r\n */\r\n private messageSubject: Subject<Message> = new Subject();\r\n\r\n /**\r\n * Show\r\n * \r\n * Displays message with the given configuration\r\n * \r\n * @param messageConfiguration `Partial<MessageConfiguration>`\r\n */\r\n public show(title: string, message: string, configuration?: Partial<MessageConfiguration>): void {\r\n this.messageSubject.next({\r\n\t\t\t...this.defaultConfiguration,\r\n ...configuration,\r\n\t\t\ttitle,\r\n\t\t\tmessage\r\n });\r\n }\r\n\r\n /**\r\n * Show success message\r\n * \r\n * Display a message with default success severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showSuccessMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.SUCCESS\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show danger message\r\n * \r\n * Display a message with default danger severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showDangerMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.DANGER,\r\n\t\t\tkeepOnHover: true\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show warning message\r\n * \r\n * Display a message with default warning severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showWarningMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.WARNING\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show info message\r\n * \r\n * Display a message with default info severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showInfoMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.INFO\r\n\t\t});\r\n\t}\r\n\r\n private showMessage(message: Message): void {\r\n let container: HTMLElement | null = document.getElementById('cf-toasts-' + message.position + '-container');\r\n if (container === null) {\r\n container = document.createElement('div');\r\n container.id = 'cf-toasts-' + message.position + '-container';\r\n document.body.appendChild(container);\r\n }\r\n\r\n const div: HTMLElement = this.createMessageHtmlElement(message);\r\n\r\n container.appendChild(div);\r\n\r\n if (message.lifetime !== null) {\r\n\r\n\t\t\tlet disposeTimerSubscription: Subscription | null = timer(message.lifetime + 500).subscribe(() => {\r\n\t\t\t\tthis.hideMessage(div);\r\n\t\t\t});\r\n\r\n\t\t\tif (message.keepOnHover) {\r\n\t\t\t\tdiv.addEventListener('mouseenter', () => {\r\n\t\t\t\t\tif (disposeTimerSubscription !== null) {\r\n\t\t\t\t\t\tdisposeTimerSubscription.unsubscribe();\r\n\t\t\t\t\t\tdisposeTimerSubscription = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n }\r\n }\r\n\r\n private createMessageHtmlElement(message: Message): HTMLElement {\r\n const div: HTMLElement = document.createElement('div');\r\n div.classList.add('cf-toast', 'cf-' + message.severity + '-toast');\r\n const titleDiv: HTMLElement = document.createElement('div');\r\n titleDiv.classList.add('cf-toast-title');\r\n titleDiv.innerText = message.title;\r\n const messageDiv: HTMLElement = document.createElement('div');\r\n messageDiv.classList.add('cf-toast-message');\r\n messageDiv.innerText = message.message;\r\n div.appendChild(titleDiv);\r\n div.appendChild(messageDiv);\r\n if (message.closeable) {\r\n const closeIcon: HTMLElement = document.createElement('i');\r\n closeIcon.classList.add('close-icon', 'remixicon', 'close-line');\r\n closeIcon.onclick = () => {\r\n this.hideMessage(div, true);\r\n };\r\n div.appendChild(closeIcon);\r\n }\r\n return div;\r\n }\r\n\r\n private hideMessage(messageElement: HTMLElement, forceClose: boolean = false): void {\r\n messageElement.classList.add('hidden-toast');\r\n\r\n let remainOpen = false;\r\n messageElement.addEventListener('mouseenter', (() => {\r\n remainOpen = true;\r\n }));\r\n\r\n timer(500).subscribe(() => {\r\n if (remainOpen && !forceClose) {\r\n messageElement.classList.remove('hidden-toast');\r\n return;\r\n }\r\n messageElement.removeEventListener('mouseenter', (() => {}));\r\n messageElement.remove();\r\n });\r\n }\r\n\r\n constructor() {\r\n this.messageSubject.subscribe((message: Message) => {\r\n this.showMessage(message);\r\n });\r\n }\r\n\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { LogLevel } from '../interfaces';\r\nimport { LOG_LEVEL } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class LoggerService {\r\n\r\n\tprivate _logLevel: LogLevel | null = inject(LOG_LEVEL);\r\n\r\n\tprivate logLevelColors: string[] = [\r\n\t\t'',\r\n\t\t'background-color: #D2BDF3; padding: 5px 10px;',\r\n\t\t'background-color: #A2DDFF; padding: 5px 10px;',\r\n\t\t'background-color: #FFD5C5; padding: 5px 10px;',\r\n\t\t'background-color: #EA4331; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t'background-color: #F71900; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t''\r\n\t];\r\n\r\n\tpublic debug(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Debug, group });\r\n\t}\r\n\r\n\tpublic info(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Info, group });\r\n\t}\r\n\r\n\tpublic warn(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Warn, group });\r\n\t}\r\n\r\n\tpublic error(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Error, group });\r\n\t}\r\n\r\n\tpublic fatal(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Fatal, group });\r\n\t}\r\n\r\n\tpublic groupEnd(): void {\r\n\t\tconsole.groupEnd();\r\n\t}\r\n\r\n\tprivate log(configuration: {\r\n\t\tlog: any,\r\n\t\tlogLevel: LogLevel,\r\n\t\tgroup: boolean\r\n\t}): void {\r\n\t\tif (this._logLevel === null || this._logLevel === LogLevel.Off || this._logLevel > configuration.logLevel) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (configuration.group) {\r\n\t\t\tconsole.group(configuration.log);\r\n\t\t} else {\r\n\t\t\tconsole.log('%c' + configuration.log, this.logLevelColors[configuration.logLevel]);\r\n\t\t}\r\n\t}\r\n\r\n\tset logLevel(logLevel: LogLevel | null) {\r\n\t\tthis._logLevel = logLevel;\r\n\t}\r\n\r\n\tget logLevel(): LogLevel | null {\r\n\t\treturn this._logLevel;\r\n\t}\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApiService {\r\n\r\n\thttpClient: HttpClient = inject(HttpClient);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\tprivate _apiBaseUrl: string | null = null;\r\n\r\n\tpublic post<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.post<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic get<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic getFileArrayBuffer(endPoint: (string|number)[]): Observable<ArrayBuffer> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'arraybuffer'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getFileText(endPoint: (string|number)[]): Observable<string> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'text'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getWithHttpParams<T>(endPoint: (string|number)[], params: HttpParams | null = null): Observable<any> {\r\n\t\tif (params === null) {\r\n\t\t\treturn this.get(endPoint);\r\n\t\t} else {\r\n\t\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint), {\r\n\t\t\t\tparams\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.delete<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic patch<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.patch<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic head<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.head<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic options<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.options<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic put<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.put<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic generateUrl(endPoint: (string|number)[]): string {\r\n\t\tif (this._apiBaseUrl === null) {\r\n\t\t\tthrow new Error('No API base url set in generateUrl call!');\r\n\t\t}\r\n if (endPoint.length === 0) {\r\n return this._apiBaseUrl;\r\n }\r\n\t\tif (typeof endPoint[0] === 'string' && endPoint[0].startsWith('#')) {\r\n endPoint[0] = endPoint[0].slice(1);\r\n\t\t\treturn endPoint.map((v, i) => i === 0 ? v : encodeURIComponent(v)).join('/');\r\n\t\t}\r\n\t\treturn [this._apiBaseUrl, ...endPoint.map((v) => encodeURIComponent(v))].join('/');\r\n\t}\r\n\r\n\tset apiBaseUrl(apiBaseUrl: string) {\r\n\t\tthis.loggerService.info('Api Service base url set to: ' + apiBaseUrl);\r\n\t\tif (apiBaseUrl[apiBaseUrl.length - 1] === '/') {\r\n\t\t\tapiBaseUrl = apiBaseUrl.slice(0, apiBaseUrl.length - 1);\r\n\t\t}\r\n\t\tthis._apiBaseUrl = apiBaseUrl;\r\n\t}\r\n\r\n\tget apiBaseUrl(): string | null {\r\n\t\treturn this._apiBaseUrl;\r\n\t}\r\n}\r\n","import { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\r\nimport { inject, PLATFORM_ID } from \"@angular/core\";\r\n\r\nexport function isBrowser(): boolean {\r\n\tconst platformId: Object = inject(PLATFORM_ID);\r\n\treturn isPlatformBrowser(platformId);\r\n}\r\n\r\nexport function localStorage(): Storage | null {\r\n\tconst document: Document = inject(DOCUMENT);\r\n\tif (document.defaultView !== null) {\r\n\t\treturn document.defaultView.window.localStorage;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nexport function sessionStorage(): Storage | null {\r\n\tconst document: Document = inject(DOCUMENT);\r\n\tif (document.defaultView !== null) {\r\n\t\treturn document.defaultView.window.sessionStorage;\r\n\t}\r\n\treturn null;\r\n}","import { DOCUMENT } from \"@angular/common\";\r\nimport { Injectable, inject } from \"@angular/core\";\r\nimport { isBrowser } from \"../helpers\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class CookieService {\r\n\r\n\tbrowser: boolean = isBrowser();\r\n\tdocument: Document = inject(DOCUMENT);\r\n\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\t/**\r\n\t * Get the value of a cookie by name, returns `null` if the cookie is not set\r\n\t * \r\n\t * @param name name of the cookie\r\n\t * @returns value of the cookie\r\n\t */\r\n\tget(name: string): string | null {\r\n\t\tif (!this.browser) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst cookies: {[key: string]: string} = this.cookies;\r\n\t\treturn cookies[name] || null;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the value of a cookie with the given name\r\n\t * \r\n\t * @param name name of the cookie\r\n\t * @param value value of the cookie\r\n\t * @param expire expire of the cookie in seconds, if null, it will never expire\r\n\t * @param path path of the cookie, default is '/'\r\n\t * @param config optional configuration values (expire in seconds, path of cookie)\r\n\t */\r\n\tset(name: string, value: string, expire: number | null = null, path: string | null = '/'): void {\r\n\r\n\t\tif (!this.browser) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (path === null) {\r\n\t\t\tpath = '/';\r\n\t\t}\r\n\r\n\t\t// Default cookie informations\r\n\t\tlet cookie: string = `${name}=${value};`;\r\n\r\n\t\t// If we have an expire date, we need to set\r\n\t\tif (expire !== null) {\r\n\t\t\tlet d: Date = new Date();\r\n\t\t\td.setTime(d.getTime() + (expire * 1000));\r\n\t\t\tcookie += `expires=${d.toUTCString()};`;\r\n\t\t}\r\n\r\n\t\t// Set path\r\n\t\tcookie += `path=${path};`;\r\n\r\n\t\t// Log\r\n\t\tthis.loggerService.info('Cookie data to set: ' + cookie);\r\n\r\n\t\t// Set the cookie\r\n\t\tthis.document.cookie = cookie;\r\n\t}\r\n\r\n\t/**\r\n\t * Delete a cookie by its name\r\n\t * \r\n\t * @param name name of the cookie\r\n\t */\r\n\tdelete(name: string): void {\r\n\t\tif (!this.browser) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.set(name, '', -1);\r\n\t}\r\n\r\n\tget cookies(): {[key: string]: string} {\r\n\r\n\t\tif (!this.browser) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\r\n\t\tconst cookies: string = this.document.cookie;\r\n\t\tif (cookies.length === 0) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\tconst cookiesArray: string[] = cookies.split(';');\r\n\t\tconst cookiesObject: {[key: string]: string} = {};\r\n\t\tcookiesArray.forEach((cookiesArrayItem: string) => {\r\n\t\t\tconst cookiesArrayItemSplit: string[] = cookiesArrayItem.split('=');\r\n\t\t\tcookiesObject[cookiesArrayItemSplit[0].trim()] = cookiesArrayItemSplit[1];\r\n\t\t})\r\n\t\treturn cookiesObject;\r\n\t}\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { TokenServiceMode } from '../interfaces';\r\nimport { isBrowser, localStorage, sessionStorage } from '../helpers';\r\nimport { CookieService } from './cookie.service';\r\nimport { LoggerService } from './logger.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenService {\r\n\r\n\tcookieService: CookieService = inject(CookieService);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\tlocalStorage: Storage | null = localStorage();\r\n\tsessionStorage: Storage | null = sessionStorage();\r\n\tisBrowser: boolean = isBrowser();\r\n\r\n\tcookiePath: string | null = null;\r\n\taccessToken: string | null = null;\r\n\taccessTokenKey = 'acccessToken';\r\n\taccessTokenCookieExpireDays = 30;\r\n\r\n\tpublic write(mode: TokenServiceMode | null): void {\r\n\t\tif (this.accessToken === null) {\r\n\t\t\tthis.loggerService.error('No accessToken set to write!');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token write!');\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.localStorage !== null) {\r\n\t\t\t\t\tthis.localStorage.setItem(this.accessTokenKey, this.accessToken);\r\n\t\t\t\t\tthis.loggerService.debug('Token set to local storage: ' + this.accessToken);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to set localStorage on not a browser platform!');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.sessionStorage.setItem(this.accessTokenKey, this.accessToken);\r\n\t\t\t\t\tthis.loggerService.debug('Token set to session storage: ' + this.accessToken);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to set sessionStorage on not a browser platform!');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.COOKIE:\r\n\t\t\t\tthis.cookieService.set(this.accessTokenKey, this.accessToken, this.accessTokenCookieExpireDays * 24 * 60 * 60, this.cookiePath);\r\n\t\t\t\tthis.loggerService.debug('Token set to cookie: ' + this.accessToken);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t}\r\n\r\n\tpublic read(mode: TokenServiceMode | null): string | null {\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token read!');\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tthis.loggerService.debug('Trying to read token from local storage');\r\n\t\t\t\tif (this.isBrowser && this.localStorage !== null) {\r\n\t\t\t\t\tconst tokenLocalStorage: string | null = this.localStorage.getItem(this.accessTokenKey);\r\n\t\t\t\t\tif (tokenLocalStorage !== null) {\r\n\t\t\t\t\t\tthis.loggerService.debug('Token read from local storage: ' + tokenLocalStorage);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tokenLocalStorage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to read from localStorage on not a browser platform!');\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Trying to read token from session storage');\r\n\t\t\t\t\tconst tokenSessionStorage: string | null = this.sessionStorage.getItem(this.accessTokenKey);\r\n\t\t\t\t\tif (tokenSessionStorage !== null) {\r\n\t\t\t\t\t\tthis.loggerService.debug('Token read from session storage: ' + tokenSessionStorage);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tokenSessionStorage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to read from sessionStorage on not a browser platform!');\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\tcase TokenServiceMode.COOKIE: {\r\n\t\t\t\tthis.loggerService.debug('Trying to read token from session cookie');\r\n\t\t\t\tconst cookieAccessToken: string | null = this.cookieService.get(this.accessTokenKey);\r\n\t\t\t\tif (cookieAccessToken !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token read from cookie: ' + cookieAccessToken);\r\n\t\t\t\t}\r\n\t\t\t\treturn cookieAccessToken;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete(mode: TokenServiceMode | null): void {\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token delete!');\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tif (this.localStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token deleted from local storage');\r\n\t\t\t\t\tthis.localStorage.removeItem(this.accessTokenKey);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token deleted from session storage');\r\n\t\t\t\t\tthis.sessionStorage.removeItem(this.accessTokenKey);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.COOKIE: {\r\n\t\t\t\tthis.loggerService.debug('Token deleted from cookie');\r\n\t\t\t\tthis.cookieService.delete(this.accessTokenKey);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.accessToken = null;\r\n\t}\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpRequest } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { InterceptorType, PrecheckNullable } from \"../interfaces\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class InterceptorsService {\r\n\r\n /**\r\n * Skip\r\n * \r\n * Skip interceptors from next http requests\r\n */\r\n\tskip: InterceptorType[] = [];\r\n\r\n /**\r\n * ResetSkip\r\n * \r\n * Resets to `skip` to empty array after first http request\r\n */\r\n resetSkip: boolean = true;\r\n\r\n\r\n /**\r\n * Precheck\r\n * \r\n * Tells the `PrecheckInterceptor` to set a header with the given value\r\n */\r\n precheck: PrecheckNullable = null;\r\n\r\n /**\r\n * ResetPrecheck\r\n * \r\n * Clear `precheck` after first http request \r\n */\r\n resetPrecheck: boolean = true;\r\n\r\n /**\r\n * Error callback function\r\n * \r\n * Function to call after every http error\r\n */\r\n\terrorCallbackfunction: ((httpErrorResponse: HttpErrorResponse) => void) | null = null;\r\n\r\n /**\r\n * Error skip status codes\r\n * \r\n * Skips the given status codes from `errorCallbackfunction`\r\n */\r\n\terrorSkipStatusCodes: number[] = [];\r\n\r\n /**\r\n * Mock callback function\r\n * \r\n * Function to call to mock an http request\r\n */\r\n\tmockCallbackFunction: ((request: HttpRequest<any>, requestUrl: URL, next: HttpHandler) => Observable<HttpEvent<any>>) | null = null;\r\n\r\n /**\r\n * RequestId HTTP Header name\r\n */\r\n\trequestIdHttpHeaderName: string = 'Request-Id';\r\n\r\n /**\r\n * RequestId repeat\r\n */\r\n\trequestIdRepeat: boolean = false;\r\n\r\n /**\r\n * RequestId repeat delay\r\n */\r\n\trequestIdRepeatDelay: number = 0;\r\n\r\n /**\r\n * RequestId repeat statuscodes\r\n */\r\n\trequestIdRepeatStatusCodes: number[] = [];\r\n}","import { inject, Injectable } from \"@angular/core\";\r\nimport { LoggerService } from \"../services\";\r\nimport { InterceptorsService } from \"../services/interceptors.service\";\r\nimport { InterceptorType } from \"../interfaces\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class BaseInterceptor {\r\n\r\n\ttype: InterceptorType | null = null;\r\n\r\n\tinterceptorsService: InterceptorsService = inject(InterceptorsService);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\tskipInterceptor(): boolean {\r\n\t\tif (this.type !== null && this.interceptorsService.skip.indexOf(InterceptorType.ALL) !== -1) {\r\n\t\t\tthis.loggerService.warn('Interceptor skipped, reason is ALL skipped: ' + this.type);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst skip: boolean = this.type !== null && this.interceptorsService.skip.indexOf(this.type) !== -1;\r\n\t\tif (skip) {\r\n\t\t\tthis.loggerService.warn('Interceptor skipped, reason is [' + this.interceptorsService.skip.join(', ') + '] skipped');\r\n\t\t}\r\n\t\treturn skip;\r\n\t}\r\n\r\n\tconstructor(\r\n\t\ttype: InterceptorType\r\n\t) {\r\n\t\tthis.type = type;\r\n\t\tthis.loggerService.info('Interceptor initialized: ' + this.type);\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { TokenService } from '../services';\r\nimport { BaseInterceptor } from './base.interceptor';\r\nimport { InterceptorType } from '../interfaces';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class TokenInterceptor extends BaseInterceptor implements HttpInterceptor {\r\n\r\n\tprivate tokenService: TokenService = inject(TokenService);\r\n\r\n\tintercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n\t\tif (this.skipInterceptor()) {\r\n\t\t\treturn next.handle(request);\r\n\t\t}\r\n\t\tconst accessToken: string | null = this.tokenService.accessToken;\r\n\t\tif (accessToken !== null) {\r\n\t\t\trequest = request.clone({\r\n\t\t\t\tsetHeaders: {\r\n\t\t\t\t\tToken: accessToken\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn next.handle(request);\r\n\t}\r\n\r\n\tconstructor() {\r\n\t\tsuper(InterceptorType.TOKEN);\r\n\t}\r\n}\r\n","import { HTTP_INTERCEPTORS } from \"@angular/common/http\";\r\nimport { EnvironmentProviders, makeEnvironmentProviders } from \"@angular/core\";\r\nimport { TokenInterceptor } from \"./interceptors/token.interceptor\";\r\n\r\nexport function provideTokenInterceptor(): EnvironmentProviders {\r\n return makeEnvironmentProviders([{\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: TokenInterceptor,\r\n multi: true\r\n }]);\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.InterceptorType"],"mappings":";;;;;;;MAKa,SAAS,CAAA;AAAtB,IAAA,WAAA,GAAA;QACC,IAAc,CAAA,cAAA,GAA0B,IAAI,CAAC;QAC1C,IAAY,CAAA,YAAA,GAAwB,IAAI,CAAC;AAC3B,QAAA,IAAA,CAAA,QAAQ,GAAiB,IAAI,OAAO,EAAO,CAAC;AAC1D,QAAA,IAAA,CAAA,OAAO,GAA8B,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;QAClE,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC;QAC5G,IAAc,CAAA,cAAA,GAAoC,CAAC,KAAU,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,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AAA,IAAA,CAAA,YAAY,GAAiB,MAAM,CAAC,YAAY,CAAC,CAAC;KAmBzD;+GArBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFhB,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAEN,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;SCLe,uBAAuB,GAAA;IACnC,OAAO,wBAAwB,CAAC,CAAC;AAC7B,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,gBAAgB;AAC1B,YAAA,KAAK,EAAE,IAAI;AACd,SAAA,CAAC,CAAC,CAAC;AACR;;ACVA;;AAEG;;;;"}
@@ -0,0 +1,3 @@
1
+ export declare function isBrowser(): boolean;
2
+ export declare function localStorage(): Storage | null;
3
+ export declare function sessionStorage(): Storage | null;
@@ -0,0 +1,13 @@
1
+ import { LoggerService } from "../services";
2
+ import { InterceptorsService } from "../services/interceptors.service";
3
+ import { InterceptorType } from "../interfaces";
4
+ import * as i0 from "@angular/core";
5
+ export declare class BaseInterceptor {
6
+ type: InterceptorType | null;
7
+ interceptorsService: InterceptorsService;
8
+ loggerService: LoggerService;
9
+ skipInterceptor(): boolean;
10
+ constructor(type: InterceptorType);
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseInterceptor, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseInterceptor>;
13
+ }
@@ -0,0 +1 @@
1
+ export * from './token.interceptor';
@@ -0,0 +1,11 @@
1
+ import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { BaseInterceptor } from './base.interceptor';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TokenInterceptor extends BaseInterceptor implements HttpInterceptor {
6
+ private tokenService;
7
+ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
8
+ constructor();
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TokenInterceptor, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<TokenInterceptor>;
11
+ }
@@ -119,3 +119,23 @@ export declare enum LogLevel {
119
119
  Fatal = 5,
120
120
  Off = 6
121
121
  }
122
+ export declare enum TokenServiceMode {
123
+ LOCALSTORAGE = 0,
124
+ SESSIONSTORAGE = 1,
125
+ COOKIE = 2
126
+ }
127
+ export declare enum InterceptorType {
128
+ ALL = "ALL",
129
+ ERROR = "ERROR",
130
+ LOADER = "LOADER",
131
+ MOCK = "MOCK",
132
+ TOKEN = "TOKEN",
133
+ PRECHECK = "PRECHECK",
134
+ LOCK = "LOCK",
135
+ REQUESTID = "REQUESTID"
136
+ }
137
+ export declare enum Precheck {
138
+ ERROR = "ERROR",
139
+ WARNING = "WARNING"
140
+ }
141
+ export type PrecheckNullable = Precheck | null;
@@ -0,0 +1,2 @@
1
+ import { EnvironmentProviders } from "@angular/core";
2
+ export declare function provideTokenInterceptor(): EnvironmentProviders;
@@ -0,0 +1,35 @@
1
+ import { LoggerService } from "./logger.service";
2
+ import * as i0 from "@angular/core";
3
+ export declare class CookieService {
4
+ browser: boolean;
5
+ document: Document;
6
+ loggerService: LoggerService;
7
+ /**
8
+ * Get the value of a cookie by name, returns `null` if the cookie is not set
9
+ *
10
+ * @param name name of the cookie
11
+ * @returns value of the cookie
12
+ */
13
+ get(name: string): string | null;
14
+ /**
15
+ * Set the value of a cookie with the given name
16
+ *
17
+ * @param name name of the cookie
18
+ * @param value value of the cookie
19
+ * @param expire expire of the cookie in seconds, if null, it will never expire
20
+ * @param path path of the cookie, default is '/'
21
+ * @param config optional configuration values (expire in seconds, path of cookie)
22
+ */
23
+ set(name: string, value: string, expire?: number | null, path?: string | null): void;
24
+ /**
25
+ * Delete a cookie by its name
26
+ *
27
+ * @param name name of the cookie
28
+ */
29
+ delete(name: string): void;
30
+ get cookies(): {
31
+ [key: string]: string;
32
+ };
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<CookieService, never>;
34
+ static ɵprov: i0.ɵɵInjectableDeclaration<CookieService>;
35
+ }
@@ -2,3 +2,5 @@ export * from './dialog.service';
2
2
  export * from './message.service';
3
3
  export * from './api.service';
4
4
  export * from './logger.service';
5
+ export * from './cookie.service';
6
+ export * from './token.service';
@@ -0,0 +1,66 @@
1
+ import { HttpErrorResponse, HttpEvent, HttpHandler, HttpRequest } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { InterceptorType, PrecheckNullable } from "../interfaces";
4
+ import * as i0 from "@angular/core";
5
+ export declare class InterceptorsService {
6
+ /**
7
+ * Skip
8
+ *
9
+ * Skip interceptors from next http requests
10
+ */
11
+ skip: InterceptorType[];
12
+ /**
13
+ * ResetSkip
14
+ *
15
+ * Resets to `skip` to empty array after first http request
16
+ */
17
+ resetSkip: boolean;
18
+ /**
19
+ * Precheck
20
+ *
21
+ * Tells the `PrecheckInterceptor` to set a header with the given value
22
+ */
23
+ precheck: PrecheckNullable;
24
+ /**
25
+ * ResetPrecheck
26
+ *
27
+ * Clear `precheck` after first http request
28
+ */
29
+ resetPrecheck: boolean;
30
+ /**
31
+ * Error callback function
32
+ *
33
+ * Function to call after every http error
34
+ */
35
+ errorCallbackfunction: ((httpErrorResponse: HttpErrorResponse) => void) | null;
36
+ /**
37
+ * Error skip status codes
38
+ *
39
+ * Skips the given status codes from `errorCallbackfunction`
40
+ */
41
+ errorSkipStatusCodes: number[];
42
+ /**
43
+ * Mock callback function
44
+ *
45
+ * Function to call to mock an http request
46
+ */
47
+ mockCallbackFunction: ((request: HttpRequest<any>, requestUrl: URL, next: HttpHandler) => Observable<HttpEvent<any>>) | null;
48
+ /**
49
+ * RequestId HTTP Header name
50
+ */
51
+ requestIdHttpHeaderName: string;
52
+ /**
53
+ * RequestId repeat
54
+ */
55
+ requestIdRepeat: boolean;
56
+ /**
57
+ * RequestId repeat delay
58
+ */
59
+ requestIdRepeatDelay: number;
60
+ /**
61
+ * RequestId repeat statuscodes
62
+ */
63
+ requestIdRepeatStatusCodes: number[];
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<InterceptorsService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<InterceptorsService>;
66
+ }
@@ -0,0 +1,20 @@
1
+ import { TokenServiceMode } from '../interfaces';
2
+ import { CookieService } from './cookie.service';
3
+ import { LoggerService } from './logger.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TokenService {
6
+ cookieService: CookieService;
7
+ loggerService: LoggerService;
8
+ localStorage: Storage | null;
9
+ sessionStorage: Storage | null;
10
+ isBrowser: boolean;
11
+ cookiePath: string | null;
12
+ accessToken: string | null;
13
+ accessTokenKey: string;
14
+ accessTokenCookieExpireDays: number;
15
+ write(mode: TokenServiceMode | null): void;
16
+ read(mode: TokenServiceMode | null): string | null;
17
+ delete(mode: TokenServiceMode | null): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<TokenService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<TokenService>;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codefoxcore",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"
package/public-api.d.ts CHANGED
@@ -2,3 +2,6 @@ export * from './lib/classes';
2
2
  export * from './lib/services';
3
3
  export * from './lib/tokens';
4
4
  export * from './lib/interfaces';
5
+ export * from './lib/interceptors';
6
+ export * from './lib/providers';
7
+ export * from './lib/helpers';