@jetshop/template-trend 6.2.0-alpha.d01f0565 → 6.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/dist/src/client.js +6 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/components/Auth/ForgotPassword.js +30 -0
- package/dist/src/components/Auth/ForgotPassword.js.map +1 -0
- package/dist/src/components/Auth/ForgotPassword.loadable.js +7 -0
- package/dist/src/components/Auth/ForgotPassword.loadable.js.map +1 -0
- package/dist/src/components/Auth/LogInPage.js +69 -0
- package/dist/src/components/Auth/LogInPage.js.map +1 -0
- package/dist/src/components/Auth/LogInPage.loadable.js +7 -0
- package/dist/src/components/Auth/LogInPage.loadable.js.map +1 -0
- package/dist/src/components/Auth/ResetPassword.js +30 -0
- package/dist/src/components/Auth/ResetPassword.js.map +1 -0
- package/dist/src/components/Auth/ResetPassword.loadable.js +7 -0
- package/dist/src/components/Auth/ResetPassword.loadable.js.map +1 -0
- package/dist/src/components/Auth/Signup/Address.js +34 -0
- package/dist/src/components/Auth/Signup/Address.js.map +1 -0
- package/dist/src/components/Auth/Signup/CustomerType.js +30 -0
- package/dist/src/components/Auth/Signup/CustomerType.js.map +1 -0
- package/dist/src/components/Auth/Signup/LoginFields.js +31 -0
- package/dist/src/components/Auth/Signup/LoginFields.js.map +1 -0
- package/dist/src/components/Auth/Signup/PID.js +11 -0
- package/dist/src/components/Auth/Signup/PID.js.map +1 -0
- package/dist/src/components/Auth/Signup/SSN.js +29 -0
- package/dist/src/components/Auth/Signup/SSN.js.map +1 -0
- package/dist/src/components/Auth/Signup/SignUpPage.js +78 -0
- package/dist/src/components/Auth/Signup/SignUpPage.js.map +1 -0
- package/dist/src/components/Auth/Signup/SignUpPage.loadable.js +7 -0
- package/dist/src/components/Auth/Signup/SignUpPage.loadable.js.map +1 -0
- package/dist/src/components/Auth/Signup/useSignupValidation.js +29 -0
- package/dist/src/components/Auth/Signup/useSignupValidation.js.map +1 -0
- package/dist/src/components/Auth/UI/Form.js +33 -0
- package/dist/src/components/Auth/UI/Form.js.map +1 -0
- package/dist/src/components/Cart/CartButton.js +46 -0
- package/dist/src/components/Cart/CartButton.js.map +1 -0
- package/dist/src/components/Cart/CartFlyout.js +190 -0
- package/dist/src/components/Cart/CartFlyout.js.map +1 -0
- package/dist/src/components/Cart/CartItem.js +155 -0
- package/dist/src/components/Cart/CartItem.js.map +1 -0
- package/dist/src/components/Cart/FreeShipping.js +51 -0
- package/dist/src/components/Cart/FreeShipping.js.map +1 -0
- package/dist/src/components/CategoryPage/CategoryHeader.js +104 -0
- package/dist/src/components/CategoryPage/CategoryHeader.js.map +1 -0
- package/dist/src/components/CategoryPage/CategoryHeaderLoadingState.js +13 -0
- package/dist/src/components/CategoryPage/CategoryHeaderLoadingState.js.map +1 -0
- package/dist/src/components/CategoryPage/CategoryPage.js +26 -0
- package/dist/src/components/CategoryPage/CategoryPage.js.map +1 -0
- package/dist/src/components/CategoryPage/CategoryPage.loadable.js +7 -0
- package/dist/src/components/CategoryPage/CategoryPage.loadable.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/ActiveFilters.js +79 -0
- package/dist/src/components/CategoryPage/Filters/ActiveFilters.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/BooleanFilters.js +18 -0
- package/dist/src/components/CategoryPage/Filters/BooleanFilters.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Filter.js +97 -0
- package/dist/src/components/CategoryPage/Filters/Filter.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/FilterDrawer.js +91 -0
- package/dist/src/components/CategoryPage/Filters/FilterDrawer.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/FilterDropdownMenu.js +77 -0
- package/dist/src/components/CategoryPage/Filters/FilterDropdownMenu.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/ListFilters.js +38 -0
- package/dist/src/components/CategoryPage/Filters/ListFilters.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/ActiveCarot.js +15 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/ActiveCarot.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/FilterButton.js +107 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/FilterButton.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/ListAccordion.js +44 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/ListAccordion.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/RangeAccordion.js +21 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/RangeAccordion.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/SortOrderAccordion.js +30 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/SortOrderAccordion.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/shared/styles.js +12 -0
- package/dist/src/components/CategoryPage/Filters/Mobile/shared/styles.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/MultiListFilters.js +37 -0
- package/dist/src/components/CategoryPage/Filters/MultiListFilters.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/RangeFilters.js +122 -0
- package/dist/src/components/CategoryPage/Filters/RangeFilters.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/SortOrders.js +29 -0
- package/dist/src/components/CategoryPage/Filters/SortOrders.js.map +1 -0
- package/dist/src/components/CategoryPage/Filters/index.js +2 -0
- package/dist/src/components/CategoryPage/Filters/index.js.map +1 -0
- package/dist/src/components/CategoryPage/ProductCard.js +98 -0
- package/dist/src/components/CategoryPage/ProductCard.js.map +1 -0
- package/dist/src/components/CategoryPage/ProductGrid.js +89 -0
- package/dist/src/components/CategoryPage/ProductGrid.js.map +1 -0
- package/dist/src/components/CategoryPage/ProductGridWindow.js +48 -0
- package/dist/src/components/CategoryPage/ProductGridWindow.js.map +1 -0
- package/dist/src/components/CategoryPage/StandardCategoryPage.js +51 -0
- package/dist/src/components/CategoryPage/StandardCategoryPage.js.map +1 -0
- package/dist/src/components/CategoryPage/WindowedCategoryPage.js +87 -0
- package/dist/src/components/CategoryPage/WindowedCategoryPage.js.map +1 -0
- package/dist/src/components/CategoryPage/index.js +2 -0
- package/dist/src/components/CategoryPage/index.js.map +1 -0
- package/dist/src/components/ContentPage/ContentPage.js +64 -0
- package/dist/src/components/ContentPage/ContentPage.js.map +1 -0
- package/dist/src/components/ContentPage/ContentPage.loadable.js +7 -0
- package/dist/src/components/ContentPage/ContentPage.loadable.js.map +1 -0
- package/dist/src/components/ContentPage/SubPageNavigation.js +164 -0
- package/dist/src/components/ContentPage/SubPageNavigation.js.map +1 -0
- package/dist/src/components/ContentPage/index.js +2 -0
- package/dist/src/components/ContentPage/index.js.map +1 -0
- package/dist/src/components/CookieConsent.js +84 -0
- package/dist/src/components/CookieConsent.js.map +1 -0
- package/dist/src/components/Forms/GlobalError.js +28 -0
- package/dist/src/components/Forms/GlobalError.js.map +1 -0
- package/dist/src/components/Forms/Input.js +79 -0
- package/dist/src/components/Forms/Input.js.map +1 -0
- package/dist/src/components/Forms/InputStatus.js +42 -0
- package/dist/src/components/Forms/InputStatus.js.map +1 -0
- package/dist/src/components/Forms/Success.js +25 -0
- package/dist/src/components/Forms/Success.js.map +1 -0
- package/dist/src/components/Layout/Container.js +19 -0
- package/dist/src/components/Layout/Container.js.map +1 -0
- package/dist/src/components/Layout/Content/index.js +7 -0
- package/dist/src/components/Layout/Content/index.js.map +1 -0
- package/dist/src/components/Layout/Footer/Footer.js +106 -0
- package/dist/src/components/Layout/Footer/Footer.js.map +1 -0
- package/dist/src/components/Layout/Footer/FooterLinks.js +24 -0
- package/dist/src/components/Layout/Footer/FooterLinks.js.map +1 -0
- package/dist/src/components/Layout/Footer/SocialLinks.js +62 -0
- package/dist/src/components/Layout/Footer/SocialLinks.js.map +1 -0
- package/dist/src/components/Layout/Header/Categories/Categories.js +10 -0
- package/dist/src/components/Layout/Header/Categories/Categories.js.map +1 -0
- package/dist/src/components/Layout/Header/Categories/MobileCategories.js +128 -0
- package/dist/src/components/Layout/Header/Categories/MobileCategories.js.map +1 -0
- package/dist/src/components/Layout/Header/Categories/__util__/getCategoriesByLevel.js +4 -0
- package/dist/src/components/Layout/Header/Categories/__util__/getCategoriesByLevel.js.map +1 -0
- package/dist/src/components/Layout/Header/Categories/__util__/getCategoriesUnderParent.js +4 -0
- package/dist/src/components/Layout/Header/Categories/__util__/getCategoriesUnderParent.js.map +1 -0
- package/dist/src/components/Layout/Header/Categories/__util__/hasChildCategories.js +4 -0
- package/dist/src/components/Layout/Header/Categories/__util__/hasChildCategories.js.map +1 -0
- package/dist/src/components/Layout/Header/CategoryMenu/CategoryMenu.js +21 -0
- package/dist/src/components/Layout/Header/CategoryMenu/CategoryMenu.js.map +1 -0
- package/dist/src/components/Layout/Header/CategoryMenu/CategoryMenuContainer.js +55 -0
- package/dist/src/components/Layout/Header/CategoryMenu/CategoryMenuContainer.js.map +1 -0
- package/dist/src/components/Layout/Header/CategoryMenu/SubMenuSection.js +60 -0
- package/dist/src/components/Layout/Header/CategoryMenu/SubMenuSection.js.map +1 -0
- package/dist/src/components/Layout/Header/CategoryMenu/SubMenuWrapper.js +78 -0
- package/dist/src/components/Layout/Header/CategoryMenu/SubMenuWrapper.js.map +1 -0
- package/dist/src/components/Layout/Header/ChannelSelector/ChannelSelector.js +26 -0
- package/dist/src/components/Layout/Header/ChannelSelector/ChannelSelector.js.map +1 -0
- package/dist/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.js +36 -0
- package/dist/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.js.map +1 -0
- package/dist/src/components/Layout/Header/ChannelSelector/LanguageSelector.js +12 -0
- package/dist/src/components/Layout/Header/ChannelSelector/LanguageSelector.js.map +1 -0
- package/dist/src/components/Layout/Header/ChannelSelector/Selector.js +120 -0
- package/dist/src/components/Layout/Header/ChannelSelector/Selector.js.map +1 -0
- package/dist/src/components/Layout/Header/ChannelSelector/flattenCountries.js +15 -0
- package/dist/src/components/Layout/Header/ChannelSelector/flattenCountries.js.map +1 -0
- package/dist/src/components/Layout/Header/Header.js +189 -0
- package/dist/src/components/Layout/Header/Header.js.map +1 -0
- package/dist/src/components/Layout/Header/Logo.js +40 -0
- package/dist/src/components/Layout/Header/Logo.js.map +1 -0
- package/dist/src/components/Layout/Header/LogoSearchBar.js +15 -0
- package/dist/src/components/Layout/Header/LogoSearchBar.js.map +1 -0
- package/dist/src/components/Layout/Header/MobileMenu.js +76 -0
- package/dist/src/components/Layout/Header/MobileMenu.js.map +1 -0
- package/dist/src/components/Layout/Header/RecommendedChannel/ChannelBanner.js +218 -0
- package/dist/src/components/Layout/Header/RecommendedChannel/ChannelBanner.js.map +1 -0
- package/dist/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.js +123 -0
- package/dist/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.js.map +1 -0
- package/dist/src/components/Layout/Header/SearchBar.js +79 -0
- package/dist/src/components/Layout/Header/SearchBar.js.map +1 -0
- package/dist/src/components/Layout/Header/SearchButton.js +50 -0
- package/dist/src/components/Layout/Header/SearchButton.js.map +1 -0
- package/dist/src/components/Layout/Header/SubCategoryNav.js +71 -0
- package/dist/src/components/Layout/Header/SubCategoryNav.js.map +1 -0
- package/dist/src/components/Layout/Header/TopNav.js +63 -0
- package/dist/src/components/Layout/Header/TopNav.js.map +1 -0
- package/dist/src/components/Layout/MaxWidth.js +19 -0
- package/dist/src/components/Layout/MaxWidth.js.map +1 -0
- package/dist/src/components/Layout/Notifications.js +70 -0
- package/dist/src/components/Layout/Notifications.js.map +1 -0
- package/dist/src/components/LoadingPage.js +19 -0
- package/dist/src/components/LoadingPage.js.map +1 -0
- package/dist/src/components/LogOut.loadable.js +7 -0
- package/dist/src/components/LogOut.loadable.js.map +1 -0
- package/dist/src/components/MyPages/ChangePasswordPage.js +26 -0
- package/dist/src/components/MyPages/ChangePasswordPage.js.map +1 -0
- package/dist/src/components/MyPages/CustomerNameHeader.js +28 -0
- package/dist/src/components/MyPages/CustomerNameHeader.js.map +1 -0
- package/dist/src/components/MyPages/DeleteAccount.js +47 -0
- package/dist/src/components/MyPages/DeleteAccount.js.map +1 -0
- package/dist/src/components/MyPages/MyPages.js +152 -0
- package/dist/src/components/MyPages/MyPages.js.map +1 -0
- package/dist/src/components/MyPages/MyPages.loadable.js +7 -0
- package/dist/src/components/MyPages/MyPages.loadable.js.map +1 -0
- package/dist/src/components/MyPages/MyPagesBreadcrumbs.js +18 -0
- package/dist/src/components/MyPages/MyPagesBreadcrumbs.js.map +1 -0
- package/dist/src/components/MyPages/MyPagesSidebar.js +81 -0
- package/dist/src/components/MyPages/MyPagesSidebar.js.map +1 -0
- package/dist/src/components/MyPages/MyPagesStartPage.js +99 -0
- package/dist/src/components/MyPages/MyPagesStartPage.js.map +1 -0
- package/dist/src/components/MyPages/Newsletter.js +33 -0
- package/dist/src/components/MyPages/Newsletter.js.map +1 -0
- package/dist/src/components/MyPages/Orders/ListOrder.js +159 -0
- package/dist/src/components/MyPages/Orders/ListOrder.js.map +1 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/Contact.js +38 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/Contact.js.map +1 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/ListDetail.js +196 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/ListDetail.js.map +1 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/OrderTotals.js +81 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/OrderTotals.js.map +1 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/ShippingPayment.js +37 -0
- package/dist/src/components/MyPages/Orders/OrderDetail/ShippingPayment.js.map +1 -0
- package/dist/src/components/MyPages/Orders/OrderListPage.js +56 -0
- package/dist/src/components/MyPages/Orders/OrderListPage.js.map +1 -0
- package/dist/src/components/MyPages/ProfileDeliveryAddresses.js +93 -0
- package/dist/src/components/MyPages/ProfileDeliveryAddresses.js.map +1 -0
- package/dist/src/components/MyPages/ProfilePage.js +109 -0
- package/dist/src/components/MyPages/ProfilePage.js.map +1 -0
- package/dist/src/components/MyPages/ProfileView.js +42 -0
- package/dist/src/components/MyPages/ProfileView.js.map +1 -0
- package/dist/src/components/NavigationTree/NavTree.js +53 -0
- package/dist/src/components/NavigationTree/NavTree.js.map +1 -0
- package/dist/src/components/NavigationTree/NavTreePage.js +7 -0
- package/dist/src/components/NavigationTree/NavTreePage.js.map +1 -0
- package/dist/src/components/NavigationTree/NavTreePage.loadable.js +7 -0
- package/dist/src/components/NavigationTree/NavTreePage.loadable.js.map +1 -0
- package/dist/src/components/Newsletter/NewsletterField.js +93 -0
- package/dist/src/components/Newsletter/NewsletterField.js.map +1 -0
- package/dist/src/components/NotFoundPage.js +59 -0
- package/dist/src/components/NotFoundPage.js.map +1 -0
- package/dist/src/components/NotFoundPage.loadable.js +7 -0
- package/dist/src/components/NotFoundPage.loadable.js.map +1 -0
- package/dist/src/components/Pages/About.js +7 -0
- package/dist/src/components/Pages/About.js.map +1 -0
- package/dist/src/components/Pagination/Pagination.js +29 -0
- package/dist/src/components/Pagination/Pagination.js.map +1 -0
- package/dist/src/components/Pagination/PaginationWrapper.js +16 -0
- package/dist/src/components/Pagination/PaginationWrapper.js.map +1 -0
- package/dist/src/components/PreviewRoute.loadable.js +7 -0
- package/dist/src/components/PreviewRoute.loadable.js.map +1 -0
- package/dist/src/components/ProductList/AddToCart.js +46 -0
- package/dist/src/components/ProductList/AddToCart.js.map +1 -0
- package/dist/src/components/ProductList/Favourite.js +46 -0
- package/dist/src/components/ProductList/Favourite.js.map +1 -0
- package/dist/src/components/ProductList/FavouriteCount.js +15 -0
- package/dist/src/components/ProductList/FavouriteCount.js.map +1 -0
- package/dist/src/components/ProductList/Favourites.js +187 -0
- package/dist/src/components/ProductList/Favourites.js.map +1 -0
- package/dist/src/components/ProductList/Lister.js +22 -0
- package/dist/src/components/ProductList/Lister.js.map +1 -0
- package/dist/src/components/ProductList/Product.js +62 -0
- package/dist/src/components/ProductList/Product.js.map +1 -0
- package/dist/src/components/ProductList/SelectVariant.js +47 -0
- package/dist/src/components/ProductList/SelectVariant.js.map +1 -0
- package/dist/src/components/ProductList/productListQueries.js +15 -0
- package/dist/src/components/ProductList/productListQueries.js.map +1 -0
- package/dist/src/components/ProductPage/AddToCart/AddToCartForm.js +110 -0
- package/dist/src/components/ProductPage/AddToCart/AddToCartForm.js.map +1 -0
- package/dist/src/components/ProductPage/AddToCart/ProductToast.js +118 -0
- package/dist/src/components/ProductPage/AddToCart/ProductToast.js.map +1 -0
- package/dist/src/components/ProductPage/AddToCart/useProductToast.js +21 -0
- package/dist/src/components/ProductPage/AddToCart/useProductToast.js.map +1 -0
- package/dist/src/components/ProductPage/Campaigns.js +43 -0
- package/dist/src/components/ProductPage/Campaigns.js.map +1 -0
- package/dist/src/components/ProductPage/ConfigurationSelector.js +62 -0
- package/dist/src/components/ProductPage/ConfigurationSelector.js.map +1 -0
- package/dist/src/components/ProductPage/Images/ImageContainer.js +45 -0
- package/dist/src/components/ProductPage/Images/ImageContainer.js.map +1 -0
- package/dist/src/components/ProductPage/Images/Thumbnails.js +32 -0
- package/dist/src/components/ProductPage/Images/Thumbnails.js.map +1 -0
- package/dist/src/components/ProductPage/PackageProduct/IncludedInPackages.js +32 -0
- package/dist/src/components/ProductPage/PackageProduct/IncludedInPackages.js.map +1 -0
- package/dist/src/components/ProductPage/PackageProduct/PackageProduct.js +170 -0
- package/dist/src/components/ProductPage/PackageProduct/PackageProduct.js.map +1 -0
- package/dist/src/components/ProductPage/PackageProduct/PackageProductItem.js +92 -0
- package/dist/src/components/ProductPage/PackageProduct/PackageProductItem.js.map +1 -0
- package/dist/src/components/ProductPage/PriceHistory.js +99 -0
- package/dist/src/components/ProductPage/PriceHistory.js.map +1 -0
- package/dist/src/components/ProductPage/ProductInfo.js +55 -0
- package/dist/src/components/ProductPage/ProductInfo.js.map +1 -0
- package/dist/src/components/ProductPage/ProductInfoAccordion.js +46 -0
- package/dist/src/components/ProductPage/ProductInfoAccordion.js.map +1 -0
- package/dist/src/components/ProductPage/ProductPage.js +174 -0
- package/dist/src/components/ProductPage/ProductPage.js.map +1 -0
- package/dist/src/components/ProductPage/ProductPage.loadable.js +7 -0
- package/dist/src/components/ProductPage/ProductPage.loadable.js.map +1 -0
- package/dist/src/components/ProductPage/ProductPageLoadingState.js +55 -0
- package/dist/src/components/ProductPage/ProductPageLoadingState.js.map +1 -0
- package/dist/src/components/ProductPage/QuantityContainer.js +21 -0
- package/dist/src/components/ProductPage/QuantityContainer.js.map +1 -0
- package/dist/src/components/ProductPage/RelatedProducts.js +45 -0
- package/dist/src/components/ProductPage/RelatedProducts.js.map +1 -0
- package/dist/src/components/ProductPage/SizePicker.js +37 -0
- package/dist/src/components/ProductPage/SizePicker.js.map +1 -0
- package/dist/src/components/ProductPage/StockStatus/NotifyWhenBack.js +93 -0
- package/dist/src/components/ProductPage/StockStatus/NotifyWhenBack.js.map +1 -0
- package/dist/src/components/ProductPage/StockStatus/StockOrb.js +31 -0
- package/dist/src/components/ProductPage/StockStatus/StockOrb.js.map +1 -0
- package/dist/src/components/ProductPage/StockStatus/StockStatusIndicator.js +33 -0
- package/dist/src/components/ProductPage/StockStatus/StockStatusIndicator.js.map +1 -0
- package/dist/src/components/ProductPage/StockStatus/WarehouseStock.js +255 -0
- package/dist/src/components/ProductPage/StockStatus/WarehouseStock.js.map +1 -0
- package/dist/src/components/ProductPage/VariantSelector.js +138 -0
- package/dist/src/components/ProductPage/VariantSelector.js.map +1 -0
- package/dist/src/components/ProductPage/styledComponents.js +11 -0
- package/dist/src/components/ProductPage/styledComponents.js.map +1 -0
- package/dist/src/components/ProductPage/useProductValidationMessage.js +24 -0
- package/dist/src/components/ProductPage/useProductValidationMessage.js.map +1 -0
- package/dist/src/components/SearchPage/CategoryList.js +129 -0
- package/dist/src/components/SearchPage/CategoryList.js.map +1 -0
- package/dist/src/components/SearchPage/EmptySearchResults.js +23 -0
- package/dist/src/components/SearchPage/EmptySearchResults.js.map +1 -0
- package/dist/src/components/SearchPage/SearchMeta.js +27 -0
- package/dist/src/components/SearchPage/SearchMeta.js.map +1 -0
- package/dist/src/components/SearchPage/SearchPage.js +52 -0
- package/dist/src/components/SearchPage/SearchPage.js.map +1 -0
- package/dist/src/components/SearchPage/SearchPage.loadable.js +7 -0
- package/dist/src/components/SearchPage/SearchPage.loadable.js.map +1 -0
- package/dist/src/components/SearchPage/SearchResults.js +60 -0
- package/dist/src/components/SearchPage/SearchResults.js.map +1 -0
- package/dist/src/components/SearchPage/SearchTerm.js +11 -0
- package/dist/src/components/SearchPage/SearchTerm.js.map +1 -0
- package/dist/src/components/SearchPage/WindowedSearchResults.js +80 -0
- package/dist/src/components/SearchPage/WindowedSearchResults.js.map +1 -0
- package/dist/src/components/SearchPage/index.js +3 -0
- package/dist/src/components/SearchPage/index.js.map +1 -0
- package/dist/src/components/Shop.js +82 -0
- package/dist/src/components/Shop.js.map +1 -0
- package/dist/src/components/StartPage/Content/Row.js +40 -0
- package/dist/src/components/StartPage/Content/Row.js.map +1 -0
- package/dist/src/components/StartPage/Content/StartPageCampaign.js +112 -0
- package/dist/src/components/StartPage/Content/StartPageCampaign.js.map +1 -0
- package/dist/src/components/StartPage/Content/StartPageCategories.js +80 -0
- package/dist/src/components/StartPage/Content/StartPageCategories.js.map +1 -0
- package/dist/src/components/StartPage/Content/StartPageHTMLContent.js +74 -0
- package/dist/src/components/StartPage/Content/StartPageHTMLContent.js.map +1 -0
- package/dist/src/components/StartPage/Content/StartPageHero.js +73 -0
- package/dist/src/components/StartPage/Content/StartPageHero.js.map +1 -0
- package/dist/src/components/StartPage/Content/StartPageProductGrid.js +69 -0
- package/dist/src/components/StartPage/Content/StartPageProductGrid.js.map +1 -0
- package/dist/src/components/StartPage/StartPage.js +37 -0
- package/dist/src/components/StartPage/StartPage.js.map +1 -0
- package/dist/src/components/StartPage/StartPage.loadable.js +7 -0
- package/dist/src/components/StartPage/StartPage.loadable.js.map +1 -0
- package/dist/src/components/StartPage/index.js +3 -0
- package/dist/src/components/StartPage/index.js.map +1 -0
- package/dist/src/components/Store/Store.js +26 -0
- package/dist/src/components/Store/Store.js.map +1 -0
- package/dist/src/components/Store/Store.loadable.js +7 -0
- package/dist/src/components/Store/Store.loadable.js.map +1 -0
- package/dist/src/components/Store/StoreDetail.js +13 -0
- package/dist/src/components/Store/StoreDetail.js.map +1 -0
- package/dist/src/components/StoreLocator/StoreList.js +160 -0
- package/dist/src/components/StoreLocator/StoreList.js.map +1 -0
- package/dist/src/components/StoreLocator/StoreLocator.js +133 -0
- package/dist/src/components/StoreLocator/StoreLocator.js.map +1 -0
- package/dist/src/components/StoreLocator/StoreLocator.loadable.js +7 -0
- package/dist/src/components/StoreLocator/StoreLocator.loadable.js.map +1 -0
- package/dist/src/components/StoreLocator/StoreMap.js +116 -0
- package/dist/src/components/StoreLocator/StoreMap.js.map +1 -0
- package/dist/src/components/StoreLocator/StoreMarker.js +63 -0
- package/dist/src/components/StoreLocator/StoreMarker.js.map +1 -0
- package/dist/src/components/StoreLocator/StoreSearch.js +47 -0
- package/dist/src/components/StoreLocator/StoreSearch.js.map +1 -0
- package/dist/src/components/StoreLocator/UserLocation.js +76 -0
- package/dist/src/components/StoreLocator/UserLocation.js.map +1 -0
- package/dist/src/components/StoreLocator/useLocationState.js +14 -0
- package/dist/src/components/StoreLocator/useLocationState.js.map +1 -0
- package/dist/src/components/StoreLocator/useMapState.js +16 -0
- package/dist/src/components/StoreLocator/useMapState.js.map +1 -0
- package/dist/src/components/Theme.js +6 -0
- package/dist/src/components/Theme.js.map +1 -0
- package/dist/src/components/ui/Badge.js +33 -0
- package/dist/src/components/ui/Badge.js.map +1 -0
- package/dist/src/components/ui/Button.js +93 -0
- package/dist/src/components/ui/Button.js.map +1 -0
- package/dist/src/components/ui/CloseButton.js +18 -0
- package/dist/src/components/ui/CloseButton.js.map +1 -0
- package/dist/src/components/ui/Divider.js +11 -0
- package/dist/src/components/ui/Divider.js.map +1 -0
- package/dist/src/components/ui/Headings.js +19 -0
- package/dist/src/components/ui/Headings.js.map +1 -0
- package/dist/src/components/ui/RadioGroupWithLabels.js +16 -0
- package/dist/src/components/ui/RadioGroupWithLabels.js.map +1 -0
- package/dist/src/components/ui/Spinner.js +39 -0
- package/dist/src/components/ui/Spinner.js.map +1 -0
- package/dist/src/fonts/loadFontCss.js +51 -0
- package/dist/src/fonts/loadFontCss.js.map +1 -0
- package/dist/src/globalStyles.js +83 -0
- package/dist/src/globalStyles.js.map +1 -0
- package/dist/src/server.js +12 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/shop.config.js +68 -0
- package/dist/src/shop.config.js.map +1 -0
- package/dist/src/theme-variables.js +65 -0
- package/dist/src/theme-variables.js.map +1 -0
- package/dist/translations/cs.json +788 -0
- package/dist/translations/da.json +791 -0
- package/dist/translations/de.json +788 -0
- package/dist/translations/en.json +794 -0
- package/dist/translations/es.json +788 -0
- package/dist/translations/et.json +788 -0
- package/dist/translations/fi.json +794 -0
- package/dist/translations/fr.json +788 -0
- package/dist/translations/index.js +18 -0
- package/dist/translations/index.js.map +1 -0
- package/dist/translations/it.json +788 -0
- package/dist/translations/lv.json +788 -0
- package/dist/translations/nb.json +791 -0
- package/dist/translations/nl.json +788 -0
- package/dist/translations/pl.json +788 -0
- package/dist/translations/ru.json +788 -0
- package/dist/translations/sk.json +788 -0
- package/dist/translations/sr.json +464 -0
- package/dist/translations/sv.json +794 -0
- package/jsconfig.json +1 -0
- package/package.json +5 -5
- package/schema.graphql +2 -1
- package/src/shop.config.js +5 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAC7C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,IAAI,CAAC,oBAAC,IAAI,OAAG,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ForgotPasswordProvider, useForgotPasswordData } from '@jetshop/core/components/Auth/ForgotPasswordProvider';
|
|
2
|
+
import Head from '@jetshop/core/components/Head';
|
|
3
|
+
import t from '@jetshop/intl';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { GlobalError } from '../Forms/GlobalError';
|
|
6
|
+
import Input from '../Forms/Input';
|
|
7
|
+
import ButtonWithLoading from '../ui/Button';
|
|
8
|
+
import { smallCaps } from '../ui/Headings';
|
|
9
|
+
import { activeSegment, smallSection } from './UI/Form';
|
|
10
|
+
import MaxWidth from '../Layout/MaxWidth';
|
|
11
|
+
import { cx } from 'linaria';
|
|
12
|
+
export default function ForgotPasswordPage() {
|
|
13
|
+
return (React.createElement(MaxWidth, { style: { alignItems: 'center', marginTop: '2em' } },
|
|
14
|
+
React.createElement(ForgotPasswordProvider, null,
|
|
15
|
+
React.createElement("section", { className: cx(smallSection, activeSegment) },
|
|
16
|
+
React.createElement("h1", { className: smallCaps }, t(`Forgot password`)),
|
|
17
|
+
React.createElement(Head, { data: { title: 'Forgot Password' } }),
|
|
18
|
+
React.createElement(ForgotPasswordForm, null)))));
|
|
19
|
+
}
|
|
20
|
+
function ForgotPasswordForm() {
|
|
21
|
+
const { submitted, isSubmitting, globalError, isValid, emailInputProps } = useForgotPasswordData();
|
|
22
|
+
if (submitted) {
|
|
23
|
+
return (React.createElement("p", { style: { lineHeight: 1.5 } }, t(`Your password reset request has been submitted. Check your email for a link to reset your password.`)));
|
|
24
|
+
}
|
|
25
|
+
return (React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(Input, Object.assign({ label: t('What is your email address?') }, emailInputProps)),
|
|
27
|
+
globalError && (React.createElement(GlobalError, { style: { marginBottom: '1em' } }, globalError)),
|
|
28
|
+
React.createElement(ButtonWithLoading, { loading: isSubmitting, type: "submit", disabled: !isValid }, t('Submit'))));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=For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;QACb,OAAO,CACL,2BAAG,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,IAC1B,CAAC,CACA,qGAAqG,CACtG,CACC,CACL,CAAC;KACH;IAED,OAAO,CACL;QACE,oBAAC,KAAK,kBAAC,KAAK,EAAE,CAAC,CAAC,6BAA6B,CAAC,IAAM,eAAe,EAAI;QAEtE,WAAW,IAAI,CACd,oBAAC,WAAW,IAAC,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,IAAG,WAAW,CAAe,CACzE;QAED,oBAAC,iBAAiB,IAChB,OAAO,EAAE,YAAY,EACrB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,OAAO,IAEjB,CAAC,CAAC,QAAQ,CAAC,CACM,CACnB,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import loadable from '@loadable/component';
|
|
3
|
+
import LoadingPage from '../LoadingPage';
|
|
4
|
+
export default loadable(() => import('./ForgotPassword'), {
|
|
5
|
+
fallback: React.createElement(LoadingPage, null)
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=ForgotPassword.loadable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForgotPassword.loadable.js","sourceRoot":"","sources":["../../../../src/components/Auth/ForgotPassword.loadable.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAe,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;IACxD,QAAQ,EAAE,oBAAC,WAAW,OAAG;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import LogInFormProvider from '@jetshop/ui/Auth/LogInFormProvider';
|
|
2
|
+
import t from '@jetshop/intl';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { styled } from 'linaria/react';
|
|
5
|
+
import { css, cx } from 'linaria';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
|
+
import { GlobalError } from '../Forms/GlobalError';
|
|
8
|
+
import Input from '../Forms/Input';
|
|
9
|
+
import MaxWidth from '../Layout/MaxWidth';
|
|
10
|
+
import TrendButton from '../ui/Button';
|
|
11
|
+
import { smallCaps } from '../ui/Headings';
|
|
12
|
+
import { activeSegment, smallSection } from './UI/Form';
|
|
13
|
+
import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
|
|
14
|
+
import { Intl } from '@jetshop/intl';
|
|
15
|
+
import Head from '@jetshop/core/components/Head';
|
|
16
|
+
import { Helmet } from 'react-helmet-async';
|
|
17
|
+
import { theme } from '../Theme';
|
|
18
|
+
const StyledTrendButton = styled(TrendButton) `
|
|
19
|
+
align-self: center;
|
|
20
|
+
`;
|
|
21
|
+
const actionWrapper = css `
|
|
22
|
+
border: 0;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
> * {
|
|
27
|
+
flex: 1 1 calc(50% - 1em);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
const TextLink = styled(Link) `
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
color: ${theme.colors.blue};
|
|
33
|
+
text-align: right;
|
|
34
|
+
font-size: 0.875em;
|
|
35
|
+
:hover {
|
|
36
|
+
opacity: 0.8;
|
|
37
|
+
}
|
|
38
|
+
&.signup-link {
|
|
39
|
+
margin-left: auto;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
const LogInPageMaxWidth = styled(MaxWidth) `
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: flex-start;
|
|
45
|
+
margin-top: 2rem;
|
|
46
|
+
`;
|
|
47
|
+
function LogInPage() {
|
|
48
|
+
const { routes } = useShopConfig();
|
|
49
|
+
return (React.createElement(LogInPageMaxWidth, null,
|
|
50
|
+
React.createElement(Intl, null, t => React.createElement(Head, { data: { title: t('Login') } })),
|
|
51
|
+
React.createElement(Helmet, null,
|
|
52
|
+
React.createElement("meta", { name: "robots", content: "noindex" })),
|
|
53
|
+
React.createElement(LogInFormProvider, { redirect: "my-pages" }, ({ globalError, isSubmitting, isValid }) => (React.createElement("section", { className: cx(smallSection, activeSegment) },
|
|
54
|
+
React.createElement("header", { style: {
|
|
55
|
+
display: 'flex',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
marginBottom: '0.75rem'
|
|
58
|
+
} },
|
|
59
|
+
React.createElement("h1", { className: smallCaps, style: { marginBottom: 0 } }, t('Login')),
|
|
60
|
+
React.createElement(TextLink, { to: routes.signup.path, className: "signup-link" }, t('Not yet a member? Sign Up'))),
|
|
61
|
+
React.createElement(Input, { "data-testid": "email", type: "email", name: "email", label: t('E-mail address') }),
|
|
62
|
+
React.createElement(Input, { "data-testid": "password", type: "password", name: "password", label: t('Password') }),
|
|
63
|
+
globalError && (React.createElement(GlobalError, { style: { marginBottom: '2em' } }, globalError)),
|
|
64
|
+
React.createElement("section", { className: actionWrapper },
|
|
65
|
+
React.createElement(StyledTrendButton, { type: "submit", disabled: !isValid, loading: isSubmitting, loadingText: t('Hold on a moment...') }, t('Log in')),
|
|
66
|
+
React.createElement(TextLink, { to: routes.forgotPassword.path }, t('Forgot password?'))))))));
|
|
67
|
+
}
|
|
68
|
+
export default LogInPage;
|
|
69
|
+
//# sourceMappingURL=LogInPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogInPage.js","sourceRoot":"","sources":["../../../../src/components/Auth/LogInPage.js"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,oCAAoC,CAAC;AACnE,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,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kBAAkB,CAAC,CACb,CACH,CACF,CACX,CACiB,CACF,CACrB,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import loadable from '@loadable/component';
|
|
3
|
+
import LoadingPage from '../LoadingPage';
|
|
4
|
+
export default loadable(() => import('./LogInPage'), {
|
|
5
|
+
fallback: React.createElement(LoadingPage, null)
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=LogInPage.loadable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogInPage.loadable.js","sourceRoot":"","sources":["../../../../src/components/Auth/LogInPage.loadable.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAe,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;IACnD,QAAQ,EAAE,oBAAC,WAAW,OAAG;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import MaxWidth from '../Layout/MaxWidth';
|
|
3
|
+
import { useResetPasswordForm, ResetPasswordProvider } from '@jetshop/core/components/Auth/ResetPasswordProvider';
|
|
4
|
+
import { smallSection } from './UI/Form';
|
|
5
|
+
import InputWithLabel from '../Forms/Input';
|
|
6
|
+
import t from '@jetshop/intl';
|
|
7
|
+
import ButtonWithLoading from '../ui/Button';
|
|
8
|
+
import { GlobalError } from '../Forms/GlobalError';
|
|
9
|
+
import Head from '@jetshop/core/components/Head';
|
|
10
|
+
import { Link } from 'react-router-dom';
|
|
11
|
+
import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
|
|
12
|
+
export default function ResetPasswordPage() {
|
|
13
|
+
return (React.createElement(ResetPasswordProvider, null,
|
|
14
|
+
React.createElement(ResetPassword, null)));
|
|
15
|
+
}
|
|
16
|
+
function ResetPassword(props) {
|
|
17
|
+
const { globalError, passwordInputProps, isSubmitting, isValid, submitted } = useResetPasswordForm();
|
|
18
|
+
const { routes } = useShopConfig();
|
|
19
|
+
return (React.createElement(MaxWidth, { style: { alignItems: 'center', marginTop: '2em' } },
|
|
20
|
+
React.createElement(Head, { data: { title: 'Reset Password' } }),
|
|
21
|
+
React.createElement("section", { className: smallSection }, submitted ? (React.createElement(React.Fragment, null,
|
|
22
|
+
React.createElement("p", null, t('Your password has been reset.')),
|
|
23
|
+
React.createElement("p", null, t.rich('You can now {login} with your new password', {
|
|
24
|
+
login: React.createElement(Link, { to: routes.login.path }, "Log in")
|
|
25
|
+
})))) : (React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(InputWithLabel, Object.assign({}, passwordInputProps, { label: t('Please enter your new password') })),
|
|
27
|
+
globalError && (React.createElement(GlobalError, { style: { marginBottom: '1em' } }, globalError)),
|
|
28
|
+
React.createElement(ButtonWithLoading, { loading: isSubmitting, type: "submit", disabled: !isValid }, t('Submit')))))));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ResetPassword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetPassword.js","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPassword.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAC5C,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,iBAAiB,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,IAAI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Q,CAAC,CACM,CACnB,CACJ,CACO,CACD,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import loadable from '@loadable/component';
|
|
3
|
+
import LoadingPage from '../LoadingPage';
|
|
4
|
+
export default loadable(() => import('./ResetPassword'), {
|
|
5
|
+
fallback: React.createElement(LoadingPage, null)
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=ResetPassword.loadable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetPassword.loadable.js","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPassword.loadable.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAe,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE;IACvD,QAAQ,EAAE,oBAAC,WAAW,OAAG;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import useAddressFields from '@jetshop/core/components/Auth/useAddressFields';
|
|
2
|
+
import t from '@jetshop/intl';
|
|
3
|
+
import { CountriesInput } from '@jetshop/ui/Auth/FormFields/CountriesInput';
|
|
4
|
+
import { css, cx } from 'linaria';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import Input, { Label } from '../../Forms/Input';
|
|
7
|
+
import { PID } from './PID';
|
|
8
|
+
import { CustomerType } from './CustomerType';
|
|
9
|
+
import { SmallCaps } from '../../ui/Headings';
|
|
10
|
+
import { activeSegment } from '../UI/Form';
|
|
11
|
+
const sectionStyle = css `
|
|
12
|
+
margin-top: 2em;
|
|
13
|
+
`;
|
|
14
|
+
export default function Address(props) {
|
|
15
|
+
const { fields, setCountryByCode, countries } = useAddressFields();
|
|
16
|
+
function focusSection() {
|
|
17
|
+
// Used to add a highlight to this section when it is active
|
|
18
|
+
if (!props.isActive)
|
|
19
|
+
props.setActiveSection('address');
|
|
20
|
+
}
|
|
21
|
+
return (React.createElement("section", { className: cx('section', props.isActive ? 'active' : null, sectionStyle, activeSegment) },
|
|
22
|
+
React.createElement(SmallCaps, { className: "heading" }, t('Contact Details')),
|
|
23
|
+
React.createElement("p", null, t('Please fill in your contact details for shipping and communication.')),
|
|
24
|
+
React.createElement(CustomerType, null),
|
|
25
|
+
React.createElement("div", { style: { marginBottom: '2em' } },
|
|
26
|
+
React.createElement(Label, { htmlFor: "country" }, "Country"),
|
|
27
|
+
React.createElement(CountriesInput, { onFocus: focusSection, name: "country", onChange: e => setCountryByCode(e.currentTarget.value), countries: countries })),
|
|
28
|
+
React.createElement(PID, null),
|
|
29
|
+
fields.map(field => {
|
|
30
|
+
// Map over billingAddressFields and display them
|
|
31
|
+
return React.createElement(Input, Object.assign({ onFocus: focusSection }, field.inputProps));
|
|
32
|
+
})));
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=Address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Address.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/Address.js"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE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up-context';
|
|
2
|
+
import t from '@jetshop/intl';
|
|
3
|
+
import CheckboxGroup from '@jetshop/ui/Checkbox/CheckboxGroup';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { css } from 'linaria';
|
|
6
|
+
const checkboxWrapStyle = css `
|
|
7
|
+
margin-bottom: 1em;
|
|
8
|
+
display: flex;
|
|
9
|
+
label {
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
align-items: center;
|
|
12
|
+
+ label {
|
|
13
|
+
margin-left: 1.5em;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
// Checkbox group variables
|
|
18
|
+
const items = [
|
|
19
|
+
{ label: t('Private'), val: 'private' },
|
|
20
|
+
{ label: t('Company'), val: 'company' }
|
|
21
|
+
];
|
|
22
|
+
export function CustomerType() {
|
|
23
|
+
const { isUserTypeBusiness, setIsUserTypeBusiness } = useContext(SignupContext);
|
|
24
|
+
function handleChange(type) {
|
|
25
|
+
setIsUserTypeBusiness(type === 'company');
|
|
26
|
+
}
|
|
27
|
+
const selectedItem = !isUserTypeBusiness ? items[0].val : items[1].val;
|
|
28
|
+
return (React.createElement(CheckboxGroup, { items: items, selectedItem: selectedItem, handleChange: handleChange, className: checkboxWrapStyle }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=CustomerType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomerType.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/CustomerType.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAE9B,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;CAU5B,CAAC;AAEF,2BAA2B;AAC3B,MAAM,KAAK,GAAG;IACZ,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE;IACvC,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE;CACxC,CAAC;AAEF,MAAM,UAAU,YAAY;IAC1B,MAAM,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,GAAG,UAAU,CAC9D,aAAa,CACd,CAAC;IAEF,SAAS,YAAY,CAAC,IAAI;QACxB,qBAAqB,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,YAAY,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAEvE,OAAO,CACL,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,iBAAiB,GAC5B,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import t from '@jetshop/intl';
|
|
2
|
+
import useLoginFields from '@jetshop/core/components/Auth/useLoginFields';
|
|
3
|
+
import useSignupForm from '@jetshop/core/components/Auth/useSignupForm';
|
|
4
|
+
import { TrendButton } from '@jetshop/ui/Button';
|
|
5
|
+
import { css, cx } from 'linaria';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import Input from '../../Forms/Input';
|
|
8
|
+
import { GlobalError } from '../../Forms/GlobalError';
|
|
9
|
+
import { SmallCaps } from '../../ui/Headings';
|
|
10
|
+
import { activeSegment } from '../UI/Form';
|
|
11
|
+
import { useSignupValidation } from './useSignupValidation';
|
|
12
|
+
const sectionStyle = css `
|
|
13
|
+
margin-top: 2em;
|
|
14
|
+
`;
|
|
15
|
+
export default function LoginFields(props) {
|
|
16
|
+
const { fields } = useLoginFields();
|
|
17
|
+
const { isSignupError, validationDetails, isSubmitting } = useSignupForm();
|
|
18
|
+
const validationMessage = useSignupValidation(validationDetails);
|
|
19
|
+
function focusSection() {
|
|
20
|
+
if (!props.isActive)
|
|
21
|
+
props.setActiveSection('loginFields');
|
|
22
|
+
}
|
|
23
|
+
return (React.createElement("section", { className: cx('section', props.isActive ? 'active' : null, sectionStyle, activeSegment) },
|
|
24
|
+
React.createElement(SmallCaps, { className: "heading" }, t('Email & Password')),
|
|
25
|
+
isSignupError && (React.createElement(GlobalError, { style: { marginBottom: '2em' } }, validationMessage)),
|
|
26
|
+
fields.map(field => {
|
|
27
|
+
return React.createElement(Input, Object.assign({}, field.inputProps, { onFocus: focusSection }));
|
|
28
|
+
}),
|
|
29
|
+
React.createElement(TrendButton, { "data-testid": "sign-up-button", type: "submit", disabled: isSubmitting }, isSubmitting ? t('Hold on a moment…') : t('Create Profile'))));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=LoginFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoginFields.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/LoginFields.js"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAC1E,OAAO,aAAa,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,M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
|
|
1
|
+
import { SignupContext } from '@jetshop/core/components/Auth/signup-context';
|
|
2
|
+
import Input from '../../Forms/Input';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
export function PID() {
|
|
5
|
+
const { allFields } = useContext(SignupContext);
|
|
6
|
+
const pid = allFields.find(field => field.id === 'pid' || field.id === 'organizationNumber');
|
|
7
|
+
if (!pid)
|
|
8
|
+
return null;
|
|
9
|
+
return (React.createElement(Input, { type: pid.type, name: pid.name, label: pid.label, required: pid.required }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=PID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PID.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/PID.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAEhD,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CACxB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,KAAK,CAAC,EAAE,KAAK,oBAAoB,CACjE,CAAC;IAEF,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IAEtB,OAAO,CACL,oBAAC,KAAK,IACJ,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ,GACtB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import t from '@jetshop/intl';
|
|
2
|
+
import SSN from '@jetshop/ui/Auth/SSN';
|
|
3
|
+
import { TrendButton } from '@jetshop/ui/Button';
|
|
4
|
+
import { cx } from 'linaria';
|
|
5
|
+
import { Form } from 'formik';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import Input from '../../Forms/Input';
|
|
8
|
+
/**
|
|
9
|
+
* This is unused in its current form, but will be used once SSN lookup is
|
|
10
|
+
* supported by Flight.
|
|
11
|
+
*/
|
|
12
|
+
export default function SSNSection(props) {
|
|
13
|
+
function handleFocus() {
|
|
14
|
+
if (!props.isActive)
|
|
15
|
+
props.setActiveSection('ssn');
|
|
16
|
+
}
|
|
17
|
+
return (React.createElement(SSN, { onSuccess: () => {
|
|
18
|
+
props.setActiveSection('address');
|
|
19
|
+
} }, ({ formik }) => (React.createElement("section", { className: cx('section', props.isActive ? 'active' : null) },
|
|
20
|
+
React.createElement(Form, { "aria-describedby": "ssn-description" },
|
|
21
|
+
React.createElement("h1", { className: "heading" }, t('Create profile')),
|
|
22
|
+
React.createElement("p", null, t('Welcome to our online store! Enter your Social Security and we will try to fetch the required information. You can also fill it in manually.')),
|
|
23
|
+
React.createElement(Input, { type: "text", name: "ssn", label: t('Social Security Number'), onFocus: handleFocus }),
|
|
24
|
+
React.createElement(TrendButton, { type: "submit", disabled: !formik.isValid || formik.isSubmitting, onClick: formik.handleSubmit }, formik.isSubmitting
|
|
25
|
+
? t('Hold on a moment…')
|
|
26
|
+
: t('Look up my info')),
|
|
27
|
+
React.createElement("div", { id: "ssn-description", className: "hint" }, t('Or scroll down to fill in the rest manually')))))));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=SSN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SSN.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/SSN.js"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EA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EAAC,MAAM,IACvC,CAAC,CAAC,6CAA6C,CAAC,CAC7C,CACD,CACC,CACX,CACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import SignupFormProvider from '@jetshop/core/components/Auth/SignupFormContainer';
|
|
2
|
+
import useAuth from '@jetshop/core/components/AuthContext/useAuth';
|
|
3
|
+
import t from '@jetshop/intl';
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import { styled } from 'linaria/react';
|
|
6
|
+
import { cx } from 'linaria';
|
|
7
|
+
import { Redirect } from 'react-router';
|
|
8
|
+
import BaseMaxWidth from '../../Layout/MaxWidth';
|
|
9
|
+
import LoadingPage from '../../LoadingPage';
|
|
10
|
+
import { smallCaps } from '../../ui/Headings';
|
|
11
|
+
import { smallSection } from '../UI/Form';
|
|
12
|
+
import Address from './Address';
|
|
13
|
+
import LoginFields from './LoginFields';
|
|
14
|
+
import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
|
|
15
|
+
import { Intl } from '@jetshop/intl';
|
|
16
|
+
import Head from '@jetshop/core/components/Head';
|
|
17
|
+
import { theme } from '../../Theme';
|
|
18
|
+
const MaxWidth = styled(BaseMaxWidth) `
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
21
|
+
p {
|
|
22
|
+
line-height: 1.5;
|
|
23
|
+
font-size: 0.875rem;
|
|
24
|
+
margin-bottom: 1rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
button {
|
|
28
|
+
width: 100%;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hint {
|
|
33
|
+
margin-top: 0.5rem;
|
|
34
|
+
font-style: italic;
|
|
35
|
+
font-size: 0.75rem;
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.section {
|
|
40
|
+
&:before {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
margin-bottom: 2rem;
|
|
44
|
+
transition: opacity 0.6s ease;
|
|
45
|
+
opacity: 0.5;
|
|
46
|
+
|
|
47
|
+
&.active {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
&:before {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
const Spacer = styled('div') `
|
|
56
|
+
border-bottom: 2rem solid ${theme.colors.background};
|
|
57
|
+
`;
|
|
58
|
+
function SignUpPage() {
|
|
59
|
+
const [activeSection, setActiveSection] = useState('address');
|
|
60
|
+
const { loggedIn } = useAuth();
|
|
61
|
+
const { routes } = useShopConfig();
|
|
62
|
+
if (loggedIn) {
|
|
63
|
+
return React.createElement(Redirect, { to: routes.myPages.path });
|
|
64
|
+
}
|
|
65
|
+
return (React.createElement(SignupFormProvider, { LoadingComponent: React.createElement(LoadingPage, null) },
|
|
66
|
+
React.createElement(MaxWidth, { style: { marginTop: '2em' } },
|
|
67
|
+
React.createElement(Intl, null, t => React.createElement(Head, { data: { title: t('Signup') } })),
|
|
68
|
+
React.createElement("section", { className: smallSection },
|
|
69
|
+
React.createElement("h1", { className: cx('heading', smallCaps) }, "Sign up"),
|
|
70
|
+
React.createElement("p", null, t('Welcome to our online store! We need to create a profile before you continue.')),
|
|
71
|
+
React.createElement("div", { onClick: () => setActiveSection('address') },
|
|
72
|
+
React.createElement(Address, { isActive: activeSection === 'address', setActiveSection: setActiveSection })),
|
|
73
|
+
React.createElement(Spacer, null),
|
|
74
|
+
React.createElement("div", { onClick: () => setActiveSection('loginFields') },
|
|
75
|
+
React.createElement(LoginFields, { isActive: activeSection === 'loginFields', setActiveSection: setActiveSection }))))));
|
|
76
|
+
}
|
|
77
|
+
export default SignUpPage;
|
|
78
|
+
//# sourceMappingURL=SignUpPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpPage.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/SignUpPage.js"],"names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,OAAO,oBAAC,QAAQ,IAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,GAAI,CAAC;KAC9C;IAED,OAAO,CACL,oBAAC,kBAAkB,IAAC,gBAAgB,EAAE,oBAAC,WAAW,OAAG;QACnD,oBAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;YACnC,oBAAC,IAAI,QAAE,CAAC,CAAC,EAAE,CAAC,oBAAC,IAAI,IAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAI,CAAQ;YAC1D,iCAAS,SAAS,EAAE,YAAY;gBAC9B,4BAAI,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,cAAc;gBACrD,+BACG,CAAC,CACA,+EAA+E,CAChF,CACC;gBAEJ,6BAAK,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC;oBAC7C,oBAAC,OAAO,IACN,QAAQ,EAAE,aAAa,KAAK,SAAS,EACrC,gBAAgB,EAAE,gBAAgB,GAClC,CACE;gBAEN,oBAAC,MAAM,OAAG;gBAEV,6BAAK,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC;oBACjD,oBAAC,WAAW,IACV,QAAQ,EAAE,aAAa,KAAK,aAAa,EACzC,gBAAgB,EAAE,gBAAgB,GAClC,CACE,CACE,CACD,CACQ,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import loadable from '@loadable/component';
|
|
3
|
+
import LoadingPage from '../../LoadingPage';
|
|
4
|
+
export default loadable(() => import('./SignUpPage'), {
|
|
5
|
+
fallback: React.createElement(LoadingPage, null)
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=SignUpPage.loadable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpPage.loadable.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/SignUpPage.loadable.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,eAAe,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;IACpD,QAAQ,EAAE,oBAAC,WAAW,OAAG;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import t from '@jetshop/intl';
|
|
2
|
+
const fields = {
|
|
3
|
+
InvalidValue: {
|
|
4
|
+
Pid: t('PID is invalid'),
|
|
5
|
+
EmailAddress: t('Email address is invalid.'),
|
|
6
|
+
PostalCode: t('Postal code is invalid.')
|
|
7
|
+
},
|
|
8
|
+
UniqueValueAlreadyExists: {
|
|
9
|
+
Pid: t('This PID is already registered'),
|
|
10
|
+
EmailAddress: t('Your email address is already registered.')
|
|
11
|
+
},
|
|
12
|
+
Required: {
|
|
13
|
+
Pid: t('PID is required'),
|
|
14
|
+
EmailAddress: t('Email address is required.'),
|
|
15
|
+
PostalCode: t('Postal code is required.')
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export function useSignupValidation(validationDetails) {
|
|
19
|
+
var _a;
|
|
20
|
+
if (!validationDetails) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const [field, validation] = validationDetails;
|
|
24
|
+
if (!((_a = fields === null || fields === void 0 ? void 0 : fields[validation]) === null || _a === void 0 ? void 0 : _a[field])) {
|
|
25
|
+
return t('Something went wrong. Please try again.');
|
|
26
|
+
}
|
|
27
|
+
return fields[validation][field];
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=useSignupValidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSignupValidation.js","sourceRoot":"","sources":["../../../../../src/components/Auth/Signup/useSignupValidation.js"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,eAAe,CAAC;AAE9B,MAAM,MAAM,GAAG;IACb,YAAY,EAAE;QACZ,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC;QACxB,YAAY,EAAE,CAAC,CAAC,2BAA2B,CAAC;QAC5C,UAAU,EAAE,CAAC,CAAC,yBAAyB,CAAC;KACzC;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,CAAC,CAAC,gCAAgC,CAAC;QACxC,YAAY,EAAE,CAAC,CAAC,2CAA2C,CAAC;KAC7D;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,CAAC,CAAC,iBAAiB,CAAC;QACzB,YAAY,EAAE,CAAC,CAAC,4BAA4B,CAAC;QAC7C,UAAU,EAAE,CAAC,CAAC,0BAA0B,CAAC;KAC1C;CACF,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,iBAAiB;;IACnD,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,iBAAiB,CAAC;IAE9C,IAAI,CAAC,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,UAAU,CAAC,0CAAG,KAAK,CAAC,CAAA,EAAE;QAClC,OAAO,CAAC,CAAC,yCAAyC,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { css } from 'linaria';
|
|
2
|
+
import { theme } from '../../Theme';
|
|
3
|
+
export const smallSection = css `
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
padding: ${theme.space[1]};
|
|
7
|
+
width: 30rem;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
label {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: baseline;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${theme.below.sm} {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
export const activeSegment = css `
|
|
20
|
+
position: relative;
|
|
21
|
+
::before {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: -1.5rem;
|
|
25
|
+
top: 0;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
width: 3px;
|
|
28
|
+
height: 100%;
|
|
29
|
+
background: ${theme.colors.blue};
|
|
30
|
+
transition: opacity 0.4s ease;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../../src/components/Auth/UI/Form.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;aAGlB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;;;;;;;;;IASvB,KAAK,CAAC,KAAK,CAAC,EAAE;;;CAGjB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;kBAUd,KAAK,CAAC,MAAM,CAAC,IAAI;;;CAGlC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { css } from 'linaria';
|
|
3
|
+
import { styled } from 'linaria/react';
|
|
4
|
+
import CartProvider from '@jetshop/core/components/Query/CartProvider';
|
|
5
|
+
import t from '@jetshop/intl';
|
|
6
|
+
import { Above } from '@jetshop/ui/Breakpoints';
|
|
7
|
+
import { DrawerTrigger } from '@jetshop/ui/Modal/Drawer/DrawerTrigger';
|
|
8
|
+
import { FlyoutTrigger } from '@jetshop/ui/Modal/Flyout';
|
|
9
|
+
import { ReactComponent as CartIcon } from '../../svg/Cart.svg';
|
|
10
|
+
import Badge from '../ui/Badge';
|
|
11
|
+
import cartQuery from './queries/cartQuery.gql';
|
|
12
|
+
const Button = styled('button') `
|
|
13
|
+
padding: 0;
|
|
14
|
+
background: transparent;
|
|
15
|
+
color: inherit;
|
|
16
|
+
border: 0;
|
|
17
|
+
outline: none;
|
|
18
|
+
`;
|
|
19
|
+
const cartButtonWrapper = css `
|
|
20
|
+
position: relative;
|
|
21
|
+
.badge {
|
|
22
|
+
position: absolute;
|
|
23
|
+
right: -5px;
|
|
24
|
+
top: -5px;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
color: white;
|
|
27
|
+
font-size: 8px;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
function CartButton({ target, itemsInCart, className }) {
|
|
31
|
+
return (React.createElement("div", { className: cartButtonWrapper },
|
|
32
|
+
React.createElement(Button, { className: className, "data-testid": "cart-button", onClick: target.isOpen ? target.hideTarget : target.showTarget },
|
|
33
|
+
React.createElement(CartIcon, { className: "badge-svg-wrapper" }),
|
|
34
|
+
React.createElement("span", null, t('Cart'))),
|
|
35
|
+
itemsInCart > 0 && React.createElement(Badge, { text: itemsInCart })));
|
|
36
|
+
}
|
|
37
|
+
function CartButtonFlyout({ className }) {
|
|
38
|
+
return (React.createElement(CartProvider, { query: cartQuery }, result => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
const itemsInCart = ((_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.cart) === null || _b === void 0 ? void 0 : _b.totalQuantity) || 0;
|
|
41
|
+
// Drawer on mobile, flyout on desktop
|
|
42
|
+
return (React.createElement(Above, { breakpoint: "md" }, matches => matches ? (React.createElement(FlyoutTrigger, { id: "cart-flyout" }, flyout => (React.createElement(CartButton, { className: className, target: flyout, itemsInCart: itemsInCart })))) : (React.createElement(DrawerTrigger, { preventOverflow: true, id: "cart-drawer" }, drawer => (React.createElement(CartButton, { className: className, target: drawer, itemsInCart: itemsInCart }))))));
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
export default CartButtonFlyout;
|
|
46
|
+
//# sourceMappingURL=CartButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartButton.js","sourceRoot":"","sources":["../../../../src/components/Cart/CartButton.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,YAAY,MAAM,6CAA6C,CAAC;AACvE,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;;;;CAM9B,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;CAU5B,CAAC;AAEF,SAAS,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE;IACpD,OAAO,CACL,6BAAK,SAAS,EAAE,iBAAiB;QAC/B,oBAAC,MAAM,IACL,SAAS,EAAE,SAAS,iBACR,aAAa,EACzB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU;YAE9D,oBAAC,QAAQ,IAAC,SAAS,EAAC,mBA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