@eui/base 23.0.0-alpha.1 → 23.0.0-alpha.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/docs/changelog.html +686 -0
- package/docs/classes/ConsoleAppender.html +2 -0
- package/docs/classes/EuiLazyService.html +4 -1
- package/docs/classes/LoggerMock.html +50 -8
- package/docs/classes/UrlAppender.html +2 -0
- package/docs/interfaces/I18nConfig.html +45 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +186 -117
- package/docs/properties.html +1 -1
- package/fesm2022/eui-base.mjs +1 -0
- package/fesm2022/eui-base.mjs.map +1 -1
- package/package.json +6 -5
- package/types/eui-base.d.ts +1 -0
- package/types/eui-base.d.ts.map +1 -1
|
@@ -1544,12 +1544,12 @@
|
|
|
1544
1544
|
},
|
|
1545
1545
|
{
|
|
1546
1546
|
"name": "EuiServiceModel",
|
|
1547
|
-
"id": "interface-EuiServiceModel-
|
|
1547
|
+
"id": "interface-EuiServiceModel-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
|
|
1548
1548
|
"file": "packages/base/src/lib/eui-models/eui-service.model.ts",
|
|
1549
1549
|
"deprecated": false,
|
|
1550
1550
|
"deprecationMessage": "",
|
|
1551
1551
|
"type": "interface",
|
|
1552
|
-
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected stateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
1552
|
+
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected override stateInstance: T;\n protected override $stateSubs: Subscription;\n protected override $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n override initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
1553
1553
|
"properties": [],
|
|
1554
1554
|
"indexSignatures": [],
|
|
1555
1555
|
"kind": 174,
|
|
@@ -1737,12 +1737,12 @@
|
|
|
1737
1737
|
},
|
|
1738
1738
|
{
|
|
1739
1739
|
"name": "EuiServiceStatus",
|
|
1740
|
-
"id": "interface-EuiServiceStatus-
|
|
1740
|
+
"id": "interface-EuiServiceStatus-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
|
|
1741
1741
|
"file": "packages/base/src/lib/eui-models/eui-service.model.ts",
|
|
1742
1742
|
"deprecated": false,
|
|
1743
1743
|
"deprecationMessage": "",
|
|
1744
1744
|
"type": "interface",
|
|
1745
|
-
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected stateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
1745
|
+
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected override stateInstance: T;\n protected override $stateSubs: Subscription;\n protected override $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n override initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
1746
1746
|
"properties": [
|
|
1747
1747
|
{
|
|
1748
1748
|
"name": "error",
|
|
@@ -2033,12 +2033,12 @@
|
|
|
2033
2033
|
},
|
|
2034
2034
|
{
|
|
2035
2035
|
"name": "I18nConfig",
|
|
2036
|
-
"id": "interface-I18nConfig-
|
|
2036
|
+
"id": "interface-I18nConfig-b0a3a5425955f09a46ff08822b65a5ae1d4ca4dc78c1b96e6a14c0c5f7972681fa7b353d2a3fe08cca30bc79ecfcf44c57f08bb6d54ede82673cc3a54119254a",
|
|
2037
2037
|
"file": "packages/base/src/lib/eui-models/eui-config/i18n.config.ts",
|
|
2038
2038
|
"deprecated": false,
|
|
2039
2039
|
"deprecationMessage": "",
|
|
2040
2040
|
"type": "interface",
|
|
2041
|
-
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2041
|
+
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n icuEnabled?: boolean;\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2042
2042
|
"properties": [
|
|
2043
2043
|
{
|
|
2044
2044
|
"name": "i18nLoader",
|
|
@@ -2048,7 +2048,7 @@
|
|
|
2048
2048
|
"indexKey": "",
|
|
2049
2049
|
"optional": false,
|
|
2050
2050
|
"description": "",
|
|
2051
|
-
"line":
|
|
2051
|
+
"line": 27
|
|
2052
2052
|
},
|
|
2053
2053
|
{
|
|
2054
2054
|
"name": "i18nService",
|
|
@@ -2058,6 +2058,16 @@
|
|
|
2058
2058
|
"indexKey": "",
|
|
2059
2059
|
"optional": false,
|
|
2060
2060
|
"description": "",
|
|
2061
|
+
"line": 26
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
"name": "icuEnabled",
|
|
2065
|
+
"deprecated": false,
|
|
2066
|
+
"deprecationMessage": "",
|
|
2067
|
+
"type": "boolean",
|
|
2068
|
+
"indexKey": "",
|
|
2069
|
+
"optional": true,
|
|
2070
|
+
"description": "",
|
|
2061
2071
|
"line": 25
|
|
2062
2072
|
}
|
|
2063
2073
|
],
|
|
@@ -2068,12 +2078,12 @@
|
|
|
2068
2078
|
},
|
|
2069
2079
|
{
|
|
2070
2080
|
"name": "I18nLoaderConfig",
|
|
2071
|
-
"id": "interface-I18nLoaderConfig-
|
|
2081
|
+
"id": "interface-I18nLoaderConfig-b0a3a5425955f09a46ff08822b65a5ae1d4ca4dc78c1b96e6a14c0c5f7972681fa7b353d2a3fe08cca30bc79ecfcf44c57f08bb6d54ede82673cc3a54119254a",
|
|
2072
2082
|
"file": "packages/base/src/lib/eui-models/eui-config/i18n.config.ts",
|
|
2073
2083
|
"deprecated": false,
|
|
2074
2084
|
"deprecationMessage": "",
|
|
2075
2085
|
"type": "interface",
|
|
2076
|
-
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2086
|
+
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n icuEnabled?: boolean;\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2077
2087
|
"properties": [
|
|
2078
2088
|
{
|
|
2079
2089
|
"name": "i18nFolders",
|
|
@@ -2083,7 +2093,7 @@
|
|
|
2083
2093
|
"indexKey": "",
|
|
2084
2094
|
"optional": true,
|
|
2085
2095
|
"description": "<p>Those folders will be used to load the translations files from {@link <a href=\"https://angular.io/guide/workspace-config#extra-build-and-test-options\">https://angular.io/guide/workspace-config#extra-build-and-test-options</a> assets}.\ne.g [<code>${environment.apiBaseUrl}translations/</code>, <code>${environment.apiBaseUrl}translations?lang=</code>]\nImportant! the language code will be added automatically to the end of the url except if the url ends with a slash.</p>\n",
|
|
2086
|
-
"line":
|
|
2096
|
+
"line": 43,
|
|
2087
2097
|
"rawdescription": "\n\nThose folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\ne.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\nImportant! the language code will be added automatically to the end of the url except if the url ends with a slash.\n"
|
|
2088
2098
|
},
|
|
2089
2099
|
{
|
|
@@ -2094,20 +2104,20 @@
|
|
|
2094
2104
|
"indexKey": "",
|
|
2095
2105
|
"optional": true,
|
|
2096
2106
|
"description": "<p>It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\nprovide the prefix and suffix of the resource, or both.</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">export function CompileTranslations(translations: any): any {\n const result = {};\n translations.forEach((translation: any) => {\n // extract the key and value from the translation object\n const key = translation['key'];\n const value = translation['value'];\n if (key && value) {\n result[key] = value;\n }\n });\n return result;\n}\nexport const appConfig: EuiAppConfig = {\n ...,\n customHandler: {\n 'CompileTranslations_ID': CompileTranslations\n }\n};\nexport const GLOBAL: GlobalConfig = {\n ...,\n i18n: {\n i18nLoader: {\n i18nFolders: ['i18n-eui'],\n i18nResources: [{\n prefix: 'api/translations/',\n compileTranslations: 'CompileTranslations_ID',\n }]\n }\n }\n};\n___COMPODOC_EMPTY_LINE___\n___COMPODOC_EMPTY_LINE___</code></pre></div>",
|
|
2097
|
-
"line":
|
|
2107
|
+
"line": 87,
|
|
2098
2108
|
"rawdescription": "\n\nIt is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\nprovide the prefix and suffix of the resource, or both.\n\n```typescript\nexport function CompileTranslations(translations: any): any {\n const result = {};\n translations.forEach((translation: any) => {\n // extract the key and value from the translation object\n const key = translation['key'];\n const value = translation['value'];\n if (key && value) {\n result[key] = value;\n }\n });\n return result;\n}\nexport const appConfig: EuiAppConfig = {\n ...,\n customHandler: {\n 'CompileTranslations_ID': CompileTranslations\n }\n};\nexport const GLOBAL: GlobalConfig = {\n ...,\n i18n: {\n i18nLoader: {\n i18nFolders: ['i18n-eui'],\n i18nResources: [{\n prefix: 'api/translations/',\n compileTranslations: 'CompileTranslations_ID',\n }]\n }\n }\n};\n___COMPODOC_EMPTY_LINE___\n___COMPODOC_EMPTY_LINE___",
|
|
2099
2109
|
"jsdoctags": [
|
|
2100
2110
|
{
|
|
2101
|
-
"pos":
|
|
2102
|
-
"end":
|
|
2111
|
+
"pos": 2153,
|
|
2112
|
+
"end": 3190,
|
|
2103
2113
|
"kind": 328,
|
|
2104
2114
|
"id": 0,
|
|
2105
2115
|
"flags": 16777216,
|
|
2106
2116
|
"modifierFlagsCache": 0,
|
|
2107
2117
|
"transformFlags": 0,
|
|
2108
2118
|
"tagName": {
|
|
2109
|
-
"pos":
|
|
2110
|
-
"end":
|
|
2119
|
+
"pos": 2154,
|
|
2120
|
+
"end": 2161,
|
|
2111
2121
|
"kind": 80,
|
|
2112
2122
|
"id": 0,
|
|
2113
2123
|
"flags": 16777216,
|
|
@@ -2126,7 +2136,7 @@
|
|
|
2126
2136
|
"indexKey": "",
|
|
2127
2137
|
"optional": true,
|
|
2128
2138
|
"description": "<p>Array of service urls to translation, don't add the language it will be added e.g. <a href=\"http://net1/trans/en\">http://net1/trans/en</a>\nKeep in mind that the url should be the prefix and not contain any suffix.</p>\n",
|
|
2129
|
-
"line":
|
|
2139
|
+
"line": 48,
|
|
2130
2140
|
"rawdescription": "\n\nArray of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\nKeep in mind that the url should be the prefix and not contain any suffix.\n"
|
|
2131
2141
|
}
|
|
2132
2142
|
],
|
|
@@ -2137,12 +2147,12 @@
|
|
|
2137
2147
|
},
|
|
2138
2148
|
{
|
|
2139
2149
|
"name": "I18nResource",
|
|
2140
|
-
"id": "interface-I18nResource-
|
|
2150
|
+
"id": "interface-I18nResource-b0a3a5425955f09a46ff08822b65a5ae1d4ca4dc78c1b96e6a14c0c5f7972681fa7b353d2a3fe08cca30bc79ecfcf44c57f08bb6d54ede82673cc3a54119254a",
|
|
2141
2151
|
"file": "packages/base/src/lib/eui-models/eui-config/i18n.config.ts",
|
|
2142
2152
|
"deprecated": false,
|
|
2143
2153
|
"deprecationMessage": "",
|
|
2144
2154
|
"type": "interface",
|
|
2145
|
-
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2155
|
+
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n icuEnabled?: boolean;\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2146
2156
|
"properties": [
|
|
2147
2157
|
{
|
|
2148
2158
|
"name": "compileTranslations",
|
|
@@ -2185,12 +2195,12 @@
|
|
|
2185
2195
|
},
|
|
2186
2196
|
{
|
|
2187
2197
|
"name": "I18nServiceConfig",
|
|
2188
|
-
"id": "interface-I18nServiceConfig-
|
|
2198
|
+
"id": "interface-I18nServiceConfig-b0a3a5425955f09a46ff08822b65a5ae1d4ca4dc78c1b96e6a14c0c5f7972681fa7b353d2a3fe08cca30bc79ecfcf44c57f08bb6d54ede82673cc3a54119254a",
|
|
2189
2199
|
"file": "packages/base/src/lib/eui-models/eui-config/i18n.config.ts",
|
|
2190
2200
|
"deprecated": false,
|
|
2191
2201
|
"deprecationMessage": "",
|
|
2192
2202
|
"type": "interface",
|
|
2193
|
-
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2203
|
+
"sourceCode": "import { GlobalConfig } from './eui-app-config';\nimport { EuiLanguage } from '../eui-language/eui-language.model';\n\nexport interface I18nResource {\n /** prefix of the resource could be like the 2 char language code e.g. /en */\n prefix: string;\n /** suffix can be either .json or anything related of the resource HTTP call */\n suffix?: string;\n /**\n It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler\n */\n compileTranslations?: string;\n}\n\n/**\n * a factory to compile translations into the main object holding them all\n *\n * @param translations the object to be pre-processed\n * @param lang the translations language\n * @returns the pre-processed translations\n */\nexport type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;\n\nexport interface I18nConfig {\n icuEnabled?: boolean;\n i18nService: I18nServiceConfig;\n i18nLoader: I18nLoaderConfig;\n}\n\nexport interface I18nServiceConfig {\n /** an ISO 2 char code array of available languages */\n languages?: (string | EuiLanguage)[];\n /** default language to be used in case of not any has been set */\n defaultLanguage?: string;\n}\n\nexport interface I18nLoaderConfig {\n /**\n * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.\n * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]\n * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.\n */\n i18nFolders?: string | string[];\n /**\n * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en\n * Keep in mind that the url should be the prefix and not contain any suffix.\n */\n i18nServices?: string | string[];\n /**\n * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply\n * provide the prefix and suffix of the resource, or both.\n *\n * @example\n * ```typescript\n * export function CompileTranslations(translations: any): any {\n * const result = {};\n * translations.forEach((translation: any) => {\n * // extract the key and value from the translation object\n * const key = translation['key'];\n * const value = translation['value'];\n * if (key && value) {\n * result[key] = value;\n * }\n * });\n * return result;\n * }\n * export const appConfig: EuiAppConfig = {\n * ...,\n * customHandler: {\n * 'CompileTranslations_ID': CompileTranslations\n * }\n * };\n * export const GLOBAL: GlobalConfig = {\n * ...,\n * i18n: {\n * i18nLoader: {\n * i18nFolders: ['i18n-eui'],\n * i18nResources: [{\n * prefix: 'api/translations/',\n * compileTranslations: 'CompileTranslations_ID',\n * }]\n * }\n * }\n * };\n *\n */\n i18nResources?: I18nResource | I18nResource[];\n}\n\nexport const getI18nServiceConfigFromBase = (baseGlobalConfig: GlobalConfig): I18nServiceConfig => {\n if(!baseGlobalConfig) throw new Error('baseGlobalConfig is required');\n const i18nServiceConfig = baseGlobalConfig && baseGlobalConfig.i18n && baseGlobalConfig.i18n.i18nService;\n const { languages, defaultLanguage } = getI18nServiceConfig(i18nServiceConfig);\n\n return { languages, defaultLanguage };\n};\n\nexport const getI18nServiceConfig = (config: I18nServiceConfig): I18nServiceConfig => Object.assign({}, config);\n\nexport const getI18nLoaderConfig = (config: I18nLoaderConfig): I18nLoaderConfig => {\n const { i18nFolders, i18nServices, i18nResources } = Object.assign({}, config);\n return { i18nFolders, i18nServices, i18nResources };\n};\n\n/**\n * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's\n * it's using the navigator.language, splits by hyphen and get the first part.\n */\nexport const getBrowserDefaultLanguage = (): string => navigator.language.split('-')[0];\n\n/**\n * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47\n * language tags. In the returned array they are ordered by preference with the most preferred language first.\n * The array languages will be lower cased 2 char code.\n */\nexport const getBrowserPreferredLanguages = (): string[] => navigator.languages.map((lang) => lang.split('-')[0]);\n",
|
|
2194
2204
|
"properties": [
|
|
2195
2205
|
{
|
|
2196
2206
|
"name": "defaultLanguage",
|
|
@@ -2200,7 +2210,7 @@
|
|
|
2200
2210
|
"indexKey": "",
|
|
2201
2211
|
"optional": true,
|
|
2202
2212
|
"description": "<p>default language to be used in case of not any has been set</p>\n",
|
|
2203
|
-
"line":
|
|
2213
|
+
"line": 34,
|
|
2204
2214
|
"rawdescription": "\ndefault language to be used in case of not any has been set"
|
|
2205
2215
|
},
|
|
2206
2216
|
{
|
|
@@ -2211,7 +2221,7 @@
|
|
|
2211
2221
|
"indexKey": "",
|
|
2212
2222
|
"optional": true,
|
|
2213
2223
|
"description": "<p>an ISO 2 char code array of available languages</p>\n",
|
|
2214
|
-
"line":
|
|
2224
|
+
"line": 32,
|
|
2215
2225
|
"rawdescription": "\nan ISO 2 char code array of available languages"
|
|
2216
2226
|
}
|
|
2217
2227
|
],
|
|
@@ -3081,12 +3091,12 @@
|
|
|
3081
3091
|
},
|
|
3082
3092
|
{
|
|
3083
3093
|
"name": "UxErrorFeedback",
|
|
3084
|
-
"id": "interface-UxErrorFeedback-
|
|
3094
|
+
"id": "interface-UxErrorFeedback-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3085
3095
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3086
3096
|
"deprecated": false,
|
|
3087
3097
|
"deprecationMessage": "",
|
|
3088
3098
|
"type": "interface",
|
|
3089
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3099
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3090
3100
|
"properties": [
|
|
3091
3101
|
{
|
|
3092
3102
|
"name": "attributes",
|
|
@@ -3096,7 +3106,7 @@
|
|
|
3096
3106
|
"indexKey": "",
|
|
3097
3107
|
"optional": true,
|
|
3098
3108
|
"description": "",
|
|
3099
|
-
"line":
|
|
3109
|
+
"line": 100
|
|
3100
3110
|
},
|
|
3101
3111
|
{
|
|
3102
3112
|
"name": "br",
|
|
@@ -3106,7 +3116,7 @@
|
|
|
3106
3116
|
"indexKey": "",
|
|
3107
3117
|
"optional": true,
|
|
3108
3118
|
"description": "",
|
|
3109
|
-
"line":
|
|
3119
|
+
"line": 102
|
|
3110
3120
|
},
|
|
3111
3121
|
{
|
|
3112
3122
|
"name": "doc",
|
|
@@ -3116,7 +3126,7 @@
|
|
|
3116
3126
|
"indexKey": "",
|
|
3117
3127
|
"optional": true,
|
|
3118
3128
|
"description": "",
|
|
3119
|
-
"line":
|
|
3129
|
+
"line": 103
|
|
3120
3130
|
},
|
|
3121
3131
|
{
|
|
3122
3132
|
"name": "errGroupId",
|
|
@@ -3126,7 +3136,7 @@
|
|
|
3126
3136
|
"indexKey": "",
|
|
3127
3137
|
"optional": true,
|
|
3128
3138
|
"description": "",
|
|
3129
|
-
"line":
|
|
3139
|
+
"line": 101
|
|
3130
3140
|
},
|
|
3131
3141
|
{
|
|
3132
3142
|
"name": "severity",
|
|
@@ -3136,7 +3146,7 @@
|
|
|
3136
3146
|
"indexKey": "",
|
|
3137
3147
|
"optional": true,
|
|
3138
3148
|
"description": "",
|
|
3139
|
-
"line":
|
|
3149
|
+
"line": 99
|
|
3140
3150
|
}
|
|
3141
3151
|
],
|
|
3142
3152
|
"indexSignatures": [],
|
|
@@ -3148,16 +3158,16 @@
|
|
|
3148
3158
|
},
|
|
3149
3159
|
{
|
|
3150
3160
|
"name": "UxErrorFollowMap",
|
|
3151
|
-
"id": "interface-UxErrorFollowMap-
|
|
3161
|
+
"id": "interface-UxErrorFollowMap-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3152
3162
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3153
3163
|
"deprecated": false,
|
|
3154
3164
|
"deprecationMessage": "",
|
|
3155
3165
|
"type": "interface",
|
|
3156
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3166
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3157
3167
|
"properties": [],
|
|
3158
3168
|
"indexSignatures": [
|
|
3159
3169
|
{
|
|
3160
|
-
"id": "index-declaration-
|
|
3170
|
+
"id": "index-declaration-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3161
3171
|
"args": [
|
|
3162
3172
|
{
|
|
3163
3173
|
"name": "groupId",
|
|
@@ -3167,7 +3177,7 @@
|
|
|
3167
3177
|
}
|
|
3168
3178
|
],
|
|
3169
3179
|
"returnType": "boolean",
|
|
3170
|
-
"line":
|
|
3180
|
+
"line": 69,
|
|
3171
3181
|
"deprecated": false,
|
|
3172
3182
|
"deprecationMessage": ""
|
|
3173
3183
|
}
|
|
@@ -3178,12 +3188,12 @@
|
|
|
3178
3188
|
},
|
|
3179
3189
|
{
|
|
3180
3190
|
"name": "UxErrorInfo",
|
|
3181
|
-
"id": "interface-UxErrorInfo-
|
|
3191
|
+
"id": "interface-UxErrorInfo-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3182
3192
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3183
3193
|
"deprecated": false,
|
|
3184
3194
|
"deprecationMessage": "",
|
|
3185
3195
|
"type": "interface",
|
|
3186
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3196
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3187
3197
|
"properties": [
|
|
3188
3198
|
{
|
|
3189
3199
|
"name": "code",
|
|
@@ -3193,7 +3203,7 @@
|
|
|
3193
3203
|
"indexKey": "",
|
|
3194
3204
|
"optional": true,
|
|
3195
3205
|
"description": "",
|
|
3196
|
-
"line":
|
|
3206
|
+
"line": 89
|
|
3197
3207
|
},
|
|
3198
3208
|
{
|
|
3199
3209
|
"name": "details",
|
|
@@ -3203,7 +3213,7 @@
|
|
|
3203
3213
|
"indexKey": "",
|
|
3204
3214
|
"optional": true,
|
|
3205
3215
|
"description": "",
|
|
3206
|
-
"line":
|
|
3216
|
+
"line": 91
|
|
3207
3217
|
},
|
|
3208
3218
|
{
|
|
3209
3219
|
"name": "doc",
|
|
@@ -3213,7 +3223,7 @@
|
|
|
3213
3223
|
"indexKey": "",
|
|
3214
3224
|
"optional": true,
|
|
3215
3225
|
"description": "",
|
|
3216
|
-
"line":
|
|
3226
|
+
"line": 90
|
|
3217
3227
|
}
|
|
3218
3228
|
],
|
|
3219
3229
|
"indexSignatures": [],
|
|
@@ -3223,12 +3233,12 @@
|
|
|
3223
3233
|
},
|
|
3224
3234
|
{
|
|
3225
3235
|
"name": "UxErrorMessage",
|
|
3226
|
-
"id": "interface-UxErrorMessage-
|
|
3236
|
+
"id": "interface-UxErrorMessage-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3227
3237
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3228
3238
|
"deprecated": false,
|
|
3229
3239
|
"deprecationMessage": "",
|
|
3230
3240
|
"type": "interface",
|
|
3231
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3241
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3232
3242
|
"properties": [
|
|
3233
3243
|
{
|
|
3234
3244
|
"name": "description",
|
|
@@ -3238,7 +3248,7 @@
|
|
|
3238
3248
|
"indexKey": "",
|
|
3239
3249
|
"optional": true,
|
|
3240
3250
|
"description": "",
|
|
3241
|
-
"line":
|
|
3251
|
+
"line": 108
|
|
3242
3252
|
},
|
|
3243
3253
|
{
|
|
3244
3254
|
"name": "msgId",
|
|
@@ -3248,7 +3258,7 @@
|
|
|
3248
3258
|
"indexKey": "",
|
|
3249
3259
|
"optional": false,
|
|
3250
3260
|
"description": "",
|
|
3251
|
-
"line":
|
|
3261
|
+
"line": 107
|
|
3252
3262
|
}
|
|
3253
3263
|
],
|
|
3254
3264
|
"indexSignatures": [],
|
|
@@ -3283,12 +3293,12 @@
|
|
|
3283
3293
|
},
|
|
3284
3294
|
{
|
|
3285
3295
|
"name": "UxHttpErrorInfo",
|
|
3286
|
-
"id": "interface-UxHttpErrorInfo-
|
|
3296
|
+
"id": "interface-UxHttpErrorInfo-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3287
3297
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3288
3298
|
"deprecated": false,
|
|
3289
3299
|
"deprecationMessage": "",
|
|
3290
3300
|
"type": "interface",
|
|
3291
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3301
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3292
3302
|
"properties": [
|
|
3293
3303
|
{
|
|
3294
3304
|
"name": "requestId",
|
|
@@ -3298,7 +3308,7 @@
|
|
|
3298
3308
|
"indexKey": "",
|
|
3299
3309
|
"optional": true,
|
|
3300
3310
|
"description": "",
|
|
3301
|
-
"line":
|
|
3311
|
+
"line": 95
|
|
3302
3312
|
}
|
|
3303
3313
|
],
|
|
3304
3314
|
"indexSignatures": [],
|
|
@@ -3308,12 +3318,12 @@
|
|
|
3308
3318
|
},
|
|
3309
3319
|
{
|
|
3310
3320
|
"name": "UxHttpErrorResponse",
|
|
3311
|
-
"id": "interface-UxHttpErrorResponse-
|
|
3321
|
+
"id": "interface-UxHttpErrorResponse-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3312
3322
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3313
3323
|
"deprecated": false,
|
|
3314
3324
|
"deprecationMessage": "",
|
|
3315
3325
|
"type": "interface",
|
|
3316
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3326
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3317
3327
|
"properties": [
|
|
3318
3328
|
{
|
|
3319
3329
|
"name": "uxHttpErrorOutput",
|
|
@@ -3323,7 +3333,7 @@
|
|
|
3323
3333
|
"indexKey": "",
|
|
3324
3334
|
"optional": false,
|
|
3325
3335
|
"description": "",
|
|
3326
|
-
"line":
|
|
3336
|
+
"line": 152
|
|
3327
3337
|
}
|
|
3328
3338
|
],
|
|
3329
3339
|
"indexSignatures": [],
|
|
@@ -3380,12 +3390,12 @@
|
|
|
3380
3390
|
},
|
|
3381
3391
|
{
|
|
3382
3392
|
"name": "UxValidationErrorAttribute",
|
|
3383
|
-
"id": "interface-UxValidationErrorAttribute-
|
|
3393
|
+
"id": "interface-UxValidationErrorAttribute-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
3384
3394
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
3385
3395
|
"deprecated": false,
|
|
3386
3396
|
"deprecationMessage": "",
|
|
3387
3397
|
"type": "interface",
|
|
3388
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3398
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
3389
3399
|
"properties": [
|
|
3390
3400
|
{
|
|
3391
3401
|
"name": "key",
|
|
@@ -3395,7 +3405,7 @@
|
|
|
3395
3405
|
"indexKey": "",
|
|
3396
3406
|
"optional": false,
|
|
3397
3407
|
"description": "",
|
|
3398
|
-
"line":
|
|
3408
|
+
"line": 114
|
|
3399
3409
|
},
|
|
3400
3410
|
{
|
|
3401
3411
|
"name": "value",
|
|
@@ -3405,7 +3415,7 @@
|
|
|
3405
3415
|
"indexKey": "",
|
|
3406
3416
|
"optional": false,
|
|
3407
3417
|
"description": "",
|
|
3408
|
-
"line":
|
|
3418
|
+
"line": 115
|
|
3409
3419
|
}
|
|
3410
3420
|
],
|
|
3411
3421
|
"indexSignatures": [],
|
|
@@ -3879,12 +3889,12 @@
|
|
|
3879
3889
|
"classes": [
|
|
3880
3890
|
{
|
|
3881
3891
|
"name": "ConsoleAppender",
|
|
3882
|
-
"id": "class-ConsoleAppender-
|
|
3892
|
+
"id": "class-ConsoleAppender-e5779b4182b26ff22a33a2cdd79e982f9d127903cd804dc651a8cadfe25f88400b2079ab651ea1d2d60e3e7d7b20a1b0e29d35a20ba138a10a3f8c5d9b744658",
|
|
3883
3893
|
"file": "packages/base/src/lib/eui-models/log/console.appender.ts",
|
|
3884
3894
|
"deprecated": false,
|
|
3885
3895
|
"deprecationMessage": "",
|
|
3886
3896
|
"type": "class",
|
|
3887
|
-
"sourceCode": "import { LogAppender } from './log.appender';\nimport { ConsoleAppenderConfig, ConsoleAppenderPrefixConverters } from '../eui-config';\nimport { LogEvent, LogLevel } from './log.model';\n\n/** Default console prefix converters */\nexport const DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS: ConsoleAppenderPrefixConverters = {\n '{level}': (event: LogEvent) => event.levelName,\n '{logger}': (event: LogEvent) => event.loggerName,\n '{date}': (event: LogEvent) => event.timestamp.toLocaleDateString(),\n '{time}': (event: LogEvent) => event.timestamp.toLocaleTimeString(),\n};\n\n/**\n * Console Appender\n */\nexport class ConsoleAppender extends LogAppender<ConsoleAppenderConfig> {\n constructor(public config: ConsoleAppenderConfig = {}) {\n super(config);\n // apply the default prefix converters\n config.prefixConverters = Object.assign({}, DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS, config.prefixConverters);\n }\n\n /**\n * Logs an event in the console\n */\n append(event: LogEvent): void {\n // retrieve the prefix\n const prefix = this.getPrefix(event);\n // append it to the message array\n const messages = prefix ? [prefix, ...event.messages] : event.messages;\n\n // log the event in the console\n switch (event.level) {\n case LogLevel.FATAL:\n case LogLevel.ERROR:\n console.error(...messages);\n break;\n case LogLevel.WARN:\n console.warn(...messages);\n break;\n default:\n console.log(...messages);\n break;\n }\n }\n\n /**\n * Returns the prefix to be added to the messages\n *\n * @param event the log event\n * @returns the formatted prefix, as string\n */\n protected getPrefix(event: LogEvent): string {\n // in case of no prefixFormat, return null\n if (!this.config || !this.config.prefixFormat) {\n return null;\n }\n\n // start creating the prefix from the format\n let prefix = this.config.prefixFormat;\n\n // apply the prefix converters\n Object.keys(this.config.prefixConverters).forEach((key) => {\n prefix = this.convert(prefix, key, this.config.prefixConverters[key](event));\n });\n\n return prefix;\n }\n\n /**\n * Utility method to replace a placeholder\n *\n * @param str the string with placeholders\n * @param find the placeholder\n * @param replace the string to replace the placeholder\n * @returns the converted string\n */\n protected convert(str: string, find: string, replace: string): string {\n return str.replace(new RegExp(find, 'g'), replace);\n }\n}\n",
|
|
3897
|
+
"sourceCode": "import { LogAppender } from './log.appender';\nimport { ConsoleAppenderConfig, ConsoleAppenderPrefixConverters } from '../eui-config';\nimport { LogEvent, LogLevel } from './log.model';\n\n/** Default console prefix converters */\nexport const DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS: ConsoleAppenderPrefixConverters = {\n '{level}': (event: LogEvent) => event.levelName,\n '{logger}': (event: LogEvent) => event.loggerName,\n '{date}': (event: LogEvent) => event.timestamp.toLocaleDateString(),\n '{time}': (event: LogEvent) => event.timestamp.toLocaleTimeString(),\n};\n\n/**\n * Console Appender\n */\nexport class ConsoleAppender extends LogAppender<ConsoleAppenderConfig> {\n constructor(public override config: ConsoleAppenderConfig = {}) {\n super(config);\n // apply the default prefix converters\n config.prefixConverters = Object.assign({}, DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS, config.prefixConverters);\n }\n\n /**\n * Logs an event in the console\n */\n append(event: LogEvent): void {\n // retrieve the prefix\n const prefix = this.getPrefix(event);\n // append it to the message array\n const messages = prefix ? [prefix, ...event.messages] : event.messages;\n\n // log the event in the console\n switch (event.level) {\n case LogLevel.FATAL:\n case LogLevel.ERROR:\n console.error(...messages);\n break;\n case LogLevel.WARN:\n console.warn(...messages);\n break;\n default:\n console.log(...messages);\n break;\n }\n }\n\n /**\n * Returns the prefix to be added to the messages\n *\n * @param event the log event\n * @returns the formatted prefix, as string\n */\n protected getPrefix(event: LogEvent): string {\n // in case of no prefixFormat, return null\n if (!this.config || !this.config.prefixFormat) {\n return null;\n }\n\n // start creating the prefix from the format\n let prefix = this.config.prefixFormat;\n\n // apply the prefix converters\n Object.keys(this.config.prefixConverters).forEach((key) => {\n prefix = this.convert(prefix, key, this.config.prefixConverters[key](event));\n });\n\n return prefix;\n }\n\n /**\n * Utility method to replace a placeholder\n *\n * @param str the string with placeholders\n * @param find the placeholder\n * @param replace the string to replace the placeholder\n * @returns the converted string\n */\n protected convert(str: string, find: string, replace: string): string {\n return str.replace(new RegExp(find, 'g'), replace);\n }\n}\n",
|
|
3888
3898
|
"constructorObj": {
|
|
3889
3899
|
"name": "constructor",
|
|
3890
3900
|
"description": "",
|
|
@@ -3927,7 +3937,8 @@
|
|
|
3927
3937
|
"description": "",
|
|
3928
3938
|
"line": 17,
|
|
3929
3939
|
"modifierKind": [
|
|
3930
|
-
125
|
|
3940
|
+
125,
|
|
3941
|
+
164
|
|
3931
3942
|
]
|
|
3932
3943
|
}
|
|
3933
3944
|
],
|
|
@@ -4003,8 +4014,8 @@
|
|
|
4003
4014
|
"jsdoctags": [
|
|
4004
4015
|
{
|
|
4005
4016
|
"name": {
|
|
4006
|
-
"pos":
|
|
4007
|
-
"end":
|
|
4017
|
+
"pos": 2413,
|
|
4018
|
+
"end": 2416,
|
|
4008
4019
|
"kind": 80,
|
|
4009
4020
|
"id": 0,
|
|
4010
4021
|
"flags": 16842752,
|
|
@@ -4015,8 +4026,8 @@
|
|
|
4015
4026
|
"deprecated": false,
|
|
4016
4027
|
"deprecationMessage": "",
|
|
4017
4028
|
"tagName": {
|
|
4018
|
-
"pos":
|
|
4019
|
-
"end":
|
|
4029
|
+
"pos": 2407,
|
|
4030
|
+
"end": 2412,
|
|
4020
4031
|
"kind": 80,
|
|
4021
4032
|
"id": 0,
|
|
4022
4033
|
"flags": 16842752,
|
|
@@ -4027,8 +4038,8 @@
|
|
|
4027
4038
|
},
|
|
4028
4039
|
{
|
|
4029
4040
|
"name": {
|
|
4030
|
-
"pos":
|
|
4031
|
-
"end":
|
|
4041
|
+
"pos": 2460,
|
|
4042
|
+
"end": 2464,
|
|
4032
4043
|
"kind": 80,
|
|
4033
4044
|
"id": 0,
|
|
4034
4045
|
"flags": 16842752,
|
|
@@ -4039,8 +4050,8 @@
|
|
|
4039
4050
|
"deprecated": false,
|
|
4040
4051
|
"deprecationMessage": "",
|
|
4041
4052
|
"tagName": {
|
|
4042
|
-
"pos":
|
|
4043
|
-
"end":
|
|
4053
|
+
"pos": 2454,
|
|
4054
|
+
"end": 2459,
|
|
4044
4055
|
"kind": 80,
|
|
4045
4056
|
"id": 0,
|
|
4046
4057
|
"flags": 16842752,
|
|
@@ -4051,8 +4062,8 @@
|
|
|
4051
4062
|
},
|
|
4052
4063
|
{
|
|
4053
4064
|
"name": {
|
|
4054
|
-
"pos":
|
|
4055
|
-
"end":
|
|
4065
|
+
"pos": 2495,
|
|
4066
|
+
"end": 2502,
|
|
4056
4067
|
"kind": 80,
|
|
4057
4068
|
"id": 0,
|
|
4058
4069
|
"flags": 16842752,
|
|
@@ -4063,8 +4074,8 @@
|
|
|
4063
4074
|
"deprecated": false,
|
|
4064
4075
|
"deprecationMessage": "",
|
|
4065
4076
|
"tagName": {
|
|
4066
|
-
"pos":
|
|
4067
|
-
"end":
|
|
4077
|
+
"pos": 2489,
|
|
4078
|
+
"end": 2494,
|
|
4068
4079
|
"kind": 80,
|
|
4069
4080
|
"id": 0,
|
|
4070
4081
|
"flags": 16842752,
|
|
@@ -4075,8 +4086,8 @@
|
|
|
4075
4086
|
},
|
|
4076
4087
|
{
|
|
4077
4088
|
"tagName": {
|
|
4078
|
-
"pos":
|
|
4079
|
-
"end":
|
|
4089
|
+
"pos": 2549,
|
|
4090
|
+
"end": 2556,
|
|
4080
4091
|
"kind": 80,
|
|
4081
4092
|
"id": 0,
|
|
4082
4093
|
"flags": 16842752,
|
|
@@ -4111,8 +4122,8 @@
|
|
|
4111
4122
|
"jsdoctags": [
|
|
4112
4123
|
{
|
|
4113
4124
|
"name": {
|
|
4114
|
-
"pos":
|
|
4115
|
-
"end":
|
|
4125
|
+
"pos": 1724,
|
|
4126
|
+
"end": 1729,
|
|
4116
4127
|
"kind": 80,
|
|
4117
4128
|
"id": 0,
|
|
4118
4129
|
"flags": 16842752,
|
|
@@ -4123,8 +4134,8 @@
|
|
|
4123
4134
|
"deprecated": false,
|
|
4124
4135
|
"deprecationMessage": "",
|
|
4125
4136
|
"tagName": {
|
|
4126
|
-
"pos":
|
|
4127
|
-
"end":
|
|
4137
|
+
"pos": 1718,
|
|
4138
|
+
"end": 1723,
|
|
4128
4139
|
"kind": 80,
|
|
4129
4140
|
"id": 0,
|
|
4130
4141
|
"flags": 16842752,
|
|
@@ -4135,8 +4146,8 @@
|
|
|
4135
4146
|
},
|
|
4136
4147
|
{
|
|
4137
4148
|
"tagName": {
|
|
4138
|
-
"pos":
|
|
4139
|
-
"end":
|
|
4149
|
+
"pos": 1752,
|
|
4150
|
+
"end": 1759,
|
|
4140
4151
|
"kind": 80,
|
|
4141
4152
|
"id": 0,
|
|
4142
4153
|
"flags": 16842752,
|
|
@@ -4640,12 +4651,12 @@
|
|
|
4640
4651
|
},
|
|
4641
4652
|
{
|
|
4642
4653
|
"name": "EuiLazyService",
|
|
4643
|
-
"id": "class-EuiLazyService-
|
|
4654
|
+
"id": "class-EuiLazyService-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
|
|
4644
4655
|
"file": "packages/base/src/lib/eui-models/eui-service.model.ts",
|
|
4645
4656
|
"deprecated": false,
|
|
4646
4657
|
"deprecationMessage": "",
|
|
4647
4658
|
"type": "class",
|
|
4648
|
-
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected stateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
4659
|
+
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected override stateInstance: T;\n protected override $stateSubs: Subscription;\n protected override $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n override initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
4649
4660
|
"constructorObj": {
|
|
4650
4661
|
"name": "constructor",
|
|
4651
4662
|
"description": "",
|
|
@@ -4688,7 +4699,8 @@
|
|
|
4688
4699
|
"description": "",
|
|
4689
4700
|
"line": 128,
|
|
4690
4701
|
"modifierKind": [
|
|
4691
|
-
124
|
|
4702
|
+
124,
|
|
4703
|
+
164
|
|
4692
4704
|
],
|
|
4693
4705
|
"inheritance": {
|
|
4694
4706
|
"file": "EuiService"
|
|
@@ -4704,7 +4716,8 @@
|
|
|
4704
4716
|
"description": "",
|
|
4705
4717
|
"line": 127,
|
|
4706
4718
|
"modifierKind": [
|
|
4707
|
-
124
|
|
4719
|
+
124,
|
|
4720
|
+
164
|
|
4708
4721
|
],
|
|
4709
4722
|
"inheritance": {
|
|
4710
4723
|
"file": "EuiService"
|
|
@@ -4720,7 +4733,8 @@
|
|
|
4720
4733
|
"description": "",
|
|
4721
4734
|
"line": 126,
|
|
4722
4735
|
"modifierKind": [
|
|
4723
|
-
124
|
|
4736
|
+
124,
|
|
4737
|
+
164
|
|
4724
4738
|
],
|
|
4725
4739
|
"inheritance": {
|
|
4726
4740
|
"file": "EuiService"
|
|
@@ -4775,6 +4789,9 @@
|
|
|
4775
4789
|
"line": 137,
|
|
4776
4790
|
"deprecated": false,
|
|
4777
4791
|
"deprecationMessage": "",
|
|
4792
|
+
"modifierKind": [
|
|
4793
|
+
164
|
|
4794
|
+
],
|
|
4778
4795
|
"jsdoctags": [
|
|
4779
4796
|
{
|
|
4780
4797
|
"name": "storeForLazyLoad",
|
|
@@ -5361,12 +5378,12 @@
|
|
|
5361
5378
|
},
|
|
5362
5379
|
{
|
|
5363
5380
|
"name": "EuiService",
|
|
5364
|
-
"id": "class-EuiService-
|
|
5381
|
+
"id": "class-EuiService-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
|
|
5365
5382
|
"file": "packages/base/src/lib/eui-models/eui-service.model.ts",
|
|
5366
5383
|
"deprecated": false,
|
|
5367
5384
|
"deprecationMessage": "",
|
|
5368
5385
|
"type": "class",
|
|
5369
|
-
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected stateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
5386
|
+
"sourceCode": "import { Observable, Subject, Subscription } from 'rxjs';\nimport { ModuleConfig } from './eui-config/eui-app-config';\nimport { LoadedConfigModules } from './eui-store/state/app.state';\nimport { EuiStoreServiceModel } from './eui-store/eui-store-service.model';\nimport { filter, switchMap } from 'rxjs/operators';\nimport { Selector } from 'reselect';\nimport { CoreState } from './eui-store';\n\nexport interface EuiServiceModel<T> {\n init(t: T): Observable<EuiServiceStatus>;\n\n /**\n * retrieves the State of the service. If you don't pass anything it will retrieve the whole State\n * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If\n * you pass a string that's a key of the Service State type it will retrieve that slice of the state.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getState<K = T>(): Observable<T>;\n getState<K>(mapFn: (state: T) => K): Observable<K>;\n getState<A extends keyof T>(key: A): Observable<T[A]>;\n getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n updateState(t: T): void;\n}\n\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\n\nexport abstract class EuiService<T> implements EuiServiceModel<T> {\n protected stateInstance: T;\n protected prevStateInstance: T;\n protected $stateSubs: Subscription;\n protected $stateLazyLoadSubs: Subscription;\n onStateChange: Subject<T> = new Subject<T>();\n\n protected constructor(defaultState: T) {\n this.stateInstance = defaultState;\n }\n\n initEuiService(): void {\n this.unSubscribe();\n this.$stateSubs = this.getState().subscribe((newState: T) => {\n // set previous state of service\n this.prevStateInstance = this.copy(this.stateInstance);\n // update state before emit event\n this.stateInstance = this.copy(newState);\n // inform about state change\n this.onStateChange.next(newState);\n });\n }\n\n abstract init(t?: T): Observable<EuiServiceStatus>;\n\n abstract getState<K = T>(): Observable<T>;\n abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;\n abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;\n abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;\n\n abstract updateState(t: DeepPartial<T>): void;\n\n protected unSubscribe(): void {\n if (this.$stateSubs && this.$stateSubs.unsubscribe) {\n this.$stateSubs.unsubscribe();\n }\n if (this.$stateLazyLoadSubs && this.$stateLazyLoadSubs.unsubscribe) {\n this.$stateLazyLoadSubs.unsubscribe();\n }\n }\n\n /**\n * deep merge two objects\n * @param target the object that will be merged into\n * @param source the object that will be merged from\n */\n protected deepMerge<T>(target: T, source: DeepPartial<T>): T {\n const output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(key => {\n // Check if source[key] is an object and target[key] is either undefined, null, or an object\n if (this.isObject(source[key])) {\n if (!(key in target) || target[key] === null) {\n // If target[key] doesn't exist or is null, directly assign source[key]\n Object.assign(output, { [key]: structuredClone(source[key]) });\n } else {\n // Only deep merge if target[key] is also an object\n output[key] = this.isObject(target[key])\n ? this.deepMerge(target[key], source[key])\n : structuredClone(source[key]);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n }\n\n /**\n * checks if the given item is an object\n * @param item the item that will be checked\n */\n private isObject(item: unknown): item is object {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n /**\n * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover\n * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify\n * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in\n * the future follow the technique of NGRX with function caching.\n *\n * @param state\n */\n private copy(state: T): T {\n if (typeof state === 'undefined') {\n return undefined;\n }\n return JSON.parse(JSON.stringify(state));\n }\n}\n\nconst getAppLoadedConfigModules: Selector<CoreState, LoadedConfigModules> = (state: CoreState) => state?.app?.loadedConfigModules\n\nexport abstract class EuiLazyService<T> extends EuiService<T> {\n protected override stateInstance: T;\n protected override $stateSubs: Subscription;\n protected override $stateLazyLoadSubs: Subscription;\n\n protected constructor(defaultState: T) {\n super(defaultState);\n }\n\n abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;\n\n // todo it should use abstract store service\n override initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void {\n super.initEuiService();\n\n if (storeForLazyLoad) {\n this.$stateLazyLoadSubs = storeForLazyLoad\n .select(getAppLoadedConfigModules)\n .pipe(\n filter((loadedConfigModules: LoadedConfigModules) =>\n loadedConfigModules?.modulesConfig?.[loadedConfigModules.lastAddedModule] ? true : false,\n ),\n switchMap((loadedConfigModules: LoadedConfigModules) =>\n this.lazyLoadInit(\n loadedConfigModules.modulesConfig[loadedConfigModules.lastAddedModule],\n loadedConfigModules.lastAddedModule,\n ),\n ),\n )\n .subscribe(null);\n }\n }\n}\n\n/**\n * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates\n * whether the service was successful or not. If the service was not successful it will have an error property that\n * contains the error message.\n * @param T the type of the error message\n * @property success a boolean property that indicates whether the service was successful or not\n * @property error an optional property that contains the error message\n */\nexport interface EuiServiceStatus<T = unknown> {\n success: boolean;\n error?: T;\n}\n",
|
|
5370
5387
|
"constructorObj": {
|
|
5371
5388
|
"name": "constructor",
|
|
5372
5389
|
"description": "",
|
|
@@ -6762,12 +6779,12 @@
|
|
|
6762
6779
|
},
|
|
6763
6780
|
{
|
|
6764
6781
|
"name": "LoggerMock",
|
|
6765
|
-
"id": "class-LoggerMock-
|
|
6782
|
+
"id": "class-LoggerMock-b07234d58d09a7b6061cd618fe24cf4c5f23df0461ce3a953abd12d3c2884a8820756cadb7c91f865998293f3b62be33e63cfc96ae50cc0aa707488e19fdd82b",
|
|
6766
6783
|
"file": "packages/base/src/lib/eui-models/log/log.logger.mock.ts",
|
|
6767
6784
|
"deprecated": false,
|
|
6768
6785
|
"deprecationMessage": "",
|
|
6769
6786
|
"type": "class",
|
|
6770
|
-
"sourceCode": "import { Logger } from './log.logger';\n\nexport class LoggerMock extends Logger {\n constructor() {\n super(null, null, null);\n }\n\n getLevel(): null {\n return null;\n }\n\n setLevel(): void {\n /* empty */\n }\n\n fatal(): void {\n /* empty */\n }\n\n error(): void {\n /* empty */\n }\n\n warn(): void {\n /* empty */\n }\n\n info(): void {\n /* empty */\n }\n\n debug(): void {\n /* empty */\n }\n\n trace(): void {\n /* empty */\n }\n\n isDisabled = (): boolean => false;\n isEnabledFor = (): boolean => false;\n isFatalEnabled = (): boolean => false;\n isErrorEnabled = (): boolean => false;\n isWarnEnabled = (): boolean => false;\n isInfoEnabled = (): boolean => false;\n isDebugEnabled = (): boolean => false;\n isTraceEnabled = (): boolean => false;\n isAllEnabled = (): boolean => false;\n}\n",
|
|
6787
|
+
"sourceCode": "import { Logger } from './log.logger';\n\nexport class LoggerMock extends Logger {\n constructor() {\n super(null, null, null);\n }\n\n override getLevel(): null {\n return null;\n }\n\n override setLevel(): void {\n /* empty */\n }\n\n override fatal(): void {\n /* empty */\n }\n\n override error(): void {\n /* empty */\n }\n\n override warn(): void {\n /* empty */\n }\n\n override info(): void {\n /* empty */\n }\n\n override debug(): void {\n /* empty */\n }\n\n override trace(): void {\n /* empty */\n }\n\n override isDisabled = (): boolean => false;\n override isEnabledFor = (): boolean => false;\n override isFatalEnabled = (): boolean => false;\n override isErrorEnabled = (): boolean => false;\n override isWarnEnabled = (): boolean => false;\n override isInfoEnabled = (): boolean => false;\n override isDebugEnabled = (): boolean => false;\n override isTraceEnabled = (): boolean => false;\n override isAllEnabled = (): boolean => false;\n}\n",
|
|
6771
6788
|
"constructorObj": {
|
|
6772
6789
|
"name": "constructor",
|
|
6773
6790
|
"description": "",
|
|
@@ -6789,6 +6806,9 @@
|
|
|
6789
6806
|
"optional": false,
|
|
6790
6807
|
"description": "",
|
|
6791
6808
|
"line": 48,
|
|
6809
|
+
"modifierKind": [
|
|
6810
|
+
164
|
|
6811
|
+
],
|
|
6792
6812
|
"inheritance": {
|
|
6793
6813
|
"file": "Logger"
|
|
6794
6814
|
}
|
|
@@ -6803,6 +6823,9 @@
|
|
|
6803
6823
|
"optional": false,
|
|
6804
6824
|
"description": "",
|
|
6805
6825
|
"line": 46,
|
|
6826
|
+
"modifierKind": [
|
|
6827
|
+
164
|
|
6828
|
+
],
|
|
6806
6829
|
"inheritance": {
|
|
6807
6830
|
"file": "Logger"
|
|
6808
6831
|
}
|
|
@@ -6817,6 +6840,9 @@
|
|
|
6817
6840
|
"optional": false,
|
|
6818
6841
|
"description": "",
|
|
6819
6842
|
"line": 40,
|
|
6843
|
+
"modifierKind": [
|
|
6844
|
+
164
|
|
6845
|
+
],
|
|
6820
6846
|
"inheritance": {
|
|
6821
6847
|
"file": "Logger"
|
|
6822
6848
|
}
|
|
@@ -6831,6 +6857,9 @@
|
|
|
6831
6857
|
"optional": false,
|
|
6832
6858
|
"description": "",
|
|
6833
6859
|
"line": 41,
|
|
6860
|
+
"modifierKind": [
|
|
6861
|
+
164
|
|
6862
|
+
],
|
|
6834
6863
|
"inheritance": {
|
|
6835
6864
|
"file": "Logger"
|
|
6836
6865
|
}
|
|
@@ -6845,6 +6874,9 @@
|
|
|
6845
6874
|
"optional": false,
|
|
6846
6875
|
"description": "",
|
|
6847
6876
|
"line": 43,
|
|
6877
|
+
"modifierKind": [
|
|
6878
|
+
164
|
|
6879
|
+
],
|
|
6848
6880
|
"inheritance": {
|
|
6849
6881
|
"file": "Logger"
|
|
6850
6882
|
}
|
|
@@ -6859,6 +6891,9 @@
|
|
|
6859
6891
|
"optional": false,
|
|
6860
6892
|
"description": "",
|
|
6861
6893
|
"line": 42,
|
|
6894
|
+
"modifierKind": [
|
|
6895
|
+
164
|
|
6896
|
+
],
|
|
6862
6897
|
"inheritance": {
|
|
6863
6898
|
"file": "Logger"
|
|
6864
6899
|
}
|
|
@@ -6873,6 +6908,9 @@
|
|
|
6873
6908
|
"optional": false,
|
|
6874
6909
|
"description": "",
|
|
6875
6910
|
"line": 45,
|
|
6911
|
+
"modifierKind": [
|
|
6912
|
+
164
|
|
6913
|
+
],
|
|
6876
6914
|
"inheritance": {
|
|
6877
6915
|
"file": "Logger"
|
|
6878
6916
|
}
|
|
@@ -6887,6 +6925,9 @@
|
|
|
6887
6925
|
"optional": false,
|
|
6888
6926
|
"description": "",
|
|
6889
6927
|
"line": 47,
|
|
6928
|
+
"modifierKind": [
|
|
6929
|
+
164
|
|
6930
|
+
],
|
|
6890
6931
|
"inheritance": {
|
|
6891
6932
|
"file": "Logger"
|
|
6892
6933
|
}
|
|
@@ -6901,6 +6942,9 @@
|
|
|
6901
6942
|
"optional": false,
|
|
6902
6943
|
"description": "",
|
|
6903
6944
|
"line": 44,
|
|
6945
|
+
"modifierKind": [
|
|
6946
|
+
164
|
|
6947
|
+
],
|
|
6904
6948
|
"inheritance": {
|
|
6905
6949
|
"file": "Logger"
|
|
6906
6950
|
}
|
|
@@ -6916,6 +6960,9 @@
|
|
|
6916
6960
|
"line": 32,
|
|
6917
6961
|
"deprecated": false,
|
|
6918
6962
|
"deprecationMessage": "",
|
|
6963
|
+
"modifierKind": [
|
|
6964
|
+
164
|
|
6965
|
+
],
|
|
6919
6966
|
"inheritance": {
|
|
6920
6967
|
"file": "Logger"
|
|
6921
6968
|
}
|
|
@@ -6929,6 +6976,9 @@
|
|
|
6929
6976
|
"line": 20,
|
|
6930
6977
|
"deprecated": false,
|
|
6931
6978
|
"deprecationMessage": "",
|
|
6979
|
+
"modifierKind": [
|
|
6980
|
+
164
|
|
6981
|
+
],
|
|
6932
6982
|
"inheritance": {
|
|
6933
6983
|
"file": "Logger"
|
|
6934
6984
|
}
|
|
@@ -6942,6 +6992,9 @@
|
|
|
6942
6992
|
"line": 16,
|
|
6943
6993
|
"deprecated": false,
|
|
6944
6994
|
"deprecationMessage": "",
|
|
6995
|
+
"modifierKind": [
|
|
6996
|
+
164
|
|
6997
|
+
],
|
|
6945
6998
|
"inheritance": {
|
|
6946
6999
|
"file": "Logger"
|
|
6947
7000
|
}
|
|
@@ -6954,6 +7007,9 @@
|
|
|
6954
7007
|
"line": 8,
|
|
6955
7008
|
"deprecated": false,
|
|
6956
7009
|
"deprecationMessage": "",
|
|
7010
|
+
"modifierKind": [
|
|
7011
|
+
164
|
|
7012
|
+
],
|
|
6957
7013
|
"inheritance": {
|
|
6958
7014
|
"file": "Logger"
|
|
6959
7015
|
}
|
|
@@ -6967,6 +7023,9 @@
|
|
|
6967
7023
|
"line": 28,
|
|
6968
7024
|
"deprecated": false,
|
|
6969
7025
|
"deprecationMessage": "",
|
|
7026
|
+
"modifierKind": [
|
|
7027
|
+
164
|
|
7028
|
+
],
|
|
6970
7029
|
"inheritance": {
|
|
6971
7030
|
"file": "Logger"
|
|
6972
7031
|
}
|
|
@@ -6980,6 +7039,9 @@
|
|
|
6980
7039
|
"line": 12,
|
|
6981
7040
|
"deprecated": false,
|
|
6982
7041
|
"deprecationMessage": "",
|
|
7042
|
+
"modifierKind": [
|
|
7043
|
+
164
|
|
7044
|
+
],
|
|
6983
7045
|
"inheritance": {
|
|
6984
7046
|
"file": "Logger"
|
|
6985
7047
|
}
|
|
@@ -6993,6 +7055,9 @@
|
|
|
6993
7055
|
"line": 36,
|
|
6994
7056
|
"deprecated": false,
|
|
6995
7057
|
"deprecationMessage": "",
|
|
7058
|
+
"modifierKind": [
|
|
7059
|
+
164
|
|
7060
|
+
],
|
|
6996
7061
|
"inheritance": {
|
|
6997
7062
|
"file": "Logger"
|
|
6998
7063
|
}
|
|
@@ -7006,6 +7071,9 @@
|
|
|
7006
7071
|
"line": 24,
|
|
7007
7072
|
"deprecated": false,
|
|
7008
7073
|
"deprecationMessage": "",
|
|
7074
|
+
"modifierKind": [
|
|
7075
|
+
164
|
|
7076
|
+
],
|
|
7009
7077
|
"inheritance": {
|
|
7010
7078
|
"file": "Logger"
|
|
7011
7079
|
}
|
|
@@ -7149,12 +7217,12 @@
|
|
|
7149
7217
|
},
|
|
7150
7218
|
{
|
|
7151
7219
|
"name": "UrlAppender",
|
|
7152
|
-
"id": "class-UrlAppender-
|
|
7220
|
+
"id": "class-UrlAppender-22bf1f9c046444e4a2f8f56b5ec9e0081a0b641e5afd19186bacc2d36d37f5bcd77dc6dc05e32fab2cd9e1e66e2a4870efb98fc7bf8a1cd840c519b16034bceb",
|
|
7153
7221
|
"file": "packages/base/src/lib/eui-models/log/url.appender.ts",
|
|
7154
7222
|
"deprecated": false,
|
|
7155
7223
|
"deprecationMessage": "",
|
|
7156
7224
|
"type": "class",
|
|
7157
|
-
"sourceCode": "import { Injector } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { LogEvent, LogPosition } from './log.model';\nimport { LogAppender } from './log.appender';\nimport { Logger } from './log.logger';\nimport { UrlAppenderConfig, UrlLogEvent } from '../eui-config';\n\n/**\n * Url Appender\n */\nexport class UrlAppender extends LogAppender<UrlAppenderConfig> {\n protected http: HttpClient;\n\n constructor(public config: UrlAppenderConfig, protected injector: Injector) {\n super(config, injector);\n // set the http client\n this.http = injector && injector.get(HttpClient, null);\n if (!this.http) {\n console.error('UrlAppender needs HttpClient service to be defined as a provider.');\n }\n }\n\n /**\n * Logs an event to a server\n */\n append(event: LogEvent): void {\n // eventual http errors will be caught by the HttpErrorHandlerInterceptor\n if (this.http) {\n this.http.post(this.config.url, this.toUrlEvent(event)).subscribe();\n }\n }\n\n /**\n * Maps a LogEvent into a UrlLogEvent\n */\n protected toUrlEvent(event: LogEvent): UrlLogEvent {\n // check if the urlEventFromLevel allows the mapping to url log event\n const toUrlEvent = this.config.detailedEventFromLevel && Logger.isEnabledFor(this.config.detailedEventFromLevel, event.level);\n // returns the url event or the regular log event\n return toUrlEvent\n ? Object.assign({}, this.filterErrorType(event), {\n position: this.getPosition(),\n location: this.getLocation(),\n })\n : event;\n }\n\n /**\n * returns the code position from where the log has been triggered\n */\n protected getPosition(): LogPosition {\n // create a dummy error, just for the stack trace\n const error = new Error();\n\n try {\n // throw it ...\n throw error;\n } catch (e) {\n // ... and catch it\n try {\n // extract the correct stack line\n let stackLine = error.stack.split('\\n')[3].trim();\n if (stackLine.startsWith('at ')) {\n stackLine = stackLine.substring('at '.length);\n }\n // if the path is specified in parentheses\n if (stackLine.lastIndexOf('(') > 0) {\n stackLine = stackLine.substring(stackLine.lastIndexOf('(') + 1, stackLine.indexOf(')'));\n }\n // strip base path, then parse file, line and column\n const data = stackLine.substring(stackLine.lastIndexOf('/') + 1).split(':');\n // if the data is parsed correctly\n if (data.length === 3) {\n return {\n file: data[0],\n line: +data[1],\n column: +data[2],\n };\n }\n } catch (err) {\n /* empty */\n }\n }\n /* istanbul ignore next */\n return null;\n }\n\n /**\n * returns the url of the current page\n */\n protected getLocation(): string {\n return window && window.location && window.location.href;\n }\n\n /**\n * check messages if object type is Error and make its properties enumerable\n */\n protected filterErrorType(event: LogEvent): LogEvent {\n event.messages = event.messages.map((m) => (m instanceof Error ? Object.getOwnPropertyDescriptors(m) : m));\n return event;\n }\n}\n",
|
|
7225
|
+
"sourceCode": "import { Injector } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { LogEvent, LogPosition } from './log.model';\nimport { LogAppender } from './log.appender';\nimport { Logger } from './log.logger';\nimport { UrlAppenderConfig, UrlLogEvent } from '../eui-config';\n\n/**\n * Url Appender\n */\nexport class UrlAppender extends LogAppender<UrlAppenderConfig> {\n protected http: HttpClient;\n\n constructor(public override config: UrlAppenderConfig, protected override injector: Injector) {\n super(config, injector);\n // set the http client\n this.http = injector && injector.get(HttpClient, null);\n if (!this.http) {\n console.error('UrlAppender needs HttpClient service to be defined as a provider.');\n }\n }\n\n /**\n * Logs an event to a server\n */\n append(event: LogEvent): void {\n // eventual http errors will be caught by the HttpErrorHandlerInterceptor\n if (this.http) {\n this.http.post(this.config.url, this.toUrlEvent(event)).subscribe();\n }\n }\n\n /**\n * Maps a LogEvent into a UrlLogEvent\n */\n protected toUrlEvent(event: LogEvent): UrlLogEvent {\n // check if the urlEventFromLevel allows the mapping to url log event\n const toUrlEvent = this.config.detailedEventFromLevel && Logger.isEnabledFor(this.config.detailedEventFromLevel, event.level);\n // returns the url event or the regular log event\n return toUrlEvent\n ? Object.assign({}, this.filterErrorType(event), {\n position: this.getPosition(),\n location: this.getLocation(),\n })\n : event;\n }\n\n /**\n * returns the code position from where the log has been triggered\n */\n protected getPosition(): LogPosition {\n // create a dummy error, just for the stack trace\n const error = new Error();\n\n try {\n // throw it ...\n throw error;\n } catch (e) {\n // ... and catch it\n try {\n // extract the correct stack line\n let stackLine = error.stack.split('\\n')[3].trim();\n if (stackLine.startsWith('at ')) {\n stackLine = stackLine.substring('at '.length);\n }\n // if the path is specified in parentheses\n if (stackLine.lastIndexOf('(') > 0) {\n stackLine = stackLine.substring(stackLine.lastIndexOf('(') + 1, stackLine.indexOf(')'));\n }\n // strip base path, then parse file, line and column\n const data = stackLine.substring(stackLine.lastIndexOf('/') + 1).split(':');\n // if the data is parsed correctly\n if (data.length === 3) {\n return {\n file: data[0],\n line: +data[1],\n column: +data[2],\n };\n }\n } catch (err) {\n /* empty */\n }\n }\n /* istanbul ignore next */\n return null;\n }\n\n /**\n * returns the url of the current page\n */\n protected getLocation(): string {\n return window && window.location && window.location.href;\n }\n\n /**\n * check messages if object type is Error and make its properties enumerable\n */\n protected filterErrorType(event: LogEvent): LogEvent {\n event.messages = event.messages.map((m) => (m instanceof Error ? Object.getOwnPropertyDescriptors(m) : m));\n return event;\n }\n}\n",
|
|
7158
7226
|
"constructorObj": {
|
|
7159
7227
|
"name": "constructor",
|
|
7160
7228
|
"description": "",
|
|
@@ -7209,7 +7277,8 @@
|
|
|
7209
7277
|
"description": "",
|
|
7210
7278
|
"line": 14,
|
|
7211
7279
|
"modifierKind": [
|
|
7212
|
-
125
|
|
7280
|
+
125,
|
|
7281
|
+
164
|
|
7213
7282
|
]
|
|
7214
7283
|
},
|
|
7215
7284
|
{
|
|
@@ -7464,12 +7533,12 @@
|
|
|
7464
7533
|
},
|
|
7465
7534
|
{
|
|
7466
7535
|
"name": "UxClearErrorFeedbackEvent",
|
|
7467
|
-
"id": "class-UxClearErrorFeedbackEvent-
|
|
7536
|
+
"id": "class-UxClearErrorFeedbackEvent-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
7468
7537
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
7469
7538
|
"deprecated": false,
|
|
7470
7539
|
"deprecationMessage": "",
|
|
7471
7540
|
"type": "class",
|
|
7472
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
7541
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
7473
7542
|
"constructorObj": {
|
|
7474
7543
|
"name": "constructor",
|
|
7475
7544
|
"description": "",
|
|
@@ -7491,7 +7560,7 @@
|
|
|
7491
7560
|
"optional": true
|
|
7492
7561
|
}
|
|
7493
7562
|
],
|
|
7494
|
-
"line":
|
|
7563
|
+
"line": 167,
|
|
7495
7564
|
"jsdoctags": [
|
|
7496
7565
|
{
|
|
7497
7566
|
"name": "id",
|
|
@@ -7526,7 +7595,7 @@
|
|
|
7526
7595
|
"indexKey": "",
|
|
7527
7596
|
"optional": true,
|
|
7528
7597
|
"description": "",
|
|
7529
|
-
"line":
|
|
7598
|
+
"line": 168,
|
|
7530
7599
|
"modifierKind": [
|
|
7531
7600
|
125
|
|
7532
7601
|
]
|
|
@@ -7539,7 +7608,7 @@
|
|
|
7539
7608
|
"indexKey": "",
|
|
7540
7609
|
"optional": true,
|
|
7541
7610
|
"description": "",
|
|
7542
|
-
"line":
|
|
7611
|
+
"line": 168,
|
|
7543
7612
|
"modifierKind": [
|
|
7544
7613
|
125
|
|
7545
7614
|
]
|
|
@@ -7553,12 +7622,12 @@
|
|
|
7553
7622
|
},
|
|
7554
7623
|
{
|
|
7555
7624
|
"name": "UxErrorGroupOnClickEvent",
|
|
7556
|
-
"id": "class-UxErrorGroupOnClickEvent-
|
|
7625
|
+
"id": "class-UxErrorGroupOnClickEvent-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
7557
7626
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
7558
7627
|
"deprecated": false,
|
|
7559
7628
|
"deprecationMessage": "",
|
|
7560
7629
|
"type": "class",
|
|
7561
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
7630
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
7562
7631
|
"constructorObj": {
|
|
7563
7632
|
"name": "constructor",
|
|
7564
7633
|
"description": "",
|
|
@@ -7579,7 +7648,7 @@
|
|
|
7579
7648
|
"optional": true
|
|
7580
7649
|
}
|
|
7581
7650
|
],
|
|
7582
|
-
"line":
|
|
7651
|
+
"line": 65,
|
|
7583
7652
|
"jsdoctags": [
|
|
7584
7653
|
{
|
|
7585
7654
|
"name": "groupId",
|
|
@@ -7613,7 +7682,7 @@
|
|
|
7613
7682
|
"indexKey": "",
|
|
7614
7683
|
"optional": true,
|
|
7615
7684
|
"description": "",
|
|
7616
|
-
"line":
|
|
7685
|
+
"line": 66,
|
|
7617
7686
|
"modifierKind": [
|
|
7618
7687
|
125
|
|
7619
7688
|
]
|
|
@@ -7626,7 +7695,7 @@
|
|
|
7626
7695
|
"indexKey": "",
|
|
7627
7696
|
"optional": false,
|
|
7628
7697
|
"description": "",
|
|
7629
|
-
"line":
|
|
7698
|
+
"line": 66,
|
|
7630
7699
|
"modifierKind": [
|
|
7631
7700
|
125
|
|
7632
7701
|
]
|
|
@@ -7640,12 +7709,12 @@
|
|
|
7640
7709
|
},
|
|
7641
7710
|
{
|
|
7642
7711
|
"name": "UxErrorOutput",
|
|
7643
|
-
"id": "class-UxErrorOutput-
|
|
7712
|
+
"id": "class-UxErrorOutput-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
7644
7713
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
7645
7714
|
"deprecated": false,
|
|
7646
7715
|
"deprecationMessage": "",
|
|
7647
7716
|
"type": "class",
|
|
7648
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
7717
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
7649
7718
|
"constructorObj": {
|
|
7650
7719
|
"name": "constructor",
|
|
7651
7720
|
"description": "",
|
|
@@ -8351,12 +8420,12 @@
|
|
|
8351
8420
|
},
|
|
8352
8421
|
{
|
|
8353
8422
|
"name": "UxPublishErrorFeedbackEvent",
|
|
8354
|
-
"id": "class-UxPublishErrorFeedbackEvent-
|
|
8423
|
+
"id": "class-UxPublishErrorFeedbackEvent-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
8355
8424
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
8356
8425
|
"deprecated": false,
|
|
8357
8426
|
"deprecationMessage": "",
|
|
8358
8427
|
"type": "class",
|
|
8359
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
8428
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
8360
8429
|
"constructorObj": {
|
|
8361
8430
|
"name": "constructor",
|
|
8362
8431
|
"description": "",
|
|
@@ -8391,7 +8460,7 @@
|
|
|
8391
8460
|
"optional": true
|
|
8392
8461
|
}
|
|
8393
8462
|
],
|
|
8394
|
-
"line":
|
|
8463
|
+
"line": 163,
|
|
8395
8464
|
"jsdoctags": [
|
|
8396
8465
|
{
|
|
8397
8466
|
"name": "err",
|
|
@@ -8445,7 +8514,7 @@
|
|
|
8445
8514
|
"indexKey": "",
|
|
8446
8515
|
"optional": true,
|
|
8447
8516
|
"description": "",
|
|
8448
|
-
"line":
|
|
8517
|
+
"line": 164,
|
|
8449
8518
|
"modifierKind": [
|
|
8450
8519
|
125
|
|
8451
8520
|
]
|
|
@@ -8458,7 +8527,7 @@
|
|
|
8458
8527
|
"indexKey": "",
|
|
8459
8528
|
"optional": false,
|
|
8460
8529
|
"description": "",
|
|
8461
|
-
"line":
|
|
8530
|
+
"line": 164,
|
|
8462
8531
|
"modifierKind": [
|
|
8463
8532
|
125
|
|
8464
8533
|
]
|
|
@@ -8471,7 +8540,7 @@
|
|
|
8471
8540
|
"indexKey": "",
|
|
8472
8541
|
"optional": true,
|
|
8473
8542
|
"description": "",
|
|
8474
|
-
"line":
|
|
8543
|
+
"line": 164,
|
|
8475
8544
|
"modifierKind": [
|
|
8476
8545
|
125
|
|
8477
8546
|
]
|
|
@@ -8484,7 +8553,7 @@
|
|
|
8484
8553
|
"indexKey": "",
|
|
8485
8554
|
"optional": true,
|
|
8486
8555
|
"description": "",
|
|
8487
|
-
"line":
|
|
8556
|
+
"line": 164,
|
|
8488
8557
|
"modifierKind": [
|
|
8489
8558
|
125
|
|
8490
8559
|
]
|
|
@@ -8498,12 +8567,12 @@
|
|
|
8498
8567
|
},
|
|
8499
8568
|
{
|
|
8500
8569
|
"name": "UxValidationErrorClass",
|
|
8501
|
-
"id": "class-UxValidationErrorClass-
|
|
8570
|
+
"id": "class-UxValidationErrorClass-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
|
|
8502
8571
|
"file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
|
|
8503
8572
|
"deprecated": false,
|
|
8504
8573
|
"deprecationMessage": "",
|
|
8505
8574
|
"type": "class",
|
|
8506
|
-
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
8575
|
+
"sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\n\nexport class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {\n code?: string;\n requestId?: string;\n doc?: string;\n details?: DETAILS;\n severity = UxMessageSeverity.danger;\n msgId: string;\n description: string;\n errGroupMap?: Array<UxErrorGroupMap>;\n subErrors?: SubErrors;\n\n constructor(\n info: UxErrorInfo & UxHttpErrorInfo,\n errorFeedback: UxErrorFeedback,\n subErrors?: SubErrors,\n errGroupMap?: Array<UxErrorGroupMap>,\n ) {\n if (!subErrors) {\n Object.assign(this, { ...info }, { ...errorFeedback });\n } else {\n Object.assign(this, { ...info }, { ...errorFeedback }, { subErrors }, { errGroupMap });\n }\n }\n\n getFeedBacks(byKey?: string): Array<UxErrorFeedback> {\n if (this.subErrors) {\n return this.subErrors\n .filter((err) => {\n if (err instanceof UxValidationErrorClass) {\n if (byKey && err.attributes) {\n return this.checkAttribute(byKey, err.attributes);\n } else if (byKey && !err.attributes) {\n return false;\n } else if (!byKey) {\n return true;\n }\n }\n return null;\n })\n .map((err) => ({\n msgId: err.msgId,\n description: err.description,\n severity: err.severity,\n attributes: err.attributes,\n errGroupId: err.errGroupId,\n br: err.br,\n doc: err.doc,\n }));\n } else {\n if (!byKey) {\n return [{ msgId: this.msgId, description: this.description, severity: this.severity, doc: this.doc }];\n } else {\n return [];\n }\n }\n }\n\n private checkAttribute(key: string, attributes: UxValidationErrorAttributes): boolean {\n return attributes.some((attr) => key === attr.key);\n }\n}\n\nexport class UxErrorGroupOnClickEvent {\n constructor(public groupId: string, public err?: UxErrorFeedback) {}\n}\n\nexport interface UxErrorFollowMap {\n [groupId: string]: boolean;\n}\n\nexport type UxErrorGroupMap = {\n id: string;\n description: string;\n severity: UxMessageSeverity;\n};\n\nexport type UxErrorGroupItem = {\n groupId: string;\n description: string;\n severity: UxMessageSeverity;\n errors: Array<UxErrorFeedback>;\n};\n\n// T extends U ? X : Y\n// Let's look at the ways to do detailed generic, like error\nexport interface UxErrorInfo<DETAILS = unknown> {\n code?: string;\n doc?: string;\n details?: DETAILS;\n}\n\nexport interface UxHttpErrorInfo {\n requestId?: string;\n}\n\nexport interface UxErrorFeedback extends UxErrorMessage {\n severity?: UxMessageSeverity;\n attributes?: UxValidationErrorAttributes;\n errGroupId?: string;\n br?: string;\n doc?: string;\n}\n\nexport interface UxErrorMessage {\n msgId: string;\n description?: string;\n}\n\nexport type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;\n\nexport interface UxValidationErrorAttribute {\n key: string | Array<string>;\n value: string;\n}\n\nexport enum UxMessageSeverity {\n info = 'info',\n warning = 'warning',\n danger = 'danger',\n success = 'success',\n}\n\nexport enum UxMessageSeverityMetrics {\n info = 0,\n warning = 1,\n danger = 2,\n success = 3,\n}\n\nexport type SubErrors = Array<UxValidationErrorClass>;\n\nexport class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {\n msgId: string;\n description?: string;\n severity = UxMessageSeverity.danger;\n attributes: UxValidationErrorAttributes;\n br?: string;\n doc?: string;\n details?: Details;\n errGroupId?: string;\n\n constructor(data: UxValidationErrorClass) {\n Object.assign(this, data);\n }\n}\n\nexport type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;\n\nexport interface UxHttpErrorResponse extends HttpErrorResponse {\n uxHttpErrorOutput: UxErrorOutput;\n}\n\nexport const transformToUxHttpResponse = (resp: HttpErrorResponse, mapper: ErrorMappingHandler): UxHttpErrorResponse => {\n const updatedErr = resp as UxHttpErrorResponse;\n updatedErr.uxHttpErrorOutput = mapper(resp.error);\n return updatedErr;\n};\n\nexport type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;\n\nexport class UxPublishErrorFeedbackEvent {\n constructor(public err: UxErrorOutput, public id?: string, public groupId?: string, public accumulate?: boolean) {}\n}\n\nexport class UxClearErrorFeedbackEvent {\n constructor(public id?: string, public groupId?: string) {}\n}\n",
|
|
8507
8576
|
"constructorObj": {
|
|
8508
8577
|
"name": "constructor",
|
|
8509
8578
|
"description": "",
|
|
@@ -8517,7 +8586,7 @@
|
|
|
8517
8586
|
"deprecationMessage": ""
|
|
8518
8587
|
}
|
|
8519
8588
|
],
|
|
8520
|
-
"line":
|
|
8589
|
+
"line": 142,
|
|
8521
8590
|
"jsdoctags": [
|
|
8522
8591
|
{
|
|
8523
8592
|
"name": "data",
|
|
@@ -8541,7 +8610,7 @@
|
|
|
8541
8610
|
"indexKey": "",
|
|
8542
8611
|
"optional": false,
|
|
8543
8612
|
"description": "",
|
|
8544
|
-
"line":
|
|
8613
|
+
"line": 138
|
|
8545
8614
|
},
|
|
8546
8615
|
{
|
|
8547
8616
|
"name": "br",
|
|
@@ -8551,7 +8620,7 @@
|
|
|
8551
8620
|
"indexKey": "",
|
|
8552
8621
|
"optional": true,
|
|
8553
8622
|
"description": "",
|
|
8554
|
-
"line":
|
|
8623
|
+
"line": 139
|
|
8555
8624
|
},
|
|
8556
8625
|
{
|
|
8557
8626
|
"name": "description",
|
|
@@ -8561,7 +8630,7 @@
|
|
|
8561
8630
|
"indexKey": "",
|
|
8562
8631
|
"optional": true,
|
|
8563
8632
|
"description": "",
|
|
8564
|
-
"line":
|
|
8633
|
+
"line": 136
|
|
8565
8634
|
},
|
|
8566
8635
|
{
|
|
8567
8636
|
"name": "details",
|
|
@@ -8571,7 +8640,7 @@
|
|
|
8571
8640
|
"indexKey": "",
|
|
8572
8641
|
"optional": true,
|
|
8573
8642
|
"description": "",
|
|
8574
|
-
"line":
|
|
8643
|
+
"line": 141
|
|
8575
8644
|
},
|
|
8576
8645
|
{
|
|
8577
8646
|
"name": "doc",
|
|
@@ -8581,7 +8650,7 @@
|
|
|
8581
8650
|
"indexKey": "",
|
|
8582
8651
|
"optional": true,
|
|
8583
8652
|
"description": "",
|
|
8584
|
-
"line":
|
|
8653
|
+
"line": 140
|
|
8585
8654
|
},
|
|
8586
8655
|
{
|
|
8587
8656
|
"name": "errGroupId",
|
|
@@ -8591,7 +8660,7 @@
|
|
|
8591
8660
|
"indexKey": "",
|
|
8592
8661
|
"optional": true,
|
|
8593
8662
|
"description": "",
|
|
8594
|
-
"line":
|
|
8663
|
+
"line": 142
|
|
8595
8664
|
},
|
|
8596
8665
|
{
|
|
8597
8666
|
"name": "msgId",
|
|
@@ -8601,7 +8670,7 @@
|
|
|
8601
8670
|
"indexKey": "",
|
|
8602
8671
|
"optional": false,
|
|
8603
8672
|
"description": "",
|
|
8604
|
-
"line":
|
|
8673
|
+
"line": 135
|
|
8605
8674
|
},
|
|
8606
8675
|
{
|
|
8607
8676
|
"name": "severity",
|
|
@@ -8612,7 +8681,7 @@
|
|
|
8612
8681
|
"indexKey": "",
|
|
8613
8682
|
"optional": false,
|
|
8614
8683
|
"description": "",
|
|
8615
|
-
"line":
|
|
8684
|
+
"line": 137
|
|
8616
8685
|
}
|
|
8617
8686
|
],
|
|
8618
8687
|
"methods": [],
|