@elliemae/pui-scripting-object 1.44.1 → 1.46.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/dist/cjs/objects/application.js +11 -6
- package/dist/cjs/objects/module.js +21 -0
- package/dist/esm/objects/application.js +11 -6
- package/dist/esm/objects/module.js +17 -0
- package/dist/types/lib/objects/application.d.ts +54 -39
- package/dist/types/lib/objects/module.d.ts +61 -15
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -21,7 +21,8 @@ __export(application_exports, {
|
|
|
21
21
|
ApplicationExtensionType: () => ApplicationExtensionType,
|
|
22
22
|
LogLevel: () => LogLevel,
|
|
23
23
|
ModalSize: () => ModalSize,
|
|
24
|
-
ModuleOpenMode: () => ModuleOpenMode
|
|
24
|
+
ModuleOpenMode: () => ModuleOpenMode,
|
|
25
|
+
OpenType: () => OpenType
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(application_exports);
|
|
27
28
|
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
@@ -39,14 +40,18 @@ var ApplicationExtensionType = /* @__PURE__ */ ((ApplicationExtensionType2) => {
|
|
|
39
40
|
ApplicationExtensionType2["MENU"] = "MENU";
|
|
40
41
|
return ApplicationExtensionType2;
|
|
41
42
|
})(ApplicationExtensionType || {});
|
|
43
|
+
var OpenType = /* @__PURE__ */ ((OpenType2) => {
|
|
44
|
+
OpenType2["MODULE"] = "MODULE";
|
|
45
|
+
return OpenType2;
|
|
46
|
+
})(OpenType || {});
|
|
47
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
48
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
49
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
50
|
+
return ModuleOpenMode2;
|
|
51
|
+
})(ModuleOpenMode || {});
|
|
42
52
|
var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
43
53
|
ModalSize2["SMALL"] = "sm";
|
|
44
54
|
ModalSize2["MEDIUM"] = "md";
|
|
45
55
|
ModalSize2["LARGE"] = "lg";
|
|
46
56
|
return ModalSize2;
|
|
47
57
|
})(ModalSize || {});
|
|
48
|
-
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
49
|
-
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
50
|
-
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
51
|
-
return ModuleOpenMode2;
|
|
52
|
-
})(ModuleOpenMode || {});
|
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -13,4 +17,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
};
|
|
14
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
19
|
var module_exports = {};
|
|
20
|
+
__export(module_exports, {
|
|
21
|
+
DialogSize: () => DialogSize,
|
|
22
|
+
DialogType: () => DialogType
|
|
23
|
+
});
|
|
16
24
|
module.exports = __toCommonJS(module_exports);
|
|
25
|
+
var DialogType = /* @__PURE__ */ ((DialogType2) => {
|
|
26
|
+
DialogType2["WARNING"] = "warning";
|
|
27
|
+
DialogType2["ERROR"] = "error";
|
|
28
|
+
DialogType2["SUCCESS"] = "success";
|
|
29
|
+
DialogType2["INFO"] = "info";
|
|
30
|
+
return DialogType2;
|
|
31
|
+
})(DialogType || {});
|
|
32
|
+
var DialogSize = /* @__PURE__ */ ((DialogSize2) => {
|
|
33
|
+
DialogSize2["SMALL"] = "small";
|
|
34
|
+
DialogSize2["MEDIUM"] = "medium";
|
|
35
|
+
DialogSize2["LARGE"] = "large";
|
|
36
|
+
return DialogSize2;
|
|
37
|
+
})(DialogSize || {});
|
|
@@ -13,20 +13,25 @@ var ApplicationExtensionType = /* @__PURE__ */ ((ApplicationExtensionType2) => {
|
|
|
13
13
|
ApplicationExtensionType2["MENU"] = "MENU";
|
|
14
14
|
return ApplicationExtensionType2;
|
|
15
15
|
})(ApplicationExtensionType || {});
|
|
16
|
+
var OpenType = /* @__PURE__ */ ((OpenType2) => {
|
|
17
|
+
OpenType2["MODULE"] = "MODULE";
|
|
18
|
+
return OpenType2;
|
|
19
|
+
})(OpenType || {});
|
|
20
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
21
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
22
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
23
|
+
return ModuleOpenMode2;
|
|
24
|
+
})(ModuleOpenMode || {});
|
|
16
25
|
var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
17
26
|
ModalSize2["SMALL"] = "sm";
|
|
18
27
|
ModalSize2["MEDIUM"] = "md";
|
|
19
28
|
ModalSize2["LARGE"] = "lg";
|
|
20
29
|
return ModalSize2;
|
|
21
30
|
})(ModalSize || {});
|
|
22
|
-
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
23
|
-
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
24
|
-
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
25
|
-
return ModuleOpenMode2;
|
|
26
|
-
})(ModuleOpenMode || {});
|
|
27
31
|
export {
|
|
28
32
|
ApplicationExtensionType,
|
|
29
33
|
LogLevel,
|
|
30
34
|
ModalSize,
|
|
31
|
-
ModuleOpenMode
|
|
35
|
+
ModuleOpenMode,
|
|
36
|
+
OpenType
|
|
32
37
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var DialogType = /* @__PURE__ */ ((DialogType2) => {
|
|
2
|
+
DialogType2["WARNING"] = "warning";
|
|
3
|
+
DialogType2["ERROR"] = "error";
|
|
4
|
+
DialogType2["SUCCESS"] = "success";
|
|
5
|
+
DialogType2["INFO"] = "info";
|
|
6
|
+
return DialogType2;
|
|
7
|
+
})(DialogType || {});
|
|
8
|
+
var DialogSize = /* @__PURE__ */ ((DialogSize2) => {
|
|
9
|
+
DialogSize2["SMALL"] = "small";
|
|
10
|
+
DialogSize2["MEDIUM"] = "medium";
|
|
11
|
+
DialogSize2["LARGE"] = "large";
|
|
12
|
+
return DialogSize2;
|
|
13
|
+
})(DialogSize || {});
|
|
14
|
+
export {
|
|
15
|
+
DialogSize,
|
|
16
|
+
DialogType
|
|
17
|
+
};
|
|
@@ -96,15 +96,64 @@ export type NavigationOptions = {
|
|
|
96
96
|
*/
|
|
97
97
|
context?: Record<string, string>;
|
|
98
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* entity options (used by EPC)
|
|
101
|
+
*/
|
|
102
|
+
export type EntityOptions = {
|
|
103
|
+
/**
|
|
104
|
+
* type of the entity
|
|
105
|
+
*/
|
|
106
|
+
entityType: string;
|
|
107
|
+
/**
|
|
108
|
+
* id of the entity
|
|
109
|
+
*/
|
|
110
|
+
entityId: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* type of the item to open
|
|
114
|
+
*/
|
|
115
|
+
export declare enum OpenType {
|
|
116
|
+
/**
|
|
117
|
+
* opens the given module or fires applicaiton.moduleopen event for other modules to handle
|
|
118
|
+
*/
|
|
119
|
+
MODULE = "MODULE"
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* module open mode
|
|
123
|
+
*/
|
|
124
|
+
export declare enum ModuleOpenMode {
|
|
125
|
+
/**
|
|
126
|
+
* open the module in a new popup window
|
|
127
|
+
*/
|
|
128
|
+
POPUP = "POPUP",
|
|
129
|
+
/**
|
|
130
|
+
* open the module in the same window (iframe)
|
|
131
|
+
*/
|
|
132
|
+
INLINE = "INLINE"
|
|
133
|
+
}
|
|
99
134
|
export type OpenOptions = {
|
|
100
135
|
/**
|
|
101
136
|
* target item
|
|
102
137
|
*/
|
|
103
|
-
target: string;
|
|
138
|
+
target: string | EntityOptions;
|
|
104
139
|
/**
|
|
105
|
-
* type of the item
|
|
140
|
+
* type of the item to open
|
|
106
141
|
*/
|
|
107
|
-
type?: string;
|
|
142
|
+
type?: string | OpenType;
|
|
143
|
+
/**
|
|
144
|
+
* urn of the module to open
|
|
145
|
+
* @example urn:encompass:loanapp
|
|
146
|
+
*/
|
|
147
|
+
moduleId?: string;
|
|
148
|
+
/**
|
|
149
|
+
* mode to open the module
|
|
150
|
+
* @default INLINE
|
|
151
|
+
*/
|
|
152
|
+
moduleOpenMode?: ModuleOpenMode;
|
|
153
|
+
/**
|
|
154
|
+
* module parameters as key-value pairs
|
|
155
|
+
*/
|
|
156
|
+
moduleParameters?: Record<string, unknown>;
|
|
108
157
|
};
|
|
109
158
|
/**
|
|
110
159
|
* size of the modal
|
|
@@ -144,33 +193,6 @@ export type OpenModalOptions = {
|
|
|
144
193
|
*/
|
|
145
194
|
size: ModalSize;
|
|
146
195
|
};
|
|
147
|
-
/**
|
|
148
|
-
* module open mode
|
|
149
|
-
*/
|
|
150
|
-
export declare enum ModuleOpenMode {
|
|
151
|
-
/**
|
|
152
|
-
* open the module in a new popup window
|
|
153
|
-
*/
|
|
154
|
-
POPUP = "POPUP",
|
|
155
|
-
/**
|
|
156
|
-
* open the module in the same window
|
|
157
|
-
*/
|
|
158
|
-
INLINE = "INLINE"
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* open module options
|
|
162
|
-
*/
|
|
163
|
-
export type OpenModuleOptions = {
|
|
164
|
-
/**
|
|
165
|
-
* mode to open the module
|
|
166
|
-
* @default INLINE
|
|
167
|
-
*/
|
|
168
|
-
mode?: ModuleOpenMode;
|
|
169
|
-
/**
|
|
170
|
-
* module parameters as key-value pairs
|
|
171
|
-
*/
|
|
172
|
-
parameters?: Record<string, unknown>;
|
|
173
|
-
};
|
|
174
196
|
/**
|
|
175
197
|
* capabilities exposed by the application
|
|
176
198
|
*/
|
|
@@ -294,14 +316,14 @@ export type ModuleOpenInfo = {
|
|
|
294
316
|
* @param params event parameters
|
|
295
317
|
* @param params.obj module object reference
|
|
296
318
|
* @param params.eventName event name
|
|
297
|
-
* @param params.eventParams
|
|
319
|
+
* @param params.eventParams information about the module to be opened along with parameters
|
|
298
320
|
* @param params.eventOptions additional options related to the event
|
|
299
321
|
* @returns true if module is valid and can be opened, false otherwise
|
|
300
322
|
*/
|
|
301
323
|
export type ModuleOpenListener = (params: {
|
|
302
324
|
obj: IApplication;
|
|
303
325
|
eventName: string;
|
|
304
|
-
eventParams: ModuleOpenInfo
|
|
326
|
+
eventParams: ModuleOpenInfo & Record<string, unknown>;
|
|
305
327
|
eventOptions?: Record<string, unknown>;
|
|
306
328
|
}) => boolean;
|
|
307
329
|
/**
|
|
@@ -432,13 +454,6 @@ export interface IApplication extends IScriptingObject {
|
|
|
432
454
|
* @param options modal properties
|
|
433
455
|
*/
|
|
434
456
|
openModal(options: OpenModalOptions): Promise<void>;
|
|
435
|
-
/**
|
|
436
|
-
* Open a module inline or in a popup
|
|
437
|
-
* @param moduleId module id in urn format. example: urn:encompass:loanapp
|
|
438
|
-
* @param options module open options
|
|
439
|
-
* @returns true if the module is valid, false otherwise
|
|
440
|
-
*/
|
|
441
|
-
openModule(moduleId: string, options: OpenModuleOptions): Promise<boolean>;
|
|
442
457
|
/**
|
|
443
458
|
* Perform an action
|
|
444
459
|
* @param action action name
|
|
@@ -1,29 +1,63 @@
|
|
|
1
1
|
import { IEvent } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* type of dialog to display in the hosting application
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare enum DialogType {
|
|
7
|
+
WARNING = "warning",
|
|
8
|
+
ERROR = "error",
|
|
9
|
+
SUCCESS = "success",
|
|
10
|
+
INFO = "info"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* size of the dialog to display in the hosting application
|
|
14
|
+
*/
|
|
15
|
+
export declare enum DialogSize {
|
|
16
|
+
SMALL = "small",
|
|
17
|
+
MEDIUM = "medium",
|
|
18
|
+
LARGE = "large"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Options to display a dialog in the hosting application
|
|
22
|
+
*/
|
|
23
|
+
export type DialogOptions = {
|
|
7
24
|
/**
|
|
8
|
-
*
|
|
25
|
+
* type of dialog to display
|
|
9
26
|
*/
|
|
10
|
-
|
|
27
|
+
type: DialogType;
|
|
11
28
|
/**
|
|
12
|
-
*
|
|
29
|
+
* size of the dialog to display
|
|
13
30
|
*/
|
|
14
|
-
|
|
31
|
+
size: DialogSize;
|
|
32
|
+
/**
|
|
33
|
+
* title of the dialog
|
|
34
|
+
*/
|
|
35
|
+
title: string;
|
|
15
36
|
/**
|
|
16
|
-
*
|
|
37
|
+
* message to be displayed in the body of the dialog
|
|
17
38
|
*/
|
|
18
|
-
|
|
39
|
+
body: string;
|
|
19
40
|
/**
|
|
20
41
|
* link to the help documentation
|
|
21
42
|
*/
|
|
22
43
|
helpLink?: string;
|
|
23
44
|
/**
|
|
24
|
-
* unique id
|
|
45
|
+
* unique id that identifies the session / transaction
|
|
25
46
|
*/
|
|
26
47
|
correlationId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* error code
|
|
50
|
+
*/
|
|
51
|
+
code?: string;
|
|
52
|
+
/**
|
|
53
|
+
* list of actions that are avilable to user for providing feedback.
|
|
54
|
+
*
|
|
55
|
+
* these actions are displayed as buttons in the dialog
|
|
56
|
+
*
|
|
57
|
+
* default action is 'ok'
|
|
58
|
+
* @example ['retry', 'cancel']
|
|
59
|
+
*/
|
|
60
|
+
actions?: string[];
|
|
27
61
|
};
|
|
28
62
|
/**
|
|
29
63
|
* MicroApp module specific parameters
|
|
@@ -144,11 +178,23 @@ export interface IModule extends IScriptingObject {
|
|
|
144
178
|
*/
|
|
145
179
|
unload(): Promise<void>;
|
|
146
180
|
/**
|
|
147
|
-
* open a dialog in hosting application to display an error message and related help link
|
|
181
|
+
* open a dialog in hosting application to display an error, success or info message and related help link
|
|
148
182
|
*
|
|
149
|
-
*
|
|
150
|
-
* @param data
|
|
151
|
-
* @returns a promise that resolves when the dialog is closed
|
|
152
|
-
|
|
153
|
-
|
|
183
|
+
* Accessibility Consideration: 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
|
|
184
|
+
* @param options data to be displayed
|
|
185
|
+
* @returns a promise that resolves when the dialog is closed along with the user action as string (in-case sensitive). For example, 'ok', 'retry', 'cancel'
|
|
186
|
+
* @example
|
|
187
|
+
* ```typescript
|
|
188
|
+
* await module.showDialog({
|
|
189
|
+
* type: DialogType.ERROR,
|
|
190
|
+
* size: DialogSize.MEDIUM,
|
|
191
|
+
* message: 'CoreLogic Error',
|
|
192
|
+
* details: 'An error occurred while processing the credit request',
|
|
193
|
+
* helpLink: 'https://example.com/help',
|
|
194
|
+
* correlationId: '1234567890'
|
|
195
|
+
* code: 'CL-1001'
|
|
196
|
+
* });
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
showDialog(options: DialogOptions): Promise<string>;
|
|
154
200
|
}
|