@elliemae/pui-app-bridge 2.3.1 → 2.5.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.
Files changed (65) hide show
  1. package/dist/cjs/appBridge.js +0 -11
  2. package/dist/cjs/config/app.js +0 -4
  3. package/dist/cjs/eventManager.js +0 -5
  4. package/dist/cjs/microfeHost.js +0 -8
  5. package/dist/esm/appBridge.js +0 -11
  6. package/dist/esm/config/app.js +0 -4
  7. package/dist/esm/eventManager.js +0 -5
  8. package/dist/esm/microfeHost.js +0 -8
  9. package/dist/public/creditService/latest/creditService.checksum.js.gz +0 -0
  10. package/dist/public/creditService/latest/creditService.checksum.js.map +1 -1
  11. package/dist/public/frame.html +1 -1
  12. package/dist/public/guest/businessObjects.js.gz +0 -0
  13. package/dist/public/guest/businessObjects.js.map +1 -1
  14. package/dist/public/guest/util.js.gz +0 -0
  15. package/dist/public/index.html +1 -1
  16. package/dist/public/init.js.gz +0 -0
  17. package/dist/public/init.js.map +1 -1
  18. package/dist/public/js/emuiAppBridge.a5cadcabb35056ac6244.js +21 -0
  19. package/dist/public/js/emuiAppBridge.a5cadcabb35056ac6244.js.br +0 -0
  20. package/dist/public/js/emuiAppBridge.a5cadcabb35056ac6244.js.gz +0 -0
  21. package/dist/public/js/emuiAppBridge.a5cadcabb35056ac6244.js.map +1 -0
  22. package/dist/public/loan-object.js.gz +0 -0
  23. package/dist/public/loanValidation/latest/loanValidation.checksum.js +1 -1
  24. package/dist/public/loanValidation/latest/loanValidation.checksum.js.br +0 -0
  25. package/dist/public/loanValidation/latest/loanValidation.checksum.js.gz +0 -0
  26. package/dist/public/loanValidation/latest/loanValidation.checksum.js.map +1 -1
  27. package/dist/public/pricingService/latest/pricingService.checksum.js.gz +0 -0
  28. package/dist/public/pricingService/latest/pricingService.checksum.js.map +1 -1
  29. package/dist/public/utils.js +1 -1
  30. package/dist/public/utils.js.br +0 -0
  31. package/dist/public/utils.js.gz +0 -0
  32. package/dist/public/utils.js.map +1 -1
  33. package/dist/types/appBridge.d.ts +0 -14
  34. package/dist/types/config/app.d.ts +0 -4
  35. package/dist/types/eventManager.d.ts +0 -3
  36. package/dist/types/microfeHost.d.ts +0 -9
  37. package/dist/types/typings/guest.d.ts +0 -4
  38. package/dist/types/typings/host.d.ts +0 -8
  39. package/dist/umd/creditService/latest/creditService.checksum.js.gz +0 -0
  40. package/dist/umd/creditService/latest/creditService.checksum.js.map +1 -1
  41. package/dist/umd/guest/businessObjects.js.gz +0 -0
  42. package/dist/umd/guest/businessObjects.js.map +1 -1
  43. package/dist/umd/guest/util.js.gz +0 -0
  44. package/dist/umd/index.js +7 -10
  45. package/dist/umd/index.js.br +0 -0
  46. package/dist/umd/index.js.gz +0 -0
  47. package/dist/umd/index.js.map +1 -1
  48. package/dist/umd/init.js.gz +0 -0
  49. package/dist/umd/init.js.map +1 -1
  50. package/dist/umd/loan-object.js.gz +0 -0
  51. package/dist/umd/loanValidation/latest/loanValidation.checksum.js +1 -1
  52. package/dist/umd/loanValidation/latest/loanValidation.checksum.js.br +0 -0
  53. package/dist/umd/loanValidation/latest/loanValidation.checksum.js.gz +0 -0
  54. package/dist/umd/loanValidation/latest/loanValidation.checksum.js.map +1 -1
  55. package/dist/umd/pricingService/latest/pricingService.checksum.js.gz +0 -0
  56. package/dist/umd/pricingService/latest/pricingService.checksum.js.map +1 -1
  57. package/dist/umd/utils.js +1 -1
  58. package/dist/umd/utils.js.br +0 -0
  59. package/dist/umd/utils.js.gz +0 -0
  60. package/dist/umd/utils.js.map +1 -1
  61. package/package.json +6 -6
  62. package/dist/public/js/emuiAppBridge.a90a617911b273467444.js +0 -24
  63. package/dist/public/js/emuiAppBridge.a90a617911b273467444.js.br +0 -0
  64. package/dist/public/js/emuiAppBridge.a90a617911b273467444.js.gz +0 -0
  65. package/dist/public/js/emuiAppBridge.a90a617911b273467444.js.map +0 -1
