@faststore/core 2.0.165-alpha.0 → 2.0.168-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 (166) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/CHANGELOG.md +12 -0
  3. package/cms/faststore/sections.json +226 -0
  4. package/package.json +3 -3
  5. package/src/Layout.tsx +1 -25
  6. package/src/components/cart/CartSidebar/CartSidebar.tsx +97 -54
  7. package/src/components/cms/GlobalSections.tsx +11 -9
  8. package/src/components/region/RegionBar/RegionBar.tsx +35 -3
  9. package/src/components/region/RegionModal/RegionModal.tsx +81 -19
  10. package/src/components/sections/RegionBar/RegionBar.tsx +41 -0
  11. package/.next/BUILD_ID +0 -1
  12. package/.next/build-manifest.json +0 -132
  13. package/.next/cache/.tsbuildinfo +0 -1
  14. package/.next/cache/config.json +0 -7
  15. package/.next/cache/eslint/.cache_1gneedd +0 -1
  16. package/.next/cache/next-server.js.nft.json +0 -1
  17. package/.next/cache/webpack/client-production/0.pack +0 -0
  18. package/.next/cache/webpack/client-production/index.pack +0 -0
  19. package/.next/cache/webpack/server-production/0.pack +0 -0
  20. package/.next/cache/webpack/server-production/index.pack +0 -0
  21. package/.next/export-marker.json +0 -1
  22. package/.next/images-manifest.json +0 -1
  23. package/.next/next-server.js.nft.json +0 -1
  24. package/.next/package.json +0 -1
  25. package/.next/prerender-manifest.json +0 -1
  26. package/.next/react-loadable-manifest.json +0 -48
  27. package/.next/required-server-files.json +0 -1
  28. package/.next/routes-manifest.json +0 -1
  29. package/.next/server/chunks/123.js +0 -58
  30. package/.next/server/chunks/143.js +0 -106
  31. package/.next/server/chunks/183.js +0 -90
  32. package/.next/server/chunks/205.js +0 -692
  33. package/.next/server/chunks/247.js +0 -61
  34. package/.next/server/chunks/280.js +0 -324
  35. package/.next/server/chunks/287.js +0 -58
  36. package/.next/server/chunks/289.js +0 -229
  37. package/.next/server/chunks/312.js +0 -697
  38. package/.next/server/chunks/336.js +0 -821
  39. package/.next/server/chunks/350.js +0 -143
  40. package/.next/server/chunks/368.js +0 -253
  41. package/.next/server/chunks/487.js +0 -9142
  42. package/.next/server/chunks/502.js +0 -600
  43. package/.next/server/chunks/576.js +0 -90
  44. package/.next/server/chunks/597.js +0 -169
  45. package/.next/server/chunks/608.js +0 -644
  46. package/.next/server/chunks/644.js +0 -235
  47. package/.next/server/chunks/650.js +0 -9142
  48. package/.next/server/chunks/664.js +0 -3401
  49. package/.next/server/chunks/676.js +0 -32
  50. package/.next/server/chunks/701.js +0 -87
  51. package/.next/server/chunks/74.js +0 -2710
  52. package/.next/server/chunks/82.js +0 -371
  53. package/.next/server/chunks/854.js +0 -72
  54. package/.next/server/chunks/859.js +0 -959
  55. package/.next/server/chunks/874.js +0 -487
  56. package/.next/server/chunks/886.js +0 -120
  57. package/.next/server/chunks/907.js +0 -1803
  58. package/.next/server/chunks/970.js +0 -200
  59. package/.next/server/chunks/98.js +0 -124
  60. package/.next/server/chunks/font-manifest.json +0 -1
  61. package/.next/server/font-manifest.json +0 -1
  62. package/.next/server/middleware-build-manifest.js +0 -1
  63. package/.next/server/middleware-manifest.json +0 -6
  64. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  65. package/.next/server/pages/404.js +0 -393
  66. package/.next/server/pages/404.js.nft.json +0 -1
  67. package/.next/server/pages/500.js +0 -395
  68. package/.next/server/pages/500.js.nft.json +0 -1
  69. package/.next/server/pages/[...slug].js +0 -786
  70. package/.next/server/pages/[...slug].js.nft.json +0 -1
  71. package/.next/server/pages/[slug]/p.js +0 -2532
  72. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  73. package/.next/server/pages/_app.js +0 -368
  74. package/.next/server/pages/_app.js.nft.json +0 -1
  75. package/.next/server/pages/_document.js +0 -304
  76. package/.next/server/pages/_document.js.nft.json +0 -1
  77. package/.next/server/pages/_error.js +0 -164
  78. package/.next/server/pages/_error.js.nft.json +0 -1
  79. package/.next/server/pages/account.js +0 -370
  80. package/.next/server/pages/account.js.nft.json +0 -1
  81. package/.next/server/pages/api/graphql.js +0 -365
  82. package/.next/server/pages/api/graphql.js.nft.json +0 -1
  83. package/.next/server/pages/api/preview.js +0 -119
  84. package/.next/server/pages/api/preview.js.nft.json +0 -1
  85. package/.next/server/pages/checkout.js +0 -370
  86. package/.next/server/pages/checkout.js.nft.json +0 -1
  87. package/.next/server/pages/en-US/404.html +0 -81
  88. package/.next/server/pages/en-US/404.json +0 -1
  89. package/.next/server/pages/en-US/500.html +0 -81
  90. package/.next/server/pages/en-US/500.json +0 -1
  91. package/.next/server/pages/en-US/account.html +0 -81
  92. package/.next/server/pages/en-US/account.json +0 -1
  93. package/.next/server/pages/en-US/checkout.html +0 -81
  94. package/.next/server/pages/en-US/checkout.json +0 -1
  95. package/.next/server/pages/en-US/login.html +0 -81
  96. package/.next/server/pages/en-US/login.json +0 -1
  97. package/.next/server/pages/en-US/s.html +0 -81
  98. package/.next/server/pages/en-US/s.json +0 -1
  99. package/.next/server/pages/en-US.html +0 -81
  100. package/.next/server/pages/en-US.json +0 -1
  101. package/.next/server/pages/index.js +0 -966
  102. package/.next/server/pages/index.js.nft.json +0 -1
  103. package/.next/server/pages/login.js +0 -375
  104. package/.next/server/pages/login.js.nft.json +0 -1
  105. package/.next/server/pages/s.js +0 -473
  106. package/.next/server/pages/s.js.nft.json +0 -1
  107. package/.next/server/pages-manifest.json +0 -16
  108. package/.next/server/webpack-api-runtime.js +0 -229
  109. package/.next/server/webpack-runtime.js +0 -229
  110. package/.next/static/chunks/0-82274e07cb857231.js +0 -1
  111. package/.next/static/chunks/143.dd8a556e6957baa1.js +0 -1
  112. package/.next/static/chunks/226.b57e10ad9932f88c.js +0 -1
  113. package/.next/static/chunks/240-8e66b2892f9d8c40.js +0 -1
  114. package/.next/static/chunks/336.0846f48eccce57e4.js +0 -1
  115. package/.next/static/chunks/377-891ff95d759cb061.js +0 -1
  116. package/.next/static/chunks/391-47b923ef44945418.js +0 -1
  117. package/.next/static/chunks/495.0ecd099878b2a36d.js +0 -1
  118. package/.next/static/chunks/502.eeca300cb9a355fb.js +0 -1
  119. package/.next/static/chunks/545-1d3d08edfd2ee4c6.js +0 -1
  120. package/.next/static/chunks/597.57a8984b6a1071ae.js +0 -1
  121. package/.next/static/chunks/64.ebbe1d2b40f980c7.js +0 -1
  122. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  123. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  124. package/.next/static/chunks/98.97381d2021f86cd9.js +0 -1
  125. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  126. package/.next/static/chunks/main-fd466221927468fd.js +0 -1
  127. package/.next/static/chunks/pages/404-459452495a0df278.js +0 -1
  128. package/.next/static/chunks/pages/500-008e30c48eceebed.js +0 -1
  129. package/.next/static/chunks/pages/[...slug]-e9d8386ff5e56d85.js +0 -1
  130. package/.next/static/chunks/pages/[slug]/p-8346514a688bf869.js +0 -1
  131. package/.next/static/chunks/pages/_app-78846ca9151cf266.js +0 -1
  132. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  133. package/.next/static/chunks/pages/account-46263f0c100c3eae.js +0 -1
  134. package/.next/static/chunks/pages/checkout-20bb3710b24df3b6.js +0 -1
  135. package/.next/static/chunks/pages/index-2006be8f08ad057f.js +0 -1
  136. package/.next/static/chunks/pages/login-f9d316d261fcc062.js +0 -1
  137. package/.next/static/chunks/pages/s-1cbe740b5b781d28.js +0 -1
  138. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  139. package/.next/static/chunks/webpack-e9bf82a67cc08d0f.js +0 -1
  140. package/.next/static/css/13a4da555ff5e3be.css +0 -1
  141. package/.next/static/css/287f5ba239375052.css +0 -1
  142. package/.next/static/css/28d7d73e13e2bc1d.css +0 -1
  143. package/.next/static/css/2e00f7ba49c754b3.css +0 -1
  144. package/.next/static/css/47d82dcec9a7dbc2.css +0 -1
  145. package/.next/static/css/6e41f1b6078c14c1.css +0 -1
  146. package/.next/static/css/7d822a137c54a781.css +0 -1
  147. package/.next/static/css/c6f97f692b2efad9.css +0 -1
  148. package/.next/static/css/d4a0d9df8c6df555.css +0 -1
  149. package/.next/static/css/e02cdad8fc000339.css +0 -1
  150. package/.next/static/zYvKRrlOU3r6IZCy0a0eY/_buildManifest.js +0 -1
  151. package/.next/static/zYvKRrlOU3r6IZCy0a0eY/_ssgManifest.js +0 -1
  152. package/.next/trace +0 -70
  153. package/public/~partytown/debug/partytown-atomics.js +0 -556
  154. package/public/~partytown/debug/partytown-media.js +0 -374
  155. package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
  156. package/public/~partytown/debug/partytown-sw.js +0 -59
  157. package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
  158. package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
  159. package/public/~partytown/debug/partytown.js +0 -72
  160. package/public/~partytown/partytown-atomics.js +0 -2
  161. package/public/~partytown/partytown-media.js +0 -2
  162. package/public/~partytown/partytown-sw.js +0 -2
  163. package/public/~partytown/partytown.js +0 -2
  164. package/src/components/common/RegionBar/RegionBar.tsx +0 -17
  165. /package/src/components/{common → sections}/RegionBar/index.ts +0 -0
  166. /package/src/components/{common → sections}/RegionBar/section.module.scss +0 -0
