fontdue-js 2.1.0 → 2.2.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.2.0
2
+
3
+ - Support for updated stripe integration, for accounts that connected to Stripe after August 11 2023
4
+
1
5
  ## 2.1.0
2
6
 
3
7
  - Added support for variable fonts to the standalone TypeTester component
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<1e17d9ac955089b5ee7fa7992f71be96>>
2
+ * @generated SignedSource<<3a48db3e7fc423bae9f5f7c65ea5a9cc>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<1e17d9ac955089b5ee7fa7992f71be96>>
8
+ * @generated SignedSource<<3a48db3e7fc423bae9f5f7c65ea5a9cc>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -263,17 +263,14 @@ const node = function () {
263
263
  }, {
264
264
  "alias": null,
265
265
  "args": null,
266
- "concreteType": "StripeCredentials",
267
- "kind": "LinkedField",
268
- "name": "stripeCredentials",
269
- "plural": false,
270
- "selections": [{
271
- "alias": null,
272
- "args": null,
273
- "kind": "ScalarField",
274
- "name": "stripePublishableKey",
275
- "storageKey": null
276
- }],
266
+ "kind": "ScalarField",
267
+ "name": "stripeAccountId",
268
+ "storageKey": null
269
+ }, {
270
+ "alias": null,
271
+ "args": null,
272
+ "kind": "ScalarField",
273
+ "name": "stripePublishableKey",
277
274
  "storageKey": null
278
275
  }, {
279
276
  "alias": null,
@@ -743,12 +740,12 @@ const node = function () {
743
740
  }]
744
741
  },
