@melio-eng/web-sdk 1.0.30-pr.58.aa054e9 → 1.0.31-pr.59.3147594
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/flows/Flow.js +1 -0
- package/dist/flows/OnboardingFlow.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/flows/Flow.js
CHANGED
|
@@ -18,7 +18,7 @@ export class OnboardingFlow extends Flow {
|
|
|
18
18
|
* Construct the specific flow URL for onboarding - now goes through /auth
|
|
19
19
|
*/
|
|
20
20
|
constructFlowUrl(baseUrl) {
|
|
21
|
-
const params = Object.fromEntries(Object.entries(this.preFilledParams).filter(([
|
|
21
|
+
const params = Object.fromEntries(Object.entries(this.preFilledParams).filter(([, v]) => v !== undefined));
|
|
22
22
|
let preFilledBase64 = '';
|
|
23
23
|
if (Object.keys(params).length > 0) {
|
|
24
24
|
try {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9,11 +9,16 @@ export class MelioSDK {
|
|
|
9
9
|
this.partnerName = '';
|
|
10
10
|
this.branchOverride = undefined;
|
|
11
11
|
this.authCode = '';
|
|
12
|
+
this.initFlow = null;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Initialize the SDK - triggers auth event without creating iframe
|
|
15
16
|
*/
|
|
16
17
|
init(authenticationCode, options) {
|
|
18
|
+
if (this.initFlow) {
|
|
19
|
+
console.log('SDK already initialized. Returning existing init flow instance.');
|
|
20
|
+
return this.initFlow;
|
|
21
|
+
}
|
|
17
22
|
this.partnerName = options.partnerName;
|
|
18
23
|
this.environment = options.environment || 'production';
|
|
19
24
|
this.branchOverride = options.branchOverride;
|
|
@@ -28,7 +33,8 @@ export class MelioSDK {
|
|
|
28
33
|
console.log('InitFlow initialized successfully');
|
|
29
34
|
if (options.keepAlive)
|
|
30
35
|
initFlow.setupKeepAlive();
|
|
31
|
-
|
|
36
|
+
this.initFlow = initFlow;
|
|
37
|
+
return this.initFlow;
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
40
|
* Launch the onboarding flow
|
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.31-pr.59.3147594",
|
|
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",
|