codefoxcore 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +24 -0
  2. package/esm2022/codefoxcore.mjs +5 -0
  3. package/esm2022/lib/classes/dialog.config.class.mjs +22 -0
  4. package/esm2022/lib/classes/dialog.injector.class.mjs +14 -0
  5. package/esm2022/lib/classes/dialog.ref.class.mjs +72 -0
  6. package/esm2022/lib/classes/index.mjs +4 -0
  7. package/esm2022/lib/interfaces.mjs +28 -0
  8. package/esm2022/lib/services/api.service.mjs +84 -0
  9. package/esm2022/lib/services/dialog.service.mjs +324 -0
  10. package/esm2022/lib/services/index.mjs +5 -0
  11. package/esm2022/lib/services/logger.service.mjs +62 -0
  12. package/esm2022/lib/services/message.service.mjs +174 -0
  13. package/esm2022/lib/tokens/alert.token.mjs +20 -0
  14. package/esm2022/lib/tokens/confirm.token.mjs +7 -0
  15. package/esm2022/lib/tokens/dialog.token.mjs +7 -0
  16. package/esm2022/lib/tokens/index.mjs +6 -0
  17. package/esm2022/lib/tokens/loglevel.token.mjs +8 -0
  18. package/esm2022/lib/tokens/message.token.mjs +14 -0
  19. package/esm2022/public-api.mjs +5 -0
  20. package/fesm2022/codefoxcore.mjs +820 -0
  21. package/fesm2022/codefoxcore.mjs.map +1 -0
  22. package/index.d.ts +5 -0
  23. package/lib/classes/dialog.config.class.d.ts +22 -0
  24. package/lib/classes/dialog.injector.class.d.ts +8 -0
  25. package/lib/classes/dialog.ref.class.d.ts +24 -0
  26. package/lib/classes/index.d.ts +3 -0
  27. package/lib/interfaces.d.ts +121 -0
  28. package/lib/services/api.service.d.ts +24 -0
  29. package/lib/services/dialog.service.d.ts +34 -0
  30. package/lib/services/index.d.ts +4 -0
  31. package/lib/services/logger.service.d.ts +17 -0
  32. package/lib/services/message.service.d.ts +76 -0
  33. package/lib/tokens/alert.token.d.ts +6 -0
  34. package/lib/tokens/confirm.token.d.ts +5 -0
  35. package/lib/tokens/dialog.token.d.ts +3 -0
  36. package/lib/tokens/index.d.ts +5 -0
  37. package/lib/tokens/loglevel.token.d.ts +3 -0
  38. package/lib/tokens/message.token.d.ts +3 -0
  39. package/package.json +25 -0
  40. package/public-api.d.ts +4 -0
