@faststore/core 2.0.153-alpha.0 → 2.0.156-alpha.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 (170) hide show
  1. package/.turbo/turbo-build.log +6 -8
  2. package/@generated/graphql/index.ts +5 -0
  3. package/@generated/graphql/persisted.json +1 -1
  4. package/CHANGELOG.md +10 -0
  5. package/cms/faststore/sections.json +3 -8
  6. package/faststore.config.js +1 -0
  7. package/package.json +5 -5
  8. package/src/components/cms/GlobalSections.tsx +3 -25
  9. package/src/components/cms/RenderSections.tsx +37 -2
  10. package/src/components/sections/CrossSellingShelf/CrossSellingShelf.tsx +17 -3
  11. package/src/components/sections/ProductShelf/ProductShelf.tsx +7 -76
  12. package/src/components/sections/Section/section.scss +0 -7
  13. package/src/components/{sections → ui}/ProductShelf/Overrides.tsx +2 -2
  14. package/src/components/ui/ProductShelf/ProductShelf.tsx +106 -0
  15. package/src/components/ui/ProductShelf/index.ts +2 -0
  16. package/src/pages/[...slug].tsx +1 -7
  17. package/src/sdk/session/index.ts +1 -0
  18. package/.next/BUILD_ID +0 -1
  19. package/.next/build-manifest.json +0 -132
  20. package/.next/cache/.tsbuildinfo +0 -1
  21. package/.next/cache/config.json +0 -7
  22. package/.next/cache/eslint/.cache_1gneedd +0 -1
  23. package/.next/cache/next-server.js.nft.json +0 -1
  24. package/.next/cache/webpack/client-production/0.pack +0 -0
  25. package/.next/cache/webpack/client-production/index.pack +0 -0
  26. package/.next/cache/webpack/server-production/0.pack +0 -0
  27. package/.next/cache/webpack/server-production/index.pack +0 -0
  28. package/.next/export-marker.json +0 -1
  29. package/.next/images-manifest.json +0 -1
  30. package/.next/next-server.js.nft.json +0 -1
  31. package/.next/package.json +0 -1
  32. package/.next/prerender-manifest.json +0 -1
  33. package/.next/react-loadable-manifest.json +0 -48
  34. package/.next/required-server-files.json +0 -1
  35. package/.next/routes-manifest.json +0 -1
  36. package/.next/server/chunks/104.js +0 -703
  37. package/.next/server/chunks/123.js +0 -58
  38. package/.next/server/chunks/143.js +0 -106
  39. package/.next/server/chunks/183.js +0 -80
  40. package/.next/server/chunks/247.js +0 -61
  41. package/.next/server/chunks/280.js +0 -324
  42. package/.next/server/chunks/287.js +0 -58
  43. package/.next/server/chunks/289.js +0 -229
  44. package/.next/server/chunks/312.js +0 -697
  45. package/.next/server/chunks/336.js +0 -821
  46. package/.next/server/chunks/350.js +0 -142
  47. package/.next/server/chunks/368.js +0 -253
  48. package/.next/server/chunks/401.js +0 -7241
  49. package/.next/server/chunks/431.js +0 -7241
  50. package/.next/server/chunks/502.js +0 -600
  51. package/.next/server/chunks/557.js +0 -132
  52. package/.next/server/chunks/576.js +0 -80
  53. package/.next/server/chunks/597.js +0 -169
  54. package/.next/server/chunks/608.js +0 -644
  55. package/.next/server/chunks/644.js +0 -235
  56. package/.next/server/chunks/664.js +0 -3401
  57. package/.next/server/chunks/676.js +0 -32
  58. package/.next/server/chunks/701.js +0 -87
  59. package/.next/server/chunks/74.js +0 -2690
  60. package/.next/server/chunks/82.js +0 -371
  61. package/.next/server/chunks/854.js +0 -72
  62. package/.next/server/chunks/859.js +0 -959
  63. package/.next/server/chunks/874.js +0 -487
  64. package/.next/server/chunks/886.js +0 -120
  65. package/.next/server/chunks/907.js +0 -1803
  66. package/.next/server/chunks/98.js +0 -124
  67. package/.next/server/chunks/font-manifest.json +0 -1
  68. package/.next/server/font-manifest.json +0 -1
  69. package/.next/server/middleware-build-manifest.js +0 -1
  70. package/.next/server/middleware-manifest.json +0 -6
  71. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  72. package/.next/server/pages/404.js +0 -393
  73. package/.next/server/pages/404.js.nft.json +0 -1
  74. package/.next/server/pages/500.js +0 -395
  75. package/.next/server/pages/500.js.nft.json +0 -1
  76. package/.next/server/pages/[...slug].js +0 -733
  77. package/.next/server/pages/[...slug].js.nft.json +0 -1
  78. package/.next/server/pages/[slug]/p.js +0 -2458
  79. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  80. package/.next/server/pages/_app.js +0 -368
  81. package/.next/server/pages/_app.js.nft.json +0 -1
  82. package/.next/server/pages/_document.js +0 -304
  83. package/.next/server/pages/_document.js.nft.json +0 -1
  84. package/.next/server/pages/_error.js +0 -164
  85. package/.next/server/pages/_error.js.nft.json +0 -1
  86. package/.next/server/pages/account.js +0 -370
  87. package/.next/server/pages/account.js.nft.json +0 -1
  88. package/.next/server/pages/api/graphql.js +0 -315
  89. package/.next/server/pages/api/graphql.js.nft.json +0 -1
  90. package/.next/server/pages/api/preview.js +0 -118
  91. package/.next/server/pages/api/preview.js.nft.json +0 -1
  92. package/.next/server/pages/checkout.js +0 -370
  93. package/.next/server/pages/checkout.js.nft.json +0 -1
  94. package/.next/server/pages/en-US/404.html +0 -81
  95. package/.next/server/pages/en-US/404.json +0 -1
  96. package/.next/server/pages/en-US/500.html +0 -81
  97. package/.next/server/pages/en-US/500.json +0 -1
  98. package/.next/server/pages/en-US/account.html +0 -81
  99. package/.next/server/pages/en-US/account.json +0 -1
  100. package/.next/server/pages/en-US/checkout.html +0 -81
  101. package/.next/server/pages/en-US/checkout.json +0 -1
  102. package/.next/server/pages/en-US/login.html +0 -81
  103. package/.next/server/pages/en-US/login.json +0 -1
  104. package/.next/server/pages/en-US/s.html +0 -81
  105. package/.next/server/pages/en-US/s.json +0 -1
  106. package/.next/server/pages/en-US.html +0 -81
  107. package/.next/server/pages/en-US.json +0 -1
  108. package/.next/server/pages/index.js +0 -966
  109. package/.next/server/pages/index.js.nft.json +0 -1
  110. package/.next/server/pages/login.js +0 -375
  111. package/.next/server/pages/login.js.nft.json +0 -1
  112. package/.next/server/pages/s.js +0 -473
  113. package/.next/server/pages/s.js.nft.json +0 -1
  114. package/.next/server/pages-manifest.json +0 -16
  115. package/.next/server/webpack-api-runtime.js +0 -229
  116. package/.next/server/webpack-runtime.js +0 -229
  117. package/.next/static/Jdc52lXcDWIk2D0wQ-Z4p/_buildManifest.js +0 -1
  118. package/.next/static/Jdc52lXcDWIk2D0wQ-Z4p/_ssgManifest.js +0 -1
  119. package/.next/static/chunks/0-0e3914d9fc148f74.js +0 -1
  120. package/.next/static/chunks/143.dd8a556e6957baa1.js +0 -1
  121. package/.next/static/chunks/226.b57e10ad9932f88c.js +0 -1
  122. package/.next/static/chunks/336.0846f48eccce57e4.js +0 -1
  123. package/.next/static/chunks/366-c0bfd9890048babf.js +0 -1
  124. package/.next/static/chunks/377-b3616792e1f5f651.js +0 -1
  125. package/.next/static/chunks/391-47b923ef44945418.js +0 -1
  126. package/.next/static/chunks/495.0ecd099878b2a36d.js +0 -1
  127. package/.next/static/chunks/502.ae82de1669112b15.js +0 -1
  128. package/.next/static/chunks/545-1d3d08edfd2ee4c6.js +0 -1
  129. package/.next/static/chunks/597.c5cf3fbeae5ceb63.js +0 -1
  130. package/.next/static/chunks/64.ebbe1d2b40f980c7.js +0 -1
  131. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  132. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  133. package/.next/static/chunks/98.97381d2021f86cd9.js +0 -1
  134. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  135. package/.next/static/chunks/main-fd466221927468fd.js +0 -1
  136. package/.next/static/chunks/pages/404-459452495a0df278.js +0 -1
  137. package/.next/static/chunks/pages/500-008e30c48eceebed.js +0 -1
  138. package/.next/static/chunks/pages/[...slug]-bd1885159f7dfbba.js +0 -1
  139. package/.next/static/chunks/pages/[slug]/p-fa35dd93d53f75f6.js +0 -1
  140. package/.next/static/chunks/pages/_app-3e4e7e579cb0681a.js +0 -1
  141. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  142. package/.next/static/chunks/pages/account-46263f0c100c3eae.js +0 -1
  143. package/.next/static/chunks/pages/checkout-20bb3710b24df3b6.js +0 -1
  144. package/.next/static/chunks/pages/index-49b7ee570f7cc4b7.js +0 -1
  145. package/.next/static/chunks/pages/login-f9d316d261fcc062.js +0 -1
  146. package/.next/static/chunks/pages/s-1cbe740b5b781d28.js +0 -1
  147. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  148. package/.next/static/chunks/webpack-eb5ed34c93d07fac.js +0 -1
  149. package/.next/static/css/1323734429a8aa40.css +0 -1
  150. package/.next/static/css/13a4da555ff5e3be.css +0 -1
  151. package/.next/static/css/2e00f7ba49c754b3.css +0 -1
  152. package/.next/static/css/7d822a137c54a781.css +0 -1
  153. package/.next/static/css/a0feab89b7648c5c.css +0 -1
  154. package/.next/static/css/a13a9f9cd349d906.css +0 -1
  155. package/.next/static/css/a45618030b16a245.css +0 -1
  156. package/.next/static/css/bde408cc006e64f8.css +0 -1
  157. package/.next/static/css/d462d9478ce00021.css +0 -1
  158. package/.next/static/css/e02cdad8fc000339.css +0 -1
  159. package/.next/trace +0 -69
  160. package/public/~partytown/debug/partytown-atomics.js +0 -556
  161. package/public/~partytown/debug/partytown-media.js +0 -374
  162. package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
  163. package/public/~partytown/debug/partytown-sw.js +0 -59
  164. package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
  165. package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
  166. package/public/~partytown/debug/partytown.js +0 -72
  167. package/public/~partytown/partytown-atomics.js +0 -2
  168. package/public/~partytown/partytown-media.js +0 -2
  169. package/public/~partytown/partytown-sw.js +0 -2
  170. package/public/~partytown/partytown.js +0 -2