745
742
  "params": {
746
- "cacheID": "52a0031618c5b003158fe781a65c4052",
743
+ "cacheID": "3bf95735f2d71a2fe6d2180b09691242",
747
744
  "id": null,
748
745
  "metadata": {},
749
746
  "name": "CartQuery",
750
747
  "operationKind": "query",
751
- "text": "query CartQuery {\n viewer {\n ...StripeProvider_viewer\n ...CartOrder_viewer\n currentOrder {\n ...CartOrder_order\n id\n }\n id\n }\n}\n\nfragment AddressFields_viewer on Viewer {\n countries {\n code\n name\n }\n}\n\nfragment CartItem_node on OrderItem {\n id\n price {\n ...Price_price\n }\n sku {\n price {\n ...Price_price\n }\n product {\n __typename\n __isSkuProduct: __typename\n ...CollectionAa_product\n ...FontStyle_fontStyle\n ... on FontStyle {\n family {\n name\n cssUrl\n id\n }\n name\n variableInstances {\n name\n }\n }\n ... on Bundle {\n name\n }\n ... on FontCollection {\n name\n isVariableFont\n totalStyles\n featureStyle {\n family {\n cssUrl\n id\n }\n id\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n licenseSelections {\n id\n license {\n id\n name\n multiplier\n }\n variable: licenseVariable {\n id\n variableType\n ...VariableTableAmounts_variable\n }\n option: licenseOption {\n id\n amount\n multiplier\n name\n ...VariableTableAmounts_option\n }\n variableText\n }\n}\n\nfragment CartItem_viewer on Viewer {\n licenses(licenseTypes: [RETAIL]) {\n id\n name\n variables: licenseVariables {\n id\n name\n variableType\n options: licenseOptions {\n id\n amount\n name\n }\n }\n }\n}\n\nfragment CartOrder_order on Order {\n ...Checkout_order\n ...Download_order\n ...CartTotals_order\n orderItems {\n ...CartItem_node\n id\n licenseSelections {\n license {\n id\n }\n licenseVariable {\n id\n variableType\n }\n licenseOption {\n id\n }\n variableText\n id\n }\n }\n discount {\n id\n }\n customer {\n email\n name\n anonymous\n id\n }\n billingIdentity {\n ...IdentityBox_identity\n }\n licenseeIdentity {\n ...IdentityBox_identity\n }\n licenseeIsBillingIdentity\n stripePaymentMethod {\n card {\n last4\n brand\n }\n }\n stripePaymentIntent {\n status\n }\n canCompleteWithCoupon\n completedWithCoupon\n}\n\nfragment CartOrder_viewer on Viewer {\n ...CartItem_viewer\n ...Checkout_viewer\n settings {\n eulaAgreementLabel(format: HTML)\n }\n}\n\nfragment CartTotals_order on Order {\n subtotal {\n ...Price_price\n }\n discount {\n amount {\n amount\n ...Price_price\n }\n coupon {\n ...CouponText_coupon\n id\n }\n id\n }\n discountedSubtotal {\n ...Price_price\n }\n total {\n amount\n ...Price_price\n }\n taxes {\n ...Price_price\n }\n taxName\n gstIncluded\n}\n\nfragment Checkout_order on Order {\n canCompleteWithCoupon\n customer {\n name\n email\n newsletterOptIn\n id\n }\n billingIdentity {\n name\n organization\n email\n phone\n street\n locality\n sublocality\n country\n administrativeArea\n zip\n vatNumber\n }\n licenseeIdentity {\n name\n organization\n email\n phone\n street\n locality\n sublocality\n country\n administrativeArea\n zip\n vatNumber\n }\n licenseeIsBillingIdentity\n}\n\nfragment Checkout_viewer on Viewer {\n ...AddressFields_viewer\n settings {\n uiFontName\n newsletterOptInLabel\n }\n themeConfig {\n customProperties\n }\n}\n\nfragment CollectionAa_product on SkuProduct {\n __isSkuProduct: __typename\n __typename\n ... on FontCollection {\n featureStyle {\n ...FontStyle_fontStyle\n id\n }\n }\n ... on Bundle {\n fontStyles {\n ...FontStyle_fontStyle\n id\n }\n }\n}\n\nfragment CouponText_coupon on Coupon {\n type\n percentAmount\n creditAmountRemaining {\n amount\n currency\n }\n}\n\nfragment Download_order on Order {\n id\n archiveUrl\n customer {\n email\n id\n }\n completedWithCoupon\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment IdentityBox_identity on Identity {\n email\n phoneFormatted\n addressFormatted\n vatNumber\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment StripeProvider_viewer on Viewer {\n settings {\n uiFontUrl\n uiFontName\n }\n themeConfig {\n customProperties\n }\n stripeCredentials {\n stripePublishableKey\n }\n currentOrder {\n stripePaymentIntent {\n clientSecret\n }\n id\n }\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n"
748
+ "text": "query CartQuery {\n viewer {\n ...StripeProvider_viewer\n ...CartOrder_viewer\n currentOrder {\n ...CartOrder_order\n id\n }\n id\n }\n}\n\nfragment AddressFields_viewer on Viewer {\n countries {\n code\n name\n }\n}\n\nfragment CartItem_node on OrderItem {\n id\n price {\n ...Price_price\n }\n sku {\n price {\n ...Price_price\n }\n product {\n __typename\n __isSkuProduct: __typename\n ...CollectionAa_product\n ...FontStyle_fontStyle\n ... on FontStyle {\n family {\n name\n cssUrl\n id\n }\n name\n variableInstances {\n name\n }\n }\n ... on Bundle {\n name\n }\n ... on FontCollection {\n name\n isVariableFont\n totalStyles\n featureStyle {\n family {\n cssUrl\n id\n }\n id\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n licenseSelections {\n id\n license {\n id\n name\n multiplier\n }\n variable: licenseVariable {\n id\n variableType\n ...VariableTableAmounts_variable\n }\n option: licenseOption {\n id\n amount\n multiplier\n name\n ...VariableTableAmounts_option\n }\n variableText\n }\n}\n\nfragment CartItem_viewer on Viewer {\n licenses(licenseTypes: [RETAIL]) {\n id\n name\n variables: licenseVariables {\n id\n name\n variableType\n options: licenseOptions {\n id\n amount\n name\n }\n }\n }\n}\n\nfragment CartOrder_order on Order {\n ...Checkout_order\n ...Download_order\n ...CartTotals_order\n orderItems {\n ...CartItem_node\n id\n licenseSelections {\n license {\n id\n }\n licenseVariable {\n id\n variableType\n }\n licenseOption {\n id\n }\n variableText\n id\n }\n }\n discount {\n id\n }\n customer {\n email\n name\n anonymous\n id\n }\n billingIdentity {\n ...IdentityBox_identity\n }\n licenseeIdentity {\n ...IdentityBox_identity\n }\n licenseeIsBillingIdentity\n stripePaymentMethod {\n card {\n last4\n brand\n }\n }\n stripePaymentIntent {\n status\n }\n canCompleteWithCoupon\n completedWithCoupon\n}\n\nfragment CartOrder_viewer on Viewer {\n ...CartItem_viewer\n ...Checkout_viewer\n settings {\n eulaAgreementLabel(format: HTML)\n }\n}\n\nfragment CartTotals_order on Order {\n subtotal {\n ...Price_price\n }\n discount {\n amount {\n amount\n ...Price_price\n }\n coupon {\n ...CouponText_coupon\n id\n }\n id\n }\n discountedSubtotal {\n ...Price_price\n }\n total {\n amount\n ...Price_price\n }\n taxes {\n ...Price_price\n }\n taxName\n gstIncluded\n}\n\nfragment Checkout_order on Order {\n canCompleteWithCoupon\n customer {\n name\n email\n newsletterOptIn\n id\n }\n billingIdentity {\n name\n organization\n email\n phone\n street\n locality\n sublocality\n country\n administrativeArea\n zip\n vatNumber\n }\n licenseeIdentity {\n name\n organization\n email\n phone\n street\n locality\n sublocality\n country\n administrativeArea\n zip\n vatNumber\n }\n licenseeIsBillingIdentity\n}\n\nfragment Checkout_viewer on Viewer {\n ...AddressFields_viewer\n settings {\n uiFontName\n newsletterOptInLabel\n }\n themeConfig {\n customProperties\n }\n}\n\nfragment CollectionAa_product on SkuProduct {\n __isSkuProduct: __typename\n __typename\n ... on FontCollection {\n featureStyle {\n ...FontStyle_fontStyle\n id\n }\n }\n ... on Bundle {\n fontStyles {\n ...FontStyle_fontStyle\n id\n }\n }\n}\n\nfragment CouponText_coupon on Coupon {\n type\n percentAmount\n creditAmountRemaining {\n amount\n currency\n }\n}\n\nfragment Download_order on Order {\n id\n archiveUrl\n customer {\n email\n id\n }\n completedWithCoupon\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment IdentityBox_identity on Identity {\n email\n phoneFormatted\n addressFormatted\n vatNumber\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment StripeProvider_viewer on Viewer {\n settings {\n uiFontUrl\n uiFontName\n }\n themeConfig {\n customProperties\n }\n stripeAccountId\n stripePublishableKey\n currentOrder {\n stripePaymentIntent {\n clientSecret\n }\n id\n }\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n"
752
749
  }
