@elliemae/pui-scripting-object 1.32.3 → 1.33.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.
@@ -1,5 +1,30 @@
1
1
  import { IEvent, Listener } from '../event.js';
2
2
  import { IScriptingObject } from '../scriptingObject.js';
3
+ /**
4
+ * error data to be displayed in the error dialog
5
+ */
6
+ export interface ErrorData {
7
+ /**
8
+ * short description of the error
9
+ */
10
+ message: string;
11
+ /**
12
+ * error code, if any
13
+ */
14
+ code?: string;
15
+ /**
16
+ * detailed description of the error
17
+ */
18
+ details: string;
19
+ /**
20
+ * link to the help documentation
21
+ */
22
+ helpLink?: string;
23
+ /**
24
+ * unique id to identify the session / transaction, if any
25
+ */
26
+ correlationId?: string;
27
+ }
3
28
  /**
4
29
  * event handler that handles module unload event
5
30
  * @param id unique id of the app that is being unloaded
@@ -42,4 +67,12 @@ export interface IModule extends IScriptingObject {
42
67
  * unload the microapp module from the host application
43
68
  */
44
69
  unload(): Promise<void>;
70
+ /**
71
+ * open a dialog in hosting application to display an error message and related help link
72
+ *
73
+ * Note: once the dialog is closed, caller need to set the focus back to the link or button that opened the dialog to ensure keyboard navigation works as expected
74
+ * @param error {ErrorData} error message to be displayed
75
+ * @returns {Promise<void>} a promise that resolves when the dialog is closed
76
+ */
77
+ showError(data: ErrorData): Promise<void>;
45
78
  }
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.32.3",
3
+ "version": "1.33.0",
4
4
  "description": "Typescript defintions for Scripting Objects",
5
5
  "sideEffects": false,
6
- "type": "module",
7
6
  "main": "./dist/cjs/index.js",
8
7
  "module": "./dist/es/index.js",
9
8
  "unpkg": "./dist/umd/index.js",
@@ -77,5 +76,6 @@
77
76
  "redux-saga": "~1.3.0",
78
77
  "styled-components": "~5.3.11"
79
78
  },
80
- "peerDependencies": {}
79
+ "peerDependencies": {},
80
+ "type": "module"
81
81
  }