@melio-eng/web-sdk 1.0.29-pr.57.9cad2ef → 1.0.30-pr.57.0cef697
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/index.js +2 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -299,21 +299,6 @@ class InitFlow extends Flow {
|
|
|
299
299
|
this.iframe.style.top = '-9999px';
|
|
300
300
|
this.container.appendChild(this.iframe);
|
|
301
301
|
}
|
|
302
|
-
/**
|
|
303
|
-
* Override setupEventListeners to handle AUTHENTICATION_SUCCESS and remove iframe
|
|
304
|
-
*/
|
|
305
|
-
setupEventListeners() {
|
|
306
|
-
super.setupEventListeners();
|
|
307
|
-
window.addEventListener('message', (event) => {
|
|
308
|
-
if (!/melio\.com|melioservices\.com/.test(event.origin)) {
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
const { type } = event.data;
|
|
312
|
-
if (type === 'AUTHENTICATION_SUCCESS') {
|
|
313
|
-
this.close();
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
302
|
/**
|
|
318
303
|
* Construct the specific flow URL for initialization
|
|
319
304
|
*/
|
|
@@ -359,6 +344,8 @@ export class MelioSDK {
|
|
|
359
344
|
{ authCode: authenticationCode, containerId: '' }, this.partnerName, this.environment, this.branchOverride);
|
|
360
345
|
initFlow.initialize();
|
|
361
346
|
console.log('InitFlow initialized successfully');
|
|
347
|
+
if (options.keepAlive)
|
|
348
|
+
initFlow.setupKeepAlive();
|
|
362
349
|
return initFlow;
|
|
363
350
|
}
|
|
364
351
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melio-eng/web-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30-pr.57.0cef697",
|
|
4
4
|
"description": "Melio Web SDK - Embed core Melio workflows directly into partner UI with minimal effort",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|