@@ -1,733 +0,0 @@
1
- (() => {
2
- var exports = {};
3
- exports.id = 330;
4
- exports.ids = [330];
5
- exports.modules = {
6
-
7
- /***/ 8570:
8
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
-
10
- "use strict";
11
-
12
- // EXPORTS
13
- __webpack_require__.d(__webpack_exports__, {
14
- "Z": () => (/* reexport */ ScrollToTopButton_ScrollToTopButton)
15
- });
16
-
17
- // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
18
- var Icon = __webpack_require__(5045);
19
- // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js
20
- var Button = __webpack_require__(7578);
21
- // EXTERNAL MODULE: ./src/components/sections/Section/index.ts
22
- var Section = __webpack_require__(7067);
23
- // EXTERNAL MODULE: ./src/components/sections/ScrollToTopButton/section.module.scss
24
- var section_module = __webpack_require__(7636);
25
- var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
26
- // EXTERNAL MODULE: external "react/jsx-runtime"
27
- var jsx_runtime_ = __webpack_require__(997);
28
- ;// CONCATENATED MODULE: ./src/components/sections/ScrollToTopButton/ScrollToTopButton.tsx
29
-
30
-
31
-
32
-
33
-
34
- function ScrollToTopButton({
35
- text = 'Scroll to top',
36
- icon = /*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
37
- name: "CaretUp",
38
- width: 16,
39
- height: 16,
40
- weight: "bold"
41
- }),
42
- iconPosition = 'left'
43
- }) {
44
- return /*#__PURE__*/jsx_runtime_.jsx(Section/* default */.Z, {
45
- className: `${(section_module_default()).section} section-scroll-to-top-button`,
46
- children: /*#__PURE__*/jsx_runtime_.jsx(Button/* default */.Z, {
47
- variant: "secondary",
48
- icon: icon,
49
- iconPosition: iconPosition,
50
- onClick: () => window.scrollTo(0, 0),
51
- children: text
52
- })
53
- });
54
- }
55
-
56
- /* harmony default export */ const ScrollToTopButton_ScrollToTopButton = (ScrollToTopButton);
57
- ;// CONCATENATED MODULE: ./src/components/sections/ScrollToTopButton/index.ts
58
-
59
-
60
- /***/ }),
61
-
62
- /***/ 1875:
63
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
64
-
65
- "use strict";
66
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
67
- __webpack_require__.r(__webpack_exports__);
68
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
69
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
70
- /* harmony export */ "getStaticPaths": () => (/* binding */ getStaticPaths),
71
- /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
72
- /* harmony export */ });
73
- /* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4826);
74
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6142);
75
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(2339);
76
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(1197);
77
- /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6641);
78
- /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_seo__WEBPACK_IMPORTED_MODULE_1__);
79
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1853);
80
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
81
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6689);
82
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
83
- /* harmony import */ var src_components_sections_Breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2874);
84
- /* harmony import */ var src_components_sections_Hero__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9557);
85
- /* harmony import */ var src_components_sections_ProductGallery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7873);
86
- /* harmony import */ var src_components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7104);
87
- /* harmony import */ var src_components_sections_ScrollToTopButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8570);
88
- /* harmony import */ var src_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(8459);
89
- /* harmony import */ var src_sdk_search_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1523);
90
- /* harmony import */ var src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2541);
91
- /* harmony import */ var src_server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(9685);
92
- /* harmony import */ var src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4074);
93
- /* harmony import */ var src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2224);
94
- /* harmony import */ var src_customizations_components__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(859);
95
- /* harmony import */ var src_server_cms__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(5764);
96
- /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(7183);
97
- /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_faststore_config__WEBPACK_IMPORTED_MODULE_16__);
98
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(997);
99
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__);
100
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_components_sections_ProductGallery__WEBPACK_IMPORTED_MODULE_6__, src_components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_7__, src_server__WEBPACK_IMPORTED_MODULE_11__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__, src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_13__]);
101
- ([src_components_sections_ProductGallery__WEBPACK_IMPORTED_MODULE_6__, src_components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_7__, src_server__WEBPACK_IMPORTED_MODULE_11__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__, src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_13__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
102
- const _excluded = ["page", "globalSections"];
103
-
104
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
105
-
106
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
107
-
108
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
109
-
110
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
111
-
112
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- /**
137
- * Sections: Components imported from each store's custom components and '../components/sections' only.
138
- * Do not import or render components from any other folder in here.
139
- */
140
- const COMPONENTS = _objectSpread({
141
- Breadcrumb: src_components_sections_Breadcrumb__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z,
142
- Hero: src_components_sections_Hero__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z,
143
- ProductGallery: src_components_sections_ProductGallery__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z
144
- }, src_customizations_components__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z);
145
-
146
- const useSearchParams = ({
147
- collection,
148
- sort
149
- }) => {
150
- const selectedFacets = collection?.meta.selectedFacets;
151
- const {
152
- asPath
153
- } = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
154
- const hrefState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
155
- const url = new URL(asPath, 'http://localhost');
156
- const shouldUpdateDefaultSort = sort && !url.searchParams.has('sort');
157
-
158
- if (shouldUpdateDefaultSort) {
159
- url.searchParams.set('sort', sort);
160
- }
161
-
162
- const newState = (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_18__/* .parse */ .Q)(url); // In case we are in an incomplete url
163
-
164
- if (newState.selectedFacets.length === 0) {
165
- newState.selectedFacets = selectedFacets;
166
- }
167
-
168
- return (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z)(newState).href;
169
- }, [asPath, selectedFacets, sort]);
170
- return (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_18__/* .parse */ .Q)(new URL(hrefState)), [hrefState]);
171
- };
172
-
173
- function Page(_ref) {
174
- let {
175
- page: {
176
- sections,
177
- settings
178
- },
179
- globalSections
180
- } = _ref,
181
- otherProps = _objectWithoutProperties(_ref, _excluded);
182
-
183
- const {
184
- collection
185
- } = otherProps;
186
- const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
187
- const applySearchState = (0,src_sdk_search_state__WEBPACK_IMPORTED_MODULE_9__/* .useApplySearchState */ .j)();
188
- const searchParams = useSearchParams(_objectSpread(_objectSpread({}, otherProps), {}, {
189
- sort: settings?.productGallery?.sortBySelection
190
- }));
191
- const {
192
- page,
193
- sort
194
- } = searchParams;
195
- const title = collection?.seo.title ?? (_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().seo.title);
196
- const description = collection?.seo.description ?? (_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().seo.title);
197
- const pageQuery = page !== 0 ? `?page=${page}` : '';
198
- const sortQuery = !!sort ? `&sort=${sort}` : '';
199
- const [pathname] = router.asPath.split('?');
200
- const canonical = `${(_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().storeUrl)}${pathname}${pageQuery}${sortQuery}`;
201
- return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, _objectSpread(_objectSpread({}, globalSections), {}, {
202
- children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(_faststore_sdk__WEBPACK_IMPORTED_MODULE_20__/* .Provider */ .z, _objectSpread(_objectSpread({
203
- onChange: applySearchState,
204
- itemsPerPage: settings?.productGallery?.itemsPerPage ?? src_constants__WEBPACK_IMPORTED_MODULE_21__/* .ITEMS_PER_PAGE */ .g
205
- }, searchParams), {}, {
206
- children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.NextSeo, {
207
- title: title,
208
- description: description,
209
- titleTemplate: (_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().seo.titleTemplate),
210
- canonical: canonical,
211
- openGraph: {
212
- type: 'website',
213
- title,
214
- description
215
- }
216
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.BreadcrumbJsonLd, {
217
- itemListElements: collection?.breadcrumbList.itemListElement ?? []
218
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
219
- context: collection,
220
- sections: sections,
221
- components: COMPONENTS
222
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
223
- first: src_constants__WEBPACK_IMPORTED_MODULE_21__/* .ITEMS_PER_SECTION */ .K,
224
- sort: "score_desc",
225
- title: "You might also like",
226
- withDivisor: true
227
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_sections_ScrollToTopButton__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {})]
228
- }))
229
- }));
230
- }
231
-
232
- const query = "ServerCollectionPageQuery";
233
- const getStaticProps = async ({
234
- params,
235
- previewData
236
- }) => {
237
- const [{
238
- data,
239
- errors = []
240
- }, page, globalSections] = await Promise.all([(0,src_server__WEBPACK_IMPORTED_MODULE_11__/* .execute */ .h)({
241
- variables: {
242
- slug: params?.slug.join('/') ?? ''
243
- },
244
- operationName: query
245
- }), (0,src_server_cms__WEBPACK_IMPORTED_MODULE_15__/* .getPage */ .f)(_objectSpread(_objectSpread({}, previewData?.contentType === 'plp' ? previewData : null), {}, {
246
- contentType: 'plp'
247
- })), (0,src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__/* .getGlobalSectionsData */ .Tc)(previewData)]);
248
- const notFound = errors.find(_faststore_api__WEBPACK_IMPORTED_MODULE_0__.isNotFoundError);
249
-
250
- if (notFound) {
251
- return {
252
- notFound: true
253
- };
254
- }
255
-
256
- if (errors.length > 0) {
257
- throw errors[0];
258
- }
259
-
260
- return {
261
- props: _objectSpread(_objectSpread({}, data), {}, {
262
- page,
263
- globalSections
264
- })
265
- };
266
- };
267
- const getStaticPaths = async () => {
268
- return {
269
- paths: [],
270
- fallback: 'blocking'
271
- };
272
- };
273
- Page.displayName = 'Page';
274
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_10__/* .mark */ .B)(Page));
275
- __webpack_async_result__();
276
- } catch(e) { __webpack_async_result__(e); } });
277
-
278
- /***/ }),
279
-
280
- /***/ 7636:
281
- /***/ ((module) => {
282
-
283
- // Exports
284
- module.exports = {
285
- "section": "section_section__xo_yt"
286
- };
287
-
288
-
289
- /***/ }),
290
-
291
- /***/ 5490:
292
- /***/ ((module) => {
293
-
294
- "use strict";
295
- module.exports = require("@faststore/graphql-utils");
296
-
297
- /***/ }),
298
-
299
- /***/ 6676:
300
- /***/ ((module) => {
301
-
302
- "use strict";
303
- module.exports = require("@vtex/client-cms");
304
-
305
- /***/ }),
306
-
307
- /***/ 2404:
308
- /***/ ((module) => {
309
-
310
- "use strict";
311
- module.exports = require("fast-deep-equal");
312
-
313
- /***/ }),
314
-
315
- /***/ 7343:
316
- /***/ ((module) => {
317
-
318
- "use strict";
319
- module.exports = require("graphql");
320
-
321
- /***/ }),
322
-
323
- /***/ 6548:
324
- /***/ ((module) => {
325
-
326
- "use strict";
327
- module.exports = require("graphql/language");
328
-
329
- /***/ }),
330
-
331
- /***/ 3430:
332
- /***/ ((module) => {
333
-
334
- "use strict";
335
- module.exports = require("idb-keyval");
336
-
337
- /***/ }),
338
-
339
- /***/ 7881:
340
- /***/ ((module) => {
341
-
342
- "use strict";
343
- module.exports = require("isomorphic-unfetch");
344
-
345
- /***/ }),
346
-
347
- /***/ 6641:
348
- /***/ ((module) => {
349
-
350
- "use strict";
351
- module.exports = require("next-seo");
352
-
353
- /***/ }),
354
-
355
- /***/ 3280:
356
- /***/ ((module) => {
357
-
358
- "use strict";
359
- module.exports = require("next/dist/shared/lib/app-router-context.js");
360
-
361
- /***/ }),
362
-
363
- /***/ 2796:
364
- /***/ ((module) => {
365
-
366
- "use strict";
367
- module.exports = require("next/dist/shared/lib/head-manager-context.js");
368
-
369
- /***/ }),
370
-
371
- /***/ 4957:
372
- /***/ ((module) => {
373
-
374
- "use strict";
375
- module.exports = require("next/dist/shared/lib/head.js");
376
-
377
- /***/ }),
378
-
379
- /***/ 3539:
380
- /***/ ((module) => {
381
-
382
- "use strict";
383
- module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
384
-
385
- /***/ }),
386
-
387
- /***/ 4014:
388
- /***/ ((module) => {
389
-
390
- "use strict";
391
- module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
392
-
393
- /***/ }),
394
-
395
- /***/ 4486:
396
- /***/ ((module) => {
397
-
398
- "use strict";
399
- module.exports = require("next/dist/shared/lib/image-blur-svg.js");
400
-
401
- /***/ }),
402
-
403
- /***/ 744:
404
- /***/ ((module) => {
405
-
406
- "use strict";
407
- module.exports = require("next/dist/shared/lib/image-config-context.js");
408
-
409
- /***/ }),
410
-
411
- /***/ 5843:
412
- /***/ ((module) => {
413
-
414
- "use strict";
415
- module.exports = require("next/dist/shared/lib/image-config.js");
416
-
417
- /***/ }),
418
-
419
- /***/ 8524:
420
- /***/ ((module) => {
421
-
422
- "use strict";
423
- module.exports = require("next/dist/shared/lib/is-plain-object.js");
424
-
425
- /***/ }),
426
-
427
- /***/ 8020:
428
- /***/ ((module) => {
429
-
430
- "use strict";
431
- module.exports = require("next/dist/shared/lib/mitt.js");
432
-
433
- /***/ }),
434
-
435
- /***/ 4406:
436
- /***/ ((module) => {
437
-
438
- "use strict";
439
- module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
440
-
441
- /***/ }),
442
-
443
- /***/ 4964:
444
- /***/ ((module) => {
445
-
446
- "use strict";
447
- module.exports = require("next/dist/shared/lib/router-context.js");
448
-
449
- /***/ }),
450
-
451
- /***/ 3431:
452
- /***/ ((module) => {
453
-
454
- "use strict";
455
- module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
456
-
457
- /***/ }),
458
-
459
- /***/ 1751:
460
- /***/ ((module) => {
461
-
462
- "use strict";
463
- module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
464
-
465
- /***/ }),
466
-
467
- /***/ 6220:
468
- /***/ ((module) => {
469
-
470
- "use strict";
471
- module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
472
-
473
- /***/ }),
474
-
475
- /***/ 299:
476
- /***/ ((module) => {
477
-
478
- "use strict";
479
- module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
480
-
481
- /***/ }),
482
-
483
- /***/ 3938:
484
- /***/ ((module) => {
485
-
486
- "use strict";
487
- module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
488
-
489
- /***/ }),
490
-
491
- /***/ 9565:
492
- /***/ ((module) => {
493
-
494
- "use strict";
495
- module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
496
-
497
- /***/ }),
498
-
499
- /***/ 5789:
500
- /***/ ((module) => {
501
-
502
- "use strict";
503
- module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
504
-
505
- /***/ }),
506
-
507
- /***/ 1897:
508
- /***/ ((module) => {
509
-
510
- "use strict";
511
- module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
512
-
513
- /***/ }),
514
-
515
- /***/ 1428:
516
- /***/ ((module) => {
517
-
518
- "use strict";
519
- module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
520
-
521
- /***/ }),
522
-
523
- /***/ 8854:
524
- /***/ ((module) => {
525
-
526
- "use strict";
527
- module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
528
-
529
- /***/ }),
530
-
531
- /***/ 1292:
532
- /***/ ((module) => {
533
-
534
- "use strict";
535
- module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
536
-
537
- /***/ }),
538
-
539
- /***/ 4567:
540
- /***/ ((module) => {
541
-
542
- "use strict";
543
- module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
544
-
545
- /***/ }),
546
-
547
- /***/ 979:
548
- /***/ ((module) => {
549
-
550
- "use strict";
551
- module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
552
-
553
- /***/ }),
554
-
555
- /***/ 3297:
556
- /***/ ((module) => {
557
-
558
- "use strict";
559
- module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
560
-
561
- /***/ }),
562
-
563
- /***/ 6052:
564
- /***/ ((module) => {
565
-
566
- "use strict";
567
- module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
568
-
569
- /***/ }),
570
-
571
- /***/ 4226:
572
- /***/ ((module) => {
573
-
574
- "use strict";
575
- module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
576
-
577
- /***/ }),
578
-
579
- /***/ 5052:
580
- /***/ ((module) => {
581
-
582
- "use strict";
583
- module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
584
-
585
- /***/ }),
586
-
587
- /***/ 9232:
588
- /***/ ((module) => {
589
-
590
- "use strict";
591
- module.exports = require("next/dist/shared/lib/utils.js");
592
-
593
- /***/ }),
594
-
595
- /***/ 1853:
596
- /***/ ((module) => {
597
-
598
- "use strict";
599
- module.exports = require("next/router");
600
-
601
- /***/ }),
602
-
603
- /***/ 5471:
604
- /***/ ((module) => {
605
-
606
- "use strict";
607
- module.exports = require("p-limit");
608
-
609
- /***/ }),
610
-
611
- /***/ 6689:
612
- /***/ ((module) => {
613
-
614
- "use strict";
615
- module.exports = require("react");
616
-
617
- /***/ }),
618
-
619
- /***/ 6405:
620
- /***/ ((module) => {
621
-
622
- "use strict";
623
- module.exports = require("react-dom");
624
-
625
- /***/ }),
626
-
627
- /***/ 9785:
628
- /***/ ((module) => {
629
-
630
- "use strict";
631
- module.exports = require("react-intersection-observer");
632
-
633
- /***/ }),
634
-
635
- /***/ 3789:
636
- /***/ ((module) => {
637
-
638
- "use strict";
639
- module.exports = require("react-swipeable");
640
-
641
- /***/ }),
642
-
643
- /***/ 997:
644
- /***/ ((module) => {
645
-
646
- "use strict";
647
- module.exports = require("react/jsx-runtime");
648
-
649
- /***/ }),
650
-
651
- /***/ 3823:
652
- /***/ ((module) => {
653
-
654
- "use strict";
655
- module.exports = require("tabbable");
656
-
657
- /***/ }),
658
-
659
- /***/ 752:
660
- /***/ ((module) => {
661
-
662
- "use strict";
663
- module.exports = require("tslib");
664
-
665
- /***/ }),
666
-
667
- /***/ 9664:
668
- /***/ ((module) => {
669
-
670
- "use strict";
671
- module.exports = import("@envelop/core");;
672
-
673
- /***/ }),
674
-
675
- /***/ 7886:
676
- /***/ ((module) => {
677
-
678
- "use strict";
679
- module.exports = import("@envelop/graphql-jit");;
680
-
681
- /***/ }),
682
-
683
- /***/ 4656:
684
- /***/ ((module) => {
685
-
686
- "use strict";
687
- module.exports = import("@envelop/parser-cache");;
688
-
689
- /***/ }),
690
-
691
- /***/ 6093:
692
- /***/ ((module) => {
693
-
694
- "use strict";
695
- module.exports = import("@envelop/validation-cache");;
696
-
697
- /***/ }),
698
-
699
- /***/ 7564:
700
- /***/ ((module) => {
701
-
702
- "use strict";
703
- module.exports = import("chalk");;
704
-
705
- /***/ }),
706
-
707
- /***/ 5941:
708
- /***/ ((module) => {
709
-
710
- "use strict";
711
- module.exports = import("swr");;
712
-
713
- /***/ }),
714
-
715
- /***/ 6113:
716
- /***/ ((module) => {
717
-
718
- "use strict";
719
- module.exports = require("crypto");
720
-
721
- /***/ })
722
-
723
- };
724
- ;
725
-
726
- // load runtime
727
- var __webpack_require__ = require("../webpack-runtime.js");
728
- __webpack_require__.C(exports);
729
- var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
730
- var __webpack_exports__ = __webpack_require__.X(0, [608,676,664,401,336,183,644,886,74,247,287,854,280,368,104,874,350,907,557], () => (__webpack_exec__(1875)));
731
- module.exports = __webpack_exports__;
732
-
733
- })();