@eui/base 22.0.0-alpha.55 → 22.0.0-alpha.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/changelog.html +68 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/llms.txt +1 -1
- package/docs/properties.html +1 -1
- package/fesm2022/eui-base.mjs +1538 -1381
- package/fesm2022/eui-base.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-base.d.ts +1050 -1104
- package/types/eui-base.d.ts.map +1 -1
package/types/eui-base.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Observable,
|
|
3
|
-
import { Injector, Type } from
|
|
4
|
-
import { Selector } from
|
|
5
|
-
|
|
6
|
-
declare
|
|
7
|
-
declare function merge<T>(target: T): T;
|
|
8
|
-
declare function merge<T, A>(target: T, a: A): T & A;
|
|
9
|
-
declare function merge<T, A, B>(target: T, a: A, b: B): T & A & B;
|
|
10
|
-
declare function merge<T, A, B, C>(target: T, a: A, b: B, c: C): T & A & B & C;
|
|
11
|
-
declare function merge<T, A, B, C, D>(target: T, a: A, b: B, c: C, d: D): T & A & B & C & D;
|
|
12
|
-
declare function merge<T, A, B, C, D, E>(target: T, a: A, b: B, c: C, d: D, e: E): T & A & B & C & D & E;
|
|
13
|
-
declare function merge<T, A, B, C, D, E, F>(target: T, a: A, b: B, c: C, d: D, e: E, f: F): T & A & B & C & D & E & F;
|
|
1
|
+
import { HttpClient, HttpErrorResponse } from "@angular/common/http";
|
|
2
|
+
import { Observable, Subject, Subscription } from "rxjs";
|
|
3
|
+
import { Injector, Type } from "@angular/core";
|
|
4
|
+
import { Selector } from "reselect";
|
|
5
|
+
export declare const isObject: <T>(item: T) => boolean;
|
|
6
|
+
export declare function merge<T>(target: T): T;
|
|
7
|
+
export declare function merge<T, A>(target: T, a: A): T & A;
|
|
8
|
+
export declare function merge<T, A, B>(target: T, a: A, b: B): T & A & B;
|
|
9
|
+
export declare function merge<T, A, B, C>(target: T, a: A, b: B, c: C): T & A & B & C;
|
|
10
|
+
export declare function merge<T, A, B, C, D>(target: T, a: A, b: B, c: C, d: D): T & A & B & C & D;
|
|
11
|
+
export declare function merge<T, A, B, C, D, E>(target: T, a: A, b: B, c: C, d: D, e: E): T & A & B & C & D & E;
|
|
12
|
+
export declare function merge<T, A, B, C, D, E, F>(target: T, a: A, b: B, c: C, d: D, e: E, f: F): T & A & B & C & D & E & F;
|
|
14
13
|
/**
|
|
15
14
|
* deep merge of two or more objects
|
|
16
15
|
*
|
|
@@ -18,9 +17,8 @@ declare function merge<T, A, B, C, D, E, F>(target: T, a: A, b: B, c: C, d: D, e
|
|
|
18
17
|
* @param sources immutable sources to apply to target
|
|
19
18
|
* @returns a new merged object
|
|
20
19
|
*/
|
|
21
|
-
declare const mergeDeep: <T extends object, S>(target: T, ...sources: S[]) => any;
|
|
22
|
-
declare const mergeAll: <T>(array: Array<T>) => T;
|
|
23
|
-
|
|
20
|
+
export declare const mergeDeep: <T extends object, S>(target: T, ...sources: S[]) => any;
|
|
21
|
+
export declare const mergeAll: <T>(array: Array<T>) => T;
|
|
24
22
|
/**
|
|
25
23
|
* XMLHttpRequest configuration having the following parameters
|
|
26
24
|
* url: the path to the request, mandatory
|
|
@@ -31,271 +29,262 @@ declare const mergeAll: <T>(array: Array<T>) => T;
|
|
|
31
29
|
* withCredentials: True when credentials are to be included in a cross-origin request. False otherwise.
|
|
32
30
|
* timeout - time in milliseconds. A non-zero value will terminate the execution after the given time has passed
|
|
33
31
|
*/
|
|
34
|
-
interface XHRConfig {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
export interface XHRConfig {
|
|
33
|
+
url: string;
|
|
34
|
+
method?: string;
|
|
35
|
+
responseType?: XMLHttpRequestResponseType;
|
|
36
|
+
headers?: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
body?: Document | XMLHttpRequestBodyInit;
|
|
40
|
+
withCredentials?: boolean;
|
|
41
|
+
timeout?: number;
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
46
44
|
* Default xhr configuration
|
|
47
45
|
*/
|
|
48
|
-
declare const DEFAULT_XHR_CONFIG: XHRConfig;
|
|
46
|
+
export declare const DEFAULT_XHR_CONFIG: XHRConfig;
|
|
49
47
|
/**
|
|
50
48
|
* Utility function to call a XMLHttpRequest and send the response as a Promise. The response can be parameterized
|
|
51
49
|
*
|
|
52
50
|
* @param config xhr configuration
|
|
53
51
|
*/
|
|
54
|
-
declare function xhr<T>(urlOrConfig: string | XHRConfig): Promise<T>;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
severity: UxMessageSeverity;
|
|
52
|
+
export declare function xhr<T>(urlOrConfig: string | XHRConfig): Promise<T>;
|
|
53
|
+
export declare class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {
|
|
54
|
+
code?: string;
|
|
55
|
+
requestId?: string;
|
|
56
|
+
doc?: string;
|
|
57
|
+
details?: DETAILS;
|
|
58
|
+
severity: UxMessageSeverity;
|
|
59
|
+
msgId: string;
|
|
60
|
+
description: string;
|
|
61
|
+
errGroupMap?: Array<UxErrorGroupMap>;
|
|
62
|
+
subErrors?: SubErrors;
|
|
63
|
+
constructor(info: UxErrorInfo & UxHttpErrorInfo, errorFeedback: UxErrorFeedback, subErrors?: SubErrors, errGroupMap?: Array<UxErrorGroupMap>);
|
|
64
|
+
getFeedBacks(byKey?: string): Array<UxErrorFeedback>;
|
|
65
|
+
private checkAttribute;
|
|
66
|
+
}
|
|
67
|
+
export declare class UxErrorGroupOnClickEvent {
|
|
68
|
+
groupId: string;
|
|
69
|
+
err?: UxErrorFeedback;
|
|
70
|
+
constructor(groupId: string, err?: UxErrorFeedback);
|
|
71
|
+
}
|
|
72
|
+
export interface UxErrorFollowMap {
|
|
73
|
+
[groupId: string]: boolean;
|
|
74
|
+
}
|
|
75
|
+
export type UxErrorGroupMap = {
|
|
76
|
+
id: string;
|
|
77
|
+
description: string;
|
|
78
|
+
severity: UxMessageSeverity;
|
|
82
79
|
};
|
|
83
|
-
type UxErrorGroupItem = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
export type UxErrorGroupItem = {
|
|
81
|
+
groupId: string;
|
|
82
|
+
description: string;
|
|
83
|
+
severity: UxMessageSeverity;
|
|
84
|
+
errors: Array<UxErrorFeedback>;
|
|
88
85
|
};
|
|
89
|
-
interface UxErrorInfo<DETAILS = unknown> {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
interface UxHttpErrorInfo {
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
interface UxErrorFeedback extends UxErrorMessage {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
interface UxErrorMessage {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;
|
|
109
|
-
interface UxValidationErrorAttribute {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
declare enum UxMessageSeverity {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
declare enum UxMessageSeverityMetrics {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
type SubErrors = Array<UxValidationErrorClass>;
|
|
126
|
-
declare class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;
|
|
138
|
-
interface UxHttpErrorResponse extends HttpErrorResponse {
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
declare const transformToUxHttpResponse: (resp: HttpErrorResponse, mapper: ErrorMappingHandler) => UxHttpErrorResponse;
|
|
142
|
-
type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;
|
|
143
|
-
declare class UxPublishErrorFeedbackEvent {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
declare class UxClearErrorFeedbackEvent {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
86
|
+
export interface UxErrorInfo<DETAILS = unknown> {
|
|
87
|
+
code?: string;
|
|
88
|
+
doc?: string;
|
|
89
|
+
details?: DETAILS;
|
|
90
|
+
}
|
|
91
|
+
export interface UxHttpErrorInfo {
|
|
92
|
+
requestId?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface UxErrorFeedback extends UxErrorMessage {
|
|
95
|
+
severity?: UxMessageSeverity;
|
|
96
|
+
attributes?: UxValidationErrorAttributes;
|
|
97
|
+
errGroupId?: string;
|
|
98
|
+
br?: string;
|
|
99
|
+
doc?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface UxErrorMessage {
|
|
102
|
+
msgId: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
}
|
|
105
|
+
export type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;
|
|
106
|
+
export interface UxValidationErrorAttribute {
|
|
107
|
+
key: string | Array<string>;
|
|
108
|
+
value: string;
|
|
109
|
+
}
|
|
110
|
+
export declare enum UxMessageSeverity {
|
|
111
|
+
info = "info",
|
|
112
|
+
warning = "warning",
|
|
113
|
+
danger = "danger",
|
|
114
|
+
success = "success"
|
|
115
|
+
}
|
|
116
|
+
export declare enum UxMessageSeverityMetrics {
|
|
117
|
+
info = 0,
|
|
118
|
+
warning = 1,
|
|
119
|
+
danger = 2,
|
|
120
|
+
success = 3
|
|
121
|
+
}
|
|
122
|
+
export type SubErrors = Array<UxValidationErrorClass>;
|
|
123
|
+
export declare class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {
|
|
124
|
+
msgId: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
severity: UxMessageSeverity;
|
|
127
|
+
attributes: UxValidationErrorAttributes;
|
|
128
|
+
br?: string;
|
|
129
|
+
doc?: string;
|
|
130
|
+
details?: Details;
|
|
131
|
+
errGroupId?: string;
|
|
132
|
+
constructor(data: UxValidationErrorClass);
|
|
133
|
+
}
|
|
134
|
+
export type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;
|
|
135
|
+
export interface UxHttpErrorResponse extends HttpErrorResponse {
|
|
136
|
+
uxHttpErrorOutput: UxErrorOutput;
|
|
137
|
+
}
|
|
138
|
+
export declare const transformToUxHttpResponse: (resp: HttpErrorResponse, mapper: ErrorMappingHandler) => UxHttpErrorResponse;
|
|
139
|
+
export type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;
|
|
140
|
+
export declare class UxPublishErrorFeedbackEvent {
|
|
141
|
+
err: UxErrorOutput;
|
|
142
|
+
id?: string;
|
|
143
|
+
groupId?: string;
|
|
144
|
+
accumulate?: boolean;
|
|
145
|
+
constructor(err: UxErrorOutput, id?: string, groupId?: string, accumulate?: boolean);
|
|
146
|
+
}
|
|
147
|
+
export declare class UxClearErrorFeedbackEvent {
|
|
148
|
+
id?: string;
|
|
149
|
+
groupId?: string;
|
|
150
|
+
constructor(id?: string, groupId?: string);
|
|
151
|
+
}
|
|
152
|
+
export declare class UxBadgeLegacy {
|
|
153
|
+
label: string;
|
|
154
|
+
typeClass: string;
|
|
155
|
+
constructor(values?: object);
|
|
156
|
+
}
|
|
157
|
+
export declare class UxLinkLegacy<METADATA = unknown> {
|
|
158
|
+
id: string;
|
|
159
|
+
label: string;
|
|
160
|
+
ariaIconLabel: string;
|
|
161
|
+
subLabel: string;
|
|
162
|
+
typeLabel: string;
|
|
163
|
+
typeLabelClass: string;
|
|
164
|
+
url: string;
|
|
165
|
+
urlExternal: string;
|
|
166
|
+
urlExternalTarget: string;
|
|
167
|
+
disabled: boolean;
|
|
168
|
+
children: UxLinkLegacy<METADATA>[];
|
|
169
|
+
parent: UxLinkLegacy<METADATA>;
|
|
170
|
+
iconClass: string;
|
|
171
|
+
iconTypeClass: string;
|
|
172
|
+
hasIconBg: boolean;
|
|
173
|
+
active: boolean;
|
|
174
|
+
metadata: METADATA;
|
|
175
|
+
visible: boolean;
|
|
176
|
+
expanded: boolean;
|
|
177
|
+
command: () => void;
|
|
178
|
+
hasMarker: boolean;
|
|
179
|
+
markerTypeClass: string;
|
|
180
|
+
hasTag: boolean;
|
|
181
|
+
tagTypeClass: string;
|
|
182
|
+
tagLabel: string;
|
|
183
|
+
tagCount: string;
|
|
184
|
+
badgeTypeClass: string;
|
|
185
|
+
badgeLabel: string;
|
|
186
|
+
badges: UxBadgeLegacy[];
|
|
187
|
+
tooltipLabel: string;
|
|
188
|
+
typeClass: string;
|
|
189
|
+
isHome: boolean;
|
|
190
|
+
isSeparator: boolean;
|
|
191
|
+
isScreenReaderClickable: boolean;
|
|
192
|
+
allowedRightId: string;
|
|
193
|
+
allowedRightIds: string[];
|
|
194
|
+
deniedRightId: string;
|
|
195
|
+
deniedRightIds: string[];
|
|
196
|
+
selected: boolean;
|
|
197
|
+
indeterminate: boolean;
|
|
198
|
+
e2eAttr: string;
|
|
199
|
+
category: string;
|
|
200
|
+
constructor(values?: object);
|
|
201
|
+
get hasChildren(): boolean;
|
|
202
|
+
}
|
|
203
|
+
export interface UxFormValidationError {
|
|
204
|
+
uxValidationError: UxValidationErrorFeedback;
|
|
205
|
+
}
|
|
206
|
+
export interface UxValidationErrorFeedback {
|
|
207
|
+
message: string | UxValidationErrorI18nMessage;
|
|
208
|
+
/**
|
|
209
|
+
* danger, warning, info
|
|
210
|
+
*/
|
|
211
|
+
type: string;
|
|
212
|
+
}
|
|
213
|
+
export interface UxValidationErrorI18nMessage {
|
|
214
|
+
id: string;
|
|
215
|
+
params?: object;
|
|
216
|
+
}
|
|
217
|
+
export interface UxModalLegacy {
|
|
218
|
+
id: string;
|
|
219
|
+
isOpen: boolean;
|
|
220
|
+
isFullHeight?: boolean;
|
|
221
|
+
}
|
|
222
|
+
export interface HttpErrorHandlerConfig {
|
|
223
|
+
/**
|
|
224
|
+
* The list of routes, from specific to generic. The first matching one is handled.
|
|
225
|
+
*/
|
|
226
|
+
routes: HttpErrorRouteConfig[];
|
|
227
|
+
}
|
|
228
|
+
export interface HttpErrorRouteConfig {
|
|
229
|
+
/**
|
|
230
|
+
* The path to match against, a URL string that uses router matching notation. Can include wildcard characters (*).
|
|
231
|
+
*/
|
|
232
|
+
path: string;
|
|
233
|
+
/**
|
|
234
|
+
* Default behaviour, if error status code does not match
|
|
235
|
+
*/
|
|
236
|
+
default?: HttpErrorCallbackFn | string | null;
|
|
237
|
+
/**
|
|
238
|
+
* What to do in case of an error status code.
|
|
239
|
+
* if callback function, call it
|
|
240
|
+
* if it's string, redirect the router to it
|
|
241
|
+
* if null, do nothing
|
|
242
|
+
*/
|
|
243
|
+
[key: number]: HttpErrorCallbackFn | string | null;
|
|
244
|
+
}
|
|
245
|
+
export type HttpErrorCallbackFn = (error: HttpErrorResponse, injector: Injector) => void;
|
|
246
|
+
export interface EuiStoreServiceModel<T> {
|
|
247
|
+
select<K>(mapFn: (state: T) => K): Observable<K | Partial<K>>;
|
|
251
248
|
}
|
|
252
|
-
type HttpErrorCallbackFn = (error: HttpErrorResponse, injector: Injector) => void;
|
|
253
|
-
|
|
254
|
-
interface EuiStoreServiceModel<T> {
|
|
255
|
-
select<K>(mapFn: (state: T) => K): Observable<K | Partial<K>>;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
249
|
type HTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
259
|
-
interface ApiQueueItem<PAYLOAD = unknown> {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
interface ApiQueue {
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
declare const initialUserPreferences: UserPreferences;
|
|
281
|
-
|
|
250
|
+
export interface ApiQueueItem<PAYLOAD = unknown> {
|
|
251
|
+
uri: string;
|
|
252
|
+
method: HTTPMethod | string;
|
|
253
|
+
payload?: PAYLOAD;
|
|
254
|
+
timestamp?: number;
|
|
255
|
+
}
|
|
256
|
+
export interface ApiQueue {
|
|
257
|
+
[id: string]: ApiQueueItem;
|
|
258
|
+
}
|
|
259
|
+
export interface UserDetails {
|
|
260
|
+
userId: string;
|
|
261
|
+
firstName?: string;
|
|
262
|
+
lastName?: string;
|
|
263
|
+
fullName?: string;
|
|
264
|
+
}
|
|
265
|
+
export interface UserPreferences<DASHBOARD = any, T = any> {
|
|
266
|
+
dashboard?: DASHBOARD;
|
|
267
|
+
lang?: string;
|
|
268
|
+
[key: string]: string | DASHBOARD | T;
|
|
269
|
+
}
|
|
270
|
+
export declare const initialUserPreferences: UserPreferences;
|
|
282
271
|
/**
|
|
283
272
|
* The EuiEnvConfig is the environment specific configuration object for the EUI library.
|
|
284
273
|
*/
|
|
285
|
-
interface EuiEnvConfig<T = unknown> {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
274
|
+
export interface EuiEnvConfig<T = unknown> {
|
|
275
|
+
/**
|
|
276
|
+
* The envAppHandlersConfig contains the environment specific handlers' configuration.
|
|
277
|
+
*/
|
|
278
|
+
envAppHandlersConfig?: EuiAppHandlersConfig;
|
|
279
|
+
/**
|
|
280
|
+
* The envDynamicConfig contains the environment specific dynamic configuration.
|
|
281
|
+
*/
|
|
282
|
+
envDynamicConfig?: EnvDynamicConfig;
|
|
283
|
+
/**
|
|
284
|
+
* The loadedEnvDynamicConfig contains the loaded environment specific dynamic configuration.
|
|
285
|
+
*/
|
|
286
|
+
loadedEnvDynamicConfig?: EuiAppJsonConfig;
|
|
287
|
+
[key: string]: EuiAppHandlersConfig | EnvDynamicConfig | EuiAppJsonConfig | T;
|
|
299
288
|
}
|
|
300
289
|
/**
|
|
301
290
|
* The EnvDynamicConfig is the dynamic configuration object for the EUI library that uses the dynamic configuration to
|
|
@@ -303,62 +292,59 @@ interface EuiEnvConfig<T = unknown> {
|
|
|
303
292
|
* The dynamic configuration can be fetched from a local path or a web service, can be merged or deep merged with the
|
|
304
293
|
* default configuration at runtime and can be awaited for a specific duration to resolve the request.
|
|
305
294
|
*/
|
|
306
|
-
interface EnvDynamicConfig {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
295
|
+
export interface EnvDynamicConfig {
|
|
296
|
+
/** uri which can be local path or webservice, should store/return json-config which implements EuiAppJsonConfig*/
|
|
297
|
+
uri: string;
|
|
298
|
+
/**
|
|
299
|
+
* Dynamic config will be awaiting 2000ms(default) to resolve the request,
|
|
300
|
+
* to change this duration you can use this parameter
|
|
301
|
+
*/
|
|
302
|
+
configTimeout?: number;
|
|
303
|
+
/**
|
|
304
|
+
* Dynamic configuration overwrites to the config properties of EuiAppJsonConfig
|
|
305
|
+
* in the default configuration (global, modules, versions, [key: string]: any; )
|
|
306
|
+
* To merge the data for specific config property/ies you can define them as array, e.g.['modules','global']
|
|
307
|
+
* Note: When deepMerge:true is not provided, If there is common sub property for the merged object,
|
|
308
|
+
* dynamic fetched config will be overwriting it, otherwise It will be merged deeply.
|
|
309
|
+
*/
|
|
310
|
+
merge?: Array<string>;
|
|
311
|
+
/**
|
|
312
|
+
* If merge array is provided, the way of merging will be one-level merge as default.
|
|
313
|
+
* To have deep merge functionality, you have to define deepMerge:true
|
|
314
|
+
*/
|
|
315
|
+
deepMerge?: boolean;
|
|
327
316
|
}
|
|
328
|
-
|
|
329
317
|
/**
|
|
330
318
|
* EuiConfig is the main configuration object for the EUI library. It is used to provide the configuration to the EUI library.
|
|
331
319
|
* The EUI library uses the configuration to initialize the services and components.
|
|
332
320
|
*/
|
|
333
|
-
interface EuiConfig {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
suffix?: string;
|
|
358
|
-
/**
|
|
321
|
+
export interface EuiConfig {
|
|
322
|
+
/**
|
|
323
|
+
* The appConfig contains the global configuration and the modules' configuration.
|
|
324
|
+
*/
|
|
325
|
+
appConfig: EuiAppConfig;
|
|
326
|
+
/**
|
|
327
|
+
* The environment contains the environment specific configuration.
|
|
328
|
+
*/
|
|
329
|
+
environment: EuiEnvConfig;
|
|
330
|
+
}
|
|
331
|
+
export interface EuiLanguage {
|
|
332
|
+
/** the ISO language code e.g. en or fr */
|
|
333
|
+
code: string;
|
|
334
|
+
/** the label of the language translated in that language */
|
|
335
|
+
label: string;
|
|
336
|
+
/** languages with rght to left writing */
|
|
337
|
+
isRtl?: boolean;
|
|
338
|
+
}
|
|
339
|
+
export interface I18nResource {
|
|
340
|
+
/** prefix of the resource could be like the 2 char language code e.g. /en */
|
|
341
|
+
prefix: string;
|
|
342
|
+
/** suffix can be either .json or anything related of the resource HTTP call */
|
|
343
|
+
suffix?: string;
|
|
344
|
+
/**
|
|
359
345
|
It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler
|
|
360
346
|
*/
|
|
361
|
-
|
|
347
|
+
compileTranslations?: string;
|
|
362
348
|
}
|
|
363
349
|
/**
|
|
364
350
|
* a factory to compile translations into the main object holding them all
|
|
@@ -367,604 +353,574 @@ interface I18nResource {
|
|
|
367
353
|
* @param lang the translations language
|
|
368
354
|
* @returns the pre-processed translations
|
|
369
355
|
*/
|
|
370
|
-
type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;
|
|
371
|
-
interface I18nConfig {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
interface I18nServiceConfig {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
-
interface I18nLoaderConfig {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
declare const getI18nServiceConfigFromBase: (baseGlobalConfig: GlobalConfig) => I18nServiceConfig;
|
|
435
|
-
declare const getI18nServiceConfig: (config: I18nServiceConfig) => I18nServiceConfig;
|
|
436
|
-
declare const getI18nLoaderConfig: (config: I18nLoaderConfig) => I18nLoaderConfig;
|
|
356
|
+
export type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;
|
|
357
|
+
export interface I18nConfig {
|
|
358
|
+
icuEnabled?: boolean;
|
|
359
|
+
i18nService: I18nServiceConfig;
|
|
360
|
+
i18nLoader: I18nLoaderConfig;
|
|
361
|
+
}
|
|
362
|
+
export interface I18nServiceConfig {
|
|
363
|
+
/** an ISO 2 char code array of available languages */
|
|
364
|
+
languages?: (string | EuiLanguage)[];
|
|
365
|
+
/** default language to be used in case of not any has been set */
|
|
366
|
+
defaultLanguage?: string;
|
|
367
|
+
}
|
|
368
|
+
export interface I18nLoaderConfig {
|
|
369
|
+
/**
|
|
370
|
+
* Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.
|
|
371
|
+
* e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]
|
|
372
|
+
* Important! the language code will be added automatically to the end of the url except if the url ends with a slash.
|
|
373
|
+
*/
|
|
374
|
+
i18nFolders?: string | string[];
|
|
375
|
+
/**
|
|
376
|
+
* Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en
|
|
377
|
+
* Keep in mind that the url should be the prefix and not contain any suffix.
|
|
378
|
+
*/
|
|
379
|
+
i18nServices?: string | string[];
|
|
380
|
+
/**
|
|
381
|
+
* It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply
|
|
382
|
+
* provide the prefix and suffix of the resource, or both.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```typescript
|
|
386
|
+
* export function CompileTranslations(translations: any): any {
|
|
387
|
+
* const result = {};
|
|
388
|
+
* translations.forEach((translation: any) => {
|
|
389
|
+
* // extract the key and value from the translation object
|
|
390
|
+
* const key = translation['key'];
|
|
391
|
+
* const value = translation['value'];
|
|
392
|
+
* if (key && value) {
|
|
393
|
+
* result[key] = value;
|
|
394
|
+
* }
|
|
395
|
+
* });
|
|
396
|
+
* return result;
|
|
397
|
+
* }
|
|
398
|
+
* export const appConfig: EuiAppConfig = {
|
|
399
|
+
* ...,
|
|
400
|
+
* customHandler: {
|
|
401
|
+
* 'CompileTranslations_ID': CompileTranslations
|
|
402
|
+
* }
|
|
403
|
+
* };
|
|
404
|
+
* export const GLOBAL: GlobalConfig = {
|
|
405
|
+
* ...,
|
|
406
|
+
* i18n: {
|
|
407
|
+
* i18nLoader: {
|
|
408
|
+
* i18nFolders: ['i18n-eui'],
|
|
409
|
+
* i18nResources: [{
|
|
410
|
+
* prefix: 'api/translations/',
|
|
411
|
+
* compileTranslations: 'CompileTranslations_ID',
|
|
412
|
+
* }]
|
|
413
|
+
* }
|
|
414
|
+
* }
|
|
415
|
+
* };
|
|
416
|
+
*
|
|
417
|
+
*/
|
|
418
|
+
i18nResources?: I18nResource | I18nResource[];
|
|
419
|
+
}
|
|
420
|
+
export declare const getI18nServiceConfigFromBase: (baseGlobalConfig: GlobalConfig) => I18nServiceConfig;
|
|
421
|
+
export declare const getI18nServiceConfig: (config: I18nServiceConfig) => I18nServiceConfig;
|
|
422
|
+
export declare const getI18nLoaderConfig: (config: I18nLoaderConfig) => I18nLoaderConfig;
|
|
437
423
|
/**
|
|
438
424
|
* returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's
|
|
439
425
|
* it's using the navigator.language, splits by hyphen and get the first part.
|
|
440
426
|
*/
|
|
441
|
-
declare const getBrowserDefaultLanguage: () => string;
|
|
427
|
+
export declare const getBrowserDefaultLanguage: () => string;
|
|
442
428
|
/**
|
|
443
429
|
* returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47
|
|
444
430
|
* language tags. In the returned array they are ordered by preference with the most preferred language first.
|
|
445
431
|
* The array languages will be lower cased 2 char code.
|
|
446
432
|
*/
|
|
447
|
-
declare const getBrowserPreferredLanguages: () => string[];
|
|
448
|
-
|
|
433
|
+
export declare const getBrowserPreferredLanguages: () => string[];
|
|
449
434
|
/** Log level */
|
|
450
|
-
declare enum LogLevel {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
435
|
+
export declare enum LogLevel {
|
|
436
|
+
OFF = 0,
|
|
437
|
+
FATAL = 1,
|
|
438
|
+
ERROR = 2,
|
|
439
|
+
WARN = 3,
|
|
440
|
+
INFO = 4,
|
|
441
|
+
DEBUG = 5,
|
|
442
|
+
TRACE = 6,
|
|
443
|
+
ALL = 7
|
|
459
444
|
}
|
|
460
445
|
/** Associated log level names */
|
|
461
|
-
declare enum LogLevelName {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
446
|
+
export declare enum LogLevelName {
|
|
447
|
+
FATAL = "FATAL",
|
|
448
|
+
ERROR = "ERROR",
|
|
449
|
+
WARN = "WARNING",
|
|
450
|
+
INFO = "INFO",
|
|
451
|
+
DEBUG = "DEBUG",
|
|
452
|
+
TRACE = "TRACE"
|
|
468
453
|
}
|
|
469
454
|
/** The code position from where the log has been triggered */
|
|
470
|
-
interface LogPosition {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
455
|
+
export interface LogPosition {
|
|
456
|
+
file: string;
|
|
457
|
+
line: number;
|
|
458
|
+
column: number;
|
|
474
459
|
}
|
|
475
460
|
/** The log event sent to the log appenders */
|
|
476
|
-
interface LogEvent<MESSAGES = unknown> {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
}
|
|
488
|
-
|
|
461
|
+
export interface LogEvent<MESSAGES = unknown> {
|
|
462
|
+
/** event's log level */
|
|
463
|
+
level: LogLevel;
|
|
464
|
+
/** event's log level name */
|
|
465
|
+
levelName: string;
|
|
466
|
+
/** the name of the logger who triggered the event */
|
|
467
|
+
loggerName: string;
|
|
468
|
+
/** event's timestamp */
|
|
469
|
+
timestamp: Date;
|
|
470
|
+
/** log messages */
|
|
471
|
+
messages: MESSAGES[];
|
|
472
|
+
}
|
|
489
473
|
/**
|
|
490
474
|
* Abstract Log Appender
|
|
491
475
|
*/
|
|
492
|
-
declare abstract class LogAppender<CFG extends LogAppenderConfig = LogAppenderConfig> {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
476
|
+
export declare abstract class LogAppender<CFG extends LogAppenderConfig = LogAppenderConfig> {
|
|
477
|
+
protected config: CFG;
|
|
478
|
+
protected injector: Injector;
|
|
479
|
+
constructor(config: CFG, injector?: Injector);
|
|
480
|
+
/**
|
|
481
|
+
* Gets the config
|
|
482
|
+
*
|
|
483
|
+
* @returns the config
|
|
484
|
+
*/
|
|
485
|
+
getConfig(): CFG;
|
|
486
|
+
/**
|
|
487
|
+
* Logs a Log Event
|
|
488
|
+
*
|
|
489
|
+
* @param event log event
|
|
490
|
+
*/
|
|
491
|
+
abstract append(event: LogEvent): void;
|
|
508
492
|
}
|
|
509
|
-
|
|
510
493
|
/**
|
|
511
494
|
* Url Appender
|
|
512
495
|
*/
|
|
513
|
-
declare class UrlAppender extends LogAppender<UrlAppenderConfig> {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
496
|
+
export declare class UrlAppender extends LogAppender<UrlAppenderConfig> {
|
|
497
|
+
config: UrlAppenderConfig;
|
|
498
|
+
protected injector: Injector;
|
|
499
|
+
protected http: HttpClient;
|
|
500
|
+
constructor(config: UrlAppenderConfig, injector: Injector);
|
|
501
|
+
/**
|
|
502
|
+
* Logs an event to a server
|
|
503
|
+
*/
|
|
504
|
+
append(event: LogEvent): void;
|
|
505
|
+
/**
|
|
506
|
+
* Maps a LogEvent into a UrlLogEvent
|
|
507
|
+
*/
|
|
508
|
+
protected toUrlEvent(event: LogEvent): UrlLogEvent;
|
|
509
|
+
/**
|
|
510
|
+
* returns the code position from where the log has been triggered
|
|
511
|
+
*/
|
|
512
|
+
protected getPosition(): LogPosition;
|
|
513
|
+
/**
|
|
514
|
+
* returns the url of the current page
|
|
515
|
+
*/
|
|
516
|
+
protected getLocation(): string;
|
|
517
|
+
/**
|
|
518
|
+
* check messages if object type is Error and make its properties enumerable
|
|
519
|
+
*/
|
|
520
|
+
protected filterErrorType(event: LogEvent): LogEvent;
|
|
538
521
|
}
|
|
539
|
-
|
|
540
522
|
/** Default console prefix converters */
|
|
541
|
-
declare const DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS: ConsoleAppenderPrefixConverters;
|
|
523
|
+
export declare const DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS: ConsoleAppenderPrefixConverters;
|
|
542
524
|
/**
|
|
543
525
|
* Console Appender
|
|
544
526
|
*/
|
|
545
|
-
declare class ConsoleAppender extends LogAppender<ConsoleAppenderConfig> {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
527
|
+
export declare class ConsoleAppender extends LogAppender<ConsoleAppenderConfig> {
|
|
528
|
+
config: ConsoleAppenderConfig;
|
|
529
|
+
constructor(config?: ConsoleAppenderConfig);
|
|
530
|
+
/**
|
|
531
|
+
* Logs an event in the console
|
|
532
|
+
*/
|
|
533
|
+
append(event: LogEvent): void;
|
|
534
|
+
/**
|
|
535
|
+
* Returns the prefix to be added to the messages
|
|
536
|
+
*
|
|
537
|
+
* @param event the log event
|
|
538
|
+
* @returns the formatted prefix, as string
|
|
539
|
+
*/
|
|
540
|
+
protected getPrefix(event: LogEvent): string;
|
|
541
|
+
/**
|
|
542
|
+
* Utility method to replace a placeholder
|
|
543
|
+
*
|
|
544
|
+
* @param str the string with placeholders
|
|
545
|
+
* @param find the placeholder
|
|
546
|
+
* @param replace the string to replace the placeholder
|
|
547
|
+
* @returns the converted string
|
|
548
|
+
*/
|
|
549
|
+
protected convert(str: string, find: string, replace: string): string;
|
|
568
550
|
}
|
|
569
|
-
|
|
570
551
|
/**
|
|
571
552
|
* Logger
|
|
572
553
|
*/
|
|
573
|
-
declare class Logger {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
interface LogAppenderConfig {
|
|
680
|
-
/** appender log level. It overrides the main log level */
|
|
681
|
-
logLevel?: LogLevel;
|
|
554
|
+
export declare class Logger {
|
|
555
|
+
protected name: string;
|
|
556
|
+
protected level: LogLevel;
|
|
557
|
+
protected appenders: LogAppender[];
|
|
558
|
+
constructor(name: string, level: LogLevel, appenders: LogAppender[]);
|
|
559
|
+
static isEnabledFor(enabledFromLevel: LogLevel, level: LogLevel): boolean;
|
|
560
|
+
/**
|
|
561
|
+
* Gets the logger name
|
|
562
|
+
*
|
|
563
|
+
* @returns the logger name
|
|
564
|
+
*/
|
|
565
|
+
getName(): string;
|
|
566
|
+
/**
|
|
567
|
+
* Gets the log level
|
|
568
|
+
*
|
|
569
|
+
* @returns the log level
|
|
570
|
+
*/
|
|
571
|
+
getLevel(): LogLevel;
|
|
572
|
+
/**
|
|
573
|
+
* Sets the log level
|
|
574
|
+
*
|
|
575
|
+
* @param level log level
|
|
576
|
+
*/
|
|
577
|
+
setLevel(level: LogLevel): void;
|
|
578
|
+
/**
|
|
579
|
+
* Fatal log
|
|
580
|
+
*
|
|
581
|
+
* @param message mandatory message
|
|
582
|
+
* @param additionalMessages optional messages
|
|
583
|
+
*/
|
|
584
|
+
fatal<T, S>(message: T, ...additionalMessages: S[]): void;
|
|
585
|
+
/**
|
|
586
|
+
* Error log
|
|
587
|
+
*
|
|
588
|
+
* @param message mandatory message
|
|
589
|
+
* @param additionalMessages optional messages
|
|
590
|
+
*/
|
|
591
|
+
error<M, A>(message: M, ...additionalMessages: A[]): void;
|
|
592
|
+
/**
|
|
593
|
+
* Warning log
|
|
594
|
+
*
|
|
595
|
+
* @param message mandatory message
|
|
596
|
+
* @param additionalMessages optional messages
|
|
597
|
+
*/
|
|
598
|
+
warn<M, A>(message: M, ...additionalMessages: A[]): void;
|
|
599
|
+
/**
|
|
600
|
+
* Info log
|
|
601
|
+
*
|
|
602
|
+
* @param message mandatory message
|
|
603
|
+
* @param additionalMessages optional messages
|
|
604
|
+
*/
|
|
605
|
+
info<M, A>(message: M, ...additionalMessages: A[]): void;
|
|
606
|
+
/**
|
|
607
|
+
* Debug log
|
|
608
|
+
*
|
|
609
|
+
* @param message mandatory message
|
|
610
|
+
* @param additionalMessages optional messages
|
|
611
|
+
*/
|
|
612
|
+
debug<M, A>(message: M, ...additionalMessages: A[]): void;
|
|
613
|
+
/**
|
|
614
|
+
* Trace log
|
|
615
|
+
*
|
|
616
|
+
* @param message mandatory message
|
|
617
|
+
* @param additionalMessages optional messages
|
|
618
|
+
*/
|
|
619
|
+
trace<M, A>(message: M, ...additionalMessages: A[]): void;
|
|
620
|
+
isDisabled: () => boolean;
|
|
621
|
+
isEnabledFor: (level: LogLevel) => boolean;
|
|
622
|
+
isFatalEnabled: () => boolean;
|
|
623
|
+
isErrorEnabled: () => boolean;
|
|
624
|
+
isWarnEnabled: () => boolean;
|
|
625
|
+
isInfoEnabled: () => boolean;
|
|
626
|
+
isDebugEnabled: () => boolean;
|
|
627
|
+
isTraceEnabled: () => boolean;
|
|
628
|
+
isAllEnabled: () => boolean;
|
|
629
|
+
/**
|
|
630
|
+
* Generic log method, checking the log level and calling the specified appenders
|
|
631
|
+
*
|
|
632
|
+
* @param event the log event
|
|
633
|
+
*/
|
|
634
|
+
protected log(event: LogEvent): void;
|
|
635
|
+
}
|
|
636
|
+
export declare class LoggerMock extends Logger {
|
|
637
|
+
constructor();
|
|
638
|
+
getLevel(): null;
|
|
639
|
+
setLevel(): void;
|
|
640
|
+
fatal(): void;
|
|
641
|
+
error(): void;
|
|
642
|
+
warn(): void;
|
|
643
|
+
info(): void;
|
|
644
|
+
debug(): void;
|
|
645
|
+
trace(): void;
|
|
646
|
+
isDisabled: () => boolean;
|
|
647
|
+
isEnabledFor: () => boolean;
|
|
648
|
+
isFatalEnabled: () => boolean;
|
|
649
|
+
isErrorEnabled: () => boolean;
|
|
650
|
+
isWarnEnabled: () => boolean;
|
|
651
|
+
isInfoEnabled: () => boolean;
|
|
652
|
+
isDebugEnabled: () => boolean;
|
|
653
|
+
isTraceEnabled: () => boolean;
|
|
654
|
+
isAllEnabled: () => boolean;
|
|
655
|
+
}
|
|
656
|
+
export interface LogAppenderConfig {
|
|
657
|
+
/** appender log level. It overrides the main log level */
|
|
658
|
+
logLevel?: LogLevel;
|
|
682
659
|
}
|
|
683
660
|
/** console appender configuration */
|
|
684
|
-
interface ConsoleAppenderConfig extends LogAppenderConfig {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
661
|
+
export interface ConsoleAppenderConfig extends LogAppenderConfig {
|
|
662
|
+
/** customizable prefix to be added to the log messages */
|
|
663
|
+
prefixFormat?: string;
|
|
664
|
+
/** pluggable custom prefix converters */
|
|
665
|
+
prefixConverters?: ConsoleAppenderPrefixConverters;
|
|
689
666
|
}
|
|
690
667
|
/** The type of pluggable console prefix converters */
|
|
691
|
-
type ConsoleAppenderPrefixConverters = {
|
|
692
|
-
|
|
668
|
+
export type ConsoleAppenderPrefixConverters = {
|
|
669
|
+
[key: string]: (event: LogEvent) => string;
|
|
693
670
|
};
|
|
694
671
|
/** log configuration */
|
|
695
|
-
interface LogConfig {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
672
|
+
export interface LogConfig {
|
|
673
|
+
/** the name of the default logger, if LogService is used directly. Default: root */
|
|
674
|
+
baseLoggerName?: string;
|
|
675
|
+
/** log level. Default: LogLevel.ERROR */
|
|
676
|
+
logLevel?: LogLevel;
|
|
677
|
+
/** a list of log appenders' types. Default: ConsoleAppender with prefixFormat: '[{level}]' */
|
|
678
|
+
logAppenders?: LogAppenderType | LogAppenderType[];
|
|
702
679
|
}
|
|
703
680
|
/** log appender type, containing also the configuration of the specified appender */
|
|
704
|
-
type LogAppenderType = Type<LogAppender> | LogAppenderTypeConfig | ConsoleAppenderTypeConfig | UrlAppenderTypeConfig;
|
|
681
|
+
export type LogAppenderType = Type<LogAppender> | LogAppenderTypeConfig | ConsoleAppenderTypeConfig | UrlAppenderTypeConfig;
|
|
705
682
|
/** log appender configuration including also the type of the appender */
|
|
706
|
-
interface LogAppenderTypeConfig extends LogAppenderConfig {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
683
|
+
export interface LogAppenderTypeConfig extends LogAppenderConfig {
|
|
684
|
+
/** the log appender type */
|
|
685
|
+
type: Type<LogAppender>;
|
|
686
|
+
/** additional configuration specific to the log appender */
|
|
687
|
+
[key: string]: any;
|
|
711
688
|
}
|
|
712
689
|
/** console appender configuration including also the type of the console appender */
|
|
713
|
-
interface ConsoleAppenderTypeConfig extends ConsoleAppenderConfig {
|
|
714
|
-
|
|
715
|
-
|
|
690
|
+
export interface ConsoleAppenderTypeConfig extends ConsoleAppenderConfig {
|
|
691
|
+
/** the console appender type */
|
|
692
|
+
type: Type<ConsoleAppender>;
|
|
716
693
|
}
|
|
717
694
|
/** url appender configuration including also the type of the url appender */
|
|
718
|
-
interface UrlAppenderTypeConfig extends UrlAppenderConfig {
|
|
719
|
-
|
|
720
|
-
|
|
695
|
+
export interface UrlAppenderTypeConfig extends UrlAppenderConfig {
|
|
696
|
+
/** the url appender type */
|
|
697
|
+
type: Type<UrlAppender>;
|
|
721
698
|
}
|
|
722
699
|
/** url appender configuration */
|
|
723
|
-
interface UrlAppenderConfig extends LogAppenderConfig {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
700
|
+
export interface UrlAppenderConfig extends LogAppenderConfig {
|
|
701
|
+
/** url to POST the log event to a server */
|
|
702
|
+
url: string;
|
|
703
|
+
/** extended log event triggered after the mentioned level. If missing, the extended log level is not triggered */
|
|
704
|
+
detailedEventFromLevel?: LogLevel;
|
|
728
705
|
}
|
|
729
706
|
/** url log event */
|
|
730
|
-
interface UrlLogEvent extends LogEvent {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
* When enabled changes from I18nService will be reflected to locale state
|
|
742
|
-
*/
|
|
743
|
-
bindWithTranslate?: boolean;
|
|
707
|
+
export interface UrlLogEvent extends LogEvent {
|
|
708
|
+
/** the code position from where the log has been triggered */
|
|
709
|
+
position?: LogPosition;
|
|
710
|
+
/** the url of the current page */
|
|
711
|
+
location?: string;
|
|
712
|
+
}
|
|
713
|
+
export interface LocaleServiceConfig {
|
|
714
|
+
/**
|
|
715
|
+
* When enabled changes from I18nService will be reflected to locale state
|
|
716
|
+
*/
|
|
717
|
+
bindWithTranslate?: boolean;
|
|
744
718
|
}
|
|
745
719
|
/**
|
|
746
720
|
* responsible to extract the attributes "available" and "id" from the locale configuration
|
|
747
721
|
*/
|
|
748
|
-
declare const getLocaleServiceConfigFromBase: (baseGlobalConfig: GlobalConfig) => LocaleServiceConfig;
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
declare const initialAppState: AppState;
|
|
722
|
+
export declare const getLocaleServiceConfigFromBase: (baseGlobalConfig: GlobalConfig) => LocaleServiceConfig;
|
|
723
|
+
export interface AppState<T = any> {
|
|
724
|
+
version?: string;
|
|
725
|
+
/** flag to indicate if the application is online/offline. Default: true */
|
|
726
|
+
connected?: boolean;
|
|
727
|
+
loadedConfigModules?: LoadedConfigModules;
|
|
728
|
+
status?: string;
|
|
729
|
+
currentModule?: string;
|
|
730
|
+
apiQueue?: ApiQueue;
|
|
731
|
+
[key: string]: string | boolean | LoadedConfigModules | ApiQueue | T;
|
|
732
|
+
}
|
|
733
|
+
export declare const initialAppState: AppState;
|
|
761
734
|
/**
|
|
762
735
|
* LoadedConfigModules
|
|
763
736
|
* @property lastAddedModule - the last module added to the store
|
|
764
737
|
* @property modulesConfig - the modules configuration
|
|
765
738
|
*/
|
|
766
|
-
interface LoadedConfigModules {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
declare const initialUserState: UserState;
|
|
780
|
-
|
|
739
|
+
export interface LoadedConfigModules {
|
|
740
|
+
lastAddedModule?: string;
|
|
741
|
+
modulesConfig: ModulesConfig;
|
|
742
|
+
}
|
|
743
|
+
export interface UserState extends UserDetails {
|
|
744
|
+
userId: string;
|
|
745
|
+
firstName?: string;
|
|
746
|
+
lastName?: string;
|
|
747
|
+
fullName?: string;
|
|
748
|
+
preferences?: UserPreferences;
|
|
749
|
+
rights?: EuiUserRight[];
|
|
750
|
+
}
|
|
751
|
+
export declare const initialUserState: UserState;
|
|
781
752
|
/**
|
|
782
753
|
* The notifications state.
|
|
783
754
|
* @template LIST The type of the list of notifications.
|
|
784
755
|
*/
|
|
785
|
-
interface NotificationsState<LIST = unknown> {
|
|
786
|
-
|
|
756
|
+
export interface NotificationsState<LIST = unknown> {
|
|
757
|
+
list?: LIST[];
|
|
787
758
|
}
|
|
788
759
|
/**
|
|
789
760
|
* The initial state of the notifications state.
|
|
790
761
|
*/
|
|
791
|
-
declare const initialNotificationsState: NotificationsState;
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
activeLang: string;
|
|
762
|
+
export declare const initialNotificationsState: NotificationsState;
|
|
763
|
+
export interface I18nState {
|
|
764
|
+
activeLang: string;
|
|
795
765
|
}
|
|
796
|
-
declare const initialI18nState: I18nState;
|
|
797
|
-
|
|
766
|
+
export declare const initialI18nState: I18nState;
|
|
798
767
|
/**
|
|
799
768
|
* The locale state is used to store the current locale id and the list of available locales.
|
|
800
769
|
*/
|
|
801
|
-
interface LocaleState {
|
|
802
|
-
|
|
803
|
-
|
|
770
|
+
export interface LocaleState {
|
|
771
|
+
/** The current locale id e.g. 'en-US' */
|
|
772
|
+
id: string;
|
|
804
773
|
}
|
|
805
774
|
/**
|
|
806
775
|
* The initial state of the locale state. The default locale is English US ('en').
|
|
807
776
|
*/
|
|
808
|
-
declare const initialLocaleState: LocaleState;
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
declare const
|
|
818
|
-
|
|
819
|
-
declare const getAppVersion: Selector<AppState, string>;
|
|
820
|
-
declare const getAppConnection: Selector<AppState, boolean>;
|
|
777
|
+
export declare const initialLocaleState: LocaleState;
|
|
778
|
+
export interface CoreState {
|
|
779
|
+
app?: AppState;
|
|
780
|
+
user?: UserState;
|
|
781
|
+
notifications?: NotificationsState;
|
|
782
|
+
i18n?: I18nState;
|
|
783
|
+
locale?: LocaleState;
|
|
784
|
+
}
|
|
785
|
+
export declare const initialCoreState: CoreState;
|
|
786
|
+
export declare const getAppVersion: Selector<AppState, string>;
|
|
787
|
+
export declare const getAppConnection: Selector<AppState, boolean>;
|
|
821
788
|
/**
|
|
822
789
|
* Returns the loaded config modules from the app state
|
|
823
790
|
* @deprecated It will be removed in the future.
|
|
824
791
|
*/
|
|
825
|
-
declare const getAppLoadedConfigModules: Selector<AppState, LoadedConfigModules>;
|
|
792
|
+
export declare const getAppLoadedConfigModules: Selector<AppState, LoadedConfigModules>;
|
|
826
793
|
/**
|
|
827
794
|
* Returns the last added module from the app state
|
|
828
795
|
* @deprecated It will be removed in the future.
|
|
829
796
|
*/
|
|
830
|
-
declare const getLastAddedModule: Selector<AppState, string>;
|
|
831
|
-
declare const getAppStatus: Selector<AppState, string>;
|
|
832
|
-
declare const getCurrentModule: Selector<AppState, string>;
|
|
833
|
-
declare const getApiQueue: Selector<AppState, ApiQueue>;
|
|
834
|
-
declare const getApiQueueItem: (itemId: string) => Selector<AppState, ApiQueueItem>;
|
|
835
|
-
|
|
836
|
-
declare const
|
|
837
|
-
declare const
|
|
838
|
-
declare const
|
|
839
|
-
declare const
|
|
840
|
-
declare const
|
|
841
|
-
|
|
842
|
-
declare const
|
|
843
|
-
|
|
844
|
-
declare const
|
|
845
|
-
declare const
|
|
846
|
-
declare const
|
|
847
|
-
declare const
|
|
848
|
-
declare const
|
|
849
|
-
declare const
|
|
850
|
-
declare const
|
|
851
|
-
declare const
|
|
852
|
-
declare const
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
}
|
|
871
|
-
interface
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
* @param state
|
|
958
|
-
*/
|
|
959
|
-
private copy;
|
|
960
|
-
}
|
|
961
|
-
declare abstract class EuiLazyService<T> extends EuiService<T> {
|
|
962
|
-
protected stateInstance: T;
|
|
963
|
-
protected $stateSubs: Subscription;
|
|
964
|
-
protected $stateLazyLoadSubs: Subscription;
|
|
965
|
-
protected constructor(defaultState: T);
|
|
966
|
-
abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;
|
|
967
|
-
initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void;
|
|
797
|
+
export declare const getLastAddedModule: Selector<AppState, string>;
|
|
798
|
+
export declare const getAppStatus: Selector<AppState, string>;
|
|
799
|
+
export declare const getCurrentModule: Selector<AppState, string>;
|
|
800
|
+
export declare const getApiQueue: Selector<AppState, ApiQueue>;
|
|
801
|
+
export declare const getApiQueueItem: (itemId: string) => Selector<AppState, ApiQueueItem>;
|
|
802
|
+
export declare const getAppState: (state: CoreState) => AppState;
|
|
803
|
+
export declare const getUserState: (state: CoreState) => UserState;
|
|
804
|
+
export declare const getNotificationsState: (state: CoreState) => NotificationsState;
|
|
805
|
+
export declare const getI18nState: (state: CoreState) => I18nState;
|
|
806
|
+
export declare const getLocaleState: (state: CoreState) => LocaleState;
|
|
807
|
+
export declare const getActiveLang: Selector<CoreState, string>;
|
|
808
|
+
export declare const getUserDetails: Selector<CoreState, UserDetails>;
|
|
809
|
+
export declare const getUserPreferences: Selector<CoreState, UserPreferences>;
|
|
810
|
+
export declare const getUserId: Selector<CoreState, string>;
|
|
811
|
+
export declare const getUserFirstName: Selector<CoreState, string>;
|
|
812
|
+
export declare const getUserLastName: Selector<CoreState, string>;
|
|
813
|
+
export declare const getUserFullName: Selector<CoreState, string>;
|
|
814
|
+
export declare const getUserLang: Selector<UserPreferences, string>;
|
|
815
|
+
export declare const getUserRights: Selector<CoreState, EuiUserRight[]>;
|
|
816
|
+
export declare const getUserRight: (rightId: string) => Selector<CoreState, EuiUserRight>;
|
|
817
|
+
export declare const getUserRightPermissions: (rightId: string) => Selector<CoreState, string[]>;
|
|
818
|
+
export declare const getUserDashboard: Selector<UserPreferences<unknown>, unknown>;
|
|
819
|
+
export declare const getNotificationsList: Selector<AppState, unknown[]>;
|
|
820
|
+
export interface UserConfig {
|
|
821
|
+
defaultUserPreferences?: UserPreferences;
|
|
822
|
+
}
|
|
823
|
+
export type EuiAppConfig = EuiAppJsonConfig & EuiAppHandlersConfig;
|
|
824
|
+
export interface EuiAppJsonConfig<T = any> {
|
|
825
|
+
global: GlobalConfig;
|
|
826
|
+
modules?: ModulesConfig;
|
|
827
|
+
versions?: VersionsConfig;
|
|
828
|
+
[key: string]: GlobalConfig | T;
|
|
829
|
+
}
|
|
830
|
+
export interface EuiAppHandlersConfig<T = any> {
|
|
831
|
+
httpErrorHandler?: HttpErrorHandlerConfig;
|
|
832
|
+
errorMappingHandler?: ErrorMappingHandler;
|
|
833
|
+
log?: LogConfig;
|
|
834
|
+
customHandler?: {
|
|
835
|
+
[handlerId: string]: T;
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
export interface GlobalConfig<T = any> {
|
|
839
|
+
/** show/hide connection status */
|
|
840
|
+
showConnectionStatus?: ConnectionStatus;
|
|
841
|
+
user?: UserConfig;
|
|
842
|
+
i18n?: I18nConfig;
|
|
843
|
+
locale?: LocaleServiceConfig;
|
|
844
|
+
eui?: EuiGlobalConfig;
|
|
845
|
+
[key: string]: boolean | UserConfig | I18nConfig | LocaleServiceConfig | EuiGlobalConfig | ConnectionStatus | T;
|
|
846
|
+
}
|
|
847
|
+
export interface EuiGlobalConfig {
|
|
848
|
+
assetsBaseUrl?: string;
|
|
849
|
+
theme?: string;
|
|
850
|
+
}
|
|
851
|
+
export interface ConnectionStatus {
|
|
852
|
+
messageBox: {
|
|
853
|
+
lifespan: number;
|
|
854
|
+
};
|
|
855
|
+
enabled: boolean;
|
|
856
|
+
}
|
|
857
|
+
export interface ModulesConfig {
|
|
858
|
+
[module: string]: ModuleConfig;
|
|
859
|
+
}
|
|
860
|
+
export interface ModuleConfig<T = any> extends LogConfig, I18nLoaderConfig {
|
|
861
|
+
[key: string]: string | string[] | I18nResource | I18nResource[] | LogLevel | LogAppenderType | LogAppenderType[] | T;
|
|
862
|
+
}
|
|
863
|
+
export interface VersionsConfig {
|
|
864
|
+
app?: string;
|
|
865
|
+
[module: string]: string;
|
|
866
|
+
}
|
|
867
|
+
export interface EuiServiceModel<T> {
|
|
868
|
+
init(t: T): Observable<EuiServiceStatus>;
|
|
869
|
+
/**
|
|
870
|
+
* retrieves the State of the service. If you don't pass anything it will retrieve the whole State
|
|
871
|
+
* of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If
|
|
872
|
+
* you pass a string that's a key of the Service State type it will retrieve that slice of the state.
|
|
873
|
+
*/
|
|
874
|
+
getState<K = T>(): Observable<T>;
|
|
875
|
+
getState<K>(mapFn: (state: T) => K): Observable<K>;
|
|
876
|
+
getState<A extends keyof T>(key: A): Observable<T[A]>;
|
|
877
|
+
getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;
|
|
878
|
+
updateState(t: T): void;
|
|
879
|
+
}
|
|
880
|
+
export type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; };
|
|
881
|
+
export declare abstract class EuiService<T> implements EuiServiceModel<T> {
|
|
882
|
+
protected stateInstance: T;
|
|
883
|
+
protected prevStateInstance: T;
|
|
884
|
+
protected $stateSubs: Subscription;
|
|
885
|
+
protected $stateLazyLoadSubs: Subscription;
|
|
886
|
+
onStateChange: Subject<T>;
|
|
887
|
+
protected constructor(defaultState: T);
|
|
888
|
+
initEuiService(): void;
|
|
889
|
+
abstract init(t?: T): Observable<EuiServiceStatus>;
|
|
890
|
+
abstract getState<K = T>(): Observable<T>;
|
|
891
|
+
abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;
|
|
892
|
+
abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;
|
|
893
|
+
abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;
|
|
894
|
+
abstract updateState(t: DeepPartial<T>): void;
|
|
895
|
+
protected unSubscribe(): void;
|
|
896
|
+
/**
|
|
897
|
+
* deep merge two objects
|
|
898
|
+
* @param target the object that will be merged into
|
|
899
|
+
* @param source the object that will be merged from
|
|
900
|
+
*/
|
|
901
|
+
protected deepMerge<T>(target: T, source: DeepPartial<T>): T;
|
|
902
|
+
/**
|
|
903
|
+
* checks if the given item is an object
|
|
904
|
+
* @param item the item that will be checked
|
|
905
|
+
*/
|
|
906
|
+
private isObject;
|
|
907
|
+
/**
|
|
908
|
+
* returns a copy of the given value whether this value is object or primitive. For the arrays it will cover
|
|
909
|
+
* multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify
|
|
910
|
+
* might have performance issues on large scale objects but that's an edge case scenario. In case that happens in
|
|
911
|
+
* the future follow the technique of NGRX with function caching.
|
|
912
|
+
*
|
|
913
|
+
* @param state
|
|
914
|
+
*/
|
|
915
|
+
private copy;
|
|
916
|
+
}
|
|
917
|
+
export declare abstract class EuiLazyService<T> extends EuiService<T> {
|
|
918
|
+
protected stateInstance: T;
|
|
919
|
+
protected $stateSubs: Subscription;
|
|
920
|
+
protected $stateLazyLoadSubs: Subscription;
|
|
921
|
+
protected constructor(defaultState: T);
|
|
922
|
+
abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;
|
|
923
|
+
initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void;
|
|
968
924
|
}
|
|
969
925
|
/**
|
|
970
926
|
* EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates
|
|
@@ -974,289 +930,279 @@ declare abstract class EuiLazyService<T> extends EuiService<T> {
|
|
|
974
930
|
* @property success a boolean property that indicates whether the service was successful or not
|
|
975
931
|
* @property error an optional property that contains the error message
|
|
976
932
|
*/
|
|
977
|
-
interface EuiServiceStatus<T = unknown> {
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
declare
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
declare const
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
greyLightester: string;
|
|
1102
|
-
greyLightester2: string;
|
|
933
|
+
export interface EuiServiceStatus<T = unknown> {
|
|
934
|
+
success: boolean;
|
|
935
|
+
error?: T;
|
|
936
|
+
}
|
|
937
|
+
export interface EuiPaginationConfig {
|
|
938
|
+
totalItems?: number;
|
|
939
|
+
pageSize?: number;
|
|
940
|
+
currentPage?: number;
|
|
941
|
+
pageWindowSize?: number;
|
|
942
|
+
}
|
|
943
|
+
export declare const DefaultConfig: EuiPaginationConfig;
|
|
944
|
+
export declare class EuiPagination {
|
|
945
|
+
private totalItems;
|
|
946
|
+
private pageSize;
|
|
947
|
+
private currentPage;
|
|
948
|
+
private pageWindowSize;
|
|
949
|
+
private constructor();
|
|
950
|
+
static create(config?: EuiPaginationConfig): EuiPagination;
|
|
951
|
+
getFirstPage(): number;
|
|
952
|
+
getLastPage(): number;
|
|
953
|
+
isFirstPageActive(): boolean;
|
|
954
|
+
isLastPageActive(): boolean;
|
|
955
|
+
hasItems(): boolean;
|
|
956
|
+
getPagesCount(): number;
|
|
957
|
+
getPages(): Array<number>;
|
|
958
|
+
goToPage(page: number): void;
|
|
959
|
+
goToFirstPage(): void;
|
|
960
|
+
goToLastPage(): void;
|
|
961
|
+
goToNextPage(): void;
|
|
962
|
+
goToPreviousPage(): void;
|
|
963
|
+
hasPreviousPage(): boolean;
|
|
964
|
+
hasNextPage(): boolean;
|
|
965
|
+
getTotalItems(): number;
|
|
966
|
+
getPageSize(): number;
|
|
967
|
+
setPageSize(size: number): void;
|
|
968
|
+
getCurrentPage(): number;
|
|
969
|
+
getPageWindowSize(): number;
|
|
970
|
+
setPageWindowSize(size: number): void;
|
|
971
|
+
getShowingFrom(): number;
|
|
972
|
+
getShowingTo(): number;
|
|
973
|
+
}
|
|
974
|
+
export declare const range: (start: number, end?: number, step?: number) => Array<number>;
|
|
975
|
+
export declare const EUI_COLORS: {
|
|
976
|
+
text: string;
|
|
977
|
+
default: string;
|
|
978
|
+
black: string;
|
|
979
|
+
white: string;
|
|
980
|
+
primary: string;
|
|
981
|
+
primaryDark: string;
|
|
982
|
+
primaryDarker: string;
|
|
983
|
+
primaryDarkest: string;
|
|
984
|
+
primaryDarkester: string;
|
|
985
|
+
primaryDarkester2: string;
|
|
986
|
+
primaryLight: string;
|
|
987
|
+
primaryLighter: string;
|
|
988
|
+
primaryLightest: string;
|
|
989
|
+
primaryLightester: string;
|
|
990
|
+
primaryLightester2: string;
|
|
991
|
+
accent: string;
|
|
992
|
+
accentDark: string;
|
|
993
|
+
accentDarker: string;
|
|
994
|
+
accentDarkest: string;
|
|
995
|
+
accentDarkester: string;
|
|
996
|
+
accentDarkester2: string;
|
|
997
|
+
accentLight: string;
|
|
998
|
+
accentLighter: string;
|
|
999
|
+
accentLightest: string;
|
|
1000
|
+
accentLightester: string;
|
|
1001
|
+
accentLightester2: string;
|
|
1002
|
+
info: string;
|
|
1003
|
+
infoDark: string;
|
|
1004
|
+
infoDarker: string;
|
|
1005
|
+
infoDarkest: string;
|
|
1006
|
+
infoDarkester: string;
|
|
1007
|
+
infoDarkester2: string;
|
|
1008
|
+
infoLight: string;
|
|
1009
|
+
infoLighter: string;
|
|
1010
|
+
infoLightest: string;
|
|
1011
|
+
infoLightester: string;
|
|
1012
|
+
infoLightester2: string;
|
|
1013
|
+
success: string;
|
|
1014
|
+
successDark: string;
|
|
1015
|
+
successDarker: string;
|
|
1016
|
+
successDarkest: string;
|
|
1017
|
+
successDarkester: string;
|
|
1018
|
+
successDarkester2: string;
|
|
1019
|
+
successLight: string;
|
|
1020
|
+
successLighter: string;
|
|
1021
|
+
successLightest: string;
|
|
1022
|
+
successLightester: string;
|
|
1023
|
+
successLightester2: string;
|
|
1024
|
+
warning: string;
|
|
1025
|
+
warningDark: string;
|
|
1026
|
+
warningDarker: string;
|
|
1027
|
+
warningDarkest: string;
|
|
1028
|
+
warningDarkester: string;
|
|
1029
|
+
warningDarkester2: string;
|
|
1030
|
+
warningLight: string;
|
|
1031
|
+
warningLighter: string;
|
|
1032
|
+
warningLightest: string;
|
|
1033
|
+
warningLightester: string;
|
|
1034
|
+
warningLightester2: string;
|
|
1035
|
+
danger: string;
|
|
1036
|
+
dangerDark: string;
|
|
1037
|
+
dangerDarker: string;
|
|
1038
|
+
dangerDarkest: string;
|
|
1039
|
+
dangerDarkester: string;
|
|
1040
|
+
dangerDarkester2: string;
|
|
1041
|
+
dangerLight: string;
|
|
1042
|
+
dangerLighter: string;
|
|
1043
|
+
dangerLightest: string;
|
|
1044
|
+
dangerLightester: string;
|
|
1045
|
+
dangerLightester2: string;
|
|
1046
|
+
grey: string;
|
|
1047
|
+
greyDark: string;
|
|
1048
|
+
greyDarker: string;
|
|
1049
|
+
greyDarkest: string;
|
|
1050
|
+
greyDarkester: string;
|
|
1051
|
+
greyDarkester2: string;
|
|
1052
|
+
greyLight: string;
|
|
1053
|
+
greyLighter: string;
|
|
1054
|
+
greyLightest: string;
|
|
1055
|
+
greyLightester: string;
|
|
1056
|
+
greyLightester2: string;
|
|
1103
1057
|
};
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1058
|
+
export interface EuiAuthConfig {
|
|
1059
|
+
isLoggedIn?: boolean;
|
|
1060
|
+
redirectUrl?: string;
|
|
1061
|
+
loginPageUrl?: string;
|
|
1062
|
+
}
|
|
1063
|
+
export declare const EUI_DEFAULT_AUTH_CONFIG: EuiAuthConfig;
|
|
1064
|
+
export type EuiLanguageCode = string | EuiLanguage;
|
|
1065
|
+
export declare class EuiEuLanguages {
|
|
1066
|
+
private static languages;
|
|
1067
|
+
private static allLanguages;
|
|
1068
|
+
/**
|
|
1069
|
+
* Matches the given string array to the EU languages and returns a EuiLanguage array.
|
|
1070
|
+
* In case that no codes provided it returns the EU Languages array.
|
|
1071
|
+
*
|
|
1072
|
+
* @param codes A string array of 2 char codes
|
|
1073
|
+
*/
|
|
1074
|
+
static getLanguages(codes?: EuiLanguageCode[]): EuiLanguage[];
|
|
1075
|
+
/**
|
|
1076
|
+
* filters and removes language codes that are not part of the EULanguage
|
|
1077
|
+
* e.g. 'ko' does not map to any EULanguage code on the array.
|
|
1078
|
+
* { code: 'ko', label: 'whatever' } is valid though
|
|
1079
|
+
*
|
|
1080
|
+
* @param codes codes A string array of 2 char codescodes A string array of 2 char codes
|
|
1081
|
+
*/
|
|
1082
|
+
static filterInvalidLanguageCodes(codes: EuiLanguageCode[]): EuiLanguageCode[];
|
|
1083
|
+
/**
|
|
1084
|
+
* return the given list ordered based on the EULanguage order
|
|
1085
|
+
*
|
|
1086
|
+
* @param codes codes A string array of 2 char codes
|
|
1087
|
+
*/
|
|
1088
|
+
static getOrderedLanguages(codes?: EuiLanguageCode[]): EuiLanguage[];
|
|
1089
|
+
/**
|
|
1090
|
+
* retrieve language codes (string array) from a given array of string and EuiLanguage items
|
|
1091
|
+
*
|
|
1092
|
+
* @param array It can be an mixed array of string and EuiLanguage items
|
|
1093
|
+
*/
|
|
1094
|
+
static getLanguageCodes(array: EuiLanguageCode[]): string[];
|
|
1095
|
+
/**
|
|
1096
|
+
* filter non EU languages from given array
|
|
1097
|
+
*
|
|
1098
|
+
* @param array An array of EuiLanguage items
|
|
1099
|
+
*/
|
|
1100
|
+
static filterNonEULanguages(array: EuiLanguage[]): EuiLanguage[];
|
|
1101
|
+
/**
|
|
1102
|
+
* filter EU Languages from given array
|
|
1103
|
+
*
|
|
1104
|
+
* @param array An array of EuiLanguage items
|
|
1105
|
+
*/
|
|
1106
|
+
static filterEULanguages(array: EuiLanguage[]): EuiLanguage[];
|
|
1107
|
+
/**
|
|
1108
|
+
* @param code language code, ex. 'lu'
|
|
1109
|
+
*/
|
|
1110
|
+
static getLanguageByCode(code: string): EuiLanguage;
|
|
1111
|
+
/**
|
|
1112
|
+
* @param code language code, ex. 'lu'
|
|
1113
|
+
*/
|
|
1114
|
+
static isEuLanguage(code: string): boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* Returns array of EuiLanguage that match the given codes. If codes array is empty, returns all languages.
|
|
1117
|
+
* @param codes A string array of 2 char codes, ex. ['en', 'de']
|
|
1118
|
+
*/
|
|
1119
|
+
static getAllLanguagesByCodes(codes: string[]): EuiLanguage[];
|
|
1120
|
+
}
|
|
1121
|
+
export interface EuiUserRight {
|
|
1122
|
+
id: string;
|
|
1123
|
+
permissions?: string[];
|
|
1124
|
+
}
|
|
1125
|
+
export interface EuiMenuItem<METADATA = unknown> {
|
|
1126
|
+
id?: string;
|
|
1127
|
+
e2eAttr?: string;
|
|
1128
|
+
label?: string;
|
|
1129
|
+
initials?: string;
|
|
1130
|
+
url?: string;
|
|
1131
|
+
queryParams?: any;
|
|
1132
|
+
urlExternal?: string;
|
|
1133
|
+
urlExternalTarget?: string;
|
|
1134
|
+
link?: boolean;
|
|
1135
|
+
iconClass?: string;
|
|
1136
|
+
iconTypeClass?: string;
|
|
1137
|
+
iconSvgName?: string;
|
|
1138
|
+
iconSvgUrl?: string;
|
|
1139
|
+
iconLabel?: string;
|
|
1140
|
+
expanded?: boolean;
|
|
1141
|
+
active?: boolean;
|
|
1142
|
+
children?: EuiMenuItem[];
|
|
1143
|
+
parent?: EuiMenuItem;
|
|
1144
|
+
visible?: boolean;
|
|
1145
|
+
tagLabel?: string;
|
|
1146
|
+
tagTypeClass?: string;
|
|
1147
|
+
tooltip?: string;
|
|
1148
|
+
hasMarker?: boolean;
|
|
1149
|
+
markerTypeClass?: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* Optional status descriptor rendered in the menu item's end block: a status tag plus a group
|
|
1152
|
+
* of small status icons. Independent of `tagLabel` / `hasMarker` and purely additive.
|
|
1153
|
+
*/
|
|
1154
|
+
statusMetadata?: {
|
|
1155
|
+
/** Short status label (e.g. `DRAFT`, `DEMO`). */
|
|
1156
|
+
status?: string;
|
|
1157
|
+
/** Marker color variant (e.g. `info`, `danger`, `success`); drives the left circle-fill marker. */
|
|
1158
|
+
colorVariant?: string;
|
|
1159
|
+
/** Icon keys rendered as small `eui-icon-svg` in the end block (e.g. `wc`, `react`, `figma`). */
|
|
1160
|
+
statusIcons?: string[];
|
|
1161
|
+
};
|
|
1162
|
+
category?: string;
|
|
1163
|
+
disabled?: boolean;
|
|
1164
|
+
filtered?: boolean;
|
|
1165
|
+
actionIcon?: {
|
|
1166
|
+
/** icon can also include the set in the format of `icon:set` */
|
|
1167
|
+
icon: string;
|
|
1168
|
+
color?: string;
|
|
1178
1169
|
label?: string;
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
active?: boolean;
|
|
1192
|
-
children?: EuiMenuItem[];
|
|
1193
|
-
parent?: EuiMenuItem;
|
|
1194
|
-
visible?: boolean;
|
|
1195
|
-
tagLabel?: string;
|
|
1196
|
-
tagTypeClass?: string;
|
|
1197
|
-
tooltip?: string;
|
|
1198
|
-
hasMarker?: boolean;
|
|
1199
|
-
markerTypeClass?: string;
|
|
1200
|
-
/**
|
|
1201
|
-
* Optional status descriptor rendered in the menu item's end block: a status tag plus a group
|
|
1202
|
-
* of small status icons. Independent of `tagLabel` / `hasMarker` and purely additive.
|
|
1203
|
-
*/
|
|
1204
|
-
statusMetadata?: {
|
|
1205
|
-
/** Short status label (e.g. `DRAFT`, `DEMO`). */
|
|
1206
|
-
status?: string;
|
|
1207
|
-
/** Marker color variant (e.g. `info`, `danger`, `success`); drives the left circle-fill marker. */
|
|
1208
|
-
colorVariant?: string;
|
|
1209
|
-
/** Icon keys rendered as small `eui-icon-svg` in the end block (e.g. `wc`, `react`, `figma`). */
|
|
1210
|
-
statusIcons?: string[];
|
|
1211
|
-
};
|
|
1212
|
-
category?: string;
|
|
1213
|
-
disabled?: boolean;
|
|
1214
|
-
filtered?: boolean;
|
|
1215
|
-
actionIcon?: {
|
|
1216
|
-
/** icon can also include the set in the format of `icon:set` */
|
|
1217
|
-
icon: string;
|
|
1218
|
-
color?: string;
|
|
1219
|
-
label?: string;
|
|
1220
|
-
action?: (event: unknown) => void;
|
|
1221
|
-
};
|
|
1222
|
-
command?: (...params: any[]) => void;
|
|
1223
|
-
allowedRightId?: string;
|
|
1224
|
-
allowedRightIds?: string[];
|
|
1225
|
-
deniedRightId?: string;
|
|
1226
|
-
deniedRightIds?: string[];
|
|
1227
|
-
metadata?: METADATA;
|
|
1228
|
-
isMegaMenu?: boolean;
|
|
1229
|
-
megaMenuColIndex?: number;
|
|
1230
|
-
megaMenuColLabel?: string;
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1170
|
+
action?: (event: unknown) => void;
|
|
1171
|
+
};
|
|
1172
|
+
command?: (...params: any[]) => void;
|
|
1173
|
+
allowedRightId?: string;
|
|
1174
|
+
allowedRightIds?: string[];
|
|
1175
|
+
deniedRightId?: string;
|
|
1176
|
+
deniedRightIds?: string[];
|
|
1177
|
+
metadata?: METADATA;
|
|
1178
|
+
isMegaMenu?: boolean;
|
|
1179
|
+
megaMenuColIndex?: number;
|
|
1180
|
+
megaMenuColLabel?: string;
|
|
1181
|
+
}
|
|
1233
1182
|
/**
|
|
1234
1183
|
* Is used to define the structure of objects used for handling messages or notifications in a user interface. It allows
|
|
1235
1184
|
* for flexibility by allowing additional custom properties while also providing a set of predefined properties like
|
|
1236
1185
|
* severity, summary, detail, life, and sticky for common message attributes.
|
|
1237
1186
|
*/
|
|
1238
|
-
interface EuiGrowlMessage {
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1187
|
+
export interface EuiGrowlMessage {
|
|
1188
|
+
severity?: 'success' | 'warning' | 'info' | 'danger' | string;
|
|
1189
|
+
summary?: string;
|
|
1190
|
+
detail?: string;
|
|
1191
|
+
life?: number;
|
|
1192
|
+
sticky?: boolean;
|
|
1193
|
+
filled?: boolean;
|
|
1194
|
+
/**
|
|
1195
|
+
* The timeout property is used to define the time in milliseconds before the message is automatically removed from the
|
|
1196
|
+
* user interface. This property is only used when the sticky property is set to false.
|
|
1197
|
+
*/
|
|
1198
|
+
timeout?: number;
|
|
1199
|
+
/** @internal */
|
|
1200
|
+
dismissed?: boolean;
|
|
1252
1201
|
}
|
|
1253
|
-
|
|
1254
1202
|
/**
|
|
1255
1203
|
* polyfill for usage of crypto.randomUUID() on non HTTPS environments EUI-10272
|
|
1256
1204
|
* Please remove in the future when EC Policy for HTTPS is enforced.
|
|
1257
1205
|
*/
|
|
1258
|
-
type UUID = `${string}-${string}-${string}-${string}-${string}`;
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
export type { ApiQueue, ApiQueueItem, AppState, ConnectionStatus, ConsoleAppenderConfig, ConsoleAppenderPrefixConverters, ConsoleAppenderTypeConfig, CoreState, DeepPartial, EnvDynamicConfig, ErrorMappingHandler, EuiAppConfig, EuiAppHandlersConfig, EuiAppJsonConfig, EuiAuthConfig, EuiConfig, EuiEnvConfig, EuiGlobalConfig, EuiGrowlMessage, EuiLanguage, EuiLanguageCode, EuiMenuItem, EuiPaginationConfig, EuiServiceModel, EuiServiceStatus, EuiStoreServiceModel, EuiUserRight, GlobalConfig, HttpErrorCallbackFn, HttpErrorHandlerConfig, HttpErrorRouteConfig, I18nConfig, I18nLoaderConfig, I18nResource, I18nServiceConfig, I18nState, LoadedConfigModules, LocaleServiceConfig, LocaleState, LogAppenderConfig, LogAppenderType, LogAppenderTypeConfig, LogConfig, LogEvent, LogPosition, ModuleConfig, ModulesConfig, NotificationsState, SubErrors, TranslationsCompiler, UUID, UrlAppenderConfig, UrlAppenderTypeConfig, UrlLogEvent, UserConfig, UserDetails, UserPreferences, UserState, UxErrorFeedback, UxErrorFeedbackEventType, UxErrorFollowMap, UxErrorGroupItem, UxErrorGroupMap, UxErrorInfo, UxErrorMessage, UxFormValidationError, UxHttpErrorInfo, UxHttpErrorResponse, UxModalLegacy, UxValidationErrorAttribute, UxValidationErrorAttributes, UxValidationErrorFeedback, UxValidationErrorI18nMessage, VersionsConfig, XHRConfig };
|
|
1262
|
-
//# sourceMappingURL=eui-base.d.ts.map
|
|
1206
|
+
export type UUID = `${string}-${string}-${string}-${string}-${string}`;
|
|
1207
|
+
export {};
|
|
1208
|
+
//# sourceMappingURL=eui-base.d.ts.map
|