@jetshop/template-trend 5.8.3 → 5.11.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.
Files changed (235) hide show
  1. package/.linaria-cache/packages/template-trend/src/components/Auth/LogInPage.linaria.css +4 -4
  2. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/Address.linaria.css +1 -1
  3. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/CustomerType.linaria.css +1 -1
  4. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/LoginFields.linaria.css +1 -1
  5. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/SignUpPage.linaria.css +2 -2
  6. package/.linaria-cache/packages/template-trend/src/components/Auth/UI/Form.linaria.css +2 -2
  7. package/.linaria-cache/packages/template-trend/src/components/Cart/CartButton.linaria.css +2 -2
  8. package/.linaria-cache/packages/template-trend/src/components/Cart/CartFlyout.linaria.css +7 -7
  9. package/.linaria-cache/packages/template-trend/src/components/Cart/CartItem.linaria.css +7 -7
  10. package/.linaria-cache/packages/template-trend/src/components/Cart/FreeShipping.linaria.css +2 -2
  11. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/CategoryHeader.linaria.css +8 -8
  12. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/ActiveFilters.linaria.css +6 -6
  13. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Filter.linaria.css +4 -4
  14. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/FilterDrawer.linaria.css +4 -4
  15. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/FilterDropdownMenu.linaria.css +1 -1
  16. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/ActiveCarot.linaria.css +1 -1
  17. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/FilterButton.linaria.css +5 -5
  18. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/ListAccordion.linaria.css +1 -1
  19. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/shared/styles.linaria.css +1 -1
  20. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/RangeFilters.linaria.css +2 -2
  21. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductCard.linaria.css +1 -1
  22. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductGrid.linaria.css +2 -2
  23. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductGridWindow.linaria.css +2 -2
  24. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/StandardCategoryPage.linaria.css +2 -2
  25. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/WindowedCategoryPage.linaria.css +3 -3
  26. package/.linaria-cache/packages/template-trend/src/components/ContentPage/ContentPage.linaria.css +3 -3
  27. package/.linaria-cache/packages/template-trend/src/components/CookieConsent.linaria.css +1 -1
  28. package/.linaria-cache/packages/template-trend/src/components/Forms/GlobalError.linaria.css +1 -1
  29. package/.linaria-cache/packages/template-trend/src/components/Forms/Input.linaria.css +4 -4
  30. package/.linaria-cache/packages/template-trend/src/components/Forms/InputStatus.linaria.css +3 -3
  31. package/.linaria-cache/packages/template-trend/src/components/Forms/Success.linaria.css +1 -1
  32. package/.linaria-cache/packages/template-trend/src/components/Layout/Container.linaria.css +1 -1
  33. package/.linaria-cache/packages/template-trend/src/components/Layout/Content/index.linaria.css +1 -1
  34. package/.linaria-cache/packages/template-trend/src/components/Layout/Footer/Footer.linaria.css +3 -3
  35. package/.linaria-cache/packages/template-trend/src/components/Layout/Footer/SocialLinks.linaria.css +2 -2
  36. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Categories/MobileCategories.linaria.css +6 -6
  37. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/CategoryMenu.linaria.css +1 -1
  38. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/CategoryMenuContainer.linaria.css +2 -2
  39. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/SubMenuSection.linaria.css +1 -1
  40. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/SubMenuWrapper.linaria.css +5 -5
  41. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/ChannelSelector.linaria.css +2 -2
  42. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.linaria.css +2 -2
  43. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/Selector.linaria.css +5 -5
  44. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Header.linaria.css +7 -7
  45. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Logo.linaria.css +1 -1
  46. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/LogoSearchBar.linaria.css +1 -1
  47. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/MobileMenu.linaria.css +6 -6
  48. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/RecommendedChannel/ChannelBanner.linaria.css +5 -5
  49. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.linaria.css +9 -9
  50. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/SearchBar.linaria.css +3 -3
  51. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/SearchButton.linaria.css +1 -1
  52. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/TopNav.linaria.css +1 -1
  53. package/.linaria-cache/packages/template-trend/src/components/Layout/MaxWidth.linaria.css +1 -1
  54. package/.linaria-cache/packages/template-trend/src/components/Layout/Notifications.linaria.css +1 -1
  55. package/.linaria-cache/packages/template-trend/src/components/LoadingPage.linaria.css +1 -1
  56. package/.linaria-cache/packages/template-trend/src/components/MyPages/CustomerNameHeader.linaria.css +1 -1
  57. package/.linaria-cache/packages/template-trend/src/components/MyPages/DeleteAccount.linaria.css +1 -1
  58. package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPages.linaria.css +1 -1
  59. package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPagesSidebar.linaria.css +1 -1
  60. package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPagesStartPage.linaria.css +2 -2
  61. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/ListOrder.linaria.css +1 -1
  62. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/ListDetail.linaria.css +4 -4
  63. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/OrderTotals.linaria.css +1 -1
  64. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/ShippingPayment.linaria.css +1 -1
  65. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderListPage.linaria.css +1 -1
  66. package/.linaria-cache/packages/template-trend/src/components/MyPages/ProfileDeliveryAddresses.linaria.css +1 -1
  67. package/.linaria-cache/packages/template-trend/src/components/MyPages/ProfilePage.linaria.css +4 -4
  68. package/.linaria-cache/packages/template-trend/src/components/NavigationTree/NavTree.linaria.css +2 -2
  69. package/.linaria-cache/packages/template-trend/src/components/Newsletter/NewsletterField.linaria.css +3 -3
  70. package/.linaria-cache/packages/template-trend/src/components/NotFoundPage.linaria.css +1 -1
  71. package/.linaria-cache/packages/template-trend/src/components/Pagination/Pagination.linaria.css +1 -1
  72. package/.linaria-cache/packages/template-trend/src/components/ProductList/AddToCart.linaria.css +1 -1
  73. package/.linaria-cache/packages/template-trend/src/components/ProductList/Favourite.linaria.css +1 -1
  74. package/.linaria-cache/packages/template-trend/src/components/ProductList/Favourites.linaria.css +2 -2
  75. package/.linaria-cache/packages/template-trend/src/components/ProductList/Product.linaria.css +2 -2
  76. package/.linaria-cache/packages/template-trend/src/components/ProductPage/AddToCart/AddToCartForm.linaria.css +3 -3
  77. package/.linaria-cache/packages/template-trend/src/components/ProductPage/AddToCart/ProductToast.linaria.css +9 -9
  78. package/.linaria-cache/packages/template-trend/src/components/ProductPage/Campaigns.linaria.css +2 -2
  79. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ConfigurationSelector.linaria.css +1 -1
  80. package/.linaria-cache/packages/template-trend/src/components/ProductPage/Images/ImageContainer.linaria.css +1 -1
  81. package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/IncludedInPackages.linaria.css +1 -1
  82. package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/PackageProduct.linaria.css +2 -2
  83. package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/PackageProductItem.linaria.css +1 -1
  84. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductInfo.linaria.css +3 -3
  85. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductInfoAccordion.linaria.css +3 -3
  86. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductPage.linaria.css +1 -1
  87. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductPageLoadingState.linaria.css +3 -3
  88. package/.linaria-cache/packages/template-trend/src/components/ProductPage/RelatedProducts.linaria.css +1 -1
  89. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/NotifyWhenBack.linaria.css +5 -5
  90. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/StockOrb.linaria.css +1 -1
  91. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/StockStatusIndicator.linaria.css +1 -1
  92. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/WarehouseStock.linaria.css +2 -2
  93. package/.linaria-cache/packages/template-trend/src/components/ProductPage/VariantSelector.linaria.css +3 -3
  94. package/.linaria-cache/packages/template-trend/src/components/ProductPage/styledComponents.linaria.css +1 -1
  95. package/.linaria-cache/packages/template-trend/src/components/SearchPage/CategoryList.linaria.css +7 -0
  96. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchMeta.linaria.css +1 -1
  97. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchPage.linaria.css +3 -3
  98. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchResults.linaria.css +3 -3
  99. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchTerm.linaria.css +1 -1
  100. package/.linaria-cache/packages/template-trend/src/components/SearchPage/WindowedSearchResults.linaria.css +4 -4
  101. package/.linaria-cache/packages/template-trend/src/components/StartPage/CategoryList.linaria.css +6 -6
  102. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/Row.linaria.css +3 -3
  103. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCampaign.linaria.css +7 -7
  104. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCategories.linaria.css +3 -3
  105. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHTMLContent.linaria.css +1 -1
  106. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHero.linaria.css +6 -6
  107. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageProductGrid.linaria.css +2 -2
  108. package/.linaria-cache/packages/template-trend/src/components/StartPage/StartPage.linaria.css +2 -2
  109. package/.linaria-cache/packages/template-trend/src/components/Store/Store.linaria.css +1 -1
  110. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreList.linaria.css +5 -5
  111. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreLocator.linaria.css +5 -5
  112. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreMap.linaria.css +1 -1
  113. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreMarker.linaria.css +1 -1
  114. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreSearch.linaria.css +1 -1
  115. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/UserLocation.linaria.css +1 -1
  116. package/.linaria-cache/packages/template-trend/src/components/ui/Badge.linaria.css +1 -1
  117. package/.linaria-cache/packages/template-trend/src/components/ui/Button.linaria.css +3 -3
  118. package/.linaria-cache/packages/template-trend/src/components/ui/CloseButton.linaria.css +1 -1
  119. package/.linaria-cache/packages/template-trend/src/components/ui/Headings.linaria.css +2 -2
  120. package/.linaria-cache/packages/template-trend/src/components/ui/Spinner.linaria.css +1 -1
  121. package/.linaria-cache/packages/ui/Breadcrumbs/Breadcrumbs.linaria.css +2 -2
  122. package/.linaria-cache/packages/ui/Button/Button.linaria.css +2 -2
  123. package/.linaria-cache/packages/ui/Button/SecondaryButton.linaria.css +1 -1
  124. package/.linaria-cache/packages/ui/Button/TrendButton.linaria.css +1 -1
  125. package/.linaria-cache/packages/ui/ChannelSelector/ChannelSelector.linaria.css +1 -1
  126. package/.linaria-cache/packages/ui/ChannelSelector/ChannelSelectorButtons.linaria.css +2 -2
  127. package/.linaria-cache/packages/ui/ChannelSelector/LargeSelector.linaria.css +1 -1
  128. package/.linaria-cache/packages/ui/ChannelSelector/MiniSelector.linaria.css +1 -1
  129. package/.linaria-cache/packages/ui/ChannelSelector/Region.linaria.css +3 -0
  130. package/.linaria-cache/packages/ui/Checkbox/Checkbox.linaria.css +4 -4
  131. package/.linaria-cache/packages/ui/Checkbox/CheckboxGroup.linaria.css +2 -2
  132. package/.linaria-cache/packages/ui/DropdownMenu/DropdownMenu.linaria.css +2 -2
  133. package/.linaria-cache/packages/ui/ErrorBoundary/Generic.linaria.css +1 -1
  134. package/.linaria-cache/packages/ui/Gallery/Gallery.linaria.css +2 -2
  135. package/.linaria-cache/packages/ui/JetshopText.linaria.css +1 -1
  136. package/.linaria-cache/packages/ui/Loading/LoadingBar.linaria.css +2 -2
  137. package/.linaria-cache/packages/ui/Modal/Drawer/Drawer.linaria.css +1 -1
  138. package/.linaria-cache/packages/ui/Modal/ModalRoot.linaria.css +1 -1
  139. package/.linaria-cache/packages/ui/Modal/TargetWrapper.linaria.css +1 -1
  140. package/.linaria-cache/packages/ui/Pagination/Pagination.linaria.css +1 -1
  141. package/.linaria-cache/packages/ui/PreOrderDateSelector/PreOrderDateSelector.linaria.css +1 -1
  142. package/.linaria-cache/packages/ui/Price/Price.linaria.css +1 -1
  143. package/.linaria-cache/packages/ui/ProductList/Badges.linaria.css +7 -7
  144. package/.linaria-cache/packages/ui/ProductSpecifications/ProductSpecifications.linaria.css +1 -1
  145. package/.linaria-cache/packages/ui/Search/SearchField.linaria.css +5 -5
  146. package/.linaria-cache/packages/ui/Search/SearchPage/SearchMeta.linaria.css +1 -1
  147. package/.linaria-cache/packages/ui/Select/Components.linaria.css +8 -8
  148. package/README.md +118 -1944
  149. package/cypress/integration/essentials.spec.js +50 -0
  150. package/package.json +5 -5
  151. package/schema.graphql +22 -8
  152. package/src/components/Auth/ForgotPassword.js +3 -8
  153. package/src/components/Auth/README.md +5 -0
  154. package/src/components/Cart/CartButton.js +40 -44
  155. package/src/components/Cart/CartFlyout.js +8 -5
  156. package/src/components/Cart/CartItem.js +12 -15
  157. package/src/components/Cart/{addMultipleToCart.gql → queries/addMultipleToCart.gql} +1 -1
  158. package/src/components/Cart/{addToCart.gql → queries/addToCart.gql} +1 -1
  159. package/src/components/Cart/{CartFragment.gql → queries/cartFragment.gql} +9 -0
  160. package/src/components/Cart/{CartQuery.gql → queries/cartQuery.gql} +1 -1
  161. package/src/components/Cart/{decrementQuantity.gql → queries/decrementQuantity.gql} +1 -1
  162. package/src/components/Cart/{incrementQuantity.gql → queries/incrementQuantity.gql} +1 -1
  163. package/src/components/Cart/{removeFromCart.gql → queries/removeFromCart.gql} +1 -1
  164. package/src/components/CategoryPage/CategoryPage.js +1 -0
  165. package/src/components/CategoryPage/Filters/ListFilters.js +1 -2
  166. package/src/components/CategoryPage/ProductCard.js +2 -0
  167. package/src/components/CategoryPage/ProductGrid.js +5 -0
  168. package/src/components/CategoryPage/ProductGridFragment.gql +8 -0
  169. package/src/components/CategoryPage/ProductGridWindow.js +19 -12
  170. package/src/components/CategoryPage/README.md +11 -0
  171. package/src/components/CategoryPage/WindowedCategoryPage.js +6 -5
  172. package/src/components/Forms/Input.js +3 -6
  173. package/src/components/Layout/Header/ChannelSelector/ChannelSelector.js +3 -0
  174. package/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.js +4 -3
  175. package/src/components/Layout/Header/ChannelSelector/Selector.js +2 -0
  176. package/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.js +3 -1
  177. package/src/components/Layout/Header/TopNav.js +13 -11
  178. package/src/components/LogOut.loadable.js +10 -0
  179. package/src/components/MyPages/MyPagesSidebar.js +0 -1
  180. package/src/components/PreviewRoute.loadable.js +10 -0
  181. package/src/components/ProductList/AddToCart.js +8 -5
  182. package/src/components/ProductList/Favourite.js +2 -2
  183. package/src/components/ProductList/FavouriteCount.js +2 -2
  184. package/src/components/ProductList/Favourites.js +17 -12
  185. package/src/components/ProductList/Lister.js +44 -0
  186. package/src/components/ProductList/Product.js +5 -4
  187. package/src/components/ProductList/ProductLists.gql +33 -5
  188. package/src/components/ProductList/SelectVariant.js +6 -10
  189. package/src/components/ProductList/productListQueries.js +3 -0
  190. package/src/components/ProductPage/AddToCart/AddToCartForm.js +19 -18
  191. package/src/components/ProductPage/AddToCart/ProductToast.js +7 -4
  192. package/src/components/ProductPage/PackageProduct/PackageProduct.js +8 -6
  193. package/src/components/ProductPage/VariantSelector.js +1 -1
  194. package/src/components/{StartPage → SearchPage}/CategoryList.js +6 -4
  195. package/src/components/SearchPage/EmptySearchResults.js +1 -1
  196. package/src/components/Shop.js +52 -76
  197. package/src/components/StartPage/Content/Row.js +0 -37
  198. package/src/components/StartPage/Content/StartPageHero.js +9 -1
  199. package/src/components/StartPage/StartPage.js +0 -13
  200. package/src/components/StartPage/StartPageProductGridFragment.gql +8 -0
  201. package/.vscode/launch.json +0 -11
  202. package/cypress/constants.js +0 -5
  203. package/cypress/integration/addToCart/addToCart.spec.js +0 -27
  204. package/cypress/integration/addToCart/disabledVariations.spec.js +0 -17
  205. package/cypress/integration/addToCart/newslettersubscriber.spec.js +0 -24
  206. package/cypress/integration/addToCart/notifyWhenBackInStock.spec.js +0 -20
  207. package/cypress/integration/addToCart/productConfigurations.spec.js +0 -35
  208. package/cypress/integration/addToCart/productVariations.spec.js +0 -42
  209. package/cypress/integration/addToCart/sizePriceChange.spec.js +0 -20
  210. package/cypress/integration/analytics/gtag.spec.js +0 -90
  211. package/cypress/integration/analytics/releware.spec.js +0 -95
  212. package/cypress/integration/auth/login.spec.js +0 -18
  213. package/cypress/integration/auth/signup.spec.js +0 -98
  214. package/cypress/integration/category_page_spec.js +0 -73
  215. package/cypress/integration/filters.spec.js +0 -103
  216. package/cypress/integration/getbyarticlenumber.spec.js +0 -28
  217. package/cypress/integration/packages.spec.js +0 -85
  218. package/cypress/integration/prefetch_headers_spec.js +0 -26
  219. package/cypress/integration/product_browsing_spec.js +0 -17
  220. package/cypress/integration/search/autocomplete.spec.js +0 -28
  221. package/cypress/integration/search/search_page.spec.js +0 -39
  222. package/cypress/integration/ssr/categorySSR.js +0 -9
  223. package/cypress/integration/ssr/productSSR.js +0 -9
  224. package/cypress/integration/ssr/startPageSSR.js +0 -5
  225. package/cypress/integration/start_page_spec.js +0 -5
  226. package/cypress/integration/stores_page.spec.js +0 -5
  227. package/src/components/StartPage/Campaign.js +0 -162
  228. package/src/components/StartPage/CampaignHeader.js +0 -101
  229. package/src/components/StartPage/ExtraDetails.js +0 -72
  230. package/src/components/StartPage/Readme.md +0 -88
  231. package/src/components/StartPage/campaign.json +0 -20
  232. package/src/components/StartPage/campaignHeader.json +0 -5
  233. package/src/components/StartPage/categoryList.json +0 -65
  234. package/src/components/StartPage/extraDetails.json +0 -6
  235. package/src/components/StartPage/title.json +0 -3
