@eui/base 21.3.4-snapshot-1783591367803 → 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.
@@ -17,8 +17,6 @@
17
17
  {
18
18
  "name": "id",
19
19
  "type": "string",
20
- "optional": false,
21
- "dotDotDotToken": false,
22
20
  "deprecated": false,
23
21
  "deprecationMessage": ""
24
22
  }
@@ -166,8 +164,6 @@
166
164
  {
167
165
  "name": "key",
168
166
  "type": "string",
169
- "optional": false,
170
- "dotDotDotToken": false,
171
167
  "deprecated": false,
172
168
  "deprecationMessage": ""
173
169
  }
@@ -771,8 +767,6 @@
771
767
  {
772
768
  "name": "key",
773
769
  "type": "string",
774
- "optional": false,
775
- "dotDotDotToken": false,
776
770
  "deprecated": false,
777
771
  "deprecationMessage": ""
778
772
  }
@@ -921,8 +915,6 @@
921
915
  {
922
916
  "name": "key",
923
917
  "type": "string",
924
- "optional": false,
925
- "dotDotDotToken": false,
926
918
  "deprecated": false,
927
919
  "deprecationMessage": ""
928
920
  }
@@ -976,12 +968,12 @@
976
968
  },
977
969
  {
978
970
  "name": "EuiGrowlMessage",
979
- "id": "interface-EuiGrowlMessage-1554a35aa1955c34859a83f920150f5af5d60b41134fedb25a4920810e7b3291dc15adf71360daef7134ca769b6295f6d9fc3caff12d77d5e34b34bf9695f7be",
971
+ "id": "interface-EuiGrowlMessage-64d3caf5a2a17f021b3e9f80fd655f4fa6e1333bef3486c286ded1e3a1c0dfd2e3933743e5aeb2b8ab17deeae90c783fffff81f542970c3a6e97ee5eb88a07f7",
980
972
  "file": "packages/base/src/lib/eui-models/eui-growl-message.model.ts",
981
973
  "deprecated": false,
982
974
  "deprecationMessage": "",
983
975
  "type": "interface",
984
- "sourceCode": "export interface EuiGrowlMessage {\n severity?: 'success' | 'warning' | 'info' | 'danger' | string;\n summary?: string;\n detail?: string;\n life?: number;\n sticky?: boolean;\n filled?: boolean;\n /**\n * The timeout property is used to define the time in milliseconds before the message is automatically removed from the\n * user interface. This property is only used when the sticky property is set to false.\n */\n timeout?: number;\n}\n",
976
+ "sourceCode": "export interface EuiGrowlMessage {\n severity?: 'success' | 'warning' | 'info' | 'danger' | string;\n summary?: string;\n detail?: string;\n life?: number;\n sticky?: boolean;\n filled?: boolean;\n /**\n * The timeout property is used to define the time in milliseconds before the message is automatically removed from the\n * user interface. This property is only used when the sticky property is set to false.\n */\n timeout?: number;\n /** @internal */\n dismissed?: boolean;\n}\n",
985
977
  "properties": [
986
978
  {
987
979
  "name": "detail",
@@ -1552,12 +1544,12 @@
1552
1544
  },
1553
1545
  {
1554
1546
  "name": "EuiServiceModel",
1555
- "id": "interface-EuiServiceModel-e9132d3f4903942a1ce129a8f89fbc7f234381e7a11e802724aba9a17db912d4e921e6ed31c8b20cfa41a87b2fd7166ff5cb1e4663e5d90353fb929d3b31af98",
1547
+ "id": "interface-EuiServiceModel-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
1556
1548
  "file": "packages/base/src/lib/eui-models/eui-service.model.ts",
1557
1549
  "deprecated": false,
1558
1550
  "deprecationMessage": "",
1559
1551
  "type": "interface",
1560
- "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",
1561
1553
  "properties": [],
1562
1554
  "indexSignatures": [],
1563
1555
  "kind": 174,
@@ -1582,16 +1574,12 @@
1582
1574
  {
1583
1575
  "name": "mapFn",
1584
1576
  "type": "function",
1585
- "optional": false,
1586
- "dotDotDotToken": false,
1587
1577
  "deprecated": false,
1588
1578
  "deprecationMessage": "",
1589
1579
  "function": [
1590
1580
  {
1591
1581
  "name": "state",
1592
1582
  "type": "T",
1593
- "optional": false,
1594
- "dotDotDotToken": false,
1595
1583
  "deprecated": false,
1596
1584
  "deprecationMessage": ""
1597
1585
  }
@@ -1610,16 +1598,12 @@
1610
1598
  {
1611
1599
  "name": "mapFn",
1612
1600
  "type": "function",
1613
- "optional": false,
1614
- "dotDotDotToken": false,
1615
1601
  "deprecated": false,
1616
1602
  "deprecationMessage": "",
1617
1603
  "function": [
1618
1604
  {
1619
1605
  "name": "state",
1620
1606
  "type": "T",
1621
- "optional": false,
1622
- "dotDotDotToken": false,
1623
1607
  "deprecated": false,
1624
1608
  "deprecationMessage": ""
1625
1609
  }
@@ -1636,8 +1620,6 @@
1636
1620
  {
1637
1621
  "name": "key",
1638
1622
  "type": "A",
1639
- "optional": false,
1640
- "dotDotDotToken": false,
1641
1623
  "deprecated": false,
1642
1624
  "deprecationMessage": ""
1643
1625
  }
@@ -1654,8 +1636,6 @@
1654
1636
  {
1655
1637
  "name": "key",
1656
1638
  "type": "A",
1657
- "optional": false,
1658
- "dotDotDotToken": false,
1659
1639
  "deprecated": false,
1660
1640
  "deprecationMessage": "",
1661
1641
  "tagName": {
@@ -1670,10 +1650,9 @@
1670
1650
  {
1671
1651
  "name": "keyOrMapFn",
1672
1652
  "type": "unknown | string",
1673
- "optional": true,
1674
- "dotDotDotToken": false,
1675
1653
  "deprecated": false,
1676
- "deprecationMessage": ""
1654
+ "deprecationMessage": "",
1655
+ "optional": true
1677
1656
  }
1678
1657
  ],
1679
1658
  "optional": false,
@@ -1688,10 +1667,9 @@
1688
1667
  {
1689
1668
  "name": "keyOrMapFn",
1690
1669
  "type": "unknown | string",
1691
- "optional": true,
1692
- "dotDotDotToken": false,
1693
1670
  "deprecated": false,
1694
1671
  "deprecationMessage": "",
1672
+ "optional": true,
1695
1673
  "tagName": {
1696
1674
  "text": "param"
1697
1675
  }
@@ -1704,8 +1682,6 @@
1704
1682
  {
1705
1683
  "name": "t",
1706
1684
  "type": "T",
1707
- "optional": false,
1708
- "dotDotDotToken": false,
1709
1685
  "deprecated": false,
1710
1686
  "deprecationMessage": ""
1711
1687
  }
@@ -1720,8 +1696,6 @@
1720
1696
  {
1721
1697
  "name": "t",
1722
1698
  "type": "T",
1723
- "optional": false,
1724
- "dotDotDotToken": false,
1725
1699
  "deprecated": false,
1726
1700
  "deprecationMessage": "",
1727
1701
  "tagName": {
@@ -1736,8 +1710,6 @@
1736
1710
  {
1737
1711
  "name": "t",
1738
1712
  "type": "T",
1739
- "optional": false,
1740
- "dotDotDotToken": false,
1741
1713
  "deprecated": false,
1742
1714
  "deprecationMessage": ""
1743
1715
  }
@@ -1752,8 +1724,6 @@
1752
1724
  {
1753
1725
  "name": "t",
1754
1726
  "type": "T",
1755
- "optional": false,
1756
- "dotDotDotToken": false,
1757
1727
  "deprecated": false,
1758
1728
  "deprecationMessage": "",
1759
1729
  "tagName": {
@@ -1767,12 +1737,12 @@
1767
1737
  },
1768
1738
  {
1769
1739
  "name": "EuiServiceStatus",
1770
- "id": "interface-EuiServiceStatus-e9132d3f4903942a1ce129a8f89fbc7f234381e7a11e802724aba9a17db912d4e921e6ed31c8b20cfa41a87b2fd7166ff5cb1e4663e5d90353fb929d3b31af98",
1740
+ "id": "interface-EuiServiceStatus-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
1771
1741
  "file": "packages/base/src/lib/eui-models/eui-service.model.ts",
1772
1742
  "deprecated": false,
1773
1743
  "deprecationMessage": "",
1774
1744
  "type": "interface",
1775
- "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",
1776
1746
  "properties": [
1777
1747
  {
1778
1748
  "name": "error",
@@ -1820,16 +1790,12 @@
1820
1790
  {
1821
1791
  "name": "mapFn",
1822
1792
  "type": "function",
1823
- "optional": false,
1824
- "dotDotDotToken": false,
1825
1793
  "deprecated": false,
1826
1794
  "deprecationMessage": "",
1827
1795
  "function": [
1828
1796
  {
1829
1797
  "name": "state",
1830
1798
  "type": "T",
1831
- "optional": false,
1832
- "dotDotDotToken": false,
1833
1799
  "deprecated": false,
1834
1800
  "deprecationMessage": ""
1835
1801
  }
@@ -1848,16 +1814,12 @@
1848
1814
  {
1849
1815
  "name": "mapFn",
1850
1816
  "type": "function",
1851
- "optional": false,
1852
- "dotDotDotToken": false,
1853
1817
  "deprecated": false,
1854
1818
  "deprecationMessage": "",
1855
1819
  "function": [
1856
1820
  {
1857
1821
  "name": "state",
1858
1822
  "type": "T",
1859
- "optional": false,
1860
- "dotDotDotToken": false,
1861
1823
  "deprecated": false,
1862
1824
  "deprecationMessage": ""
1863
1825
  }
@@ -1974,8 +1936,6 @@
1974
1936
  {
1975
1937
  "name": "key",
1976
1938
  "type": "string",
1977
- "optional": false,
1978
- "dotDotDotToken": false,
1979
1939
  "deprecated": false,
1980
1940
  "deprecationMessage": ""
1981
1941
  }
@@ -2055,8 +2015,6 @@
2055
2015
  {
2056
2016
  "name": "key",
2057
2017
  "type": "number",
2058
- "optional": false,
2059
- "dotDotDotToken": false,
2060
2018
  "deprecated": false,
2061
2019
  "deprecationMessage": ""
2062
2020
  }
@@ -2442,8 +2400,6 @@
2442
2400
  {
2443
2401
  "name": "key",
2444
2402
  "type": "string",
2445
- "optional": false,
2446
- "dotDotDotToken": false,
2447
2403
  "deprecated": false,
2448
2404
  "deprecationMessage": ""
2449
2405
  }
@@ -2649,8 +2605,6 @@
2649
2605
  {
2650
2606
  "name": "key",
2651
2607
  "type": "string",
2652
- "optional": false,
2653
- "dotDotDotToken": false,
2654
2608
  "deprecated": false,
2655
2609
  "deprecationMessage": ""
2656
2610
  }
@@ -2684,8 +2638,6 @@
2684
2638
  {
2685
2639
  "name": "module",
2686
2640
  "type": "string",
2687
- "optional": false,
2688
- "dotDotDotToken": false,
2689
2641
  "deprecated": false,
2690
2642
  "deprecationMessage": ""
2691
2643
  }
@@ -3046,8 +2998,6 @@
3046
2998
  {
3047
2999
  "name": "key",
3048
3000
  "type": "string",
3049
- "optional": false,
3050
- "dotDotDotToken": false,
3051
3001
  "deprecated": false,
3052
3002
  "deprecationMessage": ""
3053
3003
  }
@@ -3141,12 +3091,12 @@
3141
3091
  },
3142
3092
  {
3143
3093
  "name": "UxErrorFeedback",
3144
- "id": "interface-UxErrorFeedback-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3094
+ "id": "interface-UxErrorFeedback-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3145
3095
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3146
3096
  "deprecated": false,
3147
3097
  "deprecationMessage": "",
3148
3098
  "type": "interface",
3149
- "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",
3150
3100
  "properties": [
3151
3101
  {
3152
3102
  "name": "attributes",
@@ -3156,7 +3106,7 @@
3156
3106
  "indexKey": "",
3157
3107
  "optional": true,
3158
3108
  "description": "",
3159
- "line": 99
3109
+ "line": 100
3160
3110
  },
3161
3111
  {
3162
3112
  "name": "br",
@@ -3166,7 +3116,7 @@
3166
3116
  "indexKey": "",
3167
3117
  "optional": true,
3168
3118
  "description": "",
3169
- "line": 101
3119
+ "line": 102
3170
3120
  },
3171
3121
  {
3172
3122
  "name": "doc",
@@ -3176,7 +3126,7 @@
3176
3126
  "indexKey": "",
3177
3127
  "optional": true,
3178
3128
  "description": "",
3179
- "line": 102
3129
+ "line": 103
3180
3130
  },
3181
3131
  {
3182
3132
  "name": "errGroupId",
@@ -3186,7 +3136,7 @@
3186
3136
  "indexKey": "",
3187
3137
  "optional": true,
3188
3138
  "description": "",
3189
- "line": 100
3139
+ "line": 101
3190
3140
  },
3191
3141
  {
3192
3142
  "name": "severity",
@@ -3196,7 +3146,7 @@
3196
3146
  "indexKey": "",
3197
3147
  "optional": true,
3198
3148
  "description": "",
3199
- "line": 98
3149
+ "line": 99
3200
3150
  }
3201
3151
  ],
3202
3152
  "indexSignatures": [],
@@ -3208,28 +3158,26 @@
3208
3158
  },
3209
3159
  {
3210
3160
  "name": "UxErrorFollowMap",
3211
- "id": "interface-UxErrorFollowMap-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3161
+ "id": "interface-UxErrorFollowMap-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3212
3162
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3213
3163
  "deprecated": false,
3214
3164
  "deprecationMessage": "",
3215
3165
  "type": "interface",
3216
- "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",
3217
3167
  "properties": [],
3218
3168
  "indexSignatures": [
3219
3169
  {
3220
- "id": "index-declaration-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3170
+ "id": "index-declaration-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3221
3171
  "args": [
3222
3172
  {
3223
3173
  "name": "groupId",
3224
3174
  "type": "string",
3225
- "optional": false,
3226
- "dotDotDotToken": false,
3227
3175
  "deprecated": false,
3228
3176
  "deprecationMessage": ""
3229
3177
  }
3230
3178
  ],
3231
3179
  "returnType": "boolean",
3232
- "line": 68,
3180
+ "line": 69,
3233
3181
  "deprecated": false,
3234
3182
  "deprecationMessage": ""
3235
3183
  }
@@ -3240,12 +3188,12 @@
3240
3188
  },
3241
3189
  {
3242
3190
  "name": "UxErrorInfo",
3243
- "id": "interface-UxErrorInfo-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3191
+ "id": "interface-UxErrorInfo-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3244
3192
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3245
3193
  "deprecated": false,
3246
3194
  "deprecationMessage": "",
3247
3195
  "type": "interface",
3248
- "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",
3249
3197
  "properties": [
3250
3198
  {
3251
3199
  "name": "code",
@@ -3255,7 +3203,7 @@
3255
3203
  "indexKey": "",
3256
3204
  "optional": true,
3257
3205
  "description": "",
3258
- "line": 88
3206
+ "line": 89
3259
3207
  },
3260
3208
  {
3261
3209
  "name": "details",
@@ -3265,7 +3213,7 @@
3265
3213
  "indexKey": "",
3266
3214
  "optional": true,
3267
3215
  "description": "",
3268
- "line": 90
3216
+ "line": 91
3269
3217
  },
3270
3218
  {
3271
3219
  "name": "doc",
@@ -3275,7 +3223,7 @@
3275
3223
  "indexKey": "",
3276
3224
  "optional": true,
3277
3225
  "description": "",
3278
- "line": 89
3226
+ "line": 90
3279
3227
  }
3280
3228
  ],
3281
3229
  "indexSignatures": [],
@@ -3285,12 +3233,12 @@
3285
3233
  },
3286
3234
  {
3287
3235
  "name": "UxErrorMessage",
3288
- "id": "interface-UxErrorMessage-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3236
+ "id": "interface-UxErrorMessage-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3289
3237
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3290
3238
  "deprecated": false,
3291
3239
  "deprecationMessage": "",
3292
3240
  "type": "interface",
3293
- "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",
3294
3242
  "properties": [
3295
3243
  {
3296
3244
  "name": "description",
@@ -3300,7 +3248,7 @@
3300
3248
  "indexKey": "",
3301
3249
  "optional": true,
3302
3250
  "description": "",
3303
- "line": 107
3251
+ "line": 108
3304
3252
  },
3305
3253
  {
3306
3254
  "name": "msgId",
@@ -3310,7 +3258,7 @@
3310
3258
  "indexKey": "",
3311
3259
  "optional": false,
3312
3260
  "description": "",
3313
- "line": 106
3261
+ "line": 107
3314
3262
  }
3315
3263
  ],
3316
3264
  "indexSignatures": [],
@@ -3345,12 +3293,12 @@
3345
3293
  },
3346
3294
  {
3347
3295
  "name": "UxHttpErrorInfo",
3348
- "id": "interface-UxHttpErrorInfo-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3296
+ "id": "interface-UxHttpErrorInfo-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3349
3297
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3350
3298
  "deprecated": false,
3351
3299
  "deprecationMessage": "",
3352
3300
  "type": "interface",
3353
- "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",
3354
3302
  "properties": [
3355
3303
  {
3356
3304
  "name": "requestId",
@@ -3360,7 +3308,7 @@
3360
3308
  "indexKey": "",
3361
3309
  "optional": true,
3362
3310
  "description": "",
3363
- "line": 94
3311
+ "line": 95
3364
3312
  }
3365
3313
  ],
3366
3314
  "indexSignatures": [],
@@ -3370,12 +3318,12 @@
3370
3318
  },
3371
3319
  {
3372
3320
  "name": "UxHttpErrorResponse",
3373
- "id": "interface-UxHttpErrorResponse-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3321
+ "id": "interface-UxHttpErrorResponse-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3374
3322
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3375
3323
  "deprecated": false,
3376
3324
  "deprecationMessage": "",
3377
3325
  "type": "interface",
3378
- "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",
3379
3327
  "properties": [
3380
3328
  {
3381
3329
  "name": "uxHttpErrorOutput",
@@ -3385,7 +3333,7 @@
3385
3333
  "indexKey": "",
3386
3334
  "optional": false,
3387
3335
  "description": "",
3388
- "line": 151
3336
+ "line": 152
3389
3337
  }
3390
3338
  ],
3391
3339
  "indexSignatures": [],
@@ -3442,12 +3390,12 @@
3442
3390
  },
3443
3391
  {
3444
3392
  "name": "UxValidationErrorAttribute",
3445
- "id": "interface-UxValidationErrorAttribute-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
3393
+ "id": "interface-UxValidationErrorAttribute-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
3446
3394
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
3447
3395
  "deprecated": false,
3448
3396
  "deprecationMessage": "",
3449
3397
  "type": "interface",
3450
- "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",
3451
3399
  "properties": [
3452
3400
  {
3453
3401
  "name": "key",
@@ -3457,7 +3405,7 @@
3457
3405
  "indexKey": "",
3458
3406
  "optional": false,
3459
3407
  "description": "",
3460
- "line": 113
3408
+ "line": 114
3461
3409
  },
3462
3410
  {
3463
3411
  "name": "value",
@@ -3467,7 +3415,7 @@
3467
3415
  "indexKey": "",
3468
3416
  "optional": false,
3469
3417
  "description": "",
3470
- "line": 114
3418
+ "line": 115
3471
3419
  }
3472
3420
  ],
3473
3421
  "indexSignatures": [],
@@ -3573,8 +3521,6 @@
3573
3521
  {
3574
3522
  "name": "module",
3575
3523
  "type": "string",
3576
- "optional": false,
3577
- "dotDotDotToken": false,
3578
3524
  "deprecated": false,
3579
3525
  "deprecationMessage": ""
3580
3526
  }
@@ -3700,16 +3646,12 @@
3700
3646
  {
3701
3647
  "name": "templateContent",
3702
3648
  "type": "string",
3703
- "optional": false,
3704
- "dotDotDotToken": false,
3705
3649
  "deprecated": false,
3706
3650
  "deprecationMessage": ""
3707
3651
  },
3708
3652
  {
3709
3653
  "name": "data",
3710
3654
  "type": "any",
3711
- "optional": false,
3712
- "dotDotDotToken": false,
3713
3655
  "deprecated": false,
3714
3656
  "deprecationMessage": ""
3715
3657
  }
@@ -3724,8 +3666,6 @@
3724
3666
  {
3725
3667
  "name": "templateContent",
3726
3668
  "type": "string",
3727
- "optional": false,
3728
- "dotDotDotToken": false,
3729
3669
  "deprecated": false,
3730
3670
  "deprecationMessage": "",
3731
3671
  "tagName": {
@@ -3735,8 +3675,6 @@
3735
3675
  {
3736
3676
  "name": "data",
3737
3677
  "type": "any",
3738
- "optional": false,
3739
- "dotDotDotToken": false,
3740
3678
  "deprecated": false,
3741
3679
  "deprecationMessage": "",
3742
3680
  "tagName": {
@@ -3784,8 +3722,6 @@
3784
3722
  {
3785
3723
  "name": "container",
3786
3724
  "type": "HTMLElement",
3787
- "optional": false,
3788
- "dotDotDotToken": false,
3789
3725
  "deprecated": false,
3790
3726
  "deprecationMessage": ""
3791
3727
  }
@@ -3800,8 +3736,6 @@
3800
3736
  {
3801
3737
  "name": "container",
3802
3738
  "type": "HTMLElement",
3803
- "optional": false,
3804
- "dotDotDotToken": false,
3805
3739
  "deprecated": false,
3806
3740
  "deprecationMessage": "",
3807
3741
  "tagName": {
@@ -3816,16 +3750,12 @@
3816
3750
  {
3817
3751
  "name": "content",
3818
3752
  "type": "string",
3819
- "optional": false,
3820
- "dotDotDotToken": false,
3821
3753
  "deprecated": false,
3822
3754
  "deprecationMessage": ""
3823
3755
  },
3824
3756
  {
3825
3757
  "name": "fileType",
3826
3758
  "type": "string",
3827
- "optional": false,
3828
- "dotDotDotToken": false,
3829
3759
  "deprecated": false,
3830
3760
  "deprecationMessage": ""
3831
3761
  }
@@ -3840,8 +3770,6 @@
3840
3770
  {
3841
3771
  "name": "content",
3842
3772
  "type": "string",
3843
- "optional": false,
3844
- "dotDotDotToken": false,
3845
3773
  "deprecated": false,
3846
3774
  "deprecationMessage": "",
3847
3775
  "tagName": {
@@ -3851,8 +3779,6 @@
3851
3779
  {
3852
3780
  "name": "fileType",
3853
3781
  "type": "string",
3854
- "optional": false,
3855
- "dotDotDotToken": false,
3856
3782
  "deprecated": false,
3857
3783
  "deprecationMessage": "",
3858
3784
  "tagName": {
@@ -3867,16 +3793,12 @@
3867
3793
  {
3868
3794
  "name": "callback",
3869
3795
  "type": "function",
3870
- "optional": false,
3871
- "dotDotDotToken": false,
3872
3796
  "deprecated": false,
3873
3797
  "deprecationMessage": "",
3874
3798
  "function": [
3875
3799
  {
3876
3800
  "name": "value",
3877
3801
  "type": "string",
3878
- "optional": false,
3879
- "dotDotDotToken": false,
3880
3802
  "deprecated": false,
3881
3803
  "deprecationMessage": ""
3882
3804
  }
@@ -3893,16 +3815,12 @@
3893
3815
  {
3894
3816
  "name": "callback",
3895
3817
  "type": "function",
3896
- "optional": false,
3897
- "dotDotDotToken": false,
3898
3818
  "deprecated": false,
3899
3819
  "deprecationMessage": "",
3900
3820
  "function": [
3901
3821
  {
3902
3822
  "name": "value",
3903
3823
  "type": "string",
3904
- "optional": false,
3905
- "dotDotDotToken": false,
3906
3824
  "deprecated": false,
3907
3825
  "deprecationMessage": ""
3908
3826
  }
@@ -3934,8 +3852,6 @@
3934
3852
  {
3935
3853
  "name": "files",
3936
3854
  "type": "any[]",
3937
- "optional": false,
3938
- "dotDotDotToken": false,
3939
3855
  "deprecated": false,
3940
3856
  "deprecationMessage": ""
3941
3857
  }
@@ -3950,8 +3866,6 @@
3950
3866
  {
3951
3867
  "name": "files",
3952
3868
  "type": "any[]",
3953
- "optional": false,
3954
- "dotDotDotToken": false,
3955
3869
  "deprecated": false,
3956
3870
  "deprecationMessage": "",
3957
3871
  "tagName": {
@@ -3975,12 +3889,12 @@
3975
3889
  "classes": [
3976
3890
  {
3977
3891
  "name": "ConsoleAppender",
3978
- "id": "class-ConsoleAppender-9966e57658a6dac3b80cf8dec51f67ac4cc4cadc04d3b1ed21ee7d95dce2d0e93036f357f517f97c890743cb394df515ada337e769078b142c57cfb8e4aed88e",
3892
+ "id": "class-ConsoleAppender-e5779b4182b26ff22a33a2cdd79e982f9d127903cd804dc651a8cadfe25f88400b2079ab651ea1d2d60e3e7d7b20a1b0e29d35a20ba138a10a3f8c5d9b744658",
3979
3893
  "file": "packages/base/src/lib/eui-models/log/console.appender.ts",
3980
3894
  "deprecated": false,
3981
3895
  "deprecationMessage": "",
3982
3896
  "type": "class",
3983
- "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",
3984
3898
  "constructorObj": {
3985
3899
  "name": "constructor",
3986
3900
  "description": "",
@@ -3990,8 +3904,6 @@
3990
3904
  {
3991
3905
  "name": "config",
3992
3906
  "type": "ConsoleAppenderConfig",
3993
- "optional": false,
3994
- "dotDotDotToken": false,
3995
3907
  "deprecated": false,
3996
3908
  "deprecationMessage": "",
3997
3909
  "defaultValue": "{}"
@@ -4002,8 +3914,6 @@
4002
3914
  {
4003
3915
  "name": "config",
4004
3916
  "type": "ConsoleAppenderConfig",
4005
- "optional": false,
4006
- "dotDotDotToken": false,
4007
3917
  "deprecated": false,
4008
3918
  "deprecationMessage": "",
4009
3919
  "defaultValue": "{}",
@@ -4018,6 +3928,7 @@
4018
3928
  "properties": [
4019
3929
  {
4020
3930
  "name": "config",
3931
+ "defaultValue": "{}",
4021
3932
  "deprecated": false,
4022
3933
  "deprecationMessage": "",
4023
3934
  "type": "ConsoleAppenderConfig",
@@ -4026,7 +3937,8 @@
4026
3937
  "description": "",
4027
3938
  "line": 17,
4028
3939
  "modifierKind": [
4029
- 125
3940
+ 125,
3941
+ 164
4030
3942
  ]
4031
3943
  }
4032
3944
  ],
@@ -4039,8 +3951,6 @@
4039
3951
  {
4040
3952
  "name": "event",
4041
3953
  "type": "LogEvent",
4042
- "optional": false,
4043
- "dotDotDotToken": false,
4044
3954
  "deprecated": false,
4045
3955
  "deprecationMessage": ""
4046
3956
  }
@@ -4057,8 +3967,6 @@
4057
3967
  {
4058
3968
  "name": "event",
4059
3969
  "type": "LogEvent",
4060
- "optional": false,
4061
- "dotDotDotToken": false,
4062
3970
  "deprecated": false,
4063
3971
  "deprecationMessage": "",
4064
3972
  "tagName": {
@@ -4076,24 +3984,18 @@
4076
3984
  {
4077
3985
  "name": "str",
4078
3986
  "type": "string",
4079
- "optional": false,
4080
- "dotDotDotToken": false,
4081
3987
  "deprecated": false,
4082
3988
  "deprecationMessage": ""
4083
3989
  },
4084
3990
  {
4085
3991
  "name": "find",
4086
3992
  "type": "string",
4087
- "optional": false,
4088
- "dotDotDotToken": false,
4089
3993
  "deprecated": false,
4090
3994
  "deprecationMessage": ""
4091
3995
  },
4092
3996
  {
4093
3997
  "name": "replace",
4094
3998
  "type": "string",
4095
- "optional": false,
4096
- "dotDotDotToken": false,
4097
3999
  "deprecated": false,
4098
4000
  "deprecationMessage": ""
4099
4001
  }
@@ -4112,8 +4014,8 @@
4112
4014
  "jsdoctags": [
4113
4015
  {
4114
4016
  "name": {
4115
- "pos": 2404,
4116
- "end": 2407,
4017
+ "pos": 2413,
4018
+ "end": 2416,
4117
4019
  "kind": 80,
4118
4020
  "id": 0,
4119
4021
  "flags": 16842752,
@@ -4121,13 +4023,11 @@
4121
4023
  "escapedText": "str"
4122
4024
  },
4123
4025
  "type": "string",
4124
- "optional": false,
4125
- "dotDotDotToken": false,
4126
4026
  "deprecated": false,
4127
4027
  "deprecationMessage": "",
4128
4028
  "tagName": {
4129
- "pos": 2398,
4130
- "end": 2403,
4029
+ "pos": 2407,
4030
+ "end": 2412,
4131
4031
  "kind": 80,
4132
4032
  "id": 0,
4133
4033
  "flags": 16842752,
@@ -4138,8 +4038,8 @@
4138
4038
  },
4139
4039
  {
4140
4040
  "name": {
4141
- "pos": 2451,
4142
- "end": 2455,
4041
+ "pos": 2460,
4042
+ "end": 2464,
4143
4043
  "kind": 80,
4144
4044
  "id": 0,
4145
4045
  "flags": 16842752,
@@ -4147,13 +4047,11 @@
4147
4047
  "escapedText": "find"
4148
4048
  },
4149
4049
  "type": "string",
4150
- "optional": false,
4151
- "dotDotDotToken": false,
4152
4050
  "deprecated": false,
4153
4051
  "deprecationMessage": "",
4154
4052
  "tagName": {
4155
- "pos": 2445,
4156
- "end": 2450,
4053
+ "pos": 2454,
4054
+ "end": 2459,
4157
4055
  "kind": 80,
4158
4056
  "id": 0,
4159
4057
  "flags": 16842752,
@@ -4164,8 +4062,8 @@
4164
4062
  },
4165
4063
  {
4166
4064
  "name": {
4167
- "pos": 2486,
4168
- "end": 2493,
4065
+ "pos": 2495,
4066
+ "end": 2502,
4169
4067
  "kind": 80,
4170
4068
  "id": 0,
4171
4069
  "flags": 16842752,
@@ -4173,13 +4071,11 @@
4173
4071
  "escapedText": "replace"
4174
4072
  },
4175
4073
  "type": "string",
4176
- "optional": false,
4177
- "dotDotDotToken": false,
4178
4074
  "deprecated": false,
4179
4075
  "deprecationMessage": "",
4180
4076
  "tagName": {
4181
- "pos": 2480,
4182
- "end": 2485,
4077
+ "pos": 2489,
4078
+ "end": 2494,
4183
4079
  "kind": 80,
4184
4080
  "id": 0,
4185
4081
  "flags": 16842752,
@@ -4190,8 +4086,8 @@
4190
4086
  },
4191
4087
  {
4192
4088
  "tagName": {
4193
- "pos": 2540,
4194
- "end": 2547,
4089
+ "pos": 2549,
4090
+ "end": 2556,
4195
4091
  "kind": 80,
4196
4092
  "id": 0,
4197
4093
  "flags": 16842752,
@@ -4208,8 +4104,6 @@
4208
4104
  {
4209
4105
  "name": "event",
4210
4106
  "type": "LogEvent",
4211
- "optional": false,
4212
- "dotDotDotToken": false,
4213
4107
  "deprecated": false,
4214
4108
  "deprecationMessage": ""
4215
4109
  }
@@ -4228,8 +4122,8 @@
4228
4122
  "jsdoctags": [
4229
4123
  {
4230
4124
  "name": {
4231
- "pos": 1715,
4232
- "end": 1720,
4125
+ "pos": 1724,
4126
+ "end": 1729,
4233
4127
  "kind": 80,
4234
4128
  "id": 0,
4235
4129
  "flags": 16842752,
@@ -4237,13 +4131,11 @@
4237
4131
  "escapedText": "event"
4238
4132
  },
4239
4133
  "type": "LogEvent",
4240
- "optional": false,
4241
- "dotDotDotToken": false,
4242
4134
  "deprecated": false,
4243
4135
  "deprecationMessage": "",
4244
4136
  "tagName": {
4245
- "pos": 1709,
4246
- "end": 1714,
4137
+ "pos": 1718,
4138
+ "end": 1723,
4247
4139
  "kind": 80,
4248
4140
  "id": 0,
4249
4141
  "flags": 16842752,
@@ -4254,8 +4146,8 @@
4254
4146
  },
4255
4147
  {
4256
4148
  "tagName": {
4257
- "pos": 1743,
4258
- "end": 1750,
4149
+ "pos": 1752,
4150
+ "end": 1759,
4259
4151
  "kind": 80,
4260
4152
  "id": 0,
4261
4153
  "flags": 16842752,
@@ -4321,8 +4213,6 @@
4321
4213
  {
4322
4214
  "name": "array",
4323
4215
  "type": "EuiLanguage[]",
4324
- "optional": false,
4325
- "dotDotDotToken": false,
4326
4216
  "deprecated": false,
4327
4217
  "deprecationMessage": ""
4328
4218
  }
@@ -4350,8 +4240,6 @@
4350
4240
  "escapedText": "array"
4351
4241
  },
4352
4242
  "type": "EuiLanguage[]",
4353
- "optional": false,
4354
- "dotDotDotToken": false,
4355
4243
  "deprecated": false,
4356
4244
  "deprecationMessage": "",
4357
4245
  "tagName": {
@@ -4373,8 +4261,6 @@
4373
4261
  {
4374
4262
  "name": "codes",
4375
4263
  "type": "EuiLanguageCode[]",
4376
- "optional": false,
4377
- "dotDotDotToken": false,
4378
4264
  "deprecated": false,
4379
4265
  "deprecationMessage": ""
4380
4266
  }
@@ -4402,8 +4288,6 @@
4402
4288
  "escapedText": "codes"
4403
4289
  },
4404
4290
  "type": "EuiLanguageCode[]",
4405
- "optional": false,
4406
- "dotDotDotToken": false,
4407
4291
  "deprecated": false,
4408
4292
  "deprecationMessage": "",
4409
4293
  "tagName": {
@@ -4425,8 +4309,6 @@
4425
4309
  {
4426
4310
  "name": "array",
4427
4311
  "type": "EuiLanguage[]",
4428
- "optional": false,
4429
- "dotDotDotToken": false,
4430
4312
  "deprecated": false,
4431
4313
  "deprecationMessage": ""
4432
4314
  }
@@ -4454,8 +4336,6 @@
4454
4336
  "escapedText": "array"
4455
4337
  },
4456
4338
  "type": "EuiLanguage[]",
4457
- "optional": false,
4458
- "dotDotDotToken": false,
4459
4339
  "deprecated": false,
4460
4340
  "deprecationMessage": "",
4461
4341
  "tagName": {
@@ -4477,8 +4357,6 @@
4477
4357
  {
4478
4358
  "name": "codes",
4479
4359
  "type": "string[]",
4480
- "optional": false,
4481
- "dotDotDotToken": false,
4482
4360
  "deprecated": false,
4483
4361
  "deprecationMessage": ""
4484
4362
  }
@@ -4506,8 +4384,6 @@
4506
4384
  "escapedText": "codes"
4507
4385
  },
4508
4386
  "type": "string[]",
4509
- "optional": false,
4510
- "dotDotDotToken": false,
4511
4387
  "deprecated": false,
4512
4388
  "deprecationMessage": "",
4513
4389
  "tagName": {
@@ -4529,8 +4405,6 @@
4529
4405
  {
4530
4406
  "name": "code",
4531
4407
  "type": "string",
4532
- "optional": false,
4533
- "dotDotDotToken": false,
4534
4408
  "deprecated": false,
4535
4409
  "deprecationMessage": ""
4536
4410
  }
@@ -4558,8 +4432,6 @@
4558
4432
  "escapedText": "code"
4559
4433
  },
4560
4434
  "type": "string",
4561
- "optional": false,
4562
- "dotDotDotToken": false,
4563
4435
  "deprecated": false,
4564
4436
  "deprecationMessage": "",
4565
4437
  "tagName": {
@@ -4581,8 +4453,6 @@
4581
4453
  {
4582
4454
  "name": "array",
4583
4455
  "type": "EuiLanguageCode[]",
4584
- "optional": false,
4585
- "dotDotDotToken": false,
4586
4456
  "deprecated": false,
4587
4457
  "deprecationMessage": ""
4588
4458
  }
@@ -4610,8 +4480,6 @@
4610
4480
  "escapedText": "array"
4611
4481
  },
4612
4482
  "type": "EuiLanguageCode[]",
4613
- "optional": false,
4614
- "dotDotDotToken": false,
4615
4483
  "deprecated": false,
4616
4484
  "deprecationMessage": "",
4617
4485
  "tagName": {
@@ -4633,8 +4501,6 @@
4633
4501
  {
4634
4502
  "name": "codes",
4635
4503
  "type": "EuiLanguageCode[]",
4636
- "optional": false,
4637
- "dotDotDotToken": false,
4638
4504
  "deprecated": false,
4639
4505
  "deprecationMessage": "",
4640
4506
  "defaultValue": "Object.keys(this.languages)"
@@ -4663,8 +4529,6 @@
4663
4529
  "escapedText": "codes"
4664
4530
  },
4665
4531
  "type": "EuiLanguageCode[]",
4666
- "optional": false,
4667
- "dotDotDotToken": false,
4668
4532
  "deprecated": false,
4669
4533
  "deprecationMessage": "",
4670
4534
  "defaultValue": "Object.keys(this.languages)",
@@ -4687,8 +4551,6 @@
4687
4551
  {
4688
4552
  "name": "codes",
4689
4553
  "type": "EuiLanguageCode[]",
4690
- "optional": false,
4691
- "dotDotDotToken": false,
4692
4554
  "deprecated": false,
4693
4555
  "deprecationMessage": "",
4694
4556
  "defaultValue": "Object.keys(this.languages)"
@@ -4717,8 +4579,6 @@
4717
4579
  "escapedText": "codes"
4718
4580
  },
4719
4581
  "type": "EuiLanguageCode[]",
4720
- "optional": false,
4721
- "dotDotDotToken": false,
4722
4582
  "deprecated": false,
4723
4583
  "deprecationMessage": "",
4724
4584
  "defaultValue": "Object.keys(this.languages)",
@@ -4741,8 +4601,6 @@
4741
4601
  {
4742
4602
  "name": "code",
4743
4603
  "type": "string",
4744
- "optional": false,
4745
- "dotDotDotToken": false,
4746
4604
  "deprecated": false,
4747
4605
  "deprecationMessage": ""
4748
4606
  }
@@ -4770,8 +4628,6 @@
4770
4628
  "escapedText": "code"
4771
4629
  },
4772
4630
  "type": "string",
4773
- "optional": false,
4774
- "dotDotDotToken": false,
4775
4631
  "deprecated": false,
4776
4632
  "deprecationMessage": "",
4777
4633
  "tagName": {
@@ -4795,12 +4651,12 @@
4795
4651
  },
4796
4652
  {
4797
4653
  "name": "EuiLazyService",
4798
- "id": "class-EuiLazyService-e9132d3f4903942a1ce129a8f89fbc7f234381e7a11e802724aba9a17db912d4e921e6ed31c8b20cfa41a87b2fd7166ff5cb1e4663e5d90353fb929d3b31af98",
4654
+ "id": "class-EuiLazyService-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
4799
4655
  "file": "packages/base/src/lib/eui-models/eui-service.model.ts",
4800
4656
  "deprecated": false,
4801
4657
  "deprecationMessage": "",
4802
4658
  "type": "class",
4803
- "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",
4804
4660
  "constructorObj": {
4805
4661
  "name": "constructor",
4806
4662
  "description": "",
@@ -4810,8 +4666,6 @@
4810
4666
  {
4811
4667
  "name": "defaultState",
4812
4668
  "type": "T",
4813
- "optional": false,
4814
- "dotDotDotToken": false,
4815
4669
  "deprecated": false,
4816
4670
  "deprecationMessage": ""
4817
4671
  }
@@ -4824,8 +4678,6 @@
4824
4678
  {
4825
4679
  "name": "defaultState",
4826
4680
  "type": "T",
4827
- "optional": false,
4828
- "dotDotDotToken": false,
4829
4681
  "deprecated": false,
4830
4682
  "deprecationMessage": "",
4831
4683
  "tagName": {
@@ -4847,7 +4699,8 @@
4847
4699
  "description": "",
4848
4700
  "line": 128,
4849
4701
  "modifierKind": [
4850
- 124
4702
+ 124,
4703
+ 164
4851
4704
  ],
4852
4705
  "inheritance": {
4853
4706
  "file": "EuiService"
@@ -4863,7 +4716,8 @@
4863
4716
  "description": "",
4864
4717
  "line": 127,
4865
4718
  "modifierKind": [
4866
- 124
4719
+ 124,
4720
+ 164
4867
4721
  ],
4868
4722
  "inheritance": {
4869
4723
  "file": "EuiService"
@@ -4879,7 +4733,8 @@
4879
4733
  "description": "",
4880
4734
  "line": 126,
4881
4735
  "modifierKind": [
4882
- 124
4736
+ 124,
4737
+ 164
4883
4738
  ],
4884
4739
  "inheritance": {
4885
4740
  "file": "EuiService"
@@ -4923,10 +4778,9 @@
4923
4778
  {
4924
4779
  "name": "storeForLazyLoad",
4925
4780
  "type": "EuiStoreServiceModel<T>",
4926
- "optional": true,
4927
- "dotDotDotToken": false,
4928
4781
  "deprecated": false,
4929
- "deprecationMessage": ""
4782
+ "deprecationMessage": "",
4783
+ "optional": true
4930
4784
  }
4931
4785
  ],
4932
4786
  "optional": false,
@@ -4935,14 +4789,16 @@
4935
4789
  "line": 137,
4936
4790
  "deprecated": false,
4937
4791
  "deprecationMessage": "",
4792
+ "modifierKind": [
4793
+ 164
4794
+ ],
4938
4795
  "jsdoctags": [
4939
4796
  {
4940
4797
  "name": "storeForLazyLoad",
4941
4798
  "type": "EuiStoreServiceModel<T>",
4942
- "optional": true,
4943
- "dotDotDotToken": false,
4944
4799
  "deprecated": false,
4945
4800
  "deprecationMessage": "",
4801
+ "optional": true,
4946
4802
  "tagName": {
4947
4803
  "text": "param"
4948
4804
  }
@@ -4958,18 +4814,15 @@
4958
4814
  {
4959
4815
  "name": "moduleConfig",
4960
4816
  "type": "ModuleConfig",
4961
- "optional": false,
4962
- "dotDotDotToken": false,
4963
4817
  "deprecated": false,
4964
4818
  "deprecationMessage": ""
4965
4819
  },
4966
4820
  {
4967
4821
  "name": "moduleName",
4968
4822
  "type": "string",
4969
- "optional": true,
4970
- "dotDotDotToken": false,
4971
4823
  "deprecated": false,
4972
- "deprecationMessage": ""
4824
+ "deprecationMessage": "",
4825
+ "optional": true
4973
4826
  }
4974
4827
  ],
4975
4828
  "optional": false,
@@ -4985,8 +4838,6 @@
4985
4838
  {
4986
4839
  "name": "moduleConfig",
4987
4840
  "type": "ModuleConfig",
4988
- "optional": false,
4989
- "dotDotDotToken": false,
4990
4841
  "deprecated": false,
4991
4842
  "deprecationMessage": "",
4992
4843
  "tagName": {
@@ -4996,10 +4847,9 @@
4996
4847
  {
4997
4848
  "name": "moduleName",
4998
4849
  "type": "string",
4999
- "optional": true,
5000
- "dotDotDotToken": false,
5001
4850
  "deprecated": false,
5002
4851
  "deprecationMessage": "",
4852
+ "optional": true,
5003
4853
  "tagName": {
5004
4854
  "text": "param"
5005
4855
  }
@@ -5012,16 +4862,12 @@
5012
4862
  {
5013
4863
  "name": "target",
5014
4864
  "type": "T",
5015
- "optional": false,
5016
- "dotDotDotToken": false,
5017
4865
  "deprecated": false,
5018
4866
  "deprecationMessage": ""
5019
4867
  },
5020
4868
  {
5021
4869
  "name": "source",
5022
4870
  "type": "DeepPartial<T>",
5023
- "optional": false,
5024
- "dotDotDotToken": false,
5025
4871
  "deprecated": false,
5026
4872
  "deprecationMessage": ""
5027
4873
  }
@@ -5051,8 +4897,6 @@
5051
4897
  "escapedText": "target"
5052
4898
  },
5053
4899
  "type": "T",
5054
- "optional": false,
5055
- "dotDotDotToken": false,
5056
4900
  "deprecated": false,
5057
4901
  "deprecationMessage": "",
5058
4902
  "tagName": {
@@ -5077,8 +4921,6 @@
5077
4921
  "escapedText": "source"
5078
4922
  },
5079
4923
  "type": "DeepPartial<T>",
5080
- "optional": false,
5081
- "dotDotDotToken": false,
5082
4924
  "deprecated": false,
5083
4925
  "deprecationMessage": "",
5084
4926
  "tagName": {
@@ -5121,10 +4963,9 @@
5121
4963
  {
5122
4964
  "name": "t",
5123
4965
  "type": "T",
5124
- "optional": true,
5125
- "dotDotDotToken": false,
5126
4966
  "deprecated": false,
5127
- "deprecationMessage": ""
4967
+ "deprecationMessage": "",
4968
+ "optional": true
5128
4969
  }
5129
4970
  ],
5130
4971
  "optional": false,
@@ -5140,10 +4981,9 @@
5140
4981
  {
5141
4982
  "name": "t",
5142
4983
  "type": "T",
5143
- "optional": true,
5144
- "dotDotDotToken": false,
5145
4984
  "deprecated": false,
5146
4985
  "deprecationMessage": "",
4986
+ "optional": true,
5147
4987
  "tagName": {
5148
4988
  "text": "param"
5149
4989
  }
@@ -5175,8 +5015,6 @@
5175
5015
  {
5176
5016
  "name": "t",
5177
5017
  "type": "DeepPartial<T>",
5178
- "optional": false,
5179
- "dotDotDotToken": false,
5180
5018
  "deprecated": false,
5181
5019
  "deprecationMessage": ""
5182
5020
  }
@@ -5194,8 +5032,6 @@
5194
5032
  {
5195
5033
  "name": "t",
5196
5034
  "type": "DeepPartial<T>",
5197
- "optional": false,
5198
- "dotDotDotToken": false,
5199
5035
  "deprecated": false,
5200
5036
  "deprecationMessage": "",
5201
5037
  "tagName": {
@@ -5233,8 +5069,6 @@
5233
5069
  {
5234
5070
  "name": "config",
5235
5071
  "type": "EuiPaginationConfig",
5236
- "optional": false,
5237
- "dotDotDotToken": false,
5238
5072
  "deprecated": false,
5239
5073
  "deprecationMessage": "",
5240
5074
  "defaultValue": "DefaultConfig"
@@ -5253,8 +5087,6 @@
5253
5087
  {
5254
5088
  "name": "config",
5255
5089
  "type": "EuiPaginationConfig",
5256
- "optional": false,
5257
- "dotDotDotToken": false,
5258
5090
  "deprecated": false,
5259
5091
  "deprecationMessage": "",
5260
5092
  "defaultValue": "DefaultConfig",
@@ -5400,8 +5232,6 @@
5400
5232
  {
5401
5233
  "name": "page",
5402
5234
  "type": "number",
5403
- "optional": false,
5404
- "dotDotDotToken": false,
5405
5235
  "deprecated": false,
5406
5236
  "deprecationMessage": ""
5407
5237
  }
@@ -5416,8 +5246,6 @@
5416
5246
  {
5417
5247
  "name": "page",
5418
5248
  "type": "number",
5419
- "optional": false,
5420
- "dotDotDotToken": false,
5421
5249
  "deprecated": false,
5422
5250
  "deprecationMessage": "",
5423
5251
  "tagName": {
@@ -5492,8 +5320,6 @@
5492
5320
  {
5493
5321
  "name": "size",
5494
5322
  "type": "number",
5495
- "optional": false,
5496
- "dotDotDotToken": false,
5497
5323
  "deprecated": false,
5498
5324
  "deprecationMessage": ""
5499
5325
  }
@@ -5508,8 +5334,6 @@
5508
5334
  {
5509
5335
  "name": "size",
5510
5336
  "type": "number",
5511
- "optional": false,
5512
- "dotDotDotToken": false,
5513
5337
  "deprecated": false,
5514
5338
  "deprecationMessage": "",
5515
5339
  "tagName": {
@@ -5524,8 +5348,6 @@
5524
5348
  {
5525
5349
  "name": "size",
5526
5350
  "type": "number",
5527
- "optional": false,
5528
- "dotDotDotToken": false,
5529
5351
  "deprecated": false,
5530
5352
  "deprecationMessage": ""
5531
5353
  }
@@ -5540,8 +5362,6 @@
5540
5362
  {
5541
5363
  "name": "size",
5542
5364
  "type": "number",
5543
- "optional": false,
5544
- "dotDotDotToken": false,
5545
5365
  "deprecated": false,
5546
5366
  "deprecationMessage": "",
5547
5367
  "tagName": {
@@ -5558,12 +5378,12 @@
5558
5378
  },
5559
5379
  {
5560
5380
  "name": "EuiService",
5561
- "id": "class-EuiService-e9132d3f4903942a1ce129a8f89fbc7f234381e7a11e802724aba9a17db912d4e921e6ed31c8b20cfa41a87b2fd7166ff5cb1e4663e5d90353fb929d3b31af98",
5381
+ "id": "class-EuiService-6c072c68250cd88ba317937e0a34489a84c952e84a33e3311d45156434f863e376c7fd001fee45311d599580ff6c530923c9f317b1ddc57c4d569c6d263d9811",
5562
5382
  "file": "packages/base/src/lib/eui-models/eui-service.model.ts",
5563
5383
  "deprecated": false,
5564
5384
  "deprecationMessage": "",
5565
5385
  "type": "class",
5566
- "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",
5567
5387
  "constructorObj": {
5568
5388
  "name": "constructor",
5569
5389
  "description": "",
@@ -5573,8 +5393,6 @@
5573
5393
  {
5574
5394
  "name": "defaultState",
5575
5395
  "type": "T",
5576
- "optional": false,
5577
- "dotDotDotToken": false,
5578
5396
  "deprecated": false,
5579
5397
  "deprecationMessage": ""
5580
5398
  }
@@ -5587,8 +5405,6 @@
5587
5405
  {
5588
5406
  "name": "defaultState",
5589
5407
  "type": "T",
5590
- "optional": false,
5591
- "dotDotDotToken": false,
5592
5408
  "deprecated": false,
5593
5409
  "deprecationMessage": "",
5594
5410
  "tagName": {
@@ -5671,16 +5487,12 @@
5671
5487
  {
5672
5488
  "name": "target",
5673
5489
  "type": "T",
5674
- "optional": false,
5675
- "dotDotDotToken": false,
5676
5490
  "deprecated": false,
5677
5491
  "deprecationMessage": ""
5678
5492
  },
5679
5493
  {
5680
5494
  "name": "source",
5681
5495
  "type": "DeepPartial<T>",
5682
- "optional": false,
5683
- "dotDotDotToken": false,
5684
5496
  "deprecated": false,
5685
5497
  "deprecationMessage": ""
5686
5498
  }
@@ -5710,8 +5522,6 @@
5710
5522
  "escapedText": "target"
5711
5523
  },
5712
5524
  "type": "T",
5713
- "optional": false,
5714
- "dotDotDotToken": false,
5715
5525
  "deprecated": false,
5716
5526
  "deprecationMessage": "",
5717
5527
  "tagName": {
@@ -5736,8 +5546,6 @@
5736
5546
  "escapedText": "source"
5737
5547
  },
5738
5548
  "type": "DeepPartial<T>",
5739
- "optional": false,
5740
- "dotDotDotToken": false,
5741
5549
  "deprecated": false,
5742
5550
  "deprecationMessage": "",
5743
5551
  "tagName": {
@@ -5774,16 +5582,13 @@
5774
5582
  {
5775
5583
  "name": "mapFn",
5776
5584
  "type": "function",
5777
- "optional": true,
5778
- "dotDotDotToken": false,
5779
5585
  "deprecated": false,
5780
5586
  "deprecationMessage": "",
5587
+ "optional": true,
5781
5588
  "function": [
5782
5589
  {
5783
5590
  "name": "state",
5784
5591
  "type": "T",
5785
- "optional": false,
5786
- "dotDotDotToken": false,
5787
5592
  "deprecated": false,
5788
5593
  "deprecationMessage": ""
5789
5594
  }
@@ -5805,16 +5610,13 @@
5805
5610
  {
5806
5611
  "name": "mapFn",
5807
5612
  "type": "function",
5808
- "optional": true,
5809
- "dotDotDotToken": false,
5810
5613
  "deprecated": false,
5811
5614
  "deprecationMessage": "",
5615
+ "optional": true,
5812
5616
  "function": [
5813
5617
  {
5814
5618
  "name": "state",
5815
5619
  "type": "T",
5816
- "optional": false,
5817
- "dotDotDotToken": false,
5818
5620
  "deprecated": false,
5819
5621
  "deprecationMessage": ""
5820
5622
  }
@@ -5831,10 +5633,9 @@
5831
5633
  {
5832
5634
  "name": "key",
5833
5635
  "type": "A",
5834
- "optional": true,
5835
- "dotDotDotToken": false,
5836
5636
  "deprecated": false,
5837
- "deprecationMessage": ""
5637
+ "deprecationMessage": "",
5638
+ "optional": true
5838
5639
  }
5839
5640
  ],
5840
5641
  "optional": false,
@@ -5852,10 +5653,9 @@
5852
5653
  {
5853
5654
  "name": "key",
5854
5655
  "type": "A",
5855
- "optional": true,
5856
- "dotDotDotToken": false,
5857
5656
  "deprecated": false,
5858
5657
  "deprecationMessage": "",
5658
+ "optional": true,
5859
5659
  "tagName": {
5860
5660
  "text": "param"
5861
5661
  }
@@ -5868,10 +5668,9 @@
5868
5668
  {
5869
5669
  "name": "keyOrMapFn",
5870
5670
  "type": "unknown | string",
5871
- "optional": true,
5872
- "dotDotDotToken": false,
5873
5671
  "deprecated": false,
5874
- "deprecationMessage": ""
5672
+ "deprecationMessage": "",
5673
+ "optional": true
5875
5674
  }
5876
5675
  ],
5877
5676
  "optional": false,
@@ -5889,10 +5688,9 @@
5889
5688
  {
5890
5689
  "name": "keyOrMapFn",
5891
5690
  "type": "unknown | string",
5892
- "optional": true,
5893
- "dotDotDotToken": false,
5894
5691
  "deprecated": false,
5895
5692
  "deprecationMessage": "",
5693
+ "optional": true,
5896
5694
  "tagName": {
5897
5695
  "text": "param"
5898
5696
  }
@@ -5905,10 +5703,9 @@
5905
5703
  {
5906
5704
  "name": "t",
5907
5705
  "type": "T",
5908
- "optional": true,
5909
- "dotDotDotToken": false,
5910
5706
  "deprecated": false,
5911
- "deprecationMessage": ""
5707
+ "deprecationMessage": "",
5708
+ "optional": true
5912
5709
  }
5913
5710
  ],
5914
5711
  "optional": false,
@@ -5924,10 +5721,9 @@
5924
5721
  {
5925
5722
  "name": "t",
5926
5723
  "type": "T",
5927
- "optional": true,
5928
- "dotDotDotToken": false,
5929
5724
  "deprecated": false,
5930
5725
  "deprecationMessage": "",
5726
+ "optional": true,
5931
5727
  "tagName": {
5932
5728
  "text": "param"
5933
5729
  }
@@ -5963,8 +5759,6 @@
5963
5759
  {
5964
5760
  "name": "t",
5965
5761
  "type": "DeepPartial<T>",
5966
- "optional": false,
5967
- "dotDotDotToken": false,
5968
5762
  "deprecated": false,
5969
5763
  "deprecationMessage": ""
5970
5764
  }
@@ -5982,8 +5776,6 @@
5982
5776
  {
5983
5777
  "name": "t",
5984
5778
  "type": "DeepPartial<T>",
5985
- "optional": false,
5986
- "dotDotDotToken": false,
5987
5779
  "deprecated": false,
5988
5780
  "deprecationMessage": "",
5989
5781
  "tagName": {
@@ -6018,16 +5810,12 @@
6018
5810
  {
6019
5811
  "name": "config",
6020
5812
  "type": "CFG",
6021
- "optional": false,
6022
- "dotDotDotToken": false,
6023
5813
  "deprecated": false,
6024
5814
  "deprecationMessage": ""
6025
5815
  },
6026
5816
  {
6027
5817
  "name": "injector",
6028
5818
  "type": "Injector",
6029
- "optional": false,
6030
- "dotDotDotToken": false,
6031
5819
  "deprecated": false,
6032
5820
  "deprecationMessage": "",
6033
5821
  "defaultValue": "null"
@@ -6038,8 +5826,6 @@
6038
5826
  {
6039
5827
  "name": "config",
6040
5828
  "type": "CFG",
6041
- "optional": false,
6042
- "dotDotDotToken": false,
6043
5829
  "deprecated": false,
6044
5830
  "deprecationMessage": "",
6045
5831
  "tagName": {
@@ -6049,8 +5835,6 @@
6049
5835
  {
6050
5836
  "name": "injector",
6051
5837
  "type": "Injector",
6052
- "optional": false,
6053
- "dotDotDotToken": false,
6054
5838
  "deprecated": false,
6055
5839
  "deprecationMessage": "",
6056
5840
  "defaultValue": "null",
@@ -6072,8 +5856,6 @@
6072
5856
  {
6073
5857
  "name": "event",
6074
5858
  "type": "LogEvent",
6075
- "optional": false,
6076
- "dotDotDotToken": false,
6077
5859
  "deprecated": false,
6078
5860
  "deprecationMessage": ""
6079
5861
  }
@@ -6101,8 +5883,6 @@
6101
5883
  "escapedText": "event"
6102
5884
  },
6103
5885
  "type": "LogEvent",
6104
- "optional": false,
6105
- "dotDotDotToken": false,
6106
5886
  "deprecated": false,
6107
5887
  "deprecationMessage": "",
6108
5888
  "tagName": {
@@ -6167,24 +5947,18 @@
6167
5947
  {
6168
5948
  "name": "name",
6169
5949
  "type": "string",
6170
- "optional": false,
6171
- "dotDotDotToken": false,
6172
5950
  "deprecated": false,
6173
5951
  "deprecationMessage": ""
6174
5952
  },
6175
5953
  {
6176
5954
  "name": "level",
6177
5955
  "type": "LogLevel",
6178
- "optional": false,
6179
- "dotDotDotToken": false,
6180
5956
  "deprecated": false,
6181
5957
  "deprecationMessage": ""
6182
5958
  },
6183
5959
  {
6184
5960
  "name": "appenders",
6185
5961
  "type": "LogAppender[]",
6186
- "optional": false,
6187
- "dotDotDotToken": false,
6188
5962
  "deprecated": false,
6189
5963
  "deprecationMessage": ""
6190
5964
  }
@@ -6194,8 +5968,6 @@
6194
5968
  {
6195
5969
  "name": "name",
6196
5970
  "type": "string",
6197
- "optional": false,
6198
- "dotDotDotToken": false,
6199
5971
  "deprecated": false,
6200
5972
  "deprecationMessage": "",
6201
5973
  "tagName": {
@@ -6205,8 +5977,6 @@
6205
5977
  {
6206
5978
  "name": "level",
6207
5979
  "type": "LogLevel",
6208
- "optional": false,
6209
- "dotDotDotToken": false,
6210
5980
  "deprecated": false,
6211
5981
  "deprecationMessage": "",
6212
5982
  "tagName": {
@@ -6216,8 +5986,6 @@
6216
5986
  {
6217
5987
  "name": "appenders",
6218
5988
  "type": "LogAppender[]",
6219
- "optional": false,
6220
- "dotDotDotToken": false,
6221
5989
  "deprecated": false,
6222
5990
  "deprecationMessage": "",
6223
5991
  "tagName": {
@@ -6338,18 +6106,15 @@
6338
6106
  {
6339
6107
  "name": "message",
6340
6108
  "type": "M",
6341
- "optional": false,
6342
- "dotDotDotToken": false,
6343
6109
  "deprecated": false,
6344
6110
  "deprecationMessage": ""
6345
6111
  },
6346
6112
  {
6347
6113
  "name": "additionalMessages",
6348
6114
  "type": "A[]",
6349
- "optional": false,
6350
- "dotDotDotToken": true,
6351
6115
  "deprecated": false,
6352
- "deprecationMessage": ""
6116
+ "deprecationMessage": "",
6117
+ "dotDotDotToken": true
6353
6118
  }
6354
6119
  ],
6355
6120
  "optional": false,
@@ -6375,8 +6140,6 @@
6375
6140
  "escapedText": "message"
6376
6141
  },
6377
6142
  "type": "M",
6378
- "optional": false,
6379
- "dotDotDotToken": false,
6380
6143
  "deprecated": false,
6381
6144
  "deprecationMessage": "",
6382
6145
  "tagName": {
@@ -6401,10 +6164,9 @@
6401
6164
  "escapedText": "additionalMessages"
6402
6165
  },
6403
6166
  "type": "A[]",
6404
- "optional": false,
6405
- "dotDotDotToken": true,
6406
6167
  "deprecated": false,
6407
6168
  "deprecationMessage": "",
6169
+ "dotDotDotToken": true,
6408
6170
  "tagName": {
6409
6171
  "pos": 2670,
6410
6172
  "end": 2675,
@@ -6424,18 +6186,15 @@
6424
6186
  {
6425
6187
  "name": "message",
6426
6188
  "type": "M",
6427
- "optional": false,
6428
- "dotDotDotToken": false,
6429
6189
  "deprecated": false,
6430
6190
  "deprecationMessage": ""
6431
6191
  },
6432
6192
  {
6433
6193
  "name": "additionalMessages",
6434
6194
  "type": "A[]",
6435
- "optional": false,
6436
- "dotDotDotToken": true,
6437
6195
  "deprecated": false,
6438
- "deprecationMessage": ""
6196
+ "deprecationMessage": "",
6197
+ "dotDotDotToken": true
6439
6198
  }
6440
6199
  ],
6441
6200
  "optional": false,
@@ -6461,8 +6220,6 @@
6461
6220
  "escapedText": "message"
6462
6221
  },
6463
6222
  "type": "M",
6464
- "optional": false,
6465
- "dotDotDotToken": false,
6466
6223
  "deprecated": false,
6467
6224
  "deprecationMessage": "",
6468
6225
  "tagName": {
@@ -6487,10 +6244,9 @@
6487
6244
  "escapedText": "additionalMessages"
6488
6245
  },
6489
6246
  "type": "A[]",
6490
- "optional": false,
6491
- "dotDotDotToken": true,
6492
6247
  "deprecated": false,
6493
6248
  "deprecationMessage": "",
6249
+ "dotDotDotToken": true,
6494
6250
  "tagName": {
6495
6251
  "pos": 1343,
6496
6252
  "end": 1348,
@@ -6510,18 +6266,15 @@
6510
6266
  {
6511
6267
  "name": "message",
6512
6268
  "type": "T",
6513
- "optional": false,
6514
- "dotDotDotToken": false,
6515
6269
  "deprecated": false,
6516
6270
  "deprecationMessage": ""
6517
6271
  },
6518
6272
  {
6519
6273
  "name": "additionalMessages",
6520
6274
  "type": "S[]",
6521
- "optional": false,
6522
- "dotDotDotToken": true,
6523
6275
  "deprecated": false,
6524
- "deprecationMessage": ""
6276
+ "deprecationMessage": "",
6277
+ "dotDotDotToken": true
6525
6278
  }
6526
6279
  ],
6527
6280
  "optional": false,
@@ -6547,8 +6300,6 @@
6547
6300
  "escapedText": "message"
6548
6301
  },
6549
6302
  "type": "T",
6550
- "optional": false,
6551
- "dotDotDotToken": false,
6552
6303
  "deprecated": false,
6553
6304
  "deprecationMessage": "",
6554
6305
  "tagName": {
@@ -6573,10 +6324,9 @@
6573
6324
  "escapedText": "additionalMessages"
6574
6325
  },
6575
6326
  "type": "S[]",
6576
- "optional": false,
6577
- "dotDotDotToken": true,
6578
6327
  "deprecated": false,
6579
6328
  "deprecationMessage": "",
6329
+ "dotDotDotToken": true,
6580
6330
  "tagName": {
6581
6331
  "pos": 899,
6582
6332
  "end": 904,
@@ -6648,18 +6398,15 @@
6648
6398
  {
6649
6399
  "name": "message",
6650
6400
  "type": "M",
6651
- "optional": false,
6652
- "dotDotDotToken": false,
6653
6401
  "deprecated": false,
6654
6402
  "deprecationMessage": ""
6655
6403
  },
6656
6404
  {
6657
6405
  "name": "additionalMessages",
6658
6406
  "type": "A[]",
6659
- "optional": false,
6660
- "dotDotDotToken": true,
6661
6407
  "deprecated": false,
6662
- "deprecationMessage": ""
6408
+ "deprecationMessage": "",
6409
+ "dotDotDotToken": true
6663
6410
  }
6664
6411
  ],
6665
6412
  "optional": false,
@@ -6685,8 +6432,6 @@
6685
6432
  "escapedText": "message"
6686
6433
  },
6687
6434
  "type": "M",
6688
- "optional": false,
6689
- "dotDotDotToken": false,
6690
6435
  "deprecated": false,
6691
6436
  "deprecationMessage": "",
6692
6437
  "tagName": {
@@ -6711,10 +6456,9 @@
6711
6456
  "escapedText": "additionalMessages"
6712
6457
  },
6713
6458
  "type": "A[]",
6714
- "optional": false,
6715
- "dotDotDotToken": true,
6716
6459
  "deprecated": false,
6717
6460
  "deprecationMessage": "",
6461
+ "dotDotDotToken": true,
6718
6462
  "tagName": {
6719
6463
  "pos": 2229,
6720
6464
  "end": 2234,
@@ -6734,16 +6478,12 @@
6734
6478
  {
6735
6479
  "name": "enabledFromLevel",
6736
6480
  "type": "LogLevel",
6737
- "optional": false,
6738
- "dotDotDotToken": false,
6739
6481
  "deprecated": false,
6740
6482
  "deprecationMessage": ""
6741
6483
  },
6742
6484
  {
6743
6485
  "name": "level",
6744
6486
  "type": "LogLevel",
6745
- "optional": false,
6746
- "dotDotDotToken": false,
6747
6487
  "deprecated": false,
6748
6488
  "deprecationMessage": ""
6749
6489
  }
@@ -6761,8 +6501,6 @@
6761
6501
  {
6762
6502
  "name": "enabledFromLevel",
6763
6503
  "type": "LogLevel",
6764
- "optional": false,
6765
- "dotDotDotToken": false,
6766
6504
  "deprecated": false,
6767
6505
  "deprecationMessage": "",
6768
6506
  "tagName": {
@@ -6772,8 +6510,6 @@
6772
6510
  {
6773
6511
  "name": "level",
6774
6512
  "type": "LogLevel",
6775
- "optional": false,
6776
- "dotDotDotToken": false,
6777
6513
  "deprecated": false,
6778
6514
  "deprecationMessage": "",
6779
6515
  "tagName": {
@@ -6788,8 +6524,6 @@
6788
6524
  {
6789
6525
  "name": "event",
6790
6526
  "type": "LogEvent",
6791
- "optional": false,
6792
- "dotDotDotToken": false,
6793
6527
  "deprecated": false,
6794
6528
  "deprecationMessage": ""
6795
6529
  }
@@ -6817,8 +6551,6 @@
6817
6551
  "escapedText": "event"
6818
6552
  },
6819
6553
  "type": "LogEvent",
6820
- "optional": false,
6821
- "dotDotDotToken": false,
6822
6554
  "deprecated": false,
6823
6555
  "deprecationMessage": "",
6824
6556
  "tagName": {
@@ -6840,8 +6572,6 @@
6840
6572
  {
6841
6573
  "name": "level",
6842
6574
  "type": "LogLevel",
6843
- "optional": false,
6844
- "dotDotDotToken": false,
6845
6575
  "deprecated": false,
6846
6576
  "deprecationMessage": ""
6847
6577
  }
@@ -6866,8 +6596,6 @@
6866
6596
  "escapedText": "level"
6867
6597
  },
6868
6598
  "type": "LogLevel",
6869
- "optional": false,
6870
- "dotDotDotToken": false,
6871
6599
  "deprecated": false,
6872
6600
  "deprecationMessage": "",
6873
6601
  "tagName": {
@@ -6889,18 +6617,15 @@
6889
6617
  {
6890
6618
  "name": "message",
6891
6619
  "type": "M",
6892
- "optional": false,
6893
- "dotDotDotToken": false,
6894
6620
  "deprecated": false,
6895
6621
  "deprecationMessage": ""
6896
6622
  },
6897
6623
  {
6898
6624
  "name": "additionalMessages",
6899
6625
  "type": "A[]",
6900
- "optional": false,
6901
- "dotDotDotToken": true,
6902
6626
  "deprecated": false,
6903
- "deprecationMessage": ""
6627
+ "deprecationMessage": "",
6628
+ "dotDotDotToken": true
6904
6629
  }
6905
6630
  ],
6906
6631
  "optional": false,
@@ -6926,8 +6651,6 @@
6926
6651
  "escapedText": "message"
6927
6652
  },
6928
6653
  "type": "M",
6929
- "optional": false,
6930
- "dotDotDotToken": false,
6931
6654
  "deprecated": false,
6932
6655
  "deprecationMessage": "",
6933
6656
  "tagName": {
@@ -6952,10 +6675,9 @@
6952
6675
  "escapedText": "additionalMessages"
6953
6676
  },
6954
6677
  "type": "A[]",
6955
- "optional": false,
6956
- "dotDotDotToken": true,
6957
6678
  "deprecated": false,
6958
6679
  "deprecationMessage": "",
6680
+ "dotDotDotToken": true,
6959
6681
  "tagName": {
6960
6682
  "pos": 3114,
6961
6683
  "end": 3119,
@@ -6975,18 +6697,15 @@
6975
6697
  {
6976
6698
  "name": "message",
6977
6699
  "type": "M",
6978
- "optional": false,
6979
- "dotDotDotToken": false,
6980
6700
  "deprecated": false,
6981
6701
  "deprecationMessage": ""
6982
6702
  },
6983
6703
  {
6984
6704
  "name": "additionalMessages",
6985
6705
  "type": "A[]",
6986
- "optional": false,
6987
- "dotDotDotToken": true,
6988
6706
  "deprecated": false,
6989
- "deprecationMessage": ""
6707
+ "deprecationMessage": "",
6708
+ "dotDotDotToken": true
6990
6709
  }
6991
6710
  ],
6992
6711
  "optional": false,
@@ -7012,8 +6731,6 @@
7012
6731
  "escapedText": "message"
7013
6732
  },
7014
6733
  "type": "M",
7015
- "optional": false,
7016
- "dotDotDotToken": false,
7017
6734
  "deprecated": false,
7018
6735
  "deprecationMessage": "",
7019
6736
  "tagName": {
@@ -7038,10 +6755,9 @@
7038
6755
  "escapedText": "additionalMessages"
7039
6756
  },
7040
6757
  "type": "A[]",
7041
- "optional": false,
7042
- "dotDotDotToken": true,
7043
6758
  "deprecated": false,
7044
6759
  "deprecationMessage": "",
6760
+ "dotDotDotToken": true,
7045
6761
  "tagName": {
7046
6762
  "pos": 1789,
7047
6763
  "end": 1794,
@@ -7063,12 +6779,12 @@
7063
6779
  },
7064
6780
  {
7065
6781
  "name": "LoggerMock",
7066
- "id": "class-LoggerMock-a327e3b3efe4eecaf3ef20133b1017856847aa4e03369358b35c3b66c566e1bf9369e6209076b05135c32dae261b84cefd25fb6367c20ac8a168e484919d7146",
6782
+ "id": "class-LoggerMock-b07234d58d09a7b6061cd618fe24cf4c5f23df0461ce3a953abd12d3c2884a8820756cadb7c91f865998293f3b62be33e63cfc96ae50cc0aa707488e19fdd82b",
7067
6783
  "file": "packages/base/src/lib/eui-models/log/log.logger.mock.ts",
7068
6784
  "deprecated": false,
7069
6785
  "deprecationMessage": "",
7070
6786
  "type": "class",
7071
- "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",
7072
6788
  "constructorObj": {
7073
6789
  "name": "constructor",
7074
6790
  "description": "",
@@ -7090,6 +6806,9 @@
7090
6806
  "optional": false,
7091
6807
  "description": "",
7092
6808
  "line": 48,
6809
+ "modifierKind": [
6810
+ 164
6811
+ ],
7093
6812
  "inheritance": {
7094
6813
  "file": "Logger"
7095
6814
  }
@@ -7104,6 +6823,9 @@
7104
6823
  "optional": false,
7105
6824
  "description": "",
7106
6825
  "line": 46,
6826
+ "modifierKind": [
6827
+ 164
6828
+ ],
7107
6829
  "inheritance": {
7108
6830
  "file": "Logger"
7109
6831
  }
@@ -7118,6 +6840,9 @@
7118
6840
  "optional": false,
7119
6841
  "description": "",
7120
6842
  "line": 40,
6843
+ "modifierKind": [
6844
+ 164
6845
+ ],
7121
6846
  "inheritance": {
7122
6847
  "file": "Logger"
7123
6848
  }
@@ -7132,6 +6857,9 @@
7132
6857
  "optional": false,
7133
6858
  "description": "",
7134
6859
  "line": 41,
6860
+ "modifierKind": [
6861
+ 164
6862
+ ],
7135
6863
  "inheritance": {
7136
6864
  "file": "Logger"
7137
6865
  }
@@ -7146,6 +6874,9 @@
7146
6874
  "optional": false,
7147
6875
  "description": "",
7148
6876
  "line": 43,
6877
+ "modifierKind": [
6878
+ 164
6879
+ ],
7149
6880
  "inheritance": {
7150
6881
  "file": "Logger"
7151
6882
  }
@@ -7160,6 +6891,9 @@
7160
6891
  "optional": false,
7161
6892
  "description": "",
7162
6893
  "line": 42,
6894
+ "modifierKind": [
6895
+ 164
6896
+ ],
7163
6897
  "inheritance": {
7164
6898
  "file": "Logger"
7165
6899
  }
@@ -7174,6 +6908,9 @@
7174
6908
  "optional": false,
7175
6909
  "description": "",
7176
6910
  "line": 45,
6911
+ "modifierKind": [
6912
+ 164
6913
+ ],
7177
6914
  "inheritance": {
7178
6915
  "file": "Logger"
7179
6916
  }
@@ -7188,6 +6925,9 @@
7188
6925
  "optional": false,
7189
6926
  "description": "",
7190
6927
  "line": 47,
6928
+ "modifierKind": [
6929
+ 164
6930
+ ],
7191
6931
  "inheritance": {
7192
6932
  "file": "Logger"
7193
6933
  }
@@ -7202,6 +6942,9 @@
7202
6942
  "optional": false,
7203
6943
  "description": "",
7204
6944
  "line": 44,
6945
+ "modifierKind": [
6946
+ 164
6947
+ ],
7205
6948
  "inheritance": {
7206
6949
  "file": "Logger"
7207
6950
  }
@@ -7217,6 +6960,9 @@
7217
6960
  "line": 32,
7218
6961
  "deprecated": false,
7219
6962
  "deprecationMessage": "",
6963
+ "modifierKind": [
6964
+ 164
6965
+ ],
7220
6966
  "inheritance": {
7221
6967
  "file": "Logger"
7222
6968
  }
@@ -7230,6 +6976,9 @@
7230
6976
  "line": 20,
7231
6977
  "deprecated": false,
7232
6978
  "deprecationMessage": "",
6979
+ "modifierKind": [
6980
+ 164
6981
+ ],
7233
6982
  "inheritance": {
7234
6983
  "file": "Logger"
7235
6984
  }
@@ -7243,6 +6992,9 @@
7243
6992
  "line": 16,
7244
6993
  "deprecated": false,
7245
6994
  "deprecationMessage": "",
6995
+ "modifierKind": [
6996
+ 164
6997
+ ],
7246
6998
  "inheritance": {
7247
6999
  "file": "Logger"
7248
7000
  }
@@ -7255,6 +7007,9 @@
7255
7007
  "line": 8,
7256
7008
  "deprecated": false,
7257
7009
  "deprecationMessage": "",
7010
+ "modifierKind": [
7011
+ 164
7012
+ ],
7258
7013
  "inheritance": {
7259
7014
  "file": "Logger"
7260
7015
  }
@@ -7268,6 +7023,9 @@
7268
7023
  "line": 28,
7269
7024
  "deprecated": false,
7270
7025
  "deprecationMessage": "",
7026
+ "modifierKind": [
7027
+ 164
7028
+ ],
7271
7029
  "inheritance": {
7272
7030
  "file": "Logger"
7273
7031
  }
@@ -7281,6 +7039,9 @@
7281
7039
  "line": 12,
7282
7040
  "deprecated": false,
7283
7041
  "deprecationMessage": "",
7042
+ "modifierKind": [
7043
+ 164
7044
+ ],
7284
7045
  "inheritance": {
7285
7046
  "file": "Logger"
7286
7047
  }
@@ -7294,6 +7055,9 @@
7294
7055
  "line": 36,
7295
7056
  "deprecated": false,
7296
7057
  "deprecationMessage": "",
7058
+ "modifierKind": [
7059
+ 164
7060
+ ],
7297
7061
  "inheritance": {
7298
7062
  "file": "Logger"
7299
7063
  }
@@ -7307,6 +7071,9 @@
7307
7071
  "line": 24,
7308
7072
  "deprecated": false,
7309
7073
  "deprecationMessage": "",
7074
+ "modifierKind": [
7075
+ 164
7076
+ ],
7310
7077
  "inheritance": {
7311
7078
  "file": "Logger"
7312
7079
  }
@@ -7346,16 +7113,12 @@
7346
7113
  {
7347
7114
  "name": "enabledFromLevel",
7348
7115
  "type": "LogLevel",
7349
- "optional": false,
7350
- "dotDotDotToken": false,
7351
7116
  "deprecated": false,
7352
7117
  "deprecationMessage": ""
7353
7118
  },
7354
7119
  {
7355
7120
  "name": "level",
7356
7121
  "type": "LogLevel",
7357
- "optional": false,
7358
- "dotDotDotToken": false,
7359
7122
  "deprecated": false,
7360
7123
  "deprecationMessage": ""
7361
7124
  }
@@ -7373,8 +7136,6 @@
7373
7136
  {
7374
7137
  "name": "enabledFromLevel",
7375
7138
  "type": "LogLevel",
7376
- "optional": false,
7377
- "dotDotDotToken": false,
7378
7139
  "deprecated": false,
7379
7140
  "deprecationMessage": "",
7380
7141
  "tagName": {
@@ -7384,8 +7145,6 @@
7384
7145
  {
7385
7146
  "name": "level",
7386
7147
  "type": "LogLevel",
7387
- "optional": false,
7388
- "dotDotDotToken": false,
7389
7148
  "deprecated": false,
7390
7149
  "deprecationMessage": "",
7391
7150
  "tagName": {
@@ -7403,8 +7162,6 @@
7403
7162
  {
7404
7163
  "name": "event",
7405
7164
  "type": "LogEvent",
7406
- "optional": false,
7407
- "dotDotDotToken": false,
7408
7165
  "deprecated": false,
7409
7166
  "deprecationMessage": ""
7410
7167
  }
@@ -7432,8 +7189,6 @@
7432
7189
  "escapedText": "event"
7433
7190
  },
7434
7191
  "type": "LogEvent",
7435
- "optional": false,
7436
- "dotDotDotToken": false,
7437
7192
  "deprecated": false,
7438
7193
  "deprecationMessage": "",
7439
7194
  "tagName": {
@@ -7462,12 +7217,12 @@
7462
7217
  },
7463
7218
  {
7464
7219
  "name": "UrlAppender",
7465
- "id": "class-UrlAppender-0bdc618b783f4ea54c12ee5585077820dc14422ec24bfdb3af2a332d8075a7d9847b65aade8b8c4941ff8f42ea08d31e8fe036fb607fc9f1708a481ed36a79d6",
7220
+ "id": "class-UrlAppender-22bf1f9c046444e4a2f8f56b5ec9e0081a0b641e5afd19186bacc2d36d37f5bcd77dc6dc05e32fab2cd9e1e66e2a4870efb98fc7bf8a1cd840c519b16034bceb",
7466
7221
  "file": "packages/base/src/lib/eui-models/log/url.appender.ts",
7467
7222
  "deprecated": false,
7468
7223
  "deprecationMessage": "",
7469
7224
  "type": "class",
7470
- "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",
7471
7226
  "constructorObj": {
7472
7227
  "name": "constructor",
7473
7228
  "description": "",
@@ -7477,16 +7232,12 @@
7477
7232
  {
7478
7233
  "name": "config",
7479
7234
  "type": "UrlAppenderConfig",
7480
- "optional": false,
7481
- "dotDotDotToken": false,
7482
7235
  "deprecated": false,
7483
7236
  "deprecationMessage": ""
7484
7237
  },
7485
7238
  {
7486
7239
  "name": "injector",
7487
7240
  "type": "Injector",
7488
- "optional": false,
7489
- "dotDotDotToken": false,
7490
7241
  "deprecated": false,
7491
7242
  "deprecationMessage": ""
7492
7243
  }
@@ -7496,8 +7247,6 @@
7496
7247
  {
7497
7248
  "name": "config",
7498
7249
  "type": "UrlAppenderConfig",
7499
- "optional": false,
7500
- "dotDotDotToken": false,
7501
7250
  "deprecated": false,
7502
7251
  "deprecationMessage": "",
7503
7252
  "tagName": {
@@ -7507,8 +7256,6 @@
7507
7256
  {
7508
7257
  "name": "injector",
7509
7258
  "type": "Injector",
7510
- "optional": false,
7511
- "dotDotDotToken": false,
7512
7259
  "deprecated": false,
7513
7260
  "deprecationMessage": "",
7514
7261
  "tagName": {
@@ -7530,7 +7277,8 @@
7530
7277
  "description": "",
7531
7278
  "line": 14,
7532
7279
  "modifierKind": [
7533
- 125
7280
+ 125,
7281
+ 164
7534
7282
  ]
7535
7283
  },
7536
7284
  {
@@ -7556,8 +7304,6 @@
7556
7304
  {
7557
7305
  "name": "event",
7558
7306
  "type": "LogEvent",
7559
- "optional": false,
7560
- "dotDotDotToken": false,
7561
7307
  "deprecated": false,
7562
7308
  "deprecationMessage": ""
7563
7309
  }
@@ -7574,8 +7320,6 @@
7574
7320
  {
7575
7321
  "name": "event",
7576
7322
  "type": "LogEvent",
7577
- "optional": false,
7578
- "dotDotDotToken": false,
7579
7323
  "deprecated": false,
7580
7324
  "deprecationMessage": "",
7581
7325
  "tagName": {
@@ -7593,8 +7337,6 @@
7593
7337
  {
7594
7338
  "name": "event",
7595
7339
  "type": "LogEvent",
7596
- "optional": false,
7597
- "dotDotDotToken": false,
7598
7340
  "deprecated": false,
7599
7341
  "deprecationMessage": ""
7600
7342
  }
@@ -7614,8 +7356,6 @@
7614
7356
  {
7615
7357
  "name": "event",
7616
7358
  "type": "LogEvent",
7617
- "optional": false,
7618
- "dotDotDotToken": false,
7619
7359
  "deprecated": false,
7620
7360
  "deprecationMessage": "",
7621
7361
  "tagName": {
@@ -7660,8 +7400,6 @@
7660
7400
  {
7661
7401
  "name": "event",
7662
7402
  "type": "LogEvent",
7663
- "optional": false,
7664
- "dotDotDotToken": false,
7665
7403
  "deprecated": false,
7666
7404
  "deprecationMessage": ""
7667
7405
  }
@@ -7681,8 +7419,6 @@
7681
7419
  {
7682
7420
  "name": "event",
7683
7421
  "type": "LogEvent",
7684
- "optional": false,
7685
- "dotDotDotToken": false,
7686
7422
  "deprecated": false,
7687
7423
  "deprecationMessage": "",
7688
7424
  "tagName": {
@@ -7745,8 +7481,6 @@
7745
7481
  {
7746
7482
  "name": "values",
7747
7483
  "type": "object",
7748
- "optional": false,
7749
- "dotDotDotToken": false,
7750
7484
  "deprecated": false,
7751
7485
  "deprecationMessage": "",
7752
7486
  "defaultValue": "{}"
@@ -7757,8 +7491,6 @@
7757
7491
  {
7758
7492
  "name": "values",
7759
7493
  "type": "object",
7760
- "optional": false,
7761
- "dotDotDotToken": false,
7762
7494
  "deprecated": false,
7763
7495
  "deprecationMessage": "",
7764
7496
  "defaultValue": "{}",
@@ -7801,12 +7533,12 @@
7801
7533
  },
7802
7534
  {
7803
7535
  "name": "UxClearErrorFeedbackEvent",
7804
- "id": "class-UxClearErrorFeedbackEvent-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
7536
+ "id": "class-UxClearErrorFeedbackEvent-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
7805
7537
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
7806
7538
  "deprecated": false,
7807
7539
  "deprecationMessage": "",
7808
7540
  "type": "class",
7809
- "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",
7810
7542
  "constructorObj": {
7811
7543
  "name": "constructor",
7812
7544
  "description": "",
@@ -7816,29 +7548,26 @@
7816
7548
  {
7817
7549
  "name": "id",
7818
7550
  "type": "string",
7819
- "optional": true,
7820
- "dotDotDotToken": false,
7821
7551
  "deprecated": false,
7822
- "deprecationMessage": ""
7552
+ "deprecationMessage": "",
7553
+ "optional": true
7823
7554
  },
7824
7555
  {
7825
7556
  "name": "groupId",
7826
7557
  "type": "string",
7827
- "optional": true,
7828
- "dotDotDotToken": false,
7829
7558
  "deprecated": false,
7830
- "deprecationMessage": ""
7559
+ "deprecationMessage": "",
7560
+ "optional": true
7831
7561
  }
7832
7562
  ],
7833
- "line": 166,
7563
+ "line": 167,
7834
7564
  "jsdoctags": [
7835
7565
  {
7836
7566
  "name": "id",
7837
7567
  "type": "string",
7838
- "optional": true,
7839
- "dotDotDotToken": false,
7840
7568
  "deprecated": false,
7841
7569
  "deprecationMessage": "",
7570
+ "optional": true,
7842
7571
  "tagName": {
7843
7572
  "text": "param"
7844
7573
  }
@@ -7846,10 +7575,9 @@
7846
7575
  {
7847
7576
  "name": "groupId",
7848
7577
  "type": "string",
7849
- "optional": true,
7850
- "dotDotDotToken": false,
7851
7578
  "deprecated": false,
7852
7579
  "deprecationMessage": "",
7580
+ "optional": true,
7853
7581
  "tagName": {
7854
7582
  "text": "param"
7855
7583
  }
@@ -7867,7 +7595,7 @@
7867
7595
  "indexKey": "",
7868
7596
  "optional": true,
7869
7597
  "description": "",
7870
- "line": 167,
7598
+ "line": 168,
7871
7599
  "modifierKind": [
7872
7600
  125
7873
7601
  ]
@@ -7880,7 +7608,7 @@
7880
7608
  "indexKey": "",
7881
7609
  "optional": true,
7882
7610
  "description": "",
7883
- "line": 167,
7611
+ "line": 168,
7884
7612
  "modifierKind": [
7885
7613
  125
7886
7614
  ]
@@ -7894,12 +7622,12 @@
7894
7622
  },
7895
7623
  {
7896
7624
  "name": "UxErrorGroupOnClickEvent",
7897
- "id": "class-UxErrorGroupOnClickEvent-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
7625
+ "id": "class-UxErrorGroupOnClickEvent-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
7898
7626
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
7899
7627
  "deprecated": false,
7900
7628
  "deprecationMessage": "",
7901
7629
  "type": "class",
7902
- "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",
7903
7631
  "constructorObj": {
7904
7632
  "name": "constructor",
7905
7633
  "description": "",
@@ -7909,27 +7637,22 @@
7909
7637
  {
7910
7638
  "name": "groupId",
7911
7639
  "type": "string",
7912
- "optional": false,
7913
- "dotDotDotToken": false,
7914
7640
  "deprecated": false,
7915
7641
  "deprecationMessage": ""
7916
7642
  },
7917
7643
  {
7918
7644
  "name": "err",
7919
7645
  "type": "UxErrorFeedback",
7920
- "optional": true,
7921
- "dotDotDotToken": false,
7922
7646
  "deprecated": false,
7923
- "deprecationMessage": ""
7647
+ "deprecationMessage": "",
7648
+ "optional": true
7924
7649
  }
7925
7650
  ],
7926
- "line": 64,
7651
+ "line": 65,
7927
7652
  "jsdoctags": [
7928
7653
  {
7929
7654
  "name": "groupId",
7930
7655
  "type": "string",
7931
- "optional": false,
7932
- "dotDotDotToken": false,
7933
7656
  "deprecated": false,
7934
7657
  "deprecationMessage": "",
7935
7658
  "tagName": {
@@ -7939,10 +7662,9 @@
7939
7662
  {
7940
7663
  "name": "err",
7941
7664
  "type": "UxErrorFeedback",
7942
- "optional": true,
7943
- "dotDotDotToken": false,
7944
7665
  "deprecated": false,
7945
7666
  "deprecationMessage": "",
7667
+ "optional": true,
7946
7668
  "tagName": {
7947
7669
  "text": "param"
7948
7670
  }
@@ -7960,7 +7682,7 @@
7960
7682
  "indexKey": "",
7961
7683
  "optional": true,
7962
7684
  "description": "",
7963
- "line": 65,
7685
+ "line": 66,
7964
7686
  "modifierKind": [
7965
7687
  125
7966
7688
  ]
@@ -7973,7 +7695,7 @@
7973
7695
  "indexKey": "",
7974
7696
  "optional": false,
7975
7697
  "description": "",
7976
- "line": 65,
7698
+ "line": 66,
7977
7699
  "modifierKind": [
7978
7700
  125
7979
7701
  ]
@@ -7987,12 +7709,12 @@
7987
7709
  },
7988
7710
  {
7989
7711
  "name": "UxErrorOutput",
7990
- "id": "class-UxErrorOutput-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
7712
+ "id": "class-UxErrorOutput-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
7991
7713
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
7992
7714
  "deprecated": false,
7993
7715
  "deprecationMessage": "",
7994
7716
  "type": "class",
7995
- "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",
7996
7718
  "constructorObj": {
7997
7719
  "name": "constructor",
7998
7720
  "description": "",
@@ -8002,34 +7724,28 @@
8002
7724
  {
8003
7725
  "name": "info",
8004
7726
  "type": "unknown",
8005
- "optional": false,
8006
- "dotDotDotToken": false,
8007
7727
  "deprecated": false,
8008
7728
  "deprecationMessage": ""
8009
7729
  },
8010
7730
  {
8011
7731
  "name": "errorFeedback",
8012
7732
  "type": "UxErrorFeedback",
8013
- "optional": false,
8014
- "dotDotDotToken": false,
8015
7733
  "deprecated": false,
8016
7734
  "deprecationMessage": ""
8017
7735
  },
8018
7736
  {
8019
7737
  "name": "subErrors",
8020
7738
  "type": "SubErrors",
8021
- "optional": true,
8022
- "dotDotDotToken": false,
8023
7739
  "deprecated": false,
8024
- "deprecationMessage": ""
7740
+ "deprecationMessage": "",
7741
+ "optional": true
8025
7742
  },
8026
7743
  {
8027
7744
  "name": "errGroupMap",
8028
7745
  "type": "Array<UxErrorGroupMap>",
8029
- "optional": true,
8030
- "dotDotDotToken": false,
8031
7746
  "deprecated": false,
8032
- "deprecationMessage": ""
7747
+ "deprecationMessage": "",
7748
+ "optional": true
8033
7749
  }
8034
7750
  ],
8035
7751
  "line": 12,
@@ -8037,8 +7753,6 @@
8037
7753
  {
8038
7754
  "name": "info",
8039
7755
  "type": "unknown",
8040
- "optional": false,
8041
- "dotDotDotToken": false,
8042
7756
  "deprecated": false,
8043
7757
  "deprecationMessage": "",
8044
7758
  "tagName": {
@@ -8048,8 +7762,6 @@
8048
7762
  {
8049
7763
  "name": "errorFeedback",
8050
7764
  "type": "UxErrorFeedback",
8051
- "optional": false,
8052
- "dotDotDotToken": false,
8053
7765
  "deprecated": false,
8054
7766
  "deprecationMessage": "",
8055
7767
  "tagName": {
@@ -8059,10 +7771,9 @@
8059
7771
  {
8060
7772
  "name": "subErrors",
8061
7773
  "type": "SubErrors",
8062
- "optional": true,
8063
- "dotDotDotToken": false,
8064
7774
  "deprecated": false,
8065
7775
  "deprecationMessage": "",
7776
+ "optional": true,
8066
7777
  "tagName": {
8067
7778
  "text": "param"
8068
7779
  }
@@ -8070,10 +7781,9 @@
8070
7781
  {
8071
7782
  "name": "errGroupMap",
8072
7783
  "type": "Array<UxErrorGroupMap>",
8073
- "optional": true,
8074
- "dotDotDotToken": false,
8075
7784
  "deprecated": false,
8076
7785
  "deprecationMessage": "",
7786
+ "optional": true,
8077
7787
  "tagName": {
8078
7788
  "text": "param"
8079
7789
  }
@@ -8182,10 +7892,9 @@
8182
7892
  {
8183
7893
  "name": "byKey",
8184
7894
  "type": "string",
8185
- "optional": true,
8186
- "dotDotDotToken": false,
8187
7895
  "deprecated": false,
8188
- "deprecationMessage": ""
7896
+ "deprecationMessage": "",
7897
+ "optional": true
8189
7898
  }
8190
7899
  ],
8191
7900
  "optional": false,
@@ -8198,10 +7907,9 @@
8198
7907
  {
8199
7908
  "name": "byKey",
8200
7909
  "type": "string",
8201
- "optional": true,
8202
- "dotDotDotToken": false,
8203
7910
  "deprecated": false,
8204
7911
  "deprecationMessage": "",
7912
+ "optional": true,
8205
7913
  "tagName": {
8206
7914
  "text": "param"
8207
7915
  }
@@ -8236,8 +7944,6 @@
8236
7944
  {
8237
7945
  "name": "values",
8238
7946
  "type": "object",
8239
- "optional": false,
8240
- "dotDotDotToken": false,
8241
7947
  "deprecated": false,
8242
7948
  "deprecationMessage": "",
8243
7949
  "defaultValue": "{}"
@@ -8248,8 +7954,6 @@
8248
7954
  {
8249
7955
  "name": "values",
8250
7956
  "type": "object",
8251
- "optional": false,
8252
- "dotDotDotToken": false,
8253
7957
  "deprecated": false,
8254
7958
  "deprecationMessage": "",
8255
7959
  "defaultValue": "{}",
@@ -8716,12 +8420,12 @@
8716
8420
  },
8717
8421
  {
8718
8422
  "name": "UxPublishErrorFeedbackEvent",
8719
- "id": "class-UxPublishErrorFeedbackEvent-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
8423
+ "id": "class-UxPublishErrorFeedbackEvent-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
8720
8424
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
8721
8425
  "deprecated": false,
8722
8426
  "deprecationMessage": "",
8723
8427
  "type": "class",
8724
- "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",
8725
8429
  "constructorObj": {
8726
8430
  "name": "constructor",
8727
8431
  "description": "",
@@ -8731,43 +8435,36 @@
8731
8435
  {
8732
8436
  "name": "err",
8733
8437
  "type": "UxErrorOutput",
8734
- "optional": false,
8735
- "dotDotDotToken": false,
8736
8438
  "deprecated": false,
8737
8439
  "deprecationMessage": ""
8738
8440
  },
8739
8441
  {
8740
8442
  "name": "id",
8741
8443
  "type": "string",
8742
- "optional": true,
8743
- "dotDotDotToken": false,
8744
8444
  "deprecated": false,
8745
- "deprecationMessage": ""
8445
+ "deprecationMessage": "",
8446
+ "optional": true
8746
8447
  },
8747
8448
  {
8748
8449
  "name": "groupId",
8749
8450
  "type": "string",
8750
- "optional": true,
8751
- "dotDotDotToken": false,
8752
8451
  "deprecated": false,
8753
- "deprecationMessage": ""
8452
+ "deprecationMessage": "",
8453
+ "optional": true
8754
8454
  },
8755
8455
  {
8756
8456
  "name": "accumulate",
8757
8457
  "type": "boolean",
8758
- "optional": true,
8759
- "dotDotDotToken": false,
8760
8458
  "deprecated": false,
8761
- "deprecationMessage": ""
8459
+ "deprecationMessage": "",
8460
+ "optional": true
8762
8461
  }
8763
8462
  ],
8764
- "line": 162,
8463
+ "line": 163,
8765
8464
  "jsdoctags": [
8766
8465
  {
8767
8466
  "name": "err",
8768
8467
  "type": "UxErrorOutput",
8769
- "optional": false,
8770
- "dotDotDotToken": false,
8771
8468
  "deprecated": false,
8772
8469
  "deprecationMessage": "",
8773
8470
  "tagName": {
@@ -8777,10 +8474,9 @@
8777
8474
  {
8778
8475
  "name": "id",
8779
8476
  "type": "string",
8780
- "optional": true,
8781
- "dotDotDotToken": false,
8782
8477
  "deprecated": false,
8783
8478
  "deprecationMessage": "",
8479
+ "optional": true,
8784
8480
  "tagName": {
8785
8481
  "text": "param"
8786
8482
  }
@@ -8788,10 +8484,9 @@
8788
8484
  {
8789
8485
  "name": "groupId",
8790
8486
  "type": "string",
8791
- "optional": true,
8792
- "dotDotDotToken": false,
8793
8487
  "deprecated": false,
8794
8488
  "deprecationMessage": "",
8489
+ "optional": true,
8795
8490
  "tagName": {
8796
8491
  "text": "param"
8797
8492
  }
@@ -8799,10 +8494,9 @@
8799
8494
  {
8800
8495
  "name": "accumulate",
8801
8496
  "type": "boolean",
8802
- "optional": true,
8803
- "dotDotDotToken": false,
8804
8497
  "deprecated": false,
8805
8498
  "deprecationMessage": "",
8499
+ "optional": true,
8806
8500
  "tagName": {
8807
8501
  "text": "param"
8808
8502
  }
@@ -8820,7 +8514,7 @@
8820
8514
  "indexKey": "",
8821
8515
  "optional": true,
8822
8516
  "description": "",
8823
- "line": 163,
8517
+ "line": 164,
8824
8518
  "modifierKind": [
8825
8519
  125
8826
8520
  ]
@@ -8833,7 +8527,7 @@
8833
8527
  "indexKey": "",
8834
8528
  "optional": false,
8835
8529
  "description": "",
8836
- "line": 163,
8530
+ "line": 164,
8837
8531
  "modifierKind": [
8838
8532
  125
8839
8533
  ]
@@ -8846,7 +8540,7 @@
8846
8540
  "indexKey": "",
8847
8541
  "optional": true,
8848
8542
  "description": "",
8849
- "line": 163,
8543
+ "line": 164,
8850
8544
  "modifierKind": [
8851
8545
  125
8852
8546
  ]
@@ -8859,7 +8553,7 @@
8859
8553
  "indexKey": "",
8860
8554
  "optional": true,
8861
8555
  "description": "",
8862
- "line": 163,
8556
+ "line": 164,
8863
8557
  "modifierKind": [
8864
8558
  125
8865
8559
  ]
@@ -8873,12 +8567,12 @@
8873
8567
  },
8874
8568
  {
8875
8569
  "name": "UxValidationErrorClass",
8876
- "id": "class-UxValidationErrorClass-a68197a3eaa39d4b7bb6fef00903f2119f42138c29c0ec23b6c68702b2d23284d5446044739ac12cde95ab18110221f5be7aa9977534a363d1f68b3eff489d99",
8570
+ "id": "class-UxValidationErrorClass-a5db7b78f6d67f8705c73d2a4706b59f8663f863256bf761780a8b388bc1b8ce0e7381ed68537e922ec0f02845f46f1c05dc63c8d6d7dcc04fd59099dce5b7d4",
8877
8571
  "file": "packages/base/src/lib/ux-models/ux-error-feedback.model.ts",
8878
8572
  "deprecated": false,
8879
8573
  "deprecationMessage": "",
8880
8574
  "type": "class",
8881
- "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",
8882
8576
  "constructorObj": {
8883
8577
  "name": "constructor",
8884
8578
  "description": "",
@@ -8888,19 +8582,15 @@
8888
8582
  {
8889
8583
  "name": "data",
8890
8584
  "type": "UxValidationErrorClass",
8891
- "optional": false,
8892
- "dotDotDotToken": false,
8893
8585
  "deprecated": false,
8894
8586
  "deprecationMessage": ""
8895
8587
  }
8896
8588
  ],
8897
- "line": 141,
8589
+ "line": 142,
8898
8590
  "jsdoctags": [
8899
8591
  {
8900
8592
  "name": "data",
8901
8593
  "type": "UxValidationErrorClass",
8902
- "optional": false,
8903
- "dotDotDotToken": false,
8904
8594
  "deprecated": false,
8905
8595
  "deprecationMessage": "",
8906
8596
  "tagName": {
@@ -8920,7 +8610,7 @@
8920
8610
  "indexKey": "",
8921
8611
  "optional": false,
8922
8612
  "description": "",
8923
- "line": 137
8613
+ "line": 138
8924
8614
  },
8925
8615
  {
8926
8616
  "name": "br",
@@ -8930,7 +8620,7 @@
8930
8620
  "indexKey": "",
8931
8621
  "optional": true,
8932
8622
  "description": "",
8933
- "line": 138
8623
+ "line": 139
8934
8624
  },
8935
8625
  {
8936
8626
  "name": "description",
@@ -8940,7 +8630,7 @@
8940
8630
  "indexKey": "",
8941
8631
  "optional": true,
8942
8632
  "description": "",
8943
- "line": 135
8633
+ "line": 136
8944
8634
  },
8945
8635
  {
8946
8636
  "name": "details",
@@ -8950,7 +8640,7 @@
8950
8640
  "indexKey": "",
8951
8641
  "optional": true,
8952
8642
  "description": "",
8953
- "line": 140
8643
+ "line": 141
8954
8644
  },
8955
8645
  {
8956
8646
  "name": "doc",
@@ -8960,7 +8650,7 @@
8960
8650
  "indexKey": "",
8961
8651
  "optional": true,
8962
8652
  "description": "",
8963
- "line": 139
8653
+ "line": 140
8964
8654
  },
8965
8655
  {
8966
8656
  "name": "errGroupId",
@@ -8970,7 +8660,7 @@
8970
8660
  "indexKey": "",
8971
8661
  "optional": true,
8972
8662
  "description": "",
8973
- "line": 141
8663
+ "line": 142
8974
8664
  },
8975
8665
  {
8976
8666
  "name": "msgId",
@@ -8980,7 +8670,7 @@
8980
8670
  "indexKey": "",
8981
8671
  "optional": false,
8982
8672
  "description": "",
8983
- "line": 134
8673
+ "line": 135
8984
8674
  },
8985
8675
  {
8986
8676
  "name": "severity",
@@ -8991,7 +8681,7 @@
8991
8681
  "indexKey": "",
8992
8682
  "optional": false,
8993
8683
  "description": "",
8994
- "line": 136
8684
+ "line": 137
8995
8685
  }
8996
8686
  ],
8997
8687
  "methods": [],
@@ -9217,8 +8907,6 @@
9217
8907
  {
9218
8908
  "name": "template",
9219
8909
  "type": "Template",
9220
- "optional": false,
9221
- "dotDotDotToken": false,
9222
8910
  "deprecated": false,
9223
8911
  "deprecationMessage": ""
9224
8912
  }
@@ -9236,8 +8924,6 @@
9236
8924
  {
9237
8925
  "name": "template",
9238
8926
  "type": "Template",
9239
- "optional": false,
9240
- "dotDotDotToken": false,
9241
8927
  "deprecated": false,
9242
8928
  "deprecationMessage": "",
9243
8929
  "tagName": {
@@ -9262,16 +8948,12 @@
9262
8948
  {
9263
8949
  "name": "index",
9264
8950
  "type": "number",
9265
- "optional": false,
9266
- "dotDotDotToken": false,
9267
8951
  "deprecated": false,
9268
8952
  "deprecationMessage": ""
9269
8953
  },
9270
8954
  {
9271
8955
  "name": "item",
9272
8956
  "type": "Template",
9273
- "optional": false,
9274
- "dotDotDotToken": false,
9275
8957
  "deprecated": false,
9276
8958
  "deprecationMessage": ""
9277
8959
  }
@@ -9286,8 +8968,6 @@
9286
8968
  {
9287
8969
  "name": "index",
9288
8970
  "type": "number",
9289
- "optional": false,
9290
- "dotDotDotToken": false,
9291
8971
  "deprecated": false,
9292
8972
  "deprecationMessage": "",
9293
8973
  "tagName": {
@@ -9297,8 +8977,6 @@
9297
8977
  {
9298
8978
  "name": "item",
9299
8979
  "type": "Template",
9300
- "optional": false,
9301
- "dotDotDotToken": false,
9302
8980
  "deprecated": false,
9303
8981
  "deprecationMessage": "",
9304
8982
  "tagName": {
@@ -9343,32 +9021,24 @@
9343
9021
  {
9344
9022
  "name": "http",
9345
9023
  "type": "HttpClient",
9346
- "optional": false,
9347
- "dotDotDotToken": false,
9348
9024
  "deprecated": false,
9349
9025
  "deprecationMessage": ""
9350
9026
  },
9351
9027
  {
9352
9028
  "name": "editorService",
9353
9029
  "type": "TemplateEditorService",
9354
- "optional": false,
9355
- "dotDotDotToken": false,
9356
9030
  "deprecated": false,
9357
9031
  "deprecationMessage": ""
9358
9032
  },
9359
9033
  {
9360
9034
  "name": "zipService",
9361
9035
  "type": "ZipExportService",
9362
- "optional": false,
9363
- "dotDotDotToken": false,
9364
9036
  "deprecated": false,
9365
9037
  "deprecationMessage": ""
9366
9038
  },
9367
9039
  {
9368
9040
  "name": "hbsService",
9369
9041
  "type": "HbsRenderService",
9370
- "optional": false,
9371
- "dotDotDotToken": false,
9372
9042
  "deprecated": false,
9373
9043
  "deprecationMessage": ""
9374
9044
  }
@@ -9378,8 +9048,6 @@
9378
9048
  {
9379
9049
  "name": "http",
9380
9050
  "type": "HttpClient",
9381
- "optional": false,
9382
- "dotDotDotToken": false,
9383
9051
  "deprecated": false,
9384
9052
  "deprecationMessage": "",
9385
9053
  "tagName": {
@@ -9389,8 +9057,6 @@
9389
9057
  {
9390
9058
  "name": "editorService",
9391
9059
  "type": "TemplateEditorService",
9392
- "optional": false,
9393
- "dotDotDotToken": false,
9394
9060
  "deprecated": false,
9395
9061
  "deprecationMessage": "",
9396
9062
  "tagName": {
@@ -9400,8 +9066,6 @@
9400
9066
  {
9401
9067
  "name": "zipService",
9402
9068
  "type": "ZipExportService",
9403
- "optional": false,
9404
- "dotDotDotToken": false,
9405
9069
  "deprecated": false,
9406
9070
  "deprecationMessage": "",
9407
9071
  "tagName": {
@@ -9411,8 +9075,6 @@
9411
9075
  {
9412
9076
  "name": "hbsService",
9413
9077
  "type": "HbsRenderService",
9414
- "optional": false,
9415
- "dotDotDotToken": false,
9416
9078
  "deprecated": false,
9417
9079
  "deprecationMessage": "",
9418
9080
  "tagName": {