@genesislcap/foundation-errors 10.3.1 → 11.3.1
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/README.md +57 -0
- package/dist/dts/banner/error-banner-builder.d.ts +25 -0
- package/dist/dts/banner/error-banner-builder.d.ts.map +1 -1
- package/dist/dts/dialog/error-dialog-builder.d.ts +25 -0
- package/dist/dts/dialog/error-dialog-builder.d.ts.map +1 -1
- package/dist/dts/dialog/error-dialog-launcher.d.ts +1 -1
- package/dist/dts/dialog/error-dialog-launcher.d.ts.map +1 -1
- package/dist/dts/error-builder.d.ts +60 -0
- package/dist/dts/error-builder.d.ts.map +1 -1
- package/dist/dts/error-launcher.d.ts.map +1 -1
- package/dist/dts/logger.d.ts.map +1 -1
- package/dist/dts/notification/notification-builder.d.ts +32 -2
- package/dist/dts/notification/notification-builder.d.ts.map +1 -1
- package/dist/dts/notification/notification-launcher.d.ts +1 -1
- package/dist/dts/notification/notification-launcher.d.ts.map +1 -1
- package/dist/dts/snackbar/snackbar-builder.d.ts +15 -7
- package/dist/dts/snackbar/snackbar-builder.d.ts.map +1 -1
- package/dist/dts/snackbar/snackbar-launcher.d.ts +1 -1
- package/dist/dts/snackbar/snackbar-launcher.d.ts.map +1 -1
- package/dist/dts/types.d.ts +50 -2
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/esm/banner/error-banner-builder.js +25 -1
- package/dist/esm/banner/index.js +0 -1
- package/dist/esm/dialog/error-dialog-builder.js +25 -1
- package/dist/esm/dialog/error-dialog-launcher.js +1 -2
- package/dist/esm/dialog/index.js +0 -1
- package/dist/esm/error-builder.js +60 -1
- package/dist/esm/error-launcher.js +2 -3
- package/dist/esm/error-util.js +0 -1
- package/dist/esm/index.federated.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/logger.js +0 -1
- package/dist/esm/notification/index.js +0 -1
- package/dist/esm/notification/notification-builder.js +30 -1
- package/dist/esm/notification/notification-launcher.js +1 -2
- package/dist/esm/snackbar/index.js +0 -1
- package/dist/esm/snackbar/snackbar-builder.js +13 -6
- package/dist/esm/snackbar/snackbar-launcher.js +1 -2
- package/dist/esm/types.js +4 -1
- package/dist/foundation-errors.api.json +103 -250
- package/dist/foundation-errors.d.ts +210 -12
- package/docs/.gitattributes +2 -0
- package/docs/api/foundation-errors.confirmingaction.md +2 -0
- package/docs/api/foundation-errors.dismissingaction.md +2 -0
- package/docs/api/foundation-errors.errorbanner.md +2 -0
- package/docs/api/foundation-errors.errorbannerbuilder.build.md +4 -0
- package/docs/api/foundation-errors.errorbannerbuilder.md +5 -3
- package/docs/api/foundation-errors.errorbannerbuilder.withconfirmingaction.md +4 -1
- package/docs/api/foundation-errors.errorbannerbuilder.withdismissingaction.md +4 -1
- package/docs/api/foundation-errors.errorboundaryevent.md +2 -0
- package/docs/api/foundation-errors.errorbuilder.build.md +3 -0
- package/docs/api/foundation-errors.errorbuilder.md +11 -9
- package/docs/api/foundation-errors.errorbuilder.withalert.md +4 -1
- package/docs/api/foundation-errors.errorbuilder.withbanner.md +4 -1
- package/docs/api/foundation-errors.errorbuilder.withdialog.md +4 -1
- package/docs/api/foundation-errors.errorbuilder.witherrordetails.md +4 -1
- package/docs/api/foundation-errors.errorbuilder.withloglevel.md +3 -0
- package/docs/api/foundation-errors.errorbuilder.withnotification.md +4 -1
- package/docs/api/foundation-errors.errorbuilder.withsnackbar.md +4 -1
- package/docs/api/foundation-errors.errorbuilder.withtitle.md +4 -1
- package/docs/api/foundation-errors.errordialog.md +2 -0
- package/docs/api/foundation-errors.errordialogbuilder.build.md +4 -0
- package/docs/api/foundation-errors.errordialogbuilder.md +5 -3
- package/docs/api/foundation-errors.errordialogbuilder.withconfirmingaction.md +4 -1
- package/docs/api/foundation-errors.errordialogbuilder.withdismissingaction.md +4 -1
- package/docs/api/foundation-errors.errornotification.md +3 -1
- package/docs/api/foundation-errors.errornotification.type.md +1 -1
- package/docs/api/foundation-errors.errornotificationtype.md +13 -0
- package/docs/api/foundation-errors.errorstructure.md +2 -0
- package/docs/api/foundation-errors.geterrorbannerbuilder.md +2 -0
- package/docs/api/foundation-errors.geterrorbuilder.md +2 -0
- package/docs/api/foundation-errors.geterrordialogbuilder.md +2 -0
- package/docs/api/foundation-errors.getnotificationbuilder.md +2 -0
- package/docs/api/foundation-errors.getsnackbarbuilder.md +2 -0
- package/docs/api/foundation-errors.md +20 -23
- package/docs/api/foundation-errors.notificationbuilder.build.md +4 -0
- package/docs/api/foundation-errors.notificationbuilder.md +6 -4
- package/docs/api/foundation-errors.notificationbuilder.withautoclose.md +4 -1
- package/docs/api/foundation-errors.notificationbuilder.withclosetimeout.md +4 -1
- package/docs/api/foundation-errors.notificationbuilder.withtype.md +5 -2
- package/docs/api/foundation-errors.snackbar.md +3 -1
- package/docs/api/foundation-errors.snackbar.type.md +1 -1
- package/docs/api/foundation-errors.snackbarbuilder.md +3 -1
- package/docs/api/foundation-errors.snackbarbuilder.withconfirmingaction.md +1 -1
- package/docs/api/foundation-errors.snackbarbuilder.withtype.md +3 -3
- package/docs/api/foundation-errors.snackbartype.md +13 -0
- package/docs/api-report.md +43 -46
- package/package.json +8 -8
- package/dist/1.0.0.remoteEntry.js +0 -1
- package/dist/145.145.48c3a34dc8598a016d9b.js +0 -2
- package/dist/145.9debf52d04b6fdb805987fa6a56e9266.js.map +0 -1
- package/dist/191.191.da8a5884febca6f1a439.js +0 -2
- package/dist/191.efd2fea1a42a47cddbf6e6ab15fbf2bb.js.map +0 -1
- package/dist/366.366.82702b77300a9353fc87.js +0 -2
- package/dist/366.a181180b871f72ff9f4ad3e3f3ea3734.js.map +0 -1
- package/dist/755.62d9698f4e62142b980949b517fded3f.js.map +0 -1
- package/dist/755.755.f8db61516204a76477a8.js +0 -2
- package/dist/dashboard.json +0 -1
- package/dist/esm/banner/error-banner-builder.js.map +0 -1
- package/dist/esm/banner/index.js.map +0 -1
- package/dist/esm/dialog/error-dialog-builder.js.map +0 -1
- package/dist/esm/dialog/error-dialog-launcher.js.map +0 -1
- package/dist/esm/dialog/index.js.map +0 -1
- package/dist/esm/error-builder.js.map +0 -1
- package/dist/esm/error-launcher.js.map +0 -1
- package/dist/esm/error-util.js.map +0 -1
- package/dist/esm/index.federated.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/logger.js.map +0 -1
- package/dist/esm/notification/index.js.map +0 -1
- package/dist/esm/notification/notification-builder.js.map +0 -1
- package/dist/esm/notification/notification-launcher.js.map +0 -1
- package/dist/esm/snackbar/index.js.map +0 -1
- package/dist/esm/snackbar/snackbar-builder.js.map +0 -1
- package/dist/esm/snackbar/snackbar-launcher.js.map +0 -1
- package/dist/esm/types.js.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/foundation-errors.iife.min.js +0 -1
- package/dist/foundation-errors.js +0 -1240
- package/dist/foundation-errors.min.js +0 -1
- package/dist/foundationErrors.2c93e6eb2ef9200237968325716b6236.js.map +0 -1
- package/dist/index.ejs +0 -23
- package/dist/index.html +0 -10
- package/dist/info.ejs +0 -13
- package/dist/info.html +0 -14
- package/dist/main.32b6b5ccbc4fb35f99c6.js +0 -2
- package/dist/main.48adf629bdf2e8347fb7dc199f202017.js.map +0 -1
- package/dist/npm.consola.713.6bcc5abc1500250af5f5.js +0 -2
- package/dist/npm.consola.de429dd64b8dd7d3424e047e422d6ee1.js.map +0 -1
- package/dist/npm.microsoft.127.821cbcff47e0a34e88c9.js +0 -3
- package/dist/npm.microsoft.127.821cbcff47e0a34e88c9.js.LICENSE.txt +0 -14
- package/dist/npm.microsoft.4ae729aafa2e074df718ae9a73d16fa1.js.map +0 -1
- package/dist/remoteEntry.js +0 -2
- package/dist/serve.json +0 -3
- package/docs/api/foundation-errors.errordialogelement.md +0 -15
- package/docs/api/foundation-errors.errorelement.md +0 -15
- package/docs/api/foundation-errors.showdialog.md +0 -13
- package/docs/api/foundation-errors.shownotification.md +0 -13
- package/docs/api/foundation-errors.showsnackbar.md +0 -13
|
@@ -1,32 +1,73 @@
|
|
|
1
1
|
import { LogLevel } from '@genesislcap/foundation-utils';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Interface for Confirming Action configuration
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
3
7
|
export declare interface ConfirmingAction {
|
|
4
8
|
readonly label: String;
|
|
5
9
|
readonly action: Function;
|
|
6
10
|
}
|
|
7
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Interface for Dismissing Action configuration
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
8
16
|
export declare interface DismissingAction {
|
|
9
17
|
readonly label: String;
|
|
10
18
|
readonly action?: Function;
|
|
11
19
|
}
|
|
12
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Interface for Error Banner configuration
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
13
25
|
export declare interface ErrorBanner {
|
|
14
26
|
readonly dismissingAction?: DismissingAction;
|
|
15
27
|
readonly confirmingActions?: Array<ConfirmingAction>;
|
|
16
28
|
}
|
|
17
29
|
|
|
30
|
+
/**
|
|
31
|
+
* ErrorBannerBuilder to build ErrorBanner
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
18
34
|
export declare class ErrorBannerBuilder {
|
|
19
35
|
private dismissingAction;
|
|
20
36
|
private confirmingActions;
|
|
37
|
+
/**
|
|
38
|
+
* Add dismissing action to ErrorBanner
|
|
39
|
+
* @public
|
|
40
|
+
* @param dismissingAction - {@link DismissingAction}
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
21
43
|
withDismissingAction(dismissingAction: DismissingAction): ErrorBannerBuilder;
|
|
44
|
+
/**
|
|
45
|
+
* Add confirming action to ErrorBanner
|
|
46
|
+
* @public
|
|
47
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
22
50
|
withConfirmingAction(confirmingAction: ConfirmingAction): ErrorBannerBuilder;
|
|
51
|
+
/**
|
|
52
|
+
* Build ErrorBanner
|
|
53
|
+
* @public
|
|
54
|
+
* @returns ErrorBanner
|
|
55
|
+
*/
|
|
23
56
|
build(): ErrorBanner;
|
|
24
57
|
}
|
|
25
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
* enum for different types of error boundary events
|
|
62
|
+
*/
|
|
26
63
|
export declare enum ErrorBoundaryEvent {
|
|
27
64
|
ERROR_BOUNDARY_EVENT = "error-boundary-event"
|
|
28
65
|
}
|
|
29
66
|
|
|
67
|
+
/**
|
|
68
|
+
* ErrorBuilder to build ErrorStructure
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
30
71
|
export declare class ErrorBuilder {
|
|
31
72
|
private title;
|
|
32
73
|
private errorDetails;
|
|
@@ -36,44 +77,141 @@ export declare class ErrorBuilder {
|
|
|
36
77
|
private banner;
|
|
37
78
|
private snackbar;
|
|
38
79
|
private dialog;
|
|
80
|
+
/**
|
|
81
|
+
* Add title to error
|
|
82
|
+
* @public
|
|
83
|
+
* @param title - string
|
|
84
|
+
* @returns
|
|
85
|
+
*/
|
|
39
86
|
withTitle(title: string): ErrorBuilder;
|
|
87
|
+
/**
|
|
88
|
+
* Add error details to error
|
|
89
|
+
* @public
|
|
90
|
+
* @param errorDetails - string
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
40
93
|
withErrorDetails(errorDetails: string): ErrorBuilder;
|
|
94
|
+
/**
|
|
95
|
+
* Add log level to error
|
|
96
|
+
* @public
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
41
99
|
withLogLevel(logLevel: LogLevel): ErrorBuilder;
|
|
100
|
+
/**
|
|
101
|
+
* Add alert to error
|
|
102
|
+
* @public
|
|
103
|
+
* @param alert - boolean
|
|
104
|
+
* @returns
|
|
105
|
+
*/
|
|
42
106
|
withAlert(alert: boolean): ErrorBuilder;
|
|
107
|
+
/**
|
|
108
|
+
* Add notification to error
|
|
109
|
+
* @public
|
|
110
|
+
* @param notification - {@link ErrorNotification}
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
43
113
|
withNotification(notification: ErrorNotification): ErrorBuilder;
|
|
114
|
+
/**
|
|
115
|
+
* Add banner to error
|
|
116
|
+
* @public
|
|
117
|
+
* @param banner - {@link ErrorBanner}
|
|
118
|
+
* @returns
|
|
119
|
+
*/
|
|
44
120
|
withBanner(banner: ErrorBanner): ErrorBuilder;
|
|
121
|
+
/**
|
|
122
|
+
* Add snackbar to error
|
|
123
|
+
* @public
|
|
124
|
+
* @param snackbar - {@link Snackbar}
|
|
125
|
+
* @returns
|
|
126
|
+
*/
|
|
45
127
|
withSnackbar(snackbar: Snackbar): ErrorBuilder;
|
|
128
|
+
/**
|
|
129
|
+
* Add dialog to error
|
|
130
|
+
* @public
|
|
131
|
+
* @param dialog - {@link ErrorDialog}
|
|
132
|
+
* @returns
|
|
133
|
+
*/
|
|
46
134
|
withDialog(dialog: ErrorDialog): ErrorBuilder;
|
|
135
|
+
/**
|
|
136
|
+
* Build ErrorStructure
|
|
137
|
+
* @public
|
|
138
|
+
* @returns
|
|
139
|
+
*/
|
|
47
140
|
build(): ErrorStructure;
|
|
48
141
|
}
|
|
49
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Interface for Error Dialog configuration
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
50
147
|
export declare interface ErrorDialog {
|
|
51
148
|
readonly confirmingActions?: Array<ConfirmingAction>;
|
|
52
149
|
readonly dismissingAction?: DismissingAction;
|
|
53
150
|
}
|
|
54
151
|
|
|
152
|
+
/**
|
|
153
|
+
* ErrorDialogBuilder class
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
55
156
|
export declare class ErrorDialogBuilder {
|
|
56
157
|
private dismissingAction;
|
|
57
158
|
private confirmingActions;
|
|
159
|
+
/**
|
|
160
|
+
* Add dismissing action to ErrorDialog
|
|
161
|
+
* @public
|
|
162
|
+
* @param dismissingAction - {@link DismissingAction}
|
|
163
|
+
* @returns
|
|
164
|
+
*/
|
|
58
165
|
withDismissingAction(dismissingAction: DismissingAction): ErrorDialogBuilder;
|
|
166
|
+
/**
|
|
167
|
+
* Add confirming action to ErrorDialog
|
|
168
|
+
* @public
|
|
169
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
170
|
+
* @returns
|
|
171
|
+
*/
|
|
59
172
|
withConfirmingAction(confirmingAction: ConfirmingAction): ErrorDialogBuilder;
|
|
173
|
+
/**
|
|
174
|
+
* Build ErrorDialog
|
|
175
|
+
* @public
|
|
176
|
+
* @returns ErrorDialog
|
|
177
|
+
*/
|
|
60
178
|
build(): ErrorDialog;
|
|
61
179
|
}
|
|
62
180
|
|
|
181
|
+
/**
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
63
184
|
export declare type ErrorDialogElement = ErrorElement & {
|
|
64
185
|
show: Function;
|
|
65
186
|
};
|
|
66
187
|
|
|
188
|
+
/**
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
67
191
|
export declare type ErrorElement = HTMLElement & {
|
|
68
192
|
error: ErrorStructure;
|
|
69
193
|
};
|
|
70
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Interface for Error Notification configuration
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
71
199
|
export declare interface ErrorNotification {
|
|
72
|
-
readonly type?:
|
|
200
|
+
readonly type?: ErrorNotificationType;
|
|
73
201
|
readonly autoClose?: boolean;
|
|
74
202
|
readonly closeTimeout?: number;
|
|
75
203
|
}
|
|
76
204
|
|
|
205
|
+
/**
|
|
206
|
+
* @public
|
|
207
|
+
* type for error notification type
|
|
208
|
+
*/
|
|
209
|
+
export declare type ErrorNotificationType = 'warning' | 'success';
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Interface for Error Structure
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
77
215
|
export declare interface ErrorStructure {
|
|
78
216
|
readonly title: string;
|
|
79
217
|
readonly errorDetails: string;
|
|
@@ -91,8 +229,16 @@ export declare interface ErrorStructure {
|
|
|
91
229
|
};
|
|
92
230
|
}
|
|
93
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Get error banner builder instance
|
|
234
|
+
* @public
|
|
235
|
+
*/
|
|
94
236
|
export declare const getErrorBannerBuilder: () => ErrorBannerBuilder;
|
|
95
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Returns a new ErrorBuilder instance
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
96
242
|
export declare const getErrorBuilder: () => ErrorBuilder;
|
|
97
243
|
|
|
98
244
|
/**
|
|
@@ -112,6 +258,10 @@ export declare const getErrorContainer: (id: string, tagName: String) => HTMLEle
|
|
|
112
258
|
*/
|
|
113
259
|
export declare const getErrorDetails: (details: ErrorStructure) => string;
|
|
114
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Returns an instance of ErrorDialogBuilder
|
|
263
|
+
* @public
|
|
264
|
+
*/
|
|
115
265
|
export declare const getErrorDialogBuilder: () => ErrorDialogBuilder;
|
|
116
266
|
|
|
117
267
|
/**
|
|
@@ -122,23 +272,57 @@ export declare const getErrorDialogBuilder: () => ErrorDialogBuilder;
|
|
|
122
272
|
*/
|
|
123
273
|
export declare const getLoglevel: (details: ErrorStructure) => LogLevel;
|
|
124
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Get notification builder instance
|
|
277
|
+
* @public
|
|
278
|
+
*/
|
|
125
279
|
export declare const getNotificationBuilder: () => NotificationBuilder;
|
|
126
280
|
|
|
281
|
+
/**
|
|
282
|
+
* Get snackbar builder instance
|
|
283
|
+
* @public
|
|
284
|
+
*/
|
|
127
285
|
export declare const getSnackbarBuilder: () => SnackbarBuilder;
|
|
128
286
|
|
|
287
|
+
/**
|
|
288
|
+
* NotificationBuilder to build ErrorNotification
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
129
291
|
export declare class NotificationBuilder {
|
|
130
292
|
private autoClose;
|
|
131
293
|
private closeTimeout;
|
|
132
294
|
private type;
|
|
295
|
+
/**
|
|
296
|
+
* Add auto close to notification
|
|
297
|
+
* @public
|
|
298
|
+
* @param autoClose - boolean
|
|
299
|
+
* @returns
|
|
300
|
+
*/
|
|
133
301
|
withAutoClose(autoClose: boolean): NotificationBuilder;
|
|
302
|
+
/**
|
|
303
|
+
* Add close timeout to notification
|
|
304
|
+
* @public
|
|
305
|
+
* @param closeTimeout - number
|
|
306
|
+
* @returns
|
|
307
|
+
*/
|
|
134
308
|
withCloseTimeout(closeTimeout: number): NotificationBuilder;
|
|
135
|
-
|
|
309
|
+
/**
|
|
310
|
+
* Add type to notification, if the type is anything other than 'warning' or 'success' do not add it
|
|
311
|
+
* @public
|
|
312
|
+
* @param type - {@link ErrorNotificationType}
|
|
313
|
+
* @returns
|
|
314
|
+
*/
|
|
315
|
+
withType(type: ErrorNotificationType): NotificationBuilder;
|
|
316
|
+
/**
|
|
317
|
+
* Build notification
|
|
318
|
+
* @returns ErrorNotification
|
|
319
|
+
*/
|
|
136
320
|
build(): ErrorNotification;
|
|
137
321
|
}
|
|
138
322
|
|
|
139
323
|
/**
|
|
140
324
|
* Shows the error dialog
|
|
141
|
-
* @
|
|
325
|
+
* @internal
|
|
142
326
|
* @param error - The ErrorStructure object
|
|
143
327
|
* @param tagName - The tag name to create prefix for the design system provider & error component
|
|
144
328
|
* @returns
|
|
@@ -156,7 +340,7 @@ export declare const showError: (error: ErrorStructure, tagName: String) => void
|
|
|
156
340
|
|
|
157
341
|
/**
|
|
158
342
|
* Shows the error notification
|
|
159
|
-
* @
|
|
343
|
+
* @internal
|
|
160
344
|
* @param error - The ErrorStructure object
|
|
161
345
|
* @param tagName - The tag name to create prefix for the design system provider & error component
|
|
162
346
|
* @returns
|
|
@@ -165,41 +349,55 @@ export declare const showNotification: (error: ErrorStructure, tagName: String)
|
|
|
165
349
|
|
|
166
350
|
/**
|
|
167
351
|
* Shows the snackbar
|
|
168
|
-
* @
|
|
352
|
+
* @internal
|
|
169
353
|
* @param error - The ErrorStructure object
|
|
170
354
|
* @param tagName - The tag name to create prefix for the design system provider & error component
|
|
171
355
|
* @returns
|
|
172
356
|
* */
|
|
173
357
|
export declare const showSnackbar: (error: ErrorStructure, tagName: String) => void;
|
|
174
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Interface for Error Snackbar configuration
|
|
361
|
+
* @public
|
|
362
|
+
*/
|
|
175
363
|
export declare interface Snackbar {
|
|
176
|
-
readonly type?:
|
|
364
|
+
readonly type?: SnackbarType;
|
|
177
365
|
readonly confirmingActions?: Array<ConfirmingAction>;
|
|
178
366
|
}
|
|
179
367
|
|
|
368
|
+
/**
|
|
369
|
+
* SnackbarBuilder to build Snackbar
|
|
370
|
+
* @public
|
|
371
|
+
*/
|
|
180
372
|
export declare class SnackbarBuilder {
|
|
181
373
|
private confirmingActions;
|
|
182
374
|
private type;
|
|
183
375
|
/**
|
|
184
|
-
* Add type to snackbar
|
|
376
|
+
* Add type to snackbar, if the type is anything other than 'error' do not add it
|
|
185
377
|
* @public
|
|
186
|
-
* @param type
|
|
378
|
+
* @param type - {@link SnackbarType}
|
|
187
379
|
* @returns
|
|
188
380
|
*/
|
|
189
|
-
withType(type:
|
|
381
|
+
withType(type: SnackbarType): SnackbarBuilder;
|
|
190
382
|
/**
|
|
191
383
|
* Add confirming action to snackbar
|
|
192
384
|
* @public
|
|
193
|
-
* @param confirmingAction
|
|
385
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
194
386
|
* @returns
|
|
195
|
-
|
|
387
|
+
*/
|
|
196
388
|
withConfirmingAction(confirmingAction: ConfirmingAction): SnackbarBuilder;
|
|
197
389
|
/**
|
|
198
390
|
* Build snackbar
|
|
199
391
|
* @public
|
|
200
392
|
* @returns Snackbar
|
|
201
|
-
|
|
393
|
+
*/
|
|
202
394
|
build(): Snackbar;
|
|
203
395
|
}
|
|
204
396
|
|
|
397
|
+
/**
|
|
398
|
+
* @public
|
|
399
|
+
* type for snackbar type
|
|
400
|
+
*/
|
|
401
|
+
export declare type SnackbarType = 'error';
|
|
402
|
+
|
|
205
403
|
export { }
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBannerBuilder class
|
|
6
6
|
|
|
7
|
+
ErrorBannerBuilder to build ErrorBanner
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,7 +16,7 @@ export declare class ErrorBannerBuilder
|
|
|
14
16
|
|
|
15
17
|
| Method | Modifiers | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| [build()](./foundation-errors.errorbannerbuilder.build.md) | |
|
|
18
|
-
| [withConfirmingAction(confirmingAction)](./foundation-errors.errorbannerbuilder.withconfirmingaction.md) | |
|
|
19
|
-
| [withDismissingAction(dismissingAction)](./foundation-errors.errorbannerbuilder.withdismissingaction.md) | |
|
|
19
|
+
| [build()](./foundation-errors.errorbannerbuilder.build.md) | | Build ErrorBanner |
|
|
20
|
+
| [withConfirmingAction(confirmingAction)](./foundation-errors.errorbannerbuilder.withconfirmingaction.md) | | Add confirming action to ErrorBanner |
|
|
21
|
+
| [withDismissingAction(dismissingAction)](./foundation-errors.errorbannerbuilder.withdismissingaction.md) | | Add dismissing action to ErrorBanner |
|
|
20
22
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBannerBuilder.withConfirmingAction() method
|
|
6
6
|
|
|
7
|
+
Add confirming action to ErrorBanner
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withConfirmingAction(confirmingAction: ConfirmingAction): ErrorBannerBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| confirmingAction | [ConfirmingAction](./foundation-errors.confirmingaction.md) |
|
|
19
|
+
| confirmingAction | [ConfirmingAction](./foundation-errors.confirmingaction.md) | [ConfirmingAction](./foundation-errors.confirmingaction.md) |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBannerBuilder](./foundation-errors.errorbannerbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBannerBuilder.withDismissingAction() method
|
|
6
6
|
|
|
7
|
+
Add dismissing action to ErrorBanner
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withDismissingAction(dismissingAction: DismissingAction): ErrorBannerBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| dismissingAction | [DismissingAction](./foundation-errors.dismissingaction.md) |
|
|
19
|
+
| dismissingAction | [DismissingAction](./foundation-errors.dismissingaction.md) | [DismissingAction](./foundation-errors.dismissingaction.md) |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBannerBuilder](./foundation-errors.errorbannerbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder class
|
|
6
6
|
|
|
7
|
+
ErrorBuilder to build ErrorStructure
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,13 +16,13 @@ export declare class ErrorBuilder
|
|
|
14
16
|
|
|
15
17
|
| Method | Modifiers | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| [build()](./foundation-errors.errorbuilder.build.md) | |
|
|
18
|
-
| [withAlert(alert)](./foundation-errors.errorbuilder.withalert.md) | |
|
|
19
|
-
| [withBanner(banner)](./foundation-errors.errorbuilder.withbanner.md) | |
|
|
20
|
-
| [withDialog(dialog)](./foundation-errors.errorbuilder.withdialog.md) | |
|
|
21
|
-
| [withErrorDetails(errorDetails)](./foundation-errors.errorbuilder.witherrordetails.md) | |
|
|
22
|
-
| [withLogLevel(logLevel)](./foundation-errors.errorbuilder.withloglevel.md) | |
|
|
23
|
-
| [withNotification(notification)](./foundation-errors.errorbuilder.withnotification.md) | |
|
|
24
|
-
| [withSnackbar(snackbar)](./foundation-errors.errorbuilder.withsnackbar.md) | |
|
|
25
|
-
| [withTitle(title)](./foundation-errors.errorbuilder.withtitle.md) | |
|
|
19
|
+
| [build()](./foundation-errors.errorbuilder.build.md) | | Build ErrorStructure |
|
|
20
|
+
| [withAlert(alert)](./foundation-errors.errorbuilder.withalert.md) | | Add alert to error |
|
|
21
|
+
| [withBanner(banner)](./foundation-errors.errorbuilder.withbanner.md) | | Add banner to error |
|
|
22
|
+
| [withDialog(dialog)](./foundation-errors.errorbuilder.withdialog.md) | | Add dialog to error |
|
|
23
|
+
| [withErrorDetails(errorDetails)](./foundation-errors.errorbuilder.witherrordetails.md) | | Add error details to error |
|
|
24
|
+
| [withLogLevel(logLevel)](./foundation-errors.errorbuilder.withloglevel.md) | | Add log level to error |
|
|
25
|
+
| [withNotification(notification)](./foundation-errors.errorbuilder.withnotification.md) | | Add notification to error |
|
|
26
|
+
| [withSnackbar(snackbar)](./foundation-errors.errorbuilder.withsnackbar.md) | | Add snackbar to error |
|
|
27
|
+
| [withTitle(title)](./foundation-errors.errorbuilder.withtitle.md) | | Add title to error |
|
|
26
28
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder.withAlert() method
|
|
6
6
|
|
|
7
|
+
Add alert to error
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withAlert(alert: boolean): ErrorBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| alert | boolean |
|
|
19
|
+
| alert | boolean | boolean |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBuilder](./foundation-errors.errorbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder.withBanner() method
|
|
6
6
|
|
|
7
|
+
Add banner to error
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withBanner(banner: ErrorBanner): ErrorBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| banner | [ErrorBanner](./foundation-errors.errorbanner.md) |
|
|
19
|
+
| banner | [ErrorBanner](./foundation-errors.errorbanner.md) | [ErrorBanner](./foundation-errors.errorbanner.md) |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBuilder](./foundation-errors.errorbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder.withDialog() method
|
|
6
6
|
|
|
7
|
+
Add dialog to error
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withDialog(dialog: ErrorDialog): ErrorBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| dialog | [ErrorDialog](./foundation-errors.errordialog.md) |
|
|
19
|
+
| dialog | [ErrorDialog](./foundation-errors.errordialog.md) | [ErrorDialog](./foundation-errors.errordialog.md) |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBuilder](./foundation-errors.errorbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder.withErrorDetails() method
|
|
6
6
|
|
|
7
|
+
Add error details to error
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withErrorDetails(errorDetails: string): ErrorBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| errorDetails | string |
|
|
19
|
+
| errorDetails | string | string |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBuilder](./foundation-errors.errorbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder.withNotification() method
|
|
6
6
|
|
|
7
|
+
Add notification to error
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withNotification(notification: ErrorNotification): ErrorBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| notification | [ErrorNotification](./foundation-errors.errornotification.md) |
|
|
19
|
+
| notification | [ErrorNotification](./foundation-errors.errornotification.md) | [ErrorNotification](./foundation-errors.errornotification.md) |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBuilder](./foundation-errors.errorbuilder.md)
|
|
22
24
|
|
|
25
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## ErrorBuilder.withSnackbar() method
|
|
6
6
|
|
|
7
|
+
Add snackbar to error
|
|
8
|
+
|
|
7
9
|
**Signature:**
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,9 +16,10 @@ withSnackbar(snackbar: Snackbar): ErrorBuilder;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| snackbar | [Snackbar](./foundation-errors.snackbar.md) |
|
|
19
|
+
| snackbar | [Snackbar](./foundation-errors.snackbar.md) | [Snackbar](./foundation-errors.snackbar.md) |
|
|
18
20
|
|
|
19
21
|
**Returns:**
|
|
20
22
|
|
|
21
23
|
[ErrorBuilder](./foundation-errors.errorbuilder.md)
|
|
22
24
|
|
|
25
|
+
|