@schematichq/schematic-components 1.1.1 → 1.1.3

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.
@@ -6439,7 +6439,7 @@ var hasLoadedNamespace2 = (ns, i18n, options2 = {}) => {
6439
6439
  return i18n.hasLoadedNamespace(ns, {
6440
6440
  lng: options2.lng,
6441
6441
  precheck: (i18nInstance2, loadNotPending) => {
6442
- if (options2.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
6442
+ if (options2.bindI18n && options2.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
6443
6443
  }
6444
6444
  });
6445
6445
  };
@@ -6610,7 +6610,7 @@ var useTranslation = (ns, props = {}) => {
6610
6610
  if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
6611
6611
  return () => {
6612
6612
  isMounted.current = false;
6613
- if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
6613
+ if (i18n && bindI18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
6614
6614
  if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
6615
6615
  };
6616
6616
  }, [i18n, joinedNS]);
@@ -8397,6 +8397,54 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8397
8397
  };
8398
8398
  }
8399
8399
 
8400
+ // src/api/checkoutexternal/models/StripeEmbedInfo.ts
8401
+ function StripeEmbedInfoFromJSON(json) {
8402
+ return StripeEmbedInfoFromJSONTyped(json, false);
8403
+ }
8404
+ function StripeEmbedInfoFromJSONTyped(json, ignoreDiscriminator) {
8405
+ if (json == null) {
8406
+ return json;
8407
+ }
8408
+ return {
8409
+ accountId: json["account_id"] == null ? void 0 : json["account_id"],
8410
+ publishableKey: json["publishable_key"] == null ? void 0 : json["publishable_key"],
8411
+ schematicPublishableKey: json["schematic_publishable_key"],
8412
+ setupIntentClientSecret: json["setup_intent_client_secret"] == null ? void 0 : json["setup_intent_client_secret"]
8413
+ };
8414
+ }
8415
+
8416
+ // src/api/checkoutexternal/models/CreditCompanyGrantView.ts
8417
+ function CreditCompanyGrantViewFromJSON(json) {
8418
+ return CreditCompanyGrantViewFromJSONTyped(json, false);
8419
+ }
8420
+ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
8421
+ if (json == null) {
8422
+ return json;
8423
+ }
8424
+ return {
8425
+ billingCreditBundleId: json["billing_credit_bundle_id"] == null ? void 0 : json["billing_credit_bundle_id"],
8426
+ billingCreditId: json["billing_credit_id"],
8427
+ companyId: json["company_id"],
8428
+ companyName: json["company_name"],
8429
+ createdAt: new Date(json["created_at"]),
8430
+ creditName: json["credit_name"],
8431
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
8432
+ grantReason: json["grant_reason"],
8433
+ id: json["id"],
8434
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
8435
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"],
8436
+ price: json["price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["price"]),
8437
+ quantity: json["quantity"],
8438
+ quantityRemaining: json["quantity_remaining"],
8439
+ quantityUsed: json["quantity_used"],
8440
+ sourceLabel: json["source_label"],
8441
+ updatedAt: new Date(json["updated_at"]),
8442
+ validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"]),
8443
+ zeroedOutDate: json["zeroed_out_date"] == null ? void 0 : new Date(json["zeroed_out_date"]),
8444
+ zeroedOutReason: json["zeroed_out_reason"] == null ? void 0 : json["zeroed_out_reason"]
8445
+ };
8446
+ }
8447
+
8400
8448
  // src/api/checkoutexternal/models/UsageBasedEntitlementResponseData.ts
8401
8449
  function UsageBasedEntitlementResponseDataFromJSON(json) {
8402
8450
  return UsageBasedEntitlementResponseDataFromJSONTyped(json, false);
@@ -8484,20 +8532,6 @@ function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator)
8484
8532
  };
8485
8533
  }
8486
8534
 
