@genesislcap/foundation-errors 10.3.1 → 11.3.0
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
package/README.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# Genesis Foundation UI Error Utils
|
|
2
2
|
|
|
3
|
+
[](https://lerna.js.org/)
|
|
4
|
+
[](https://www.typescriptlang.org/)
|
|
5
|
+
|
|
6
|
+
### [API Docs](./docs/api/index.md)
|
|
7
|
+
|
|
8
|
+
### Usage
|
|
9
|
+
|
|
10
|
+
* The App need to create Error boundary component at top of the component tree.
|
|
11
|
+
|
|
12
|
+
* Any child under Error boundary component can dispatch custom Error event
|
|
13
|
+
|
|
14
|
+
* The custom event is handled by Error boundary component and based on event payload
|
|
15
|
+
it displays error on different Error component
|
|
16
|
+
|
|
17
|
+
### Current Implementation support following Error Components
|
|
18
|
+
|
|
19
|
+
* Alert
|
|
20
|
+
* Toast
|
|
21
|
+
* Banner
|
|
22
|
+
* Snack bar
|
|
23
|
+
* Dialog
|
|
24
|
+
|
|
25
|
+
## Set-up
|
|
26
|
+
|
|
27
|
+
### Basic install
|
|
28
|
+
|
|
29
|
+
To enable this module in your application, follow the steps below.
|
|
30
|
+
|
|
31
|
+
1. Add `@genesislcap/foundation-errors` as a dependency in your **package.json** file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
{
|
|
35
|
+
...
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@genesislcap/foundation-errors": "latest"
|
|
38
|
+
},
|
|
39
|
+
...
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
### Creating and dispatching Error Events
|
|
43
|
+
|
|
44
|
+
Creating and dispatching Error event with payload to show in Toast/Notification component
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
$emit(
|
|
48
|
+
ErrorBoundaryEvent.ERROR_BOUNDARY_EVENT,
|
|
49
|
+
getErrorBuilder()
|
|
50
|
+
.withTitle(err.CODE)
|
|
51
|
+
.withErrorDetails(getErrorFormat(err))
|
|
52
|
+
.withNotification(
|
|
53
|
+
getNotificationBuilder()
|
|
54
|
+
.withType('warning')
|
|
55
|
+
.withAutoClose(true)
|
|
56
|
+
.withCloseTimeout(notificationCloseTimeout)
|
|
57
|
+
.build())
|
|
58
|
+
.build())
|
|
59
|
+
```
|
|
3
60
|
## License
|
|
4
61
|
|
|
5
62
|
Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
import { ErrorBanner, DismissingAction, ConfirmingAction } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* ErrorBannerBuilder to build ErrorBanner
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export declare class ErrorBannerBuilder {
|
|
3
7
|
private dismissingAction;
|
|
4
8
|
private confirmingActions;
|
|
9
|
+
/**
|
|
10
|
+
* Add dismissing action to ErrorBanner
|
|
11
|
+
* @public
|
|
12
|
+
* @param dismissingAction - {@link DismissingAction}
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
5
15
|
withDismissingAction(dismissingAction: DismissingAction): ErrorBannerBuilder;
|
|
16
|
+
/**
|
|
17
|
+
* Add confirming action to ErrorBanner
|
|
18
|
+
* @public
|
|
19
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
6
22
|
withConfirmingAction(confirmingAction: ConfirmingAction): ErrorBannerBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* Build ErrorBanner
|
|
25
|
+
* @public
|
|
26
|
+
* @returns ErrorBanner
|
|
27
|
+
*/
|
|
7
28
|
build(): ErrorBanner;
|
|
8
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Get error banner builder instance
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
9
34
|
export declare const getErrorBannerBuilder: () => ErrorBannerBuilder;
|
|
10
35
|
//# sourceMappingURL=error-banner-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-banner-builder.d.ts","sourceRoot":"","sources":["../../../src/banner/error-banner-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3E,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAA0B;
|
|
1
|
+
{"version":3,"file":"error-banner-builder.d.ts","sourceRoot":"","sources":["../../../src/banner/error-banner-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3E;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAA0B;IAEnD;;;;;OAKG;IACI,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,kBAAkB;IAKnF;;;;;OAKG;IACI,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,kBAAkB;IAQnF;;;;OAIG;IACI,KAAK,IAAI,WAAW;CAY5B;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAO,kBAA8C,CAAC"}
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
import { ErrorDialog, DismissingAction, ConfirmingAction } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* ErrorDialogBuilder class
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export declare class ErrorDialogBuilder {
|
|
3
7
|
private dismissingAction;
|
|
4
8
|
private confirmingActions;
|
|
9
|
+
/**
|
|
10
|
+
* Add dismissing action to ErrorDialog
|
|
11
|
+
* @public
|
|
12
|
+
* @param dismissingAction - {@link DismissingAction}
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
5
15
|
withDismissingAction(dismissingAction: DismissingAction): ErrorDialogBuilder;
|
|
16
|
+
/**
|
|
17
|
+
* Add confirming action to ErrorDialog
|
|
18
|
+
* @public
|
|
19
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
6
22
|
withConfirmingAction(confirmingAction: ConfirmingAction): ErrorDialogBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* Build ErrorDialog
|
|
25
|
+
* @public
|
|
26
|
+
* @returns ErrorDialog
|
|
27
|
+
*/
|
|
7
28
|
build(): ErrorDialog;
|
|
8
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns an instance of ErrorDialogBuilder
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
9
34
|
export declare const getErrorDialogBuilder: () => ErrorDialogBuilder;
|
|
10
35
|
//# sourceMappingURL=error-dialog-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-dialog-builder.d.ts","sourceRoot":"","sources":["../../../src/dialog/error-dialog-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3E,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAA0B;
|
|
1
|
+
{"version":3,"file":"error-dialog-builder.d.ts","sourceRoot":"","sources":["../../../src/dialog/error-dialog-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3E;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAA0B;IAEnD;;;;;OAKG;IACI,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,kBAAkB;IAKnF;;;;;OAKG;IACI,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,kBAAkB;IAQnF;;;;OAIG;IACI,KAAK,IAAI,WAAW;CAU5B;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAO,kBAA8C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-dialog-launcher.d.ts","sourceRoot":"","sources":["../../../src/dialog/error-dialog-launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-dialog-launcher.d.ts","sourceRoot":"","sources":["../../../src/dialog/error-dialog-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAsB,MAAM,UAAU,CAAC;AAE9D;;;;;;KAMK;AACL,eAAO,MAAM,UAAU,UAAW,cAAc,WAAW,MAAM,KAAG,IAOnE,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { LogLevel } from '@genesislcap/foundation-utils';
|
|
2
2
|
import { ErrorStructure, ErrorBanner, ErrorDialog, ErrorNotification, Snackbar } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* ErrorBuilder to build ErrorStructure
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
3
7
|
export declare class ErrorBuilder {
|
|
4
8
|
private title;
|
|
5
9
|
private errorDetails;
|
|
@@ -9,15 +13,71 @@ export declare class ErrorBuilder {
|
|
|
9
13
|
private banner;
|
|
10
14
|
private snackbar;
|
|
11
15
|
private dialog;
|
|
16
|
+
/**
|
|
17
|
+
* Add title to error
|
|
18
|
+
* @public
|
|
19
|
+
* @param title - string
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
12
22
|
withTitle(title: string): ErrorBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* Add error details to error
|
|
25
|
+
* @public
|
|
26
|
+
* @param errorDetails - string
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
13
29
|
withErrorDetails(errorDetails: string): ErrorBuilder;
|
|
30
|
+
/**
|
|
31
|
+
* Add log level to error
|
|
32
|
+
* @public
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
14
35
|
withLogLevel(logLevel: LogLevel): ErrorBuilder;
|
|
36
|
+
/**
|
|
37
|
+
* Add alert to error
|
|
38
|
+
* @public
|
|
39
|
+
* @param alert - boolean
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
15
42
|
withAlert(alert: boolean): ErrorBuilder;
|
|
43
|
+
/**
|
|
44
|
+
* Add notification to error
|
|
45
|
+
* @public
|
|
46
|
+
* @param notification - {@link ErrorNotification}
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
16
49
|
withNotification(notification: ErrorNotification): ErrorBuilder;
|
|
50
|
+
/**
|
|
51
|
+
* Add banner to error
|
|
52
|
+
* @public
|
|
53
|
+
* @param banner - {@link ErrorBanner}
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
17
56
|
withBanner(banner: ErrorBanner): ErrorBuilder;
|
|
57
|
+
/**
|
|
58
|
+
* Add snackbar to error
|
|
59
|
+
* @public
|
|
60
|
+
* @param snackbar - {@link Snackbar}
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
18
63
|
withSnackbar(snackbar: Snackbar): ErrorBuilder;
|
|
64
|
+
/**
|
|
65
|
+
* Add dialog to error
|
|
66
|
+
* @public
|
|
67
|
+
* @param dialog - {@link ErrorDialog}
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
19
70
|
withDialog(dialog: ErrorDialog): ErrorBuilder;
|
|
71
|
+
/**
|
|
72
|
+
* Build ErrorStructure
|
|
73
|
+
* @public
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
20
76
|
build(): ErrorStructure;
|
|
21
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns a new ErrorBuilder instance
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
22
82
|
export declare const getErrorBuilder: () => ErrorBuilder;
|
|
23
83
|
//# sourceMappingURL=error-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-builder.d.ts","sourceRoot":"","sources":["../../src/error-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEhG,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,MAAM,CAAc;
|
|
1
|
+
{"version":3,"file":"error-builder.d.ts","sourceRoot":"","sources":["../../src/error-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEhG;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,MAAM,CAAc;IAE5B;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAK7C;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY;IAK3D;;;;OAIG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY;IAKrD;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;IAK9C;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,iBAAiB,GAAG,YAAY;IAKtE;;;;;OAKG;IACI,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY;IAKpD;;;;;OAKG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY;IAKrD;;;;;OAKG;IACI,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY;IAKpD;;;;OAIG;IACI,KAAK,IAAI,cAAc;CA8C/B;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,YAAkC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-launcher.d.ts","sourceRoot":"","sources":["../../src/error-launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-launcher.d.ts","sourceRoot":"","sources":["../../src/error-launcher.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAazC;;;;;;KAMK;AACL,eAAO,MAAM,SAAS,UAAW,cAAc,WAAW,MAAM,KAAG,IAWlE,CAAC"}
|
package/dist/dts/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,gDAAoC,CAAC"}
|
|
@@ -1,12 +1,42 @@
|
|
|
1
|
-
import { ErrorNotification } from '../types';
|
|
1
|
+
import { ErrorNotification, ErrorNotificationType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* NotificationBuilder to build ErrorNotification
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export declare class NotificationBuilder {
|
|
3
7
|
private autoClose;
|
|
4
8
|
private closeTimeout;
|
|
5
9
|
private type;
|
|
10
|
+
/**
|
|
11
|
+
* Add auto close to notification
|
|
12
|
+
* @public
|
|
13
|
+
* @param autoClose - boolean
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
6
16
|
withAutoClose(autoClose: boolean): NotificationBuilder;
|
|
17
|
+
/**
|
|
18
|
+
* Add close timeout to notification
|
|
19
|
+
* @public
|
|
20
|
+
* @param closeTimeout - number
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
7
23
|
withCloseTimeout(closeTimeout: number): NotificationBuilder;
|
|
8
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Add type to notification, if the type is anything other than 'warning' or 'success' do not add it
|
|
26
|
+
* @public
|
|
27
|
+
* @param type - {@link ErrorNotificationType}
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
withType(type: ErrorNotificationType): NotificationBuilder;
|
|
31
|
+
/**
|
|
32
|
+
* Build notification
|
|
33
|
+
* @returns ErrorNotification
|
|
34
|
+
*/
|
|
9
35
|
build(): ErrorNotification;
|
|
10
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Get notification builder instance
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
11
41
|
export declare const getNotificationBuilder: () => NotificationBuilder;
|
|
12
42
|
//# sourceMappingURL=notification-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-builder.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"notification-builder.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEpE;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,IAAI,CAAwB;IAEpC;;;;;OAKG;IACI,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,mBAAmB;IAK7D;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,mBAAmB;IAKlE;;;;;OAKG;IACI,QAAQ,CAAC,IAAI,EAAE,qBAAqB,GAAG,mBAAmB;IAKjE;;;OAGG;IACI,KAAK,IAAI,iBAAiB;CAalC;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,mBAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-launcher.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-launcher.d.ts","sourceRoot":"","sources":["../../../src/notification/notification-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;KAMK;AACL,eAAO,MAAM,gBAAgB,UAAW,cAAc,WAAW,MAAM,KAAG,IAmCzE,CAAC"}
|
|
@@ -1,27 +1,35 @@
|
|
|
1
|
-
import { Snackbar, ConfirmingAction } from '../types';
|
|
1
|
+
import { Snackbar, ConfirmingAction, SnackbarType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* SnackbarBuilder to build Snackbar
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export declare class SnackbarBuilder {
|
|
3
7
|
private confirmingActions;
|
|
4
8
|
private type;
|
|
5
9
|
/**
|
|
6
|
-
* Add type to snackbar
|
|
10
|
+
* Add type to snackbar, if the type is anything other than 'error' do not add it
|
|
7
11
|
* @public
|
|
8
|
-
* @param type
|
|
12
|
+
* @param type - {@link SnackbarType}
|
|
9
13
|
* @returns
|
|
10
14
|
*/
|
|
11
|
-
withType(type:
|
|
15
|
+
withType(type: SnackbarType): SnackbarBuilder;
|
|
12
16
|
/**
|
|
13
17
|
* Add confirming action to snackbar
|
|
14
18
|
* @public
|
|
15
|
-
* @param confirmingAction
|
|
19
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
16
20
|
* @returns
|
|
17
|
-
|
|
21
|
+
*/
|
|
18
22
|
withConfirmingAction(confirmingAction: ConfirmingAction): SnackbarBuilder;
|
|
19
23
|
/**
|
|
20
24
|
* Build snackbar
|
|
21
25
|
* @public
|
|
22
26
|
* @returns Snackbar
|
|
23
|
-
|
|
27
|
+
*/
|
|
24
28
|
build(): Snackbar;
|
|
25
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Get snackbar builder instance
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
26
34
|
export declare const getSnackbarBuilder: () => SnackbarBuilder;
|
|
27
35
|
//# sourceMappingURL=snackbar-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar-builder.d.ts","sourceRoot":"","sources":["../../../src/snackbar/snackbar-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"snackbar-builder.d.ts","sourceRoot":"","sources":["../../../src/snackbar/snackbar-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEpE;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,IAAI,CAAe;IAE3B;;;;;OAKG;IACI,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe;IAKpD;;;;;OAKG;IACI,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,eAAe;IAQhF;;;;OAIG;IACI,KAAK,IAAI,QAAQ;CAUzB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAO,eAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar-launcher.d.ts","sourceRoot":"","sources":["../../../src/snackbar/snackbar-launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snackbar-launcher.d.ts","sourceRoot":"","sources":["../../../src/snackbar/snackbar-launcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAgB,MAAM,UAAU,CAAC;AAExD;;;;;;KAMK;AACL,eAAO,MAAM,YAAY,UAAW,cAAc,WAAW,MAAM,KAAG,IAMrE,CAAC"}
|
package/dist/dts/types.d.ts
CHANGED
|
@@ -1,32 +1,74 @@
|
|
|
1
1
|
import { LogLevel } from '@genesislcap/foundation-utils';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
* enum for different types of error boundary events
|
|
5
|
+
*/
|
|
2
6
|
export declare enum ErrorBoundaryEvent {
|
|
3
7
|
ERROR_BOUNDARY_EVENT = "error-boundary-event"
|
|
4
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
* type for error notification type
|
|
12
|
+
*/
|
|
13
|
+
export type ErrorNotificationType = 'warning' | 'success';
|
|
14
|
+
/**
|
|
15
|
+
* Interface for Error Notification configuration
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
5
18
|
export interface ErrorNotification {
|
|
6
|
-
readonly type?:
|
|
19
|
+
readonly type?: ErrorNotificationType;
|
|
7
20
|
readonly autoClose?: boolean;
|
|
8
21
|
readonly closeTimeout?: number;
|
|
9
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Interface for Dismissing Action configuration
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
10
27
|
export interface DismissingAction {
|
|
11
28
|
readonly label: String;
|
|
12
29
|
readonly action?: Function;
|
|
13
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Interface for Confirming Action configuration
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
14
35
|
export interface ConfirmingAction {
|
|
15
36
|
readonly label: String;
|
|
16
37
|
readonly action: Function;
|
|
17
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Interface for Error Dialog configuration
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
18
43
|
export interface ErrorDialog {
|
|
19
44
|
readonly confirmingActions?: Array<ConfirmingAction>;
|
|
20
45
|
readonly dismissingAction?: DismissingAction;
|
|
21
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Interface for Error Banner configuration
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
22
51
|
export interface ErrorBanner {
|
|
23
52
|
readonly dismissingAction?: DismissingAction;
|
|
24
53
|
readonly confirmingActions?: Array<ConfirmingAction>;
|
|
25
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
* type for snackbar type
|
|
58
|
+
*/
|
|
59
|
+
export type SnackbarType = 'error';
|
|
60
|
+
/**
|
|
61
|
+
* Interface for Error Snackbar configuration
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
26
64
|
export interface Snackbar {
|
|
27
|
-
readonly type?:
|
|
65
|
+
readonly type?: SnackbarType;
|
|
28
66
|
readonly confirmingActions?: Array<ConfirmingAction>;
|
|
29
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Interface for Error Structure
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
30
72
|
export interface ErrorStructure {
|
|
31
73
|
readonly title: string;
|
|
32
74
|
readonly errorDetails: string;
|
|
@@ -43,9 +85,15 @@ export interface ErrorStructure {
|
|
|
43
85
|
readonly dialog?: ErrorDialog;
|
|
44
86
|
};
|
|
45
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
46
91
|
export type ErrorElement = HTMLElement & {
|
|
47
92
|
error: ErrorStructure;
|
|
48
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
49
97
|
export type ErrorDialogElement = ErrorElement & {
|
|
50
98
|
show: Function;
|
|
51
99
|
};
|
package/dist/dts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,oBAAY,kBAAkB;IAC5B,oBAAoB,yBAAyB;CAC9C;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,oBAAoB,yBAAyB;CAC9C;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACrD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAC7C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACtD;AAED;;;GAGG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AACnC;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB;;WAEG;QACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;QAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC/B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC"}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorBannerBuilder to build ErrorBanner
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
1
5
|
export class ErrorBannerBuilder {
|
|
6
|
+
/**
|
|
7
|
+
* Add dismissing action to ErrorBanner
|
|
8
|
+
* @public
|
|
9
|
+
* @param dismissingAction - {@link DismissingAction}
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
2
12
|
withDismissingAction(dismissingAction) {
|
|
3
13
|
this.dismissingAction = dismissingAction;
|
|
4
14
|
return this;
|
|
5
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Add confirming action to ErrorBanner
|
|
18
|
+
* @public
|
|
19
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
6
22
|
withConfirmingAction(confirmingAction) {
|
|
7
23
|
if (!this.confirmingActions) {
|
|
8
24
|
this.confirmingActions = [];
|
|
@@ -10,6 +26,11 @@ export class ErrorBannerBuilder {
|
|
|
10
26
|
this.confirmingActions.push(confirmingAction);
|
|
11
27
|
return this;
|
|
12
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Build ErrorBanner
|
|
31
|
+
* @public
|
|
32
|
+
* @returns ErrorBanner
|
|
33
|
+
*/
|
|
13
34
|
build() {
|
|
14
35
|
let errorBanner = {};
|
|
15
36
|
if (this.dismissingAction) {
|
|
@@ -21,5 +42,8 @@ export class ErrorBannerBuilder {
|
|
|
21
42
|
return errorBanner;
|
|
22
43
|
}
|
|
23
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Get error banner builder instance
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
24
49
|
export const getErrorBannerBuilder = () => new ErrorBannerBuilder();
|
|
25
|
-
//# sourceMappingURL=error-banner-builder.js.map
|
package/dist/esm/banner/index.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorDialogBuilder class
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
1
5
|
export class ErrorDialogBuilder {
|
|
6
|
+
/**
|
|
7
|
+
* Add dismissing action to ErrorDialog
|
|
8
|
+
* @public
|
|
9
|
+
* @param dismissingAction - {@link DismissingAction}
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
2
12
|
withDismissingAction(dismissingAction) {
|
|
3
13
|
this.dismissingAction = dismissingAction;
|
|
4
14
|
return this;
|
|
5
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Add confirming action to ErrorDialog
|
|
18
|
+
* @public
|
|
19
|
+
* @param confirmingAction - {@link ConfirmingAction}
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
6
22
|
withConfirmingAction(confirmingAction) {
|
|
7
23
|
if (!this.confirmingActions) {
|
|
8
24
|
this.confirmingActions = [];
|
|
@@ -10,6 +26,11 @@ export class ErrorDialogBuilder {
|
|
|
10
26
|
this.confirmingActions.push(confirmingAction);
|
|
11
27
|
return this;
|
|
12
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Build ErrorDialog
|
|
31
|
+
* @public
|
|
32
|
+
* @returns ErrorDialog
|
|
33
|
+
*/
|
|
13
34
|
build() {
|
|
14
35
|
let errorDialog = {};
|
|
15
36
|
if (this.dismissingAction) {
|
|
@@ -21,5 +42,8 @@ export class ErrorDialogBuilder {
|
|
|
21
42
|
return errorDialog;
|
|
22
43
|
}
|
|
23
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns an instance of ErrorDialogBuilder
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
24
49
|
export const getErrorDialogBuilder = () => new ErrorDialogBuilder();
|
|
25
|
-
//# sourceMappingURL=error-dialog-builder.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getErrorContainer } from '../error-util';
|
|
2
2
|
/**
|
|
3
3
|
* Shows the error dialog
|
|
4
|
-
* @
|
|
4
|
+
* @internal
|
|
5
5
|
* @param error - The ErrorStructure object
|
|
6
6
|
* @param tagName - The tag name to create prefix for the design system provider & error component
|
|
7
7
|
* @returns
|
|
@@ -14,4 +14,3 @@ export const showDialog = (error, tagName) => {
|
|
|
14
14
|
dialog.error = error;
|
|
15
15
|
dialog.show();
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=error-dialog-launcher.js.map
|
package/dist/esm/dialog/index.js
CHANGED