@@ -0,0 +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,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AG,EAAE;AAC9C,YAAA,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,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;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="codefoxcore" />
5
+ export * from './public-api';
@@ -0,0 +1,22 @@
1
+ import { ResolveData } from "@angular/router";
2
+ import { Observable } from "rxjs";
3
+ import { DialogConfiguration } from "../interfaces";
4
+ export declare class DialogConfig implements DialogConfiguration {
5
+ showCloseIcon: boolean;
6
+ beforeClose: null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean>;
7
+ ignoreKeyUp: boolean;
8
+ data: {
9
+ [key: (string | number)]: any;
10
+ };
11
+ noPadding: boolean;
12
+ keepActiveElement: boolean;
13
+ containerClasses: string[];
14
+ dialogClasses: string[];
15
+ resolve: ResolveData;
16
+ title: string | null;
17
+ contentElement: Element | null;
18
+ single: boolean;
19
+ width: string | null;
20
+ height: string | null;
21
+ getData(key: string | number, defaultOnUndefined?: any): any;
22
+ }
@@ -0,0 +1,8 @@
1
+ import { InjectionToken, Injector, Type } from "@angular/core";
2
+ export declare class DialogInjector implements Injector {
3
+ private _parentInjector;
4
+ private _additionalTokens;
5
+ constructor(_parentInjector: Injector, _additionalTokens: WeakMap<any, any>);
6
+ get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: {}): T;
7
+ get(token: any, notFoundValue?: any): any;
8
+ }
@@ -0,0 +1,24 @@
1
+ import { Observable } from "rxjs";
2
+ import { CfDialogCloseParams } from "../interfaces";
3
+ import { MessageService } from "../services";
4
+ import { DialogConfig } from "../classes";
5
+ export declare class DialogRef<T = any> {
6
+ messageService: MessageService | null;
7
+ dialogConfig: DialogConfig | null;
8
+ private readonly _onClose;
9
+ onClose: Observable<T | undefined>;
10
+ onCloseValue: Observable<T>;
11
+ onCloseOnValue: (value: any) => Observable<any>;
12
+ private readonly _onMessage;
13
+ onMessage: Observable<any>;
14
+ private readonly _onDestroy;
15
+ onDestroy: Observable<any>;
16
+ savedTitle: string;
17
+ title: string | null;
18
+ opened: Date;
19
+ private doClose;
20
+ close(result?: any, params?: CfDialogCloseParams): void;
21
+ forceClose(result?: any): void;
22
+ message(message: any): void;
23
+ destroy(): void;
24
+ }
@@ -0,0 +1,3 @@
1
+ export * from './dialog.ref.class';
2
+ export * from './dialog.config.class';
3
+ export * from './dialog.injector.class';
@@ -0,0 +1,121 @@
1
+ import { ComponentRef, Type } from "@angular/core";
2
+ import { Observable } from "rxjs";
3
+ import { DialogRef } from "./classes/dialog.ref.class";
4
+ export interface DialogComponentRefContainer {
5
+ componentRef: ComponentRef<any>;
6
+ container: HTMLDivElement;
7
+ openIndex: number;
8
+ }
9
+ export type PredefinedDialogs = {
10
+ [key: string]: (() => Promise<Type<any>>) | {
11
+ component: () => Promise<Type<any>>;
12
+ configuration: DialogConfiguration;
13
+ };
14
+ };
15
+ export interface DialogConfiguration {
16
+ showCloseIcon?: boolean;
17
+ beforeClose?: CfDialogConfigurationBeforeClose;
18
+ ignoreKeyUp?: boolean;
19
+ data?: any;
20
+ noPadding?: boolean;
21
+ keepActiveElement?: boolean;
22
+ containerClasses?: string[];
23
+ dialogClasses?: string[];
24
+ title?: string | null;
25
+ contentElement?: Element | null;
26
+ single?: boolean;
27
+ width?: string | null;
28
+ height?: string | null;
29
+ }
30
+ export type CfDialogConfigurationBeforeClose = null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean>;
31
+ export interface ConfirmConfiguration {
32
+ title: string;
33
+ text: string;
34
+ acceptText: string;
35
+ declineText: string;
36
+ hideDeclineButton?: boolean;
37
+ switchButtonColors?: boolean;
38
+ acceptTimeout?: number;
39
+ acceptValidationText?: string;
40
+ acceptValidationMode?: AcceptValidationMode;
41
+ acceptValidationLabel?: string;
42
+ }
43
+ export interface AlertConfiguration {
44
+ title: string;
45
+ text: string;
46
+ showCloseIcon?: boolean;
47
+ button?: Partial<AlertButtonConfiguration>;
48
+ }
49
+ export declare enum AcceptValidationMode {
50
+ PATTERN = "PATTERN",
51
+ TEXT = "TEXT"
52
+ }
53
+ export interface AlertButtonConfiguration {
54
+ label: string;
55
+ severity: string;
56
+ callback: (params: {
57
+ dialogRef: DialogRef;
58
+ }) => void;
59
+ translateLabel: boolean;
60
+ focus: boolean;
61
+ }
62
+ export interface CfDialogCloseParams {
63
+ message?: MessagePartial;
64
+ }
65
+ export interface MessagePartial extends Partial<MessageConfiguration> {
66
+ title: string;
67
+ message: string;
68
+ }
69
+ export interface MessageConfiguration {
70
+ closeable: boolean;
71
+ position: MessagePosition;
72
+ lifetime: number | null;
73
+ severity: MessageSeverity;
74
+ keepOnHover: boolean;
75
+ }
76
+ export declare enum MessagePosition {
77
+ TOP = "top",
78
+ BOTTOM = "bottom"
79
+ }
80
+ export declare enum MessageSeverity {
81
+ SUCCESS = "success",
82
+ WARNING = "warning",
83
+ DANGER = "danger",
84
+ INFO = "info"
85
+ }
86
+ export interface LoadingConfiguration {
87
+ title: string;
88
+ text: string;
89
+ loadingIcon?: string;
90
+ iconSize?: number;
91
+ }
92
+ export interface ModalWithButtonsConfiguration {
93
+ title: string;
94
+ text: string;
95
+ showCloseIcon?: boolean;
96
+ buttons: ButtonConfiguration[];
97
+ }
98
+ export interface ButtonConfiguration {
99
+ label: string;
100
+ severity: string;
101
+ callback?: (params: {
102
+ dialogRef: DialogRef;
103
+ }) => void;
104
+ routerLink?: any;
105
+ focus?: boolean;
106
+ permission?: string | string[];
107
+ translateLabel?: boolean;
108
+ }
109
+ export interface Message extends MessageConfiguration {
110
+ title: string;
111
+ message: string;
112
+ }
113
+ export declare enum LogLevel {
114
+ All = 0,
115
+ Debug = 1,
116
+ Info = 2,
117
+ Warn = 3,
118
+ Error = 4,
119
+ Fatal = 5,
120
+ Off = 6
121
+ }
@@ -0,0 +1,24 @@
1
+ import { HttpClient, HttpParams } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { LoggerService } from "./logger.service";
4
+ import * as i0 from "@angular/core";
5
+ export declare class ApiService {
6
+ httpClient: HttpClient;
7
+ loggerService: LoggerService;
8
+ private _apiBaseUrl;
9
+ post<T>(endPoint: (string | number)[], body: any): Observable<any>;
10
+ get<T>(endPoint: (string | number)[]): Observable<any>;
11
+ getFileArrayBuffer(endPoint: (string | number)[]): Observable<ArrayBuffer>;
12
+ getFileText(endPoint: (string | number)[]): Observable<string>;
13
+ getWithHttpParams<T>(endPoint: (string | number)[], params?: HttpParams | null): Observable<any>;
14
+ delete<T>(endPoint: (string | number)[]): Observable<any>;
15
+ patch<T>(endPoint: (string | number)[], body: any): Observable<any>;
16
+ head<T>(endPoint: (string | number)[]): Observable<any>;
17
+ options<T>(endPoint: (string | number)[]): Observable<any>;
18
+ put<T>(endPoint: (string | number)[], body: any): Observable<any>;
19
+ generateUrl(endPoint: (string | number)[]): string;
20
+ set apiBaseUrl(apiBaseUrl: string);
21
+ get apiBaseUrl(): string | null;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
24
+ }
@@ -0,0 +1,34 @@
1
+ import { Type } from '@angular/core';
2
+ import { Title } from '@angular/platform-browser';
3
+ import { AlertConfiguration, DialogConfiguration, ConfirmConfiguration, LoadingConfiguration, ModalWithButtonsConfiguration, DialogComponentRefContainer } from '../interfaces';
4
+ import { DialogConfig, DialogRef } from '../classes';
5
+ import { MessageService } from '../services';
6
+ import * as i0 from "@angular/core";
7
+ export declare class DialogService {
8
+ private injector;
9
+ private predefinedConfirmConfigurations;
10
+ private predefinedAlertConfigurations;
11
+ private predefinedDialogs;
12
+ title: Title;
13
+ messageService: MessageService;
14
+ dialogs: Map<DialogRef, DialogComponentRefContainer>;
15
+ openIndex: number;
16
+ platformId: Object;
17
+ constructor();
18
+ openPredefined<T = any>(name: string, dialogConfiguration?: DialogConfiguration): Promise<DialogRef<T>>;
19
+ openImport<T = any>(component: () => Promise<Type<any>>, dialogConfiguration?: DialogConfiguration): Promise<DialogRef<T>>;
20
+ open<T = any>(component: Type<any>, dialogConfiguration?: DialogConfiguration): DialogRef<T>;
21
+ changeAndStoreTitle(dialogRef: DialogRef): void;
22
+ createDialogConfig(dialogConfiguration: DialogConfiguration): DialogConfig;
23
+ appendToBody(component: Type<any>, dialogConfig: DialogConfig): DialogRef;
24
+ removeFromBody(dialogRef: DialogRef): void;
25
+ confirm(configuration: ConfirmConfiguration | string, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): Promise<boolean>;
26
+ confirmAsync(configuration: ConfirmConfiguration | string, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): Promise<boolean>;
27
+ confirmAccept(configuration: ConfirmConfiguration | string, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): Promise<boolean>;
28
+ confirmDecline(configuration: ConfirmConfiguration | string, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): Promise<boolean>;
29
+ showLoading(configuration: LoadingConfiguration, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): DialogRef;
30
+ showAlert(configuration: AlertConfiguration | string, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): Promise<void>;
31
+ showModalWithButtons(configuration: ModalWithButtonsConfiguration, dialogConfiguration: DialogConfiguration | undefined, component: Type<any>): DialogRef;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
34
+ }
@@ -0,0 +1,4 @@
1
+ export * from './dialog.service';
2
+ export * from './message.service';
3
+ export * from './api.service';
4
+ export * from './logger.service';
@@ -0,0 +1,17 @@
1
+ import { LogLevel } from '../interfaces';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LoggerService {
4
+ private _logLevel;
5
+ private logLevelColors;
6
+ debug(log: any, group?: boolean): void;
7
+ info(log: any, group?: boolean): void;
8
+ warn(log: any, group?: boolean): void;
9
+ error(log: any, group?: boolean): void;
10
+ fatal(log: any, group?: boolean): void;
11
+ groupEnd(): void;
12
+ private log;
13
+ set logLevel(logLevel: LogLevel | null);
14
+ get logLevel(): LogLevel | null;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoggerService>;
17
+ }
@@ -0,0 +1,76 @@
1
+ import { MessageConfiguration } from '../interfaces';
2
+ import * as i0 from "@angular/core";
3
+ export declare class MessageService {
4
+ /**
5
+ * Default configuration
6
+ *
7
+ * Can be changed if you overwrite it or use the `MESSAGE_DEFAULT_CONFIGURATION` InjectionToken
8
+ */
9
+ defaultConfiguration: MessageConfiguration;
10
+ /**
11
+ * Message subject
12
+ */
13
+ private messageSubject;
14
+ /**
15
+ * Show
16
+ *
17
+ * Displays message with the given configuration
18
+ *
19
+ * @param messageConfiguration `Partial<MessageConfiguration>`
20
+ */
21
+ show(title: string, message: string, configuration?: Partial<MessageConfiguration>): void;
22
+ /**
23
+ * Show success message
24
+ *
25
+ * Display a message with default success severity
26
+ *
27
+ * @param title `string`, required
28
+ * @param message `string`, required
29
+ * @param lifetime `number`, optional, default is `this.defaultLifetime`
30
+ * @param position `MessagePosition`, optional, default is `this.defaultPosition`
31
+ * @param closeable `boolean`, optional, default is `this.defaultClosable`
32
+ */
33
+ showSuccessMessage(title: string, message: string, configuration?: Partial<Omit<MessageConfiguration, 'severity'>>): void;
34
+ /**
35
+ * Show danger message
36
+ *
37
+ * Display a message with default danger severity
38
+ *
39
+ * @param title `string`, required
40
+ * @param message `string`, required
41
+ * @param lifetime `number`, optional, default is `this.defaultLifetime`
42
+ * @param position `MessagePosition`, optional, default is `this.defaultPosition`
43
+ * @param closeable `boolean`, optional, default is `this.defaultClosable`
44
+ */
45
+ showDangerMessage(title: string, message: string, configuration?: Partial<Omit<MessageConfiguration, 'severity'>>): void;
46
+ /**
47
+ * Show warning message
48
+ *
49
+ * Display a message with default warning severity
50
+ *
51
+ * @param title `string`, required
52
+ * @param message `string`, required
53
+ * @param lifetime `number`, optional, default is `this.defaultLifetime`
54
+ * @param position `MessagePosition`, optional, default is `this.defaultPosition`
55
+ * @param closeable `boolean`, optional, default is `this.defaultClosable`
56
+ */
57
+ showWarningMessage(title: string, message: string, configuration?: Partial<Omit<MessageConfiguration, 'severity'>>): void;
58
+ /**
59
+ * Show info message
60
+ *
61
+ * Display a message with default info severity
62
+ *
63
+ * @param title `string`, required
64
+ * @param message `string`, required
65
+ * @param lifetime `number`, optional, default is `this.defaultLifetime`
66
+ * @param position `MessagePosition`, optional, default is `this.defaultPosition`
67
+ * @param closeable `boolean`, optional, default is `this.defaultClosable`
68
+ */
69
+ showInfoMessage(title: string, message: string, configuration?: Partial<Omit<MessageConfiguration, 'severity'>>): void;
70
+ private showMessage;
71
+ private createMessageHtmlElement;
72
+ private hideMessage;
73
+ constructor();
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
75
+ static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
76
+ }
@@ -0,0 +1,6 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ import { AlertButtonConfiguration, AlertConfiguration } from "../interfaces";
3
+ export declare const ALERT_DEFAULT_BUTTON_CONFIGURATION: InjectionToken<AlertButtonConfiguration>;
4
+ export declare const ALERT_CONFIGURATIONS: InjectionToken<{
5
+ [key: string]: AlertConfiguration;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ import { ConfirmConfiguration } from "../interfaces";
3
+ export declare const CONFIRM_CONFIGURATIONS: InjectionToken<{
4
+ [key: string]: ConfirmConfiguration;
5
+ }>;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ import { PredefinedDialogs } from "../interfaces";
3
+ export declare const CF_PREDEFINED_DIALOGS: InjectionToken<PredefinedDialogs>;
@@ -0,0 +1,5 @@
1
+ export * from './alert.token';
2
+ export * from './dialog.token';
3
+ export * from './confirm.token';
4
+ export * from './message.token';
5
+ export * from './loglevel.token';
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ import { LogLevel } from "../interfaces";
3
+ export declare const LOG_LEVEL: InjectionToken<LogLevel>;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ import { MessageConfiguration } from "../interfaces";
3
+ export declare const MESSAGE_DEFAULT_CONFIGURATION: InjectionToken<MessageConfiguration>;
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "codefoxcore",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^16.1.0",
6
+ "@angular/core": "^16.1.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/codefoxcore.mjs",
13
+ "typings": "index.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "esm2022": "./esm2022/codefoxcore.mjs",
21
+ "esm": "./esm2022/codefoxcore.mjs",
22
+ "default": "./fesm2022/codefoxcore.mjs"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/classes';
2
+ export * from './lib/services';
3
+ export * from './lib/tokens';
4
+ export * from './lib/interfaces';