753
750
  };
754
751
  }();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<2b09acac10c443d4a15c6cbf588e0a76>>
2
+ * @generated SignedSource<<b4b764624fbe00d3d774d30ba0b40b3d>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -19,9 +19,7 @@ export type StoreModalProductQuery$data = {
19
19
  } | null;
20
20
  readonly viewer: {
21
21
  readonly endpoint: string | null;
22
- readonly stripeCredentials: {
23
- readonly stripePublishableKey: string;
24
- } | null;
22
+ readonly stripeAccountId: string | null;
25
23
  readonly " $fragmentSpreads": FragmentRefs<"StoreModalProductLicenseSelection_viewer" | "StoreModalProductSummary_viewer">;
26
24
  };
27
25
  };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<2b09acac10c443d4a15c6cbf588e0a76>>
8
+ * @generated SignedSource<<b4b764624fbe00d3d774d30ba0b40b3d>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -52,17 +52,8 @@ const node = function () {
52
52
  v6 = {
53
53
  "alias": null,
54
54
  "args": null,
55
- "concreteType": "StripeCredentials",
56
- "kind": "LinkedField",
57
- "name": "stripeCredentials",
58
- "plural": false,
59
- "selections": [{
60
- "alias": null,
61
- "args": null,
62
- "kind": "ScalarField",
63
- "name": "stripePublishableKey",
64
- "storageKey": null
65
- }],
55
+ "kind": "ScalarField",
56
+ "name": "stripeAccountId",
66
57
  "storageKey": null
67
58
  },
68
59
  v7 = {
@@ -500,15 +491,15 @@ const node = function () {
500
491
  }]
501
492
  },
