@stripe/connect-js 3.3.30-preview-1 → 3.3.31-preview-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/README.md +3 -3
- package/dist/connect.esm.js +1 -1
- package/dist/connect.js +1 -1
- package/dist/pure.esm.js +1 -1
- package/dist/pure.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/pure.d.ts +1 -1
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +2 -4
- package/package.json +13 -9
- package/src/index.ts +3 -6
- package/src/pure.test.ts +2 -2
- package/src/pure.ts +3 -6
- package/src/shared.ts +18 -18
- package/types/checks.ts +2 -2
- package/types/config.ts +28 -26
- package/types/index.d.ts +1 -1
- package/types/shared.d.ts +2 -2
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ const fetchClientSecret = async () => {
|
|
|
36
36
|
|
|
37
37
|
const instance = loadConnectAndInitialize({
|
|
38
38
|
publishableKey: "{{pk test123}}",
|
|
39
|
-
fetchClientSecret: fetchClientSecret
|
|
39
|
+
fetchClientSecret: fetchClientSecret,
|
|
40
40
|
});
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ test this code through your Connect account.
|
|
|
47
47
|
If you have deployed a
|
|
48
48
|
[Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP),
|
|
49
49
|
make sure to
|
|
50
|
-
[include Connect.js in your directives](https://stripe.com/docs/
|
|
50
|
+
[include Connect.js in your directives](https://stripe.com/docs/connect/get-started-connect-embedded-components?platform=web#csp-and-http-header-requirements).
|
|
51
51
|
|
|
52
52
|
### Import as a side effect
|
|
53
53
|
|
|
@@ -71,6 +71,6 @@ import { loadConnectAndInitialize } from "@stripe/connect-js/pure";
|
|
|
71
71
|
// Connect.js will not be loaded until `loadConnect` is called
|
|
72
72
|
const instance = loadConnectAndInitialize({
|
|
73
73
|
publishableKey: "{{pk test123}}",
|
|
74
|
-
fetchClientSecret: fetchClientSecret
|
|
74
|
+
fetchClientSecret: fetchClientSecret,
|
|
75
75
|
});
|
|
76
76
|
```
|
package/dist/connect.esm.js
CHANGED
package/dist/connect.js
CHANGED
package/dist/pure.esm.js
CHANGED
package/dist/pure.js
CHANGED
package/dist/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LoadConnectAndInitialize } from "./shared";
|
|
1
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
2
2
|
export declare const loadConnectAndInitialize: LoadConnectAndInitialize;
|
package/dist/src/pure.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LoadConnectAndInitialize } from "./shared";
|
|
1
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
2
2
|
export declare const loadConnectAndInitialize: LoadConnectAndInitialize;
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
1
|
+
import type { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
3
|
export type ConnectElementHTMLName = "stripe-connect-payments" | "stripe-connect-payouts" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "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" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-recipients" | "stripe-connect-capital-financing" | "stripe-connect-capital-financing-application" | "stripe-connect-capital-financing-promotion" | "stripe-connect-capital-overview" | "stripe-connect-documents" | "stripe-connect-product-tax-code-selector" | "stripe-connect-export-tax-transactions" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-tax-threshold-monitoring" | "stripe-connect-balances" | "stripe-connect-payouts-list" | "stripe-connect-app-install" | "stripe-connect-app-viewport" | "stripe-connect-reporting-chart";
|
|
4
4
|
export declare const componentNameMapping: Record<ConnectElementTagName, ConnectElementHTMLName>;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
176
176
|
"capital-financing-promotion": {
|
|
177
177
|
setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
|
|
178
178
|
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
179
|
-
setOnEligibleFinancingOfferLoaded: (_listener: (({ productType, activeFinancingCount }: FinancingProductType) => void) | undefined) => void;
|
|
179
|
+
setOnEligibleFinancingOfferLoaded: (_listener: (({ productType, activeFinancingCount, }: FinancingProductType) => void) | undefined) => void;
|
|
180
180
|
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
181
181
|
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
182
182
|
setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
|
|
@@ -204,9 +204,7 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
204
204
|
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
205
205
|
};
|
|
206
206
|
"product-tax-code-selector": {
|
|
207
|
-
setOnTaxCodeSelect: (_listener: ((
|
|
208
|
-
taxCode: string;
|
|
209
|
-
}) => void) | undefined) => void;
|
|
207
|
+
setOnTaxCodeSelect: (_listener: ((taxCode: string) => void) | undefined) => void;
|
|
210
208
|
setHideDescription: (_hideDescription: boolean | undefined) => void;
|
|
211
209
|
setDisabled: (_disabled: boolean | undefined) => void;
|
|
212
210
|
setInitialTaxCode: (_initialTaxCode: string | undefined) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/connect-js",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.31-preview-1",
|
|
4
4
|
"description": "Connect.js loading utility package",
|
|
5
5
|
"main": "dist/connect.js",
|
|
6
6
|
"module": "dist/connect.esm.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"test:unit": "jest",
|
|
12
12
|
"test:types": "zx ./tests/types/scripts/test.mjs",
|
|
13
13
|
"lint": "eslint '{src,types}/**/*.{ts,js}' && yarn prettier-check",
|
|
14
|
+
"lint-fix": "eslint '{src,types}/**/*.{ts,js}' --fix && yarn prettier-check",
|
|
14
15
|
"typecheck": "tsc --noEmit",
|
|
15
16
|
"build": "yarn clean && rollup -c",
|
|
16
17
|
"validate-change": "yarn run test",
|
|
@@ -45,19 +46,22 @@
|
|
|
45
46
|
"@rollup/plugin-json": "^6.0.0",
|
|
46
47
|
"@rollup/plugin-replace": "^2.3.1",
|
|
47
48
|
"@types/jest": "^24.0.25",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
49
|
-
"@typescript-eslint/parser": "^
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^7",
|
|
50
|
+
"@typescript-eslint/parser": "^7",
|
|
51
|
+
"@typescript-eslint/rule-tester": "^7",
|
|
52
|
+
"@typescript-eslint/scope-manager": "^7",
|
|
53
|
+
"@typescript-eslint/utils": "^7",
|
|
50
54
|
"babel-eslint": "^10.0.3",
|
|
51
55
|
"babel-jest": "^24.9.0",
|
|
52
56
|
"conditional-type-checks": "^1.0.5",
|
|
53
|
-
"eslint": "
|
|
54
|
-
"eslint-config-prettier": "^
|
|
55
|
-
"eslint-plugin-import": "^2.
|
|
56
|
-
"eslint-plugin-jest": "^
|
|
57
|
-
"eslint-plugin-prettier": "^
|
|
57
|
+
"eslint": "8.56.0",
|
|
58
|
+
"eslint-config-prettier": "^8.3.0",
|
|
59
|
+
"eslint-plugin-import": "^2.20.1",
|
|
60
|
+
"eslint-plugin-jest": "^26.6.0",
|
|
61
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
58
62
|
"jest": "^29.5.0",
|
|
59
63
|
"jest-environment-jsdom": "^29.5.0",
|
|
60
|
-
"prettier": "
|
|
64
|
+
"prettier": "2.8.8",
|
|
61
65
|
"rimraf": "^2.6.2",
|
|
62
66
|
"rollup": "^1.29.0",
|
|
63
67
|
"rollup-plugin-babel": "^4.4.0",
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
initStripeConnect,
|
|
5
|
-
LoadConnectAndInitialize
|
|
6
|
-
} from "./shared";
|
|
1
|
+
import type { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
3
|
+
import { loadScript, initStripeConnect } from "./shared";
|
|
7
4
|
|
|
8
5
|
// Execute our own script injection after a tick to give users time to do their
|
|
9
6
|
// own script injection.
|
package/src/pure.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
2
|
|
|
3
|
-
import { IStripeConnectInitParams } from "../types";
|
|
3
|
+
import type { IStripeConnectInitParams } from "../types";
|
|
4
4
|
import { SCRIPT_SELECTOR } from "./utils/jestHelpers";
|
|
5
5
|
|
|
6
6
|
describe("pure module", () => {
|
|
@@ -16,7 +16,7 @@ describe("pure module", () => {
|
|
|
16
16
|
publishableKey: "pk_123",
|
|
17
17
|
fetchClientSecret: async () => {
|
|
18
18
|
return "secret_123";
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
20
|
};
|
|
21
21
|
loadConnectAndInitialize(mockInitParams);
|
|
22
22
|
|
package/src/pure.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
initStripeConnect,
|
|
5
|
-
LoadConnectAndInitialize
|
|
6
|
-
} from "./shared";
|
|
1
|
+
import type { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
3
|
+
import { loadScript, initStripeConnect } from "./shared";
|
|
7
4
|
|
|
8
5
|
export const loadConnectAndInitialize: LoadConnectAndInitialize = (
|
|
9
6
|
initParams: IStripeConnectInitParams
|
package/src/shared.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
IStripeConnectInitParams,
|
|
3
3
|
StripeConnectInstance,
|
|
4
4
|
ConnectElementTagName,
|
|
5
|
-
ConnectHTMLElementRecord
|
|
5
|
+
ConnectHTMLElementRecord,
|
|
6
6
|
} from "../types";
|
|
7
7
|
import {
|
|
8
8
|
ConnectElementCommonMethodConfig,
|
|
9
|
-
ConnectElementCustomMethodConfig
|
|
9
|
+
ConnectElementCustomMethodConfig,
|
|
10
10
|
} from "../types/config";
|
|
11
11
|
|
|
12
12
|
export type LoadConnectAndInitialize = (
|
|
@@ -78,7 +78,7 @@ export const componentNameMapping: Record<
|
|
|
78
78
|
"payouts-list": "stripe-connect-payouts-list",
|
|
79
79
|
"app-install": "stripe-connect-app-install",
|
|
80
80
|
"app-viewport": "stripe-connect-app-viewport",
|
|
81
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
81
|
+
"reporting-chart": "stripe-connect-reporting-chart",
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
@@ -196,18 +196,18 @@ export const initStripeConnect = (
|
|
|
196
196
|
}
|
|
197
197
|
})();
|
|
198
198
|
const metaOptions = (initParams as any).metaOptions ?? {};
|
|
199
|
-
const stripeConnectInstance = stripePromise.then(wrapper =>
|
|
199
|
+
const stripeConnectInstance = stripePromise.then((wrapper) =>
|
|
200
200
|
wrapper.initialize({
|
|
201
201
|
...initParams,
|
|
202
|
-
metaOptions: { ...metaOptions, eagerClientSecretPromise }
|
|
202
|
+
metaOptions: { ...metaOptions, eagerClientSecretPromise },
|
|
203
203
|
} as any)
|
|
204
204
|
);
|
|
205
205
|
|
|
206
206
|
return {
|
|
207
|
-
create: tagName => {
|
|
207
|
+
create: (tagName) => {
|
|
208
208
|
let htmlName = componentNameMapping[tagName];
|
|
209
209
|
if (!htmlName) {
|
|
210
|
-
htmlName =
|
|
210
|
+
htmlName = tagName as unknown as ConnectElementHTMLName;
|
|
211
211
|
}
|
|
212
212
|
const element = document.createElement(htmlName);
|
|
213
213
|
|
|
@@ -216,14 +216,14 @@ export const initStripeConnect = (
|
|
|
216
216
|
: {};
|
|
217
217
|
const methods = { ...customMethods, ...ConnectElementCommonMethodConfig };
|
|
218
218
|
for (const method in methods) {
|
|
219
|
-
(element as any)[method] = function(value: any) {
|
|
219
|
+
(element as any)[method] = function (value: any) {
|
|
220
220
|
stripeConnectInstance.then(() => {
|
|
221
221
|
this[`${method}InternalOnly`](value);
|
|
222
222
|
});
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
stripeConnectInstance.then(instance => {
|
|
226
|
+
stripeConnectInstance.then((instance) => {
|
|
227
227
|
if (!element.isConnected && !(element as any).setConnector) {
|
|
228
228
|
// If the element is not connected to the DOM and the `setConnector` method is not
|
|
229
229
|
// defined, this indicates the element was created before connect.js was loaded, and has
|
|
@@ -251,8 +251,8 @@ export const initStripeConnect = (
|
|
|
251
251
|
|
|
252
252
|
return element as ConnectHTMLElementRecord[typeof tagName];
|
|
253
253
|
},
|
|
254
|
-
update: updateOptions => {
|
|
255
|
-
stripeConnectInstance.then(instance => {
|
|
254
|
+
update: (updateOptions) => {
|
|
255
|
+
stripeConnectInstance.then((instance) => {
|
|
256
256
|
instance.update(updateOptions);
|
|
257
257
|
});
|
|
258
258
|
},
|
|
@@ -260,10 +260,10 @@ export const initStripeConnect = (
|
|
|
260
260
|
return stripeConnectInstance;
|
|
261
261
|
},
|
|
262
262
|
logout: () => {
|
|
263
|
-
return stripeConnectInstance.then(instance => {
|
|
263
|
+
return stripeConnectInstance.then((instance) => {
|
|
264
264
|
return instance.logout();
|
|
265
265
|
});
|
|
266
|
-
}
|
|
266
|
+
},
|
|
267
267
|
};
|
|
268
268
|
};
|
|
269
269
|
|
|
@@ -280,12 +280,12 @@ const createWrapper = (stripeConnect: any) => {
|
|
|
280
280
|
sdk: true,
|
|
281
281
|
sdkOptions: {
|
|
282
282
|
// This will be replaced by the npm package version when bundling
|
|
283
|
-
sdkVersion: "_NPM_PACKAGE_VERSION_"
|
|
284
|
-
}
|
|
285
|
-
}
|
|
283
|
+
sdkVersion: "_NPM_PACKAGE_VERSION_",
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
286
|
});
|
|
287
287
|
return stripeConnectInstance;
|
|
288
|
-
}
|
|
288
|
+
},
|
|
289
289
|
};
|
|
290
290
|
return wrapper;
|
|
291
291
|
};
|
package/types/checks.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectElementCustomMethodConfig } from "./config";
|
|
2
|
-
import { ConnectElementTagName } from "./shared.d";
|
|
1
|
+
import type { ConnectElementCustomMethodConfig } from "./config";
|
|
2
|
+
import type { ConnectElementTagName } from "./shared.d";
|
|
3
3
|
|
|
4
4
|
// ensure that keys of ConnectElementCustomMethodConfig are from ConnectElementTagName
|
|
5
5
|
export type HasType<T, Q extends T> = Q;
|
package/types/config.ts
CHANGED
|
@@ -202,24 +202,24 @@ export const ConnectElementCommonMethodConfig = {
|
|
|
202
202
|
): void => {},
|
|
203
203
|
setOnLoaderStart: (
|
|
204
204
|
_listener: (({ elementTagName }: LoaderStart) => void) | undefined
|
|
205
|
-
): void => {}
|
|
205
|
+
): void => {},
|
|
206
206
|
};
|
|
207
207
|
|
|
208
208
|
export const ConnectElementCustomMethodConfig = {
|
|
209
209
|
payments: {
|
|
210
210
|
setDefaultFilters: (
|
|
211
211
|
_filters: PaymentsListDefaultFilters | undefined
|
|
212
|
-
): void => {}
|
|
212
|
+
): void => {},
|
|
213
213
|
},
|
|
214
214
|
"payment-details": {
|
|
215
215
|
setPayment: (_payment: string | undefined): void => {},
|
|
216
|
-
setOnClose: (_listener: (() => void) | undefined): void => {}
|
|
216
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
217
217
|
},
|
|
218
218
|
"payment-disputes": {
|
|
219
219
|
setPayment: (_payment: string | undefined): void => {},
|
|
220
220
|
setOnDisputesLoaded: (
|
|
221
221
|
_listener: (({ total }: { total: number }) => void) | undefined
|
|
222
|
-
): void => {}
|
|
222
|
+
): void => {},
|
|
223
223
|
},
|
|
224
224
|
"account-onboarding": {
|
|
225
225
|
setFullTermsOfServiceUrl: (
|
|
@@ -238,12 +238,12 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
238
238
|
setOnExit: (_listener: (() => void) | undefined): void => {},
|
|
239
239
|
setOnStepChange: (
|
|
240
240
|
_listener: (({ step }: StepChange) => void) | undefined
|
|
241
|
-
): void => {}
|
|
241
|
+
): void => {},
|
|
242
242
|
},
|
|
243
243
|
"account-management": {
|
|
244
244
|
setCollectionOptions: (
|
|
245
245
|
_collectionOptions: CollectionOptions | undefined
|
|
246
|
-
): void => {}
|
|
246
|
+
): void => {},
|
|
247
247
|
},
|
|
248
248
|
"notification-banner": {
|
|
249
249
|
setCollectionOptions: (
|
|
@@ -253,7 +253,7 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
253
253
|
_listener:
|
|
254
254
|
| (({ total, actionRequired }: NotificationCount) => void)
|
|
255
255
|
| undefined
|
|
256
|
-
): void => {}
|
|
256
|
+
): void => {},
|
|
257
257
|
},
|
|
258
258
|
"issuing-card": {
|
|
259
259
|
setDefaultCard: (_defaultCard: string | undefined): void => {},
|
|
@@ -261,23 +261,23 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
261
261
|
setFetchEphemeralKey: (
|
|
262
262
|
_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
|
|
263
263
|
): void => {},
|
|
264
|
-
setShowSpendControls: (_showSpendControls: boolean | undefined): void => {}
|
|
264
|
+
setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
|
|
265
265
|
},
|
|
266
266
|
"issuing-cards-list": {
|
|
267
267
|
setFetchEphemeralKey: (
|
|
268
268
|
_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
|
|
269
269
|
): void => {},
|
|
270
270
|
setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
|
|
271
|
-
setIssuingProgram: (_issuingProgram: string | undefined): void => {}
|
|
271
|
+
setIssuingProgram: (_issuingProgram: string | undefined): void => {},
|
|
272
272
|
},
|
|
273
273
|
"financial-account": {
|
|
274
|
-
setFinancialAccount: (_financialAccount: string): void => {}
|
|
274
|
+
setFinancialAccount: (_financialAccount: string): void => {},
|
|
275
275
|
},
|
|
276
276
|
"financial-account-transactions": {
|
|
277
|
-
setFinancialAccount: (_financialAccount: string): void => {}
|
|
277
|
+
setFinancialAccount: (_financialAccount: string): void => {},
|
|
278
278
|
},
|
|
279
279
|
recipients: {
|
|
280
|
-
setDataSource: (_dataSource: RecipientDataSource): void => {}
|
|
280
|
+
setDataSource: (_dataSource: RecipientDataSource): void => {},
|
|
281
281
|
},
|
|
282
282
|
"app-install": {
|
|
283
283
|
setApp: (_app: string | undefined): void => {},
|
|
@@ -286,16 +286,16 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
286
286
|
): void => {},
|
|
287
287
|
setOnAppInstallStateChanged: (
|
|
288
288
|
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
289
|
-
): void => {}
|
|
289
|
+
): void => {},
|
|
290
290
|
},
|
|
291
291
|
"app-viewport": {
|
|
292
292
|
setApp: (_app: string | undefined): void => {},
|
|
293
|
-
setAppData: (_appData: Record<string, string> | undefined): void => {}
|
|
293
|
+
setAppData: (_appData: Record<string, string> | undefined): void => {},
|
|
294
294
|
},
|
|
295
295
|
"payment-method-settings": {
|
|
296
296
|
setPaymentMethodConfiguration: (
|
|
297
297
|
_paymentMethodConfiguration: string | undefined
|
|
298
|
-
): void => {}
|
|
298
|
+
): void => {},
|
|
299
299
|
},
|
|
300
300
|
"capital-financing": {
|
|
301
301
|
setDefaultFinancingOffer: (
|
|
@@ -310,14 +310,16 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
310
310
|
setSupportUrl: (_supportUrl: string | undefined): void => {},
|
|
311
311
|
setOnFinancingsLoaded: (
|
|
312
312
|
_listener: (({ total }: { total: number }) => void) | undefined
|
|
313
|
-
): void => {}
|
|
313
|
+
): void => {},
|
|
314
314
|
},
|
|
315
315
|
"capital-financing-application": {
|
|
316
316
|
setOnApplicationSubmitted: (
|
|
317
317
|
_listener: (() => void) | undefined
|
|
318
318
|
): void => {},
|
|
319
319
|
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
320
|
-
setHowCapitalWorksUrl: (
|
|
320
|
+
setHowCapitalWorksUrl: (
|
|
321
|
+
_howCapitalWorksUrl: string | undefined
|
|
322
|
+
): void => {},
|
|
321
323
|
},
|
|
322
324
|
"capital-financing-promotion": {
|
|
323
325
|
setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
|
|
@@ -328,7 +330,7 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
328
330
|
_listener:
|
|
329
331
|
| (({
|
|
330
332
|
productType,
|
|
331
|
-
activeFinancingCount
|
|
333
|
+
activeFinancingCount,
|
|
332
334
|
}: FinancingProductType) => void)
|
|
333
335
|
| undefined
|
|
334
336
|
): void => {},
|
|
@@ -338,13 +340,13 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
338
340
|
): void => {},
|
|
339
341
|
setEligibilityCriteriaUrl: (
|
|
340
342
|
_eligibilityCriteriaUrl: string | undefined
|
|
341
|
-
): void => {}
|
|
343
|
+
): void => {},
|
|
342
344
|
},
|
|
343
345
|
"reporting-chart": {
|
|
344
346
|
setReportName: (_reportName: ReportName): void => {},
|
|
345
347
|
setIntervalStart: (_intervalStart: Date | undefined): void => {},
|
|
346
348
|
setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
|
|
347
|
-
setIntervalType: (_intervalType: IntervalType | undefined): void => {}
|
|
349
|
+
setIntervalType: (_intervalType: IntervalType | undefined): void => {},
|
|
348
350
|
},
|
|
349
351
|
"tax-settings": {
|
|
350
352
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
|
|
@@ -353,24 +355,24 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
353
355
|
): void => {},
|
|
354
356
|
setOnTaxSettingsUpdated: (
|
|
355
357
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
356
|
-
): void => {}
|
|
358
|
+
): void => {},
|
|
357
359
|
},
|
|
358
360
|
"tax-registrations": {
|
|
359
361
|
setOnAfterTaxRegistrationAdded: (
|
|
360
362
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
361
363
|
): void => {},
|
|
362
|
-
setDisplayCountries: (_countries: string[] | undefined): void => {}
|
|
364
|
+
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
363
365
|
},
|
|
364
366
|
"tax-threshold-monitoring": {
|
|
365
|
-
setDisplayCountries: (_countries: string[] | undefined): void => {}
|
|
367
|
+
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
366
368
|
},
|
|
367
369
|
"product-tax-code-selector": {
|
|
368
370
|
setOnTaxCodeSelect: (
|
|
369
|
-
_listener: ((
|
|
371
|
+
_listener: ((taxCode: string) => void) | undefined
|
|
370
372
|
): void => {},
|
|
371
373
|
setHideDescription: (_hideDescription: boolean | undefined): void => {},
|
|
372
374
|
setDisabled: (_disabled: boolean | undefined): void => {},
|
|
373
|
-
setInitialTaxCode: (_initialTaxCode: string | undefined): void => {}
|
|
375
|
+
setInitialTaxCode: (_initialTaxCode: string | undefined): void => {},
|
|
374
376
|
},
|
|
375
|
-
"export-tax-transactions": {}
|
|
377
|
+
"export-tax-transactions": {},
|
|
376
378
|
};
|
package/types/index.d.ts
CHANGED
package/types/shared.d.ts
CHANGED