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