@stripe/connect-js 3.1.0 → 3.2.0-beta.1
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 +24 -3
- package/dist/connect.js +24 -3
- package/dist/pure.esm.js +24 -3
- package/dist/pure.js +24 -3
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +12 -0
- package/package.json +1 -1
- package/src/shared.ts +22 -3
- package/types/config.ts +12 -0
- package/types/shared.d.ts +31 -1
package/dist/connect.esm.js
CHANGED
|
@@ -1,20 +1,41 @@
|
|
|
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
|
+
},
|
|
4
8
|
"account-onboarding": {
|
|
5
9
|
setFullTermsOfServiceUrl: termOfServiceUrl => {},
|
|
6
10
|
setRecipientTermsOfServiceUrl: recipientTermsOfServiceUrl => {},
|
|
7
11
|
setPrivacyPolicyUrl: privacyPolicyUrl => {},
|
|
8
12
|
setSkipTermsOfServiceCollection: skipTermsOfServiceCollection => {},
|
|
9
13
|
setOnExit: listener => {}
|
|
14
|
+
},
|
|
15
|
+
"issuing-card": {
|
|
16
|
+
setDefaultCard: defaultCard => {},
|
|
17
|
+
setCardArtFileLink: cardArtFileLink => {},
|
|
18
|
+
setCardSwitching: cardSwitching => {}
|
|
19
|
+
},
|
|
20
|
+
"issuing-cards-list": {
|
|
21
|
+
setCardArtFileLink: cardArtFileLink => {}
|
|
10
22
|
}
|
|
11
23
|
};
|
|
12
24
|
|
|
13
25
|
const componentNameMapping = {
|
|
14
|
-
|
|
26
|
+
payments: "stripe-connect-payments",
|
|
27
|
+
payouts: "stripe-connect-payouts",
|
|
28
|
+
"payment-details": "stripe-connect-payment-details",
|
|
29
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
30
|
+
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
31
|
+
"account-management": "stripe-connect-account-management",
|
|
32
|
+
"notification-banner": "stripe-connect-notification-banner",
|
|
33
|
+
"instant-payouts": "stripe-connect-instant-payouts",
|
|
34
|
+
"issuing-card": "stripe-connect-issuing-card",
|
|
35
|
+
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
15
36
|
};
|
|
16
37
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
17
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
38
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
18
39
|
const findScript = () => {
|
|
19
40
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0];
|
|
20
41
|
};
|
|
@@ -125,7 +146,7 @@ const createWrapper = stripeConnect => {
|
|
|
125
146
|
sdk: true,
|
|
126
147
|
sdkOptions: {
|
|
127
148
|
// This will be replaced by the npm package version when bundling
|
|
128
|
-
sdkVersion: "3.
|
|
149
|
+
sdkVersion: "3.2.0-beta.1"
|
|
129
150
|
}
|
|
130
151
|
})
|
|
131
152
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -5,20 +5,41 @@ 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
|
+
},
|
|
8
12
|
"account-onboarding": {
|
|
9
13
|
setFullTermsOfServiceUrl: termOfServiceUrl => {},
|
|
10
14
|
setRecipientTermsOfServiceUrl: recipientTermsOfServiceUrl => {},
|
|
11
15
|
setPrivacyPolicyUrl: privacyPolicyUrl => {},
|
|
12
16
|
setSkipTermsOfServiceCollection: skipTermsOfServiceCollection => {},
|
|
13
17
|
setOnExit: listener => {}
|
|
18
|
+
},
|
|
19
|
+
"issuing-card": {
|
|
20
|
+
setDefaultCard: defaultCard => {},
|
|
21
|
+
setCardArtFileLink: cardArtFileLink => {},
|
|
22
|
+
setCardSwitching: cardSwitching => {}
|
|
23
|
+
},
|
|
24
|
+
"issuing-cards-list": {
|
|
25
|
+
setCardArtFileLink: cardArtFileLink => {}
|
|
14
26
|
}
|
|
15
27
|
};
|
|
16
28
|
|
|
17
29
|
const componentNameMapping = {
|
|
18
|
-
|
|
30
|
+
payments: "stripe-connect-payments",
|
|
31
|
+
payouts: "stripe-connect-payouts",
|
|
32
|
+
"payment-details": "stripe-connect-payment-details",
|
|
33
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
34
|
+
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
35
|
+
"account-management": "stripe-connect-account-management",
|
|
36
|
+
"notification-banner": "stripe-connect-notification-banner",
|
|
37
|
+
"instant-payouts": "stripe-connect-instant-payouts",
|
|
38
|
+
"issuing-card": "stripe-connect-issuing-card",
|
|
39
|
+
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
19
40
|
};
|
|
20
41
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
21
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
42
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
22
43
|
const findScript = () => {
|
|
23
44
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0];
|
|
24
45
|
};
|
|
@@ -129,7 +150,7 @@ const createWrapper = stripeConnect => {
|
|
|
129
150
|
sdk: true,
|
|
130
151
|
sdkOptions: {
|
|
131
152
|
// This will be replaced by the npm package version when bundling
|
|
132
|
-
sdkVersion: "3.
|
|
153
|
+
sdkVersion: "3.2.0-beta.1"
|
|
133
154
|
}
|
|
134
155
|
})
|
|
135
156
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -1,20 +1,41 @@
|
|
|
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
|
+
},
|
|
4
8
|
"account-onboarding": {
|
|
5
9
|
setFullTermsOfServiceUrl: termOfServiceUrl => {},
|
|
6
10
|
setRecipientTermsOfServiceUrl: recipientTermsOfServiceUrl => {},
|
|
7
11
|
setPrivacyPolicyUrl: privacyPolicyUrl => {},
|
|
8
12
|
setSkipTermsOfServiceCollection: skipTermsOfServiceCollection => {},
|
|
9
13
|
setOnExit: listener => {}
|
|
14
|
+
},
|
|
15
|
+
"issuing-card": {
|
|
16
|
+
setDefaultCard: defaultCard => {},
|
|
17
|
+
setCardArtFileLink: cardArtFileLink => {},
|
|
18
|
+
setCardSwitching: cardSwitching => {}
|
|
19
|
+
},
|
|
20
|
+
"issuing-cards-list": {
|
|
21
|
+
setCardArtFileLink: cardArtFileLink => {}
|
|
10
22
|
}
|
|
11
23
|
};
|
|
12
24
|
|
|
13
25
|
const componentNameMapping = {
|
|
14
|
-
|
|
26
|
+
payments: "stripe-connect-payments",
|
|
27
|
+
payouts: "stripe-connect-payouts",
|
|
28
|
+
"payment-details": "stripe-connect-payment-details",
|
|
29
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
30
|
+
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
31
|
+
"account-management": "stripe-connect-account-management",
|
|
32
|
+
"notification-banner": "stripe-connect-notification-banner",
|
|
33
|
+
"instant-payouts": "stripe-connect-instant-payouts",
|
|
34
|
+
"issuing-card": "stripe-connect-issuing-card",
|
|
35
|
+
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
15
36
|
};
|
|
16
37
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
17
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
38
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
18
39
|
const findScript = () => {
|
|
19
40
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0];
|
|
20
41
|
};
|
|
@@ -125,7 +146,7 @@ const createWrapper = stripeConnect => {
|
|
|
125
146
|
sdk: true,
|
|
126
147
|
sdkOptions: {
|
|
127
148
|
// This will be replaced by the npm package version when bundling
|
|
128
|
-
sdkVersion: "3.
|
|
149
|
+
sdkVersion: "3.2.0-beta.1"
|
|
129
150
|
}
|
|
130
151
|
})
|
|
131
152
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -5,20 +5,41 @@ 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
|
+
},
|
|
8
12
|
"account-onboarding": {
|
|
9
13
|
setFullTermsOfServiceUrl: termOfServiceUrl => {},
|
|
10
14
|
setRecipientTermsOfServiceUrl: recipientTermsOfServiceUrl => {},
|
|
11
15
|
setPrivacyPolicyUrl: privacyPolicyUrl => {},
|
|
12
16
|
setSkipTermsOfServiceCollection: skipTermsOfServiceCollection => {},
|
|
13
17
|
setOnExit: listener => {}
|
|
18
|
+
},
|
|
19
|
+
"issuing-card": {
|
|
20
|
+
setDefaultCard: defaultCard => {},
|
|
21
|
+
setCardArtFileLink: cardArtFileLink => {},
|
|
22
|
+
setCardSwitching: cardSwitching => {}
|
|
23
|
+
},
|
|
24
|
+
"issuing-cards-list": {
|
|
25
|
+
setCardArtFileLink: cardArtFileLink => {}
|
|
14
26
|
}
|
|
15
27
|
};
|
|
16
28
|
|
|
17
29
|
const componentNameMapping = {
|
|
18
|
-
|
|
30
|
+
payments: "stripe-connect-payments",
|
|
31
|
+
payouts: "stripe-connect-payouts",
|
|
32
|
+
"payment-details": "stripe-connect-payment-details",
|
|
33
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
34
|
+
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
35
|
+
"account-management": "stripe-connect-account-management",
|
|
36
|
+
"notification-banner": "stripe-connect-notification-banner",
|
|
37
|
+
"instant-payouts": "stripe-connect-instant-payouts",
|
|
38
|
+
"issuing-card": "stripe-connect-issuing-card",
|
|
39
|
+
"issuing-cards-list": "stripe-connect-issuing-cards-list"
|
|
19
40
|
};
|
|
20
41
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
21
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
42
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
22
43
|
const findScript = () => {
|
|
23
44
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0];
|
|
24
45
|
};
|
|
@@ -129,7 +150,7 @@ const createWrapper = stripeConnect => {
|
|
|
129
150
|
sdk: true,
|
|
130
151
|
sdkOptions: {
|
|
131
152
|
// This will be replaced by the npm package version when bundling
|
|
132
|
-
sdkVersion: "3.
|
|
153
|
+
sdkVersion: "3.2.0-beta.1"
|
|
133
154
|
}
|
|
134
155
|
})
|
|
135
156
|
}));
|
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
|
-
type ConnectElementHTMLName = "stripe-connect-account-onboarding";
|
|
3
|
+
export type ConnectElementHTMLName = "stripe-connect-payments" | "stripe-connect-payouts" | "stripe-connect-payment-details" | "stripe-connect-account-onboarding" | "stripe-connect-payment-method-settings" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list";
|
|
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,4 +1,8 @@
|
|
|
1
1
|
export declare const ConnectElementCustomMethodConfig: {
|
|
2
|
+
"payment-details": {
|
|
3
|
+
setPayment: (payment: string | undefined) => void;
|
|
4
|
+
setOnClose: (listener: (() => void) | undefined) => void;
|
|
5
|
+
};
|
|
2
6
|
"account-onboarding": {
|
|
3
7
|
setFullTermsOfServiceUrl: (termOfServiceUrl: string | undefined) => void;
|
|
4
8
|
setRecipientTermsOfServiceUrl: (recipientTermsOfServiceUrl: string | undefined) => void;
|
|
@@ -6,4 +10,12 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
6
10
|
setSkipTermsOfServiceCollection: (skipTermsOfServiceCollection: boolean | undefined) => void;
|
|
7
11
|
setOnExit: (listener: (() => void) | undefined) => void;
|
|
8
12
|
};
|
|
13
|
+
"issuing-card": {
|
|
14
|
+
setDefaultCard: (defaultCard: string | undefined) => void;
|
|
15
|
+
setCardArtFileLink: (cardArtFileLink: string | undefined) => void;
|
|
16
|
+
setCardSwitching: (cardSwitching: boolean | undefined) => void;
|
|
17
|
+
};
|
|
18
|
+
"issuing-cards-list": {
|
|
19
|
+
setCardArtFileLink: (cardArtFileLink: string | undefined) => void;
|
|
20
|
+
};
|
|
9
21
|
};
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -10,13 +10,32 @@ export type LoadConnectAndInitialize = (
|
|
|
10
10
|
initParams: IStripeConnectInitParams
|
|
11
11
|
) => StripeConnectInstance;
|
|
12
12
|
|
|
13
|
-
type ConnectElementHTMLName =
|
|
13
|
+
export type ConnectElementHTMLName =
|
|
14
|
+
| "stripe-connect-payments"
|
|
15
|
+
| "stripe-connect-payouts"
|
|
16
|
+
| "stripe-connect-payment-details"
|
|
17
|
+
| "stripe-connect-account-onboarding"
|
|
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";
|
|
14
24
|
|
|
15
25
|
export const componentNameMapping: Record<
|
|
16
26
|
ConnectElementTagName,
|
|
17
27
|
ConnectElementHTMLName
|
|
18
28
|
> = {
|
|
19
|
-
|
|
29
|
+
payments: "stripe-connect-payments",
|
|
30
|
+
payouts: "stripe-connect-payouts",
|
|
31
|
+
"payment-details": "stripe-connect-payment-details",
|
|
32
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
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"
|
|
20
39
|
};
|
|
21
40
|
|
|
22
41
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
@@ -29,7 +48,7 @@ interface StripeConnectWrapper {
|
|
|
29
48
|
|
|
30
49
|
const EXISTING_SCRIPT_MESSAGE =
|
|
31
50
|
"loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
32
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
51
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
33
52
|
|
|
34
53
|
export const findScript = (): HTMLScriptElement | null => {
|
|
35
54
|
return document.querySelectorAll<HTMLScriptElement>(
|
package/types/config.ts
CHANGED
|
@@ -4,6 +4,10 @@ import { ConnectElementTagName } from "./shared.d";
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
5
|
|
|
6
6
|
export const ConnectElementCustomMethodConfig = {
|
|
7
|
+
"payment-details": {
|
|
8
|
+
setPayment: (payment: string | undefined): void => {},
|
|
9
|
+
setOnClose: (listener: (() => void) | undefined): void => {}
|
|
10
|
+
},
|
|
7
11
|
"account-onboarding": {
|
|
8
12
|
setFullTermsOfServiceUrl: (
|
|
9
13
|
termOfServiceUrl: string | undefined
|
|
@@ -16,6 +20,14 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
16
20
|
skipTermsOfServiceCollection: boolean | undefined
|
|
17
21
|
): void => {},
|
|
18
22
|
setOnExit: (listener: (() => void) | undefined): void => {}
|
|
23
|
+
},
|
|
24
|
+
"issuing-card": {
|
|
25
|
+
setDefaultCard: (defaultCard: string | undefined): void => {},
|
|
26
|
+
setCardArtFileLink: (cardArtFileLink: string | undefined): void => {},
|
|
27
|
+
setCardSwitching: (cardSwitching: boolean | undefined): void => {}
|
|
28
|
+
},
|
|
29
|
+
"issuing-cards-list": {
|
|
30
|
+
setCardArtFileLink: (cardArtFileLink: string | undefined): void => {}
|
|
19
31
|
}
|
|
20
32
|
};
|
|
21
33
|
|
package/types/shared.d.ts
CHANGED
|
@@ -261,6 +261,14 @@ export declare type AppearanceVariables = {
|
|
|
261
261
|
overlayZIndex?: number;
|
|
262
262
|
|
|
263
263
|
// Body Typography
|
|
264
|
+
/**
|
|
265
|
+
* The font size for the large body typography. Body typography variables accept a valid font size value.
|
|
266
|
+
*/
|
|
267
|
+
bodyLgFontSize?: string;
|
|
268
|
+
/**
|
|
269
|
+
* The font weight for the large body typography. Body typography variables accept a valid font weight value.
|
|
270
|
+
*/
|
|
271
|
+
bodyLgFontWeight?: string;
|
|
264
272
|
/**
|
|
265
273
|
* The font size for the medium body typography. Body typography variables accept a valid font size value.
|
|
266
274
|
*/
|
|
@@ -341,6 +349,18 @@ export declare type AppearanceVariables = {
|
|
|
341
349
|
headingXsTextTransform?: string;
|
|
342
350
|
|
|
343
351
|
// Label Typography
|
|
352
|
+
/**
|
|
353
|
+
* The font size for the large label typography. Label typography variables accept a valid font size value.
|
|
354
|
+
*/
|
|
355
|
+
labelLgFontSize?: string;
|
|
356
|
+
/**
|
|
357
|
+
* The font weight for the large label typography. Label typography variables accept a valid font weight value.
|
|
358
|
+
*/
|
|
359
|
+
labelLgFontWeight?: string;
|
|
360
|
+
/**
|
|
361
|
+
* The text transform for the large label typography. Label typography variables accept a valid text transform value.
|
|
362
|
+
*/
|
|
363
|
+
labelLgTextTransform?: string;
|
|
344
364
|
/**
|
|
345
365
|
* The font size for the medium label typography. Label typography variables accept a valid font size value.
|
|
346
366
|
*/
|
|
@@ -446,4 +466,14 @@ export interface StripeConnectInstance {
|
|
|
446
466
|
/**
|
|
447
467
|
* Tagnames to be used with the `create` method of the Connect instance.
|
|
448
468
|
*/
|
|
449
|
-
export type ConnectElementTagName =
|
|
469
|
+
export type ConnectElementTagName =
|
|
470
|
+
| "payments"
|
|
471
|
+
| "payouts"
|
|
472
|
+
| "payment-details"
|
|
473
|
+
| "account-onboarding"
|
|
474
|
+
| "payment-method-settings"
|
|
475
|
+
| "account-management"
|
|
476
|
+
| "notification-banner"
|
|
477
|
+
| "instant-payouts"
|
|
478
|
+
| "issuing-card"
|
|
479
|
+
| "issuing-cards-list";
|