@@ -1,60 +1,53 @@
1
- import DynamicRoute from '@jetshop/core/components/DynamicRoute';
1
+ import React from 'react';
2
+ import { Helmet } from 'react-helmet-async';
3
+ import { Route, Switch } from 'react-router-dom';
4
+
2
5
  import CustomFont from '@jetshop/core/components/Fonts/CustomFont';
6
+ import DynamicRoute from '@jetshop/core/components/DynamicRoute';
3
7
  import PaginationProvider from '@jetshop/core/components/Pagination/PaginationProvider';
4
8
  import { ProductListProvider } from '@jetshop/core/hooks/ProductList/ProductListContext';
5
9
  import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
10
+
6
11
  import GenericError from '@jetshop/ui/ErrorBoundary/Generic';
7
12
  import LoadingBar from '@jetshop/ui/Loading/LoadingBar';
8
13
  import ModalProvider from '@jetshop/ui/Modal/ModalProvider';
9
14
  import ModalRoot from '@jetshop/ui/Modal/ModalRoot';
10
15
  import ScrollRestorationHandler from '@jetshop/ui/ScrollRestorationHandler';
11
- import React from 'react';
12
- import { Helmet } from 'react-helmet-async';
13
- import loadable from '@loadable/component';
14
- import { Route, Switch } from 'react-router-dom';
15
- import loadFontCss from '../fonts/loadFontCss';
16
- import CategoryPreviewQuery from './CategoryPreviewQuery.gql';
17
- import PagePreviewQuery from './PagePreviewQuery.gql';
16
+
18
17
  import Container from './Layout/Container';