@@ -45,7 +45,6 @@ class CAppBridge {
45
45
  #activeApps = /* @__PURE__ */ new Map();
46
46
  /**
47
47
  * Create a new instance of the AppBridge
48
- *
49
48
  * @param {AppBridgeParams} params - parameter for the constructor
50
49
  */
51
50
  constructor(params) {
@@ -216,7 +215,6 @@ class CAppBridge {
216
215
  };
217
216
  /**
218
217
  * registers scripting object to the host
219
- *
220
218
  * @param {ValueOf<AppObjects>} so scripting object
221
219
  * @param {AddScriptingObjectParams} params params to add scripting object
222
220
  */
@@ -231,7 +229,6 @@ class CAppBridge {
231
229
  };
232
230
  /**
233
231
  * Close guest micro frontend application
234
- *
235
232
  * @param id unique id of guest application
236
233
  */
237
234
  closeApp = async (id) => {
@@ -256,20 +253,17 @@ class CAppBridge {
256
253
  };
257
254
  /**
258
255
  * dispatch event to guest microfrontend application
259
- *
260
256
  * @param {DispatchEventParams<EventId, Params>} params - event parameters
261
257
  */
262
258
  dispatchEvent = async (params) => this.#eventManager.dispatchEvent(params);
263
259
  /**
264
260
  * Get guest by id
265
- *
266
261
  * @param id unique id of guest
267
262
  * @returns guest instance
268
263
  */
269
264
  getGuest = (id) => this.#activeApps.get(id)?.guest;
270
265
  /**
271
266
  * Get list of active guests
272
- *
273
267
  * @returns list of active guests
274
268
  */
275
269
  getGuests = () => [...this.#activeApps.values()].map((app) => app.guest);
@@ -285,7 +279,6 @@ class CAppBridge {
285
279
  };
286
280
  /**
287
281
  * Mount guest micro frontend application into DOM
288
- *
289
282
  * @param id unique id of guest micro frontend application
290
283
  * @throws Error if application with given id is not found in configuration
291
284
  */
@@ -300,7 +293,6 @@ class CAppBridge {
300
293
  };
301
294
  /**
302
295
  * Open guest micro frontend application
303
- *
304
296
  * @param {OpenAppParams} params - options to open guest application
305
297
  */
306
298
  openApp = async (params) => {
@@ -338,7 +330,6 @@ class CAppBridge {
338
330
  };
339
331
  /**
340
332
  * emit event to all subscribers (deprecated)
341
- *
342
333
  * @deprecated use dispatchEvent instead
343
334
  * @param eventId unique id of the event. The format is <scripting object name>.<event name>
344
335
  * @param data data to be sent to the subscribers of the event
@@ -353,7 +344,6 @@ class CAppBridge {
353
344
  };
354
345
  /**
355
346
  * removes scripting object from the host
356
- *
357
347
  * @param objectId unique id of the scripting object
358
348
  */
359
349
  removeScriptingObject = (objectId) => {
@@ -361,7 +351,6 @@ class CAppBridge {
361
351
  };
362
352
  /**
363
353
  * Unmount guest micro frontend application from DOM
364
- *
365
354
  * @param id unique id of guest micro frontend application
366
355
  * @throws Error if application with given id is not found in configuration
367
356
  */
@@ -56,7 +56,6 @@ class CAppConfig {
56
56
  };
57
57
  /**
58
58
  * Get value for the given app config key
59
- *
60
59
  * @param key key to get value for
61
60
  * @param defaultValue default value to return if key is not found
62
61
  * @returns value for the given key
@@ -64,7 +63,6 @@ class CAppConfig {
64
63
  get = (key = "", defaultValue = null) => (0, import_clone.default)((0, import_get.default)(this.#gAppConfig, key, defaultValue));
65
64
  /**
66
65
  * Set value for the given app config key
67
- *
68
66
  * @param key key to set value for
69
67
  * @param value value to set
70
68
  * @returns app config instance
@@ -72,14 +70,12 @@ class CAppConfig {
72
70
  set = (key, value) => (0, import_set.default)(this.#gAppConfig, key, value);
73
71
  /**
74
72
  * Check if the given key exists in app config
75
- *
76
73
  * @param key key to check
77
74
  * @returns true if key exists
78
75
  */
79
76
  has = (key = "") => (0, import_has.default)(this.#gAppConfig, key);
80
77
  /**
81
78
  * load application configuration from the given asset path
82
- *
83
79
  * @param assetPath url path to load app config from
84
80
  * @param configUrl
85
81
  */
@@ -40,7 +40,6 @@ class EventManager {
40
40
  #listeners = /* @__PURE__ */ new Map();
41
41
  /**
42
42
  * call an async function with a timeout
43
- *
44
43
  * @param promise async function to call
45
44
  * @param feedbackWaitTime timeout in milliseconds
46
45
  * @returns result of the async function or undefined if timeout
@@ -55,7 +54,6 @@ class EventManager {
55
54
  };
56
55
  /**
57
56
  * emit an event to set of listeners
58
- *
59
57
  * @param {EmitEventParam} param - parameters for emitting an event
60
58
  */
61
59
  #emitEvent = (param) => {
@@ -95,7 +93,6 @@ class EventManager {
95
93
  };
96
94
  /**
97
95
  * dispatch an event
98
- *
99
96
  * @param {DispatchEventParam<EventId, Params>} param - parameters for dispatching an event
100
97
  */
101
98
  dispatchEvent = async (param) => {
@@ -126,7 +123,6 @@ class EventManager {
126
123
  };
127
124
  /**
128
125
  * Subscribe to an event
129
- *
130
126
  * @param {SubscribeParam<EventId, AppEvents[EventId]>} param - parameters for subscribing to an event
131
127
  */
132
128
  subscribe = (param) => {
@@ -146,7 +142,6 @@ class EventManager {
146
142
  };
147
143
  /**
148
144
  * Unsubscribe from an event
149
- *
150
145
  * @param {UnsubscribeParam<EventId>} param - parameters for unsubscribing from an event
151
146
  */
152
147
  unsubscribe = (param) => {
@@ -32,7 +32,6 @@ class CMicroFEHost {
32
32
  #eventManager;
33
33
  /**
34
34
  * Create new instance of the host frontend application
35
- *
36
35
  * @param {CMicroFEHostParams} params - constructor parameters
37
36
  */
38
37
  constructor(params) {
@@ -44,14 +43,12 @@ class CMicroFEHost {
44
43
  }
45
44
  /**
46
45
  * add listener to the scripting object event
47
- *
48
46
  * @param {SubscribeParam<EventId, EventListener>} params - parameters to add event listener
49
47
  * @returns subscription id
50
48
  */
51
49
  addEventListener = (params) => this.#eventManager.subscribe(params);
52
50
  /**
53
51
  * application release version
54
- *
55
52
  * @returns release version
56
53
  */
57
54
  get version() {
@@ -59,7 +56,6 @@ class CMicroFEHost {
59
56
  }
60
57
  /**
61
58
  * Get reference to the scripting object (or proxy) by name
62
- *
63
59
  * @param name unique name of the scripting object
64
60
  * @param objectId
65
61
  * @returns scripting object reference
@@ -67,7 +63,6 @@ class CMicroFEHost {
67
63
  getObject = (objectId) => Promise.resolve(this.#soManager.getObject(objectId, this.#guest));
68
64
  /**
69
65
  * removes listener from the scripting object event
70
- *
71
66
  * @param {UnsubscribeParam<EventId>} params - parameters to remove event listener
72
67
  */
73
68
  removeEventListener = (params) => {
@@ -75,7 +70,6 @@ class CMicroFEHost {
75
70
  };
76
71
  /**
77
72
  * set the size of the guest application iframe window
78
- *
79
73
  * @param {AppWindowSize} appSize window size of the application
80
74
  */
81
75
  setAppWindowSize = (appSize) => {
@@ -90,7 +84,6 @@ class CMicroFEHost {
90
84
  // deprecated legacy eventing methods (to be removed)
91
85
  /**
92
86
  * subscribe to an scripting object event (deprecated)
93
- *
94
87
  * @param eventId unique id of the event. The format is <scripting object name>.<event name>
95
88
  * @param listener callback function to be called when the event is fired
96
89
  * @returns token to be used to unsubscribe
@@ -99,7 +92,6 @@ class CMicroFEHost {
99
92
  subscribe = (eventId, listener) => (0, import_pubsub_js.subscribe)(eventId, listener);
100
93
  /**
101
94
  * unsubscribe from an scripting object event (deprecated)
102
- *
103
95
  * @param token unique token returned by subscribe
104
96
  * @param eventId unique id of the event. The format is <scripting object name>.<event name>
105
97
  */
@@ -22,7 +22,6 @@ class CAppBridge {
22
22
  #activeApps = /* @__PURE__ */ new Map();
23
23
  /**
24
24
  * Create a new instance of the AppBridge
25
- *
26
25
  * @param {AppBridgeParams} params - parameter for the constructor
27
26
  */
28
27
  constructor(params) {
@@ -193,7 +192,6 @@ class CAppBridge {
193
192
  };
194
193
  /**
195
194
  * registers scripting object to the host
196
- *
197
195
  * @param {ValueOf<AppObjects>} so scripting object
198
196
  * @param {AddScriptingObjectParams} params params to add scripting object
199
197
  */
@@ -208,7 +206,6 @@ class CAppBridge {
208
206
  };
209
207
  /**
210
208
  * Close guest micro frontend application
211
- *
212
209
  * @param id unique id of guest application
213
210
  */
214
211
  closeApp = async (id) => {
@@ -233,20 +230,17 @@ class CAppBridge {
233
230
  };
234
231
  /**
235
232
  * dispatch event to guest microfrontend application
236
- *
237
233
  * @param {DispatchEventParams<EventId, Params>} params - event parameters
238
234
  */
239
235
  dispatchEvent = async (params) => this.#eventManager.dispatchEvent(params);
240
236
  /**
241
237
  * Get guest by id
242
- *
243
238
  * @param id unique id of guest
244
239
  * @returns guest instance
245
240
  */
246
241
  getGuest = (id) => this.#activeApps.get(id)?.guest;
247
242
  /**
248
243
  * Get list of active guests
249
- *
250
244
  * @returns list of active guests
251
245
  */
252
246
  getGuests = () => [...this.#activeApps.values()].map((app) => app.guest);
@@ -262,7 +256,6 @@ class CAppBridge {
262
256
  };
263
257
  /**
264
258
  * Mount guest micro frontend application into DOM
265
- *
266
259
  * @param id unique id of guest micro frontend application
267
260
  * @throws Error if application with given id is not found in configuration
268
261
  */
@@ -277,7 +270,6 @@ class CAppBridge {
277
270
  };
278
271
  /**
279
272
  * Open guest micro frontend application
280
- *
281
273
  * @param {OpenAppParams} params - options to open guest application
282
274
  */
283
275
  openApp = async (params) => {
@@ -315,7 +307,6 @@ class CAppBridge {
315
307
  };
316
308
  /**
317
309
  * emit event to all subscribers (deprecated)
318
- *
319
310
  * @deprecated use dispatchEvent instead
320
311
  * @param eventId unique id of the event. The format is <scripting object name>.<event name>
321
312
  * @param data data to be sent to the subscribers of the event
@@ -330,7 +321,6 @@ class CAppBridge {
330
321
  };
331
322
  /**
332
323
  * removes scripting object from the host
333
- *
334
324
  * @param objectId unique id of the scripting object
335
325
  */
336
326
  removeScriptingObject = (objectId) => {
@@ -338,7 +328,6 @@ class CAppBridge {
338
328
  };
339
329
  /**
340
330
  * Unmount guest micro frontend application from DOM
341
- *
342
331
  * @param id unique id of guest micro frontend application
343
332
  * @throws Error if application with given id is not found in configuration
344
333
  */
@@ -23,7 +23,6 @@ class CAppConfig {
23
23
  };
24
24
  /**
25
25
  * Get value for the given app config key
26
- *
27
26
  * @param key key to get value for
28
27
  * @param defaultValue default value to return if key is not found
29
28
  * @returns value for the given key
@@ -31,7 +30,6 @@ class CAppConfig {
31
30
  get = (key = "", defaultValue = null) => lodashClone(lodashGet(this.#gAppConfig, key, defaultValue));
32
31
  /**
33
32
  * Set value for the given app config key
34
- *
35
33
  * @param key key to set value for
36
34
  * @param value value to set
37
35
  * @returns app config instance
@@ -39,14 +37,12 @@ class CAppConfig {
39
37
  set = (key, value) => lodashSet(this.#gAppConfig, key, value);
40
38
  /**
41
39
  * Check if the given key exists in app config
42
- *
43
40
  * @param key key to check
44
41
  * @returns true if key exists
45
42
  */
46
43
  has = (key = "") => lodashHas(this.#gAppConfig, key);
47
44
  /**
48
45
  * load application configuration from the given asset path
49
- *
50
46
  * @param assetPath url path to load app config from
51
47
  * @param configUrl
52
48
  */
@@ -17,7 +17,6 @@ class EventManager {
17
17
  #listeners = /* @__PURE__ */ new Map();
18
18
  /**
19
19
  * call an async function with a timeout
20
- *
21
20
  * @param promise async function to call
22
21
  * @param feedbackWaitTime timeout in milliseconds
23
22
  * @returns result of the async function or undefined if timeout
@@ -32,7 +31,6 @@ class EventManager {
32
31
  };
33
32
  /**
34
33
  * emit an event to set of listeners
35
- *
36
34
  * @param {EmitEventParam} param - parameters for emitting an event
37
35
  */
38
36
  #emitEvent = (param) => {
@@ -72,7 +70,6 @@ class EventManager {
72
70
  };
73
71
  /**
74
72
  * dispatch an event
75
- *
76
73
  * @param {DispatchEventParam<EventId, Params>} param - parameters for dispatching an event
77
74
  */
78
75
  dispatchEvent = async (param) => {
@@ -103,7 +100,6 @@ class EventManager {
103
100
  };
104
101
  /**
105
102
  * Subscribe to an event
106
- *
107
103
  * @param {SubscribeParam<EventId, AppEvents[EventId]>} param - parameters for subscribing to an event
108
104
  */
109
105
  subscribe = (param) => {
@@ -123,7 +119,6 @@ class EventManager {
123
119
  };
124
120
  /**
125
121
  * Unsubscribe from an event
126
- *
127
122
  * @param {UnsubscribeParam<EventId>} param - parameters for unsubscribing from an event
128
123
  */
129
124
  unsubscribe = (param) => {
@@ -9,7 +9,6 @@ class CMicroFEHost {
9
9
  #eventManager;
10
10
  /**
11
11
  * Create new instance of the host frontend application
12
- *
13
12
  * @param {CMicroFEHostParams} params - constructor parameters
14
13
  */
15
14
  constructor(params) {
@@ -21,14 +20,12 @@ class CMicroFEHost {
21
20
  }
22
21
  /**
23
22
  * add listener to the scripting object event
24
- *
25
23
  * @param {SubscribeParam<EventId, EventListener>} params - parameters to add event listener
26
24
  * @returns subscription id
27
25
  */
28
26
  addEventListener = (params) => this.#eventManager.subscribe(params);
29
27
  /**
30
28
  * application release version
31
- *
32
29
  * @returns release version
33
30
  */
34
31
  get version() {
@@ -36,7 +33,6 @@ class CMicroFEHost {
36
33
  }
37
34
  /**
38
35
  * Get reference to the scripting object (or proxy) by name
39
- *
40
36
  * @param name unique name of the scripting object
41
37
  * @param objectId
42
38
  * @returns scripting object reference
@@ -44,7 +40,6 @@ class CMicroFEHost {
44
40
  getObject = (objectId) => Promise.resolve(this.#soManager.getObject(objectId, this.#guest));
45
41
  /**
46
42
  * removes listener from the scripting object event
47
- *
48
43
  * @param {UnsubscribeParam<EventId>} params - parameters to remove event listener
49
44
  */
50
45
  removeEventListener = (params) => {
@@ -52,7 +47,6 @@ class CMicroFEHost {
52
47
  };
53
48
  /**
54
49
  * set the size of the guest application iframe window
55
- *
56
50
  * @param {AppWindowSize} appSize window size of the application
57
51
  */
58
52
  setAppWindowSize = (appSize) => {
@@ -67,7 +61,6 @@ class CMicroFEHost {
67
61
  // deprecated legacy eventing methods (to be removed)
68
62
  /**
69
63
  * subscribe to an scripting object event (deprecated)
70
- *
71
64
  * @param eventId unique id of the event. The format is <scripting object name>.<event name>
72
65
  * @param listener callback function to be called when the event is fired
73
66
  * @returns token to be used to unsubscribe
@@ -76,7 +69,6 @@ class CMicroFEHost {
76
69
  subscribe = (eventId, listener) => subscribe(eventId, listener);
77
70
  /**
78
71
  * unsubscribe from an scripting object event (deprecated)
79
- *
80
72
  * @param token unique token returned by subscribe
81
73
  * @param eventId unique id of the event. The format is <scripting object name>.<event name>
82
74
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://ice/creditService/latest/creditService.checksum.js"],"sourcesContent":["(function () {\n let host = null;\n const parentWindow = window.parent;\n parentWindow.emui = parentWindow.emui || {};\n\n const getLoanObject = async (objectId) => {\n if (host) {\n return await host.getObject(objectId);\n }\n return null;\n };\n\n parentWindow.emui.creditservice = {\n init: async (options) => {\n host = options.host;\n return Promise.resolve();\n },\n mount: async (options) => {\n const loanObj = await getLoanObject('Loan');\n const { ssn } = await loanObj.getLoanDetails();\n setTimeout(async () => {\n const score = ssn === '123456789' ? 800 : 600;\n await loanObj.setCreditScore(score);\n }, 1000);\n return Promise.resolve();\n },\n unmount: async (options) => {\n return Promise.resolve();\n },\n };\n})();\n"],"mappings":"CAAC,UAAY,CACX,IAAIA,EAAO,KACX,MAAMC,EAAe,OAAO,OAC5BA,EAAa,KAAOA,EAAa,MAAQ,CAAC,EAE1C,MAAMC,EAAgB,MAAOC,GACvBH,EACK,MAAMA,EAAK,UAAUG,CAAQ,EAE/B,KAGTF,EAAa,KAAK,cAAgB,CAChC,KAAM,MAAOG,IACXJ,EAAOI,EAAQ,KACR,QAAQ,QAAQ,GAEzB,MAAO,MAAOA,GAAY,CACxB,MAAMC,EAAU,MAAMH,EAAc,MAAM,EACpC,CAAE,IAAAI,CAAI,EAAI,MAAMD,EAAQ,eAAe,EAC7C,kBAAW,SAAY,CACrB,MAAME,EAAQD,IAAQ,YAAc,IAAM,IAC1C,MAAMD,EAAQ,eAAeE,CAAK,CACpC,EAAG,GAAI,EACA,QAAQ,QAAQ,CACzB,EACA,QAAS,MAAOH,GACP,QAAQ,QAAQ,CAE3B,CACF,GAAG","names":["host","parentWindow","getLoanObject","objectId","options","loanObj","ssn","score"],"sourceRoot":"","file":"creditService/latest/creditService.checksum.js"}
1
+ {"version":3,"sources":["webpack://ice/creditService/latest/creditService.checksum.js"],"sourcesContent":["(function () {\n let host = null;\n const parentWindow = window.parent;\n parentWindow.emui = parentWindow.emui || {};\n\n const getLoanObject = async (objectId) => {\n if (host) {\n return await host.getObject(objectId);\n }\n return null;\n };\n\n parentWindow.emui.creditservice = {\n init: async (options) => {\n host = options.host;\n return Promise.resolve();\n },\n mount: async (options) => {\n const loanObj = await getLoanObject('Loan');\n const { ssn } = await loanObj.getLoanDetails();\n setTimeout(async () => {\n const score = ssn === '123456789' ? 800 : 600;\n await loanObj.setCreditScore(score);\n }, 1000);\n return Promise.resolve();\n },\n unmount: async (options) => Promise.resolve(),\n };\n})();\n"],"mappings":"CAAC,UAAY,CACX,IAAIA,EAAO,KACX,MAAMC,EAAe,OAAO,OAC5BA,EAAa,KAAOA,EAAa,MAAQ,CAAC,EAE1C,MAAMC,EAAgB,MAAOC,GACvBH,EACK,MAAMA,EAAK,UAAUG,CAAQ,EAE/B,KAGTF,EAAa,KAAK,cAAgB,CAChC,KAAM,MAAOG,IACXJ,EAAOI,EAAQ,KACR,QAAQ,QAAQ,GAEzB,MAAO,MAAOA,GAAY,CACxB,MAAMC,EAAU,MAAMH,EAAc,MAAM,EACpC,CAAE,IAAAI,CAAI,EAAI,MAAMD,EAAQ,eAAe,EAC7C,kBAAW,SAAY,CACrB,MAAME,EAAQD,IAAQ,YAAc,IAAM,IAC1C,MAAMD,EAAQ,eAAeE,CAAK,CACpC,EAAG,GAAI,EACA,QAAQ,QAAQ,CACzB,EACA,QAAS,MAAOH,GAAY,QAAQ,QAAQ,CAC9C,CACF,GAAG","names":["host","parentWindow","getLoanObject","objectId","options","loanObj","ssn","score"],"sourceRoot":"","file":"creditService/latest/creditService.checksum.js"}
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="mobile-web-app-capable" content="yes"/><link rel="icon" href="/favicon.ico"/><title>Application</title><script>!function(e,t,n,a,c,o,s){e.GoogleAnalyticsObject=c,e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},e[c].l=1*new Date,o=t.createElement(n),s=t.getElementsByTagName(n)[0],o.async=1,o.src="https://www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s)}(window,document,"script",0,"ga")</script><style>.full-width{width:100%}.full-height{height:100%}</style><script defer="defer" src="js/emuiAppBridge.a90a617911b273467444.js"></script></head><body class="full-width full-height"><noscript>If you're seeing this message, that means <strong>JavaScript has been disabled on your browser</strong>, please <strong>enable JS</strong> to make this app work.</noscript><div id="pui-app-container-" class="full-width full-height"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="mobile-web-app-capable" content="yes"/><link rel="icon" href="/favicon.ico"/><title>Application</title><script>!function(e,t,n,a,c,o,s){e.GoogleAnalyticsObject=c,e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},e[c].l=1*new Date,o=t.createElement(n),s=t.getElementsByTagName(n)[0],o.async=1,o.src="https://www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s)}(window,document,"script",0,"ga")</script><style>.full-width{width:100%}.full-height{height:100%}</style><script defer="defer" src="js/emuiAppBridge.a5cadcabb35056ac6244.js"></script></head><body class="full-width full-height"><noscript>If you're seeing this message, that means <strong>JavaScript has been disabled on your browser</strong>, please <strong>enable JS</strong> to make this app work.</noscript><div id="pui-app-container-" class="full-width full-height"></div></body></html>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://ice/guest/businessObjects.js"],"sourcesContent":["\nimport { getGuest } from './util.js';\n\nlet loanObj = null;\n\nconst ssfGuest = getGuest();\n\nexport const getLoanObject = async () => {\n if (!loanObj) loanObj = await ssfGuest.getObject('Loan');\n return loanObj;\n};\n\n"],"mappings":"AACA,OAAS,YAAAA,MAAgB,YAEzB,IAAIC,EAAU,KAEd,MAAMC,EAAWF,EAAS,EAEnB,aAAM,cAAgB,UACtBC,IAASA,EAAU,MAAMC,EAAS,UAAU,MAAM,GAChDD","names":["getGuest","loanObj","ssfGuest"],"sourceRoot":"","file":"guest/businessObjects.js"}
1
+ {"version":3,"sources":["webpack://ice/guest/businessObjects.js"],"sourcesContent":["import { getGuest } from './util.js';\n\nlet loanObj = null;\n\nconst ssfGuest = getGuest();\n\nexport const getLoanObject = async () => {\n if (!loanObj) loanObj = await ssfGuest.getObject('Loan');\n return loanObj;\n};\n"],"mappings":"AAAA,OAAS,YAAAA,MAAgB,YAEzB,IAAIC,EAAU,KAEd,MAAMC,EAAWF,EAAS,EAEnB,aAAM,cAAgB,UACtBC,IAASA,EAAU,MAAMC,EAAS,UAAU,MAAM,GAChDD","names":["getGuest","loanObj","ssfGuest"],"sourceRoot":"","file":"guest/businessObjects.js"}
Binary file
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Host</title><script src="https://cdn.tailwindcss.com?plugins=forms"></script><script src="https://qa.assets.rd.elliemae.io/pui-diagnostics@3"></script><script defer="defer" src="js/emuiAppBridge.a90a617911b273467444.js"></script></head><body><header class="bg-indigo-300 h-10 flex place-items-center"><div class="px-2">ICE Mortgage Product</div></header><main class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8"><div class="min-w-0 flex-1 mt-4"><h1 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">Loan Application</h1></div><div id="successFeedback" class="hidden rounded-md bg-green-50 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg></div><div class="ml-3"><p class="text-sm font-medium text-green-800">Loan Saved Successfully</p></div></div></div><div id="errorFeedback" class="hidden rounded-md bg-red-50 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd"/></svg></div><div class="ml-3"><h3 class="text-sm font-medium text-red-800">Credit Score is not meeting the requirement</h3></div></div></div><div class="mt-2 sm:grid sm:grid-cols-2 sm:gap-2"><form class="px-2 py-2 space-y-8 divide-y divide-gray-200 bg-gray-50"><div class="space-y-8 divide-y divide-gray-200 sm:space-y-5"><div class="space-y-6 sm:space-y-5"><div><h3 class="text-lg font-medium leading-6 text-gray-900">Personal Information</h3></div><div class="space-y-6 sm:space-y-5"><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="firstName" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">First name</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input name="firstName" id="firstName" autocomplete="given-name" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="John" placeholder="John"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="lastName" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Last name</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input name="lastName" id="lastName" autocomplete="family-name" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="Doe" placeholder="Doe"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="ssn" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">SSN</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="ssn" id="ssn" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="123456789" placeholder="123456789"/></div></div></div><div><h3 class="text-lg font-medium leading-6 text-gray-900">Loan Information</h3></div><div class="space-y-6 sm:space-y-5"><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="amount" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Amount</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="amount" id="amount" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="500000" placeholder="500000"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="Term" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Term (years)</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="term" id="term" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="30" placeholder="30"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="downPayment" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Down Payment</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="downPayment" id="downPayment" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="50000" placeholder="50000"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="creditScore" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Credit Score</label><div class="mt-1 sm:mt-0"><output id="creditScore" class="block w-full max-w-lg pl-2 pt-2 sm:max-w-xs sm:text-sm">NA</output></div><div class="mt-1 sm:mt-0"><button id="getCreditScore" type="button" class="inline-flex items-center rounded-full border border-transparent bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/></svg></button></div></div></div></div></div><button id="saveLoan" type="button" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Save</button></form><div id="aside-container" class="flex flex-col gap-4 items-start mt-4 border-2 p-2 rounded-lg border-dashed border-cyan-300 sm:mt-0"></div></div><div id="bottom-container" class="flex flex-col gap-4 items-start mt-4 p-2 sm:mt-0"></div></main><script src="./init.js" type="module"></script></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Host</title><script src="https://cdn.tailwindcss.com?plugins=forms"></script><script src="https://qa.assets.rd.elliemae.io/pui-diagnostics@3"></script><script defer="defer" src="js/emuiAppBridge.a5cadcabb35056ac6244.js"></script></head><body><header class="bg-indigo-300 h-10 flex place-items-center"><div class="px-2">ICE Mortgage Product</div></header><main class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8"><div class="min-w-0 flex-1 mt-4"><h1 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">Loan Application</h1></div><div id="successFeedback" class="hidden rounded-md bg-green-50 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg></div><div class="ml-3"><p class="text-sm font-medium text-green-800">Loan Saved Successfully</p></div></div></div><div id="errorFeedback" class="hidden rounded-md bg-red-50 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd"/></svg></div><div class="ml-3"><h3 class="text-sm font-medium text-red-800">Credit Score is not meeting the requirement</h3></div></div></div><div class="mt-2 sm:grid sm:grid-cols-2 sm:gap-2"><form class="px-2 py-2 space-y-8 divide-y divide-gray-200 bg-gray-50"><div class="space-y-8 divide-y divide-gray-200 sm:space-y-5"><div class="space-y-6 sm:space-y-5"><div><h3 class="text-lg font-medium leading-6 text-gray-900">Personal Information</h3></div><div class="space-y-6 sm:space-y-5"><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="firstName" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">First name</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input name="firstName" id="firstName" autocomplete="given-name" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="John" placeholder="John"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="lastName" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Last name</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input name="lastName" id="lastName" autocomplete="family-name" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="Doe" placeholder="Doe"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="ssn" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">SSN</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="ssn" id="ssn" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="123456789" placeholder="123456789"/></div></div></div><div><h3 class="text-lg font-medium leading-6 text-gray-900">Loan Information</h3></div><div class="space-y-6 sm:space-y-5"><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="amount" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Amount</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="amount" id="amount" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="500000" placeholder="500000"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="Term" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Term (years)</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="term" id="term" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="30" placeholder="30"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="downPayment" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Down Payment</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="downPayment" id="downPayment" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="50000" placeholder="50000"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="creditScore" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Credit Score</label><div class="mt-1 sm:mt-0"><output id="creditScore" class="block w-full max-w-lg pl-2 pt-2 sm:max-w-xs sm:text-sm">NA</output></div><div class="mt-1 sm:mt-0"><button id="getCreditScore" type="button" class="inline-flex items-center rounded-full border border-transparent bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/></svg></button></div></div></div></div></div><button id="saveLoan" type="button" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Save</button></form><div id="aside-container" class="flex flex-col gap-4 items-start mt-4 border-2 p-2 rounded-lg border-dashed border-cyan-300 sm:mt-0"></div></div><div id="bottom-container" class="flex flex-col gap-4 items-start mt-4 p-2 sm:mt-0"></div></main><script src="./init.js" type="module"></script></body></html>
Binary file
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://ice/init.js"],"sourcesContent":["import { Loan } from './loan-object.js';\nimport { getAppBridge } from './utils.js';\n\nlet appBridge = null;\nlet loanObj = null;\n\nconst setupCreditService = async () => {\n document.getElementById('getCreditScore').addEventListener('click', async () => {\n await appBridge.openApp({\n id: 'creditservice',\n frameOptions: {\n containerId: 'aside-container',\n title: 'Credit Service Corp',\n },\n });\n });\n};\n\nconst setupPricingService = async () => {\n await appBridge.openApp({\n id: 'pricingservice',\n frameOptions: {\n containerId: 'aside-container',\n title: 'Pricing Service Corp',\n },\n });\n};\n\nconst setupLoanValidationService = async () => {\n await appBridge.openApp({\n id: 'loanvalidation',\n frameOptions: {\n containerId: 'aside-container',\n title: 'Loan Validation Service Corp',\n },\n });\n};\n\nconst setupLoanObject = () => {\n loanObj = new Loan();\n appBridge.addScriptingObject(loanObj);\n};\n\nconst saveLoan = async () => {\n const loanDetails = loanObj.getLoanDetails();\n const results = await appBridge.dispatchEvent({\n event: loanObj.onPreSave,\n eventParams: loanDetails,\n });\n if (results.some((result) => result === false)) {\n const errorFeedback = document.getElementById('errorFeedback');\n errorFeedback.classList.remove('hidden');\n } else {\n const successFeedback = document.getElementById('successFeedback');\n successFeedback.classList.remove('hidden');\n }\n};\n\nconst init = async () => {\n appBridge = await getAppBridge();\n setupLoanObject();\n setupPricingService();\n setupCreditService();\n setupLoanValidationService();\n const saveLoanButton = document.getElementById('saveLoan');\n if (saveLoanButton) saveLoanButton.addEventListener('click', saveLoan); \n};\n\nwindow.addEventListener('DOMContentLoaded', init);\n"],"mappings":"AAAA,OAAS,QAAAA,MAAY,mBACrB,OAAS,gBAAAC,MAAoB,aAE7B,IAAIC,EAAY,KACZC,EAAU,KAEd,MAAMC,EAAqB,SAAY,CACrC,SAAS,eAAe,gBAAgB,EAAE,iBAAiB,QAAS,SAAY,CAC9E,MAAMF,EAAU,QAAQ,CACtB,GAAI,gBACJ,aAAc,CACZ,YAAa,kBACb,MAAO,qBACT,CACF,CAAC,CACH,CAAC,CACH,EAEMG,EAAsB,SAAY,CACtC,MAAMH,EAAU,QAAQ,CACtB,GAAI,iBACJ,aAAc,CACZ,YAAa,kBACb,MAAO,sBACT,CACF,CAAC,CACH,EAEMI,EAA6B,SAAY,CAC7C,MAAMJ,EAAU,QAAQ,CACtB,GAAI,iBACJ,aAAc,CACZ,YAAa,kBACb,MAAO,8BACT,CACF,CAAC,CACH,EAEMK,EAAkB,IAAM,CAC5BJ,EAAU,IAAIH,EACdE,EAAU,mBAAmBC,CAAO,CACtC,EAEMK,EAAW,SAAY,CAC3B,MAAMC,EAAcN,EAAQ,eAAe,GAC3B,MAAMD,EAAU,cAAc,CAC5C,MAAOC,EAAQ,UACf,YAAaM,CACf,CAAC,GACW,KAAMC,GAAWA,IAAW,EAAK,EACrB,SAAS,eAAe,eAAe,EAC/C,UAAU,OAAO,QAAQ,EAEf,SAAS,eAAe,iBAAiB,EACjD,UAAU,OAAO,QAAQ,CAE7C,EAEMC,EAAO,SAAY,CACvBT,EAAY,MAAMD,EAAa,EAC/BM,EAAgB,EAChBF,EAAoB,EACpBD,EAAmB,EACnBE,EAA2B,EAC3B,MAAMM,EAAiB,SAAS,eAAe,UAAU,EACrDA,GAAgBA,EAAe,iBAAiB,QAASJ,CAAQ,CACvE,EAEA,OAAO,iBAAiB,mBAAoBG,CAAI","names":["Loan","getAppBridge","appBridge","loanObj","setupCreditService","setupPricingService","setupLoanValidationService","setupLoanObject","saveLoan","loanDetails","result","init","saveLoanButton"],"sourceRoot":"","file":"init.js"}
1
+ {"version":3,"sources":["webpack://ice/init.js"],"sourcesContent":["import { Loan } from './loan-object.js';\nimport { getAppBridge } from './utils.js';\n\nlet appBridge = null;\nlet loanObj = null;\n\nconst setupCreditService = async () => {\n document\n .getElementById('getCreditScore')\n .addEventListener('click', async () => {\n await appBridge.openApp({\n id: 'creditservice',\n frameOptions: {\n containerId: 'aside-container',\n title: 'Credit Service Corp',\n },\n });\n });\n};\n\nconst setupPricingService = async () => {\n await appBridge.openApp({\n id: 'pricingservice',\n frameOptions: {\n containerId: 'aside-container',\n title: 'Pricing Service Corp',\n },\n });\n};\n\nconst setupLoanValidationService = async () => {\n await appBridge.openApp({\n id: 'loanvalidation',\n frameOptions: {\n containerId: 'aside-container',\n title: 'Loan Validation Service Corp',\n },\n });\n};\n\nconst setupLoanObject = () => {\n loanObj = new Loan();\n appBridge.addScriptingObject(loanObj);\n};\n\nconst saveLoan = async () => {\n const loanDetails = loanObj.getLoanDetails();\n const results = await appBridge.dispatchEvent({\n event: loanObj.onPreSave,\n eventParams: loanDetails,\n });\n if (results.some((result) => result === false)) {\n const errorFeedback = document.getElementById('errorFeedback');\n errorFeedback.classList.remove('hidden');\n } else {\n const successFeedback = document.getElementById('successFeedback');\n successFeedback.classList.remove('hidden');\n }\n};\n\nconst init = async () => {\n appBridge = await getAppBridge();\n setupLoanObject();\n setupPricingService();\n setupCreditService();\n setupLoanValidationService();\n const saveLoanButton = document.getElementById('saveLoan');\n if (saveLoanButton) saveLoanButton.addEventListener('click', saveLoan);\n};\n\nwindow.addEventListener('DOMContentLoaded', init);\n"],"mappings":"AAAA,OAAS,QAAAA,MAAY,mBACrB,OAAS,gBAAAC,MAAoB,aAE7B,IAAIC,EAAY,KACZC,EAAU,KAEd,MAAMC,EAAqB,SAAY,CACrC,SACG,eAAe,gBAAgB,EAC/B,iBAAiB,QAAS,SAAY,CACrC,MAAMF,EAAU,QAAQ,CACtB,GAAI,gBACJ,aAAc,CACZ,YAAa,kBACb,MAAO,qBACT,CACF,CAAC,CACH,CAAC,CACL,EAEMG,EAAsB,SAAY,CACtC,MAAMH,EAAU,QAAQ,CACtB,GAAI,iBACJ,aAAc,CACZ,YAAa,kBACb,MAAO,sBACT,CACF,CAAC,CACH,EAEMI,EAA6B,SAAY,CAC7C,MAAMJ,EAAU,QAAQ,CACtB,GAAI,iBACJ,aAAc,CACZ,YAAa,kBACb,MAAO,8BACT,CACF,CAAC,CACH,EAEMK,EAAkB,IAAM,CAC5BJ,EAAU,IAAIH,EACdE,EAAU,mBAAmBC,CAAO,CACtC,EAEMK,EAAW,SAAY,CAC3B,MAAMC,EAAcN,EAAQ,eAAe,GAC3B,MAAMD,EAAU,cAAc,CAC5C,MAAOC,EAAQ,UACf,YAAaM,CACf,CAAC,GACW,KAAMC,GAAWA,IAAW,EAAK,EACrB,SAAS,eAAe,eAAe,EAC/C,UAAU,OAAO,QAAQ,EAEf,SAAS,eAAe,iBAAiB,EACjD,UAAU,OAAO,QAAQ,CAE7C,EAEMC,EAAO,SAAY,CACvBT,EAAY,MAAMD,EAAa,EAC/BM,EAAgB,EAChBF,EAAoB,EACpBD,EAAmB,EACnBE,EAA2B,EAC3B,MAAMM,EAAiB,SAAS,eAAe,UAAU,EACrDA,GAAgBA,EAAe,iBAAiB,QAASJ,CAAQ,CACvE,EAEA,OAAO,iBAAiB,mBAAoBG,CAAI","names":["Loan","getAppBridge","appBridge","loanObj","setupCreditService","setupPricingService","setupLoanValidationService","setupLoanObject","saveLoan","loanDetails","result","init","saveLoanButton"],"sourceRoot":"","file":"init.js"}