8487
- // src/api/checkoutexternal/models/StripeEmbedInfo.ts
8488
- function StripeEmbedInfoFromJSON(json) {
8489
- return StripeEmbedInfoFromJSONTyped(json, false);
8490
- }
8491
- function StripeEmbedInfoFromJSONTyped(json, ignoreDiscriminator) {
8492
- if (json == null) {
8493
- return json;
8494
- }
8495
- return {
8496
- publishableKey: json["publishable_key"],
8497
- setupIntentClientSecret: json["setup_intent_client_secret"] == null ? void 0 : json["setup_intent_client_secret"]
8498
- };
8499
- }
8500
-
8501
8535
  // src/api/checkoutexternal/models/ComponentHydrateResponseData.ts
8502
8536
  function ComponentHydrateResponseDataFromJSON(json) {
8503
8537
  return ComponentHydrateResponseDataFromJSONTyped(json, false);
@@ -8523,6 +8557,9 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8523
8557
  creditBundles: json["credit_bundles"].map(
8524
8558
  BillingCreditBundleViewFromJSON
8525
8559
  ),
8560
+ creditGrants: json["credit_grants"].map(
8561
+ CreditCompanyGrantViewFromJSON
8562
+ ),
8526
8563
  defaultPlan: json["default_plan"] == null ? void 0 : PlanDetailResponseDataFromJSON(json["default_plan"]),
8527
8564
  featureUsage: json["feature_usage"] == null ? void 0 : FeatureUsageDetailResponseDataFromJSON(json["feature_usage"]),
8528
8565
  stripeEmbed: json["stripe_embed"] == null ? void 0 : StripeEmbedInfoFromJSON(json["stripe_embed"]),
@@ -8541,7 +8578,9 @@ function SetupIntentResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8541
8578
  return json;
8542
8579
  }
8543
8580
  return {
8544
- publishableKey: json["publishable_key"],
8581
+ accountId: json["account_id"] == null ? void 0 : json["account_id"],
8582
+ publishableKey: json["publishable_key"] == null ? void 0 : json["publishable_key"],
8583
+ schematicPublishableKey: json["schematic_publishable_key"],
8545
8584
  setupIntentClientSecret: json["setup_intent_client_secret"] == null ? void 0 : json["setup_intent_client_secret"]
8546
8585
  };
8547
8586
  }
@@ -10149,7 +10188,7 @@ var EmbedProvider = ({
10149
10188
  });
10150
10189
  const customHeaders = (0, import_react12.useMemo)(
10151
10190
  () => ({
10152
- "X-Schematic-Components-Version": "1.1.1",
10191
+ "X-Schematic-Components-Version": "1.1.3",
10153
10192
  "X-Schematic-Session-ID": sessionIdRef.current
10154
10193
  }),
10155
10194
  []
@@ -16097,7 +16136,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
16097
16136
  }
16098
16137
  stripe._registerWrapper({
16099
16138
  name: "stripe-js",
16100
- version: "7.5.0",
16139
+ version: "7.6.1",
16101
16140
  startTime
16102
16141
  });
16103
16142
  };
@@ -16172,7 +16211,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
16172
16211
  var version = runtimeVersionToUrlVersion(maybeStripe.version);
16173
16212
  var expectedVersion = RELEASE_TRAIN;