502
493
  "params": {
503
- "cacheID": "c40a4408a14fafdb11b8a0ffc44b46e9",
494
+ "cacheID": "505ecb8862c17c0dab95c6ae0415862e",
504
495
  "id": null,
505
496
  "metadata": {},
506
497
  "name": "StoreModalProductQuery",
507
498
  "operationKind": "query",
508
- "text": "query StoreModalProductQuery(\n $productId: ID!\n) {\n collection: node(id: $productId) {\n __typename\n id\n ...StoreModalFamily_collection\n ... on FontCollection {\n children(collectionTypes: [FAMILY]) {\n id\n ...StoreModalFamily_collection\n }\n }\n }\n viewer {\n ...StoreModalProductLicenseSelection_viewer\n ...StoreModalProductSummary_viewer\n endpoint\n stripeCredentials {\n stripePublishableKey\n }\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalBundleButton_bundle on Bundle {\n name\n sku {\n ...SKUPrice_sku\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection on FontCollection {\n ...StoreModalFamilyButton_collection\n cssUrl\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles {\n id\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n ...StoreModalBundleButton_bundle\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n}\n\nfragment StoreModalProductLicenseSelection_viewer on Viewer {\n licenses(licenseTypes: [RETAIL]) {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n defaultSelected\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer on Viewer {\n precart(skuIds: [], licenseOptions: []) {\n skus {\n price(licenseOptions: []) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalStyleButton_fontStyle on FontStyle {\n ...FontStyle_fontStyle\n id\n name\n sku {\n ...SKUPrice_sku\n id\n }\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n variableAxes {\n name\n }\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
499
+ "text": "query StoreModalProductQuery(\n $productId: ID!\n) {\n collection: node(id: $productId) {\n __typename\n id\n ...StoreModalFamily_collection\n ... on FontCollection {\n children(collectionTypes: [FAMILY]) {\n id\n ...StoreModalFamily_collection\n }\n }\n }\n viewer {\n ...StoreModalProductLicenseSelection_viewer\n ...StoreModalProductSummary_viewer\n endpoint\n stripeAccountId\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalBundleButton_bundle on Bundle {\n name\n sku {\n ...SKUPrice_sku\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection on FontCollection {\n ...StoreModalFamilyButton_collection\n cssUrl\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles {\n id\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n ...StoreModalBundleButton_bundle\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n}\n\nfragment StoreModalProductLicenseSelection_viewer on Viewer {\n licenses(licenseTypes: [RETAIL]) {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n defaultSelected\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer on Viewer {\n precart(skuIds: [], licenseOptions: []) {\n skus {\n price(licenseOptions: []) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalStyleButton_fontStyle on FontStyle {\n ...FontStyle_fontStyle\n id\n name\n sku {\n ...SKUPrice_sku\n id\n }\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n variableAxes {\n name\n }\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
509
500
  }
510
501
  };
511
502
  }();
512
- node.hash = "491d7c1daa28742d375049de66b6c386";
503
+ node.hash = "a56c2c63a760bf157f6456dcc5a59dad";
513
504
  var _default = node;
514
505
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<8ae860b7b0a3279b4d13224fed2ec90b>>
2
+ * @generated SignedSource<<65e30c6e19e678578d8e9ddcb54c7794>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<8ae860b7b0a3279b4d13224fed2ec90b>>
8
+ * @generated SignedSource<<65e30c6e19e678578d8e9ddcb54c7794>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -171,17 +171,14 @@ const node = function () {
171
171
  }, {
172
172
  "alias": null,
173
173
  "args": null,
174
- "concreteType": "StripeCredentials",
175
- "kind": "LinkedField",
176
- "name": "stripeCredentials",
177
- "plural": false,
178
- "selections": [{
179
- "alias": null,
180
- "args": null,
181
- "kind": "ScalarField",
182
- "name": "stripePublishableKey",
183
- "storageKey": null
184
- }],
174
+ "kind": "ScalarField",
175
+ "name": "stripeAccountId",
176
+ "storageKey": null
177
+ }, {
178
+ "alias": null,
179
+ "args": null,
180
+ "kind": "ScalarField",
181
+ "name": "stripePublishableKey",
185
182
  "storageKey": null
186
183
  }, {
187
184
  "alias": null,
@@ -480,12 +477,12 @@ const node = function () {
480
477
  }]
