@stripe/connect-js 3.3.32 → 3.3.33
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 +26 -96
- package/dist/connect.js +26 -96
- package/dist/pure.esm.js +18 -88
- package/dist/pure.js +18 -88
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +8 -82
- package/package.json +1 -1
package/dist/connect.esm.js
CHANGED
|
@@ -5,17 +5,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
5
5
|
setOnLoaderStart: _listener => {}
|
|
6
6
|
};
|
|
7
7
|
const ConnectElementCustomMethodConfig = {
|
|
8
|
-
payments: {
|
|
9
|
-
setDefaultFilters: _filters => {}
|
|
10
|
-
},
|
|
11
|
-
"payment-details": {
|
|
12
|
-
setPayment: _payment => {},
|
|
13
|
-
setOnClose: _listener => {}
|
|
14
|
-
},
|
|
15
|
-
"payment-disputes": {
|
|
16
|
-
setPayment: _payment => {},
|
|
17
|
-
setOnDisputesLoaded: _listener => {}
|
|
18
|
-
},
|
|
19
8
|
"account-onboarding": {
|
|
20
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
21
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -53,48 +42,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
53
42
|
"financial-account-transactions": {
|
|
54
43
|
setFinancialAccount: _financialAccount => {}
|
|
55
44
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
"app-install": {
|
|
60
|
-
setApp: _app => {},
|
|
61
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
62
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
63
|
-
},
|
|
64
|
-
"app-viewport": {
|
|
65
|
-
setApp: _app => {},
|
|
66
|
-
setAppData: _appData => {}
|
|
67
|
-
},
|
|
68
|
-
"payment-method-settings": {
|
|
69
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
70
|
-
},
|
|
71
|
-
"capital-financing": {
|
|
72
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
73
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
74
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
75
|
-
setSupportUrl: _supportUrl => {},
|
|
76
|
-
setOnFinancingsLoaded: _listener => {}
|
|
77
|
-
},
|
|
78
|
-
"capital-financing-application": {
|
|
79
|
-
setOnApplicationSubmitted: _listener => {},
|
|
80
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
81
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
82
|
-
setOnApplicationStepChange: _listener => {}
|
|
45
|
+
payments: {
|
|
46
|
+
setDefaultFilters: _filters => {}
|
|
83
47
|
},
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
88
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
89
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
90
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
91
|
-
setOnApplicationStepChange: _listener => {}
|
|
48
|
+
"payment-details": {
|
|
49
|
+
setPayment: _payment => {},
|
|
50
|
+
setOnClose: _listener => {}
|
|
92
51
|
},
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
setIntervalEnd: _intervalEnd => {},
|
|
97
|
-
setIntervalType: _intervalType => {}
|
|
52
|
+
"payment-disputes": {
|
|
53
|
+
setPayment: _payment => {},
|
|
54
|
+
setOnDisputesLoaded: _listener => {}
|
|
98
55
|
},
|
|
99
56
|
"tax-settings": {
|
|
100
57
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -106,65 +63,38 @@ const ConnectElementCustomMethodConfig = {
|
|
|
106
63
|
setDisplayCountries: _countries => {},
|
|
107
64
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
108
65
|
},
|
|
109
|
-
"tax-threshold-monitoring": {
|
|
110
|
-
setDisplayCountries: _countries => {}
|
|
111
|
-
},
|
|
112
|
-
"product-tax-code-selector": {
|
|
113
|
-
setOnTaxCodeSelect: _listener => {},
|
|
114
|
-
setHideDescription: _hideDescription => {},
|
|
115
|
-
setDisabled: _disabled => {},
|
|
116
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
117
|
-
},
|
|
118
|
-
"export-tax-transactions": {},
|
|
119
66
|
"payout-details": {
|
|
120
67
|
setPayout: _payout => {},
|
|
121
68
|
setOnClose: _listener => {}
|
|
122
|
-
},
|
|
123
|
-
"check-scanning": {
|
|
124
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
125
69
|
}
|
|
126
70
|
};
|
|
127
71
|
|
|
128
72
|
const componentNameMapping = {
|
|
73
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
74
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
129
75
|
payments: "stripe-connect-payments",
|
|
130
|
-
payouts: "stripe-connect-payouts",
|
|
131
76
|
"payment-details": "stripe-connect-payment-details",
|
|
132
77
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
"
|
|
78
|
+
payouts: "stripe-connect-payouts",
|
|
79
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
80
|
+
"payout-details": "stripe-connect-payout-details",
|
|
81
|
+
balances: "stripe-connect-balances",
|
|
136
82
|
"account-management": "stripe-connect-account-management",
|
|
137
83
|
"notification-banner": "stripe-connect-notification-banner",
|
|
138
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
139
84
|
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
140
85
|
"issuing-card": "stripe-connect-issuing-card",
|
|
141
86
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
142
87
|
"financial-account": "stripe-connect-financial-account",
|
|
143
|
-
recipients: "stripe-connect-recipients",
|
|
144
88
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
145
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
146
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
147
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
148
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
149
89
|
documents: "stripe-connect-documents",
|
|
150
|
-
"product-tax-code-selector": "stripe-connect-product-tax-code-selector",
|
|
151
|
-
"export-tax-transactions": "stripe-connect-export-tax-transactions",
|
|
152
90
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
153
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
154
|
-
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
155
|
-
balances: "stripe-connect-balances",
|
|
156
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
157
|
-
"payout-details": "stripe-connect-payout-details",
|
|
158
|
-
"app-install": "stripe-connect-app-install",
|
|
159
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
160
|
-
"reporting-chart": "stripe-connect-reporting-chart",
|
|
161
|
-
"check-scanning": "stripe-connect-check-scanning"
|
|
91
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
162
92
|
};
|
|
163
93
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
164
94
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
165
95
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
166
96
|
const findScript = () => {
|
|
167
|
-
return document.querySelectorAll(`script[src="${
|
|
97
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
168
98
|
};
|
|
169
99
|
const injectScript = () => {
|
|
170
100
|
const script = document.createElement("script");
|
|
@@ -176,7 +106,7 @@ const injectScript = () => {
|
|
|
176
106
|
document.head.appendChild(script);
|
|
177
107
|
return script;
|
|
178
108
|
};
|
|
179
|
-
let stripePromise = null;
|
|
109
|
+
let stripePromise$1 = null;
|
|
180
110
|
const isWindowStripeConnectDefined = stripeConnect => {
|
|
181
111
|
// We only consider `StripeConnect` defined if `init` is a function
|
|
182
112
|
// Why? HTML markup like:
|
|
@@ -186,10 +116,10 @@ const isWindowStripeConnectDefined = stripeConnect => {
|
|
|
186
116
|
};
|
|
187
117
|
const loadScript = () => {
|
|
188
118
|
// Ensure that we only attempt to load Connect.js at most once
|
|
189
|
-
if (stripePromise !== null) {
|
|
190
|
-
return stripePromise;
|
|
119
|
+
if (stripePromise$1 !== null) {
|
|
120
|
+
return stripePromise$1;
|
|
191
121
|
}
|
|
192
|
-
stripePromise = new Promise((resolve, reject) => {
|
|
122
|
+
stripePromise$1 = new Promise((resolve, reject) => {
|
|
193
123
|
if (typeof window === "undefined") {
|
|
194
124
|
reject("ConnectJS won't load when rendering code in the server - it can only be loaded on a browser. This error is expected when loading ConnectJS in SSR environments, like NextJS. It will have no impact in the UI, however if you wish to avoid it, you can switch to the `pure` version of the connect.js loader: https://github.com/stripe/connect-js#importing-loadconnect-without-side-effects.");
|
|
195
125
|
return;
|
|
@@ -222,7 +152,7 @@ const loadScript = () => {
|
|
|
222
152
|
reject(error);
|
|
223
153
|
}
|
|
224
154
|
});
|
|
225
|
-
return stripePromise;
|
|
155
|
+
return stripePromise$1;
|
|
226
156
|
};
|
|
227
157
|
const hasCustomMethod = tagName => {
|
|
228
158
|
return tagName in ConnectElementCustomMethodConfig;
|
|
@@ -255,7 +185,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
255
185
|
element[method] = function (value) {
|
|
256
186
|
stripeConnectInstance.then(() => {
|
|
257
187
|
if (!this[`${method}InternalOnly`]) {
|
|
258
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.
|
|
188
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.33`);
|
|
259
189
|
}
|
|
260
190
|
this[`${method}InternalOnly`](value);
|
|
261
191
|
});
|
|
@@ -309,7 +239,7 @@ const createWrapper = stripeConnect => {
|
|
|
309
239
|
sdk: true,
|
|
310
240
|
sdkOptions: {
|
|
311
241
|
// This will be replaced by the npm package version when bundling
|
|
312
|
-
sdkVersion: "3.3.
|
|
242
|
+
sdkVersion: "3.3.33"
|
|
313
243
|
}
|
|
314
244
|
})
|
|
315
245
|
}));
|
|
@@ -321,16 +251,16 @@ const createWrapper = stripeConnect => {
|
|
|
321
251
|
|
|
322
252
|
// Execute our own script injection after a tick to give users time to do their
|
|
323
253
|
// own script injection.
|
|
324
|
-
const stripePromise
|
|
254
|
+
const stripePromise = Promise.resolve().then(() => loadScript());
|
|
325
255
|
let loadCalled = false;
|
|
326
|
-
stripePromise
|
|
256
|
+
stripePromise.catch(err => {
|
|
327
257
|
if (!loadCalled) {
|
|
328
258
|
console.warn(err);
|
|
329
259
|
}
|
|
330
260
|
});
|
|
331
261
|
const loadConnectAndInitialize = initParams => {
|
|
332
262
|
loadCalled = true;
|
|
333
|
-
return initStripeConnect(stripePromise
|
|
263
|
+
return initStripeConnect(stripePromise, initParams);
|
|
334
264
|
};
|
|
335
265
|
|
|
336
266
|
export { loadConnectAndInitialize };
|
package/dist/connect.js
CHANGED
|
@@ -9,17 +9,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
9
9
|
setOnLoaderStart: _listener => {}
|
|
10
10
|
};
|
|
11
11
|
const ConnectElementCustomMethodConfig = {
|
|
12
|
-
payments: {
|
|
13
|
-
setDefaultFilters: _filters => {}
|
|
14
|
-
},
|
|
15
|
-
"payment-details": {
|
|
16
|
-
setPayment: _payment => {},
|
|
17
|
-
setOnClose: _listener => {}
|
|
18
|
-
},
|
|
19
|
-
"payment-disputes": {
|
|
20
|
-
setPayment: _payment => {},
|
|
21
|
-
setOnDisputesLoaded: _listener => {}
|
|
22
|
-
},
|
|
23
12
|
"account-onboarding": {
|
|
24
13
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
25
14
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -57,48 +46,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
57
46
|
"financial-account-transactions": {
|
|
58
47
|
setFinancialAccount: _financialAccount => {}
|
|
59
48
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
"app-install": {
|
|
64
|
-
setApp: _app => {},
|
|
65
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
66
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
67
|
-
},
|
|
68
|
-
"app-viewport": {
|
|
69
|
-
setApp: _app => {},
|
|
70
|
-
setAppData: _appData => {}
|
|
71
|
-
},
|
|
72
|
-
"payment-method-settings": {
|
|
73
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
74
|
-
},
|
|
75
|
-
"capital-financing": {
|
|
76
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
77
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
78
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
79
|
-
setSupportUrl: _supportUrl => {},
|
|
80
|
-
setOnFinancingsLoaded: _listener => {}
|
|
81
|
-
},
|
|
82
|
-
"capital-financing-application": {
|
|
83
|
-
setOnApplicationSubmitted: _listener => {},
|
|
84
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
85
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
86
|
-
setOnApplicationStepChange: _listener => {}
|
|
49
|
+
payments: {
|
|
50
|
+
setDefaultFilters: _filters => {}
|
|
87
51
|
},
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
92
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
93
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
94
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
95
|
-
setOnApplicationStepChange: _listener => {}
|
|
52
|
+
"payment-details": {
|
|
53
|
+
setPayment: _payment => {},
|
|
54
|
+
setOnClose: _listener => {}
|
|
96
55
|
},
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
setIntervalEnd: _intervalEnd => {},
|
|
101
|
-
setIntervalType: _intervalType => {}
|
|
56
|
+
"payment-disputes": {
|
|
57
|
+
setPayment: _payment => {},
|
|
58
|
+
setOnDisputesLoaded: _listener => {}
|
|
102
59
|
},
|
|
103
60
|
"tax-settings": {
|
|
104
61
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -110,65 +67,38 @@ const ConnectElementCustomMethodConfig = {
|
|
|
110
67
|
setDisplayCountries: _countries => {},
|
|
111
68
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
112
69
|
},
|
|
113
|
-
"tax-threshold-monitoring": {
|
|
114
|
-
setDisplayCountries: _countries => {}
|
|
115
|
-
},
|
|
116
|
-
"product-tax-code-selector": {
|
|
117
|
-
setOnTaxCodeSelect: _listener => {},
|
|
118
|
-
setHideDescription: _hideDescription => {},
|
|
119
|
-
setDisabled: _disabled => {},
|
|
120
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
121
|
-
},
|
|
122
|
-
"export-tax-transactions": {},
|
|
123
70
|
"payout-details": {
|
|
124
71
|
setPayout: _payout => {},
|
|
125
72
|
setOnClose: _listener => {}
|
|
126
|
-
},
|
|
127
|
-
"check-scanning": {
|
|
128
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
129
73
|
}
|
|
130
74
|
};
|
|
131
75
|
|
|
132
76
|
const componentNameMapping = {
|
|
77
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
78
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
133
79
|
payments: "stripe-connect-payments",
|
|
134
|
-
payouts: "stripe-connect-payouts",
|
|
135
80
|
"payment-details": "stripe-connect-payment-details",
|
|
136
81
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
"
|
|
82
|
+
payouts: "stripe-connect-payouts",
|
|
83
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
84
|
+
"payout-details": "stripe-connect-payout-details",
|
|
85
|
+
balances: "stripe-connect-balances",
|
|
140
86
|
"account-management": "stripe-connect-account-management",
|
|
141
87
|
"notification-banner": "stripe-connect-notification-banner",
|
|
142
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
143
88
|
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
144
89
|
"issuing-card": "stripe-connect-issuing-card",
|
|
145
90
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
146
91
|
"financial-account": "stripe-connect-financial-account",
|
|
147
|
-
recipients: "stripe-connect-recipients",
|
|
148
92
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
149
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
150
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
151
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
152
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
153
93
|
documents: "stripe-connect-documents",
|
|
154
|
-
"product-tax-code-selector": "stripe-connect-product-tax-code-selector",
|
|
155
|
-
"export-tax-transactions": "stripe-connect-export-tax-transactions",
|
|
156
94
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
157
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
158
|
-
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
159
|
-
balances: "stripe-connect-balances",
|
|
160
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
161
|
-
"payout-details": "stripe-connect-payout-details",
|
|
162
|
-
"app-install": "stripe-connect-app-install",
|
|
163
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
164
|
-
"reporting-chart": "stripe-connect-reporting-chart",
|
|
165
|
-
"check-scanning": "stripe-connect-check-scanning"
|
|
95
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
166
96
|
};
|
|
167
97
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
168
98
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
169
99
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
170
100
|
const findScript = () => {
|
|
171
|
-
return document.querySelectorAll(`script[src="${
|
|
101
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
172
102
|
};
|
|
173
103
|
const injectScript = () => {
|
|
174
104
|
const script = document.createElement("script");
|
|
@@ -180,7 +110,7 @@ const injectScript = () => {
|
|
|
180
110
|
document.head.appendChild(script);
|
|
181
111
|
return script;
|
|
182
112
|
};
|
|
183
|
-
let stripePromise = null;
|
|
113
|
+
let stripePromise$1 = null;
|
|
184
114
|
const isWindowStripeConnectDefined = stripeConnect => {
|
|
185
115
|
// We only consider `StripeConnect` defined if `init` is a function
|
|
186
116
|
// Why? HTML markup like:
|
|
@@ -190,10 +120,10 @@ const isWindowStripeConnectDefined = stripeConnect => {
|
|
|
190
120
|
};
|
|
191
121
|
const loadScript = () => {
|
|
192
122
|
// Ensure that we only attempt to load Connect.js at most once
|
|
193
|
-
if (stripePromise !== null) {
|
|
194
|
-
return stripePromise;
|
|
123
|
+
if (stripePromise$1 !== null) {
|
|
124
|
+
return stripePromise$1;
|
|
195
125
|
}
|
|
196
|
-
stripePromise = new Promise((resolve, reject) => {
|
|
126
|
+
stripePromise$1 = new Promise((resolve, reject) => {
|
|
197
127
|
if (typeof window === "undefined") {
|
|
198
128
|
reject("ConnectJS won't load when rendering code in the server - it can only be loaded on a browser. This error is expected when loading ConnectJS in SSR environments, like NextJS. It will have no impact in the UI, however if you wish to avoid it, you can switch to the `pure` version of the connect.js loader: https://github.com/stripe/connect-js#importing-loadconnect-without-side-effects.");
|
|
199
129
|
return;
|
|
@@ -226,7 +156,7 @@ const loadScript = () => {
|
|
|
226
156
|
reject(error);
|
|
227
157
|
}
|
|
228
158
|
});
|
|
229
|
-
return stripePromise;
|
|
159
|
+
return stripePromise$1;
|
|
230
160
|
};
|
|
231
161
|
const hasCustomMethod = tagName => {
|
|
232
162
|
return tagName in ConnectElementCustomMethodConfig;
|
|
@@ -259,7 +189,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
259
189
|
element[method] = function (value) {
|
|
260
190
|
stripeConnectInstance.then(() => {
|
|
261
191
|
if (!this[`${method}InternalOnly`]) {
|
|
262
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.
|
|
192
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.33`);
|
|
263
193
|
}
|
|
264
194
|
this[`${method}InternalOnly`](value);
|
|
265
195
|
});
|
|
@@ -313,7 +243,7 @@ const createWrapper = stripeConnect => {
|
|
|
313
243
|
sdk: true,
|
|
314
244
|
sdkOptions: {
|
|
315
245
|
// This will be replaced by the npm package version when bundling
|
|
316
|
-
sdkVersion: "3.3.
|
|
246
|
+
sdkVersion: "3.3.33"
|
|
317
247
|
}
|
|
318
248
|
})
|
|
319
249
|
}));
|
|
@@ -325,16 +255,16 @@ const createWrapper = stripeConnect => {
|
|
|
325
255
|
|
|
326
256
|
// Execute our own script injection after a tick to give users time to do their
|
|
327
257
|
// own script injection.
|
|
328
|
-
const stripePromise
|
|
258
|
+
const stripePromise = Promise.resolve().then(() => loadScript());
|
|
329
259
|
let loadCalled = false;
|
|
330
|
-
stripePromise
|
|
260
|
+
stripePromise.catch(err => {
|
|
331
261
|
if (!loadCalled) {
|
|
332
262
|
console.warn(err);
|
|
333
263
|
}
|
|
334
264
|
});
|
|
335
265
|
const loadConnectAndInitialize = initParams => {
|
|
336
266
|
loadCalled = true;
|
|
337
|
-
return initStripeConnect(stripePromise
|
|
267
|
+
return initStripeConnect(stripePromise, initParams);
|
|
338
268
|
};
|
|
339
269
|
|
|
340
270
|
exports.loadConnectAndInitialize = loadConnectAndInitialize;
|
package/dist/pure.esm.js
CHANGED
|
@@ -5,17 +5,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
5
5
|
setOnLoaderStart: _listener => {}
|
|
6
6
|
};
|
|
7
7
|
const ConnectElementCustomMethodConfig = {
|
|
8
|
-
payments: {
|
|
9
|
-
setDefaultFilters: _filters => {}
|
|
10
|
-
},
|
|
11
|
-
"payment-details": {
|
|
12
|
-
setPayment: _payment => {},
|
|
13
|
-
setOnClose: _listener => {}
|
|
14
|
-
},
|
|
15
|
-
"payment-disputes": {
|
|
16
|
-
setPayment: _payment => {},
|
|
17
|
-
setOnDisputesLoaded: _listener => {}
|
|
18
|
-
},
|
|
19
8
|
"account-onboarding": {
|
|
20
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
21
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -53,48 +42,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
53
42
|
"financial-account-transactions": {
|
|
54
43
|
setFinancialAccount: _financialAccount => {}
|
|
55
44
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
"app-install": {
|
|
60
|
-
setApp: _app => {},
|
|
61
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
62
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
63
|
-
},
|
|
64
|
-
"app-viewport": {
|
|
65
|
-
setApp: _app => {},
|
|
66
|
-
setAppData: _appData => {}
|
|
67
|
-
},
|
|
68
|
-
"payment-method-settings": {
|
|
69
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
70
|
-
},
|
|
71
|
-
"capital-financing": {
|
|
72
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
73
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
74
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
75
|
-
setSupportUrl: _supportUrl => {},
|
|
76
|
-
setOnFinancingsLoaded: _listener => {}
|
|
77
|
-
},
|
|
78
|
-
"capital-financing-application": {
|
|
79
|
-
setOnApplicationSubmitted: _listener => {},
|
|
80
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
81
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
82
|
-
setOnApplicationStepChange: _listener => {}
|
|
45
|
+
payments: {
|
|
46
|
+
setDefaultFilters: _filters => {}
|
|
83
47
|
},
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
88
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
89
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
90
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
91
|
-
setOnApplicationStepChange: _listener => {}
|
|
48
|
+
"payment-details": {
|
|
49
|
+
setPayment: _payment => {},
|
|
50
|
+
setOnClose: _listener => {}
|
|
92
51
|
},
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
setIntervalEnd: _intervalEnd => {},
|
|
97
|
-
setIntervalType: _intervalType => {}
|
|
52
|
+
"payment-disputes": {
|
|
53
|
+
setPayment: _payment => {},
|
|
54
|
+
setOnDisputesLoaded: _listener => {}
|
|
98
55
|
},
|
|
99
56
|
"tax-settings": {
|
|
100
57
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -106,65 +63,38 @@ const ConnectElementCustomMethodConfig = {
|
|
|
106
63
|
setDisplayCountries: _countries => {},
|
|
107
64
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
108
65
|
},
|
|
109
|
-
"tax-threshold-monitoring": {
|
|
110
|
-
setDisplayCountries: _countries => {}
|
|
111
|
-
},
|
|
112
|
-
"product-tax-code-selector": {
|
|
113
|
-
setOnTaxCodeSelect: _listener => {},
|
|
114
|
-
setHideDescription: _hideDescription => {},
|
|
115
|
-
setDisabled: _disabled => {},
|
|
116
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
117
|
-
},
|
|
118
|
-
"export-tax-transactions": {},
|
|
119
66
|
"payout-details": {
|
|
120
67
|
setPayout: _payout => {},
|
|
121
68
|
setOnClose: _listener => {}
|
|
122
|
-
},
|
|
123
|
-
"check-scanning": {
|
|
124
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
125
69
|
}
|
|
126
70
|
};
|
|
127
71
|
|
|
128
72
|
const componentNameMapping = {
|
|
73
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
74
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
129
75
|
payments: "stripe-connect-payments",
|
|
130
|
-
payouts: "stripe-connect-payouts",
|
|
131
76
|
"payment-details": "stripe-connect-payment-details",
|
|
132
77
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
"
|
|
78
|
+
payouts: "stripe-connect-payouts",
|
|
79
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
80
|
+
"payout-details": "stripe-connect-payout-details",
|
|
81
|
+
balances: "stripe-connect-balances",
|
|
136
82
|
"account-management": "stripe-connect-account-management",
|
|
137
83
|
"notification-banner": "stripe-connect-notification-banner",
|
|
138
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
139
84
|
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
140
85
|
"issuing-card": "stripe-connect-issuing-card",
|
|
141
86
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
142
87
|
"financial-account": "stripe-connect-financial-account",
|
|
143
|
-
recipients: "stripe-connect-recipients",
|
|
144
88
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
145
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
146
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
147
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
148
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
149
89
|
documents: "stripe-connect-documents",
|
|
150
|
-
"product-tax-code-selector": "stripe-connect-product-tax-code-selector",
|
|
151
|
-
"export-tax-transactions": "stripe-connect-export-tax-transactions",
|
|
152
90
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
153
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
154
|
-
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
155
|
-
balances: "stripe-connect-balances",
|
|
156
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
157
|
-
"payout-details": "stripe-connect-payout-details",
|
|
158
|
-
"app-install": "stripe-connect-app-install",
|
|
159
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
160
|
-
"reporting-chart": "stripe-connect-reporting-chart",
|
|
161
|
-
"check-scanning": "stripe-connect-check-scanning"
|
|
91
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
162
92
|
};
|
|
163
93
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
164
94
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
165
95
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
166
96
|
const findScript = () => {
|
|
167
|
-
return document.querySelectorAll(`script[src="${
|
|
97
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
168
98
|
};
|
|
169
99
|
const injectScript = () => {
|
|
170
100
|
const script = document.createElement("script");
|
|
@@ -255,7 +185,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
255
185
|
element[method] = function (value) {
|
|
256
186
|
stripeConnectInstance.then(() => {
|
|
257
187
|
if (!this[`${method}InternalOnly`]) {
|
|
258
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.
|
|
188
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.33`);
|
|
259
189
|
}
|
|
260
190
|
this[`${method}InternalOnly`](value);
|
|
261
191
|
});
|
|
@@ -309,7 +239,7 @@ const createWrapper = stripeConnect => {
|
|
|
309
239
|
sdk: true,
|
|
310
240
|
sdkOptions: {
|
|
311
241
|
// This will be replaced by the npm package version when bundling
|
|
312
|
-
sdkVersion: "3.3.
|
|
242
|
+
sdkVersion: "3.3.33"
|
|
313
243
|
}
|
|
314
244
|
})
|
|
315
245
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -9,17 +9,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
9
9
|
setOnLoaderStart: _listener => {}
|
|
10
10
|
};
|
|
11
11
|
const ConnectElementCustomMethodConfig = {
|
|
12
|
-
payments: {
|
|
13
|
-
setDefaultFilters: _filters => {}
|
|
14
|
-
},
|
|
15
|
-
"payment-details": {
|
|
16
|
-
setPayment: _payment => {},
|
|
17
|
-
setOnClose: _listener => {}
|
|
18
|
-
},
|
|
19
|
-
"payment-disputes": {
|
|
20
|
-
setPayment: _payment => {},
|
|
21
|
-
setOnDisputesLoaded: _listener => {}
|
|
22
|
-
},
|
|
23
12
|
"account-onboarding": {
|
|
24
13
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
25
14
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -57,48 +46,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
57
46
|
"financial-account-transactions": {
|
|
58
47
|
setFinancialAccount: _financialAccount => {}
|
|
59
48
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
"app-install": {
|
|
64
|
-
setApp: _app => {},
|
|
65
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
66
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
67
|
-
},
|
|
68
|
-
"app-viewport": {
|
|
69
|
-
setApp: _app => {},
|
|
70
|
-
setAppData: _appData => {}
|
|
71
|
-
},
|
|
72
|
-
"payment-method-settings": {
|
|
73
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
74
|
-
},
|
|
75
|
-
"capital-financing": {
|
|
76
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
77
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
78
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
79
|
-
setSupportUrl: _supportUrl => {},
|
|
80
|
-
setOnFinancingsLoaded: _listener => {}
|
|
81
|
-
},
|
|
82
|
-
"capital-financing-application": {
|
|
83
|
-
setOnApplicationSubmitted: _listener => {},
|
|
84
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
85
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
86
|
-
setOnApplicationStepChange: _listener => {}
|
|
49
|
+
payments: {
|
|
50
|
+
setDefaultFilters: _filters => {}
|
|
87
51
|
},
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
92
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
93
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
94
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
95
|
-
setOnApplicationStepChange: _listener => {}
|
|
52
|
+
"payment-details": {
|
|
53
|
+
setPayment: _payment => {},
|
|
54
|
+
setOnClose: _listener => {}
|
|
96
55
|
},
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
setIntervalEnd: _intervalEnd => {},
|
|
101
|
-
setIntervalType: _intervalType => {}
|
|
56
|
+
"payment-disputes": {
|
|
57
|
+
setPayment: _payment => {},
|
|
58
|
+
setOnDisputesLoaded: _listener => {}
|
|
102
59
|
},
|
|
103
60
|
"tax-settings": {
|
|
104
61
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -110,65 +67,38 @@ const ConnectElementCustomMethodConfig = {
|
|
|
110
67
|
setDisplayCountries: _countries => {},
|
|
111
68
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
112
69
|
},
|
|
113
|
-
"tax-threshold-monitoring": {
|
|
114
|
-
setDisplayCountries: _countries => {}
|
|
115
|
-
},
|
|
116
|
-
"product-tax-code-selector": {
|
|
117
|
-
setOnTaxCodeSelect: _listener => {},
|
|
118
|
-
setHideDescription: _hideDescription => {},
|
|
119
|
-
setDisabled: _disabled => {},
|
|
120
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
121
|
-
},
|
|
122
|
-
"export-tax-transactions": {},
|
|
123
70
|
"payout-details": {
|
|
124
71
|
setPayout: _payout => {},
|
|
125
72
|
setOnClose: _listener => {}
|
|
126
|
-
},
|
|
127
|
-
"check-scanning": {
|
|
128
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
129
73
|
}
|
|
130
74
|
};
|
|
131
75
|
|
|
132
76
|
const componentNameMapping = {
|
|
77
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
78
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
133
79
|
payments: "stripe-connect-payments",
|
|
134
|
-
payouts: "stripe-connect-payouts",
|
|
135
80
|
"payment-details": "stripe-connect-payment-details",
|
|
136
81
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
"
|
|
82
|
+
payouts: "stripe-connect-payouts",
|
|
83
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
84
|
+
"payout-details": "stripe-connect-payout-details",
|
|
85
|
+
balances: "stripe-connect-balances",
|
|
140
86
|
"account-management": "stripe-connect-account-management",
|
|
141
87
|
"notification-banner": "stripe-connect-notification-banner",
|
|
142
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
143
88
|
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
144
89
|
"issuing-card": "stripe-connect-issuing-card",
|
|
145
90
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
146
91
|
"financial-account": "stripe-connect-financial-account",
|
|
147
|
-
recipients: "stripe-connect-recipients",
|
|
148
92
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
149
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
150
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
151
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
152
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
153
93
|
documents: "stripe-connect-documents",
|
|
154
|
-
"product-tax-code-selector": "stripe-connect-product-tax-code-selector",
|
|
155
|
-
"export-tax-transactions": "stripe-connect-export-tax-transactions",
|
|
156
94
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
157
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
158
|
-
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
159
|
-
balances: "stripe-connect-balances",
|
|
160
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
161
|
-
"payout-details": "stripe-connect-payout-details",
|
|
162
|
-
"app-install": "stripe-connect-app-install",
|
|
163
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
164
|
-
"reporting-chart": "stripe-connect-reporting-chart",
|
|
165
|
-
"check-scanning": "stripe-connect-check-scanning"
|
|
95
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
166
96
|
};
|
|
167
97
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
168
98
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
169
99
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
170
100
|
const findScript = () => {
|
|
171
|
-
return document.querySelectorAll(`script[src="${
|
|
101
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
172
102
|
};
|
|
173
103
|
const injectScript = () => {
|
|
174
104
|
const script = document.createElement("script");
|
|
@@ -259,7 +189,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
259
189
|
element[method] = function (value) {
|
|
260
190
|
stripeConnectInstance.then(() => {
|
|
261
191
|
if (!this[`${method}InternalOnly`]) {
|
|
262
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.
|
|
192
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.33`);
|
|
263
193
|
}
|
|
264
194
|
this[`${method}InternalOnly`](value);
|
|
265
195
|
});
|
|
@@ -313,7 +243,7 @@ const createWrapper = stripeConnect => {
|
|
|
313
243
|
sdk: true,
|
|
314
244
|
sdkOptions: {
|
|
315
245
|
// This will be replaced by the npm package version when bundling
|
|
316
|
-
sdkVersion: "3.3.
|
|
246
|
+
sdkVersion: "3.3.33"
|
|
317
247
|
}
|
|
318
248
|
})
|
|
319
249
|
}));
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
|
-
|
|
3
|
+
type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-disputes-list" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts-promotion" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-payouts" | "stripe-connect-payouts-list" | "stripe-connect-payout-details" | "stripe-connect-balances" | "stripe-connect-documents" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings";
|
|
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
|
@@ -47,10 +47,6 @@ export type NotificationCount = {
|
|
|
47
47
|
total: number;
|
|
48
48
|
actionRequired: number;
|
|
49
49
|
};
|
|
50
|
-
export type InstallState = {
|
|
51
|
-
appId: string;
|
|
52
|
-
state: "INSTALLED" | "UNINSTALLED";
|
|
53
|
-
};
|
|
54
50
|
export type LoaderStart = {
|
|
55
51
|
elementTagName: string;
|
|
56
52
|
};
|
|
@@ -65,14 +61,6 @@ export type EmbeddedError = {
|
|
|
65
61
|
type: EmbeddedErrorType;
|
|
66
62
|
message?: string;
|
|
67
63
|
};
|
|
68
|
-
export type FinancingProductType = {
|
|
69
|
-
productType: "standard" | "refill" | "none";
|
|
70
|
-
activeFinancingCount: number;
|
|
71
|
-
};
|
|
72
|
-
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
73
|
-
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
74
|
-
export type ReportName = "gross_volume" | "net_volume";
|
|
75
|
-
export type RecipientDataSource = "customers";
|
|
76
64
|
export type EmbeddedErrorType =
|
|
77
65
|
/**
|
|
78
66
|
* Failure to connect to Stripe's API.
|
|
@@ -107,19 +95,6 @@ export declare const ConnectElementCommonMethodConfig: {
|
|
|
107
95
|
setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
|
|
108
96
|
};
|
|
109
97
|
export declare const ConnectElementCustomMethodConfig: {
|
|
110
|
-
payments: {
|
|
111
|
-
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
112
|
-
};
|
|
113
|
-
"payment-details": {
|
|
114
|
-
setPayment: (_payment: string | undefined) => void;
|
|
115
|
-
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
116
|
-
};
|
|
117
|
-
"payment-disputes": {
|
|
118
|
-
setPayment: (_payment: string | undefined) => void;
|
|
119
|
-
setOnDisputesLoaded: (_listener: (({ total }: {
|
|
120
|
-
total: number;
|
|
121
|
-
}) => void) | undefined) => void;
|
|
122
|
-
};
|
|
123
98
|
"account-onboarding": {
|
|
124
99
|
setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
|
|
125
100
|
setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
|
|
@@ -161,51 +136,19 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
161
136
|
"financial-account-transactions": {
|
|
162
137
|
setFinancialAccount: (_financialAccount: string) => void;
|
|
163
138
|
};
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
};
|
|
167
|
-
"app-install": {
|
|
168
|
-
setApp: (_app: string | undefined) => void;
|
|
169
|
-
setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
170
|
-
setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
171
|
-
};
|
|
172
|
-
"app-viewport": {
|
|
173
|
-
setApp: (_app: string | undefined) => void;
|
|
174
|
-
setAppData: (_appData: Record<string, string> | undefined) => void;
|
|
139
|
+
payments: {
|
|
140
|
+
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
175
141
|
};
|
|
176
|
-
"payment-
|
|
177
|
-
|
|
142
|
+
"payment-details": {
|
|
143
|
+
setPayment: (_payment: string | undefined) => void;
|
|
144
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
178
145
|
};
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
183
|
-
setSupportUrl: (_supportUrl: string | undefined) => void;
|
|
184
|
-
setOnFinancingsLoaded: (_listener: (({ total }: {
|
|
146
|
+
"payment-disputes": {
|
|
147
|
+
setPayment: (_payment: string | undefined) => void;
|
|
148
|
+
setOnDisputesLoaded: (_listener: (({ total }: {
|
|
185
149
|
total: number;
|
|
186
150
|
}) => void) | undefined) => void;
|
|
187
151
|
};
|
|
188
|
-
"capital-financing-application": {
|
|
189
|
-
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
190
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
191
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
192
|
-
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
193
|
-
};
|
|
194
|
-
"capital-financing-promotion": {
|
|
195
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
|
|
196
|
-
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
197
|
-
setOnEligibleFinancingOfferLoaded: (_listener: (({ productType, activeFinancingCount, }: FinancingProductType) => void) | undefined) => void;
|
|
198
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
199
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
200
|
-
setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
|
|
201
|
-
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
202
|
-
};
|
|
203
|
-
"reporting-chart": {
|
|
204
|
-
setReportName: (_reportName: ReportName) => void;
|
|
205
|
-
setIntervalStart: (_intervalStart: Date | undefined) => void;
|
|
206
|
-
setIntervalEnd: (_intervalEnd: Date | undefined) => void;
|
|
207
|
-
setIntervalType: (_intervalType: IntervalType | undefined) => void;
|
|
208
|
-
};
|
|
209
152
|
"tax-settings": {
|
|
210
153
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
|
|
211
154
|
setDisplayHeadOfficeCountries: (_countries: string[] | undefined) => void;
|
|
@@ -222,25 +165,8 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
222
165
|
id: string;
|
|
223
166
|
}) => void) | undefined) => void;
|
|
224
167
|
};
|
|
225
|
-
"tax-threshold-monitoring": {
|
|
226
|
-
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
227
|
-
};
|
|
228
|
-
"product-tax-code-selector": {
|
|
229
|
-
setOnTaxCodeSelect: (_listener: ((taxCode: string | null, _: {
|
|
230
|
-
analyticsName: string;
|
|
231
|
-
} | null) => void) | undefined) => void;
|
|
232
|
-
setHideDescription: (_hideDescription: boolean | undefined) => void;
|
|
233
|
-
setDisabled: (_disabled: boolean | undefined) => void;
|
|
234
|
-
setInitialTaxCode: (_initialTaxCode: string | undefined) => void;
|
|
235
|
-
};
|
|
236
|
-
"export-tax-transactions": {};
|
|
237
168
|
"payout-details": {
|
|
238
169
|
setPayout: (_payout: string | undefined) => void;
|
|
239
170
|
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
240
171
|
};
|
|
241
|
-
"check-scanning": {
|
|
242
|
-
setHandleCheckScanSubmitted: (_handleCheckScanSubmitted: ({ checkScanToken, }: {
|
|
243
|
-
checkScanToken: string;
|
|
244
|
-
}) => Promise<void>) => void;
|
|
245
|
-
};
|
|
246
172
|
};
|