16174
16213
  if (isTestKey && version !== expectedVersion) {
16175
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("7.5.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
16214
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("7.6.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
16176
16215
  }
16177
16216
  var stripe = maybeStripe.apply(void 0, args);
16178
16217
  registerWrapper(stripe, startTime);
@@ -16329,10 +16368,16 @@ var PaymentMethodDetails = ({
16329
16368
  [t2, deletePaymentMethod]
16330
16369
  );
16331
16370
  (0, import_react46.useEffect)(() => {
16332
- if (!stripe && setupIntent?.publishableKey) {
16333
- setStripe(loadStripe(setupIntent.publishableKey));
16371
+ if (!stripe && setupIntent) {
16372
+ let publishableKey = setupIntent.publishableKey || setupIntent.schematicPublishableKey;
16373
+ const stripeOptions = {};
16374
+ if (setupIntent.accountId) {
16375
+ publishableKey = setupIntent.schematicPublishableKey;
16376
+ stripeOptions.stripeAccount = setupIntent.accountId;
16377
+ }
16378
+ setStripe(loadStripe(publishableKey, stripeOptions));
16334
16379
  }
16335
- }, [stripe, setupIntent?.publishableKey]);
16380
+ }, [stripe, setupIntent]);
16336
16381
  (0, import_react46.useEffect)(() => {
16337
16382
  if (!setupIntent && (!currentPaymentMethod || showPaymentForm)) {
16338
16383
  initializePaymentMethod();
@@ -2742,6 +2742,12 @@ declare interface ComponentHydrateResponseData {
2742
2742
  * @memberof ComponentHydrateResponseData
2743
2743
  */
2744
2744
  creditBundles: Array<BillingCreditBundleView>;
2745
+ /**
2746
+ *
2747
+ * @type {Array<CreditCompanyGrantView>}
2748
+ * @memberof ComponentHydrateResponseData
2749
+ */
2750
+ creditGrants: Array<CreditCompanyGrantView>;
2745
2751
  /**
2746
2752
  *
2747
2753
  * @type {PlanDetailResponseData}
@@ -2864,6 +2870,134 @@ declare interface ConfigurationParameters {
2864
2870
 
2865
2871
  export declare const Container: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2866
2872
 
2873
+ /**
2874
+ *
2875
+ * @export
2876
+ * @interface CreditCompanyGrantView
2877
+ */
2878
+ declare interface CreditCompanyGrantView {
2879
+ /**
2880
+ *
2881
+ * @type {string}
2882
+ * @memberof CreditCompanyGrantView
2883
+ */
2884
+ billingCreditBundleId?: string | null;
2885
+ /**
2886
+ *
2887
+ * @type {string}
2888
+ * @memberof CreditCompanyGrantView
2889
+ */
2890
+ billingCreditId: string;
2891
+ /**
2892
+ *
2893
+ * @type {string}
2894
+ * @memberof CreditCompanyGrantView
2895
+ */
2896
+ companyId: string;
2897
+ /**
2898
+ *
2899
+ * @type {string}
2900
+ * @memberof CreditCompanyGrantView
2901
+ */
2902
+ companyName: string;
2903
+ /**
2904
+ *
2905
+ * @type {Date}
2906
+ * @memberof CreditCompanyGrantView
2907
+ */
2908
+ createdAt: Date;
2909
+ /**
2910
+ *
2911
+ * @type {string}
2912
+ * @memberof CreditCompanyGrantView
2913
+ */
2914
+ creditName: string;
2915
+ /**
2916
+ *
2917
+ * @type {Date}
2918
+ * @memberof CreditCompanyGrantView
2919
+ */
2920
+ expiresAt?: Date | null;
2921
+ /**
2922
+ *
2923
+ * @type {string}
2924
+ * @memberof CreditCompanyGrantView
2925
+ */
2926
+ grantReason: string;
2927
+ /**
2928
+ *
2929
+ * @type {string}
2930
+ * @memberof CreditCompanyGrantView
2931
+ */
2932
+ id: string;
2933
+ /**
2934
+ *
2935
+ * @type {string}
2936
+ * @memberof CreditCompanyGrantView
2937
+ */
2938
+ planId?: string | null;
2939
+ /**
2940
+ *
2941
+ * @type {string}
2942
+ * @memberof CreditCompanyGrantView
2943
+ */
2944
+ planName?: string | null;
2945
+ /**
2946
+ *
2947
+ * @type {BillingProductPriceResponseData}
2948
+ * @memberof CreditCompanyGrantView
2949
+ */
2950
+ price?: BillingProductPriceResponseData;
2951
+ /**
2952
+ *
2953
+ * @type {number}
2954
+ * @memberof CreditCompanyGrantView
2955
+ */
2956
+ quantity: number;
2957
+ /**
2958
+ *
2959
+ * @type {number}
2960
+ * @memberof CreditCompanyGrantView
2961
+ */
2962
+ quantityRemaining: number;
2963
+ /**
2964
+ *
2965
+ * @type {number}
2966
+ * @memberof CreditCompanyGrantView
2967
+ */
2968
+ quantityUsed: number;
2969
+ /**
2970
+ *
2971
+ * @type {string}
2972
+ * @memberof CreditCompanyGrantView
2973
+ */
2974
+ sourceLabel: string;
2975
+ /**
2976
+ *
2977
+ * @type {Date}
2978
+ * @memberof CreditCompanyGrantView
2979
+ */
2980
+ updatedAt: Date;
2981
+ /**
2982
+ *
2983
+ * @type {Date}
2984
+ * @memberof CreditCompanyGrantView
2985
+ */
2986
+ validFrom?: Date | null;
2987
+ /**
2988
+ *
2989
+ * @type {Date}
2990
+ * @memberof CreditCompanyGrantView
2991
+ */
2992
+ zeroedOutDate?: Date | null;
2993
+ /**
2994
+ *
2995
+ * @type {string}
2996
+ * @memberof CreditCompanyGrantView
2997
+ */
2998
+ zeroedOutReason?: string | null;
2999
+ }
3000
+
2867
3001
  /**
2868
3002
  * Schematic API
2869
3003
  * Schematic API
@@ -6728,7 +6862,19 @@ declare interface SetupIntentResponseData {
6728
6862
  * @type {string}
6729
6863
  * @memberof SetupIntentResponseData
6730
6864
  */
6731
- publishableKey: string;
6865
+ accountId?: string | null;
6866
+ /**
6867
+ *
6868
+ * @type {string}
6869
+ * @memberof SetupIntentResponseData
6870
+ */
6871
+ publishableKey?: string | null;
6872
+ /**
6873
+ *
6874
+ * @type {string}
6875
+ * @memberof SetupIntentResponseData
6876
+ */
6877
+ schematicPublishableKey: string;
6732
6878
  /**
6733
6879
  *
6734
6880
  * @type {string}
@@ -6759,7 +6905,19 @@ declare interface StripeEmbedInfo {
6759
6905
  * @type {string}
6760
6906
  * @memberof StripeEmbedInfo
6761
6907
  */
6762
- publishableKey: string;
6908
+ accountId?: string | null;
6909
+ /**
6910
+ *
6911
+ * @type {string}
6912
+ * @memberof StripeEmbedInfo
6913
+ */
6914
+ publishableKey?: string | null;
6915
+ /**
6916
+ *
6917
+ * @type {string}
6918
+ * @memberof StripeEmbedInfo
6919
+ */
6920
+ schematicPublishableKey: string;
6763
6921
  /**
6764
6922
  *
6765
6923
  * @type {string}
@@ -6375,7 +6375,7 @@ var hasLoadedNamespace2 = (ns, i18n, options2 = {}) => {
6375
6375
  return i18n.hasLoadedNamespace(ns, {
6376
6376
  lng: options2.lng,
6377
6377
  precheck: (i18nInstance2, loadNotPending) => {
6378
- if (options2.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
6378
+ if (options2.bindI18n && options2.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
6379
6379
  }
6380
6380
  });
6381
6381
  };
@@ -6546,7 +6546,7 @@ var useTranslation = (ns, props = {}) => {
6546
6546
  if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
6547
6547
  return () => {
6548
6548
  isMounted.current = false;
6549
- if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
6549
+ if (i18n && bindI18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
6550
6550
  if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
6551
6551
  };
6552
6552
  }, [i18n, joinedNS]);
@@ -8340,6 +8340,54 @@ function PlanDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8340
8340
  };
8341
8341
  }
8342
8342
 
8343
+ // src/api/checkoutexternal/models/StripeEmbedInfo.ts
8344
+ function StripeEmbedInfoFromJSON(json) {
8345
+ return StripeEmbedInfoFromJSONTyped(json, false);
8346
+ }
8347
+ function StripeEmbedInfoFromJSONTyped(json, ignoreDiscriminator) {
8348
+ if (json == null) {
8349
+ return json;
8350
+ }
8351
+ return {
8352
+ accountId: json["account_id"] == null ? void 0 : json["account_id"],
8353
+ publishableKey: json["publishable_key"] == null ? void 0 : json["publishable_key"],
8354
+ schematicPublishableKey: json["schematic_publishable_key"],
8355
+ setupIntentClientSecret: json["setup_intent_client_secret"] == null ? void 0 : json["setup_intent_client_secret"]
8356
+ };
8357
+ }
8358
+
8359
+ // src/api/checkoutexternal/models/CreditCompanyGrantView.ts
8360
+ function CreditCompanyGrantViewFromJSON(json) {
8361
+ return CreditCompanyGrantViewFromJSONTyped(json, false);
8362
+ }
8363
+ function CreditCompanyGrantViewFromJSONTyped(json, ignoreDiscriminator) {
8364
+ if (json == null) {
8365
+ return json;
8366
+ }
8367
+ return {
8368
+ billingCreditBundleId: json["billing_credit_bundle_id"] == null ? void 0 : json["billing_credit_bundle_id"],
8369
+ billingCreditId: json["billing_credit_id"],
8370
+ companyId: json["company_id"],
8371
+ companyName: json["company_name"],
8372
+ createdAt: new Date(json["created_at"]),
8373
+ creditName: json["credit_name"],
8374
+ expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
8375
+ grantReason: json["grant_reason"],
8376
+ id: json["id"],
8377
+ planId: json["plan_id"] == null ? void 0 : json["plan_id"],
8378
+ planName: json["plan_name"] == null ? void 0 : json["plan_name"],
8379
+ price: json["price"] == null ? void 0 : BillingProductPriceResponseDataFromJSON(json["price"]),
8380
+ quantity: json["quantity"],
8381
+ quantityRemaining: json["quantity_remaining"],
8382
+ quantityUsed: json["quantity_used"],
8383
+ sourceLabel: json["source_label"],
8384
+ updatedAt: new Date(json["updated_at"]),
8385
+ validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"]),
8386
+ zeroedOutDate: json["zeroed_out_date"] == null ? void 0 : new Date(json["zeroed_out_date"]),
8387
+ zeroedOutReason: json["zeroed_out_reason"] == null ? void 0 : json["zeroed_out_reason"]
8388
+ };
8389
+ }
8390
+
8343
8391
  // src/api/checkoutexternal/models/UsageBasedEntitlementResponseData.ts
8344
8392
  function UsageBasedEntitlementResponseDataFromJSON(json) {
8345
8393
  return UsageBasedEntitlementResponseDataFromJSONTyped(json, false);
@@ -8427,20 +8475,6 @@ function FeatureUsageDetailResponseDataFromJSONTyped(json, ignoreDiscriminator)
8427
8475
  };
8428
8476
  }
8429
8477
 
8430
- // src/api/checkoutexternal/models/StripeEmbedInfo.ts
8431
- function StripeEmbedInfoFromJSON(json) {
8432
- return StripeEmbedInfoFromJSONTyped(json, false);
8433
- }
8434
- function StripeEmbedInfoFromJSONTyped(json, ignoreDiscriminator) {
8435
- if (json == null) {
8436
- return json;
8437
- }
8438
- return {
8439
- publishableKey: json["publishable_key"],
8440
- setupIntentClientSecret: json["setup_intent_client_secret"] == null ? void 0 : json["setup_intent_client_secret"]
8441
- };
8442
- }
8443
-
8444
8478
  // src/api/checkoutexternal/models/ComponentHydrateResponseData.ts
8445
8479
  function ComponentHydrateResponseDataFromJSON(json) {
8446
8480
  return ComponentHydrateResponseDataFromJSONTyped(json, false);
@@ -8466,6 +8500,9 @@ function ComponentHydrateResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8466
8500
  creditBundles: json["credit_bundles"].map(
8467
8501
  BillingCreditBundleViewFromJSON
8468
8502
  ),
8503
+ creditGrants: json["credit_grants"].map(
8504
+ CreditCompanyGrantViewFromJSON
8505
+ ),
8469
8506
  defaultPlan: json["default_plan"] == null ? void 0 : PlanDetailResponseDataFromJSON(json["default_plan"]),
8470
8507
  featureUsage: json["feature_usage"] == null ? void 0 : FeatureUsageDetailResponseDataFromJSON(json["feature_usage"]),
8471
8508
  stripeEmbed: json["stripe_embed"] == null ? void 0 : StripeEmbedInfoFromJSON(json["stripe_embed"]),
@@ -8484,7 +8521,9 @@ function SetupIntentResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8484
8521
  return json;
8485
8522
  }
8486
8523
  return {
8487
- publishableKey: json["publishable_key"],
8524
+ accountId: json["account_id"] == null ? void 0 : json["account_id"],
8525
+ publishableKey: json["publishable_key"] == null ? void 0 : json["publishable_key"],
8526
+ schematicPublishableKey: json["schematic_publishable_key"],
8488
8527
  setupIntentClientSecret: json["setup_intent_client_secret"] == null ? void 0 : json["setup_intent_client_secret"]
8489
8528
  };
8490
8529
  }
@@ -10092,7 +10131,7 @@ var EmbedProvider = ({
10092
10131
  });
10093
10132
  const customHeaders = useMemo3(
10094
10133
  () => ({
10095
- "X-Schematic-Components-Version": "1.1.1",
10134
+ "X-Schematic-Components-Version": "1.1.3",
10096
10135
  "X-Schematic-Session-ID": sessionIdRef.current
10097
10136
  }),
10098
10137
  []
@@ -16054,7 +16093,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
16054
16093
  }
16055
16094
  stripe._registerWrapper({
16056
16095
  name: "stripe-js",
16057
- version: "7.5.0",
16096
+ version: "7.6.1",
16058
16097
  startTime
16059
16098
  });
16060
16099
  };
@@ -16129,7 +16168,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
16129
16168
  var version = runtimeVersionToUrlVersion(maybeStripe.version);
16130
16169
  var expectedVersion = RELEASE_TRAIN;
16131
16170
  if (isTestKey && version !== expectedVersion) {
16132
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("7.5.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
16171
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("7.6.1", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
16133
16172
  }
16134
16173
  var stripe = maybeStripe.apply(void 0, args);
16135
16174
  registerWrapper(stripe, startTime);
@@ -16286,10 +16325,16 @@ var PaymentMethodDetails = ({
16286
16325
  [t2, deletePaymentMethod]
16287
16326
  );
16288
16327
  useEffect7(() => {
16289
- if (!stripe && setupIntent?.publishableKey) {
16290
- setStripe(loadStripe(setupIntent.publishableKey));
16328
+ if (!stripe && setupIntent) {
16329
+ let publishableKey = setupIntent.publishableKey || setupIntent.schematicPublishableKey;
16330
+ const stripeOptions = {};
16331
+ if (setupIntent.accountId) {
16332
+ publishableKey = setupIntent.schematicPublishableKey;
16333
+ stripeOptions.stripeAccount = setupIntent.accountId;
16334
+ }
16335
+ setStripe(loadStripe(publishableKey, stripeOptions));
16291
16336
  }
16292
- }, [stripe, setupIntent?.publishableKey]);
16337
+ }, [stripe, setupIntent]);
16293
16338
  useEffect7(() => {
16294
16339
  if (!setupIntent && (!currentPaymentMethod || showPaymentForm)) {
16295
16340
  initializePaymentMethod();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematichq/schematic-components",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "main": "dist/schematic-components.cjs.js",
5
5
  "module": "dist/schematic-components.esm.js",
6
6
  "types": "dist/schematic-components.d.ts",