@stripe/connect-js 3.3.39-preview-1 → 3.3.41-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.
@@ -249,6 +249,9 @@ const initStripeConnect = (stripePromise, initParams) => {
249
249
  for (const method in methods) {
250
250
  element[method] = function (value) {
251
251
  stripeConnectInstance.then(() => {
252
+ if (!this[`${method}InternalOnly`]) {
253
+ 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.41-preview-1`);
254
+ }
252
255
  this[`${method}InternalOnly`](value);
253
256
  });
254
257
  };
@@ -301,7 +304,7 @@ const createWrapper = stripeConnect => {
301
304
  sdk: true,
302
305
  sdkOptions: {
303
306
  // This will be replaced by the npm package version when bundling
304
- sdkVersion: "3.3.39-preview-1"
307
+ sdkVersion: "3.3.41-preview-1"
305
308
  }
306
309
  })
307
310
  }));
package/dist/connect.js CHANGED
@@ -253,6 +253,9 @@ const initStripeConnect = (stripePromise, initParams) => {
253
253
  for (const method in methods) {
254
254
  element[method] = function (value) {
255
255
  stripeConnectInstance.then(() => {
256
+ if (!this[`${method}InternalOnly`]) {
257
+ 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.41-preview-1`);
258
+ }
256
259
  this[`${method}InternalOnly`](value);
257
260
  });
258
261
  };
@@ -305,7 +308,7 @@ const createWrapper = stripeConnect => {
305
308
  sdk: true,
306
309
  sdkOptions: {
307
310
  // This will be replaced by the npm package version when bundling
308
- sdkVersion: "3.3.39-preview-1"
311
+ sdkVersion: "3.3.41-preview-1"
309
312
  }
310
313
  })
311
314
  }));
package/dist/pure.esm.js CHANGED
@@ -249,6 +249,9 @@ const initStripeConnect = (stripePromise, initParams) => {
249
249
  for (const method in methods) {
250
250
  element[method] = function (value) {
251
251
  stripeConnectInstance.then(() => {
252
+ if (!this[`${method}InternalOnly`]) {
253
+ 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.41-preview-1`);
254
+ }
252
255
  this[`${method}InternalOnly`](value);
253
256
  });
254
257
  };
@@ -301,7 +304,7 @@ const createWrapper = stripeConnect => {
301
304
  sdk: true,
302
305
  sdkOptions: {
303
306
  // This will be replaced by the npm package version when bundling
304
- sdkVersion: "3.3.39-preview-1"
307
+ sdkVersion: "3.3.41-preview-1"
305
308
  }
306
309
  })
307
310
  }));
package/dist/pure.js CHANGED
@@ -253,6 +253,9 @@ const initStripeConnect = (stripePromise, initParams) => {
253
253
  for (const method in methods) {
254
254
  element[method] = function (value) {
255
255
  stripeConnectInstance.then(() => {
256
+ if (!this[`${method}InternalOnly`]) {
257
+ 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.41-preview-1`);
258
+ }
256
259
  this[`${method}InternalOnly`](value);
257
260
  });
258
261
  };
@@ -305,7 +308,7 @@ const createWrapper = stripeConnect => {
305
308
  sdk: true,
306
309
  sdkOptions: {
307
310
  // This will be replaced by the npm package version when bundling
308
- sdkVersion: "3.3.39-preview-1"
311
+ sdkVersion: "3.3.41-preview-1"
309
312
  }
310
313
  })
311
314
  }));
@@ -219,9 +219,9 @@ export declare const ConnectElementCustomMethodConfig: {
219
219
  setDisplayCountries: (_countries: string[] | undefined) => void;
220
220
  };
221
221
  "product-tax-code-selector": {
222
- setOnTaxCodeSelect: (_listener: ((taxCode: string, { analyticsName }: {
222
+ setOnTaxCodeSelect: (_listener: ((taxCode: string | null, _: {
223
223
  analyticsName: string;
224
- }) => void) | undefined) => void;
224
+ } | null) => void) | undefined) => void;
225
225
  setHideDescription: (_hideDescription: boolean | undefined) => void;
226
226
  setDisabled: (_disabled: boolean | undefined) => void;
227
227
  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.39-preview-1",
3
+ "version": "3.3.41-preview-1",
4
4
  "description": "Connect.js loading utility package",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
package/src/shared.ts CHANGED
@@ -235,6 +235,12 @@ export const initStripeConnect = (
235
235
  for (const method in methods) {
236
236
  (element as any)[method] = function (value: any) {
237
237
  stripeConnectInstance.then(() => {
238
+ if (!this[`${method}InternalOnly`]) {
239
+ throw new Error(
240
+ `Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: _NPM_PACKAGE_VERSION_`
241
+ );
242
+ }
243
+
238
244
  this[`${method}InternalOnly`](value);
239
245
  });
240
246
  };
package/types/config.ts CHANGED
@@ -393,8 +393,8 @@ export const ConnectElementCustomMethodConfig = {
393
393
  setOnTaxCodeSelect: (
394
394
  _listener:
395
395
  | ((
396
- taxCode: string,
397
- { analyticsName }: { analyticsName: string }
396
+ taxCode: string | null,
397
+ _: { analyticsName: string } | null
398
398
  ) => void)
399
399
  | undefined
400
400
  ): void => {},