19
18
  import Content from './Layout/Content';
20
19
  import Footer from './Layout/Footer/Footer';
21
20
  import Header from './Layout/Header/Header';
21
+
22
+ import ForgotPassword from './Auth/ForgotPassword.loadable';
23
+ import LogInPage from './Auth/LogInPage.loadable';
24
+ import ResetPassword from './Auth/ResetPassword.loadable';
25
+ import SignUpPage from './Auth/Signup/SignUpPage.loadable';
26
+ import CategoryPage from './CategoryPage/CategoryPage.loadable';
27
+ import ContentPage from './ContentPage/ContentPage.loadable';
28
+ import CookieConsent from './CookieConsent';
22
29
  import LoadingPage from './LoadingPage';
30
+ import LogOutPage from './LogOut.loadable';
31
+ import MyPages from './MyPages/MyPages.loadable';
32
+ import NavTreePage from './NavigationTree/NavTreePage.loadable';
33
+ import NotFoundPage from './NotFoundPage.loadable';
34
+ import PreviewRoute from './PreviewRoute.loadable';
23
35
  import { Favourites } from './ProductList/Favourites';
24
36
  import { productListQueries } from './ProductList/productListQueries';
25
- import ProductPreviewQuery from './ProductPreviewQuery.gql';
26
- import routeQuery from './RouteQuery.gql';
27
- import { theme } from './Theme';
28
- import '../globalStyles';
29
- import CookieConsent from './CookieConsent';
30
- import Store from './Store/Store.loadable';
31
- import StoreLocator from './StoreLocator/StoreLocator.loadable';
32
- import NotFoundPage from './NotFoundPage.loadable';
33
- import LogInPage from './Auth/LogInPage.loadable';
34
- import NavTreePage from './NavigationTree/NavTreePage.loadable';
35
- import StartPage from './StartPage/StartPage.loadable';
36
37
  import ProductPage from './ProductPage/ProductPage.loadable';
