@stripe/connect-js 3.1.1-beta.1 → 3.2.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/connect.esm.js +7 -22
- package/dist/connect.js +7 -22
- package/dist/pure.esm.js +7 -22
- package/dist/pure.js +7 -22
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +3 -21
- package/package.json +1 -1
- package/src/shared.ts +6 -18
- package/types/config.ts +3 -25
- package/types/shared.d.ts +2 -8
package/dist/connect.esm.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
const ConnectElementCustomMethodConfig = {
|
|
4
|
-
"payment-details": {
|
|
5
|
-
setPayment: _payment => {},
|
|
6
|
-
setOnClose: _listener => {}
|
|
7
|
-
},
|
|
8
4
|
"account-onboarding": {
|
|
9
5
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
10
6
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -12,31 +8,20 @@ const ConnectElementCustomMethodConfig = {
|
|
|
12
8
|
setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
|
|
13
9
|
setOnExit: _listener => {}
|
|
14
10
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
19
|
-
},
|
|
20
|
-
"issuing-cards-list": {
|
|
21
|
-
setCardArtFileLink: _cardArtFileLink => {},
|
|
22
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
11
|
+
"payment-details": {
|
|
12
|
+
setPayment: _payment => {},
|
|
13
|
+
setOnClose: _listener => {}
|
|
23
14
|
}
|
|
24
15
|
};
|
|
25
16
|
|
|
26
17
|
const componentNameMapping = {
|
|
18
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
27
19
|
payments: "stripe-connect-payments",
|
|
28
|
-
payouts: "stripe-connect-payouts",
|
|
29
20
|
"payment-details": "stripe-connect-payment-details",
|
|
30
|
-
|
|
31
|
-
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
32
|
-
"account-management": "stripe-connect-account-management",
|
|
33
|
-
"notification-banner": "stripe-connect-notification-banner",
|
|
34
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
35
|
-
"issuing-card": "stripe-connect-issuing-card",
|
|
36
|
-
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
21
|
+
payouts: "stripe-connect-payouts"
|
|
37
22
|
};
|
|
38
23
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
39
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
24
|
+
const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
40
25
|
const findScript = () => {
|
|
41
26
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
42
27
|
};
|
|
@@ -147,7 +132,7 @@ const createWrapper = stripeConnect => {
|
|
|
147
132
|
sdk: true,
|
|
148
133
|
sdkOptions: {
|
|
149
134
|
// This will be replaced by the npm package version when bundling
|
|
150
|
-
sdkVersion: "3.
|
|
135
|
+
sdkVersion: "3.2.0"
|
|
151
136
|
}
|
|
152
137
|
})
|
|
153
138
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -5,10 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7
7
|
const ConnectElementCustomMethodConfig = {
|
|
8
|
-
"payment-details": {
|
|
9
|
-
setPayment: _payment => {},
|
|
10
|
-
setOnClose: _listener => {}
|
|
11
|
-
},
|
|
12
8
|
"account-onboarding": {
|
|
13
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
14
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -16,31 +12,20 @@ const ConnectElementCustomMethodConfig = {
|
|
|
16
12
|
setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
|
|
17
13
|
setOnExit: _listener => {}
|
|
18
14
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
23
|
-
},
|
|
24
|
-
"issuing-cards-list": {
|
|
25
|
-
setCardArtFileLink: _cardArtFileLink => {},
|
|
26
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
15
|
+
"payment-details": {
|
|
16
|
+
setPayment: _payment => {},
|
|
17
|
+
setOnClose: _listener => {}
|
|
27
18
|
}
|
|
28
19
|
};
|
|
29
20
|
|
|
30
21
|
const componentNameMapping = {
|
|
22
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
31
23
|
payments: "stripe-connect-payments",
|
|
32
|
-
payouts: "stripe-connect-payouts",
|
|
33
24
|
"payment-details": "stripe-connect-payment-details",
|
|
34
|
-
|
|
35
|
-
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
36
|
-
"account-management": "stripe-connect-account-management",
|
|
37
|
-
"notification-banner": "stripe-connect-notification-banner",
|
|
38
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
39
|
-
"issuing-card": "stripe-connect-issuing-card",
|
|
40
|
-
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
25
|
+
payouts: "stripe-connect-payouts"
|
|
41
26
|
};
|
|
42
27
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
43
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
28
|
+
const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
44
29
|
const findScript = () => {
|
|
45
30
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
46
31
|
};
|
|
@@ -151,7 +136,7 @@ const createWrapper = stripeConnect => {
|
|
|
151
136
|
sdk: true,
|
|
152
137
|
sdkOptions: {
|
|
153
138
|
// This will be replaced by the npm package version when bundling
|
|
154
|
-
sdkVersion: "3.
|
|
139
|
+
sdkVersion: "3.2.0"
|
|
155
140
|
}
|
|
156
141
|
})
|
|
157
142
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
const ConnectElementCustomMethodConfig = {
|
|
4
|
-
"payment-details": {
|
|
5
|
-
setPayment: _payment => {},
|
|
6
|
-
setOnClose: _listener => {}
|
|
7
|
-
},
|
|
8
4
|
"account-onboarding": {
|
|
9
5
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
10
6
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -12,31 +8,20 @@ const ConnectElementCustomMethodConfig = {
|
|
|
12
8
|
setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
|
|
13
9
|
setOnExit: _listener => {}
|
|
14
10
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
19
|
-
},
|
|
20
|
-
"issuing-cards-list": {
|
|
21
|
-
setCardArtFileLink: _cardArtFileLink => {},
|
|
22
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
11
|
+
"payment-details": {
|
|
12
|
+
setPayment: _payment => {},
|
|
13
|
+
setOnClose: _listener => {}
|
|
23
14
|
}
|
|
24
15
|
};
|
|
25
16
|
|
|
26
17
|
const componentNameMapping = {
|
|
18
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
27
19
|
payments: "stripe-connect-payments",
|
|
28
|
-
payouts: "stripe-connect-payouts",
|
|
29
20
|
"payment-details": "stripe-connect-payment-details",
|
|
30
|
-
|
|
31
|
-
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
32
|
-
"account-management": "stripe-connect-account-management",
|
|
33
|
-
"notification-banner": "stripe-connect-notification-banner",
|
|
34
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
35
|
-
"issuing-card": "stripe-connect-issuing-card",
|
|
36
|
-
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
21
|
+
payouts: "stripe-connect-payouts"
|
|
37
22
|
};
|
|
38
23
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
39
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
24
|
+
const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
40
25
|
const findScript = () => {
|
|
41
26
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
42
27
|
};
|
|
@@ -147,7 +132,7 @@ const createWrapper = stripeConnect => {
|
|
|
147
132
|
sdk: true,
|
|
148
133
|
sdkOptions: {
|
|
149
134
|
// This will be replaced by the npm package version when bundling
|
|
150
|
-
sdkVersion: "3.
|
|
135
|
+
sdkVersion: "3.2.0"
|
|
151
136
|
}
|
|
152
137
|
})
|
|
153
138
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -5,10 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7
7
|
const ConnectElementCustomMethodConfig = {
|
|
8
|
-
"payment-details": {
|
|
9
|
-
setPayment: _payment => {},
|
|
10
|
-
setOnClose: _listener => {}
|
|
11
|
-
},
|
|
12
8
|
"account-onboarding": {
|
|
13
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
14
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -16,31 +12,20 @@ const ConnectElementCustomMethodConfig = {
|
|
|
16
12
|
setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
|
|
17
13
|
setOnExit: _listener => {}
|
|
18
14
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
23
|
-
},
|
|
24
|
-
"issuing-cards-list": {
|
|
25
|
-
setCardArtFileLink: _cardArtFileLink => {},
|
|
26
|
-
setFetchEphemeralKey: _fetchEphemeralKey => {}
|
|
15
|
+
"payment-details": {
|
|
16
|
+
setPayment: _payment => {},
|
|
17
|
+
setOnClose: _listener => {}
|
|
27
18
|
}
|
|
28
19
|
};
|
|
29
20
|
|
|
30
21
|
const componentNameMapping = {
|
|
22
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
31
23
|
payments: "stripe-connect-payments",
|
|
32
|
-
payouts: "stripe-connect-payouts",
|
|
33
24
|
"payment-details": "stripe-connect-payment-details",
|
|
34
|
-
|
|
35
|
-
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
36
|
-
"account-management": "stripe-connect-account-management",
|
|
37
|
-
"notification-banner": "stripe-connect-notification-banner",
|
|
38
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
39
|
-
"issuing-card": "stripe-connect-issuing-card",
|
|
40
|
-
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
25
|
+
payouts: "stripe-connect-payouts"
|
|
41
26
|
};
|
|
42
27
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
43
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
28
|
+
const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
44
29
|
const findScript = () => {
|
|
45
30
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
46
31
|
};
|
|
@@ -151,7 +136,7 @@ const createWrapper = stripeConnect => {
|
|
|
151
136
|
sdk: true,
|
|
152
137
|
sdkOptions: {
|
|
153
138
|
// This will be replaced by the npm package version when bundling
|
|
154
|
-
sdkVersion: "3.
|
|
139
|
+
sdkVersion: "3.2.0"
|
|
155
140
|
}
|
|
156
141
|
})
|
|
157
142
|
}));
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
|
-
|
|
3
|
+
type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-payouts";
|
|
4
4
|
export declare const componentNameMapping: Record<ConnectElementTagName, ConnectElementHTMLName>;
|
|
5
5
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
6
6
|
debugInstance: () => Promise<StripeConnectInstance>;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
type FetchEphemeralKeyFunction = (fetchParams: {
|
|
2
|
-
issuingCard: string;
|
|
3
|
-
nonce: string;
|
|
4
|
-
}) => Promise<{
|
|
5
|
-
issuingCard: string;
|
|
6
|
-
nonce: string;
|
|
7
|
-
ephemeralKeySecret: string;
|
|
8
|
-
}>;
|
|
9
1
|
export declare const ConnectElementCustomMethodConfig: {
|
|
10
|
-
"payment-details": {
|
|
11
|
-
setPayment: (_payment: string | undefined) => void;
|
|
12
|
-
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
13
|
-
};
|
|
14
2
|
"account-onboarding": {
|
|
15
3
|
setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
|
|
16
4
|
setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
|
|
@@ -18,14 +6,8 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
18
6
|
setSkipTermsOfServiceCollection: (_skipTermsOfServiceCollection: boolean | undefined) => void;
|
|
19
7
|
setOnExit: (_listener: (() => void) | undefined) => void;
|
|
20
8
|
};
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
|
|
25
|
-
};
|
|
26
|
-
"issuing-cards-list": {
|
|
27
|
-
setCardArtFileLink: (_cardArtFileLink: string | undefined) => void;
|
|
28
|
-
setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
|
|
9
|
+
"payment-details": {
|
|
10
|
+
setPayment: (_payment: string | undefined) => void;
|
|
11
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
29
12
|
};
|
|
30
13
|
};
|
|
31
|
-
export {};
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -10,32 +10,20 @@ export type LoadConnectAndInitialize = (
|
|
|
10
10
|
initParams: IStripeConnectInitParams
|
|
11
11
|
) => StripeConnectInstance;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
type ConnectElementHTMLName =
|
|
14
|
+
| "stripe-connect-account-onboarding"
|
|
14
15
|
| "stripe-connect-payments"
|
|
15
|
-
| "stripe-connect-payouts"
|
|
16
16
|
| "stripe-connect-payment-details"
|
|
17
|
-
| "stripe-connect-
|
|
18
|
-
| "stripe-connect-payment-method-settings"
|
|
19
|
-
| "stripe-connect-account-management"
|
|
20
|
-
| "stripe-connect-notification-banner"
|
|
21
|
-
| "stripe-connect-instant-payouts"
|
|
22
|
-
| "stripe-connect-issuing-card"
|
|
23
|
-
| "stripe-connect-issuing-cards-list";
|
|
17
|
+
| "stripe-connect-payouts";
|
|
24
18
|
|
|
25
19
|
export const componentNameMapping: Record<
|
|
26
20
|
ConnectElementTagName,
|
|
27
21
|
ConnectElementHTMLName
|
|
28
22
|
> = {
|
|
23
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
29
24
|
payments: "stripe-connect-payments",
|
|
30
|
-
payouts: "stripe-connect-payouts",
|
|
31
25
|
"payment-details": "stripe-connect-payment-details",
|
|
32
|
-
|
|
33
|
-
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
34
|
-
"account-management": "stripe-connect-account-management",
|
|
35
|
-
"notification-banner": "stripe-connect-notification-banner",
|
|
36
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
37
|
-
"issuing-card": "stripe-connect-issuing-card",
|
|
38
|
-
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
26
|
+
payouts: "stripe-connect-payouts"
|
|
39
27
|
};
|
|
40
28
|
|
|
41
29
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
@@ -48,7 +36,7 @@ interface StripeConnectWrapper {
|
|
|
48
36
|
|
|
49
37
|
const EXISTING_SCRIPT_MESSAGE =
|
|
50
38
|
"loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
51
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
39
|
+
const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
52
40
|
|
|
53
41
|
export const findScript = (): HTMLScriptElement | null => {
|
|
54
42
|
return (
|
package/types/config.ts
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
|
|
4
|
-
type FetchEphemeralKeyFunction = (fetchParams: {
|
|
5
|
-
issuingCard: string;
|
|
6
|
-
nonce: string;
|
|
7
|
-
}) => Promise<{
|
|
8
|
-
issuingCard: string;
|
|
9
|
-
nonce: string;
|
|
10
|
-
ephemeralKeySecret: string;
|
|
11
|
-
}>;
|
|
12
|
-
|
|
13
4
|
export const ConnectElementCustomMethodConfig = {
|
|
14
|
-
"payment-details": {
|
|
15
|
-
setPayment: (_payment: string | undefined): void => {},
|
|
16
|
-
setOnClose: (_listener: (() => void) | undefined): void => {}
|
|
17
|
-
},
|
|
18
5
|
"account-onboarding": {
|
|
19
6
|
setFullTermsOfServiceUrl: (
|
|
20
7
|
_termOfServiceUrl: string | undefined
|
|
@@ -28,17 +15,8 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
28
15
|
): void => {},
|
|
29
16
|
setOnExit: (_listener: (() => void) | undefined): void => {}
|
|
30
17
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setFetchEphemeralKey: (
|
|
35
|
-
_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
|
|
36
|
-
): void => {}
|
|
37
|
-
},
|
|
38
|
-
"issuing-cards-list": {
|
|
39
|
-
setCardArtFileLink: (_cardArtFileLink: string | undefined): void => {},
|
|
40
|
-
setFetchEphemeralKey: (
|
|
41
|
-
_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
|
|
42
|
-
): void => {}
|
|
18
|
+
"payment-details": {
|
|
19
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
20
|
+
setOnClose: (_listener: (() => void) | undefined): void => {}
|
|
43
21
|
}
|
|
44
22
|
};
|
package/types/shared.d.ts
CHANGED
|
@@ -447,13 +447,7 @@ export interface StripeConnectInstance {
|
|
|
447
447
|
* Tagnames to be used with the `create` method of the Connect instance.
|
|
448
448
|
*/
|
|
449
449
|
export type ConnectElementTagName =
|
|
450
|
+
| "account-onboarding"
|
|
450
451
|
| "payments"
|
|
451
|
-
| "payouts"
|
|
452
452
|
| "payment-details"
|
|
453
|
-
| "
|
|
454
|
-
| "payment-method-settings"
|
|
455
|
-
| "account-management"
|
|
456
|
-
| "notification-banner"
|
|
457
|
-
| "instant-payouts"
|
|
458
|
-
| "issuing-card"
|
|
459
|
-
| "issuing-cards-list";
|
|
453
|
+
| "payouts";
|