481
478
  },
482
479
  "params": {
483
- "cacheID": "ab1264b009e60ee2a4c28786470993cb",
480
+ "cacheID": "055fecbbe592dcba74a14e0fe078fd13",
484
481
  "id": null,
485
482
  "metadata": {},
486
483
  "name": "StoreModalReviewQuery",
487
484
  "operationKind": "query",
488
- "text": "query StoreModalReviewQuery {\n viewer {\n ...StripeProvider_viewer\n ...StoreModalReview_viewer\n currentOrder {\n ...StoreModalReview_order\n id\n }\n id\n }\n}\n\nfragment CartTotals_order on Order {\n subtotal {\n ...Price_price\n }\n discount {\n amount {\n amount\n ...Price_price\n }\n coupon {\n ...CouponText_coupon\n id\n }\n id\n }\n discountedSubtotal {\n ...Price_price\n }\n total {\n amount\n ...Price_price\n }\n taxes {\n ...Price_price\n }\n taxName\n gstIncluded\n}\n\nfragment CouponText_coupon on Coupon {\n type\n percentAmount\n creditAmountRemaining {\n amount\n currency\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalDownload_order on Order {\n id\n archiveUrl\n}\n\nfragment StoreModalReviewIdentity_identity on Identity {\n email\n phoneFormatted\n addressFormatted\n vatNumber\n}\n\nfragment StoreModalReview_order on Order {\n ...CartTotals_order\n ...StoreModalDownload_order\n customer {\n email\n name\n id\n }\n billingIdentity {\n name\n email\n phone\n street\n locality\n administrativeArea\n country\n zip\n ...StoreModalReviewIdentity_identity\n }\n licenseeIdentity {\n ...StoreModalReviewIdentity_identity\n }\n licenseeIsBillingIdentity\n stripePaymentMethod {\n card {\n last4\n brandFormatted\n }\n }\n orderItems {\n id\n description\n sku {\n ...SKUPrice_sku\n id\n }\n }\n canCompleteWithCoupon\n completedWithCoupon\n stripePaymentIntent {\n status\n clientSecret\n }\n completeUrl\n total {\n amount\n }\n}\n\nfragment StoreModalReview_viewer on Viewer {\n settings {\n eulaAgreementLabel(format: HTML)\n }\n}\n\nfragment StripeProvider_viewer on Viewer {\n settings {\n uiFontUrl\n uiFontName\n }\n themeConfig {\n customProperties\n }\n stripeCredentials {\n stripePublishableKey\n }\n currentOrder {\n stripePaymentIntent {\n clientSecret\n }\n id\n }\n}\n"
485
+ "text": "query StoreModalReviewQuery {\n viewer {\n ...StripeProvider_viewer\n ...StoreModalReview_viewer\n currentOrder {\n ...StoreModalReview_order\n id\n }\n id\n }\n}\n\nfragment CartTotals_order on Order {\n subtotal {\n ...Price_price\n }\n discount {\n amount {\n amount\n ...Price_price\n }\n coupon {\n ...CouponText_coupon\n id\n }\n id\n }\n discountedSubtotal {\n ...Price_price\n }\n total {\n amount\n ...Price_price\n }\n taxes {\n ...Price_price\n }\n taxName\n gstIncluded\n}\n\nfragment CouponText_coupon on Coupon {\n type\n percentAmount\n creditAmountRemaining {\n amount\n currency\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalDownload_order on Order {\n id\n archiveUrl\n}\n\nfragment StoreModalReviewIdentity_identity on Identity {\n email\n phoneFormatted\n addressFormatted\n vatNumber\n}\n\nfragment StoreModalReview_order on Order {\n ...CartTotals_order\n ...StoreModalDownload_order\n customer {\n email\n name\n id\n }\n billingIdentity {\n name\n email\n phone\n street\n locality\n administrativeArea\n country\n zip\n ...StoreModalReviewIdentity_identity\n }\n licenseeIdentity {\n ...StoreModalReviewIdentity_identity\n }\n licenseeIsBillingIdentity\n stripePaymentMethod {\n card {\n last4\n brandFormatted\n }\n }\n orderItems {\n id\n description\n sku {\n ...SKUPrice_sku\n id\n }\n }\n canCompleteWithCoupon\n completedWithCoupon\n stripePaymentIntent {\n status\n clientSecret\n }\n completeUrl\n total {\n amount\n }\n}\n\nfragment StoreModalReview_viewer on Viewer {\n settings {\n eulaAgreementLabel(format: HTML)\n }\n}\n\nfragment StripeProvider_viewer on Viewer {\n settings {\n uiFontUrl\n uiFontName\n }\n themeConfig {\n customProperties\n }\n stripeAccountId\n stripePublishableKey\n currentOrder {\n stripePaymentIntent {\n clientSecret\n }\n id\n }\n}\n"
489
486
  }