37
- import CategoryPage from './CategoryPage/CategoryPage.loadable';
38
- import ContentPage from './ContentPage/ContentPage.loadable';
39
38
  import SearchPage from './SearchPage/SearchPage.loadable';
40
- import SignUpPage from './Auth/Signup/SignUpPage.loadable';
41
- import ForgotPassword from './Auth/ForgotPassword.loadable';
42
- import ResetPassword from './Auth/ResetPassword.loadable';
43
- import MyPages from './MyPages/MyPages.loadable';
39
+ import StartPage from './StartPage/StartPage.loadable';
40
+ import Store from './Store/Store.loadable';
41
+ import StoreLocator from './StoreLocator/StoreLocator.loadable';
44
42
 
45
- const LogOutPage = loadable(
46
- () => import('@jetshop/core/components/AuthContext/LogOut'),
47
- {
48
- fallback: <LoadingPage />
49
- }
50
- );
43
+ import categoryPreviewQuery from './CategoryPreviewQuery.gql';
44
+ import pagePreviewQuery from './PagePreviewQuery.gql';
45
+ import productPreviewQuery from './ProductPreviewQuery.gql';
46
+ import routeQuery from './RouteQuery.gql';
51
47
 
52
- const PreviewRoute = loadable(
53
- () => import('@jetshop/core/components/DynamicRoute/PreviewRoute'),
54
- {
55
- fallback: <LoadingPage />
56
- }
57
- );
48
+ import { theme } from './Theme';
49
+ import loadFontCss from '../fonts/loadFontCss';
50
+ import '../globalStyles';
58
51
 
