fontdue-js 2.22.4 → 3.0.0-alpha1
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/.babelrc.cjs +72 -0
- package/dist/__generated__/AddToCartBannerQuery.graphql.js +1 -8
- package/dist/__generated__/AddToCartBanner_item.graphql.js +1 -8
- package/dist/__generated__/AddToCartBanner_order.graphql.js +1 -8
- package/dist/__generated__/AddressFieldsRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/AddressFields_viewer.graphql.js +3 -11
- package/dist/__generated__/BuyButtonIDQuery.graphql.js +1 -8
- package/dist/__generated__/BuyButtonSlugQuery.graphql.js +1 -8
- package/dist/__generated__/BuyButton_collection.graphql.js +1 -8
- package/dist/__generated__/CartButtonQuery.graphql.js +1 -8
- package/dist/__generated__/CartButton_order.graphql.js +1 -8
- package/dist/__generated__/CartItemAdditionalLicenses_licenses.graphql.js +1 -8
- package/dist/__generated__/CartItemAdditionalLicenses_orderItem.graphql.js +1 -8
- package/dist/__generated__/CartItemLicense_selection.graphql.js +1 -8
- package/dist/__generated__/CartItemProduct_product.graphql.js +1 -8
- package/dist/__generated__/CartItemVariable_selection.graphql.js +1 -8
- package/dist/__generated__/CartItemVariable_variable.graphql.js +1 -8
- package/dist/__generated__/CartItem_node.graphql.js +1 -8
- package/dist/__generated__/CartOrderCompleteOrderMutation.graphql.js +1 -8
- package/dist/__generated__/CartOrderRemoveDiscountMutation.graphql.js +1 -8
- package/dist/__generated__/CartOrderUpdateMutation.graphql.js +1 -8
- package/dist/__generated__/CartOrder_UpdateErrors.graphql.js +1 -8
- package/dist/__generated__/CartOrder_order.graphql.js +1 -8
- package/dist/__generated__/CartOrder_viewer.graphql.js +1 -8
- package/dist/__generated__/CartQuery.graphql.js +1 -8
- package/dist/__generated__/CartStateRemoveDiscountMutation.graphql.js +1 -8
- package/dist/__generated__/CartStateUpdateMutation.graphql.js +1 -8
- package/dist/__generated__/CartState_order.graphql.js +1 -8
- package/dist/__generated__/CartTotals_order.graphql.js +1 -8
- package/dist/__generated__/CharacterViewerIDQuery.graphql.js +1 -8
- package/dist/__generated__/CharacterViewerSlugQuery.graphql.js +1 -8
- package/dist/__generated__/CharacterViewerStyleRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/CharacterViewer_collection.graphql.js +1 -8
- package/dist/__generated__/CharacterViewer_family.graphql.js +1 -8
- package/dist/__generated__/CharacterViewer_style.graphql.js +3 -11
- package/dist/__generated__/CheckoutUpdateCustomerMutation.graphql.js +1 -8
- package/dist/__generated__/CheckoutUpdateOrderMutation.graphql.js +1 -8
- package/dist/__generated__/Checkout_UpdateOrderErrors.graphql.js +1 -8
- package/dist/__generated__/Checkout_identity.graphql.js +1 -8
- package/dist/__generated__/Checkout_order.graphql.js +1 -8
- package/dist/__generated__/Checkout_viewer.graphql.js +1 -8
- package/dist/__generated__/CollectionAa_Query.graphql.js +1 -8
- package/dist/__generated__/CollectionAa_product.graphql.js +1 -8
- package/dist/__generated__/CouponCodeInputApplyCouponMutation.graphql.js +1 -8
- package/dist/__generated__/CouponText_coupon.graphql.js +1 -8
- package/dist/__generated__/CustomerLoginFormLoginMutation.graphql.js +1 -8
- package/dist/__generated__/CustomerLoginFormQuery.graphql.js +1 -8
- package/dist/__generated__/DownloadRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/Download_order.graphql.js +1 -8
- package/dist/__generated__/FamilyList_node.graphql.js +1 -8
- package/dist/__generated__/Family_node.graphql.js +1 -8
- package/dist/__generated__/FontFamiliesQuery.graphql.js +1 -8
- package/dist/__generated__/FontStyle_fontStyle.graphql.js +1 -8
- package/dist/__generated__/IdentityBox_identity.graphql.js +1 -8
- package/dist/__generated__/License_node.graphql.js +1 -8
- package/dist/__generated__/NewsletterSignupQuery.graphql.js +1 -8
- package/dist/__generated__/NewsletterSignupUpdateCustomerMutation.graphql.js +1 -8
- package/dist/__generated__/NodePasswordFormAccessNodeMutation.graphql.js +1 -8
- package/dist/__generated__/NodePasswordFormIDQuery.graphql.js +1 -8
- package/dist/__generated__/NodePasswordFormSlugQuery.graphql.js +1 -8
- package/dist/__generated__/OrderVariableSelectionReduxRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/OrderVariableSelectionRedux_viewer.graphql.js +3 -11
- package/dist/__generated__/OrderVariableSelection_variables.graphql.js +1 -8
- package/dist/__generated__/PrecartAddToCartMutation.graphql.js +1 -8
- package/dist/__generated__/PrecartClearCartMutation.graphql.js +1 -8
- package/dist/__generated__/PrecartQuery.graphql.js +1 -8
- package/dist/__generated__/Precart_collection.graphql.js +1 -8
- package/dist/__generated__/Precart_license.graphql.js +1 -8
- package/dist/__generated__/Precart_viewer.graphql.js +1 -8
- package/dist/__generated__/PriceBarSectionRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/PriceBarSection_node.graphql.js +3 -11
- package/dist/__generated__/PriceBar_node.graphql.js +1 -8
- package/dist/__generated__/Price_price.graphql.js +1 -8
- package/dist/__generated__/SKUPrice_sku.graphql.js +1 -8
- package/dist/__generated__/SelectButton_sku.graphql.js +1 -8
- package/dist/__generated__/ServerConfigProviderQuery.graphql.js +1 -8
- package/dist/__generated__/ShareCartCreateSnapshotMutation.graphql.js +1 -8
- package/dist/__generated__/SpecimenLinkQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalBundleButton_bundle.graphql.js +1 -8
- package/dist/__generated__/StoreModalCartQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalCheckoutQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalContainerQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalDownloadRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalDownload_order.graphql.js +1 -8
- package/dist/__generated__/StoreModalFamilyButton_collection.graphql.js +1 -8
- package/dist/__generated__/StoreModalFamily_collection.graphql.js +1 -8
- package/dist/__generated__/StoreModalIndexItem_fontCollection.graphql.js +1 -8
- package/dist/__generated__/StoreModalIndexQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalOrderVariableSelection_order.graphql.js +1 -8
- package/dist/__generated__/StoreModalOrderVariableSelection_viewer.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductContent_collection.graphql.js +3 -11
- package/dist/__generated__/StoreModalProductLicenseSelection_collection.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductLicense_license.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductSummaryAddToCartMutation.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductSummaryClearCartMutation.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductSummaryRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/StoreModalProductSummary_viewer.graphql.js +3 -11
- package/dist/__generated__/StoreModalReviewIdentity_identity.graphql.js +1 -8
- package/dist/__generated__/StoreModalStyleButton_fontStyle.graphql.js +1 -8
- package/dist/__generated__/StoreModalUnifiedCheckoutCompleteOrderMutation.graphql.js +1 -8
- package/dist/__generated__/StoreModalUnifiedCheckoutUpdateCustomerMutation.graphql.js +1 -8
- package/dist/__generated__/StoreModalUnifiedCheckoutUpdateOrderMutation.graphql.js +1 -8
- package/dist/__generated__/StoreModalUnifiedCheckout_order.graphql.js +1 -8
- package/dist/__generated__/StoreModalUnifiedCheckout_viewer.graphql.js +1 -8
- package/dist/__generated__/StripeProviderCreateCheckoutSessionMutation.graphql.js +1 -8
- package/dist/__generated__/StripeProvider_viewer.graphql.js +1 -8
- package/dist/__generated__/TestFontsFormUpdateCustomerMutation.graphql.js +1 -8
- package/dist/__generated__/TestFontsForm_Query.graphql.js +1 -8
- package/dist/__generated__/TestModeBannerQuery.graphql.js +1 -8
- package/dist/__generated__/ThemeConfigQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTesterFeaturesButton_fontStyle.graphql.js +1 -8
- package/dist/__generated__/TypeTesterFeatures_fontStyle.graphql.js +1 -8
- package/dist/__generated__/TypeTesterFloatingToolbar_testers.graphql.js +1 -8
- package/dist/__generated__/TypeTesterStandaloneChangedStylesQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTesterStandaloneQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTesterStyleSelectData_fontStyle.graphql.js +1 -8
- package/dist/__generated__/TypeTesterStyleSelectData_fontStyleData.graphql.js +1 -8
- package/dist/__generated__/TypeTesterStyleSelectData_viewer.graphql.js +1 -8
- package/dist/__generated__/TypeTesterToolbar_fontStyle.graphql.js +1 -8
- package/dist/__generated__/TypeTesterVariableAxes_fontStyle.graphql.js +1 -8
- package/dist/__generated__/TypeTester_fontStyle.graphql.js +1 -8
- package/dist/__generated__/TypeTester_viewer.graphql.js +1 -8
- package/dist/__generated__/TypeTestersChangedStylesQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTestersIDQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTestersRefetchQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTestersSlugQuery.graphql.js +1 -8
- package/dist/__generated__/TypeTesters_collection.graphql.js +3 -11
- package/dist/__generated__/TypeTesters_viewer.graphql.js +1 -8
- package/dist/__generated__/VariableTableAmounts_option.graphql.js +1 -8
- package/dist/__generated__/VariableTableAmounts_variable.graphql.js +1 -8
- package/dist/__generated__/productState_Query.graphql.js +1 -8
- package/dist/__generated__/productState_bundle.graphql.js +1 -8
- package/dist/__generated__/productState_collection.graphql.js +1 -8
- package/dist/__generated__/productState_collectionBundle.graphql.js +1 -8
- package/dist/__generated__/productState_node.graphql.js +1 -8
- package/dist/__generated__/productState_sku.graphql.js +1 -8
- package/dist/__generated__/useFeaturesData_fontStyle.graphql.js +1 -8
- package/dist/__generated__/useFontStyle_fontStyle.graphql.js +1 -8
- package/dist/__generated__/useTotalStyles_fontCollection.graphql.js +1 -8
- package/dist/__tests__/collectionBundleSelection.test.js +221 -222
- package/dist/components/AddToCartBanner/index.js +19 -29
- package/dist/components/BuyButton/index.d.ts +3 -3
- package/dist/components/BuyButton/index.js +36 -46
- package/dist/components/BuyButton/index.server.d.ts +1 -1
- package/dist/components/BuyButton/index.server.js +10 -17
- package/dist/components/BuyingOptions/index.js +4 -12
- package/dist/components/Cart/AddressFields.d.ts +2 -2
- package/dist/components/Cart/AddressFields.js +25 -35
- package/dist/components/Cart/CartItem/CartItemAdditionalLicenses.d.ts +2 -2
- package/dist/components/Cart/CartItem/CartItemAdditionalLicenses.js +9 -16
- package/dist/components/Cart/CartItem/CartItemLicense.d.ts +2 -2
- package/dist/components/Cart/CartItem/CartItemLicense.js +15 -24
- package/dist/components/Cart/CartItem/CartItemProduct.d.ts +1 -1
- package/dist/components/Cart/CartItem/CartItemProduct.js +16 -23
- package/dist/components/Cart/CartItem/CartItemVariable.d.ts +3 -3
- package/dist/components/Cart/CartItem/CartItemVariable.js +16 -23
- package/dist/components/Cart/CartItem/VariableTextInput.js +13 -21
- package/dist/components/Cart/CartItem/index.d.ts +2 -2
- package/dist/components/Cart/CartItem/index.js +18 -27
- package/dist/components/Cart/CartOrder.d.ts +2 -2
- package/dist/components/Cart/CartOrder.js +99 -110
- package/dist/components/Cart/CartState.d.ts +3 -3
- package/dist/components/Cart/CartState.js +18 -25
- package/dist/components/Cart/CartTotals.d.ts +1 -1
- package/dist/components/Cart/CartTotals.js +31 -38
- package/dist/components/Cart/Checkout.d.ts +3 -3
- package/dist/components/Cart/Checkout.js +109 -118
- package/dist/components/Cart/CheckoutSteps.js +1 -8
- package/dist/components/Cart/CouponCodeInput.js +22 -32
- package/dist/components/Cart/CustomerFields.d.ts +1 -1
- package/dist/components/Cart/CustomerFields.js +21 -31
- package/dist/components/Cart/Download.d.ts +1 -1
- package/dist/components/Cart/Download.js +17 -27
- package/dist/components/Cart/EmptyCart.js +15 -23
- package/dist/components/Cart/IdentityBox.d.ts +1 -1
- package/dist/components/Cart/IdentityBox.js +12 -19
- package/dist/components/Cart/ShareCart.js +24 -32
- package/dist/components/Cart/index.js +13 -21
- package/dist/components/Cart/injectRelayEnvironment.js +5 -13
- package/dist/components/Cart/types.d.ts +1 -1
- package/dist/components/Cart/types.js +1 -5
- package/dist/components/Cart/utils.js +2 -9
- package/dist/components/CartButton/index.d.ts +2 -2
- package/dist/components/CartButton/index.js +29 -38
- package/dist/components/CartButton/index.server.d.ts +1 -1
- package/dist/components/CartButton/index.server.js +7 -14
- package/dist/components/CharacterViewer/StyleSelect.d.ts +1 -1
- package/dist/components/CharacterViewer/StyleSelect.js +10 -17
- package/dist/components/CharacterViewer/index.d.ts +3 -3
- package/dist/components/CharacterViewer/index.js +79 -89
- package/dist/components/CharacterViewer/index.server.d.ts +1 -1
- package/dist/components/CharacterViewer/index.server.js +10 -17
- package/dist/components/Checkbox/index.js +9 -19
- package/dist/components/CollectionAa/index.d.ts +1 -1
- package/dist/components/CollectionAa/index.js +12 -21
- package/dist/components/ComponentsContext.d.ts +1 -1
- package/dist/components/ComponentsContext.js +4 -10
- package/dist/components/ConfigContext.d.ts +12 -12
- package/dist/components/ConfigContext.js +4 -11
- package/dist/components/ConsentBanner/consent.js +6 -17
- package/dist/components/ConsentBanner/index.js +19 -29
- package/dist/components/CookieNotification/index.js +19 -27
- package/dist/components/CorsErrorModal.js +13 -20
- package/dist/components/CouponText/index.d.ts +1 -1
- package/dist/components/CouponText/index.js +9 -18
- package/dist/components/CustomerLoginForm/index.js +23 -32
- package/dist/components/Family/FamilyList.d.ts +1 -1
- package/dist/components/Family/FamilyList.js +10 -17
- package/dist/components/Family/index.d.ts +1 -1
- package/dist/components/Family/index.js +37 -46
- package/dist/components/FontFamilies/index.js +18 -28
- package/dist/components/FontStyle/index.d.ts +1 -1
- package/dist/components/FontStyle/index.js +8 -15
- package/dist/components/FontdueProvider/FontdueProviderClientComponent.d.ts +6 -4
- package/dist/components/FontdueProvider/FontdueProviderClientComponent.js +48 -39
- package/dist/components/FontdueProvider/index.d.ts +2 -2
- package/dist/components/FontdueProvider/index.js +32 -15
- package/dist/components/FontdueProvider/index.server.d.ts +2 -2
- package/dist/components/FontdueProvider/index.server.js +24 -22
- package/dist/components/Icons/Align.js +13 -22
- package/dist/components/Icons/ArrowDownRight.js +5 -13
- package/dist/components/Icons/ArrowLeft.js +5 -13
- package/dist/components/Icons/ArrowRight.js +5 -13
- package/dist/components/Icons/CarrotDown.js +5 -13
- package/dist/components/Icons/CarrotUp.js +5 -13
- package/dist/components/Icons/Cart.js +7 -15
- package/dist/components/Icons/CartNew.js +7 -15
- package/dist/components/Icons/Check.js +5 -13
- package/dist/components/Icons/Checkbox.js +5 -13
- package/dist/components/Icons/CheckboxChecked.js +5 -13
- package/dist/components/Icons/CheckboxCrossed.js +6 -14
- package/dist/components/Icons/CircledCheck.js +6 -14
- package/dist/components/Icons/CircledInfo.js +6 -14
- package/dist/components/Icons/CircledMinus.js +6 -14
- package/dist/components/Icons/ColorPicker.js +5 -13
- package/dist/components/Icons/CreditCard.js +6 -14
- package/dist/components/Icons/DownArrow.js +5 -13
- package/dist/components/Icons/DownloadFonts.js +8 -16
- package/dist/components/Icons/FrowningFace.js +8 -16
- package/dist/components/Icons/License.js +5 -13
- package/dist/components/Icons/Receipt.js +8 -16
- package/dist/components/Icons/User.js +5 -13
- package/dist/components/Icons/X.js +5 -13
- package/dist/components/Icons/index.d.ts +23 -23
- package/dist/components/Icons/index.js +23 -167
- package/dist/components/NewsletterSignup/NewsletterSignupElement.d.ts +1 -1
- package/dist/components/NewsletterSignup/NewsletterSignupElement.js +4 -11
- package/dist/components/NewsletterSignup/index.d.ts +2 -2
- package/dist/components/NewsletterSignup/index.js +51 -60
- package/dist/components/NewsletterSignup/index.server.d.ts +1 -1
- package/dist/components/NewsletterSignup/index.server.js +7 -14
- package/dist/components/NodePasswordForm/index.js +25 -33
- package/dist/components/OrderVariableSelection/OrderVariableSelectionRedux.d.ts +1 -1
- package/dist/components/OrderVariableSelection/OrderVariableSelectionRedux.js +18 -27
- package/dist/components/OrderVariableSelection/index.d.ts +1 -1
- package/dist/components/OrderVariableSelection/index.js +28 -36
- package/dist/components/Precart/License.d.ts +1 -1
- package/dist/components/Precart/License.js +22 -30
- package/dist/components/Precart/index.js +64 -74
- package/dist/components/Price/index.d.ts +1 -1
- package/dist/components/Price/index.js +10 -20
- package/dist/components/PriceBar/PriceBarSection.d.ts +1 -1
- package/dist/components/PriceBar/PriceBarSection.js +23 -33
- package/dist/components/PriceBar/index.d.ts +1 -1
- package/dist/components/PriceBar/index.js +13 -23
- package/dist/components/Root/index.d.ts +1 -1
- package/dist/components/Root/index.js +41 -51
- package/dist/components/Root/productState.d.ts +1 -1
- package/dist/components/Root/productState.js +20 -29
- package/dist/components/SKUPrice/index.d.ts +2 -2
- package/dist/components/SKUPrice/index.js +12 -20
- package/dist/components/Select/index.js +9 -17
- package/dist/components/SelectButton/index.d.ts +2 -2
- package/dist/components/SelectButton/index.js +20 -29
- package/dist/components/ServerConfigProvider/index.d.ts +1 -1
- package/dist/components/ServerConfigProvider/index.js +9 -18
- package/dist/components/SpecimenLink/index.js +12 -20
- package/dist/components/StickyNav/index.js +16 -26
- package/dist/components/StoreModal/StoreModalBundleButton.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalBundleButton.js +16 -23
- package/dist/components/StoreModal/StoreModalCart.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalCart.js +29 -38
- package/dist/components/StoreModal/StoreModalCheckout.js +9 -17
- package/dist/components/StoreModal/StoreModalCheckoutContext.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalCheckoutContext.js +6 -12
- package/dist/components/StoreModal/StoreModalContainer.js +25 -35
- package/dist/components/StoreModal/StoreModalDownload.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalDownload.js +14 -24
- package/dist/components/StoreModal/StoreModalFamily.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalFamily.js +14 -23
- package/dist/components/StoreModal/StoreModalFamilyButton.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalFamilyButton.js +23 -30
- package/dist/components/StoreModal/StoreModalIndex.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalIndex.js +9 -17
- package/dist/components/StoreModal/StoreModalIndexItem.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalIndexItem.js +20 -30
- package/dist/components/StoreModal/StoreModalLicenseeIsBillingSelection.js +8 -17
- package/dist/components/StoreModal/StoreModalLoader.js +6 -15
- package/dist/components/StoreModal/StoreModalOrderVariableSelection.d.ts +3 -3
- package/dist/components/StoreModal/StoreModalOrderVariableSelection.js +12 -21
- package/dist/components/StoreModal/StoreModalProduct.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalProduct.js +51 -61
- package/dist/components/StoreModal/StoreModalReviewIdentity.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalReviewIdentity.js +6 -15
- package/dist/components/StoreModal/StoreModalRouter.js +12 -22
- package/dist/components/StoreModal/StoreModalStyleButton.d.ts +1 -1
- package/dist/components/StoreModal/StoreModalStyleButton.js +20 -27
- package/dist/components/StoreModal/index.js +10 -19
- package/dist/components/StoreModal/routes.d.ts +4 -4
- package/dist/components/StoreModal/routes.js +18 -26
- package/dist/components/StoreModal/types.js +1 -5
- package/dist/components/StoreModalProductLicenseSelection/LicenseElement.js +12 -22
- package/dist/components/StoreModalProductLicenseSelection/LicenseVariableElement.js +7 -15
- package/dist/components/StoreModalProductLicenseSelection/LicenseVariableRadioElement.js +9 -19
- package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.d.ts +1 -1
- package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +19 -28
- package/dist/components/StoreModalProductLicenseSelection/index.d.ts +1 -1
- package/dist/components/StoreModalProductLicenseSelection/index.js +10 -17
- package/dist/components/StoreModalProductSummary/index.d.ts +1 -1
- package/dist/components/StoreModalProductSummary/index.js +45 -55
- package/dist/components/StripeLogo.js +4 -11
- package/dist/components/StripeProvider/index.d.ts +1 -1
- package/dist/components/StripeProvider/index.js +19 -29
- package/dist/components/Switch/index.js +1 -7
- package/dist/components/TestFontsForm/TestFontsFormElement.js +4 -12
- package/dist/components/TestFontsForm/index.d.ts +2 -2
- package/dist/components/TestFontsForm/index.js +56 -65
- package/dist/components/TestFontsForm/index.server.d.ts +1 -1
- package/dist/components/TestFontsForm/index.server.js +7 -14
- package/dist/components/TestModeBanner/index.js +10 -16
- package/dist/components/TextField/index.js +9 -17
- package/dist/components/ThemeConfig/index.d.ts +2 -2
- package/dist/components/ThemeConfig/index.js +14 -20
- package/dist/components/ThemeConfig/index.server.js +7 -14
- package/dist/components/Tracking/index.js +11 -18
- package/dist/components/TypeTester/TypeTesterAlignButtons.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterAlignButtons.js +8 -16
- package/dist/components/TypeTester/TypeTesterBullet.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterBullet.js +4 -12
- package/dist/components/TypeTester/TypeTesterContent.d.ts +2 -2
- package/dist/components/TypeTester/TypeTesterContent.js +22 -21
- package/dist/components/TypeTester/TypeTesterContext.d.ts +2 -2
- package/dist/components/TypeTester/TypeTesterContext.js +10 -17
- package/dist/components/TypeTester/TypeTesterEditAll.js +10 -20
- package/dist/components/TypeTester/TypeTesterFeatures.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterFeatures.js +28 -37
- package/dist/components/TypeTester/TypeTesterFeaturesButton.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterFeaturesButton.js +20 -30
- package/dist/components/TypeTester/TypeTesterFitter.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterFitter.js +5 -13
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +19 -28
- package/dist/components/TypeTester/TypeTesterInput.js +12 -22
- package/dist/components/TypeTester/TypeTesterSlider.js +7 -16
- package/dist/components/TypeTester/TypeTesterStandalone.d.ts +3 -3
- package/dist/components/TypeTester/TypeTesterStandalone.js +31 -40
- package/dist/components/TypeTester/TypeTesterStandalone.preload.d.ts +3 -3
- package/dist/components/TypeTester/TypeTesterStandalone.preload.js +4 -4
- package/dist/components/TypeTester/TypeTesterStandalone.server.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterStandalone.server.js +7 -14
- package/dist/components/TypeTester/TypeTesterStandaloneElement.js +7 -16
- package/dist/components/TypeTester/TypeTesterState.d.ts +2 -2
- package/dist/components/TypeTester/TypeTesterState.js +6 -14
- package/dist/components/TypeTester/TypeTesterStyleSelect.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterStyleSelect.js +9 -17
- package/dist/components/TypeTester/TypeTesterStyleSelectData.d.ts +4 -4
- package/dist/components/TypeTester/TypeTesterStyleSelectData.js +21 -30
- package/dist/components/TypeTester/TypeTesterToolbar.d.ts +2 -2
- package/dist/components/TypeTester/TypeTesterToolbar.js +29 -39
- package/dist/components/TypeTester/TypeTesterVariableAxes.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterVariableAxes.js +16 -24
- package/dist/components/TypeTester/features.js +1 -8
- package/dist/components/TypeTester/index.d.ts +3 -3
- package/dist/components/TypeTester/index.js +45 -55
- package/dist/components/TypeTester/types.js +3 -11
- package/dist/components/TypeTester/useFeaturesData.d.ts +1 -1
- package/dist/components/TypeTester/useFeaturesData.js +7 -15
- package/dist/components/TypeTester/useTypeTesterStyler.d.ts +2 -2
- package/dist/components/TypeTester/useTypeTesterStyler.js +6 -13
- package/dist/components/TypeTesters/TypeTestersElement.js +4 -12
- package/dist/components/TypeTesters/index.d.ts +4 -4
- package/dist/components/TypeTesters/index.js +61 -70
- package/dist/components/TypeTesters/index.server.d.ts +1 -1
- package/dist/components/TypeTesters/index.server.js +10 -17
- package/dist/components/UrlContext.js +6 -12
- package/dist/components/VariableTableAmounts/index.d.ts +2 -2
- package/dist/components/VariableTableAmounts/index.js +9 -16
- package/dist/components/elements/Button/index.js +3 -11
- package/dist/components/elements/EmptyCart/index.js +9 -19
- package/dist/components/elements/StoreModalCartLayout/index.js +10 -18
- package/dist/components/elements/StoreModalContainer/StoreModalContainerContext.js +3 -9
- package/dist/components/elements/StoreModalContainer/index.js +17 -27
- package/dist/components/elements/StoreModalDownloadLayout/index.js +7 -15
- package/dist/components/elements/StoreModalFamily/index.js +8 -16
- package/dist/components/elements/StoreModalFamilyButton/index.d.ts +1 -1
- package/dist/components/elements/StoreModalFamilyButton/index.js +11 -20
- package/dist/components/elements/StoreModalIndexItem/index.js +9 -17
- package/dist/components/elements/StoreModalLicenseeIsBillingIdentityElement.js +16 -25
- package/dist/components/elements/StoreModalLoadingScreen/index.js +4 -12
- package/dist/components/elements/StoreModalPageContainer/index.js +5 -13
- package/dist/components/elements/StoreModalStyleButton/index.d.ts +1 -1
- package/dist/components/elements/StoreModalStyleButton/index.js +10 -18
- package/dist/components/elements/StoreModalUnifiedCheckout.d.ts +2 -2
- package/dist/components/elements/StoreModalUnifiedCheckout.js +107 -115
- package/dist/components/useConsent.js +4 -9
- package/dist/components/useFont.js +8 -15
- package/dist/components/useFontStyle.d.ts +1 -1
- package/dist/components/useFontStyle.js +12 -20
- package/dist/components/useInterval.js +5 -12
- package/dist/components/useTotalStyles.d.ts +1 -1
- package/dist/components/useTotalStyles.js +4 -12
- package/dist/corsError.js +4 -14
- package/dist/data/unicodeData.js +1 -1
- package/dist/fontLoader.js +2 -9
- package/dist/hooks/useAutofit.js +11 -19
- package/dist/hooks/useLicenseAndOrderVariables.d.ts +2 -2
- package/dist/hooks/useLicenseAndOrderVariables.js +7 -12
- package/dist/hooks/useRefetchOnLicenseChanges.d.ts +1 -1
- package/dist/hooks/useRefetchOnLicenseChanges.js +7 -13
- package/dist/hooks/useResizeObserver.d.ts +11 -0
- package/dist/hooks/useResizeObserver.js +23 -0
- package/dist/hooks.js +5 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/react-ranger.d.js +0 -1
- package/dist/react-ranger.js +17 -24
- package/dist/reducer.d.ts +5 -5
- package/dist/reducer.js +15 -36
- package/dist/relay/environment.d.ts +1 -0
- package/dist/relay/environment.js +58 -33
- package/dist/relay/loadSerializableQuery.d.ts +5 -1
- package/dist/relay/loadSerializableQuery.js +4 -8
- package/dist/relay/useSerializablePreloadedQuery.d.ts +3 -3
- package/dist/relay/useSerializablePreloadedQuery.js +26 -22
- package/dist/retryImport.js +1 -7
- package/dist/scripts/updateUnicodeData.js +0 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +14 -36
- package/dist/vanilla/FontStyle.js +3 -11
- package/dist/vanilla/TruncatedMarkdown.js +2 -9
- package/dist/vite.d.ts +1 -0
- package/dist/vite.js +74 -0
- package/package.json +7 -4
- package/scripts/addJsExtensionsBabelPlugin.cjs +62 -0
- package/types/globals.d.ts +3 -0
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.default = StoreModalProductLicenseSelection;
|
|
7
|
-
var _StoreModalProductLicenseSelection_collection2 = _interopRequireDefault(require("../../__generated__/StoreModalProductLicenseSelection_collection.graphql"));
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactRelay = require("react-relay");
|
|
10
|
-
var _StoreModalProductLicense = _interopRequireDefault(require("./StoreModalProductLicense"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
function StoreModalProductLicenseSelection(_ref) {
|
|
1
|
+
import _StoreModalProductLicenseSelection_collection from "../../__generated__/StoreModalProductLicenseSelection_collection.graphql.js";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { graphql, useFragment } from 'react-relay';
|
|
4
|
+
import StoreModalProductLicense from './StoreModalProductLicense.js';
|
|
5
|
+
export default function StoreModalProductLicenseSelection(_ref) {
|
|
13
6
|
var _collection$licenses;
|
|
14
7
|
let {
|
|
15
8
|
collection: collectionKey,
|
|
@@ -18,15 +11,15 @@ function StoreModalProductLicenseSelection(_ref) {
|
|
|
18
11
|
label
|
|
19
12
|
}
|
|
20
13
|
} = _ref;
|
|
21
|
-
const collection =
|
|
22
|
-
return /*#__PURE__*/
|
|
14
|
+
const collection = useFragment((_StoreModalProductLicenseSelection_collection.hash && _StoreModalProductLicenseSelection_collection.hash !== "2767ff3f8ddb4354051074bc3d0312e6" && console.error("The definition of 'StoreModalProductLicenseSelection_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductLicenseSelection_collection), collectionKey);
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
16
|
className: "store-modal__license-selection__container",
|
|
24
17
|
"data-disabled": disabled
|
|
25
|
-
}, /*#__PURE__*/
|
|
18
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
26
19
|
className: "store-modal__license-selection__title"
|
|
27
|
-
}, label), /*#__PURE__*/
|
|
20
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
28
21
|
className: "store-modal__license-selection__licenses"
|
|
29
|
-
}, collection === null || collection === void 0 ? void 0 : (_collection$licenses = collection.licenses) === null || _collection$licenses === void 0 ? void 0 : _collection$licenses.map(license => license && /*#__PURE__*/
|
|
22
|
+
}, collection === null || collection === void 0 ? void 0 : (_collection$licenses = collection.licenses) === null || _collection$licenses === void 0 ? void 0 : _collection$licenses.map(license => license && /*#__PURE__*/React.createElement(StoreModalProductLicense, {
|
|
30
23
|
key: license.id,
|
|
31
24
|
license: license
|
|
32
25
|
}))));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StoreModalProductSummary_viewer$key } from '../../__generated__/StoreModalProductSummary_viewer.graphql';
|
|
2
|
+
import { StoreModalProductSummary_viewer$key } from '../../__generated__/StoreModalProductSummary_viewer.graphql.js';
|
|
3
3
|
interface StoreModalProductSummaryProps {
|
|
4
4
|
viewer: StoreModalProductSummary_viewer$key;
|
|
5
5
|
}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _utils = require("../../utils");
|
|
17
|
-
var _useLicenseAndOrderVariables = require("../../hooks/useLicenseAndOrderVariables");
|
|
18
|
-
var _useRefetchOnLicenseChanges = require("../../hooks/useRefetchOnLicenseChanges");
|
|
19
|
-
var _ConfigContext = _interopRequireDefault(require("../ConfigContext"));
|
|
20
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
|
-
const addToCartMutation = (_StoreModalProductSummaryAddToCartMutation2.default.hash && _StoreModalProductSummaryAddToCartMutation2.default.hash !== "91ea762e3842af2919da3a4c710a48cc" && console.error("The definition of 'StoreModalProductSummaryAddToCartMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductSummaryAddToCartMutation2.default);
|
|
24
|
-
const clearCartMutation = (_StoreModalProductSummaryClearCartMutation2.default.hash && _StoreModalProductSummaryClearCartMutation2.default.hash !== "b5c37f74432030a297c1bcf2be63b6f7" && console.error("The definition of 'StoreModalProductSummaryClearCartMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductSummaryClearCartMutation2.default);
|
|
1
|
+
import _StoreModalProductSummary_viewer from "../../__generated__/StoreModalProductSummary_viewer.graphql.js";
|
|
2
|
+
import _StoreModalProductSummaryClearCartMutation from "../../__generated__/StoreModalProductSummaryClearCartMutation.graphql.js";
|
|
3
|
+
import _StoreModalProductSummaryAddToCartMutation from "../../__generated__/StoreModalProductSummaryAddToCartMutation.graphql.js";
|
|
4
|
+
import React, { useCallback, useState, useMemo, useContext } from 'react';
|
|
5
|
+
import { graphql, useRefetchableFragment, useMutation, useRelayEnvironment, commitMutation } from 'react-relay';
|
|
6
|
+
import { useSelector, useDispatch, shallowEqual } from 'react-redux';
|
|
7
|
+
import RelayPrice, { Price } from '../Price/index.js';
|
|
8
|
+
import Button from '../elements/Button/index.js';
|
|
9
|
+
import StoreModalProductSummaryRefetchQuery from '../../__generated__/StoreModalProductSummaryRefetchQuery.graphql.js';
|
|
10
|
+
import { pluralize } from '../../utils.js';
|
|
11
|
+
import { useLicenseAndOrderVariables } from '../../hooks/useLicenseAndOrderVariables.js';
|
|
12
|
+
import { useRefetchOnLicenseChanges } from '../../hooks/useRefetchOnLicenseChanges.js';
|
|
13
|
+
import ConfigContext from '../ConfigContext.js';
|
|
14
|
+
const addToCartMutation = (_StoreModalProductSummaryAddToCartMutation.hash && _StoreModalProductSummaryAddToCartMutation.hash !== "91ea762e3842af2919da3a4c710a48cc" && console.error("The definition of 'StoreModalProductSummaryAddToCartMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductSummaryAddToCartMutation);
|
|
15
|
+
const clearCartMutation = (_StoreModalProductSummaryClearCartMutation.hash && _StoreModalProductSummaryClearCartMutation.hash !== "b5c37f74432030a297c1bcf2be63b6f7" && console.error("The definition of 'StoreModalProductSummaryClearCartMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductSummaryClearCartMutation);
|
|
25
16
|
const countStyles = viewer => {
|
|
26
17
|
const {
|
|
27
18
|
precart
|
|
@@ -53,30 +44,30 @@ const StoreModalProductSummary = _ref => {
|
|
|
53
44
|
let {
|
|
54
45
|
viewer: viewerKey
|
|
55
46
|
} = _ref;
|
|
56
|
-
const dispatch =
|
|
57
|
-
const environment =
|
|
58
|
-
const selectedSkuIds =
|
|
47
|
+
const dispatch = useDispatch();
|
|
48
|
+
const environment = useRelayEnvironment();
|
|
49
|
+
const selectedSkuIds = useSelector(state => state.selectedSkuIds, shallowEqual);
|
|
59
50
|
const {
|
|
60
51
|
orderVariableSelections
|
|
61
|
-
} =
|
|
62
|
-
const licenseeIsBillingIdentity =
|
|
63
|
-
const licenseOptions =
|
|
64
|
-
const selectedSkuIdsArray =
|
|
65
|
-
const refetchVariables =
|
|
52
|
+
} = useLicenseAndOrderVariables();
|
|
53
|
+
const licenseeIsBillingIdentity = useSelector(state => state.licenseeIsBillingIdentity);
|
|
54
|
+
const licenseOptions = useSelector(state => state.licenseOptions, shallowEqual);
|
|
55
|
+
const selectedSkuIdsArray = useMemo(() => Object.keys(selectedSkuIds).filter(id => selectedSkuIds[id] === true), [selectedSkuIds]);
|
|
56
|
+
const refetchVariables = useMemo(() => ({
|
|
66
57
|
selectedSkuIds: selectedSkuIdsArray
|
|
67
58
|
}), [selectedSkuIdsArray]);
|
|
68
|
-
const [viewer, refetch] =
|
|
69
|
-
|
|
59
|
+
const [viewer, refetch] = useRefetchableFragment((_StoreModalProductSummary_viewer.hash && _StoreModalProductSummary_viewer.hash !== "81a5f120d76cbb84753d158a7ff38c19" && console.error("The definition of 'StoreModalProductSummary_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductSummary_viewer), viewerKey);
|
|
60
|
+
useRefetchOnLicenseChanges({
|
|
70
61
|
environment,
|
|
71
62
|
refetch,
|
|
72
|
-
query:
|
|
63
|
+
query: StoreModalProductSummaryRefetchQuery,
|
|
73
64
|
variables: refetchVariables
|
|
74
65
|
});
|
|
75
|
-
const [submitting, setSubmitting] =
|
|
76
|
-
const [error, setError] =
|
|
77
|
-
const [commitAddToCart] =
|
|
78
|
-
const clearCart =
|
|
79
|
-
|
|
66
|
+
const [submitting, setSubmitting] = useState(false);
|
|
67
|
+
const [error, setError] = useState(null);
|
|
68
|
+
const [commitAddToCart] = useMutation(addToCartMutation);
|
|
69
|
+
const clearCart = useCallback(() => {
|
|
70
|
+
commitMutation(environment, {
|
|
80
71
|
mutation: clearCartMutation,
|
|
81
72
|
variables: {
|
|
82
73
|
input: {
|
|
@@ -91,7 +82,7 @@ const StoreModalProductSummary = _ref => {
|
|
|
91
82
|
}
|
|
92
83
|
});
|
|
93
84
|
}, [environment]);
|
|
94
|
-
const handleAddToCart =
|
|
85
|
+
const handleAddToCart = useCallback(() => {
|
|
95
86
|
setSubmitting(true);
|
|
96
87
|
const variables = {
|
|
97
88
|
input: {
|
|
@@ -174,24 +165,24 @@ const StoreModalProductSummary = _ref => {
|
|
|
174
165
|
const validSelections = anySkusSelected && licenseOptions.length > 0 && !requiredOrderVariablesNotYetSelected && hasSelectionForLicenseeIsBillingIdentity;
|
|
175
166
|
const {
|
|
176
167
|
storeModal: config
|
|
177
|
-
} =
|
|
168
|
+
} = useContext(ConfigContext);
|
|
178
169
|
const licensesPosition = config.productLicensesPosition;
|
|
179
170
|
if (validSelections) {
|
|
180
171
|
if (viewer.precart.subtotal) {
|
|
181
|
-
message = /*#__PURE__*/
|
|
172
|
+
message = /*#__PURE__*/React.createElement("div", {
|
|
182
173
|
className: "store-modal__product-summary__selection-text"
|
|
183
|
-
},
|
|
174
|
+
}, pluralize(countStyles(viewer), 'font'), ' for ', viewer.precart.subtotal.amount < stylesPrice && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
184
175
|
className: "store-modal__product-summary__styles-price"
|
|
185
|
-
}, /*#__PURE__*/
|
|
176
|
+
}, /*#__PURE__*/React.createElement(Price, {
|
|
186
177
|
price: {
|
|
187
178
|
amount: stylesPrice,
|
|
188
179
|
currency: viewer.precart.subtotal.currency
|
|
189
180
|
}
|
|
190
|
-
})), ' '), /*#__PURE__*/
|
|
181
|
+
})), ' '), /*#__PURE__*/React.createElement(RelayPrice, {
|
|
191
182
|
price: viewer.precart.subtotal
|
|
192
183
|
}), taxLabel);
|
|
193
184
|
} else {
|
|
194
|
-
message = /*#__PURE__*/
|
|
185
|
+
message = /*#__PURE__*/React.createElement("span", {
|
|
195
186
|
className: "store-modal__product-summary__nothing-selected"
|
|
196
187
|
}, "Calculating price...");
|
|
197
188
|
}
|
|
@@ -202,25 +193,24 @@ const StoreModalProductSummary = _ref => {
|
|
|
202
193
|
if (requiredOrderVariablesNotYetSelected) validationMessage = `Please select a ${requiredOrderVariablesNotYetSelected.name.toLocaleLowerCase()}`;
|
|
203
194
|
if (!hasSelectionForLicenseeIsBillingIdentity) validationMessage = 'Please select the licensee';
|
|
204
195
|
if (!anySkusSelected && licensesPosition === 'bottom') validationMessage = 'Please select some fonts';
|
|
205
|
-
message = /*#__PURE__*/
|
|
196
|
+
message = /*#__PURE__*/React.createElement("span", {
|
|
206
197
|
className: "store-modal__product-summary__nothing-selected"
|
|
207
198
|
}, validationMessage);
|
|
208
199
|
}
|
|
209
|
-
return /*#__PURE__*/
|
|
200
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
210
201
|
className: "store-modal__product-summary__container"
|
|
211
|
-
}, /*#__PURE__*/
|
|
202
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
212
203
|
className: "store-modal__product-summary__row"
|
|
213
|
-
}, message, /*#__PURE__*/
|
|
204
|
+
}, message, /*#__PURE__*/React.createElement(Button, {
|
|
214
205
|
className: "store-modal__product-summary__add-to-cart-button",
|
|
215
206
|
onClick: handleAddToCart,
|
|
216
207
|
disabled: submitting || !validSelections
|
|
217
|
-
}, submitting ? 'Adding...' : 'Add to cart')), error && /*#__PURE__*/
|
|
208
|
+
}, submitting ? 'Adding...' : 'Add to cart')), error && /*#__PURE__*/React.createElement("div", {
|
|
218
209
|
className: "store-modal__product-summary__error"
|
|
219
|
-
}, error, ' ', /*#__PURE__*/
|
|
210
|
+
}, error, ' ', /*#__PURE__*/React.createElement("button", {
|
|
220
211
|
type: "button",
|
|
221
212
|
onClick: clearCart,
|
|
222
213
|
className: "store-modal__product-summary__error-button"
|
|
223
214
|
}, "Empty cart and try again")));
|
|
224
215
|
};
|
|
225
|
-
|
|
226
|
-
exports.default = _default;
|
|
216
|
+
export default StoreModalProductSummary;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = StripeLogo;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
function StripeLogo() {
|
|
10
|
-
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function StripeLogo() {
|
|
3
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
11
4
|
width: "33",
|
|
12
5
|
height: "15"
|
|
13
|
-
}, /*#__PURE__*/
|
|
6
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
7
|
fillRule: "evenodd",
|
|
15
8
|
d: "M32.956 7.925c0-2.313-1.12-4.138-3.261-4.138-2.15 0-3.451 1.825-3.451 4.12 0 2.719 1.535 4.092 3.74 4.092 1.075 0 1.888-.244 2.502-.587V9.605c-.614.307-1.319.497-2.213.497-.876 0-1.653-.307-1.753-1.373h4.418c0-.118.018-.588.018-.804m-4.463-.859c0-1.02.624-1.445 1.193-1.445.55 0 1.138.424 1.138 1.445h-2.33zm-5.737-3.279c-.885 0-1.454.415-1.77.704l-.118-.56H18.88v10.535l2.259-.48.009-2.556c.325.235.804.57 1.6.57 1.616 0 3.089-1.302 3.089-4.166-.01-2.62-1.5-4.047-3.08-4.047zm-.542 6.225c-.533 0-.85-.19-1.066-.425l-.009-3.352c.235-.262.56-.443 1.075-.443.822 0 1.391.922 1.391 2.105 0 1.211-.56 2.115-1.39 2.115zM18.04 2.766V.932l-2.268.479v1.843zM15.772 3.94h2.268v7.905h-2.268zm-2.43.669-.144-.669h-1.952v7.906h2.259V6.488c.533-.696 1.436-.57 1.716-.47V3.94c-.289-.108-1.346-.307-1.879.669M8.825 1.98l-2.205.47-.009 7.236c0 1.337 1.003 2.322 2.34 2.322.741 0 1.283-.135 1.581-.298V9.876c-.289.117-1.716.533-1.716-.804V5.865h1.716V3.94H8.816zM2.718 6.235c0-.352.289-.488.767-.488.687 0 1.554.208 2.241.578V4.202a6 6 0 0 0-2.24-.415c-1.835 0-3.054.957-3.054 2.557 0 2.493 3.433 2.096 3.433 3.17 0 .416-.361.552-.867.552-.75 0-1.708-.307-2.467-.723v2.15c.84.362 1.69.515 2.467.515 1.879 0 3.17-.93 3.17-2.548-.008-2.692-3.45-2.213-3.45-3.225"
|
|
16
9
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import { StripeProvider_viewer$key } from '../../__generated__/StripeProvider_viewer.graphql';
|
|
2
|
+
import { StripeProvider_viewer$key } from '../../__generated__/StripeProvider_viewer.graphql.js';
|
|
3
3
|
interface StripeProvider_props {
|
|
4
4
|
viewer: StripeProvider_viewer$key;
|
|
5
5
|
children: JSX.Element;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactRelay = require("react-relay");
|
|
11
|
-
var _reactStripeJs = require("@stripe/react-stripe-js");
|
|
12
|
-
var _stripeJs = require("@stripe/stripe-js");
|
|
13
|
-
var _utils = require("../../utils");
|
|
14
|
-
var _ConfigContext = _interopRequireDefault(require("../ConfigContext"));
|
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
|
+
import _StripeProviderCreateCheckoutSessionMutation from "../../__generated__/StripeProviderCreateCheckoutSessionMutation.graphql.js";
|
|
2
|
+
import _StripeProvider_viewer from "../../__generated__/StripeProvider_viewer.graphql.js";
|
|
3
|
+
import React, { useCallback, useContext, useRef } from 'react';
|
|
4
|
+
import { commitMutation, graphql, useFragment, useRelayEnvironment } from 'react-relay';
|
|
5
|
+
import { Elements, EmbeddedCheckoutProvider } from '@stripe/react-stripe-js';
|
|
6
|
+
import { loadStripe } from '@stripe/stripe-js';
|
|
7
|
+
import { parseCustomProperties } from '../../utils.js';
|
|
8
|
+
import ConfigContext from '../ConfigContext.js';
|
|
18
9
|
const StripeProvider = _ref => {
|
|
19
10
|
var _data$currentOrder, _data$settings, _data$settings$uiFont, _data$settings$uiFont2, _data$settings$uiFont3, _data$settings2, _data$currentOrder2, _data$currentOrder2$s, _data$themeConfig;
|
|
20
11
|
let {
|
|
@@ -22,19 +13,19 @@ const StripeProvider = _ref => {
|
|
|
22
13
|
providerType,
|
|
23
14
|
children
|
|
24
15
|
} = _ref;
|
|
25
|
-
const data =
|
|
16
|
+
const data = useFragment((_StripeProvider_viewer.hash && _StripeProvider_viewer.hash !== "96a569166948f6d2956bdf12dbd2820f" && 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);
|
|
26
17
|
const stripeKey = data.stripePublishableKey;
|
|
27
18
|
// Use order's stripeAccountId if available (handles case where tenant changed accounts mid-checkout)
|
|
28
19
|
const stripeAccount = ((_data$currentOrder = data.currentOrder) === null || _data$currentOrder === void 0 ? void 0 : _data$currentOrder.stripeAccountId) || data.stripeAccountId;
|
|
29
|
-
const stripePromiseRef =
|
|
20
|
+
const stripePromiseRef = useRef(stripeKey && stripeAccount ? loadStripe(stripeKey, {
|
|
30
21
|
stripeAccount
|
|
31
22
|
}) : null);
|
|
32
23
|
|
|
33
24
|
// All hooks must be called before any conditional returns (React rules of hooks)
|
|
34
|
-
const environment =
|
|
25
|
+
const environment = useRelayEnvironment();
|
|
35
26
|
const {
|
|
36
27
|
stripe: config
|
|
37
|
-
} =
|
|
28
|
+
} = useContext(ConfigContext);
|
|
38
29
|
let customFontSource;
|
|
39
30
|
const woffSrc = (_data$settings = data.settings) === null || _data$settings === void 0 ? void 0 : (_data$settings$uiFont = _data$settings.uiFontStyle) === null || _data$settings$uiFont === void 0 ? void 0 : (_data$settings$uiFont2 = _data$settings$uiFont.webfontSources) === null || _data$settings$uiFont2 === void 0 ? void 0 : (_data$settings$uiFont3 = _data$settings$uiFont2.find(source => (source === null || source === void 0 ? void 0 : source.format) === 'woff2')) === null || _data$settings$uiFont3 === void 0 ? void 0 : _data$settings$uiFont3.url;
|
|
40
31
|
let fontFamily = (_data$settings2 = data.settings) !== null && _data$settings2 !== void 0 && _data$settings2.uiFontStyle ? `${data.settings.uiFontStyle.cssFamily} ${data.settings.uiFontStyle.name}` : undefined;
|
|
@@ -53,11 +44,11 @@ const StripeProvider = _ref => {
|
|
|
53
44
|
};
|
|
54
45
|
}
|
|
55
46
|
const clientSecret = ((_data$currentOrder2 = data.currentOrder) === null || _data$currentOrder2 === void 0 ? void 0 : (_data$currentOrder2$s = _data$currentOrder2.stripePaymentIntent) === null || _data$currentOrder2$s === void 0 ? void 0 : _data$currentOrder2$s.clientSecret) ?? undefined;
|
|
56
|
-
const customProperties =
|
|
57
|
-
const fetchClientSecret =
|
|
47
|
+
const customProperties = parseCustomProperties((_data$themeConfig = data.themeConfig) === null || _data$themeConfig === void 0 ? void 0 : _data$themeConfig.customProperties);
|
|
48
|
+
const fetchClientSecret = useCallback(() => {
|
|
58
49
|
return new Promise((resolve, reject) => {
|
|
59
|
-
|
|
60
|
-
mutation: (
|
|
50
|
+
commitMutation(environment, {
|
|
51
|
+
mutation: (_StripeProviderCreateCheckoutSessionMutation.hash && _StripeProviderCreateCheckoutSessionMutation.hash !== "2ca9a7fcfed1292117e3cd6d0d95cca6" && console.error("The definition of 'StripeProviderCreateCheckoutSessionMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StripeProviderCreateCheckoutSessionMutation),
|
|
61
52
|
variables: {},
|
|
62
53
|
onCompleted: response => {
|
|
63
54
|
var _response$createOrder, _response$createOrder2, _response$createOrder3;
|
|
@@ -156,7 +147,7 @@ const StripeProvider = _ref => {
|
|
|
156
147
|
syncAddressCheckbox: 'none'
|
|
157
148
|
};
|
|
158
149
|
if (providerType === 'checkout') {
|
|
159
|
-
return /*#__PURE__*/
|
|
150
|
+
return /*#__PURE__*/React.createElement(EmbeddedCheckoutProvider, {
|
|
160
151
|
stripe: stripePromiseRef.current,
|
|
161
152
|
options: {
|
|
162
153
|
fetchClientSecret
|
|
@@ -164,12 +155,11 @@ const StripeProvider = _ref => {
|
|
|
164
155
|
}, children);
|
|
165
156
|
}
|
|
166
157
|
if (providerType === 'elements') {
|
|
167
|
-
return /*#__PURE__*/
|
|
158
|
+
return /*#__PURE__*/React.createElement(Elements, {
|
|
168
159
|
stripe: stripePromiseRef.current,
|
|
169
160
|
options: options
|
|
170
161
|
}, children);
|
|
171
162
|
}
|
|
172
163
|
return null;
|
|
173
164
|
};
|
|
174
|
-
|
|
175
|
-
exports.default = _default;
|
|
165
|
+
export default StripeProvider;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _ = _interopRequireDefault(require("."));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
11
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import TestFontsFormFetcher from './index.js';
|
|
4
|
+
const TestFontsFormElement = props => /*#__PURE__*/React.createElement(TestFontsFormFetcher, _extends({}, props, {
|
|
12
5
|
newsletterCheckboxChecked: props.newsletterCheckboxChecked === 'true' ? true : false
|
|
13
6
|
}));
|
|
14
|
-
|
|
15
|
-
exports.default = _default;
|
|
7
|
+
export default TestFontsFormElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TestFontsForm_Query } from '../../__generated__/TestFontsForm_Query.graphql';
|
|
3
|
-
import { SerializablePreloadedQuery } from '../../relay/loadSerializableQuery';
|
|
2
|
+
import { TestFontsForm_Query } from '../../__generated__/TestFontsForm_Query.graphql.js';
|
|
3
|
+
import { SerializablePreloadedQuery } from '../../relay/loadSerializableQuery.js';
|
|
4
4
|
export interface TestFontsForm_props {
|
|
5
5
|
agreementLabel?: string;
|
|
6
6
|
downloadLabel?: string;
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.TestFontsFormPreloadedQueryRenderer = TestFontsFormPreloadedQueryRenderer;
|
|
8
|
-
exports.default = TestFontsForm;
|
|
9
|
-
var _TestFontsForm_Query2 = _interopRequireDefault(require("../../__generated__/TestFontsForm_Query.graphql"));
|
|
10
|
-
var _TestFontsFormUpdateCustomerMutation2 = _interopRequireDefault(require("../../__generated__/TestFontsFormUpdateCustomerMutation.graphql"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _reactRelay = require("react-relay");
|
|
13
|
-
var _reactGoogleRecaptcha = _interopRequireDefault(require("react-google-recaptcha"));
|
|
14
|
-
var _TextField = _interopRequireDefault(require("../TextField"));
|
|
15
|
-
var _Icons = require("../Icons");
|
|
16
|
-
var _Checkbox = _interopRequireDefault(require("../Checkbox"));
|
|
17
|
-
var _useSerializablePreloadedQuery = _interopRequireDefault(require("../../relay/useSerializablePreloadedQuery"));
|
|
18
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
22
|
-
|
|
4
|
+
import _TestFontsForm_Query from "../../__generated__/TestFontsForm_Query.graphql.js";
|
|
5
|
+
import _TestFontsFormUpdateCustomerMutation from "../../__generated__/TestFontsFormUpdateCustomerMutation.graphql.js";
|
|
6
|
+
import React, { useState, useRef, useCallback } from 'react';
|
|
7
|
+
import { commitMutation, graphql, useRelayEnvironment, useLazyLoadQuery, usePreloadedQuery } from 'react-relay';
|
|
8
|
+
import { ReCAPTCHA } from 'react-google-recaptcha';
|
|
9
|
+
import TextField from '../TextField/index.js';
|
|
10
|
+
import { DownloadFonts } from '../Icons/index.js';
|
|
11
|
+
import Checkbox from '../Checkbox/index.js';
|
|
12
|
+
import useSerializablePreloadedQuery from '../../relay/useSerializablePreloadedQuery.js';
|
|
13
|
+
const updateCustomerMutation = (_TestFontsFormUpdateCustomerMutation.hash && _TestFontsFormUpdateCustomerMutation.hash !== "ba56958399f0893bd667ff02c33a6975" && console.error("The definition of 'TestFontsFormUpdateCustomerMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TestFontsFormUpdateCustomerMutation);
|
|
23
14
|
const TestFontsDownloading = _ref => {
|
|
24
15
|
let {
|
|
25
16
|
archiveUrl
|
|
26
17
|
} = _ref;
|
|
27
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
19
|
className: "test-fonts__downloading"
|
|
29
|
-
}, /*#__PURE__*/
|
|
20
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
21
|
className: "test-fonts__downloading__icon"
|
|
31
|
-
}, /*#__PURE__*/
|
|
22
|
+
}, /*#__PURE__*/React.createElement(DownloadFonts, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "The download will start automatically."), /*#__PURE__*/React.createElement("p", null, "If it didn\u2019t start, click ", /*#__PURE__*/React.createElement("a", {
|
|
32
23
|
href: archiveUrl
|
|
33
24
|
}, "here"), ".")));
|
|
34
25
|
};
|
|
@@ -40,27 +31,27 @@ const TestFontsFormComponent = _ref2 => {
|
|
|
40
31
|
downloadLabel = 'Download test fonts',
|
|
41
32
|
newsletterCheckboxChecked = false
|
|
42
33
|
} = _ref2;
|
|
43
|
-
const [email, setEmail] =
|
|
44
|
-
const [name, setName] =
|
|
45
|
-
const [newsletterOptIn, setNewsletterOptIn] =
|
|
46
|
-
const [error, setError] =
|
|
47
|
-
const [eulaAgreed, setEulaAgreed] =
|
|
48
|
-
const [eulaFail, setEulaFail] =
|
|
49
|
-
const [submitting, setSubmitting] =
|
|
50
|
-
const [submitted, setSubmitted] =
|
|
51
|
-
const [recaptchaToken, setRecaptchaToken] =
|
|
52
|
-
const [pendingSubmit, setPendingSubmit] =
|
|
53
|
-
const downloadForm =
|
|
54
|
-
const recaptchaRef =
|
|
55
|
-
const environment =
|
|
34
|
+
const [email, setEmail] = useState('');
|
|
35
|
+
const [name, setName] = useState('');
|
|
36
|
+
const [newsletterOptIn, setNewsletterOptIn] = useState(newsletterCheckboxChecked);
|
|
37
|
+
const [error, setError] = useState(null);
|
|
38
|
+
const [eulaAgreed, setEulaAgreed] = useState(false);
|
|
39
|
+
const [eulaFail, setEulaFail] = useState(false);
|
|
40
|
+
const [submitting, setSubmitting] = useState(false);
|
|
41
|
+
const [submitted, setSubmitted] = useState(false);
|
|
42
|
+
const [recaptchaToken, setRecaptchaToken] = useState(null);
|
|
43
|
+
const [pendingSubmit, setPendingSubmit] = useState(false);
|
|
44
|
+
const downloadForm = useRef(null);
|
|
45
|
+
const recaptchaRef = useRef(null);
|
|
46
|
+
const environment = useRelayEnvironment();
|
|
56
47
|
if (!data.viewer) return null;
|
|
57
48
|
const recaptchaEnabled = ((_data$viewer$settings = data.viewer.settings) === null || _data$viewer$settings === void 0 ? void 0 : _data$viewer$settings.recaptchaEnabled) ?? false;
|
|
58
49
|
const recaptchaSiteKey = (_data$viewer$settings2 = data.viewer.settings) === null || _data$viewer$settings2 === void 0 ? void 0 : _data$viewer$settings2.recaptchaSiteKey;
|
|
59
|
-
const submitForm =
|
|
50
|
+
const submitForm = useCallback(token => {
|
|
60
51
|
setSubmitting(true);
|
|
61
52
|
setPendingSubmit(false);
|
|
62
53
|
setError(null);
|
|
63
|
-
|
|
54
|
+
commitMutation(environment, {
|
|
64
55
|
mutation: updateCustomerMutation,
|
|
65
56
|
variables: {
|
|
66
57
|
input: {
|
|
@@ -99,14 +90,14 @@ const TestFontsFormComponent = _ref2 => {
|
|
|
99
90
|
}
|
|
100
91
|
});
|
|
101
92
|
}, [environment, name, email, newsletterOptIn]);
|
|
102
|
-
const handleRecaptchaChange =
|
|
93
|
+
const handleRecaptchaChange = useCallback(token => {
|
|
103
94
|
setRecaptchaToken(token);
|
|
104
95
|
// If we were waiting for a token to submit, do it now
|
|
105
96
|
if (token && pendingSubmit) {
|
|
106
97
|
submitForm(token);
|
|
107
98
|
}
|
|
108
99
|
}, [pendingSubmit, submitForm]);
|
|
109
|
-
const handleRecaptchaExpired =
|
|
100
|
+
const handleRecaptchaExpired = useCallback(() => {
|
|
110
101
|
setRecaptchaToken(null);
|
|
111
102
|
}, []);
|
|
112
103
|
const handleSubmit = e => {
|
|
@@ -133,87 +124,87 @@ const TestFontsFormComponent = _ref2 => {
|
|
|
133
124
|
const newsletterOptInLabel = settings === null || settings === void 0 ? void 0 : settings.newsletterOptInLabel;
|
|
134
125
|
const eulaAgreementLabel = settings === null || settings === void 0 ? void 0 : settings.eulaAgreementLabel;
|
|
135
126
|
const archiveUrl = (_data$viewer$testFont = data.viewer.testFonts) === null || _data$viewer$testFont === void 0 ? void 0 : _data$viewer$testFont.archiveUrl;
|
|
136
|
-
return /*#__PURE__*/
|
|
127
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
137
128
|
className: "test-fonts"
|
|
138
|
-
}, error && /*#__PURE__*/
|
|
129
|
+
}, error && /*#__PURE__*/React.createElement("div", {
|
|
139
130
|
className: "test-fonts__errors"
|
|
140
|
-
}, error), submitted ? /*#__PURE__*/
|
|
131
|
+
}, error), submitted ? /*#__PURE__*/React.createElement(TestFontsDownloading, {
|
|
141
132
|
archiveUrl: archiveUrl
|
|
142
|
-
}) : /*#__PURE__*/
|
|
133
|
+
}) : /*#__PURE__*/React.createElement("form", {
|
|
143
134
|
className: "test-fonts__form",
|
|
144
135
|
onSubmit: handleSubmit
|
|
145
|
-
}, /*#__PURE__*/
|
|
136
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
146
137
|
className: "test-fonts__section"
|
|
147
|
-
}, /*#__PURE__*/
|
|
138
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
148
139
|
label: "Name *",
|
|
149
140
|
value: name,
|
|
150
141
|
onChange: value => setName(value),
|
|
151
142
|
autocomplete: "name",
|
|
152
143
|
placeholder: "Your name"
|
|
153
|
-
})), /*#__PURE__*/
|
|
144
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
154
145
|
className: "test-fonts__section"
|
|
155
|
-
}, /*#__PURE__*/
|
|
146
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
156
147
|
label: "Email *",
|
|
157
148
|
type: "email",
|
|
158
149
|
value: email,
|
|
159
150
|
onChange: value => setEmail(value),
|
|
160
151
|
autocomplete: "email",
|
|
161
152
|
placeholder: "Your email"
|
|
162
|
-
})), /*#__PURE__*/
|
|
153
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
163
154
|
className: "test-fonts__agreement test-fonts__checkbox-field",
|
|
164
155
|
"data-highlighted": eulaFail && !eulaAgreed
|
|
165
|
-
}, /*#__PURE__*/
|
|
156
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
166
157
|
id: "test-fonts-eula-agreement",
|
|
167
158
|
checked: eulaAgreed,
|
|
168
159
|
onChange: event => setEulaAgreed(event.target.checked)
|
|
169
|
-
}), /*#__PURE__*/
|
|
160
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
170
161
|
htmlFor: "test-fonts-eula-agreement",
|
|
171
162
|
dangerouslySetInnerHTML: {
|
|
172
163
|
__html: (agreementLabel || eulaAgreementLabel) ?? ''
|
|
173
164
|
}
|
|
174
|
-
})), newsletterOptInLabel && /*#__PURE__*/
|
|
165
|
+
})), newsletterOptInLabel && /*#__PURE__*/React.createElement("div", {
|
|
175
166
|
className: "test-fonts__newsletter-opt-in test-fonts__checkbox-field"
|
|
176
|
-
}, /*#__PURE__*/
|
|
167
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
177
168
|
id: "newsletter-opt-in",
|
|
178
169
|
checked: newsletterOptIn,
|
|
179
170
|
onChange: event => setNewsletterOptIn(event.target.checked)
|
|
180
|
-
}), /*#__PURE__*/
|
|
171
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
181
172
|
htmlFor: "newsletter-opt-in",
|
|
182
173
|
dangerouslySetInnerHTML: {
|
|
183
174
|
__html: newsletterOptInLabel
|
|
184
175
|
}
|
|
185
|
-
})), recaptchaEnabled && recaptchaSiteKey && /*#__PURE__*/
|
|
176
|
+
})), recaptchaEnabled && recaptchaSiteKey && /*#__PURE__*/React.createElement(ReCAPTCHA, {
|
|
186
177
|
ref: recaptchaRef,
|
|
187
178
|
sitekey: recaptchaSiteKey,
|
|
188
179
|
size: "invisible",
|
|
189
180
|
onChange: handleRecaptchaChange,
|
|
190
181
|
onExpired: handleRecaptchaExpired
|
|
191
|
-
}), /*#__PURE__*/
|
|
182
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
192
183
|
className: "submit-button",
|
|
193
184
|
type: "submit",
|
|
194
185
|
disabled: submitting || pendingSubmit || disabled
|
|
195
|
-
}, submitting || pendingSubmit ? 'Submitting...' : downloadLabel, /*#__PURE__*/
|
|
186
|
+
}, submitting || pendingSubmit ? 'Submitting...' : downloadLabel, /*#__PURE__*/React.createElement("span", {
|
|
196
187
|
className: "submit-button__arrow"
|
|
197
|
-
}, " \u2192")))), /*#__PURE__*/
|
|
188
|
+
}, " \u2192")))), /*#__PURE__*/React.createElement("form", {
|
|
198
189
|
action: archiveUrl ?? undefined,
|
|
199
190
|
ref: downloadForm
|
|
200
191
|
}));
|
|
201
192
|
};
|
|
202
|
-
const query = (
|
|
203
|
-
function TestFontsFormPreloadedQueryRenderer(_ref4) {
|
|
193
|
+
const query = (_TestFontsForm_Query.hash && _TestFontsForm_Query.hash !== "cd43f0cacc4dcf01cf94fb1ff97197ca" && console.error("The definition of 'TestFontsForm_Query' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TestFontsForm_Query);
|
|
194
|
+
export function TestFontsFormPreloadedQueryRenderer(_ref4) {
|
|
204
195
|
let {
|
|
205
196
|
preloadedQuery,
|
|
206
197
|
...rest
|
|
207
198
|
} = _ref4;
|
|
208
|
-
const queryRef = (
|
|
209
|
-
const data =
|
|
210
|
-
return /*#__PURE__*/
|
|
199
|
+
const queryRef = useSerializablePreloadedQuery(preloadedQuery);
|
|
200
|
+
const data = usePreloadedQuery(query, queryRef);
|
|
201
|
+
return /*#__PURE__*/React.createElement(TestFontsFormComponent, _extends({
|
|
211
202
|
data: data
|
|
212
203
|
}, rest));
|
|
213
204
|
}
|
|
214
|
-
function TestFontsForm(props) {
|
|
215
|
-
const data =
|
|
216
|
-
return /*#__PURE__*/
|
|
205
|
+
export default function TestFontsForm(props) {
|
|
206
|
+
const data = useLazyLoadQuery(query, {});
|
|
207
|
+
return /*#__PURE__*/React.createElement(TestFontsFormComponent, _extends({
|
|
217
208
|
data: data
|
|
218
209
|
}, props));
|
|
219
210
|
}
|