@elliemae/pui-scripting-object 1.43.0 → 1.43.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/dist/cjs/objects/application.js +7 -1
- package/dist/cjs/objects/module.js +0 -12
- package/dist/esm/objects/application.js +7 -1
- package/dist/esm/objects/module.js +0 -8
- package/dist/types/lib/objects/application.d.ts +34 -0
- package/dist/types/lib/objects/module.d.ts +61 -65
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,8 @@ var application_exports = {};
|
|
|
20
20
|
__export(application_exports, {
|
|
21
21
|
ApplicationExtensionType: () => ApplicationExtensionType,
|
|
22
22
|
LogLevel: () => LogLevel,
|
|
23
|
-
ModalSize: () => ModalSize
|
|
23
|
+
ModalSize: () => ModalSize,
|
|
24
|
+
ModuleOpenMode: () => ModuleOpenMode
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(application_exports);
|
|
26
27
|
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
@@ -44,3 +45,8 @@ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
|
44
45
|
ModalSize2["LARGE"] = "lg";
|
|
45
46
|
return ModalSize2;
|
|
46
47
|
})(ModalSize || {});
|
|
48
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
49
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
50
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
51
|
+
return ModuleOpenMode2;
|
|
52
|
+
})(ModuleOpenMode || {});
|
|
@@ -3,10 +3,6 @@ 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
|
-
};
|
|
10
6
|
var __copyProps = (to, from, except, desc) => {
|
|
11
7
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
8
|
for (let key of __getOwnPropNames(from))
|
|
@@ -17,12 +13,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
13
|
};
|
|
18
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
var module_exports = {};
|
|
20
|
-
__export(module_exports, {
|
|
21
|
-
ModuleOpenMode: () => ModuleOpenMode
|
|
22
|
-
});
|
|
23
16
|
module.exports = __toCommonJS(module_exports);
|
|
24
|
-
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
25
|
-
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
26
|
-
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
27
|
-
return ModuleOpenMode2;
|
|
28
|
-
})(ModuleOpenMode || {});
|
|
@@ -19,8 +19,14 @@ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
|
19
19
|
ModalSize2["LARGE"] = "lg";
|
|
20
20
|
return ModalSize2;
|
|
21
21
|
})(ModalSize || {});
|
|
22
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
23
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
24
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
25
|
+
return ModuleOpenMode2;
|
|
26
|
+
})(ModuleOpenMode || {});
|
|
22
27
|
export {
|
|
23
28
|
ApplicationExtensionType,
|
|
24
29
|
LogLevel,
|
|
25
|
-
ModalSize
|
|
30
|
+
ModalSize,
|
|
31
|
+
ModuleOpenMode
|
|
26
32
|
};
|
|
@@ -144,6 +144,33 @@ export type OpenModalOptions = {
|
|
|
144
144
|
*/
|
|
145
145
|
size: ModalSize;
|
|
146
146
|
};
|
|
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
|
+
};
|
|
147
174
|
/**
|
|
148
175
|
* capabilities exposed by the application
|
|
149
176
|
*/
|
|
@@ -368,6 +395,13 @@ export interface IApplication extends IScriptingObject {
|
|
|
368
395
|
* @param options modal properties
|
|
369
396
|
*/
|
|
370
397
|
openModal(options: OpenModalOptions): Promise<void>;
|
|
398
|
+
/**
|
|
399
|
+
* Open a module inline or in a popup
|
|
400
|
+
* @param moduleId module id in urn format. example: urn:encompass:loanapp
|
|
401
|
+
* @param options module open options
|
|
402
|
+
* @returns true if the module is valid, false otherwise
|
|
403
|
+
*/
|
|
404
|
+
openModule(moduleId: string, options: OpenModuleOptions): Promise<boolean>;
|
|
371
405
|
/**
|
|
372
406
|
* Perform an action
|
|
373
407
|
* @param action action name
|
|
@@ -26,138 +26,141 @@ export type ErrorData = {
|
|
|
26
26
|
correlationId?: string;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* module
|
|
30
|
-
*/
|
|
31
|
-
export declare enum ModuleOpenMode {
|
|
32
|
-
/**
|
|
33
|
-
* open the module in a new popup window
|
|
34
|
-
*/
|
|
35
|
-
POPUP = "POPUP",
|
|
36
|
-
/**
|
|
37
|
-
* open the module in the same window
|
|
38
|
-
*/
|
|
39
|
-
INLINE = "INLINE"
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* open module options
|
|
29
|
+
* MicroApp module specific parameters
|
|
43
30
|
*/
|
|
44
|
-
export type
|
|
31
|
+
export type ModuleParameters = {
|
|
45
32
|
/**
|
|
46
33
|
* module id in urn format
|
|
47
34
|
* @example urn:encompass:loanapp
|
|
48
35
|
*/
|
|
49
36
|
moduleId: string;
|
|
50
37
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @default INLINE
|
|
53
|
-
*/
|
|
54
|
-
mode?: ModuleOpenMode;
|
|
55
|
-
/**
|
|
56
|
-
* module parameters as key-value pairs
|
|
38
|
+
* additional parameters as key-value pairs
|
|
57
39
|
*/
|
|
58
|
-
|
|
40
|
+
[key: string]: unknown;
|
|
59
41
|
};
|
|
60
42
|
/**
|
|
61
|
-
*
|
|
43
|
+
* module close event info
|
|
62
44
|
*/
|
|
63
|
-
export type
|
|
45
|
+
export type ModuleCloseInfo = {
|
|
64
46
|
/**
|
|
65
|
-
* module
|
|
47
|
+
* module that triggered the close event in urn format
|
|
66
48
|
* @example urn:encompass:loanapp
|
|
67
49
|
*/
|
|
68
50
|
moduleId: string;
|
|
69
|
-
/**
|
|
70
|
-
* additional parameters as key-value pairs
|
|
71
|
-
*/
|
|
72
|
-
[key: string]: unknown;
|
|
73
51
|
};
|
|
74
52
|
/**
|
|
75
|
-
* module
|
|
53
|
+
* event handler that handles module close event
|
|
54
|
+
* @param params event parameters
|
|
55
|
+
* @param params.obj module object reference
|
|
56
|
+
* @param params.eventName event name
|
|
57
|
+
* @param params.eventParams Module close info
|
|
58
|
+
* @param params.eventOptions additional options related to the event
|
|
59
|
+
* @returns true to allow module unload, false otherwise
|
|
76
60
|
*/
|
|
77
|
-
export type
|
|
61
|
+
export type ModuleCloseListener = (params: {
|
|
62
|
+
obj: IModule;
|
|
63
|
+
eventName: string;
|
|
64
|
+
eventParams: ModuleCloseInfo;
|
|
65
|
+
eventOptions?: Record<string, unknown>;
|
|
66
|
+
}) => boolean;
|
|
67
|
+
/**
|
|
68
|
+
* module open event info
|
|
69
|
+
*/
|
|
70
|
+
export type ModuleOpenInfo = {
|
|
78
71
|
/**
|
|
79
|
-
* module
|
|
72
|
+
* module to be opened in urn format
|
|
80
73
|
* @example urn:encompass:loanapp
|
|
81
74
|
*/
|
|
82
75
|
moduleId: string;
|
|
83
76
|
};
|
|
84
77
|
/**
|
|
85
|
-
* event handler that handles module
|
|
78
|
+
* event handler that handles module open event
|
|
86
79
|
* @param params event parameters
|
|
87
80
|
* @param params.obj module object reference
|
|
88
81
|
* @param params.eventName event name
|
|
89
|
-
* @param params.eventParams Module
|
|
82
|
+
* @param params.eventParams Module open info
|
|
90
83
|
* @param params.eventOptions additional options related to the event
|
|
91
|
-
* @returns true
|
|
84
|
+
* @returns true if module is valid and can be opened, false otherwise
|
|
92
85
|
*/
|
|
93
|
-
export type
|
|
86
|
+
export type ModuleOpenListener = (params: {
|
|
94
87
|
obj: IModule;
|
|
95
88
|
eventName: string;
|
|
96
|
-
eventParams:
|
|
89
|
+
eventParams: ModuleOpenInfo;
|
|
97
90
|
eventOptions?: Record<string, unknown>;
|
|
98
91
|
}) => boolean;
|
|
99
92
|
/**
|
|
100
|
-
* module
|
|
93
|
+
* module unload event info
|
|
101
94
|
*/
|
|
102
|
-
export type
|
|
95
|
+
export type ModuleUnloadInfo = {
|
|
103
96
|
/**
|
|
104
|
-
* module that triggered the
|
|
97
|
+
* module that triggered the unload event in urn format
|
|
105
98
|
* @example urn:encompass:loanapp
|
|
106
99
|
*/
|
|
107
100
|
moduleId: string;
|
|
108
101
|
};
|
|
109
102
|
/**
|
|
110
|
-
* event handler that handles module
|
|
103
|
+
* event handler that handles module unload event
|
|
111
104
|
* @param params event parameters
|
|
112
105
|
* @param params.obj module object reference
|
|
113
106
|
* @param params.eventName event name
|
|
114
|
-
* @param params.eventParams Module
|
|
107
|
+
* @param params.eventParams Module unload info
|
|
115
108
|
* @param params.eventOptions additional options related to the event
|
|
116
109
|
* @returns true to allow module unload, false otherwise
|
|
117
110
|
*/
|
|
118
|
-
export type
|
|
111
|
+
export type ModuleUnLoadingListener = (params: {
|
|
119
112
|
obj: IModule;
|
|
120
113
|
eventName: string;
|
|
121
|
-
eventParams:
|
|
114
|
+
eventParams: ModuleUnloadInfo;
|
|
122
115
|
eventOptions?: Record<string, unknown>;
|
|
123
116
|
}) => boolean;
|
|
124
117
|
/**
|
|
125
118
|
* events that notifies the module's lifecycle
|
|
126
119
|
*/
|
|
127
120
|
export type ModuleEvents = {
|
|
128
|
-
/**
|
|
129
|
-
* event fired when the module is unloading
|
|
130
|
-
*
|
|
131
|
-
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
132
|
-
*/
|
|
133
|
-
'module.unloading': ModuleUnLoadingListener;
|
|
134
121
|
/**
|
|
135
122
|
* event fired when the module to be closed
|
|
136
123
|
*
|
|
137
124
|
* Use {@link ModuleCloseListener} to handle this event
|
|
138
125
|
*/
|
|
139
126
|
'module.close': ModuleCloseListener;
|
|
127
|
+
/**
|
|
128
|
+
* event fired when the module to be opened
|
|
129
|
+
*
|
|
130
|
+
* Use {@link ModuleOpenListener} to handle this event
|
|
131
|
+
*/
|
|
132
|
+
'module.open': ModuleOpenListener;
|
|
133
|
+
/**
|
|
134
|
+
* event fired when the module is unloading
|
|
135
|
+
*
|
|
136
|
+
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
137
|
+
*/
|
|
138
|
+
'module.unloading': ModuleUnLoadingListener;
|
|
140
139
|
};
|
|
141
140
|
/**
|
|
142
141
|
* Exposes MicroApp module specific methods
|
|
143
142
|
*
|
|
144
|
-
* This is an abstract interface and needs to be extended by the module
|
|
145
|
-
*
|
|
146
143
|
* See {@link ModuleEvents} for supported events
|
|
147
144
|
*/
|
|
148
145
|
export interface IModule extends IScriptingObject {
|
|
149
|
-
/**
|
|
150
|
-
* event fired when the module is unloading
|
|
151
|
-
*
|
|
152
|
-
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
153
|
-
*/
|
|
154
|
-
readonly Unloading: IEvent;
|
|
155
146
|
/**
|
|
156
147
|
* event fired when the module to be closed
|
|
157
148
|
*
|
|
158
149
|
* Use {@link ModuleCloseListener} to handle this event
|
|
159
150
|
*/
|
|
160
151
|
readonly Close: IEvent;
|
|
152
|
+
/**
|
|
153
|
+
* event fired when the module to be opened
|
|
154
|
+
*
|
|
155
|
+
* Use {@link ModuleOpenListener} to handle this event
|
|
156
|
+
*/
|
|
157
|
+
readonly Open: IEvent;
|
|
158
|
+
/**
|
|
159
|
+
* event fired when the module is unloading
|
|
160
|
+
*
|
|
161
|
+
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
162
|
+
*/
|
|
163
|
+
readonly Unloading: IEvent;
|
|
161
164
|
/**
|
|
162
165
|
* get microapp module-specific capabilities or settings defined by the host application.
|
|
163
166
|
*
|
|
@@ -173,13 +176,6 @@ export interface IModule extends IScriptingObject {
|
|
|
173
176
|
* @returns parameters as key-value pairs
|
|
174
177
|
*/
|
|
175
178
|
getParameters(): Promise<ModuleParameters>;
|
|
176
|
-
/**
|
|
177
|
-
* open another microapp module
|
|
178
|
-
*
|
|
179
|
-
* if parent module doesn't host the requested module, it will bubble up the request to its parent
|
|
180
|
-
* @param options module open options
|
|
181
|
-
*/
|
|
182
|
-
open(options: OpenModuleOptions): Promise<void>;
|
|
183
179
|
/**
|
|
184
180
|
* unload the microapp module from the host application
|
|
185
181
|
*/
|