490
487
  };
491
488
  }();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<6a4188456e942de7b187554c0a988252>>
2
+ * @generated SignedSource<<e04bad486e150e1c189dfb5679ad70f5>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -15,9 +15,8 @@ export type StripeProvider_viewer$data = {
15
15
  readonly uiFontName: string | null;
16
16
  readonly uiFontUrl: string | null;
17
17
  } | null;
18
- readonly stripeCredentials: {
19
- readonly stripePublishableKey: string;
20
- } | null;
18
+ readonly stripeAccountId: string | null;
19
+ readonly stripePublishableKey: string | null;
21
20
  readonly themeConfig: {
22
21
  readonly customProperties: ReadonlyArray<string> | null;
23
22
  } | null;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<6a4188456e942de7b187554c0a988252>>
8
+ * @generated SignedSource<<e04bad486e150e1c189dfb5679ad70f5>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -58,17 +58,14 @@ const node = {
58
58
  }, {
59
59
  "alias": null,
60
60
  "args": null,
61
- "concreteType": "StripeCredentials",
62
- "kind": "LinkedField",
63
- "name": "stripeCredentials",
64
- "plural": false,
65
- "selections": [{
66
- "alias": null,
67
- "args": null,
68
- "kind": "ScalarField",
69
- "name": "stripePublishableKey",
70
- "storageKey": null
71
- }],
61
+ "kind": "ScalarField",
62
+ "name": "stripeAccountId",
63
+ "storageKey": null
64
+ }, {
65
+ "alias": null,
66
+ "args": null,
67
+ "kind": "ScalarField",
68
+ "name": "stripePublishableKey",
72
69
  "storageKey": null
73
70
  }, {
74
71
  "alias": null,
@@ -98,6 +95,6 @@ const node = {
98
95
  "type": "Viewer",
99
96
  "abstractKey": null
100
97
  };
101
- node.hash = "94dbdb1714785c862861adc46d6db0d7";
98
+ node.hash = "efff082269b64afc7019b4d725285afa";
102
99
  var _default = node;
103
100
  exports.default = _default;
@@ -23,7 +23,7 @@ const StoreModalProduct = _ref => {
23
23
  prepared
24
24
  } = _ref;
25
25
  const config = (0, _react.useContext)(_ConfigContext.default);
26
- const data = (0, _reactRelay.usePreloadedQuery)(_StoreModalProductQuery !== void 0 ? _StoreModalProductQuery : (_StoreModalProductQuery = require("../../__generated__/StoreModalProductQuery.graphql"), _StoreModalProductQuery.hash && _StoreModalProductQuery.hash !== "491d7c1daa28742d375049de66b6c386" && console.error("The definition of 'StoreModalProductQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductQuery), prepared.productQuery);
26
+ const data = (0, _reactRelay.usePreloadedQuery)(_StoreModalProductQuery !== void 0 ? _StoreModalProductQuery : (_StoreModalProductQuery = require("../../__generated__/StoreModalProductQuery.graphql"), _StoreModalProductQuery.hash && _StoreModalProductQuery.hash !== "a56c2c63a760bf157f6456dcc5a59dad" && console.error("The definition of 'StoreModalProductQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductQuery), prepared.productQuery);
27
27
  const {
28
28
  collection,
29
29
  viewer
@@ -65,7 +65,7 @@ const StoreModalProduct = _ref => {
65
65
  })), licensesPosition === 'bottom' && /*#__PURE__*/_react.default.createElement(_StoreModalProductLicenseSelection.default, {
66
66
  viewer: viewer
67
67
  })),
68
- stickyFooter: viewer.stripeCredentials ? /*#__PURE__*/_react.default.createElement(_StoreModalProductSummary.default, {
68
+ stickyFooter: viewer.stripeAccountId ? /*#__PURE__*/_react.default.createElement(_StoreModalProductSummary.default, {
69
69
  viewer: viewer
70
70
  }) : /*#__PURE__*/_react.default.createElement("div", null, "Please", ' ', /*#__PURE__*/_react.default.createElement("a", {
71
71
  href: `${viewer.endpoint}/admin/settings/payments`,
@@ -121,7 +121,7 @@ const StoreModalReview = _ref => {
121
121
  city: billingIdentity.locality ?? '',
122
122
  state: billingIdentity.administrativeArea ?? '',
123
123
  country: billingIdentity.country,
124
- postal_code: billingIdentity.zip ?? undefined
124
+ postal_code: billingIdentity.zip ?? ''
125
125
  }
126
126
  }
127
127
  }
@@ -13,15 +13,18 @@ var _StripeProvider_viewer;
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
  const StripeProvider = _ref => {
16
- var _data$stripeCredentia, _data$settings, _data$currentOrder, _data$currentOrder$st, _data$settings2, _data$themeConfig;
16
+ var _data$settings, _data$currentOrder, _data$currentOrder$st, _data$settings2, _data$themeConfig;
17
17
  let {
18
18
  viewer,
19
19
  children,
20
20
  requireClientSecret = true
21
21
  } = _ref;
22
- const data = (0, _reactRelay.useFragment)(_StripeProvider_viewer !== void 0 ? _StripeProvider_viewer : (_StripeProvider_viewer = require("../../__generated__/StripeProvider_viewer.graphql"), _StripeProvider_viewer.hash && _StripeProvider_viewer.hash !== "94dbdb1714785c862861adc46d6db0d7" && console.error("The definition of 'StripeProvider_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StripeProvider_viewer), viewer);
23
- const stripeKey = (_data$stripeCredentia = data.stripeCredentials) === null || _data$stripeCredentia === void 0 ? void 0 : _data$stripeCredentia.stripePublishableKey;
24
- const stripePromiseRef = (0, _react.useRef)(stripeKey ? (0, _stripeJs.loadStripe)(stripeKey) : null);
22
+ const data = (0, _reactRelay.useFragment)(_StripeProvider_viewer !== void 0 ? _StripeProvider_viewer : (_StripeProvider_viewer = require("../../__generated__/StripeProvider_viewer.graphql"), _StripeProvider_viewer.hash && _StripeProvider_viewer.hash !== "efff082269b64afc7019b4d725285afa" && console.error("The definition of 'StripeProvider_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StripeProvider_viewer), viewer);
23
+ const stripeKey = data.stripePublishableKey;
24
+ const stripeAccount = data.stripeAccountId;
25
+ const stripePromiseRef = (0, _react.useRef)(stripeKey && stripeAccount ? (0, _stripeJs.loadStripe)(stripeKey, {
26
+ stripeAccount
27
+ }) : null);
25
28
  const cssSrc = (_data$settings = data.settings) === null || _data$settings === void 0 ? void 0 : _data$settings.uiFontUrl;
26
29
  const clientSecret = ((_data$currentOrder = data.currentOrder) === null || _data$currentOrder === void 0 ? void 0 : (_data$currentOrder$st = _data$currentOrder.stripePaymentIntent) === null || _data$currentOrder$st === void 0 ? void 0 : _data$currentOrder$st.clientSecret) ?? undefined;
27
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fontdue-js",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "scripts": {
5
5
  "build": "npm run relay && run-p build-js build-css build-ts-declarations",
6
6
  "build-js": "babel src --out-dir dist --extensions .ts,.tsx,.js,.jsx",