59
52
  function Shop() {
60
53
  const { routes } = useShopConfig();
@@ -76,49 +69,32 @@ function Shop() {
76
69
  <Content>
77
70
  <PaginationProvider defaultProductsPerPage={24}>
78
71
  <Switch>
79
- <Route exact path="/">
80
- <StartPage />
81
- </Route>
82
- <Route path="/favourites">
83
- <Favourites />
84
- </Route>
85
- <Route path={routes.search.path}>
86
- <SearchPage />
87
- </Route>
88
- <Route path={routes.signup.path}>
89
- <SignUpPage />
90
- </Route>
91
- <Route path={routes.login.path}>
92
- <LogInPage />
93
- </Route>
94
- <Route path={routes.logout.path}>
95
- <LogOutPage />
96
- </Route>
97
- <Route path={routes.stores.path}>
98
- <StoreLocator />
99
- </Route>
100
- <Route path={`${routes.store.path}/:id`}>
101
- <Store />
102
- </Route>
103
- <Route path={routes.tree.path}>
104
- <NavTreePage />
105
- </Route>
106
- <Route path={routes.myPages.path}>
107
- <MyPages />
108
- </Route>
109
- <Route exact path={routes.forgotPassword.path}>
110
- <ForgotPassword />
111
- </Route>
112
- <Route path={`${routes.resetPassword.path}/:token`}>
113
- <ResetPassword />
114
- </Route>
72
+ <Route exact path="/" component={StartPage} />
73
+ <Route path="/favourites" component={Favourites} />
74
+ <Route path={routes.search.path} component={SearchPage} />
75
+ <Route path={routes.signup.path} component={SignUpPage} />
76
+ <Route path={routes.login.path} component={LogInPage} />
77
+ <Route path={routes.logout.path} component={LogOutPage} />
78
+ <Route path={routes.stores.path} component={StoreLocator} />
79
+ <Route path={`${routes.store.path}/:id`} component={Store} />
80
+ <Route path={routes.tree.path} component={NavTreePage} />
81
+ <Route path={routes.myPages.path} component={MyPages} />
82
+ <Route
83
+ exact
84
+ path={routes.forgotPassword.path}
85
+ component={ForgotPassword}
86
+ />
87
+ <Route
88
+ path={`${routes.resetPassword.path}/:token`}
89
+ component={ResetPassword}
90
+ />
115
91
  <Route
116
92
  path="/preview"
117
93
  render={props => (
118
94
  <PreviewRoute
119
- productQuery={ProductPreviewQuery}
120
- categoryQuery={CategoryPreviewQuery}
121
- pageQuery={PagePreviewQuery}
95
+ productQuery={productPreviewQuery}
96
+ categoryQuery={categoryPreviewQuery}
97
+ pageQuery={pagePreviewQuery}
122
98
  productPage={ProductPage}
123
99
  categoryPage={CategoryPage}
124
100
  contentPage={ContentPage}
@@ -2,9 +2,6 @@ import React from 'react';
2
2
  import MaxWidth from '../../Layout/MaxWidth';
3
3
  import { styled } from 'linaria/react';
4
4
  import { theme } from '../../Theme';
5
- import { ReactComponent as Caret } from '@jetshop/ui/svg/Carrot.svg';
6
- import { Above } from '@jetshop/ui/Breakpoints';
7
- import { useAnimation, swipeEffect } from '@jetshop/ui/hooks';
8
5
 
9
6
  const Container = styled('div')`
10
7
  position: relative;
@@ -37,40 +34,6 @@ const ItemsContainer = styled('div')`
37
34
  }
38
35
  `;
39
36
 
40
- const Button = styled('button')`
41
- position: absolute;
42
- font-family: initial;
43
- margin: 0 10px;
44
- top: 50%;
45
- transform: translateY(-50%);
46
- z-index: 2;
47
- width: 40px;
48
- height: 40px;
49
- border-radius: 50%;
50
- background: rgba(255, 255, 255, 0.2);
51
-
52
- &:focus,
53
- &:active {
54
- outline: none;
55
- }
56
-
57
- &:hover {
58
- background: rgba(255, 255, 255, 0.6);
59
- }
60
-
61
- &.left svg {
62
- transform: rotateZ(90deg);
63
- }
64
-
65
- &.right {
66
- right: 0;
67
-
68
- svg {
69
- transform: rotateZ(-90deg);
70
- }
71
- }
72
- `;
73
-
74
37
  const Row = ({ header, children }) => {
75
38
  return (
76
39
  <MaxWidth>
@@ -66,12 +66,20 @@ const heroStyles = css`
66
66
  justify-content: center;
67
67
  `;
68
68
 
69
- const StartPageHero = ({ header, text, buttonText, buttonLink, imageSrc }) => (
69
+ const StartPageHero = ({
70
+ header,
71
+ text,
72
+ buttonText,
73
+ buttonLink,
74
+ imageSrc,
75
+ isAboveFold
76
+ }) => (
70
77
  <StartPageHeroWrapper>
71
78
  <Image
72
79
  fillAvailableSpace={true}
73
80
  src={imageSrc.value}
74
81
  className={heroStyles}
82
+ critical={isAboveFold.value}
75
83
  >
76
84
  <Container>
77
85
  <Title>{header.value}</Title>
@@ -2,7 +2,6 @@ import StartPageRenderer from '@jetshop/ui/StartPageRenderer';
2
2
  import React from 'react';
3
3
  import { useQuery } from 'react-apollo';
4
4
  import { styled } from 'linaria/react';
5
- import MaxWidth from '../Layout/MaxWidth';
6
5
  import LoadingPage from '../LoadingPage';
7
6
  import StartPageCampaign from './Content/StartPageCampaign';
8
7
  import StartPageCategories from './Content/StartPageCategories';
@@ -12,8 +11,6 @@ import StartPageProductGrid from './Content/StartPageProductGrid';
12
11
  import startPageQuery from './StartPageQuery.gql';
13
12
  import { StartPageCategoryItem } from './Content/StartPageCategories';
14
13
 
15
- import { theme } from '../Theme';
16
-
17
14
  const startPageComponents = {
18
15
  HERO: StartPageHero,
19
16
  HTML: StartPageHTMLContent,
@@ -29,16 +26,6 @@ const StartPageWrapper = styled('div')`
29
26
  flex-direction: column;
30
27
  `;
31
28
 
32
- export const MainSectionWrapper = styled(MaxWidth)`
33
- width: 100%;
34
- align-self: center;
35
- padding-left: 1.5rem;
36
- padding-right: 1.5rem;
37
- ${theme.below.sm} {
38
- padding-left: 0px;
39
- padding-right: 0px;
40
- }
41
- `;
42
29
  const StartPage = ({ startPageId }) => {
43
30
  const result = useQuery(startPageQuery, {
44
31
  variables: { startPageId: startPageId }
@@ -24,4 +24,12 @@ fragment StartPageProductGrid on Product {
24
24
  badges {
25
25
  ...Badge
26
26
  }
27
+ customFields {
28
+ key
29
+ type
30
+ title
31
+ ... on CustomStringField {
32
+ stringValue: value
33
+ }
34
+ }
27
35
  }
@@ -1,11 +0,0 @@
1
- {
2
- "configurations": [
3
- {
4
- "type": "node-terminal",
5
- "name": "Run Script: start",
6
- "request": "launch",
7
- "command": "yarn run start",
8
- "cwd": "${workspaceFolder}"
9
- }
10
- ]
11
- }
@@ -1,5 +0,0 @@
1
- export const PRODUCT_URL = 'se/accessories/watches/watch-classic-504';
2
- export const OUT_OF_STOCK_PRODUCT_URL = 'se/preview?articlenumber=224733';
3
- export const CATEGORY_URL = 'se/accessories/watches';
4
- export const ARTICLENUMBER_URL = 'se/articlenumber/6952315';
5
- export const US_ARTICLENUMBER_URL = 'int/articlenumber/6952315';
@@ -1,27 +0,0 @@
1
- import { PRODUCT_URL, OUT_OF_STOCK_PRODUCT_URL } from '../../constants';
2
-
3
- describe('Add to cart tests', () => {
4
- it('Will add add a basic product to the cart', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('button[data-testid="add-to-cart"]').click();
7
- cy.get('[data-testid="product-toast"]').should('exist');
8
- cy.get('[data-testid="cart-button"]').click();
9
- cy.get('[data-testid="item-name"]').should('not.be.empty');
10
- cy.get('[data-testid="increment-quantity"]').click();
11
- cy.get('[data-testid="item-quantity"]').should('contain', 2);
12
- cy.get('[data-testid="remove-from-cart"]').click();
13
- cy.get('[data-testid="item-name"]').should('not.exist');
14
- });
15
- it('Add to cart button is disabled if product is out of stock', () => {
16
- cy.visit(OUT_OF_STOCK_PRODUCT_URL);
17
- cy.get('button[data-testid="add-to-cart"]').should('be.disabled');
18
- });
19
- it('Checkout button is linked to the checkout', () => {
20
- cy.visit(PRODUCT_URL);
21
- cy.get('button[data-testid="add-to-cart"]').click();
22
- cy.get('button[data-testid="cart-button"]').click();
23
- cy.get('[data-testid="checkout-button"]')
24
- .should('have.attr', 'href')
25
- .and('include', 'externalcheckout');
26
- });
27
- });
@@ -1,17 +0,0 @@
1
- const PRODUCT_WITH_INVALID_VARIATIONS_URL = '/furniture/toldbod-pendant';
2
- describe('Disabled variations', () => {
3
- it('Will add a product with attributes if they have been selected', () => {
4
- cy.visit(PRODUCT_WITH_INVALID_VARIATIONS_URL);
5
- cy.get('button[data-testid="add-to-cart"]').click();
6
- cy.get('[data-testid="product-toast"]').should('not.exist');
7
- cy.findByText('Ø 250').click();
8
- cy.get('#option-Color').click();
9
- cy.findByText('White', { selector: 'li[role=menuitem]' }).click();
10
- cy.get('button[data-testid="add-to-cart"]').should('be.disabled');
11
- cy.get('#option-Color').click();
12
- cy.findByText('Black', { selector: 'li[role=menuitem]' }).click();
13
- cy.findByText('Ø 250').click();
14
- cy.get('button[data-testid="add-to-cart"]').click();
15
- cy.get('[data-testid="product-toast"]').should('exist');
16
- });
17
- });
@@ -1,24 +0,0 @@
1
- describe('Notify when back test', () => {
2
- it('Subscribes to newsletter with a random email', () => {
3
- cy.visit('/');
4
- cy.get(
5
- '[data-testid="newsletter-subscription-input"]'
6
- ).type('edgardavids@glasses.com', { force: true });
7
- cy.get('button[data-testid="newsletter-subscription-submit"]').click();
8
- cy.get('p[data-testid="newsletter-subscription-success"]').should(
9
- 'contain',
10
- 'You are now subscribed'
11
- );
12
- });
13
-
14
- it('Cannot subscribe with an invalid email', () => {
15
- cy.visit('/');
16
- cy.get(
17
- '[data-testid="newsletter-subscription-input"]'
18
- ).type('edgardavids.com', { force: true });
19
- cy.get('button[data-testid="newsletter-subscription-submit"]').click();
20
- cy.get('p[data-testid="newsletter-subscription-success"]').should(
21
- 'not.exist'
22
- );
23
- });
24
- });
@@ -1,20 +0,0 @@
1
- const PRODUCT_URL = 'accessories/glasses-black';
2
-
3
- describe('Notify when back test', () => {
4
- it('Will fill out notify when back with a test email', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('button[data-testid="add-to-cart"]').should('not.exist');
7
- cy.get('button[data-testid="notify-when-back-button"]').click();
8
- cy.get('input[data-testid="notify-when-back-input"]').type(
9
- 'test@example.com',
10
- {
11
- force: true
12
- }
13
- );
14
- cy.get('button[data-testid="notify-when-back-ok"]').click({ force: true });
15
- cy.get('p[data-testid="notify-when-back-success"]').should(
16
- 'contain',
17
- 'You are now subscribed'
18
- );
19
- });
20
- });
@@ -1,35 +0,0 @@
1
- const PRODUCT_URL = 'furniture/black-leather-sofa';
2
-
3
- describe('Add to cart product configuration tests', () => {
4
- it('Will add add a product with configurations', () => {
5
- cy.visit(PRODUCT_URL);
6
-
7
- cy.get('.price').should('contain', '420');
8
-
9
- cy.get('#option-Head').click();
10
- cy.findAllByRole('menuitem', { name: 'putter' }).click();
11
- cy.get('#option-Head').should('contain', 'putter');
12
-
13
- cy.get('.price').should('contain', '370');
14
-
15
- cy.get('#option-stick').click();
16
- cy.findAllByRole('menuitem', { name: 'shiny' }).click();
17
- cy.get('#option-stick').should('contain', 'shiny');
18
-
19
- cy.get('.price').should('contain', '470');
20
-
21
- cy.get('#option-grip').click();
22
- cy.findAllByRole('menuitem', { name: 'plastic' }).click();
23
- cy.get('#option-grip').should('contain', 'plastic');
24
-
25
- cy.get('.price').should('contain', '455');
26
-
27
- cy.findByRole('button', { name: /add to cart/i }).click();
28
-
29
- cy.get('[data-testid="product-toast"]').should('exist');
30
- cy.get('[data-testid="cart-button"]').click();
31
- cy.get('[data-testid="item-name"]').should('not.be.empty');
32
- cy.get('[data-testid="item-price"]').should('contain', '455');
33
- cy.get('[data-testid="cart-button"]').click();
34
- });
35
- });
@@ -1,42 +0,0 @@
1
- const PRODUCT_WITH_VARIATIONS_URL = 'furniture/armchair-lord';
2
-
3
- describe('Product variants', () => {
4
- it('can be successfully selected and added to cart', () => {
5
- cy.visit(PRODUCT_WITH_VARIATIONS_URL);
6
-
7
- cy.get('button[data-testid="add-to-cart"]').click();
8
- cy.get('[data-testid="product-toast"]').should('not.exist');
9
- cy.findByText('Small').click();
10
- cy.findByText('JA').click();
11
- cy.get('button[data-testid="add-to-cart"]').click();
12
- cy.get('[data-testid="product-toast"]').should('not.exist');
13
- cy.get('input[data-testid="Skriv in ditt önskade tryck här-input"]').type(
14
- 'Hello, World'
15
- );
16
- cy.get('button[data-testid="add-to-cart"]').click();
17
- cy.get('[data-testid="product-toast"]').should('exist');
18
- cy.get('[data-testid="cart-button"]').click();
19
- cy.get('[data-testid="item-name"]').should('not.be.empty');
20
- cy.get('[data-testid="increment-quantity"]').click();
21
- cy.get('[data-testid="item-quantity"]').should('contain', 2);
22
- cy.get('[data-testid="remove-from-cart"]').click();
23
- cy.get('[data-testid="item-name"]').should('not.exist');
24
- });
25
-
26
- describe('Preselection', () => {
27
- it('preselects variant when included in the url', () => {
28
- cy.visit('accessories/belts/belt-light?att=Mzg=');
29
- cy.get('[aria-pressed="true"]').should('contain', '38');
30
- });
31
-
32
- it('preselects the cheapest variant by default', () => {
33
- cy.visit('accessories/belts/belt-light');
34
- cy.get('[aria-pressed="true"]').should('contain', '37');
35
-
36
- cy.visit('/furniture/aj-floor-lamp');
37
- cy.get('[aria-pressed="true"]')
38
- .should('contain', 'Black')
39
- .should('contain', '140');
40
- });
41
- });
42
- });
@@ -1,20 +0,0 @@
1
- const PRODUCT_URL = 'accessories/belt-light';
2
-
3
- describe('Produce price', () => {
4
- it('changes when variant is changed', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('.new-price').should('contain', '499');
7
- cy.findByText('36').click();
8
- cy.get('.new-price').should('contain', '563');
9
- cy.findByText('38').click();
10
- cy.get('.new-price').should('contain', '500');
11
- cy.get('button[data-testid="add-to-cart"]').click();
12
- cy.get('[data-testid="product-toast"]').should('exist');
13
- cy.get('[data-testid="cart-button"]').click();
14
- cy.get('[data-testid="item-name"]').should('not.be.empty');
15
- cy.get('.price')
16
- .first()
17
- .should('contain', '500');
18
- cy.get('[data-testid="cart-button"]').click();
19
- });
20
- });
@@ -1,90 +0,0 @@
1
- import { callsTo } from '../../support/dataLayer';
2
- import { PRODUCT_URL, CATEGORY_URL } from '../../constants';
3
- const eventMatcher = eventName => [
4
- function eventMatcher(calls) {
5
- return calls.find(call => call[0] === 'event' && call[1] === eventName);
6
- },
7
- `Event ${eventName} is pushed to dataLayer`
8
- ];
9
-
10
- const pageviewMatcher = path => [
11
- function pageviewMatcher(calls) {
12
- const pageViewCall = calls.find(
13
- call => call[0] === 'event' && call[1] === 'page_view'
14
- );
15
- return pageViewCall.length > 0;
16
- },
17
- `Page View for "${path}" is pushed to dataLayer`
18
- ];
19
-
20
- describe('Analytics: GTAG – Google Analytics', () => {
21
- it('Start Page: Should trigger view events', () => {
22
- cy.visit('/');
23
- cy.get('@gtm_dataLayer_push').should(push => {
24
- expect(callsTo(push)).to.satisfy(...eventMatcher('view_item_list'));
25
- expect(callsTo(push)).to.satisfy(...pageviewMatcher('/'));
26
- });
27
- });
28
-
29
- it('Category Page: Should trigger view events', () => {
30
- cy.visit(CATEGORY_URL);
31
- cy.get('@gtm_dataLayer_push').should(push => {
32
- expect(callsTo(push)).to.satisfy(...eventMatcher('view_item_list'));
33
- expect(callsTo(push)).to.satisfy(...pageviewMatcher(CATEGORY_URL));
34
- });
35
- });
36
-
37
- it('Category Page: Should trigger click events', () => {
38
- cy.visit(CATEGORY_URL);
39
-
40
- cy.findAllByTestId('product')
41
- .first()
42
- .click();
43
-
44
- cy.get('@gtm_dataLayer_push').should(push => {
45
- expect(callsTo(push)).to.satisfy(...eventMatcher('select_content'));
46
- });
47
- });
48
-
49
- it('Product Page: Should trigger view events', () => {
50
- cy.visit(PRODUCT_URL);
51
- cy.get('@gtm_dataLayer_push').should(push => {
52
- expect(callsTo(push)).to.satisfy(...eventMatcher('view_item'));
53
- expect(callsTo(push)).to.satisfy(...pageviewMatcher(PRODUCT_URL));
54
- });
55
- });
56
-
57
- it('Product Page: Should trigger cart events', () => {
58
- cy.visit(PRODUCT_URL);
59
-
60
- // Add to cart
61
- cy.findByTestId('add-to-cart').click({ force: true });
62
- cy.get('@gtm_dataLayer_push').should(push => {
63
- expect(callsTo(push)).to.satisfy(...eventMatcher('add_to_cart'));
64
- });
65
-
66
- // Remove from to cart
67
- cy.findByTestId('cart-button').click({ force: true });
68
- cy.findByTestId('remove-from-cart')
69
- .first()
70
- .click();
71
- cy.get('@gtm_dataLayer_push').should(push => {
72
- expect(callsTo(push)).to.satisfy(...eventMatcher('remove_from_cart'));
73
- });
74
- });
75
-
76
- it('Product Page: Attribute click events to the appropriate list and apppropriate currency', () => {
77
- cy.visit(CATEGORY_URL);
78
-
79
- cy.findAllByTestId('product')
80
- .first()
81
- .click();
82
-
83
- cy.findByTestId('add-to-cart').click({ force: true });
84
- cy.get('@gtm_dataLayer_push').should(push => {
85
- expect(callsTo(push).pop()[2].currency).to.equal('SEK');
86
- expect(callsTo(push).pop()[2].items[0].list_name).to.equal('Watches');
87
- expect(callsTo(push)).to.satisfy(...eventMatcher('add_to_cart'));
88
- });
89
- });
90
- });