@@ -1,786 +0,0 @@
1
- (() => {
2
- var exports = {};
3
- exports.id = 330;
4
- exports.ids = [330];
5
- exports.modules = {
6
-
7
- /***/ 38570:
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__(25045);
19
- // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js
20
- var Button = __webpack_require__(57578);
21
- // EXTERNAL MODULE: ./src/components/sections/Section/index.ts
22
- var Section = __webpack_require__(57067);
23
- // EXTERNAL MODULE: ./src/components/sections/ScrollToTopButton/section.module.scss
24
- var section_module = __webpack_require__(87636);
25
- var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
26
- // EXTERNAL MODULE: external "react/jsx-runtime"
27
- var jsx_runtime_ = __webpack_require__(20997);
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
- /***/ 31875:
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__(74826);
74
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(26142);
75
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(72339);
76
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(41197);
77
- /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16641);
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__(71853);
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__(16689);
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__(22874);
84
- /* harmony import */ var src_components_sections_Hero__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59557);
85
- /* harmony import */ var src_components_sections_ProductGallery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(82618);
86
- /* harmony import */ var src_components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(77104);
87
- /* harmony import */ var src_components_sections_ScrollToTopButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38570);
88
- /* harmony import */ var src_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(18459);
89
- /* harmony import */ var src_sdk_search_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41523);
90
- /* harmony import */ var src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(82541);
91
- /* harmony import */ var src_server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(10350);
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__(82224);
94
- /* harmony import */ var src_customizations_components__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(20859);
95
- /* harmony import */ var src_server_cms__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(15764);
96
- /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(97183);
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__(20997);
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
- ProductShelf: src_components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z
145
- }, src_customizations_components__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z);
146
-
147
- const useSearchParams = ({
148
- collection,
149
- sort
150
- }) => {
151
- const selectedFacets = collection?.meta.selectedFacets;
152
- const {
153
- asPath
154
- } = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
155
- const hrefState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
156
- const url = new URL(asPath, 'http://localhost');
157
- const shouldUpdateDefaultSort = sort && !url.searchParams.has('sort');
158
-
159
- if (shouldUpdateDefaultSort) {
160
- url.searchParams.set('sort', sort);
161
- }
162
-
163
- const newState = (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_18__/* .parse */ .Q)(url); // In case we are in an incomplete url
164
-
165
- if (newState.selectedFacets.length === 0) {
166
- newState.selectedFacets = selectedFacets;
167
- }
168
-
169
- return (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z)(newState).href;
170
- }, [asPath, selectedFacets, sort]);
171
- return (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_18__/* .parse */ .Q)(new URL(hrefState)), [hrefState]);
172
- };
173
-
174
- function Page(_ref) {
175
- let {
176
- page: {
177
- sections,
178
- settings
179
- },
180
- globalSections
181
- } = _ref,
182
- otherProps = _objectWithoutProperties(_ref, _excluded);
183
-
184
- const {
185
- collection
186
- } = otherProps;
187
- const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
188
- const applySearchState = (0,src_sdk_search_state__WEBPACK_IMPORTED_MODULE_9__/* .useApplySearchState */ .j)();
189
- const searchParams = useSearchParams(_objectSpread(_objectSpread({}, otherProps), {}, {
190
- sort: settings?.productGallery?.sortBySelection
191
- }));
192
- const {
193
- page,
194
- sort
195
- } = searchParams;
196
- const title = collection?.seo.title ?? (_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().seo.title);
197
- const description = collection?.seo.description ?? (_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().seo.title);
198
- const pageQuery = page !== 0 ? `?page=${page}` : '';
199
- const separator = pageQuery !== '' ? '&' : '?';
200
- const sortQuery = !!sort ? `${separator}sort=${sort}` : '';
201
- const [pathname] = router.asPath.split('?');
202
- const canonical = `${(_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().storeUrl)}${pathname}${pageQuery}${sortQuery}`;
203
- return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, _objectSpread(_objectSpread({}, globalSections), {}, {
204
- children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(_faststore_sdk__WEBPACK_IMPORTED_MODULE_20__/* .Provider */ .z, _objectSpread(_objectSpread({
205
- onChange: applySearchState,
206
- itemsPerPage: settings?.productGallery?.itemsPerPage ?? src_constants__WEBPACK_IMPORTED_MODULE_21__/* .ITEMS_PER_PAGE */ .g
207
- }, searchParams), {}, {
208
- children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.NextSeo, {
209
- title: title,
210
- description: description,
211
- titleTemplate: (_faststore_config__WEBPACK_IMPORTED_MODULE_16___default().seo.titleTemplate),
212
- canonical: canonical,
213
- openGraph: {
214
- type: 'website',
215
- title,
216
- description
217
- }
218
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.BreadcrumbJsonLd, {
219
- itemListElements: collection?.breadcrumbList.itemListElement ?? []
220
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
221
- context: collection,
222
- sections: sections,
223
- components: COMPONENTS
224
- }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx(src_components_sections_ScrollToTopButton__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {})]
225
- }))
226
- }));
227
- }
228
-
229
- const query = "ServerCollectionPageQuery";
230
- const getStaticProps = async ({
231
- params,
232
- previewData
233
- }) => {
234
- const [{
235
- data,
236
- errors = []
237
- }, page, globalSections] = await Promise.all([(0,src_server__WEBPACK_IMPORTED_MODULE_11__/* .execute */ .h)({
238
- variables: {
239
- slug: params?.slug.join('/') ?? ''
240
- },
241
- operationName: query
242
- }), (0,src_server_cms__WEBPACK_IMPORTED_MODULE_15__/* .getPage */ .f)(_objectSpread(_objectSpread({}, previewData?.contentType === 'plp' ? previewData : null), {}, {
243
- contentType: 'plp'
244
- })), (0,src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__/* .getGlobalSectionsData */ .Tc)(previewData)]);
245
- const notFound = errors.find(_faststore_api__WEBPACK_IMPORTED_MODULE_0__.isNotFoundError);
246
-
247
- if (notFound) {
248
- return {
249
- notFound: true
250
- };
251
- }
252
-
253
- if (errors.length > 0) {
254
- throw errors[0];
255
- }
256
-
257
- return {
258
- props: _objectSpread(_objectSpread({}, data), {}, {
259
- page,
260
- globalSections
261
- })
262
- };
263
- };
264
- const getStaticPaths = async () => {
265
- return {
266
- paths: [],
267
- fallback: 'blocking'
268
- };
269
- };
270
- Page.displayName = 'Page';
271
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_10__/* .mark */ .B)(Page));
272
- __webpack_async_result__();
273
- } catch(e) { __webpack_async_result__(e); } });
274
-
275
- /***/ }),
276
-
277
- /***/ 87636:
278
- /***/ ((module) => {
279
-
280
- // Exports
281
- module.exports = {
282
- "section": "section_section__xo_yt"
283
- };
284
-
285
-
286
- /***/ }),
287
-
288
- /***/ 35490:
289
- /***/ ((module) => {
290
-
291
- "use strict";
292
- module.exports = require("@faststore/graphql-utils");
293
-
294
- /***/ }),
295
-
296
- /***/ 74691:
297
- /***/ ((module) => {
298
-
299
- "use strict";
300
- module.exports = require("@opentelemetry/api");
301
-
302
- /***/ }),
303
-
304
- /***/ 38973:
305
- /***/ ((module) => {
306
-
307
- "use strict";
308
- module.exports = require("@opentelemetry/api-logs");
309
-
310
- /***/ }),
311
-
312
- /***/ 16969:
313
- /***/ ((module) => {
314
-
315
- "use strict";
316
- module.exports = require("@opentelemetry/exporter-logs-otlp-grpc");
317
-
318
- /***/ }),
319
-
320
- /***/ 15196:
321
- /***/ ((module) => {
322
-
323
- "use strict";
324
- module.exports = require("@opentelemetry/exporter-trace-otlp-grpc");
325
-
326
- /***/ }),
327
-
328
- /***/ 44161:
329
- /***/ ((module) => {
330
-
331
- "use strict";
332
- module.exports = require("@opentelemetry/resources");
333
-
334
- /***/ }),
335
-
336
- /***/ 42793:
337
- /***/ ((module) => {
338
-
339
- "use strict";
340
- module.exports = require("@opentelemetry/sdk-logs");
341
-
342
- /***/ }),
343
-
344
- /***/ 1283:
345
- /***/ ((module) => {
346
-
347
- "use strict";
348
- module.exports = require("@opentelemetry/sdk-trace-base");
349
-
350
- /***/ }),
351
-
352
- /***/ 16676:
353
- /***/ ((module) => {
354
-
355
- "use strict";
356
- module.exports = require("@vtex/client-cms");
357
-
358
- /***/ }),
359
-
360
- /***/ 12404:
361
- /***/ ((module) => {
362
-
363
- "use strict";
364
- module.exports = require("fast-deep-equal");
365
-
366
- /***/ }),
367
-
368
- /***/ 57343:
369
- /***/ ((module) => {
370
-
371
- "use strict";
372
- module.exports = require("graphql");
373
-
374
- /***/ }),
375
-
376
- /***/ 36548:
377
- /***/ ((module) => {
378
-
379
- "use strict";
380
- module.exports = require("graphql/language");
381
-
382
- /***/ }),
383
-
384
- /***/ 83430:
385
- /***/ ((module) => {
386
-
387
- "use strict";
388
- module.exports = require("idb-keyval");
389
-
390
- /***/ }),
391
-
392
- /***/ 47881:
393
- /***/ ((module) => {
394
-
395
- "use strict";
396
- module.exports = require("isomorphic-unfetch");
397
-
398
- /***/ }),
399
-
400
- /***/ 16641:
401
- /***/ ((module) => {
402
-
403
- "use strict";
404
- module.exports = require("next-seo");
405
-
406
- /***/ }),
407
-
408
- /***/ 3280:
409
- /***/ ((module) => {
410
-
411
- "use strict";
412
- module.exports = require("next/dist/shared/lib/app-router-context.js");
413
-
414
- /***/ }),
415
-
416
- /***/ 92796:
417
- /***/ ((module) => {
418
-
419
- "use strict";
420
- module.exports = require("next/dist/shared/lib/head-manager-context.js");
421
-
422
- /***/ }),
423
-
424
- /***/ 94957:
425
- /***/ ((module) => {
426
-
427
- "use strict";
428
- module.exports = require("next/dist/shared/lib/head.js");
429
-
430
- /***/ }),
431
-
432
- /***/ 3539:
433
- /***/ ((module) => {
434
-
435
- "use strict";
436
- module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
437
-
438
- /***/ }),
439
-
440
- /***/ 34014:
441
- /***/ ((module) => {
442
-
443
- "use strict";
444
- module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
445
-
446
- /***/ }),
447
-
448
- /***/ 64486:
449
- /***/ ((module) => {
450
-
451
- "use strict";
452
- module.exports = require("next/dist/shared/lib/image-blur-svg.js");
453
-
454
- /***/ }),
455
-
456
- /***/ 50744:
457
- /***/ ((module) => {
458
-
459
- "use strict";
460
- module.exports = require("next/dist/shared/lib/image-config-context.js");
461
-
462
- /***/ }),
463
-
464
- /***/ 35843:
465
- /***/ ((module) => {
466
-
467
- "use strict";
468
- module.exports = require("next/dist/shared/lib/image-config.js");
469
-
470
- /***/ }),
471
-
472
- /***/ 78524:
473
- /***/ ((module) => {
474
-
475
- "use strict";
476
- module.exports = require("next/dist/shared/lib/is-plain-object.js");
477
-
478
- /***/ }),
479
-
480
- /***/ 78020:
481
- /***/ ((module) => {
482
-
483
- "use strict";
484
- module.exports = require("next/dist/shared/lib/mitt.js");
485
-
486
- /***/ }),
487
-
488
- /***/ 64406:
489
- /***/ ((module) => {
490
-
491
- "use strict";
492
- module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
493
-
494
- /***/ }),
495
-
496
- /***/ 24964:
497
- /***/ ((module) => {
498
-
499
- "use strict";
500
- module.exports = require("next/dist/shared/lib/router-context.js");
501
-
502
- /***/ }),
503
-
504
- /***/ 93431:
505
- /***/ ((module) => {
506
-
507
- "use strict";
508
- module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
509
-
510
- /***/ }),
511
-
512
- /***/ 11751:
513
- /***/ ((module) => {
514
-
515
- "use strict";
516
- module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
517
-
518
- /***/ }),
519
-
520
- /***/ 46220:
521
- /***/ ((module) => {
522
-
523
- "use strict";
524
- module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
525
-
526
- /***/ }),
527
-
528
- /***/ 10299:
529
- /***/ ((module) => {
530
-
531
- "use strict";
532
- module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
533
-
534
- /***/ }),
535
-
536
- /***/ 23938:
537
- /***/ ((module) => {
538
-
539
- "use strict";
540
- module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
541
-
542
- /***/ }),
543
-
544
- /***/ 29565:
545
- /***/ ((module) => {
546
-
547
- "use strict";
548
- module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
549
-
550
- /***/ }),
551
-
552
- /***/ 35789:
553
- /***/ ((module) => {
554
-
555
- "use strict";
556
- module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
557
-
558
- /***/ }),
559
-
560
- /***/ 1897:
561
- /***/ ((module) => {
562
-
563
- "use strict";
564
- module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
565
-
566
- /***/ }),
567
-
568
- /***/ 1428:
569
- /***/ ((module) => {
570
-
571
- "use strict";
572
- module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
573
-
574
- /***/ }),
575
-
576
- /***/ 28854:
577
- /***/ ((module) => {
578
-
579
- "use strict";
580
- module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
581
-
582
- /***/ }),
583
-
584
- /***/ 91292:
585
- /***/ ((module) => {
586
-
587
- "use strict";
588
- module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
589
-
590
- /***/ }),
591
-
592
- /***/ 34567:
593
- /***/ ((module) => {
594
-
595
- "use strict";
596
- module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
597
-
598
- /***/ }),
599
-
600
- /***/ 80979:
601
- /***/ ((module) => {
602
-
603
- "use strict";
604
- module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
605
-
606
- /***/ }),
607
-
608
- /***/ 93297:
609
- /***/ ((module) => {
610
-
611
- "use strict";
612
- module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
613
-
614
- /***/ }),
615
-
616
- /***/ 36052:
617
- /***/ ((module) => {
618
-
619
- "use strict";
620
- module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
621
-
622
- /***/ }),
623
-
624
- /***/ 84226:
625
- /***/ ((module) => {
626
-
627
- "use strict";
628
- module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
629
-
630
- /***/ }),
631
-
632
- /***/ 95052:
633
- /***/ ((module) => {
634
-
635
- "use strict";
636
- module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
637
-
638
- /***/ }),
639
-
640
- /***/ 59232:
641
- /***/ ((module) => {
642
-
643
- "use strict";
644
- module.exports = require("next/dist/shared/lib/utils.js");
645
-
646
- /***/ }),
647
-
648
- /***/ 71853:
649
- /***/ ((module) => {
650
-
651
- "use strict";
652
- module.exports = require("next/router");
653
-
654
- /***/ }),
655
-
656
- /***/ 75471:
657
- /***/ ((module) => {
658
-
659
- "use strict";
660
- module.exports = require("p-limit");
661
-
662
- /***/ }),
663
-
664
- /***/ 16689:
665
- /***/ ((module) => {
666
-
667
- "use strict";
668
- module.exports = require("react");
669
-
670
- /***/ }),
671
-
672
- /***/ 66405:
673
- /***/ ((module) => {
674
-
675
- "use strict";
676
- module.exports = require("react-dom");
677
-
678
- /***/ }),
679
-
680
- /***/ 19785:
681
- /***/ ((module) => {
682
-
683
- "use strict";
684
- module.exports = require("react-intersection-observer");
685
-
686
- /***/ }),
687
-
688
- /***/ 3789:
689
- /***/ ((module) => {
690
-
691
- "use strict";
692
- module.exports = require("react-swipeable");
693
-
694
- /***/ }),
695
-
696
- /***/ 20997:
697
- /***/ ((module) => {
698
-
699
- "use strict";
700
- module.exports = require("react/jsx-runtime");
701
-
702
- /***/ }),
703
-
704
- /***/ 73823:
705
- /***/ ((module) => {
706
-
707
- "use strict";
708
- module.exports = require("tabbable");
709
-
710
- /***/ }),
711
-
712
- /***/ 40752:
713
- /***/ ((module) => {
714
-
715
- "use strict";
716
- module.exports = require("tslib");
717
-
718
- /***/ }),
719
-
720
- /***/ 99664:
721
- /***/ ((module) => {
722
-
723
- "use strict";
724
- module.exports = import("@envelop/core");;
725
-
726
- /***/ }),
727
-
728
- /***/ 37886:
729
- /***/ ((module) => {
730
-
731
- "use strict";
732
- module.exports = import("@envelop/graphql-jit");;
733
-
734
- /***/ }),
735
-
736
- /***/ 84656:
737
- /***/ ((module) => {
738
-
739
- "use strict";
740
- module.exports = import("@envelop/parser-cache");;
741
-
742
- /***/ }),
743
-
744
- /***/ 36093:
745
- /***/ ((module) => {
746
-
747
- "use strict";
748
- module.exports = import("@envelop/validation-cache");;
749
-
750
- /***/ }),
751
-
752
- /***/ 97564:
753
- /***/ ((module) => {
754
-
755
- "use strict";
756
- module.exports = import("chalk");;
757
-
758
- /***/ }),
759
-
760
- /***/ 15941:
761
- /***/ ((module) => {
762
-
763
- "use strict";
764
- module.exports = import("swr");;
765
-
766
- /***/ }),
767
-
768
- /***/ 6113:
769
- /***/ ((module) => {
770
-
771
- "use strict";
772
- module.exports = require("crypto");
773
-
774
- /***/ })
775
-
776
- };
777
- ;
778
-
779
- // load runtime
780
- var __webpack_require__ = require("../webpack-runtime.js");
781
- __webpack_require__.C(exports);
782
- var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
783
- var __webpack_exports__ = __webpack_require__.X(0, [608,676,664,487,336,183,644,886,74,247,287,854,280,368,205,874,350,907,970], () => (__webpack_exec__(31875)));
784
- module.exports = __webpack_exports__;
785
-
786
- })();