@lenne.tech/ng-base 0.0.11 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/lenne.tech-ng-base-src-lib-base.umd.js +338 -32
- package/bundles/lenne.tech-ng-base-src-lib-base.umd.js.map +1 -1
- package/bundles/lenne.tech-ng-base.umd.js +338 -32
- package/bundles/lenne.tech-ng-base.umd.js.map +1 -1
- package/esm2015/lib/base/factories/apollo-options.factory.js +43 -4
- package/esm2015/lib/base/interfaces/base-module-config.interface.js +1 -1
- package/esm2015/lib/base/services/graphql-plus.service.js +5 -2
- package/esm2015/lib/base/services/graphql.service.js +37 -6
- package/esm2015/lib/base/services/scroll.service.js +201 -16
- package/esm2015/src/lib/base/factories/apollo-options.factory.js +43 -4
- package/esm2015/src/lib/base/interfaces/base-module-config.interface.js +1 -1
- package/esm2015/src/lib/base/services/graphql-plus.service.js +5 -2
- package/esm2015/src/lib/base/services/graphql.service.js +37 -6
- package/esm2015/src/lib/base/services/scroll.service.js +201 -16
- package/fesm2015/lenne.tech-ng-base-src-lib-base.js +281 -24
- package/fesm2015/lenne.tech-ng-base-src-lib-base.js.map +1 -1
- package/fesm2015/lenne.tech-ng-base.js +281 -24
- package/fesm2015/lenne.tech-ng-base.js.map +1 -1
- package/lib/base/interfaces/base-module-config.interface.d.ts +9 -0
- package/lib/base/services/graphql.service.d.ts +1 -1
- package/lib/base/services/scroll.service.d.ts +66 -3
- package/package.json +1 -1
- package/src/lib/base/interfaces/base-module-config.interface.d.ts +9 -0
- package/src/lib/base/lenne.tech-ng-base-src-lib-base.metadata.json +1 -1
- package/src/lib/base/services/graphql.service.d.ts +1 -1
- package/src/lib/base/services/scroll.service.d.ts +66 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lenne.tech-ng-base-src-lib-base.js","sources":["../../../projects/ng-base/src/lib/base/interfaces/base-module-config.interface.ts","../../../projects/ng-base/src/lib/base/services/storage.service.ts","../../../projects/ng-base/src/lib/base/services/auth.service.ts","../../../projects/ng-base/src/lib/base/factories/apollo-options.factory.ts","../../../projects/ng-base/src/lib/base/directives/context-menu.directive.ts","../../../projects/ng-base/src/lib/base/directives/lazy-load.directive.ts","../../../projects/ng-base/src/lib/base/directives/match-height.directive.ts","../../../projects/ng-base/src/lib/base/directives/resizable.directive.ts","../../../projects/ng-base/src/lib/base/pipes/ellipses.pipe.ts","../../../projects/ng-base/src/lib/base/pipes/safe-html.pipe.ts","../../../projects/ng-base/src/lib/base/base.module.ts","../../../projects/ng-base/src/lib/base/classes/helper.class.ts","../../../projects/ng-base/src/lib/base/classes/standard.class.ts","../../../projects/ng-base/src/lib/base/classes/basic-user.class.ts","../../../projects/ng-base/src/lib/base/classes/graphql-enum.class.ts","../../../projects/ng-base/src/lib/base/classes/graphql-type.class.ts","../../../projects/ng-base/src/lib/base/classes/graphql-meta.class.ts","../../../projects/ng-base/src/lib/base/guards/auth.guard.ts","../../../projects/ng-base/src/lib/base/guards/can-deactivate.guard.ts","../../../projects/ng-base/src/lib/base/guards/logout.guard.ts","../../../projects/ng-base/src/lib/base/enums/comparison-operator.enum.ts","../../../projects/ng-base/src/lib/base/enums/graphql-request-type.enum.ts","../../../projects/ng-base/src/lib/base/enums/logical-operator.enum.ts","../../../projects/ng-base/src/lib/base/enums/sort-order.enum.ts","../../../projects/ng-base/src/lib/base/services/fullscreen.service.ts","../../../projects/ng-base/src/lib/base/services/graphql-meta.service.ts","../../../projects/ng-base/src/lib/base/services/graphql.service.ts","../../../projects/ng-base/src/lib/base/services/loader.service.ts","../../../projects/ng-base/src/lib/base/services/graphql-plus.service.ts","../../../projects/ng-base/src/lib/base/services/scroll.service.ts","../../../projects/ng-base/src/lib/base/services/seo.service.ts","../../../projects/ng-base/src/lib/base/validators/must-match.validator.ts","../../../projects/ng-base/src/lib/base/public-api.ts","../../../projects/ng-base/src/lib/base/lenne.tech-ng-base-src-lib-base.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { StorageType } from '../types/storage.type';\n\n/**\n * Configuration for base module\n */\nexport interface BaseModuleConfig {\n /**\n * URL to server API\n * Default: 'localhost:3000'\n */\n apiUrl?: string;\n\n /**\n * Default redirect URL for AuthGuard\n * Default: '/auth'\n */\n authGuardRedirectUrl?: string;\n\n /**\n * Whether logging is enabled or not\n */\n logging?: false;\n\n /**\n * Version of the App (for storage handling)\n * Default: null\n */\n version?: string;\n\n /**\n * Prefix of the App (for storage handling)\n * Default: null\n */\n prefix?: string;\n\n /**\n * Scroll detection offset for ScrollService\n * Should be >= scrollOffset\n * Default: 200\n */\n scrollDetectionOffset?: number;\n\n /**\n * Scroll offset for ScrollService\n * Default: 100\n */\n scrollOffset?: number;\n\n /**\n * Type of storage: 'session' or 'local'\n * Default: 'local'\n */\n storageType?: StorageType;\n}\n\nexport const BASE_MODULE_CONFIG = new InjectionToken('BASE_MODULE_CONFIG');\n","import { Inject, Injectable } from '@angular/core';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\n\n/**\n * Storage service for local data storage\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n /**\n * Storage\n */\n protected storage: any = null;\n\n /**\n * Prefix for storage keys\n */\n protected prefix = '';\n\n /**\n * Initializations\n */\n constructor(@Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig) {\n // Set storage\n const type = moduleConfig.storageType ? moduleConfig.storageType : 'local';\n if (window[type + 'Storage']) {\n this.storage = window[type + 'Storage'];\n }\n\n // Set prefix\n this.prefix = '';\n if (moduleConfig.prefix) {\n this.prefix += moduleConfig.prefix + '_';\n }\n if (moduleConfig.version) {\n this.prefix += moduleConfig.version + '_';\n }\n }\n\n /**\n * Save itemKeys\n *\n * If you want to save one item, use itemKeys and value parameters like these:\n * save('KEY_OF_THE_ITEM', ITEM)\n *\n * If you want to save multiple items, use itemKeys only (value parameter will be ignored):\n * save({'KEY_OF_ITEM_1': ITEM_1, 'KEY_OF_ITEM_2': ITEM_2, ...})\n */\n public save(itemKeys: string | { [key: string]: any }, value?: any): boolean {\n // Check local storage\n if (!this.storage) {\n return false;\n }\n\n // Check item keys and value\n if (\n !itemKeys ||\n (typeof itemKeys === 'object' && !Object.keys(itemKeys).length) ||\n (typeof itemKeys === 'string' && value === undefined)\n ) {\n return false;\n }\n\n if (typeof itemKeys === 'object') {\n for (const [itemKey, itemValue] of Object.entries(itemKeys)) {\n this.storage.setItem(this.prefix + itemKey, JSON.stringify(itemValue));\n }\n return true;\n }\n\n this.storage.setItem(this.prefix + itemKeys, JSON.stringify(value));\n return true;\n }\n\n /**\n * Load items via key(s)\n */\n public load(itemKeys: string | string[]): any {\n // Check local storage\n if (!this.storage) {\n return;\n }\n\n // Check item keys\n if (!itemKeys || (Array.isArray(itemKeys) && !itemKeys.length)) {\n return null;\n }\n\n if (Array.isArray(itemKeys)) {\n const back = {};\n itemKeys.forEach((itemKey) => {\n const loadedItem = this.storage.getItem(this.prefix + itemKey);\n if (loadedItem) {\n back[itemKey] = JSON.parse(loadedItem);\n } else {\n back[itemKey] = null;\n }\n });\n return back;\n }\n\n let value = this.storage.getItem(this.prefix + itemKeys);\n if (value) {\n value = JSON.parse(value);\n }\n\n return value;\n }\n\n /**\n * Remove item from storage\n *\n * @param itemKeys keys or key to remove\n */\n public remove(itemKeys: string | string[]): boolean {\n // Check local storage\n if (!this.storage) {\n return false;\n }\n\n if (Array.isArray(itemKeys)) {\n itemKeys.forEach((key) => {\n this.storage.removeItem(this.prefix + key);\n });\n return true;\n }\n\n this.storage.removeItem(this.prefix + itemKeys);\n return true;\n }\n\n /**\n * Clear local storage\n */\n public reset(): void {\n this.storage.clear();\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\nimport { BasicUser } from '../classes/basic-user.class';\nimport { StorageService } from './storage.service';\n\n/**\n * Authentication service\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n\n // Subjects\n private _currentUser: BehaviorSubject<BasicUser> = new BehaviorSubject<BasicUser>(null);\n private _token: BehaviorSubject<string> = new BehaviorSubject<string>(null);\n\n /**\n * Constructor\n */\n constructor(@Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig, private storageService: StorageService) {\n this.token = this.storageService.load('token') as string;\n this.currentUser = this.storageService.load('currentUser') as BasicUser;\n }\n\n /**\n * Logout\n */\n public logout() {\n this.storageService.remove(['token', 'currentUser']);\n this.currentUser = null;\n this.token = null;\n }\n\n // #################################################################\n // Current User\n // #################################################################\n\n get currentUser(): BasicUser {\n return this._currentUser.value;\n }\n\n set currentUser(user: BasicUser) {\n this._currentUser.next(user);\n this.storageService.save('currentUser', user);\n }\n\n get currentUserObservable(): Observable<BasicUser> {\n return this._currentUser.asObservable();\n }\n\n // #################################################################\n // Token\n // #################################################################\n\n\n get token(): string {\n return this._token.value;\n }\n\n set token(token: string) {\n this._token.next(token);\n this.storageService.save('token', token);\n }\n\n get tokenObservable(): Observable<string> {\n return this._token.asObservable();\n }\n}\n","import { HttpLink } from 'apollo-angular/http';\nimport { BaseModuleConfig } from '../interfaces/base-module-config.interface';\nimport { AuthService } from '../services/auth.service';\nimport { ApolloLink } from '@apollo/client/core';\nimport { InMemoryCache } from '@apollo/client/cache';\n\n/**\n * Factory for apollo-angular options\n */\nexport function apolloOptionsFactory(baseModuleConfig: BaseModuleConfig, httpLink: HttpLink, authService: AuthService) {\n const link = httpLink.create({\n uri: baseModuleConfig.apiUrl,\n });\n\n const authMiddleware = new ApolloLink((operation, forward) => {\n const headers: any = {};\n if (localStorage) {\n const token = authService.token || null;\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n operation.setContext(() => ({ headers }));\n }\n return forward(operation);\n });\n\n return {\n link: ApolloLink.from([authMiddleware, link]),\n cache: new InMemoryCache(),\n defaultOptions: {\n query: {\n fetchPolicy: 'network-only',\n },\n },\n };\n}\n","import { Directive, ElementRef, Input, OnInit, Output } from '@angular/core';\n\n/**\n * Directive vor context menu\n * See https://stackblitz.com/edit/angular-custom-context-menu\n */\n@Directive({\n selector: '[ltContextMenu]',\n exportAs: 'contextMenuData',\n})\nexport class ContextMenuDirective implements OnInit {\n @Input() contextMenuData?: any;\n @Input() ltContextMenu: HTMLElement;\n @Input() xGap = 0;\n @Input() yGap = 0;\n @Input() overflowSpace = 10;\n @Input() selectors = '*';\n @Output() clickedElement: Element = null;\n previousDisplayStatus: string = null;\n\n constructor(private el: ElementRef) {}\n\n ngOnInit() {\n if (this.ltContextMenu) {\n this.previousDisplayStatus = this.ltContextMenu.style.display;\n }\n\n // Add a click listener to the window,\n // so that we can close the context menu on left click\n window.addEventListener('click', () => {\n this.showContextMenu(null, false);\n });\n\n // Close context menu when escape is pressed\n window.addEventListener('keydown', (e) => {\n if (e.code === 'Escape') {\n this.showContextMenu(null, false);\n }\n });\n\n // Add an event listener to listen to the 'contextmenu' event\n this.el.nativeElement.addEventListener('contextmenu', (e) => {\n // Prevent the default context menu to popup\n if (e.preventDefault) {\n e.preventDefault();\n }\n // Shows our own context menu\n this.showContextMenu(e, true);\n });\n }\n\n // Shows or hides our custom context menu, which is specified as a input\n showContextMenu(event, show: boolean) {\n const cm = this.ltContextMenu;\n if (cm) {\n // Try to open context menu\n if (show && event && event instanceof MouseEvent) {\n // Get valid clicked structureElement\n const clickedElement = (event?.target as HTMLElement)?.closest(this.selectors);\n if (clickedElement) {\n // Set clicked structureElement\n this.clickedElement = clickedElement;\n\n setTimeout(() => {\n // Set display status\n cm.style.display = 'block';\n\n // Calculate top position\n let top = event.y + this.yGap;\n if (top + cm.offsetHeight + 10 > document.documentElement.clientHeight) {\n top = document.documentElement.clientHeight - cm.offsetHeight - this.overflowSpace;\n }\n\n // Calculate left position\n let left = event.x + this.xGap;\n if (left + cm.offsetWidth + 10 > document.documentElement.clientWidth) {\n left = document.documentElement.clientWidth - cm.offsetWidth - this.overflowSpace;\n }\n\n // Set position\n cm.style.top = top + 'px';\n cm.style.left = left + 'px';\n\n // Show\n cm.style.opacity = '1.0';\n cm.style['pointer-events'] = 'auto';\n }, 1);\n\n return;\n }\n }\n\n // Close context menu\n this.clickedElement = null;\n if (this.previousDisplayStatus) {\n cm.style.display = this.previousDisplayStatus;\n }\n cm.style.opacity = '0.01';\n cm.style['pointer-events'] = 'none';\n }\n }\n}\n","import { AfterViewInit, Directive, ElementRef, HostBinding, Input } from '@angular/core';\n\n/**\n * Directive for lazy loading images\n */\n@Directive({\n selector: 'img[ltLazyLoad]',\n})\nexport class LazyLoadDirective implements AfterViewInit {\n @HostBinding('attr.src') srcAttr = null;\n @Input() src: string;\n\n constructor(private el: ElementRef) {}\n\n ngAfterViewInit() {\n this.canLazyLoad() ? this.lazyLoadImage() : this.loadImage();\n }\n\n private canLazyLoad() {\n return window && 'IntersectionObserver' in window;\n }\n\n private lazyLoadImage() {\n const obs = new IntersectionObserver((entries) => {\n entries.forEach(({isIntersecting}) => {\n if (isIntersecting) {\n this.loadImage();\n obs.unobserve(this.el.nativeElement);\n }\n });\n });\n obs.observe(this.el.nativeElement);\n }\n\n private loadImage() {\n this.srcAttr = this.src;\n }\n}\n","import { AfterViewChecked, Directive, ElementRef, HostListener, Input } from '@angular/core';\n\n/**\n * Set same height (maximum) to different elements\n */\n@Directive({\n selector: '[ltMatchHeight]',\n})\nexport class MatchHeightDirective implements AfterViewChecked {\n // class name to match height\n @Input()\n ltMatchHeight: string | string[];\n\n constructor(private el: ElementRef) {}\n\n @HostListener('window:resize')\n onResize() {\n this.matchHeight(this.el.nativeElement, this.ltMatchHeight);\n }\n\n ngAfterViewChecked() {\n this.matchHeight(this.el.nativeElement, this.ltMatchHeight);\n }\n\n matchHeight(parent: HTMLElement, target: string | string[]) {\n if (!parent) {\n return;\n }\n\n let classNames;\n if (!Array.isArray(target)) {\n classNames = [target];\n } else {\n classNames = target;\n }\n\n classNames.forEach((className) => {\n // find all child structureElements with the selected class name\n const children = parent.getElementsByClassName(className);\n\n if (!children) {\n return;\n }\n\n // reset all children height\n Array.from(children).forEach((x: HTMLElement) => {\n x.style.height = 'initial';\n });\n\n // get all the child structureElements heights\n const itemHeights = Array.from(children).map((x) => x.getBoundingClientRect().height);\n\n // find out the tallest one\n const maxHeight = itemHeights.reduce((prev, curr) => (curr > prev ? curr : prev), 0);\n\n // update the child structureElements height to the tallest one\n Array.from(children).forEach((x: HTMLElement) => (x.style.height = `${maxHeight}px`));\n });\n }\n}\n","import { Directive, ElementRef, Input, OnInit } from '@angular/core';\n\n/**\n * Reszise detection\n * (inpsired by: https://stackblitz.com/edit/angular-resizable)\n */\n@Directive({\n selector: '[ltResizable]',\n})\nexport class ResizableDirective implements OnInit {\n @Input() resizableGrabWidth = 8;\n @Input() resizableMinWidth = 10;\n\n dragging = false;\n\n constructor(private el: ElementRef) {}\n\n ngOnInit(): void {\n this.addListenerToDocument();\n this.addListenerToElement();\n }\n\n mouseMoveG(evt) {\n if (!this.dragging) {\n return;\n }\n this.newWidth(evt.clientX - this.el.nativeElement.offsetLeft);\n evt.stopPropagation();\n }\n\n newWidth(wid) {\n const result = Math.max(this.resizableMinWidth, wid);\n this.el.nativeElement.style.width = result + 'px';\n }\n\n mouseDown(evt) {\n if (this.inDragRegion(evt)) {\n this.dragging = true;\n this.preventGlobalMouseEvents();\n evt.stopPropagation();\n }\n }\n\n restoreGlobalMouseEvents() {\n document.body.style['pointer-events'] = 'auto';\n }\n\n mouseUpG(evt: Event) {\n if (!this.dragging) {\n return;\n }\n this.restoreGlobalMouseEvents();\n this.dragging = false;\n evt.stopPropagation();\n }\n\n mouseMove(evt) {\n if (this.inDragRegion(evt) || this.dragging) {\n this.el.nativeElement.style.cursor = 'col-resize';\n } else {\n this.el.nativeElement.style.cursor = 'default';\n }\n }\n\n preventGlobalMouseEvents() {\n document.body.style['pointer-events'] = 'none';\n }\n\n inDragRegion(evt) {\n return this.el.nativeElement.clientWidth - evt.clientX + this.el.nativeElement.offsetLeft < this.resizableGrabWidth;\n }\n\n private addListenerToDocument() {\n document.addEventListener(\n 'mousemove',\n (e) => {\n this.mouseMoveG(e);\n },\n true\n );\n\n document.addEventListener(\n 'mouseup',\n (e) => {\n this.mouseUpG(e);\n },\n true\n );\n }\n\n private addListenerToElement() {\n this.el.nativeElement.addEventListener(\n 'mousedown',\n (e) => {\n this.mouseDown(e);\n },\n true\n );\n\n this.el.nativeElement.addEventListener(\n 'mousemove',\n (e) => {\n this.mouseMove(e);\n },\n true\n );\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Truncate string with ellipses\n */\n@Pipe({\n name: 'ltEllipses',\n})\nexport class EllipsesPipe implements PipeTransform {\n transform(value: string, limit: number): string {\n if (!value) {\n return null;\n }\n\n return value.length > limit ? value.substring(0, limit) + '...' : value;\n }\n}\n","import { DomSanitizer } from '@angular/platform-browser';\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Declarate html as safe\n */\n@Pipe({name: 'ltSafeHtml'})\nexport class SafeHtmlPipe implements PipeTransform {\n constructor(private sanitized: DomSanitizer) {}\n\n transform(value) {\n return this.sanitized.bypassSecurityTrustHtml(value);\n }\n}\n","import { APOLLO_OPTIONS } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { AuthService } from './services/auth.service';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from './interfaces/base-module-config.interface';\nimport { apolloOptionsFactory } from './factories/apollo-options.factory';\nimport { ContextMenuDirective } from './directives/context-menu.directive';\nimport { LazyLoadDirective } from './directives/lazy-load.directive';\nimport { MatchHeightDirective } from './directives/match-height.directive';\nimport { ResizableDirective } from './directives/resizable.directive';\nimport { EllipsesPipe } from './pipes/ellipses.pipe';\nimport { SafeHtmlPipe } from './pipes/safe-html.pipe';\n\n// Imported and exported elements\nconst elements = [\n // Directives\n ContextMenuDirective,\n LazyLoadDirective,\n MatchHeightDirective,\n ResizableDirective,\n\n // Pipes\n EllipsesPipe,\n SafeHtmlPipe,\n];\n\n/**\n * Base module\n */\n@NgModule({\n declarations: elements,\n exports: elements,\n})\nexport class BaseModule {\n /**\n * Set configuration of base module in root module of the app\n */\n static forRoot(baseModuleConfig: BaseModuleConfig = {}): ModuleWithProviders<BaseModule> {\n // Default config\n const config = {\n apiUrl: 'localhost:3000',\n authGuardRedirectUrl: '/auth',\n logging: false,\n version: null,\n prefix: null,\n scrollDetectionOffset: 200,\n scrollOffset: 100,\n storageType: 'local',\n ...baseModuleConfig,\n };\n\n // Prepare providers\n const providers: Provider[] = [\n {\n provide: BASE_MODULE_CONFIG,\n useValue: baseModuleConfig,\n },\n ];\n\n // Add apollo features if API URL is set\n if (baseModuleConfig.apiUrl) {\n providers.push({\n provide: APOLLO_OPTIONS,\n useFactory: apolloOptionsFactory,\n deps: [BASE_MODULE_CONFIG, HttpLink, AuthService],\n });\n } else if (config.logging) {\n console.log('apiUrl is missing, ApolloLink is not initialized');\n }\n\n // Return root module\n return {\n ngModule: BaseModule,\n providers,\n };\n }\n}\n","import { Standard } from './standard.class';\n\n/**\n * Helper class\n */\nexport class Helper {\n /**\n * Simple filter function for plain objects\n */\n static filter<T = { [key: string]: any }>(objects: T[], filter: { [key: string]: any }): T[] {\n return (objects?.filter((element) => {\n for (const [key, value] of Object.entries(filter)) {\n if (Array.isArray(element[key])) {\n for (const item of element[key]) {\n if (!element[key].includs(value)) {\n return false;\n }\n }\n } else if (element[key] !== value) {\n return false;\n }\n }\n return true;\n }) || []) as any[];\n }\n\n /**\n * Convert to a url/uri conform string\n * Only:\n * - lower case\n * - chars, numbers and hyphens\n */\n static urlString(str: any, options: { allowAll?: boolean } = {}): string {\n // Config\n const config = {\n allowAll: false,\n ...options,\n };\n\n // To string\n str = str + '';\n\n // Trim\n str = str.trim();\n\n // Lower case\n str = str.toLowerCase();\n\n if (!config.allowAll) {\n // Replace spaces\n str = str.trim().replace(/\\s+/g, '-');\n\n // Replace some special chars\n str = str.replace('ä', 'ae');\n str = str.replace('ö', 'oe');\n str = str.replace('ü', 'ue');\n str = str.replace('ß', 'ss');\n\n // Remove other special chars\n str = str.replace(/[^a-zA-Z0-9-]/g, '');\n }\n\n // Return url conform string\n return encodeURI(str);\n }\n\n /**\n * Simple map function\n */\n public static map<T = { [key: string]: any }>(\n source: Partial<T> | { [key: string]: any },\n target: T,\n options: { funcAllowed?: boolean; dateStringToDate?: boolean | string[] } = {}\n ): T {\n // Set config\n const config = {\n funcAllowed: false,\n dateStringToDate: true,\n ...options,\n };\n\n // Check source\n if (!source || typeof source !== 'object' || Array.isArray(source)) {\n return target;\n }\n\n // Update properties\n for (const key of Object.keys(target)) {\n if (source[key] !== undefined && (config.funcAllowed || typeof (source[key] !== 'function'))) {\n if (typeof source[key] === 'string' && config.dateStringToDate) {\n if (Array.isArray(config.dateStringToDate)) {\n if (config.dateStringToDate.includes(key)) {\n target[key] = Helper.parseDate(source[key]);\n }\n } else {\n target[key] = Helper.parseDate(source[key]);\n }\n } else {\n target[key] = source[key];\n }\n }\n }\n\n // Return target\n return target;\n }\n\n /**\n * Create Object or Objects of specified type with specified data\n */\n public static maps<T extends Standard>(\n data: Partial<T> | Partial<T>[] | { [key: string]: any } | { [key: string]: any }[],\n targetClass: new (...args: any[]) => T\n ): T[] {\n // Check data\n if (!data || typeof data !== 'object') {\n return undefined;\n }\n\n // Check array\n if (!Array.isArray(data)) {\n data = [data];\n }\n\n // Map\n return (data as any).map((item: any) => {\n return (targetClass as any).map(item);\n });\n }\n\n /**\n * Get plain parameter\n */\n public static getPlainParameter(parameter: string) {\n if (!parameter) {\n return parameter;\n }\n return parameter?.split('?')?.shift()?.split('#')?.shift();\n }\n\n /**\n * Get ID of an url parameter\n */\n public static getParameterId(parameter: string) {\n if (!parameter) {\n return parameter;\n }\n return Helper.getPlainParameter(parameter)?.split('-').pop();\n }\n\n /**\n * Delay\n */\n public static delay(ms: number) {\n const promise = new Promise((resolve) => setTimeout(resolve, ms));\n return promise;\n }\n\n /**\n * Deep freeze\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze#What_is_shallow_freeze\n */\n public static deepFreeze(object: any, preparedObjects = []) {\n // Prevent infinit regress\n if (preparedObjects.includes(object as never)) {\n return object;\n }\n preparedObjects.push(object as never);\n\n // Retrieve the property names defined on object\n const propNames = Object.getOwnPropertyNames(object);\n\n // Freeze properties before freezing self\n for (const name of propNames) {\n const value = object[name];\n\n if (value && typeof value === 'object') {\n Helper.deepFreeze(value, preparedObjects);\n }\n }\n\n return Object.freeze(object);\n }\n\n /**\n * Generates an unique identifier with 24 characters\n */\n public static getUID(): string {\n let dt = new Date().getTime();\n const uuid = 'xxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n // eslint-disable-next-line no-bitwise\n const r = (dt + Math.random() * 16) % 16 | 0;\n dt = Math.floor(dt / 16);\n // eslint-disable-next-line no-bitwise\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n return uuid;\n }\n\n /**\n * Parse date string to date object\n */\n public static parseDate(dateString: string) {\n const reISO = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*))(?:Z|(\\+|-)([\\d|:]*))?$/;\n const reMsAjax = /^\\/Date\\((d|-|.*)\\)[\\/|\\\\]$/;\n if (typeof dateString === 'string') {\n const isoExec = reISO.exec(dateString);\n if (isoExec) {\n return new Date(dateString);\n }\n const msAjaxExec = reMsAjax.exec(dateString);\n if (msAjaxExec) {\n const cleaned = msAjaxExec[1].split(/[-+,.]/);\n return new Date(cleaned[0] ? +cleaned[0] : 0 - +cleaned[1]);\n }\n }\n return dateString;\n }\n\n /**\n * Get browser name and version\n */\n public static getBrowser() {\n const userAgent = navigator.userAgent;\n let data = userAgent.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n let version;\n if (/trident/i.test(data[1])) {\n version = /\\brv[ :]+(\\d+)/g.exec(userAgent) || [];\n return { name: 'IE', version: version[1] || '' };\n }\n if (data[1] === 'Chrome') {\n version = userAgent.match(/\\bOPR|Edge\\/(\\d+)/);\n if (version != null) {\n return { name: 'Opera', version: version[1] };\n }\n }\n data = data[2] ? [data[1], data[2]] : [navigator.appName, navigator.appVersion, '-?'];\n version = userAgent.match(/version\\/(\\d+)/i);\n if (version !== null) {\n data.splice(1, 1, version[1]);\n }\n return {\n name: data[0],\n version: data[1],\n };\n }\n\n /**\n * Whether first parameter is a deep subset of second parameter\n * Hint: functions will be ignored\n */\n static isSubset(a: any, b: any) {\n // Equal\n if (a === b) {\n return true;\n }\n\n // Different type\n if (typeof a !== typeof b) {\n return false;\n }\n\n // Process array\n if (Array.isArray(a)) {\n for (const [key, value] of Object.entries(a)) {\n if (Helper.isSubset(value, b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // Process object\n if (typeof a === 'object') {\n const plain = JSON.parse(JSON.stringify(a));\n for (const [key, value] of Object.entries(plain)) {\n if (Helper.isSubset(value, b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // Else\n return true;\n }\n\n /**\n * Whether parameters are equal (have equal properties)\n * Hint: functions will be ignored\n */\n static isEqual(a: any, b: any) {\n return Helper.isSubset(a, b) && Helper.isSubset(b, a);\n }\n\n /**\n * First level difference of two objects\n * Hint: functions will be ignored and when an array or an object is different the hole array or object will used as property value\n *\n * @returns Record<string, any> Object with properties from first object\n */\n static getDiff(a: Record<string, any>, b: Record<string, any>, clone: boolean = true) {\n const result = {};\n let firstObject = a;\n if (clone) {\n firstObject = JSON.parse(JSON.stringify(a));\n }\n for (const [key, value] of Object.entries(firstObject)) {\n if (!Helper.isSubset(value, b[key])) {\n result[key] = value;\n }\n }\n return result;\n }\n}\n","import { Helper } from './helper.class';\n\n/**\n * Standard class\n * Other classes should extend the Standard class, if they offer own functions\n * If the extended class uses object properties with own map functions, it should implement its own map function\n */\nexport class Standard {\n /**\n * Static map method\n */\n public static map<T extends Standard>(\n this: new (...args: any[]) => T,\n data: Partial<T> | { [key: string]: any },\n item: T = new this()\n ): T {\n return (item as any).map(data);\n }\n\n /**\n * Map data into an object\n */\n public map(data: Partial<this> | { [key: string]: any }): this {\n return Helper.map(data, this);\n }\n\n /**\n * Clone object (and map additional data)\n */\n public clone(mapData?: Partial<this> | { [key: string]: any }): this {\n const current = JSON.parse(JSON.stringify(this));\n if (mapData) {\n Object.assign(current, mapData);\n }\n return new (this as any).constructor().map(current);\n }\n\n /**\n * Compare this with another object\n * Hint: functions will be ignored and when an array or an object is different the hole array or object will used as property value\n *\n * @return Record<string, any> with properties of this object which are different\n */\n public getDiff(compare: Record<string, any>, clone: boolean = true) {\n return Helper.getDiff(this, compare, clone);\n }\n}\n","import { Standard } from './standard.class';\nimport { Helper } from './helper.class';\n\n/**\n * User class\n */\nexport class BasicUser extends Standard {\n id: string = undefined;\n email: string = undefined;\n firstName: string = undefined;\n lastName: string = undefined;\n roles: string[] = [];\n username: string = undefined;\n\n // ===================================================================================================================\n // Methods\n // ===================================================================================================================\n\n /**\n * Mapping\n */\n public map(data: Partial<this> | { [key: string]: any }): this {\n Helper.map(data, this);\n return this;\n }\n\n /**\n * Checks whether the user has at least one of the required roles\n */\n public hasRole(roles: string | string[]) {\n if (typeof roles === 'string') {\n roles = [roles];\n }\n if (!this.roles || this.roles.length < 1) {\n return false;\n }\n return !roles || roles.length < 1 ? true : this.roles.some((role) => roles.includes(role));\n }\n\n /**\n * Checks whether the user has all required roles\n */\n public hasAllRoles(roles: string | string[]) {\n if (typeof roles === 'string') {\n roles = [roles];\n }\n if (!this.roles || this.roles.length < 1) {\n return false;\n }\n return !roles ? true : roles.every((role) => this.roles.includes(role));\n }\n}\n","/**\n * GraphQL enum\n */\nexport class GraphQLEnum {\n value: string;\n\n constructor(value) {\n this.value = value;\n }\n}\n","import { Standard } from './standard.class';\n\n/**\n * GraphQL type\n */\nexport class GraphQLType extends Standard {\n type = '';\n isEnum = false;\n validEnums: string[] = [];\n}\n","import { GraphQLSchema } from 'graphql';\nimport { Maybe } from 'graphql/jsutils/Maybe';\nimport { GraphQLNamedType } from 'graphql/type/definition';\nimport { GraphQLRequestType } from '../enums/graphql-request-type.enum';\nimport { Helper } from './helper.class';\nimport { GraphQLType } from './graphql-type.class';\nimport { IGraphQLTypeCollection } from '../interfaces/graphql-type-collection.interface';\n\n/**\n * GraphQL meta\n */\nexport class GraphQLMeta {\n // Frozen caches\n protected args: Record<string, any> = {};\n protected fields: Record<string, any> = {};\n\n /**\n * Integrate schema\n */\n constructor(protected schema: GraphQLSchema) {\n if (!schema) {\n throw Error('Missing schema');\n }\n }\n\n /**\n * Get arguments of GraphQL function\n */\n getArgs(\n functionName: string,\n options: { cache?: boolean; freeze?: boolean; type?: GraphQLRequestType } = {}\n ): IGraphQLTypeCollection {\n const {cache, freeze, type} = {\n cache: true,\n freeze: true,\n type: undefined,\n ...options,\n };\n\n // Get cache\n if (cache && freeze) {\n const args = this.args[functionName + type];\n if (args) {\n return args;\n }\n }\n\n const func = this.getFunction(functionName, {type});\n const result = {};\n if (func?.args) {\n func.args.forEach((item) => {\n result[item.name] = this.getDeepType(item.type);\n });\n }\n\n // Set cache\n if (freeze) {\n this.args[functionName + type] = Helper.deepFreeze(result);\n }\n\n return result;\n }\n\n /**\n * Get fields of GraphQL function\n */\n getFields(\n functionName: string,\n options: { cache?: boolean; freeze?: boolean; type?: GraphQLRequestType } = {}\n ): IGraphQLTypeCollection {\n const {cache, freeze, type} = {\n cache: true,\n freeze: true,\n type: undefined,\n ...options,\n };\n\n // Get cache\n if (cache && freeze) {\n const args = this.fields[functionName + type];\n if (args) {\n return args;\n }\n }\n\n const func = this.getFunction(functionName, options);\n const result: IGraphQLTypeCollection = this.getDeepType(func.type) as IGraphQLTypeCollection;\n\n // Set cache\n if (freeze) {\n this.fields[functionName + type] = Helper.deepFreeze(result);\n }\n\n return result;\n }\n\n /**\n * Get GraphQL function\n */\n protected getFunction(name: string, options: { type?: GraphQLRequestType } = {}): Record<string, any> {\n // Set config\n const config = {\n ...options,\n };\n\n // Init possible functions\n let functions = {};\n\n // If function type is set\n if (config.type) {\n const graphQLType = config.type.charAt(0).toUpperCase() + config.type.slice(1);\n const type = this.schema.getType(graphQLType);\n if (type) {\n functions = (type as any).getFields();\n }\n }\n\n // If function type is not set\n else {\n ['Subscription', 'Mutation', 'Query'].forEach((item) => {\n const type: any = this.schema.getType(item);\n if (type) {\n functions = {\n ...functions,\n ...(type.getFields() || {}),\n };\n }\n });\n }\n\n // Get function via name\n return functions[name];\n }\n\n /**\n * Get type\n */\n protected getType(name: string): Maybe<GraphQLNamedType> {\n return this.schema.getType(name);\n }\n\n /**\n * Get deep type data\n */\n protected getDeepType(type: any, prepared: WeakMap<any, any> = new WeakMap()): IGraphQLTypeCollection | GraphQLType {\n // Check type\n if (!type) {\n return type;\n }\n\n // Infinite regress protection\n const preparedObject = {};\n\n // Check prepared\n if (typeof type === 'object') {\n const preparedType = prepared.get(type);\n if (preparedType) {\n return preparedType;\n }\n\n // Set prepared\n prepared.set(type, preparedObject);\n }\n\n // Search deeper\n if (type.ofType) {\n const ofTypeResult = this.getDeepType(type.ofType, prepared);\n Object.assign(preparedObject, ofTypeResult);\n return ofTypeResult;\n }\n\n // Process fields\n if (type._fields) {\n const result = {};\n for (const [key, value] of Object.entries(type._fields)) {\n result[key] = this.getDeepType(value, prepared);\n }\n Object.assign(preparedObject, result);\n return result;\n }\n\n // Get type name\n if (type.type) {\n const typeResult = this.getDeepType(type.type, prepared);\n Object.assign(preparedObject, typeResult);\n return typeResult;\n }\n\n // Initialize GraphQLType\n const graphqlType = GraphQLType.map({\n type: type.name,\n });\n\n // Set enum values\n if (!!type._values) {\n graphqlType.isEnum = true;\n for (const [key, value] of Object.entries(type._nameLookup)) {\n if (!(value as any).isDeprecated) {\n graphqlType.validEnums.push(key);\n }\n }\n }\n\n // Finish\n prepared.set(type, graphqlType);\n return graphqlType;\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '../services/auth.service';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\n\n/**\n * Authentication guard\n */\n@Injectable()\nexport class AuthGuard implements CanActivate, CanActivateChild {\n\n /**\n * Imports\n */\n constructor(\n private router: Router,\n private authService: AuthService,\n @Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig\n ) {}\n\n /**\n * Can activate main route\n */\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return new Observable((subscriber) => {\n let allowed = false;\n const opposite = route?.data?.opposite ? route?.data?.opposite : false;\n const redirectUrl = route?.data?.redirectUrl ? route.data.redirectUrl : this.moduleConfig.authGuardRedirectUrl;\n\n if (this.authService.token && !opposite) {\n if (route.data.allowedRole) {\n const user = this.authService.currentUser;\n allowed = user?.roles?.includes(route.data.allowedRole);\n } else {\n allowed = true;\n }\n } else if (!this.authService.token && opposite) {\n allowed = true;\n }\n\n if (!allowed) {\n this.router.navigate([redirectUrl]);\n }\n\n subscriber.next(allowed);\n subscriber.complete();\n });\n }\n\n /**\n * Can activate child route\n */\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return this.canActivate(route, state);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CanDeactivate } from '@angular/router';\nimport { ICanComponentDeactivate } from '../interfaces/can-component-deactivate.interface';\n\n/**\n * Guard to check if a component can be deactivated\n */\n@Injectable()\nexport class CanDeactivateGuard implements CanDeactivate<ICanComponentDeactivate> {\n canDeactivate(component: ICanComponentDeactivate) {\n return component.canDeactivate ? component.canDeactivate() : true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '../services/auth.service';\n\n/**\n * Logout guard\n */\n@Injectable()\nexport class LogoutGuard implements CanActivate, CanActivateChild {\n constructor(private router: Router, private authService: AuthService) {}\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return new Observable((subscriber) => {\n if (this.authService.token) {\n this.authService.logout();\n }\n\n subscriber.next(true);\n subscriber.complete();\n });\n }\n\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return this.canActivate(route, state);\n }\n}\n","/**\n * Comparison operator enum\n */\nexport enum ComparisonOperatorEnum {\n EQ = 'EQ',\n GT = 'GT',\n GTE = 'GTE',\n IN = 'IN',\n LT = 'LT',\n LTE = 'LTE',\n NE = 'NE',\n NIN = 'NIN',\n REGEX = 'REGEX',\n}\n","/**\n * GraphQL request type enum\n */\nexport enum GraphQLRequestType {\n QUERY = 'query',\n MUTATION = 'mutation',\n SUBSCRIPTION = 'subscription',\n}\n","/**\n * Logical operator enum\n */\nexport enum LogicalOperatorEnum {\n AND = 'AND',\n NOR = 'NOR',\n OR = 'OR',\n}\n","export enum SortOrderEnum {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/**\n * Fullscreen service\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class FullscreenService {\n private _isFullscreenActive: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n constructor() {\n this.listenToFullscreenEvent();\n }\n\n get fullscreenState(): boolean {\n return this._isFullscreenActive.value;\n }\n\n get fullscreenStateAsObservable(): Observable<boolean> {\n return this._isFullscreenActive.asObservable();\n }\n\n public toggleFullscreen() {\n const elem = document.documentElement;\n if (!this._isFullscreenActive.value) {\n elem.requestFullscreen();\n this._isFullscreenActive.next(true);\n } else {\n document.exitFullscreen();\n this._isFullscreenActive.next(false);\n }\n }\n\n /**\n * Event Listener for fullscreen toggle\n */\n private listenToFullscreenEvent() {\n document.addEventListener('fullscreenchange', () => {\n if (document.fullscreenElement) {\n this._isFullscreenActive.next(true);\n } else {\n this._isFullscreenActive.next(false);\n }\n });\n }\n}\n","import { Apollo, gql } from 'apollo-angular';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { buildClientSchema, getIntrospectionQuery, GraphQLSchema, IntrospectionQuery } from 'graphql';\nimport { map } from 'rxjs/operators';\nimport { GraphQLMeta } from '../classes/graphql-meta.class';\nimport { Helper } from '../classes/helper.class';\n\n/**\n * GraphQL meta service\n *\n * For collecting meta information of the GraphQL API\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GraphQLMetaService {\n\n // Caches\n protected _frozenSchema: GraphQLSchema;\n protected _frozenSchemaObservable: Observable<GraphQLSchema>;\n protected _meta: GraphQLMeta;\n protected _metaObservable: Observable<GraphQLMeta>;\n protected _schemaObservable: Observable<GraphQLSchema>;\n\n // Private caches\n private _introspectionQuery: IntrospectionQuery;\n\n /**\n * Include services\n */\n constructor(protected apollo: Apollo) {}\n\n /**\n * Getter of introspectionQuery\n */\n get introspectionQuery(): IntrospectionQuery {\n return JSON.parse(JSON.stringify(this._introspectionQuery));\n }\n\n /**\n * Get schema for API\n * See https://www.apollographql.com/blog/three-ways-to-represent-your-graphql-schema-a41f4175100d\n */\n public getSchema(options: { cache?: boolean; freeze?: boolean } = {}): Observable<GraphQLSchema> {\n // Get configurations\n const config = {\n cache: true,\n freeze: true,\n ...options,\n };\n\n // Use caching\n if (config.cache) {\n if (config.freeze && this._frozenSchema) {\n return of(this._frozenSchema);\n }\n if (this._introspectionQuery) {\n return of(buildClientSchema(this.introspectionQuery));\n }\n if (config.freeze && this._frozenSchemaObservable) {\n return this._frozenSchemaObservable;\n } else if (!config.freeze && this._schemaObservable) {\n return this._schemaObservable;\n }\n }\n\n // Request schema from server\n const observable = this.apollo\n .query({\n query: gql(getIntrospectionQuery({descriptions: false})),\n })\n .pipe(\n map((schema: any) => {\n // Cache introspectionQuery\n this._introspectionQuery = schema.data;\n\n // Convert schema to GraphQLSchema\n this._frozenSchema = Helper.deepFreeze(buildClientSchema(this.introspectionQuery));\n\n // Return GraphQLSchema\n if (config.freeze) {\n return this._frozenSchema;\n }\n return buildClientSchema(schema.data);\n })\n );\n\n // Set observables\n if (config.freeze) {\n this._frozenSchemaObservable = observable;\n } else {\n this._schemaObservable = observable;\n }\n\n // Return result\n return observable;\n }\n\n /**\n * Get meta for API\n * See https://www.apollographql.com/blog/three-ways-to-represent-your-graphql-schema-a41f4175100d\n */\n public getMeta(options: { cache?: boolean; log?: boolean } = {}): Observable<GraphQLMeta> {\n // Get configurations\n const config = {\n cache: true,\n log: false,\n ...options,\n };\n\n // Use caching\n if (config.cache) {\n if (this._meta) {\n return of(this._meta);\n } else if (this._metaObservable) {\n return this._metaObservable;\n }\n }\n\n // Request schema from server\n const observable = this.getSchema(options).pipe(\n map((schema: any) => {\n // Log\n if (config.log) {\n console.log({schema});\n }\n\n this._meta = new GraphQLMeta(schema);\n return this._meta;\n })\n );\n\n // Set observables\n this._metaObservable = observable;\n\n // Return result\n return observable;\n }\n}\n","import { Apollo, gql } from 'apollo-angular';\nimport { Injectable } from '@angular/core';\nimport { IGraphQLOptions } from '../interfaces/graphql-options.interface';\nimport { GraphQLRequestType } from '../enums/graphql-request-type.enum';\nimport { Observable, throwError } from 'rxjs';\nimport { GraphQLMetaService } from './graphql-meta.service';\nimport { GraphQLEnum } from '../classes/graphql-enum.class';\nimport { GraphQLType } from '../classes/graphql-type.class';\nimport { IGraphQLTypeCollection } from '../interfaces/graphql-type-collection.interface';\n\n/**\n * GraphQL service\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GraphQLService {\n /**\n * Include services\n */\n constructor(protected apollo: Apollo, protected graphQLMetaService: GraphQLMetaService) {}\n\n /**\n * GraphQL request\n */\n public graphQl(graphql: string, options: IGraphQLOptions = {}): Observable<any> {\n // Check arguments\n if (!graphql) {\n throwError('Missing graphql argument');\n }\n\n // Get config\n const config = {\n arguments: null,\n fields: null,\n log: false,\n model: null,\n type: GraphQLRequestType.QUERY,\n ...options,\n };\n\n // Convert class to Object for arguments\n if (typeof config.arguments === 'function') {\n config.arguments = new config.arguments();\n }\n\n // Convert class to Object for fields\n if (typeof config.fields === 'function') {\n config.fields = new config.fields();\n }\n\n // Log\n if (config.log) {\n console.log({ config });\n }\n\n // Send request\n return new Observable((subscriber) => {\n // Get meta\n this.graphQLMetaService.getMeta({ log: config.log }).subscribe((meta) => {\n // Prepare fields\n let fields;\n let allowedFields;\n\n // Log meta\n if (config.log) {\n console.log({ meta });\n }\n\n if (config.fields) {\n allowedFields = meta.getFields(graphql, { type: config.type });\n\n // Log meta\n if (config.log) {\n console.log({ allowedFields });\n }\n\n const fieldsData = this.prepareFields(config.fields, {\n allowed: allowedFields,\n });\n\n // Log fields data\n if (config.log) {\n fieldsData.usedFields.sort();\n fieldsData.schemaFields.sort();\n const filtered = fieldsData.schemaFields.filter((field) => !fieldsData.usedFields.includes(field));\n const unused = this.graphQLTypeCollectionToStringArray(allowedFields).filter(\n (field) => !fieldsData.usedFields.includes(field)\n );\n console.log({ fieldsData, filtered, unused });\n }\n\n fields = fieldsData.fieldsString;\n }\n\n if (fields && !fields.startsWith('{')) {\n fields = '{' + fields + '\\n}';\n }\n\n // Log fields\n if (config.log) {\n console.log({ fields });\n }\n\n // Get allowed args\n const allowedArgs = meta.getArgs(graphql, { type: config.type });\n\n // Log allowed args\n if (config.log) {\n console.log({ allowedArgs });\n }\n\n const argsData = this.prepareArguments(config.arguments, {\n allowed: allowedArgs,\n });\n\n // Log args data\n if (config.log) {\n argsData.usedArgs.sort();\n argsData.schemaArgs.sort();\n const filtered = argsData.schemaArgs.filter((field) => !argsData.usedArgs.includes(field));\n const unused = this.graphQLTypeCollectionToStringArray(allowedArgs)\n .sort()\n .filter((field) => !argsData.usedArgs.includes(field));\n console.log({ argsData, filtered, unused });\n }\n\n const args = argsData.argsString || '';\n\n // Log\n if (config.log) {\n console.log({ graphQL: graphql, args, fields, type: config.type });\n }\n\n // Prepare request\n const documentNode = fields\n ? gql(config.type + '{\\n' + graphql + args + fields + '\\n}')\n : gql(config.type + '{\\n' + graphql + args + '\\n}');\n\n const request: any = {};\n request[config.type] = documentNode;\n\n // Log\n if (config.log) {\n console.log({ request });\n }\n\n const func = config.type === GraphQLRequestType.MUTATION ? 'mutate' : config.type;\n (this.apollo as any)[func](request).subscribe(\n (result: any) => {\n const data = result?.data?.[graphql] !== undefined ? result.data[graphql] : result;\n\n // Direct data\n if (!config.model) {\n subscriber.next(data);\n }\n\n // Map data as array\n else if (Array.isArray(data)) {\n subscriber.next(\n data.map((item) => {\n return config.model.map(item);\n })\n );\n }\n\n // Map data\n else {\n subscriber.next(config.model.map(data));\n }\n\n // Done\n subscriber.complete();\n },\n (error: any) => {\n subscriber.error(error);\n subscriber.complete();\n }\n );\n });\n });\n }\n\n /**\n * Get fields / args from IGraphQLTypeCollection\n */\n protected graphQLTypeCollectionToStringArray(collection: IGraphQLTypeCollection, current = '', result = []) {\n if (collection) {\n if (collection instanceof GraphQLType) {\n result.push(current);\n } else {\n for (const key of Object.keys(collection)) {\n this.graphQLTypeCollectionToStringArray(\n collection[key] as IGraphQLTypeCollection,\n current ? current + '.' + key : key,\n result\n );\n }\n }\n }\n return result;\n }\n\n /**\n * Prepare arguments for GraphQL request\n */\n protected prepareArguments(\n args: any,\n options: {\n allowed?: any;\n level?: number;\n parent?: string;\n schemaArgs?: string[];\n usedArgs?: string[];\n } = {}\n ): { argsString: string; schemaArgs: string[]; usedArgs: string[] } {\n // Init config variables\n const { allowed, level, parent, schemaArgs, usedArgs } = {\n allowed: null,\n level: 1,\n parent: '',\n schemaArgs: [],\n usedArgs: [],\n ...options,\n };\n\n // Check args\n if (args === undefined || args === null) {\n return { argsString: '', schemaArgs, usedArgs };\n }\n\n // Init args\n const result = [];\n\n // Process array\n if (Array.isArray(args)) {\n const allowedKeys = allowed ? Object.keys(allowed) : null;\n for (const item of args) {\n let key = null;\n if (allowed) {\n if (allowed.length < 1) {\n break;\n }\n key = allowedKeys?.shift();\n }\n\n // Process value\n result.push(\n this.prepareArguments(item, {\n allowed: key ? allowed[key] : null,\n level: level + 1,\n parent: parent + key + '.',\n schemaArgs,\n usedArgs,\n }).argsString\n );\n }\n\n // Encapsulation of the array result\n if (result.length) {\n // Complete result, encapsulated via round brackets\n if (level === 1) {\n return { argsString: '(' + result.join(', ') + ')', schemaArgs, usedArgs };\n }\n\n // Deeper result part, encapsulated via square brackets\n else {\n return { argsString: '[' + result.join(', ') + ']', schemaArgs, usedArgs };\n }\n }\n }\n\n // Process object\n else if (typeof args === 'object') {\n // Process all object entries\n for (const [key, value] of Object.entries(args)) {\n // Init data for current entry\n const currentKey = parent + key;\n schemaArgs.push(currentKey);\n\n // If the allowed key handling is enabled and the current key is not included in the list of allowed keys,\n // the current key will be skipped\n if (allowed && !allowed[key]) {\n continue;\n }\n\n // Skip value if not exists\n if (value === undefined && value === null) {\n continue;\n }\n\n // Add current key to metadata\n usedArgs.push(currentKey);\n\n // Process GraphQLEnum\n if (value instanceof GraphQLEnum) {\n result.push(key + ':' + value.value);\n continue;\n }\n\n // Process array\n else if (Array.isArray(value)) {\n result.push(\n key +\n ': [' +\n value.map(\n (item) =>\n this.prepareArguments(item, {\n allowed: allowed[key],\n level: level + 1,\n parent: currentKey + '.',\n schemaArgs,\n usedArgs,\n }).argsString\n ) +\n ']'\n );\n continue;\n }\n\n // Prepare additional result string\n let additionalResult = key + ': ';\n\n // Value is a date object\n if (typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]') {\n additionalResult += `\"\"\"${(value as Date).toString()}\"\"\"`;\n }\n\n // Value is a string\n else if (typeof value === 'string') {\n // Enum (doesn't need quotation marks)\n if (allowed[key].isEnum) {\n additionalResult += value;\n }\n\n // String\n else {\n additionalResult += `\"\"\"${value.replace(/\"/g, '\\\\\"')}\"\"\"`;\n }\n }\n\n // Value is a simple boolean or a number\n else if (typeof value === 'boolean' || typeof value === 'number') {\n additionalResult += value;\n }\n\n // Others\n else {\n additionalResult += this.prepareArguments(value, {\n allowed: allowed[key],\n level: level + 1,\n parent: currentKey + '.',\n schemaArgs,\n usedArgs,\n }).argsString;\n }\n\n // Push deeper part into result array\n result.push(additionalResult);\n }\n\n // Encapsulation of the object result\n if (result.length) {\n // Complete result, encapsulated via round brackets\n if (level === 1) {\n return { argsString: '(' + result.join(', ') + ')', schemaArgs, usedArgs };\n }\n\n // Deeper result part, encapsulated via curly brackets\n else {\n return { argsString: '{' + result.join(', ') + '}', schemaArgs, usedArgs };\n }\n }\n }\n\n // Prepare and process other / unknown values as JSON\n else {\n return { argsString: JSON.stringify(args), schemaArgs, usedArgs };\n }\n }\n\n /**\n * Prepare fields for GraphQL request\n */\n protected prepareFields(\n fields: any,\n options: {\n allowed?: any;\n schemaFields?: string[];\n usedFields?: string[];\n parent?: string;\n spaces?: number;\n tab?: number;\n } = {}\n ): { schemaFields: string[]; fieldsString: string; usedFields: string[] } {\n // Config\n const { allowed, parent, schemaFields, spaces, tab, usedFields } = {\n allowed: null,\n parent: '',\n schemaFields: [],\n spaces: 2,\n tab: 1,\n usedFields: [],\n ...options,\n };\n\n // Init fields string\n let fieldsString = '';\n\n // Check fields\n if (!fields) {\n return { fieldsString, schemaFields, usedFields };\n }\n\n // Process string\n if (typeof fields === 'string') {\n if (\n allowed &&\n ((typeof allowed === 'string' && allowed !== fields) || (typeof allowed === 'object' && !allowed[fields]))\n ) {\n return { fieldsString, schemaFields, usedFields };\n }\n return { fieldsString: '\\n' + ' '.repeat(spaces).repeat(tab) + fields, schemaFields, usedFields };\n }\n\n // Process array\n else if (Array.isArray(fields)) {\n for (const item of fields) {\n if (typeof item === 'object') {\n fieldsString =\n fieldsString +\n this.prepareFields(item, {\n allowed,\n parent,\n spaces,\n schemaFields,\n tab: tab + 1,\n usedFields,\n }).fieldsString;\n continue;\n }\n const currentPath = parent + item;\n schemaFields.push(currentPath);\n if (allowed && !allowed?.[item]) {\n continue;\n }\n usedFields.push(currentPath);\n fieldsString =\n fieldsString +\n this.prepareFields(item, {\n allowed:\n typeof allowed?.[item] === 'object' && !(allowed?.[item] instanceof GraphQLType) ? allowed?.[item] : item,\n parent: currentPath + '.',\n spaces,\n schemaFields,\n tab: tab + 1,\n usedFields,\n }).fieldsString;\n }\n }\n\n // Process object\n else if (typeof fields === 'object') {\n for (const [key, val] of Object.entries(fields)) {\n const currentPath = parent + key;\n schemaFields.push(currentPath);\n if (allowed && !allowed[key]) {\n continue;\n }\n usedFields.push(currentPath);\n if (typeof val !== 'object' || !Object.keys(val).length) {\n fieldsString = fieldsString + '\\n' + ' '.repeat(spaces).repeat(tab) + key;\n } else {\n fieldsString =\n fieldsString +\n '\\n' +\n ' '.repeat(spaces).repeat(tab) +\n key +\n ' ' +\n '{' +\n this.prepareFields(val, {\n allowed:\n typeof allowed?.[key] === 'object' && !(allowed?.[key] instanceof GraphQLType) ? allowed?.[key] : key,\n parent: currentPath + '.',\n spaces,\n schemaFields,\n tab: tab + 1,\n usedFields,\n }).fieldsString +\n '\\n' +\n ' '.repeat(spaces).repeat(tab) +\n '}';\n }\n }\n }\n\n // Return result\n return { fieldsString, schemaFields, usedFields };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/**\n * Loader service for loading indication\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class LoaderService {\n public isLoading = new BehaviorSubject(false);\n\n public start(): void {\n this.isLoading.next(true);\n }\n\n public stop(): void {\n this.isLoading.next(false);\n }\n\n public getAsObservable(): Observable<boolean> {\n return this.isLoading.asObservable();\n }\n}\n","import { Apollo } from 'apollo-angular';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { GraphQLService } from './graphql.service';\nimport { GraphQLMetaService } from './graphql-meta.service';\nimport { IGraphQLPlusOptions } from '../interfaces/graphql-plus-options.interfacen';\nimport { LoaderService } from './loader.service';\n\n/**\n * GraphQL plus service, for extra error handling and loading indication\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GraphQLPlusService extends GraphQLService {\n /**\n * Include services\n */\n constructor(\n protected apollo: Apollo,\n protected graphqlMetaService: GraphQLMetaService,\n protected loaderService: LoaderService\n ) {\n super(apollo, graphqlMetaService);\n }\n\n public graphQl(graphql: string, options: IGraphQLPlusOptions = {}): Observable<any> {\n this.handleLoader('start', options);\n\n return new Observable((subscriber) => {\n super.graphQl(graphql, options).subscribe(\n (response) => {\n if (response && response.errors) {\n this.handleError(response.errors, options.excludedErrors);\n subscriber.error(response);\n this.handleLoader('stop', options);\n subscriber.complete();\n }\n\n subscriber.next(response);\n this.handleLoader('stop', options);\n subscriber.complete();\n },\n (error) => {\n if (!options.ignoreErrors) {\n this.handleError(error, options.excludedErrors);\n }\n subscriber.error(error);\n this.handleLoader('stop', options);\n subscriber.complete();\n }\n );\n });\n }\n\n handleLoader(state: 'start' | 'stop', options: IGraphQLPlusOptions): void {\n if (options.loading) {\n if (state === 'start') {\n this.loaderService.start();\n } else if (state === 'stop') {\n this.loaderService.stop();\n }\n }\n }\n\n handleError(error: Error, excludedErrors: any = null): void {\n if (excludedErrors) {\n if (Array.isArray(excludedErrors)) {\n excludedErrors.forEach((excludedError) => {\n if (error.message.includes(excludedError.toLowerCase())) {\n return;\n }\n });\n } else if (error.message.toLowerCase().includes(excludedErrors?.toLowerCase())) {\n return;\n }\n }\n\n this.displayError(error);\n }\n\n displayError(error: any): void {\n console.error(error);\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\n\n/**\n * Scroll service for autoscroll to specific fragments\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ScrollService {\n /**\n * Scroll offset\n */\n private scrollOffset = 100;\n\n /**\n * Detection offset\n * Should be >= scrollOffset\n */\n private detectionOffset = 200;\n\n /**\n * Initializer\n */\n constructor(private router: Router, @Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig,) {\n const config = {\n scrollDetectionOffset: 200,\n scrollOffset: 100,\n ...moduleConfig\n };\n\n this.detectionOffset = config.scrollDetectionOffset;\n this.scrollOffset = config.scrollOffset;\n }\n\n /**\n * Scroll to structureElement with specific ID\n */\n scrollTo(id: string, options: { stopPropagation?: boolean } = {}) {\n options = {\n stopPropagation: true,\n ...options,\n };\n\n if (this.router.url !== '/' && !this.router.url.startsWith('/#')) {\n this.router.navigate(['/'], {fragment: id});\n return options.stopPropagation ? false : true;\n }\n\n const el = document.getElementById(id);\n const cords = el.getBoundingClientRect();\n window.scrollBy({top: cords.top - this.scrollOffset, behavior: 'smooth'});\n return options.stopPropagation ? false : true;\n }\n\n /**\n * Get last active structureElement\n */\n getLastActiveElement(list?): string {\n const currentScrollPosition = window.scrollY;\n const elementsWithId = document.querySelectorAll('[id]');\n let lastId = null;\n let lastPosition = 0 - this.detectionOffset - 1;\n elementsWithId.forEach((element) => {\n const cords = element.getBoundingClientRect();\n const top = cords.top + window.pageYOffset - this.detectionOffset;\n if (\n (!list || !list.length || list.includes(element.id)) && // In list\n top < currentScrollPosition && // In active area\n lastPosition < top // Higher than the last one\n ) {\n lastId = element.id;\n lastPosition = top;\n }\n });\n return lastId;\n }\n\n /**\n * Check if ID is active\n */\n isActive(id, list?, isFirst?) {\n const lastActiveElement = this.getLastActiveElement(list);\n return id === lastActiveElement || (lastActiveElement === null && isFirst);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Meta, Title } from '@angular/platform-browser';\n\n/**\n * SEO service for setting HTML meta data\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SEOService {\n constructor(private titleService: Title, private metaTagService: Meta) {}\n\n public initPageForSEO(title: string, description: string, keywords?: string) {\n this.setPageTitle(title);\n this.setPageDescription(description);\n\n if (keywords) {\n this.setPageKeywords(keywords);\n }\n }\n\n private setPageTitle(title: string) {\n this.titleService.setTitle(title);\n this.metaTagService.updateTag({property: 'og:title', content: title});\n this.metaTagService.updateTag({name: 'twitter:title', content: title});\n }\n\n private setPageDescription(description: string) {\n this.metaTagService.updateTag({name: 'description', content: description});\n this.metaTagService.updateTag({property: 'og:description', content: description});\n this.metaTagService.updateTag({name: 'twitter:description', content: description});\n }\n\n private setPageKeywords(keywords: string) {\n this.metaTagService.updateTag({name: 'keywords', content: keywords});\n }\n}\n","import { FormGroup } from '@angular/forms';\n\n/**\n * Custom validator to check that two fields match\n * (inspirated by https://jasonwatmore.com/post/2018/11/07/angular-7-reactive-forms-validation-example)\n */\nexport function MustMatch(controlName: string, matchingControlName: string) {\n return (formGroup: FormGroup) => {\n const control = formGroup.controls[controlName];\n const matchingControl = formGroup.controls[matchingControlName];\n\n if (matchingControl.errors && !matchingControl.errors.mustMatch) {\n // return if another validator has already found an error on the matchingControl\n return;\n }\n\n // set error on matchingControl if validation fails\n if (control.value !== matchingControl.value) {\n matchingControl.setErrors({ mustMatch: true });\n } else {\n matchingControl.setErrors(null);\n }\n };\n}\n","/**\n * Exports for public API\n */\n\n// Module\nexport * from './base.module';\n\n// Classes\nexport * from './classes/basic-user.class';\nexport * from './classes/graphql-enum.class';\nexport * from './classes/graphql-meta.class';\nexport * from './classes/graphql-type.class';\nexport * from './classes/helper.class';\nexport * from './classes/standard.class';\n\n// Directives\nexport * from './directives/context-menu.directive';\nexport * from './directives/lazy-load.directive';\nexport * from './directives/match-height.directive';\nexport * from './directives/resizable.directive';\n\n// Factories\nexport * from './factories/apollo-options.factory';\n\n// Guards\nexport * from './guards/auth.guard';\nexport * from './guards/can-deactivate.guard';\nexport * from './guards/logout.guard';\n\n// Enums\nexport * from './enums/comparison-operator.enum';\nexport * from './enums/graphql-request-type.enum';\nexport * from './enums/logical-operator.enum';\nexport * from './enums/sort-order.enum';\n\n// Interfaces\nexport * from './interfaces/base-module-config.interface';\nexport * from './interfaces/can-component-deactivate.interface';\nexport * from './interfaces/combined-filter-input.interface';\nexport * from './interfaces/field.interface';\nexport * from './interfaces/field-object.interface';\nexport * from './interfaces/filter-input.interface';\nexport * from './interfaces/graphql-options.interface';\nexport * from './interfaces/graphql-plus-options.interfacen';\nexport * from './interfaces/graphql-type-collection.interface';\nexport * from './interfaces/single-filter-input.interface';\nexport * from './interfaces/sort-input.interface';\nexport * from './interfaces/find-args.interface';\n\n// Pipes\nexport * from './pipes/ellipses.pipe';\nexport * from './pipes/safe-html.pipe';\n\n// Services\nexport * from './services/auth.service';\nexport * from './services/fullscreen.service';\nexport * from './services/graphql.service';\nexport * from './services/graphql-meta.service';\nexport * from './services/graphql-plus.service';\nexport * from './services/loader.service';\nexport * from './services/scroll.service';\nexport * from './services/seo.service';\nexport * from './services/storage.service';\n\n// Types\nexport * from './types/storage.type';\n\n// Validators\nexport * from './validators/must-match.validator';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAwDa,kBAAkB,GAAG,IAAI,cAAc,CAAC,oBAAoB;;ACrDzE;;;MAMa,cAAc;;;;IAczB,YAAgD,YAA8B;QAA9B,iBAAY,GAAZ,YAAY,CAAkB;;;;QAVpE,YAAO,GAAQ,IAAI,CAAC;;;;QAKpB,WAAM,GAAG,EAAE,CAAC;;QAOpB,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,GAAG,YAAY,CAAC,WAAW,GAAG,OAAO,CAAC;QAC3E,IAAI,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,EAAE;YAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;SACzC;;QAGD,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,YAAY,CAAC,MAAM,EAAE;YACvB,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,MAAM,GAAG,GAAG,CAAC;SAC1C;QACD,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,OAAO,GAAG,GAAG,CAAC;SAC3C;KACF;;;;;;;;;;I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AAI,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAC,CAAC,CAAC;QAClF,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,WAAW,EAAC,CAAC,CAAC;KACpF;IAEO,eAAe,CAAC,QAAgB;QACtC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAC,CAAC,CAAC;KACtE;;;;YA7BF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAPc,KAAK;YAAX,IAAI;;;ACCb;;;;SAIgB,SAAS,CAAC,WAAmB,EAAE,mBAA2B;IACxE,OAAO,CAAC,SAAoB;QAC1B,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,eAAe,GAAG,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAEhE,IAAI,eAAe,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,EAAE;;YAE/D,OAAO;SACR;;QAGD,IAAI,OAAO,CAAC,KAAK,KAAK,eAAe,CAAC,KAAK,EAAE;YAC3C,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;SAChD;aAAM;YACL,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACjC;KACF,CAAC;AACJ;;ACvBA;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"lenne.tech-ng-base-src-lib-base.js","sources":["../../../projects/ng-base/src/lib/base/interfaces/base-module-config.interface.ts","../../../projects/ng-base/src/lib/base/services/storage.service.ts","../../../projects/ng-base/src/lib/base/services/auth.service.ts","../../../projects/ng-base/src/lib/base/factories/apollo-options.factory.ts","../../../projects/ng-base/src/lib/base/directives/context-menu.directive.ts","../../../projects/ng-base/src/lib/base/directives/lazy-load.directive.ts","../../../projects/ng-base/src/lib/base/directives/match-height.directive.ts","../../../projects/ng-base/src/lib/base/directives/resizable.directive.ts","../../../projects/ng-base/src/lib/base/pipes/ellipses.pipe.ts","../../../projects/ng-base/src/lib/base/pipes/safe-html.pipe.ts","../../../projects/ng-base/src/lib/base/base.module.ts","../../../projects/ng-base/src/lib/base/classes/helper.class.ts","../../../projects/ng-base/src/lib/base/classes/standard.class.ts","../../../projects/ng-base/src/lib/base/classes/basic-user.class.ts","../../../projects/ng-base/src/lib/base/classes/graphql-enum.class.ts","../../../projects/ng-base/src/lib/base/classes/graphql-type.class.ts","../../../projects/ng-base/src/lib/base/classes/graphql-meta.class.ts","../../../projects/ng-base/src/lib/base/guards/auth.guard.ts","../../../projects/ng-base/src/lib/base/guards/can-deactivate.guard.ts","../../../projects/ng-base/src/lib/base/guards/logout.guard.ts","../../../projects/ng-base/src/lib/base/enums/comparison-operator.enum.ts","../../../projects/ng-base/src/lib/base/enums/graphql-request-type.enum.ts","../../../projects/ng-base/src/lib/base/enums/logical-operator.enum.ts","../../../projects/ng-base/src/lib/base/enums/sort-order.enum.ts","../../../projects/ng-base/src/lib/base/services/fullscreen.service.ts","../../../projects/ng-base/src/lib/base/services/graphql-meta.service.ts","../../../projects/ng-base/src/lib/base/services/graphql.service.ts","../../../projects/ng-base/src/lib/base/services/loader.service.ts","../../../projects/ng-base/src/lib/base/services/graphql-plus.service.ts","../../../projects/ng-base/src/lib/base/services/scroll.service.ts","../../../projects/ng-base/src/lib/base/services/seo.service.ts","../../../projects/ng-base/src/lib/base/validators/must-match.validator.ts","../../../projects/ng-base/src/lib/base/public-api.ts","../../../projects/ng-base/src/lib/base/lenne.tech-ng-base-src-lib-base.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { StorageType } from '../types/storage.type';\n\n/**\n * Configuration for base module\n */\nexport interface BaseModuleConfig {\n /**\n * URL to server API\n * Default: 'localhost:3000'\n */\n apiUrl?: string;\n\n /**\n * Websocket URL to server API\n */\n wsUrl?: string;\n\n /**\n * Default redirect URL for AuthGuard\n * Default: '/auth'\n */\n authGuardRedirectUrl?: string;\n\n /**\n * Whether logging is enabled or not\n */\n logging?: false;\n\n /**\n * Version of the App (for storage handling)\n * Default: null\n */\n version?: string;\n\n /**\n * Prefix of the App (for storage handling)\n * Default: null\n */\n prefix?: string;\n\n /**\n * Scroll detection offset for ScrollService\n * Should be >= scrollOffset\n * Default: 200\n */\n scrollDetectionOffset?: number;\n\n /**\n * Scroll offset for ScrollService\n * Default: 100\n */\n scrollOffset?: number;\n\n /**\n * Sampling rate for scroll done detection\n * Default: 100\n */\n scrollSamplingRate?: number;\n\n /**\n * Type of storage: 'session' or 'local'\n * Default: 'local'\n */\n storageType?: StorageType;\n}\n\nexport const BASE_MODULE_CONFIG = new InjectionToken('BASE_MODULE_CONFIG');\n","import { Inject, Injectable } from '@angular/core';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\n\n/**\n * Storage service for local data storage\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n /**\n * Storage\n */\n protected storage: any = null;\n\n /**\n * Prefix for storage keys\n */\n protected prefix = '';\n\n /**\n * Initializations\n */\n constructor(@Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig) {\n // Set storage\n const type = moduleConfig.storageType ? moduleConfig.storageType : 'local';\n if (window[type + 'Storage']) {\n this.storage = window[type + 'Storage'];\n }\n\n // Set prefix\n this.prefix = '';\n if (moduleConfig.prefix) {\n this.prefix += moduleConfig.prefix + '_';\n }\n if (moduleConfig.version) {\n this.prefix += moduleConfig.version + '_';\n }\n }\n\n /**\n * Save itemKeys\n *\n * If you want to save one item, use itemKeys and value parameters like these:\n * save('KEY_OF_THE_ITEM', ITEM)\n *\n * If you want to save multiple items, use itemKeys only (value parameter will be ignored):\n * save({'KEY_OF_ITEM_1': ITEM_1, 'KEY_OF_ITEM_2': ITEM_2, ...})\n */\n public save(itemKeys: string | { [key: string]: any }, value?: any): boolean {\n // Check local storage\n if (!this.storage) {\n return false;\n }\n\n // Check item keys and value\n if (\n !itemKeys ||\n (typeof itemKeys === 'object' && !Object.keys(itemKeys).length) ||\n (typeof itemKeys === 'string' && value === undefined)\n ) {\n return false;\n }\n\n if (typeof itemKeys === 'object') {\n for (const [itemKey, itemValue] of Object.entries(itemKeys)) {\n this.storage.setItem(this.prefix + itemKey, JSON.stringify(itemValue));\n }\n return true;\n }\n\n this.storage.setItem(this.prefix + itemKeys, JSON.stringify(value));\n return true;\n }\n\n /**\n * Load items via key(s)\n */\n public load(itemKeys: string | string[]): any {\n // Check local storage\n if (!this.storage) {\n return;\n }\n\n // Check item keys\n if (!itemKeys || (Array.isArray(itemKeys) && !itemKeys.length)) {\n return null;\n }\n\n if (Array.isArray(itemKeys)) {\n const back = {};\n itemKeys.forEach((itemKey) => {\n const loadedItem = this.storage.getItem(this.prefix + itemKey);\n if (loadedItem) {\n back[itemKey] = JSON.parse(loadedItem);\n } else {\n back[itemKey] = null;\n }\n });\n return back;\n }\n\n let value = this.storage.getItem(this.prefix + itemKeys);\n if (value) {\n value = JSON.parse(value);\n }\n\n return value;\n }\n\n /**\n * Remove item from storage\n *\n * @param itemKeys keys or key to remove\n */\n public remove(itemKeys: string | string[]): boolean {\n // Check local storage\n if (!this.storage) {\n return false;\n }\n\n if (Array.isArray(itemKeys)) {\n itemKeys.forEach((key) => {\n this.storage.removeItem(this.prefix + key);\n });\n return true;\n }\n\n this.storage.removeItem(this.prefix + itemKeys);\n return true;\n }\n\n /**\n * Clear local storage\n */\n public reset(): void {\n this.storage.clear();\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\nimport { BasicUser } from '../classes/basic-user.class';\nimport { StorageService } from './storage.service';\n\n/**\n * Authentication service\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n\n // Subjects\n private _currentUser: BehaviorSubject<BasicUser> = new BehaviorSubject<BasicUser>(null);\n private _token: BehaviorSubject<string> = new BehaviorSubject<string>(null);\n\n /**\n * Constructor\n */\n constructor(@Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig, private storageService: StorageService) {\n this.token = this.storageService.load('token') as string;\n this.currentUser = this.storageService.load('currentUser') as BasicUser;\n }\n\n /**\n * Logout\n */\n public logout() {\n this.storageService.remove(['token', 'currentUser']);\n this.currentUser = null;\n this.token = null;\n }\n\n // #################################################################\n // Current User\n // #################################################################\n\n get currentUser(): BasicUser {\n return this._currentUser.value;\n }\n\n set currentUser(user: BasicUser) {\n this._currentUser.next(user);\n this.storageService.save('currentUser', user);\n }\n\n get currentUserObservable(): Observable<BasicUser> {\n return this._currentUser.asObservable();\n }\n\n // #################################################################\n // Token\n // #################################################################\n\n\n get token(): string {\n return this._token.value;\n }\n\n set token(token: string) {\n this._token.next(token);\n this.storageService.save('token', token);\n }\n\n get tokenObservable(): Observable<string> {\n return this._token.asObservable();\n }\n}\n","import { HttpLink } from 'apollo-angular/http';\nimport { BaseModuleConfig } from '../interfaces/base-module-config.interface';\nimport { AuthService } from '../services/auth.service';\nimport { ApolloLink, concat, split } from '@apollo/client/core';\nimport { InMemoryCache } from '@apollo/client/cache';\nimport { WebSocketLink } from '@apollo/client/link/ws';\nimport { getMainDefinition } from '@apollo/client/utilities';\n\n/**\n * Factory for apollo-angular options\n */\nexport function apolloOptionsFactory(baseModuleConfig: BaseModuleConfig, httpLink: HttpLink, authService: AuthService) {\n const links = [];\n\n const http = httpLink.create({\n uri: baseModuleConfig.apiUrl,\n });\n\n const authMiddleware = new ApolloLink((operation, forward) => {\n const headers: any = {};\n if (localStorage) {\n const token = authService.token || null;\n if (token) {\n headers.Authorization = 'Bearer ' + token;\n }\n operation.setContext(() => ({ headers }));\n }\n return forward(operation);\n });\n\n if (baseModuleConfig.wsUrl) {\n let wsClient;\n\n if (localStorage) {\n const token = authService.token || null;\n wsClient = new WebSocketLink({\n uri: baseModuleConfig.wsUrl,\n options: {\n reconnect: true,\n connectionParams: {\n authToken: token,\n },\n },\n });\n } else {\n wsClient = new WebSocketLink({\n uri: baseModuleConfig.wsUrl,\n options: {\n reconnect: true,\n },\n });\n }\n\n // using the ability to split links, you can send data to each link\n // depending on what kind of operation is being sent\n links.push(\n split(\n // split based on operation type\n ({ query }) => {\n // @ts-ignore\n const { kind, operation } = getMainDefinition(query);\n return kind === 'OperationDefinition' && operation === 'subscription';\n },\n wsClient,\n concat(authMiddleware, http)\n )\n );\n } else {\n links.push(http);\n links.push(authMiddleware);\n }\n\n return {\n link: ApolloLink.from(links),\n cache: new InMemoryCache(),\n defaultOptions: {\n query: {\n fetchPolicy: 'network-only',\n },\n },\n };\n}\n","import { Directive, ElementRef, Input, OnInit, Output } from '@angular/core';\n\n/**\n * Directive vor context menu\n * See https://stackblitz.com/edit/angular-custom-context-menu\n */\n@Directive({\n selector: '[ltContextMenu]',\n exportAs: 'contextMenuData',\n})\nexport class ContextMenuDirective implements OnInit {\n @Input() contextMenuData?: any;\n @Input() ltContextMenu: HTMLElement;\n @Input() xGap = 0;\n @Input() yGap = 0;\n @Input() overflowSpace = 10;\n @Input() selectors = '*';\n @Output() clickedElement: Element = null;\n previousDisplayStatus: string = null;\n\n constructor(private el: ElementRef) {}\n\n ngOnInit() {\n if (this.ltContextMenu) {\n this.previousDisplayStatus = this.ltContextMenu.style.display;\n }\n\n // Add a click listener to the window,\n // so that we can close the context menu on left click\n window.addEventListener('click', () => {\n this.showContextMenu(null, false);\n });\n\n // Close context menu when escape is pressed\n window.addEventListener('keydown', (e) => {\n if (e.code === 'Escape') {\n this.showContextMenu(null, false);\n }\n });\n\n // Add an event listener to listen to the 'contextmenu' event\n this.el.nativeElement.addEventListener('contextmenu', (e) => {\n // Prevent the default context menu to popup\n if (e.preventDefault) {\n e.preventDefault();\n }\n // Shows our own context menu\n this.showContextMenu(e, true);\n });\n }\n\n // Shows or hides our custom context menu, which is specified as a input\n showContextMenu(event, show: boolean) {\n const cm = this.ltContextMenu;\n if (cm) {\n // Try to open context menu\n if (show && event && event instanceof MouseEvent) {\n // Get valid clicked structureElement\n const clickedElement = (event?.target as HTMLElement)?.closest(this.selectors);\n if (clickedElement) {\n // Set clicked structureElement\n this.clickedElement = clickedElement;\n\n setTimeout(() => {\n // Set display status\n cm.style.display = 'block';\n\n // Calculate top position\n let top = event.y + this.yGap;\n if (top + cm.offsetHeight + 10 > document.documentElement.clientHeight) {\n top = document.documentElement.clientHeight - cm.offsetHeight - this.overflowSpace;\n }\n\n // Calculate left position\n let left = event.x + this.xGap;\n if (left + cm.offsetWidth + 10 > document.documentElement.clientWidth) {\n left = document.documentElement.clientWidth - cm.offsetWidth - this.overflowSpace;\n }\n\n // Set position\n cm.style.top = top + 'px';\n cm.style.left = left + 'px';\n\n // Show\n cm.style.opacity = '1.0';\n cm.style['pointer-events'] = 'auto';\n }, 1);\n\n return;\n }\n }\n\n // Close context menu\n this.clickedElement = null;\n if (this.previousDisplayStatus) {\n cm.style.display = this.previousDisplayStatus;\n }\n cm.style.opacity = '0.01';\n cm.style['pointer-events'] = 'none';\n }\n }\n}\n","import { AfterViewInit, Directive, ElementRef, HostBinding, Input } from '@angular/core';\n\n/**\n * Directive for lazy loading images\n */\n@Directive({\n selector: 'img[ltLazyLoad]',\n})\nexport class LazyLoadDirective implements AfterViewInit {\n @HostBinding('attr.src') srcAttr = null;\n @Input() src: string;\n\n constructor(private el: ElementRef) {}\n\n ngAfterViewInit() {\n this.canLazyLoad() ? this.lazyLoadImage() : this.loadImage();\n }\n\n private canLazyLoad() {\n return window && 'IntersectionObserver' in window;\n }\n\n private lazyLoadImage() {\n const obs = new IntersectionObserver((entries) => {\n entries.forEach(({isIntersecting}) => {\n if (isIntersecting) {\n this.loadImage();\n obs.unobserve(this.el.nativeElement);\n }\n });\n });\n obs.observe(this.el.nativeElement);\n }\n\n private loadImage() {\n this.srcAttr = this.src;\n }\n}\n","import { AfterViewChecked, Directive, ElementRef, HostListener, Input } from '@angular/core';\n\n/**\n * Set same height (maximum) to different elements\n */\n@Directive({\n selector: '[ltMatchHeight]',\n})\nexport class MatchHeightDirective implements AfterViewChecked {\n // class name to match height\n @Input()\n ltMatchHeight: string | string[];\n\n constructor(private el: ElementRef) {}\n\n @HostListener('window:resize')\n onResize() {\n this.matchHeight(this.el.nativeElement, this.ltMatchHeight);\n }\n\n ngAfterViewChecked() {\n this.matchHeight(this.el.nativeElement, this.ltMatchHeight);\n }\n\n matchHeight(parent: HTMLElement, target: string | string[]) {\n if (!parent) {\n return;\n }\n\n let classNames;\n if (!Array.isArray(target)) {\n classNames = [target];\n } else {\n classNames = target;\n }\n\n classNames.forEach((className) => {\n // find all child structureElements with the selected class name\n const children = parent.getElementsByClassName(className);\n\n if (!children) {\n return;\n }\n\n // reset all children height\n Array.from(children).forEach((x: HTMLElement) => {\n x.style.height = 'initial';\n });\n\n // get all the child structureElements heights\n const itemHeights = Array.from(children).map((x) => x.getBoundingClientRect().height);\n\n // find out the tallest one\n const maxHeight = itemHeights.reduce((prev, curr) => (curr > prev ? curr : prev), 0);\n\n // update the child structureElements height to the tallest one\n Array.from(children).forEach((x: HTMLElement) => (x.style.height = `${maxHeight}px`));\n });\n }\n}\n","import { Directive, ElementRef, Input, OnInit } from '@angular/core';\n\n/**\n * Reszise detection\n * (inpsired by: https://stackblitz.com/edit/angular-resizable)\n */\n@Directive({\n selector: '[ltResizable]',\n})\nexport class ResizableDirective implements OnInit {\n @Input() resizableGrabWidth = 8;\n @Input() resizableMinWidth = 10;\n\n dragging = false;\n\n constructor(private el: ElementRef) {}\n\n ngOnInit(): void {\n this.addListenerToDocument();\n this.addListenerToElement();\n }\n\n mouseMoveG(evt) {\n if (!this.dragging) {\n return;\n }\n this.newWidth(evt.clientX - this.el.nativeElement.offsetLeft);\n evt.stopPropagation();\n }\n\n newWidth(wid) {\n const result = Math.max(this.resizableMinWidth, wid);\n this.el.nativeElement.style.width = result + 'px';\n }\n\n mouseDown(evt) {\n if (this.inDragRegion(evt)) {\n this.dragging = true;\n this.preventGlobalMouseEvents();\n evt.stopPropagation();\n }\n }\n\n restoreGlobalMouseEvents() {\n document.body.style['pointer-events'] = 'auto';\n }\n\n mouseUpG(evt: Event) {\n if (!this.dragging) {\n return;\n }\n this.restoreGlobalMouseEvents();\n this.dragging = false;\n evt.stopPropagation();\n }\n\n mouseMove(evt) {\n if (this.inDragRegion(evt) || this.dragging) {\n this.el.nativeElement.style.cursor = 'col-resize';\n } else {\n this.el.nativeElement.style.cursor = 'default';\n }\n }\n\n preventGlobalMouseEvents() {\n document.body.style['pointer-events'] = 'none';\n }\n\n inDragRegion(evt) {\n return this.el.nativeElement.clientWidth - evt.clientX + this.el.nativeElement.offsetLeft < this.resizableGrabWidth;\n }\n\n private addListenerToDocument() {\n document.addEventListener(\n 'mousemove',\n (e) => {\n this.mouseMoveG(e);\n },\n true\n );\n\n document.addEventListener(\n 'mouseup',\n (e) => {\n this.mouseUpG(e);\n },\n true\n );\n }\n\n private addListenerToElement() {\n this.el.nativeElement.addEventListener(\n 'mousedown',\n (e) => {\n this.mouseDown(e);\n },\n true\n );\n\n this.el.nativeElement.addEventListener(\n 'mousemove',\n (e) => {\n this.mouseMove(e);\n },\n true\n );\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Truncate string with ellipses\n */\n@Pipe({\n name: 'ltEllipses',\n})\nexport class EllipsesPipe implements PipeTransform {\n transform(value: string, limit: number): string {\n if (!value) {\n return null;\n }\n\n return value.length > limit ? value.substring(0, limit) + '...' : value;\n }\n}\n","import { DomSanitizer } from '@angular/platform-browser';\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Declarate html as safe\n */\n@Pipe({name: 'ltSafeHtml'})\nexport class SafeHtmlPipe implements PipeTransform {\n constructor(private sanitized: DomSanitizer) {}\n\n transform(value) {\n return this.sanitized.bypassSecurityTrustHtml(value);\n }\n}\n","import { APOLLO_OPTIONS } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { AuthService } from './services/auth.service';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from './interfaces/base-module-config.interface';\nimport { apolloOptionsFactory } from './factories/apollo-options.factory';\nimport { ContextMenuDirective } from './directives/context-menu.directive';\nimport { LazyLoadDirective } from './directives/lazy-load.directive';\nimport { MatchHeightDirective } from './directives/match-height.directive';\nimport { ResizableDirective } from './directives/resizable.directive';\nimport { EllipsesPipe } from './pipes/ellipses.pipe';\nimport { SafeHtmlPipe } from './pipes/safe-html.pipe';\n\n// Imported and exported elements\nconst elements = [\n // Directives\n ContextMenuDirective,\n LazyLoadDirective,\n MatchHeightDirective,\n ResizableDirective,\n\n // Pipes\n EllipsesPipe,\n SafeHtmlPipe,\n];\n\n/**\n * Base module\n */\n@NgModule({\n declarations: elements,\n exports: elements,\n})\nexport class BaseModule {\n /**\n * Set configuration of base module in root module of the app\n */\n static forRoot(baseModuleConfig: BaseModuleConfig = {}): ModuleWithProviders<BaseModule> {\n // Default config\n const config = {\n apiUrl: 'localhost:3000',\n authGuardRedirectUrl: '/auth',\n logging: false,\n version: null,\n prefix: null,\n scrollDetectionOffset: 200,\n scrollOffset: 100,\n storageType: 'local',\n ...baseModuleConfig,\n };\n\n // Prepare providers\n const providers: Provider[] = [\n {\n provide: BASE_MODULE_CONFIG,\n useValue: baseModuleConfig,\n },\n ];\n\n // Add apollo features if API URL is set\n if (baseModuleConfig.apiUrl) {\n providers.push({\n provide: APOLLO_OPTIONS,\n useFactory: apolloOptionsFactory,\n deps: [BASE_MODULE_CONFIG, HttpLink, AuthService],\n });\n } else if (config.logging) {\n console.log('apiUrl is missing, ApolloLink is not initialized');\n }\n\n // Return root module\n return {\n ngModule: BaseModule,\n providers,\n };\n }\n}\n","import { Standard } from './standard.class';\n\n/**\n * Helper class\n */\nexport class Helper {\n /**\n * Simple filter function for plain objects\n */\n static filter<T = { [key: string]: any }>(objects: T[], filter: { [key: string]: any }): T[] {\n return (objects?.filter((element) => {\n for (const [key, value] of Object.entries(filter)) {\n if (Array.isArray(element[key])) {\n for (const item of element[key]) {\n if (!element[key].includs(value)) {\n return false;\n }\n }\n } else if (element[key] !== value) {\n return false;\n }\n }\n return true;\n }) || []) as any[];\n }\n\n /**\n * Convert to a url/uri conform string\n * Only:\n * - lower case\n * - chars, numbers and hyphens\n */\n static urlString(str: any, options: { allowAll?: boolean } = {}): string {\n // Config\n const config = {\n allowAll: false,\n ...options,\n };\n\n // To string\n str = str + '';\n\n // Trim\n str = str.trim();\n\n // Lower case\n str = str.toLowerCase();\n\n if (!config.allowAll) {\n // Replace spaces\n str = str.trim().replace(/\\s+/g, '-');\n\n // Replace some special chars\n str = str.replace('ä', 'ae');\n str = str.replace('ö', 'oe');\n str = str.replace('ü', 'ue');\n str = str.replace('ß', 'ss');\n\n // Remove other special chars\n str = str.replace(/[^a-zA-Z0-9-]/g, '');\n }\n\n // Return url conform string\n return encodeURI(str);\n }\n\n /**\n * Simple map function\n */\n public static map<T = { [key: string]: any }>(\n source: Partial<T> | { [key: string]: any },\n target: T,\n options: { funcAllowed?: boolean; dateStringToDate?: boolean | string[] } = {}\n ): T {\n // Set config\n const config = {\n funcAllowed: false,\n dateStringToDate: true,\n ...options,\n };\n\n // Check source\n if (!source || typeof source !== 'object' || Array.isArray(source)) {\n return target;\n }\n\n // Update properties\n for (const key of Object.keys(target)) {\n if (source[key] !== undefined && (config.funcAllowed || typeof (source[key] !== 'function'))) {\n if (typeof source[key] === 'string' && config.dateStringToDate) {\n if (Array.isArray(config.dateStringToDate)) {\n if (config.dateStringToDate.includes(key)) {\n target[key] = Helper.parseDate(source[key]);\n }\n } else {\n target[key] = Helper.parseDate(source[key]);\n }\n } else {\n target[key] = source[key];\n }\n }\n }\n\n // Return target\n return target;\n }\n\n /**\n * Create Object or Objects of specified type with specified data\n */\n public static maps<T extends Standard>(\n data: Partial<T> | Partial<T>[] | { [key: string]: any } | { [key: string]: any }[],\n targetClass: new (...args: any[]) => T\n ): T[] {\n // Check data\n if (!data || typeof data !== 'object') {\n return undefined;\n }\n\n // Check array\n if (!Array.isArray(data)) {\n data = [data];\n }\n\n // Map\n return (data as any).map((item: any) => {\n return (targetClass as any).map(item);\n });\n }\n\n /**\n * Get plain parameter\n */\n public static getPlainParameter(parameter: string) {\n if (!parameter) {\n return parameter;\n }\n return parameter?.split('?')?.shift()?.split('#')?.shift();\n }\n\n /**\n * Get ID of an url parameter\n */\n public static getParameterId(parameter: string) {\n if (!parameter) {\n return parameter;\n }\n return Helper.getPlainParameter(parameter)?.split('-').pop();\n }\n\n /**\n * Delay\n */\n public static delay(ms: number) {\n const promise = new Promise((resolve) => setTimeout(resolve, ms));\n return promise;\n }\n\n /**\n * Deep freeze\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze#What_is_shallow_freeze\n */\n public static deepFreeze(object: any, preparedObjects = []) {\n // Prevent infinit regress\n if (preparedObjects.includes(object as never)) {\n return object;\n }\n preparedObjects.push(object as never);\n\n // Retrieve the property names defined on object\n const propNames = Object.getOwnPropertyNames(object);\n\n // Freeze properties before freezing self\n for (const name of propNames) {\n const value = object[name];\n\n if (value && typeof value === 'object') {\n Helper.deepFreeze(value, preparedObjects);\n }\n }\n\n return Object.freeze(object);\n }\n\n /**\n * Generates an unique identifier with 24 characters\n */\n public static getUID(): string {\n let dt = new Date().getTime();\n const uuid = 'xxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n // eslint-disable-next-line no-bitwise\n const r = (dt + Math.random() * 16) % 16 | 0;\n dt = Math.floor(dt / 16);\n // eslint-disable-next-line no-bitwise\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n return uuid;\n }\n\n /**\n * Parse date string to date object\n */\n public static parseDate(dateString: string) {\n const reISO = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*))(?:Z|(\\+|-)([\\d|:]*))?$/;\n const reMsAjax = /^\\/Date\\((d|-|.*)\\)[\\/|\\\\]$/;\n if (typeof dateString === 'string') {\n const isoExec = reISO.exec(dateString);\n if (isoExec) {\n return new Date(dateString);\n }\n const msAjaxExec = reMsAjax.exec(dateString);\n if (msAjaxExec) {\n const cleaned = msAjaxExec[1].split(/[-+,.]/);\n return new Date(cleaned[0] ? +cleaned[0] : 0 - +cleaned[1]);\n }\n }\n return dateString;\n }\n\n /**\n * Get browser name and version\n */\n public static getBrowser() {\n const userAgent = navigator.userAgent;\n let data = userAgent.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n let version;\n if (/trident/i.test(data[1])) {\n version = /\\brv[ :]+(\\d+)/g.exec(userAgent) || [];\n return { name: 'IE', version: version[1] || '' };\n }\n if (data[1] === 'Chrome') {\n version = userAgent.match(/\\bOPR|Edge\\/(\\d+)/);\n if (version != null) {\n return { name: 'Opera', version: version[1] };\n }\n }\n data = data[2] ? [data[1], data[2]] : [navigator.appName, navigator.appVersion, '-?'];\n version = userAgent.match(/version\\/(\\d+)/i);\n if (version !== null) {\n data.splice(1, 1, version[1]);\n }\n return {\n name: data[0],\n version: data[1],\n };\n }\n\n /**\n * Whether first parameter is a deep subset of second parameter\n * Hint: functions will be ignored\n */\n static isSubset(a: any, b: any) {\n // Equal\n if (a === b) {\n return true;\n }\n\n // Different type\n if (typeof a !== typeof b) {\n return false;\n }\n\n // Process array\n if (Array.isArray(a)) {\n for (const [key, value] of Object.entries(a)) {\n if (Helper.isSubset(value, b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // Process object\n if (typeof a === 'object') {\n const plain = JSON.parse(JSON.stringify(a));\n for (const [key, value] of Object.entries(plain)) {\n if (Helper.isSubset(value, b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // Else\n return true;\n }\n\n /**\n * Whether parameters are equal (have equal properties)\n * Hint: functions will be ignored\n */\n static isEqual(a: any, b: any) {\n return Helper.isSubset(a, b) && Helper.isSubset(b, a);\n }\n\n /**\n * First level difference of two objects\n * Hint: functions will be ignored and when an array or an object is different the hole array or object will used as property value\n *\n * @returns Record<string, any> Object with properties from first object\n */\n static getDiff(a: Record<string, any>, b: Record<string, any>, clone: boolean = true) {\n const result = {};\n let firstObject = a;\n if (clone) {\n firstObject = JSON.parse(JSON.stringify(a));\n }\n for (const [key, value] of Object.entries(firstObject)) {\n if (!Helper.isSubset(value, b[key])) {\n result[key] = value;\n }\n }\n return result;\n }\n}\n","import { Helper } from './helper.class';\n\n/**\n * Standard class\n * Other classes should extend the Standard class, if they offer own functions\n * If the extended class uses object properties with own map functions, it should implement its own map function\n */\nexport class Standard {\n /**\n * Static map method\n */\n public static map<T extends Standard>(\n this: new (...args: any[]) => T,\n data: Partial<T> | { [key: string]: any },\n item: T = new this()\n ): T {\n return (item as any).map(data);\n }\n\n /**\n * Map data into an object\n */\n public map(data: Partial<this> | { [key: string]: any }): this {\n return Helper.map(data, this);\n }\n\n /**\n * Clone object (and map additional data)\n */\n public clone(mapData?: Partial<this> | { [key: string]: any }): this {\n const current = JSON.parse(JSON.stringify(this));\n if (mapData) {\n Object.assign(current, mapData);\n }\n return new (this as any).constructor().map(current);\n }\n\n /**\n * Compare this with another object\n * Hint: functions will be ignored and when an array or an object is different the hole array or object will used as property value\n *\n * @return Record<string, any> with properties of this object which are different\n */\n public getDiff(compare: Record<string, any>, clone: boolean = true) {\n return Helper.getDiff(this, compare, clone);\n }\n}\n","import { Standard } from './standard.class';\nimport { Helper } from './helper.class';\n\n/**\n * User class\n */\nexport class BasicUser extends Standard {\n id: string = undefined;\n email: string = undefined;\n firstName: string = undefined;\n lastName: string = undefined;\n roles: string[] = [];\n username: string = undefined;\n\n // ===================================================================================================================\n // Methods\n // ===================================================================================================================\n\n /**\n * Mapping\n */\n public map(data: Partial<this> | { [key: string]: any }): this {\n Helper.map(data, this);\n return this;\n }\n\n /**\n * Checks whether the user has at least one of the required roles\n */\n public hasRole(roles: string | string[]) {\n if (typeof roles === 'string') {\n roles = [roles];\n }\n if (!this.roles || this.roles.length < 1) {\n return false;\n }\n return !roles || roles.length < 1 ? true : this.roles.some((role) => roles.includes(role));\n }\n\n /**\n * Checks whether the user has all required roles\n */\n public hasAllRoles(roles: string | string[]) {\n if (typeof roles === 'string') {\n roles = [roles];\n }\n if (!this.roles || this.roles.length < 1) {\n return false;\n }\n return !roles ? true : roles.every((role) => this.roles.includes(role));\n }\n}\n","/**\n * GraphQL enum\n */\nexport class GraphQLEnum {\n value: string;\n\n constructor(value) {\n this.value = value;\n }\n}\n","import { Standard } from './standard.class';\n\n/**\n * GraphQL type\n */\nexport class GraphQLType extends Standard {\n type = '';\n isEnum = false;\n validEnums: string[] = [];\n}\n","import { GraphQLSchema } from 'graphql';\nimport { Maybe } from 'graphql/jsutils/Maybe';\nimport { GraphQLNamedType } from 'graphql/type/definition';\nimport { GraphQLRequestType } from '../enums/graphql-request-type.enum';\nimport { Helper } from './helper.class';\nimport { GraphQLType } from './graphql-type.class';\nimport { IGraphQLTypeCollection } from '../interfaces/graphql-type-collection.interface';\n\n/**\n * GraphQL meta\n */\nexport class GraphQLMeta {\n // Frozen caches\n protected args: Record<string, any> = {};\n protected fields: Record<string, any> = {};\n\n /**\n * Integrate schema\n */\n constructor(protected schema: GraphQLSchema) {\n if (!schema) {\n throw Error('Missing schema');\n }\n }\n\n /**\n * Get arguments of GraphQL function\n */\n getArgs(\n functionName: string,\n options: { cache?: boolean; freeze?: boolean; type?: GraphQLRequestType } = {}\n ): IGraphQLTypeCollection {\n const {cache, freeze, type} = {\n cache: true,\n freeze: true,\n type: undefined,\n ...options,\n };\n\n // Get cache\n if (cache && freeze) {\n const args = this.args[functionName + type];\n if (args) {\n return args;\n }\n }\n\n const func = this.getFunction(functionName, {type});\n const result = {};\n if (func?.args) {\n func.args.forEach((item) => {\n result[item.name] = this.getDeepType(item.type);\n });\n }\n\n // Set cache\n if (freeze) {\n this.args[functionName + type] = Helper.deepFreeze(result);\n }\n\n return result;\n }\n\n /**\n * Get fields of GraphQL function\n */\n getFields(\n functionName: string,\n options: { cache?: boolean; freeze?: boolean; type?: GraphQLRequestType } = {}\n ): IGraphQLTypeCollection {\n const {cache, freeze, type} = {\n cache: true,\n freeze: true,\n type: undefined,\n ...options,\n };\n\n // Get cache\n if (cache && freeze) {\n const args = this.fields[functionName + type];\n if (args) {\n return args;\n }\n }\n\n const func = this.getFunction(functionName, options);\n const result: IGraphQLTypeCollection = this.getDeepType(func.type) as IGraphQLTypeCollection;\n\n // Set cache\n if (freeze) {\n this.fields[functionName + type] = Helper.deepFreeze(result);\n }\n\n return result;\n }\n\n /**\n * Get GraphQL function\n */\n protected getFunction(name: string, options: { type?: GraphQLRequestType } = {}): Record<string, any> {\n // Set config\n const config = {\n ...options,\n };\n\n // Init possible functions\n let functions = {};\n\n // If function type is set\n if (config.type) {\n const graphQLType = config.type.charAt(0).toUpperCase() + config.type.slice(1);\n const type = this.schema.getType(graphQLType);\n if (type) {\n functions = (type as any).getFields();\n }\n }\n\n // If function type is not set\n else {\n ['Subscription', 'Mutation', 'Query'].forEach((item) => {\n const type: any = this.schema.getType(item);\n if (type) {\n functions = {\n ...functions,\n ...(type.getFields() || {}),\n };\n }\n });\n }\n\n // Get function via name\n return functions[name];\n }\n\n /**\n * Get type\n */\n protected getType(name: string): Maybe<GraphQLNamedType> {\n return this.schema.getType(name);\n }\n\n /**\n * Get deep type data\n */\n protected getDeepType(type: any, prepared: WeakMap<any, any> = new WeakMap()): IGraphQLTypeCollection | GraphQLType {\n // Check type\n if (!type) {\n return type;\n }\n\n // Infinite regress protection\n const preparedObject = {};\n\n // Check prepared\n if (typeof type === 'object') {\n const preparedType = prepared.get(type);\n if (preparedType) {\n return preparedType;\n }\n\n // Set prepared\n prepared.set(type, preparedObject);\n }\n\n // Search deeper\n if (type.ofType) {\n const ofTypeResult = this.getDeepType(type.ofType, prepared);\n Object.assign(preparedObject, ofTypeResult);\n return ofTypeResult;\n }\n\n // Process fields\n if (type._fields) {\n const result = {};\n for (const [key, value] of Object.entries(type._fields)) {\n result[key] = this.getDeepType(value, prepared);\n }\n Object.assign(preparedObject, result);\n return result;\n }\n\n // Get type name\n if (type.type) {\n const typeResult = this.getDeepType(type.type, prepared);\n Object.assign(preparedObject, typeResult);\n return typeResult;\n }\n\n // Initialize GraphQLType\n const graphqlType = GraphQLType.map({\n type: type.name,\n });\n\n // Set enum values\n if (!!type._values) {\n graphqlType.isEnum = true;\n for (const [key, value] of Object.entries(type._nameLookup)) {\n if (!(value as any).isDeprecated) {\n graphqlType.validEnums.push(key);\n }\n }\n }\n\n // Finish\n prepared.set(type, graphqlType);\n return graphqlType;\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '../services/auth.service';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\n\n/**\n * Authentication guard\n */\n@Injectable()\nexport class AuthGuard implements CanActivate, CanActivateChild {\n\n /**\n * Imports\n */\n constructor(\n private router: Router,\n private authService: AuthService,\n @Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig\n ) {}\n\n /**\n * Can activate main route\n */\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return new Observable((subscriber) => {\n let allowed = false;\n const opposite = route?.data?.opposite ? route?.data?.opposite : false;\n const redirectUrl = route?.data?.redirectUrl ? route.data.redirectUrl : this.moduleConfig.authGuardRedirectUrl;\n\n if (this.authService.token && !opposite) {\n if (route.data.allowedRole) {\n const user = this.authService.currentUser;\n allowed = user?.roles?.includes(route.data.allowedRole);\n } else {\n allowed = true;\n }\n } else if (!this.authService.token && opposite) {\n allowed = true;\n }\n\n if (!allowed) {\n this.router.navigate([redirectUrl]);\n }\n\n subscriber.next(allowed);\n subscriber.complete();\n });\n }\n\n /**\n * Can activate child route\n */\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return this.canActivate(route, state);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CanDeactivate } from '@angular/router';\nimport { ICanComponentDeactivate } from '../interfaces/can-component-deactivate.interface';\n\n/**\n * Guard to check if a component can be deactivated\n */\n@Injectable()\nexport class CanDeactivateGuard implements CanDeactivate<ICanComponentDeactivate> {\n canDeactivate(component: ICanComponentDeactivate) {\n return component.canDeactivate ? component.canDeactivate() : true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '../services/auth.service';\n\n/**\n * Logout guard\n */\n@Injectable()\nexport class LogoutGuard implements CanActivate, CanActivateChild {\n constructor(private router: Router, private authService: AuthService) {}\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return new Observable((subscriber) => {\n if (this.authService.token) {\n this.authService.logout();\n }\n\n subscriber.next(true);\n subscriber.complete();\n });\n }\n\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return this.canActivate(route, state);\n }\n}\n","/**\n * Comparison operator enum\n */\nexport enum ComparisonOperatorEnum {\n EQ = 'EQ',\n GT = 'GT',\n GTE = 'GTE',\n IN = 'IN',\n LT = 'LT',\n LTE = 'LTE',\n NE = 'NE',\n NIN = 'NIN',\n REGEX = 'REGEX',\n}\n","/**\n * GraphQL request type enum\n */\nexport enum GraphQLRequestType {\n QUERY = 'query',\n MUTATION = 'mutation',\n SUBSCRIPTION = 'subscription',\n}\n","/**\n * Logical operator enum\n */\nexport enum LogicalOperatorEnum {\n AND = 'AND',\n NOR = 'NOR',\n OR = 'OR',\n}\n","export enum SortOrderEnum {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/**\n * Fullscreen service\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class FullscreenService {\n private _isFullscreenActive: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n constructor() {\n this.listenToFullscreenEvent();\n }\n\n get fullscreenState(): boolean {\n return this._isFullscreenActive.value;\n }\n\n get fullscreenStateAsObservable(): Observable<boolean> {\n return this._isFullscreenActive.asObservable();\n }\n\n public toggleFullscreen() {\n const elem = document.documentElement;\n if (!this._isFullscreenActive.value) {\n elem.requestFullscreen();\n this._isFullscreenActive.next(true);\n } else {\n document.exitFullscreen();\n this._isFullscreenActive.next(false);\n }\n }\n\n /**\n * Event Listener for fullscreen toggle\n */\n private listenToFullscreenEvent() {\n document.addEventListener('fullscreenchange', () => {\n if (document.fullscreenElement) {\n this._isFullscreenActive.next(true);\n } else {\n this._isFullscreenActive.next(false);\n }\n });\n }\n}\n","import { Apollo, gql } from 'apollo-angular';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { buildClientSchema, getIntrospectionQuery, GraphQLSchema, IntrospectionQuery } from 'graphql';\nimport { map } from 'rxjs/operators';\nimport { GraphQLMeta } from '../classes/graphql-meta.class';\nimport { Helper } from '../classes/helper.class';\n\n/**\n * GraphQL meta service\n *\n * For collecting meta information of the GraphQL API\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GraphQLMetaService {\n\n // Caches\n protected _frozenSchema: GraphQLSchema;\n protected _frozenSchemaObservable: Observable<GraphQLSchema>;\n protected _meta: GraphQLMeta;\n protected _metaObservable: Observable<GraphQLMeta>;\n protected _schemaObservable: Observable<GraphQLSchema>;\n\n // Private caches\n private _introspectionQuery: IntrospectionQuery;\n\n /**\n * Include services\n */\n constructor(protected apollo: Apollo) {}\n\n /**\n * Getter of introspectionQuery\n */\n get introspectionQuery(): IntrospectionQuery {\n return JSON.parse(JSON.stringify(this._introspectionQuery));\n }\n\n /**\n * Get schema for API\n * See https://www.apollographql.com/blog/three-ways-to-represent-your-graphql-schema-a41f4175100d\n */\n public getSchema(options: { cache?: boolean; freeze?: boolean } = {}): Observable<GraphQLSchema> {\n // Get configurations\n const config = {\n cache: true,\n freeze: true,\n ...options,\n };\n\n // Use caching\n if (config.cache) {\n if (config.freeze && this._frozenSchema) {\n return of(this._frozenSchema);\n }\n if (this._introspectionQuery) {\n return of(buildClientSchema(this.introspectionQuery));\n }\n if (config.freeze && this._frozenSchemaObservable) {\n return this._frozenSchemaObservable;\n } else if (!config.freeze && this._schemaObservable) {\n return this._schemaObservable;\n }\n }\n\n // Request schema from server\n const observable = this.apollo\n .query({\n query: gql(getIntrospectionQuery({descriptions: false})),\n })\n .pipe(\n map((schema: any) => {\n // Cache introspectionQuery\n this._introspectionQuery = schema.data;\n\n // Convert schema to GraphQLSchema\n this._frozenSchema = Helper.deepFreeze(buildClientSchema(this.introspectionQuery));\n\n // Return GraphQLSchema\n if (config.freeze) {\n return this._frozenSchema;\n }\n return buildClientSchema(schema.data);\n })\n );\n\n // Set observables\n if (config.freeze) {\n this._frozenSchemaObservable = observable;\n } else {\n this._schemaObservable = observable;\n }\n\n // Return result\n return observable;\n }\n\n /**\n * Get meta for API\n * See https://www.apollographql.com/blog/three-ways-to-represent-your-graphql-schema-a41f4175100d\n */\n public getMeta(options: { cache?: boolean; log?: boolean } = {}): Observable<GraphQLMeta> {\n // Get configurations\n const config = {\n cache: true,\n log: false,\n ...options,\n };\n\n // Use caching\n if (config.cache) {\n if (this._meta) {\n return of(this._meta);\n } else if (this._metaObservable) {\n return this._metaObservable;\n }\n }\n\n // Request schema from server\n const observable = this.getSchema(options).pipe(\n map((schema: any) => {\n // Log\n if (config.log) {\n console.log({schema});\n }\n\n this._meta = new GraphQLMeta(schema);\n return this._meta;\n })\n );\n\n // Set observables\n this._metaObservable = observable;\n\n // Return result\n return observable;\n }\n}\n","import { Apollo, gql } from 'apollo-angular';\nimport { Injectable } from '@angular/core';\nimport { IGraphQLOptions } from '../interfaces/graphql-options.interface';\nimport { GraphQLRequestType } from '../enums/graphql-request-type.enum';\nimport { Observable, throwError } from 'rxjs';\nimport { GraphQLMetaService } from './graphql-meta.service';\nimport { GraphQLEnum } from '../classes/graphql-enum.class';\nimport { GraphQLType } from '../classes/graphql-type.class';\nimport { IGraphQLTypeCollection } from '../interfaces/graphql-type-collection.interface';\n\n/**\n * GraphQL service\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GraphQLService {\n /**\n * Include services\n */\n constructor(protected apollo: Apollo, protected graphQLMetaService: GraphQLMetaService) {}\n\n /**\n * GraphQL request\n */\n public graphQl(graphql: string, options: IGraphQLOptions = {}): Observable<any> {\n // Check arguments\n if (!graphql) {\n throwError('Missing graphql argument');\n }\n\n // Get config\n const config = {\n arguments: null,\n fields: null,\n log: false,\n model: null,\n type: GraphQLRequestType.QUERY,\n ...options,\n };\n\n // Convert class to Object for arguments\n if (typeof config.arguments === 'function') {\n config.arguments = new config.arguments();\n }\n\n // Convert class to Object for fields\n if (typeof config.fields === 'function') {\n config.fields = new config.fields();\n }\n\n // Log\n if (config.log) {\n console.log({ config });\n }\n\n // Send request\n return new Observable((subscriber) => {\n // Get meta\n this.graphQLMetaService.getMeta({ log: config.log }).subscribe((meta) => {\n // Prepare fields\n let fields;\n let allowedFields;\n\n // Log meta\n if (config.log) {\n console.log({ meta });\n }\n\n if (config.fields) {\n allowedFields = meta.getFields(graphql, { type: config.type });\n\n // Log meta\n if (config.log) {\n console.log({ allowedFields });\n }\n\n const fieldsData = this.prepareFields(config.fields, {\n allowed: allowedFields,\n });\n\n // Log fields data\n if (config.log) {\n fieldsData.usedFields.sort();\n fieldsData.schemaFields.sort();\n const filtered = fieldsData.schemaFields.filter((field) => !fieldsData.usedFields.includes(field));\n const unused = this.graphQLTypeCollectionToStringArray(allowedFields).filter(\n (field) => !fieldsData.usedFields.includes(field)\n );\n console.log({ fieldsData, filtered, unused });\n }\n\n fields = fieldsData.fieldsString;\n }\n\n if (fields && !fields.startsWith('{')) {\n fields = '{' + fields + '\\n}';\n }\n\n // Log fields\n if (config.log) {\n console.log({ fields });\n }\n\n // Get allowed args\n const allowedArgs = meta.getArgs(graphql, { type: config.type });\n\n // Log allowed args\n if (config.log) {\n console.log({ allowedArgs });\n }\n\n const argsData = this.prepareArguments(config.arguments, {\n allowed: allowedArgs,\n });\n\n // Log args data\n if (config.log) {\n argsData.usedArgs.sort();\n argsData.schemaArgs.sort();\n const filtered = argsData.schemaArgs.filter((field) => !argsData.usedArgs.includes(field));\n const unused = this.graphQLTypeCollectionToStringArray(allowedArgs)\n .sort()\n .filter((field) => !argsData.usedArgs.includes(field));\n console.log({ argsData, filtered, unused });\n }\n\n const args = argsData.argsString || '';\n\n // Log\n if (config.log) {\n console.log({ graphQL: graphql, args, fields, type: config.type });\n }\n\n // Prepare request\n const documentNode = fields\n ? gql(config.type + '{\\n' + graphql + args + fields + '\\n}')\n : gql(config.type + '{\\n' + graphql + args + '\\n}');\n\n // Log\n if (config.log) {\n console.log({ documentNode });\n }\n\n const request: any = {};\n request[config.type] = documentNode;\n\n // Log\n if (config.log) {\n console.log({ request });\n }\n\n let func;\n if (config.type === GraphQLRequestType.MUTATION) {\n func = 'mutate';\n request[config.type] = documentNode;\n } else if (config.type === GraphQLRequestType.SUBSCRIPTION) {\n func = 'subscribe';\n request.query = documentNode;\n } else {\n func = config.type;\n request[config.type] = documentNode;\n }\n\n (this.apollo as any)[func](request).subscribe(\n (result: any) => {\n const data = result?.data?.[graphql] !== undefined ? result.data[graphql] : result;\n\n // Direct data\n if (!config.model) {\n subscriber.next(data);\n }\n\n // Map data as array\n else if (Array.isArray(data)) {\n subscriber.next(\n data.map((item) => {\n return config.model.map(item);\n })\n );\n }\n\n // Map data\n else {\n subscriber.next(config.model.map(data));\n }\n\n if (config.type !== GraphQLRequestType.SUBSCRIPTION) {\n // Done\n subscriber.complete();\n }\n },\n (error: any) => {\n subscriber.error(error);\n subscriber.complete();\n }\n );\n });\n });\n }\n\n /**\n * Get fields / args from IGraphQLTypeCollection\n */\n protected graphQLTypeCollectionToStringArray(\n collection: IGraphQLTypeCollection,\n current = '',\n result = [],\n cacheNode = []\n ) {\n if (collection) {\n if (collection instanceof GraphQLType) {\n result.push(current);\n } else {\n if (current?.includes('.')) {\n cacheNode.push(current.split('.')[1]);\n } else if (current) {\n cacheNode.push(current);\n }\n for (const key of Object.keys(collection)) {\n if (current === key || cacheNode.includes(key)) {\n continue;\n }\n this.graphQLTypeCollectionToStringArray(\n collection[key] as IGraphQLTypeCollection,\n current ? current + '.' + key : key,\n result,\n cacheNode\n );\n }\n }\n }\n return result;\n }\n\n /**\n * Prepare arguments for GraphQL request\n */\n protected prepareArguments(\n args: any,\n options: {\n allowed?: any;\n level?: number;\n parent?: string;\n schemaArgs?: string[];\n usedArgs?: string[];\n } = {}\n ): { argsString: string; schemaArgs: string[]; usedArgs: string[] } {\n // Init config variables\n const { allowed, level, parent, schemaArgs, usedArgs } = {\n allowed: null,\n level: 1,\n parent: '',\n schemaArgs: [],\n usedArgs: [],\n ...options,\n };\n\n // Check args\n if (args === undefined || args === null) {\n return { argsString: '', schemaArgs, usedArgs };\n }\n\n // Init args\n const result = [];\n\n // Process array\n if (Array.isArray(args)) {\n const allowedKeys = allowed ? Object.keys(allowed) : null;\n for (const item of args) {\n let key = null;\n if (allowed) {\n if (allowed.length < 1) {\n break;\n }\n key = allowedKeys?.shift();\n }\n\n // Process value\n result.push(\n this.prepareArguments(item, {\n allowed: key ? allowed[key] : null,\n level: level + 1,\n parent: parent + key + '.',\n schemaArgs,\n usedArgs,\n }).argsString\n );\n }\n\n // Encapsulation of the array result\n if (result.length) {\n // Complete result, encapsulated via round brackets\n if (level === 1) {\n return { argsString: '(' + result.join(', ') + ')', schemaArgs, usedArgs };\n }\n\n // Deeper result part, encapsulated via square brackets\n else {\n return { argsString: '[' + result.join(', ') + ']', schemaArgs, usedArgs };\n }\n }\n }\n\n // Process object\n else if (typeof args === 'object') {\n // Check object is empty\n if (args && Object.keys(args).length === 0 && Object.getPrototypeOf(args) === Object.prototype) {\n return { argsString: '{}', schemaArgs, usedArgs };\n }\n // Process all object entries\n for (const [key, value] of Object.entries(args)) {\n // Init data for current entry\n const currentKey = parent + key;\n schemaArgs.push(currentKey);\n\n // If the allowed key handling is enabled and the current key is not included in the list of allowed keys,\n // the current key will be skipped\n if (allowed && !allowed[key]) {\n continue;\n }\n\n // Skip value if not exists\n if (value === undefined && value === null) {\n continue;\n }\n\n // Add current key to metadata\n usedArgs.push(currentKey);\n\n // Process GraphQLEnum\n if (value instanceof GraphQLEnum) {\n result.push(key + ':' + value.value);\n continue;\n }\n\n // Process array\n else if (Array.isArray(value)) {\n result.push(\n key +\n ': [' +\n value.map(\n (item) =>\n this.prepareArguments(item, {\n allowed: allowed[key],\n level: level + 1,\n parent: currentKey + '.',\n schemaArgs,\n usedArgs,\n }).argsString\n ) +\n ']'\n );\n continue;\n }\n\n // Prepare additional result string\n let additionalResult = key + ': ';\n\n // Value is a date object\n if (typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]') {\n additionalResult += `\"\"\"${(value as Date).toString()}\"\"\"`;\n }\n\n // Value is a string\n else if (typeof value === 'string') {\n // Enum (doesn't need quotation marks)\n if (allowed[key].isEnum) {\n additionalResult += value;\n }\n\n // String\n else {\n additionalResult += `\"\"\"${value.replace(/\"/g, '\\\\\"')}\"\"\"`;\n }\n }\n\n // Value is a simple boolean or a number\n else if (typeof value === 'boolean' || typeof value === 'number') {\n additionalResult += value;\n }\n\n // Others\n else {\n additionalResult += this.prepareArguments(value, {\n allowed: allowed[key],\n level: level + 1,\n parent: currentKey + '.',\n schemaArgs,\n usedArgs,\n }).argsString;\n }\n\n // Push deeper part into result array\n result.push(additionalResult);\n }\n\n // Encapsulation of the object result\n if (result.length) {\n // Complete result, encapsulated via round brackets\n if (level === 1) {\n return { argsString: '(' + result.join(', ') + ')', schemaArgs, usedArgs };\n }\n\n // Deeper result part, encapsulated via curly brackets\n else {\n return { argsString: '{' + result.join(', ') + '}', schemaArgs, usedArgs };\n }\n }\n }\n\n // Prepare and process other / unknown values as JSON\n else {\n return { argsString: JSON.stringify(args), schemaArgs, usedArgs };\n }\n }\n\n /**\n * Prepare fields for GraphQL request\n */\n protected prepareFields(\n fields: any,\n options: {\n allowed?: any;\n schemaFields?: string[];\n usedFields?: string[];\n parent?: string;\n spaces?: number;\n tab?: number;\n } = {}\n ): { schemaFields: string[]; fieldsString: string; usedFields: string[] } {\n // Config\n const { allowed, parent, schemaFields, spaces, tab, usedFields } = {\n allowed: null,\n parent: '',\n schemaFields: [],\n spaces: 2,\n tab: 1,\n usedFields: [],\n ...options,\n };\n\n // Init fields string\n let fieldsString = '';\n\n // Check fields\n if (!fields) {\n return { fieldsString, schemaFields, usedFields };\n }\n\n // Process string\n if (typeof fields === 'string') {\n if (\n allowed &&\n ((typeof allowed === 'string' && allowed !== fields) || (typeof allowed === 'object' && !allowed[fields]))\n ) {\n return { fieldsString, schemaFields, usedFields };\n }\n return { fieldsString: '\\n' + ' '.repeat(spaces).repeat(tab) + fields, schemaFields, usedFields };\n }\n\n // Process array\n else if (Array.isArray(fields)) {\n for (const item of fields) {\n if (typeof item === 'object') {\n fieldsString =\n fieldsString +\n this.prepareFields(item, {\n allowed,\n parent,\n spaces,\n schemaFields,\n tab: tab + 1,\n usedFields,\n }).fieldsString;\n continue;\n }\n const currentPath = parent + item;\n schemaFields.push(currentPath);\n if (allowed && !allowed?.[item]) {\n continue;\n }\n usedFields.push(currentPath);\n fieldsString =\n fieldsString +\n this.prepareFields(item, {\n allowed:\n typeof allowed?.[item] === 'object' && !(allowed?.[item] instanceof GraphQLType) ? allowed?.[item] : item,\n parent: currentPath + '.',\n spaces,\n schemaFields,\n tab: tab + 1,\n usedFields,\n }).fieldsString;\n }\n }\n\n // Process object\n else if (typeof fields === 'object') {\n for (const [key, val] of Object.entries(fields)) {\n const currentPath = parent + key;\n schemaFields.push(currentPath);\n if (allowed && !allowed[key]) {\n continue;\n }\n usedFields.push(currentPath);\n if (typeof val !== 'object' || !Object.keys(val).length) {\n fieldsString = fieldsString + '\\n' + ' '.repeat(spaces).repeat(tab) + key;\n } else {\n fieldsString =\n fieldsString +\n '\\n' +\n ' '.repeat(spaces).repeat(tab) +\n key +\n ' ' +\n '{' +\n this.prepareFields(val, {\n allowed:\n typeof allowed?.[key] === 'object' && !(allowed?.[key] instanceof GraphQLType) ? allowed?.[key] : key,\n parent: currentPath + '.',\n spaces,\n schemaFields,\n tab: tab + 1,\n usedFields,\n }).fieldsString +\n '\\n' +\n ' '.repeat(spaces).repeat(tab) +\n '}';\n }\n }\n }\n\n // Return result\n return { fieldsString, schemaFields, usedFields };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/**\n * Loader service for loading indication\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class LoaderService {\n public isLoading = new BehaviorSubject(false);\n\n public start(): void {\n this.isLoading.next(true);\n }\n\n public stop(): void {\n this.isLoading.next(false);\n }\n\n public getAsObservable(): Observable<boolean> {\n return this.isLoading.asObservable();\n }\n}\n","import { Apollo } from 'apollo-angular';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { GraphQLService } from './graphql.service';\nimport { GraphQLMetaService } from './graphql-meta.service';\nimport { IGraphQLPlusOptions } from '../interfaces/graphql-plus-options.interfacen';\nimport { LoaderService } from './loader.service';\nimport { GraphQLRequestType } from '../enums/graphql-request-type.enum';\n\n/**\n * GraphQL plus service, for extra error handling and loading indication\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GraphQLPlusService extends GraphQLService {\n /**\n * Include services\n */\n constructor(\n protected apollo: Apollo,\n protected graphqlMetaService: GraphQLMetaService,\n protected loaderService: LoaderService\n ) {\n super(apollo, graphqlMetaService);\n }\n\n public graphQl(graphql: string, options: IGraphQLPlusOptions = {}): Observable<any> {\n this.handleLoader('start', options);\n\n return new Observable((subscriber) => {\n super.graphQl(graphql, options).subscribe(\n (response) => {\n if (response && response.errors) {\n this.handleError(response.errors, options.excludedErrors);\n subscriber.error(response);\n this.handleLoader('stop', options);\n subscriber.complete();\n }\n\n subscriber.next(response);\n this.handleLoader('stop', options);\n if (options.type !== GraphQLRequestType.SUBSCRIPTION) {\n subscriber.complete();\n }\n },\n (error) => {\n if (!options.ignoreErrors) {\n this.handleError(error, options.excludedErrors);\n }\n subscriber.error(error);\n this.handleLoader('stop', options);\n subscriber.complete();\n }\n );\n });\n }\n\n handleLoader(state: 'start' | 'stop', options: IGraphQLPlusOptions): void {\n if (options.loading) {\n if (state === 'start') {\n this.loaderService.start();\n } else if (state === 'stop') {\n this.loaderService.stop();\n }\n }\n }\n\n handleError(error: Error, excludedErrors: any = null): void {\n if (excludedErrors) {\n if (Array.isArray(excludedErrors)) {\n excludedErrors.forEach((excludedError) => {\n if (error.message.includes(excludedError.toLowerCase())) {\n return;\n }\n });\n } else if (error.message.toLowerCase().includes(excludedErrors?.toLowerCase())) {\n return;\n }\n }\n\n this.displayError(error);\n }\n\n displayError(error: any): void {\n console.error(error);\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { BASE_MODULE_CONFIG, BaseModuleConfig } from '../interfaces/base-module-config.interface';\n\n/**\n * Scroll service for autoscroll to specific fragments\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ScrollService {\n /**\n * Current scroll promise\n *\n * @protected\n */\n protected scrollPromise: Promise<void>;\n\n /**\n * Resolve function of current scroll promise\n *\n * @protected\n */\n protected scrollPromiseResolve: (value: void | PromiseLike<void>) => void;\n\n /**\n * Is a scroll listener set\n *\n * @protected\n */\n protected scrollListener = false;\n\n /**\n * Current scroll timer;\n *\n * @protected\n */\n protected scrollTimer = -1;\n\n /**\n * Scroll offset\n */\n protected readonly scrollOffset: number;\n\n /**\n * Detection offset\n * Should be >= scrollOffset\n */\n protected readonly detectionOffset: number;\n\n /**\n * Sampling rate for scroll done detection\n */\n protected readonly scrollSamplingRate: number;\n\n /**\n * Initializer\n */\n constructor(private router: Router, @Inject(BASE_MODULE_CONFIG) private moduleConfig: BaseModuleConfig) {\n const config = {\n scrollDetectionOffset: 200,\n scrollOffset: 100,\n scrollSamplingRate: 100,\n ...moduleConfig,\n };\n\n this.detectionOffset = config.scrollDetectionOffset;\n this.scrollOffset = config.scrollOffset;\n this.scrollSamplingRate = config.scrollSamplingRate;\n }\n\n /**\n * Scroll to structureElement with specific ID\n */\n async scrollTo(\n id: string,\n options: {\n checkUrl?: boolean;\n loadImagesBefore?: boolean;\n resetStyles?: boolean;\n setOverflow?: boolean;\n stopPropagation?: boolean;\n } = {}\n ) {\n // Prepare config\n const config = {\n checkUrl: true,\n loadImagesBefore: true,\n resetStyles: false,\n setOverflow: true,\n stopPropagation: true,\n ...options,\n };\n\n // Check current URL\n if (config.checkUrl && this.router.url !== '/' && !this.router.url.startsWith('/#')) {\n await this.router.navigate(['/'], { fragment: id });\n return !config.stopPropagation;\n }\n\n // Check if target element exits\n const el = document.getElementById(id);\n if (!el) {\n console.error('Missing scroll element with ID:', id);\n return !config.stopPropagation;\n }\n\n // Check if body overflow is visible\n // This is necessary for scroll handling\n const body = document.querySelector('body');\n let undoOverflowChanges = false;\n const scrollBodyStyles = JSON.parse(JSON.stringify(window.getComputedStyle(body)));\n if (config.setOverflow && (scrollBodyStyles.overflowX !== 'visible' || scrollBodyStyles.overflowY !== 'visible')) {\n // Set body overflow to visible\n console.warn('Style of body element for overflowX and overflowY will be set to \"visible\" for scrolling!');\n body.style.overflowX = 'visible';\n body.style.overflowY = 'visible';\n undoOverflowChanges = true;\n }\n\n // Load images before scrolling (once)\n if (config.loadImagesBefore) {\n await this.preLoadImages();\n }\n\n // Get get bounding rect of target element\n const cords = el.getBoundingClientRect();\n\n // Scroll to element\n window.scrollBy({ top: cords.top - this.scrollOffset, behavior: 'smooth' });\n await this.scrollDone({\n doneFunction: () => {\n // Undo changes\n if (undoOverflowChanges && config.resetStyles) {\n body.style.overflowX = scrollBodyStyles.overflowX;\n body.style.overflowY = scrollBodyStyles.overflowY;\n console.warn('Original style of body element for overflowX and overflowY is set.');\n }\n },\n });\n\n // Return stop propagation configuration\n return !config.stopPropagation;\n }\n\n /**\n * Get last active structureElement\n */\n getLastActiveElement(list?): string {\n const currentScrollPosition = window.scrollY;\n const elementsWithId = document.querySelectorAll('[id]');\n let lastId = null;\n let lastPosition = 0 - this.detectionOffset - 1;\n elementsWithId.forEach((element) => {\n const cords = element.getBoundingClientRect();\n const top = cords.top + window.pageYOffset - this.detectionOffset;\n if (\n (!list || !list.length || list.includes(element.id)) && // In list\n top < currentScrollPosition && // In active area\n lastPosition < top // Higher than the last one\n ) {\n lastId = element.id;\n lastPosition = top;\n }\n });\n return lastId;\n }\n\n /**\n * Check if ID is active\n */\n isActive(id, list?, isFirst?) {\n const lastActiveElement = this.getLastActiveElement(list);\n return id === lastActiveElement || (lastActiveElement === null && isFirst);\n }\n\n /**\n * Scroll done promise\n */\n public scrollDone(options: { doneFunction?: () => Promise<any> | any | void; timeout?: number } = {}): Promise<any> {\n // Init configuration\n const config = {\n doneFunction: undefined,\n timeout: undefined,\n ...options,\n };\n\n // Return promise for scroll done\n return new Promise(async (resolve, reject) => {\n // Init variables\n let rejected = false;\n let timeoutId: number;\n\n // Set timeout handling if necessary\n if (config.timeout) {\n timeoutId = window.setTimeout(() => {\n rejected = true;\n reject(new Error('Timeout for scrollDone after:' + config.timeout));\n }, config.timeout);\n }\n\n // Wait for scroll done\n await this.scrollDoneDetection();\n\n // Resolve promise if not already rejected\n if (!rejected) {\n // Stop timeout if set\n if (timeoutId) {\n window.clearTimeout(timeoutId);\n }\n\n // Get result (if doneFunction is set)\n let result;\n if (config.doneFunction) {\n result = await config.doneFunction();\n }\n\n // Scroll done\n resolve(result);\n }\n });\n }\n\n /**\n * Scroll done detecton\n *\n * @protected\n */\n protected scrollDoneDetection(): Promise<void> {\n // Return current scroll promise (Singelton)\n if (this.scrollPromise) {\n return this.scrollPromise;\n }\n\n // Create current scroll promise\n this.scrollPromise = new Promise((resolve) => {\n this.scrollPromiseResolve = resolve;\n if (this.scrollTimer !== -1) {\n window.clearTimeout(this.scrollTimer);\n }\n this.scrollTimer = window.setTimeout(() => {\n window.removeEventListener('scroll', this.scrollDoneDetection.bind(this));\n this.scrollPromise = undefined;\n resolve();\n }, this.scrollSamplingRate);\n });\n\n // Lisitening to scroll event;\n window.addEventListener('scroll', this.scrollDoneDetection.bind(this));\n\n // Return promise\n return this.scrollPromise;\n }\n\n /**\n * Preaload images (for lazy handling)\n *\n * @param options\n * @protected\n */\n protected preLoadImages(options?: {\n doneFunction?: () => Promise<any> | any | void;\n timeout?: number;\n }): Promise<any> {\n // Init configuration\n const config = {\n doneFunnction: undefined,\n timeout: undefined,\n ...options,\n };\n\n return new Promise((resolve) => {\n // Init variables\n let resolved = false;\n let timeoutId;\n\n // Init loading\n const images = Array.from(document.getElementsByTagName('img'));\n const promises = [];\n\n // Prepare images\n for (const image of images) {\n const src = image.getAttribute('src');\n\n // Check if changes are necessary and possible\n if ((image.complete && image.naturalHeight !== 0) || image.getAttribute('loading') !== 'lazy' || !src) {\n continue;\n }\n\n const newImage = document.createElement('img');\n Array.from(image.attributes).forEach((attr) => {\n if (attr.name !== 'loading' && attr.name !== 'src') {\n newImage.setAttribute(attr.name, attr.value);\n }\n });\n image.replaceWith(newImage);\n promises.push(this.loadImage(newImage, src));\n }\n\n if (config.timeout) {\n timeoutId = setTimeout(async () => {\n resolved = true;\n if (config.doneFunnction) {\n await config.doneFunction();\n }\n resolve(undefined);\n });\n }\n\n // Wait until all images loaded\n Promise.all(promises)\n .catch((e) => console.error('Error during image loading', e))\n .finally(async () => {\n // Check if already resolved\n if (resolved) {\n return;\n }\n\n // Stop timeout\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n\n // Return result\n let result;\n if (config.doneFunnction) {\n result = await config.doneFunction();\n }\n resolve(result);\n });\n });\n }\n\n /**\n * Load image for image element\n *\n * @param imageElement\n * @param src\n * @protected\n */\n protected async loadImage(imageElement: HTMLImageElement, src?: string) {\n src = src || imageElement.src;\n return new Promise((resolve, reject) => {\n imageElement.onload = () => resolve(imageElement);\n imageElement.onerror = reject;\n imageElement.src = src;\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Meta, Title } from '@angular/platform-browser';\n\n/**\n * SEO service for setting HTML meta data\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SEOService {\n constructor(private titleService: Title, private metaTagService: Meta) {}\n\n public initPageForSEO(title: string, description: string, keywords?: string) {\n this.setPageTitle(title);\n this.setPageDescription(description);\n\n if (keywords) {\n this.setPageKeywords(keywords);\n }\n }\n\n private setPageTitle(title: string) {\n this.titleService.setTitle(title);\n this.metaTagService.updateTag({property: 'og:title', content: title});\n this.metaTagService.updateTag({name: 'twitter:title', content: title});\n }\n\n private setPageDescription(description: string) {\n this.metaTagService.updateTag({name: 'description', content: description});\n this.metaTagService.updateTag({property: 'og:description', content: description});\n this.metaTagService.updateTag({name: 'twitter:description', content: description});\n }\n\n private setPageKeywords(keywords: string) {\n this.metaTagService.updateTag({name: 'keywords', content: keywords});\n }\n}\n","import { FormGroup } from '@angular/forms';\n\n/**\n * Custom validator to check that two fields match\n * (inspirated by https://jasonwatmore.com/post/2018/11/07/angular-7-reactive-forms-validation-example)\n */\nexport function MustMatch(controlName: string, matchingControlName: string) {\n return (formGroup: FormGroup) => {\n const control = formGroup.controls[controlName];\n const matchingControl = formGroup.controls[matchingControlName];\n\n if (matchingControl.errors && !matchingControl.errors.mustMatch) {\n // return if another validator has already found an error on the matchingControl\n return;\n }\n\n // set error on matchingControl if validation fails\n if (control.value !== matchingControl.value) {\n matchingControl.setErrors({ mustMatch: true });\n } else {\n matchingControl.setErrors(null);\n }\n };\n}\n","/**\n * Exports for public API\n */\n\n// Module\nexport * from './base.module';\n\n// Classes\nexport * from './classes/basic-user.class';\nexport * from './classes/graphql-enum.class';\nexport * from './classes/graphql-meta.class';\nexport * from './classes/graphql-type.class';\nexport * from './classes/helper.class';\nexport * from './classes/standard.class';\n\n// Directives\nexport * from './directives/context-menu.directive';\nexport * from './directives/lazy-load.directive';\nexport * from './directives/match-height.directive';\nexport * from './directives/resizable.directive';\n\n// Factories\nexport * from './factories/apollo-options.factory';\n\n// Guards\nexport * from './guards/auth.guard';\nexport * from './guards/can-deactivate.guard';\nexport * from './guards/logout.guard';\n\n// Enums\nexport * from './enums/comparison-operator.enum';\nexport * from './enums/graphql-request-type.enum';\nexport * from './enums/logical-operator.enum';\nexport * from './enums/sort-order.enum';\n\n// Interfaces\nexport * from './interfaces/base-module-config.interface';\nexport * from './interfaces/can-component-deactivate.interface';\nexport * from './interfaces/combined-filter-input.interface';\nexport * from './interfaces/field.interface';\nexport * from './interfaces/field-object.interface';\nexport * from './interfaces/filter-input.interface';\nexport * from './interfaces/graphql-options.interface';\nexport * from './interfaces/graphql-plus-options.interfacen';\nexport * from './interfaces/graphql-type-collection.interface';\nexport * from './interfaces/single-filter-input.interface';\nexport * from './interfaces/sort-input.interface';\nexport * from './interfaces/find-args.interface';\n\n// Pipes\nexport * from './pipes/ellipses.pipe';\nexport * from './pipes/safe-html.pipe';\n\n// Services\nexport * from './services/auth.service';\nexport * from './services/fullscreen.service';\nexport * from './services/graphql.service';\nexport * from './services/graphql-meta.service';\nexport * from './services/graphql-plus.service';\nexport * from './services/loader.service';\nexport * from './services/scroll.service';\nexport * from './services/seo.service';\nexport * from './services/storage.service';\n\n// Types\nexport * from './types/storage.type';\n\n// Validators\nexport * from './validators/must-match.validator';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAmEa,kBAAkB,GAAG,IAAI,cAAc,CAAC,oBAAoB;;AChEzE;;;MAMa,cAAc;;;;IAczB,YAAgD,YAA8B;QAA9B,iBAAY,GAA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