@faststore/core 2.1.87 → 2.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/build-manifest.json +129 -0
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/cache/config.json +7 -0
- package/.next/cache/eslint/.cache_1gneedd +1 -0
- package/.next/cache/next-server.js.nft.json +1 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/export-marker.json +1 -0
- package/.next/images-manifest.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +44 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/177.js +120 -0
- package/.next/server/chunks/183.js +94 -0
- package/.next/server/chunks/184.js +61 -0
- package/.next/server/chunks/186.js +113 -0
- package/.next/server/chunks/289.js +239 -0
- package/.next/server/chunks/312.js +697 -0
- package/.next/server/chunks/350.js +143 -0
- package/.next/server/chunks/483.js +650 -0
- package/.next/server/chunks/487.js +9142 -0
- package/.next/server/chunks/53.js +61 -0
- package/.next/server/chunks/530.js +626 -0
- package/.next/server/chunks/574.js +126 -0
- package/.next/server/chunks/576.js +94 -0
- package/.next/server/chunks/650.js +9142 -0
- package/.next/server/chunks/676.js +32 -0
- package/.next/server/chunks/693.js +58 -0
- package/.next/server/chunks/71.js +1254 -0
- package/.next/server/chunks/74.js +4065 -0
- package/.next/server/chunks/753.js +509 -0
- package/.next/server/chunks/779.js +58 -0
- package/.next/server/chunks/825.js +4039 -0
- package/.next/server/chunks/854.js +72 -0
- package/.next/server/chunks/859.js +959 -0
- package/.next/server/chunks/907.js +1911 -0
- package/.next/server/chunks/933.js +517 -0
- package/.next/server/chunks/98.js +144 -0
- package/.next/server/chunks/988.js +211 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/pages/404.js +386 -0
- package/.next/server/pages/404.js.nft.json +1 -0
- package/.next/server/pages/500.js +388 -0
- package/.next/server/pages/500.js.nft.json +1 -0
- package/.next/server/pages/[...slug].js +1005 -0
- package/.next/server/pages/[...slug].js.nft.json +1 -0
- package/.next/server/pages/[slug]/p.js +2269 -0
- package/.next/server/pages/[slug]/p.js.nft.json +1 -0
- package/.next/server/pages/_app.js +280 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +374 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +164 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages/account.js +363 -0
- package/.next/server/pages/account.js.nft.json +1 -0
- package/.next/server/pages/api/graphql.js +365 -0
- package/.next/server/pages/api/graphql.js.nft.json +1 -0
- package/.next/server/pages/api/health/live.js +31 -0
- package/.next/server/pages/api/health/live.js.nft.json +1 -0
- package/.next/server/pages/api/health/ready.js +31 -0
- package/.next/server/pages/api/health/ready.js.nft.json +1 -0
- package/.next/server/pages/api/preview.js +148 -0
- package/.next/server/pages/api/preview.js.nft.json +1 -0
- package/.next/server/pages/checkout.js +363 -0
- package/.next/server/pages/checkout.js.nft.json +1 -0
- package/.next/server/pages/en-US/404.html +81 -0
- package/.next/server/pages/en-US/404.json +1 -0
- package/.next/server/pages/en-US/500.html +81 -0
- package/.next/server/pages/en-US/500.json +1 -0
- package/.next/server/pages/en-US/account.html +81 -0
- package/.next/server/pages/en-US/account.json +1 -0
- package/.next/server/pages/en-US/checkout.html +81 -0
- package/.next/server/pages/en-US/checkout.json +1 -0
- package/.next/server/pages/en-US/login.html +81 -0
- package/.next/server/pages/en-US/login.json +1 -0
- package/.next/server/pages/en-US/s.html +81 -0
- package/.next/server/pages/en-US/s.json +1 -0
- package/.next/server/pages/en-US.html +81 -0
- package/.next/server/pages/en-US.json +1 -0
- package/.next/server/pages/index.js +439 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/login.js +368 -0
- package/.next/server/pages/login.js.nft.json +1 -0
- package/.next/server/pages/s.js +466 -0
- package/.next/server/pages/s.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +18 -0
- package/.next/server/webpack-api-runtime.js +229 -0
- package/.next/server/webpack-runtime.js +229 -0
- package/.next/static/7SuqEgCuf5UtY9Gx-CYYB/_buildManifest.js +1 -0
- package/.next/static/7SuqEgCuf5UtY9Gx-CYYB/_ssgManifest.js +1 -0
- package/.next/static/chunks/148.3bb7e05cc5d1c1c4.js +1 -0
- package/.next/static/chunks/238-e5e4b2094f0e1df8.js +1 -0
- package/.next/static/chunks/243-df6d1b248f7b4d3c.js +1 -0
- package/.next/static/chunks/530.848b014622932b93.js +1 -0
- package/.next/static/chunks/548-ab84e9e8b49413ab.js +1 -0
- package/.next/static/chunks/574.d13dd0afe15cd635.js +1 -0
- package/.next/static/chunks/603-d1c069aa8a349c86.js +1 -0
- package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
- package/.next/static/chunks/709.7bc5a25ce30abda6.js +1 -0
- package/.next/static/chunks/738-67a288ca3569cdbb.js +1 -0
- package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
- package/.next/static/chunks/98.1632997dfd4d3a52.js +1 -0
- package/.next/static/chunks/988.d10040040cdfebbb.js +1 -0
- package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
- package/.next/static/chunks/main-fd466221927468fd.js +1 -0
- package/.next/static/chunks/pages/404-af78f7cd1d3c1f60.js +1 -0
- package/.next/static/chunks/pages/500-f6346ca5f9dc4fef.js +1 -0
- package/.next/static/chunks/pages/[...slug]-ca533c74c22cb787.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-7bb760bb3fcfc0bb.js +1 -0
- package/.next/static/chunks/pages/_app-6d0e6ab9a4dd8106.js +1 -0
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
- package/.next/static/chunks/pages/account-05bd79fb78365e88.js +1 -0
- package/.next/static/chunks/pages/checkout-c973786e68f25a39.js +1 -0
- package/.next/static/chunks/pages/index-d521ce4f4e2b89a6.js +1 -0
- package/.next/static/chunks/pages/login-8deb9243376b6aa1.js +1 -0
- package/.next/static/chunks/pages/s-0e516ab36bb49c99.js +1 -0
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
- package/.next/static/chunks/webpack-352e624909554726.js +1 -0
- package/.next/static/css/20e4a3a45cdd65f4.css +1 -0
- package/.next/static/css/4b7138899cd07c63.css +1 -0
- package/.next/static/css/527e334fa69cf40a.css +1 -0
- package/.next/static/css/6e1a7434f061d0ef.css +1 -0
- package/.next/static/css/9e76fef1c9ca89af.css +1 -0
- package/.next/static/css/a2eefb25a4608343.css +1 -0
- package/.next/static/css/cb7d1fcea42fab9c.css +1 -0
- package/.next/static/css/df588bb98c0b0ca6.css +1 -0
- package/.next/static/css/e3b039e8f5daf95f.css +1 -0
- package/.next/static/css/f0e2d1b8832e935d.css +1 -0
- package/.next/trace +80 -0
- package/package.json +3 -3
- package/public/~partytown/debug/partytown-atomics.js +556 -0
- package/public/~partytown/debug/partytown-media.js +374 -0
- package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
- package/public/~partytown/debug/partytown-sw.js +59 -0
- package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
- package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
- package/public/~partytown/debug/partytown.js +72 -0
- package/public/~partytown/partytown-atomics.js +2 -0
- package/public/~partytown/partytown-media.js +2 -0
- package/public/~partytown/partytown-sw.js +2 -0
- package/public/~partytown/partytown.js +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"config":{"env":{},"webpackDevMiddleware":null,"eslint":{"ignoreDuringBuilds":false},"typescript":{"ignoreBuildErrors":false,"tsconfigPath":"tsconfig.json"},"distDir":".next","cleanDistDir":true,"assetPrefix":"","configOrigin":"next.config.js","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"target":"server","poweredByHeader":true,"compress":true,"analyticsId":"","images":{"deviceSizes":[360,540,768,1280,1440],"imageSizes":[34,68,154,320],"path":"/_next/image","loader":"default","domains":["storeframework.vtexassets.com"],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","remotePatterns":[],"unoptimized":false},"devIndicators":{"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":15000,"pagesBufferLength":2},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{"additionalData":"@import \"src/customizations/styles/custom-mixins.scss\";"},"trailingSlash":false,"i18n":{"locales":["en-US"],"defaultLocale":"en-US"},"productionBrowserSourceMaps":false,"optimizeFonts":true,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactStrictMode":false,"httpAgentOptions":{"keepAlive":true},"outputFileTracing":true,"staticPageGenerationTimeout":60,"swcMinify":false,"experimental":{"optimisticClientCache":true,"manualClientBasePath":false,"legacyBrowsers":true,"browsersListForSwc":false,"newNextLinkBehavior":false,"cpus":1,"sharedPool":true,"profiling":false,"isrFlushToDisk":true,"workerThreads":false,"pageEnv":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"swcFileReading":true,"craCompat":false,"esmExternals":true,"appDir":false,"isrMemoryCacheSize":52428800,"serverComponents":false,"fullySpecified":false,"outputFileTracingRoot":"","swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"adjustFontFallbacks":false,"trustHostHeader":false},"configFileName":"next.config.js"},"appDir":"/home/runner/work/faststore/faststore/packages/core","files":[".next/routes-manifest.json",".next/server/pages-manifest.json",".next/build-manifest.json",".next/prerender-manifest.json",".next/server/middleware-manifest.json",".next/react-loadable-manifest.json",".next/server/font-manifest.json",".next/BUILD_ID"],"ignore":["node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","locale":false,"internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/[slug]/p","regex":"^/([^/]+?)/p(?:/)?$","routeKeys":{"slug":"slug"},"namedRegex":"^/(?<slug>[^/]+?)/p(?:/)?$"},{"page":"/[...slug]","regex":"^/(.+?)(?:/)?$","routeKeys":{"slug":"slug"},"namedRegex":"^/(?<slug>.+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"},{"page":"/500","regex":"^/500(?:/)?$","routeKeys":{},"namedRegex":"^/500(?:/)?$"},{"page":"/account","regex":"^/account(?:/)?$","routeKeys":{},"namedRegex":"^/account(?:/)?$"},{"page":"/checkout","regex":"^/checkout(?:/)?$","routeKeys":{},"namedRegex":"^/checkout(?:/)?$"},{"page":"/login","regex":"^/login(?:/)?$","routeKeys":{},"namedRegex":"^/login(?:/)?$"},{"page":"/s","regex":"^/s(?:/)?$","routeKeys":{},"namedRegex":"^/s(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/index.json$"},{"page":"/404","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/404.json$"},{"page":"/500","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/500.json$"},{"page":"/account","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/account.json$"},{"page":"/checkout","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/checkout.json$"},{"page":"/login","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/login.json$"},{"page":"/s","dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/s.json$"},{"page":"/[slug]/p","routeKeys":{"slug":"slug"},"dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/([^/]+?)/p\\.json$","namedDataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/(?<slug>[^/]+?)/p\\.json$"},{"page":"/[...slug]","routeKeys":{"slug":"slug"},"dataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/(.+?)\\.json$","namedDataRouteRegex":"^/_next/data/7SuqEgCuf5UtY9Gx\\-CYYB/(?<slug>.+?)\\.json$"}],"i18n":{"locales":["en-US"],"defaultLocale":"en-US"},"rewrites":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 177;
|
|
3
|
+
exports.ids = [177];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 16652:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
11
|
+
/* harmony export */ "l": () => (/* binding */ useUI)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
14
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
+
|
|
16
|
+
const reducer = (state, action) => {
|
|
17
|
+
const { type } = action;
|
|
18
|
+
switch (type) {
|
|
19
|
+
case 'open': {
|
|
20
|
+
const { payload } = action;
|
|
21
|
+
document.body.classList.add('no-scroll');
|
|
22
|
+
return {
|
|
23
|
+
...state,
|
|
24
|
+
[payload]: true,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
case 'close': {
|
|
28
|
+
const { payload } = action;
|
|
29
|
+
document.body.classList.remove('no-scroll');
|
|
30
|
+
return {
|
|
31
|
+
...state,
|
|
32
|
+
[payload]: false,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
case 'pushToast': {
|
|
36
|
+
return {
|
|
37
|
+
...state,
|
|
38
|
+
toasts: [...state.toasts, action.payload],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
case 'popToast': {
|
|
42
|
+
return {
|
|
43
|
+
...state,
|
|
44
|
+
toasts: state.toasts.slice(1),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
default:
|
|
48
|
+
throw new Error(`Action ${type} not implemented`);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const initializer = () => ({
|
|
52
|
+
cart: false,
|
|
53
|
+
modal: false,
|
|
54
|
+
navbar: false,
|
|
55
|
+
filter: false,
|
|
56
|
+
toasts: [],
|
|
57
|
+
});
|
|
58
|
+
const UIContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);
|
|
59
|
+
function UIProvider({ children }) {
|
|
60
|
+
const [ui, dispatch] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)(reducer, undefined, initializer);
|
|
61
|
+
const callbacks = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
|
|
62
|
+
openFilter: () => dispatch({ type: 'open', payload: 'filter' }),
|
|
63
|
+
closeFilter: () => dispatch({ type: 'close', payload: 'filter' }),
|
|
64
|
+
openNavbar: () => dispatch({ type: 'open', payload: 'navbar' }),
|
|
65
|
+
closeNavbar: () => dispatch({ type: 'close', payload: 'navbar' }),
|
|
66
|
+
openCart: () => dispatch({ type: 'open', payload: 'cart' }),
|
|
67
|
+
closeCart: () => dispatch({ type: 'close', payload: 'cart' }),
|
|
68
|
+
openModal: () => dispatch({ type: 'open', payload: 'modal' }),
|
|
69
|
+
closeModal: () => dispatch({ type: 'close', payload: 'modal' }),
|
|
70
|
+
pushToast: (toast) => dispatch({ type: 'pushToast', payload: toast }),
|
|
71
|
+
popToast: () => dispatch({ type: 'popToast' }),
|
|
72
|
+
}), []);
|
|
73
|
+
const value = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
|
|
74
|
+
...ui,
|
|
75
|
+
...callbacks,
|
|
76
|
+
}), [callbacks, ui]);
|
|
77
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(UIContext.Provider, { value: value }, children);
|
|
78
|
+
}
|
|
79
|
+
function useUI() {
|
|
80
|
+
const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(UIContext);
|
|
81
|
+
if (context === undefined) {
|
|
82
|
+
throw new Error('Missing UI context on React tree');
|
|
83
|
+
}
|
|
84
|
+
return context;
|
|
85
|
+
}
|
|
86
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UIProvider);
|
|
87
|
+
//# sourceMappingURL=UIProvider.js.map
|
|
88
|
+
|
|
89
|
+
/***/ }),
|
|
90
|
+
|
|
91
|
+
/***/ 14950:
|
|
92
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
93
|
+
|
|
94
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
95
|
+
/* harmony export */ "Wg": () => (/* binding */ unwrap),
|
|
96
|
+
/* harmony export */ "re": () => (/* binding */ wrap),
|
|
97
|
+
/* harmony export */ "vi": () => (/* binding */ ANALYTICS_EVENT_TYPE)
|
|
98
|
+
/* harmony export */ });
|
|
99
|
+
/* unused harmony export STORE_EVENT_PREFIX */
|
|
100
|
+
const STORE_EVENT_PREFIX = 'store:';
|
|
101
|
+
const ANALYTICS_EVENT_TYPE = 'AnalyticsEvent';
|
|
102
|
+
const wrap = (event) => ({
|
|
103
|
+
name: ANALYTICS_EVENT_TYPE,
|
|
104
|
+
params: {
|
|
105
|
+
...event,
|
|
106
|
+
name: `${STORE_EVENT_PREFIX}${event.name}`,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
const unwrap = (event) => {
|
|
110
|
+
return {
|
|
111
|
+
...event.params,
|
|
112
|
+
name: event.params.name.slice(STORE_EVENT_PREFIX.length, event.params.name.length),
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=wrap.js.map
|
|
116
|
+
|
|
117
|
+
/***/ })
|
|
118
|
+
|
|
119
|
+
};
|
|
120
|
+
;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
exports.id = 183;
|
|
2
|
+
exports.ids = [183];
|
|
3
|
+
exports.modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 97183:
|
|
6
|
+
/***/ ((module) => {
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
seo: {
|
|
10
|
+
title: 'FastStore Starter',
|
|
11
|
+
description: 'Fast Demo Store',
|
|
12
|
+
titleTemplate: '%s | FastStore',
|
|
13
|
+
author: 'Store Framework'
|
|
14
|
+
},
|
|
15
|
+
// Theming
|
|
16
|
+
theme: 'custom-theme',
|
|
17
|
+
// Ecommerce Platform
|
|
18
|
+
platform: 'vtex',
|
|
19
|
+
// Platform specific configs for API
|
|
20
|
+
api: {
|
|
21
|
+
storeId: 'storeframework',
|
|
22
|
+
workspace: 'master',
|
|
23
|
+
environment: 'vtexcommercestable',
|
|
24
|
+
hideUnavailableItems: false,
|
|
25
|
+
incrementAddress: true
|
|
26
|
+
},
|
|
27
|
+
// Default session
|
|
28
|
+
session: {
|
|
29
|
+
currency: {
|
|
30
|
+
code: 'USD',
|
|
31
|
+
symbol: '$'
|
|
32
|
+
},
|
|
33
|
+
locale: 'en-US',
|
|
34
|
+
channel: '{"salesChannel":"1","regionId":""}',
|
|
35
|
+
country: 'USA',
|
|
36
|
+
deliveryMode: null,
|
|
37
|
+
addressType: null,
|
|
38
|
+
postalCode: null,
|
|
39
|
+
geoCoordinates: null,
|
|
40
|
+
person: null
|
|
41
|
+
},
|
|
42
|
+
// Default cart
|
|
43
|
+
cart: {
|
|
44
|
+
id: '',
|
|
45
|
+
items: [],
|
|
46
|
+
messages: [],
|
|
47
|
+
shouldSplitItem: true
|
|
48
|
+
},
|
|
49
|
+
// Production URLs
|
|
50
|
+
storeUrl: 'https://vtexfaststore.com',
|
|
51
|
+
secureSubdomain: 'https://secure.vtexfaststore.com',
|
|
52
|
+
checkoutUrl: 'https://secure.vtexfaststore.com/checkout',
|
|
53
|
+
loginUrl: 'https://secure.vtexfaststore.com/api/io/login',
|
|
54
|
+
accountUrl: 'https://secure.vtexfaststore.com/api/io/account',
|
|
55
|
+
// Preview redirects
|
|
56
|
+
previewRedirects: {
|
|
57
|
+
home: '/',
|
|
58
|
+
plp: '/office',
|
|
59
|
+
search: '/s?q=headphone',
|
|
60
|
+
pdp: '/apple-magic-mouse/p'
|
|
61
|
+
},
|
|
62
|
+
// Lighthouse CI
|
|
63
|
+
lighthouse: {
|
|
64
|
+
server: process.env.BASE_SITE_URL || 'http://localhost:3000',
|
|
65
|
+
pages: {
|
|
66
|
+
home: '/',
|
|
67
|
+
pdp: '/apple-magic-mouse/p',
|
|
68
|
+
collection: '/office'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
// E2E CI
|
|
72
|
+
cypress: {
|
|
73
|
+
pages: {
|
|
74
|
+
home: '/',
|
|
75
|
+
pdp: '/apple-magic-mouse/p',
|
|
76
|
+
collection: '/office',
|
|
77
|
+
collection_2: '/technology',
|
|
78
|
+
collection_filtered: '/office/?category-1=office&marca=acer&facets=category-1%2Cmarca',
|
|
79
|
+
search: '/s?q=orange'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
analytics: {
|
|
83
|
+
// https://developers.google.com/tag-platform/tag-manager/web#standard_web_page_installation,
|
|
84
|
+
gtmContainerId: 'GTM-PGHZ95N'
|
|
85
|
+
},
|
|
86
|
+
experimental: {
|
|
87
|
+
enableCypressExtension: false
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/***/ })
|
|
92
|
+
|
|
93
|
+
};
|
|
94
|
+
;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 184;
|
|
3
|
+
exports.ids = [184];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 55184:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ "m": () => (/* binding */ useViewItemListEvent)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71072);
|
|
13
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
14
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
+
/* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97295);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const useViewItemListEvent = ({
|
|
20
|
+
products,
|
|
21
|
+
title,
|
|
22
|
+
page,
|
|
23
|
+
pageSize
|
|
24
|
+
}) => {
|
|
25
|
+
const {
|
|
26
|
+
currency: {
|
|
27
|
+
code
|
|
28
|
+
}
|
|
29
|
+
} = (0,src_sdk_session__WEBPACK_IMPORTED_MODULE_1__/* .useSession */ .kP)();
|
|
30
|
+
const sendViewItemListEvent = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
31
|
+
(0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_2__/* .sendAnalyticsEvent */ ._)({
|
|
32
|
+
name: 'view_item_list',
|
|
33
|
+
params: {
|
|
34
|
+
item_list_name: title,
|
|
35
|
+
item_list_id: title,
|
|
36
|
+
items: products.map(({
|
|
37
|
+
node: product
|
|
38
|
+
}, index) => ({
|
|
39
|
+
item_id: product.isVariantOf.productGroupID,
|
|
40
|
+
item_name: product.isVariantOf.name,
|
|
41
|
+
item_brand: product.brand.name,
|
|
42
|
+
item_variant: product.sku,
|
|
43
|
+
price: product.offers.offers[0].price,
|
|
44
|
+
index: page * pageSize + index + 1,
|
|
45
|
+
discount: product.offers.offers[0].listPrice - product.offers.offers[0].price,
|
|
46
|
+
currency: code,
|
|
47
|
+
item_variant_name: product.name,
|
|
48
|
+
product_reference_id: product.gtin
|
|
49
|
+
}))
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}, [code, products, title, page, pageSize]);
|
|
53
|
+
return {
|
|
54
|
+
sendViewItemListEvent
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/***/ })
|
|
59
|
+
|
|
60
|
+
};
|
|
61
|
+
;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
exports.id = 186;
|
|
2
|
+
exports.ids = [186];
|
|
3
|
+
exports.modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 6133:
|
|
6
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
13
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14
|
+
|
|
15
|
+
function EmptyState({ testId = 'fs-empty-state', title, titleIcon, variant = 'default', bkgColor = 'default', children, ...otherProps }) {
|
|
16
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("section", { "data-fs-empty-state": true, "data-fs-empty-state-variant": variant, "data-fs-empty-state-bkg-color": bkgColor, "data-fs-content": "empty-state", "data-testid": testId, ...otherProps },
|
|
17
|
+
title && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("header", { "data-fs-empty-state-title": true },
|
|
18
|
+
titleIcon && react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, titleIcon),
|
|
19
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, title))),
|
|
20
|
+
children));
|
|
21
|
+
}
|
|
22
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EmptyState);
|
|
23
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
24
|
+
|
|
25
|
+
/***/ }),
|
|
26
|
+
|
|
27
|
+
/***/ 11186:
|
|
28
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
29
|
+
|
|
30
|
+
"use strict";
|
|
31
|
+
|
|
32
|
+
// EXPORTS
|
|
33
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
34
|
+
"Z": () => (/* reexport */ sections_EmptyState_EmptyState)
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// EXTERNAL MODULE: ./src/components/sections/Section/index.ts
|
|
38
|
+
var Section = __webpack_require__(57067);
|
|
39
|
+
// EXTERNAL MODULE: ./src/components/sections/EmptyState/section.module.scss
|
|
40
|
+
var section_module = __webpack_require__(96791);
|
|
41
|
+
var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
|
|
42
|
+
// EXTERNAL MODULE: ../components/dist/esm/organisms/EmptyState/EmptyState.js
|
|
43
|
+
var EmptyState = __webpack_require__(6133);
|
|
44
|
+
// EXTERNAL MODULE: ./src/utils/overrides.ts
|
|
45
|
+
var overrides = __webpack_require__(59104);
|
|
46
|
+
;// CONCATENATED MODULE: ./src/customizations/components/overrides/EmptyState.tsx
|
|
47
|
+
// This is an example of how it can be used on the starter.
|
|
48
|
+
const SECTION = 'EmptyState';
|
|
49
|
+
const override = {
|
|
50
|
+
section: SECTION
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
;// CONCATENATED MODULE: ./src/components/sections/EmptyState/Overrides.tsx
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const {
|
|
58
|
+
EmptyState: Overrides_EmptyState
|
|
59
|
+
} = (0,overrides/* getSectionOverrides */.f)({
|
|
60
|
+
EmptyState: EmptyState/* default */.Z
|
|
61
|
+
}, override);
|
|
62
|
+
|
|
63
|
+
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
64
|
+
var jsx_runtime_ = __webpack_require__(20997);
|
|
65
|
+
;// CONCATENATED MODULE: ./src/components/sections/EmptyState/EmptyState.tsx
|
|
66
|
+
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; }
|
|
67
|
+
|
|
68
|
+
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; }
|
|
69
|
+
|
|
70
|
+
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; }
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
function EmptyState_EmptyState({
|
|
78
|
+
title = Overrides_EmptyState.props.title,
|
|
79
|
+
titleIcon = Overrides_EmptyState.props.titleIcon,
|
|
80
|
+
children
|
|
81
|
+
}) {
|
|
82
|
+
return /*#__PURE__*/jsx_runtime_.jsx(Section/* default */.Z, {
|
|
83
|
+
className: `${(section_module_default()).section} section-empty-state`,
|
|
84
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(Overrides_EmptyState.Component, _objectSpread(_objectSpread({
|
|
85
|
+
bkgColor: "light"
|
|
86
|
+
}, Overrides_EmptyState.props), {}, {
|
|
87
|
+
title: title,
|
|
88
|
+
titleIcon: titleIcon,
|
|
89
|
+
children: children
|
|
90
|
+
}))
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* harmony default export */ const sections_EmptyState_EmptyState = (EmptyState_EmptyState);
|
|
95
|
+
;// CONCATENATED MODULE: ./src/components/sections/EmptyState/index.ts
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/***/ }),
|
|
99
|
+
|
|
100
|
+
/***/ 96791:
|
|
101
|
+
/***/ ((module) => {
|
|
102
|
+
|
|
103
|
+
// Exports
|
|
104
|
+
module.exports = {
|
|
105
|
+
"section": "section_section__TgowL",
|
|
106
|
+
"load": "section_load__F5rqW"
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/***/ })
|
|
111
|
+
|
|
112
|
+
};
|
|
113
|
+
;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 289;
|
|
3
|
+
exports.ids = [289];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 67266:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// EXPORTS
|
|
11
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
+
"Z": () => (/* reexport */ product_ProductGrid_ProductGrid)
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// EXTERNAL MODULE: external "react"
|
|
16
|
+
var external_react_ = __webpack_require__(16689);
|
|
17
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
18
|
+
;// CONCATENATED MODULE: ../components/dist/esm/organisms/ProductGrid/ProductGrid.js
|
|
19
|
+
|
|
20
|
+
const ProductGrid = (0,external_react_.forwardRef)(function ProductGridItem({ testId = 'fs-product-grid', children, ...otherProps }, ref) {
|
|
21
|
+
return (external_react_default().createElement("ul", { ref: ref, "data-fs-product-grid": true, ...otherProps }, children));
|
|
22
|
+
});
|
|
23
|
+
/* harmony default export */ const ProductGrid_ProductGrid = (ProductGrid);
|
|
24
|
+
//# sourceMappingURL=ProductGrid.js.map
|
|
25
|
+
;// CONCATENATED MODULE: ../components/dist/esm/organisms/ProductGrid/ProductGridItem.js
|
|
26
|
+
|
|
27
|
+
const ProductGridItem = (0,external_react_.forwardRef)(function ProductGridItem({ testId = 'fs-product-grid-item', children, ...otherProps }, ref) {
|
|
28
|
+
return (external_react_default().createElement("li", { ref: ref, "data-fs-product-grid-item": true, ...otherProps }, children));
|
|
29
|
+
});
|
|
30
|
+
/* harmony default export */ const ProductGrid_ProductGridItem = (ProductGridItem);
|
|
31
|
+
//# sourceMappingURL=ProductGridItem.js.map
|
|
32
|
+
// EXTERNAL MODULE: ./src/components/skeletons/ProductGridSkeleton/index.ts + 1 modules
|
|
33
|
+
var ProductGridSkeleton = __webpack_require__(89913);
|
|
34
|
+
// EXTERNAL MODULE: ./src/components/sections/ProductGallery/Overrides.tsx + 2 modules
|
|
35
|
+
var Overrides = __webpack_require__(90217);
|
|
36
|
+
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
37
|
+
var jsx_runtime_ = __webpack_require__(20997);
|
|
38
|
+
;// CONCATENATED MODULE: ./src/components/product/ProductGrid/ProductGrid.tsx
|
|
39
|
+
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; }
|
|
40
|
+
|
|
41
|
+
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; }
|
|
42
|
+
|
|
43
|
+
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; }
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
function ProductGrid_ProductGrid_ProductGrid({
|
|
51
|
+
products,
|
|
52
|
+
page,
|
|
53
|
+
pageSize,
|
|
54
|
+
productCard: {
|
|
55
|
+
showDiscountBadge = Overrides/* __experimentalProductCard.props.showDiscountBadge */.zM.props.showDiscountBadge,
|
|
56
|
+
bordered = Overrides/* __experimentalProductCard.props.bordered */.zM.props.bordered
|
|
57
|
+
} = {}
|
|
58
|
+
}) {
|
|
59
|
+
const aspectRatio = 1;
|
|
60
|
+
return /*#__PURE__*/jsx_runtime_.jsx(ProductGridSkeleton/* default */.Z, {
|
|
61
|
+
aspectRatio: aspectRatio,
|
|
62
|
+
loading: products.length === 0,
|
|
63
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(ProductGrid_ProductGrid, {
|
|
64
|
+
children: products.map(({
|
|
65
|
+
node: product
|
|
66
|
+
}, idx) => /*#__PURE__*/jsx_runtime_.jsx(ProductGrid_ProductGridItem, {
|
|
67
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(Overrides/* __experimentalProductCard.Component */.zM.Component, _objectSpread(_objectSpread({
|
|
68
|
+
aspectRatio: aspectRatio,
|
|
69
|
+
imgProps: {
|
|
70
|
+
width: 150,
|
|
71
|
+
height: 150,
|
|
72
|
+
sizes: '30vw'
|
|
73
|
+
}
|
|
74
|
+
}, Overrides/* __experimentalProductCard.props */.zM.props), {}, {
|
|
75
|
+
bordered: showDiscountBadge,
|
|
76
|
+
showDiscountBadge: bordered,
|
|
77
|
+
product: product,
|
|
78
|
+
index: pageSize * page + idx + 1
|
|
79
|
+
}))
|
|
80
|
+
}, `${product.id}`))
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* harmony default export */ const product_ProductGrid_ProductGrid = (ProductGrid_ProductGrid_ProductGrid);
|
|
86
|
+
;// CONCATENATED MODULE: ./src/components/product/ProductGrid/index.ts
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/***/ }),
|
|
90
|
+
|
|
91
|
+
/***/ 75289:
|
|
92
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
93
|
+
|
|
94
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
95
|
+
__webpack_require__.r(__webpack_exports__);
|
|
96
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
97
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
98
|
+
/* harmony export */ });
|
|
99
|
+
/* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(73221);
|
|
100
|
+
/* harmony import */ var src_components_product_ProductGrid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67266);
|
|
101
|
+
/* harmony import */ var src_sdk_search_Sentinel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1566);
|
|
102
|
+
/* harmony import */ var _usePageProducts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49521);
|
|
103
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20997);
|
|
104
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
|
105
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_usePageProducts__WEBPACK_IMPORTED_MODULE_2__]);
|
|
106
|
+
_usePageProducts__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
function GalleryPage({
|
|
116
|
+
page,
|
|
117
|
+
title,
|
|
118
|
+
productCard
|
|
119
|
+
}) {
|
|
120
|
+
const products = (0,_usePageProducts__WEBPACK_IMPORTED_MODULE_2__/* .useProducts */ .r)(page) ?? [];
|
|
121
|
+
const {
|
|
122
|
+
itemsPerPage
|
|
123
|
+
} = (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_4__/* .useSearch */ .R)();
|
|
124
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
|
|
125
|
+
children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(src_sdk_search_Sentinel__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
|
|
126
|
+
products: products,
|
|
127
|
+
page: page,
|
|
128
|
+
pageSize: itemsPerPage,
|
|
129
|
+
title: title
|
|
130
|
+
}), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(src_components_product_ProductGrid__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z, {
|
|
131
|
+
products: products,
|
|
132
|
+
page: page,
|
|
133
|
+
pageSize: itemsPerPage,
|
|
134
|
+
productCard: productCard
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GalleryPage);
|
|
140
|
+
__webpack_async_result__();
|
|
141
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
142
|
+
|
|
143
|
+
/***/ }),
|
|
144
|
+
|
|
145
|
+
/***/ 1566:
|
|
146
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
147
|
+
|
|
148
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
149
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
150
|
+
/* harmony export */ });
|
|
151
|
+
/* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73221);
|
|
152
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
153
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
154
|
+
/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19785);
|
|
155
|
+
/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intersection_observer__WEBPACK_IMPORTED_MODULE_1__);
|
|
156
|
+
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71853);
|
|
157
|
+
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
|
|
158
|
+
/* harmony import */ var _analytics_hooks_useViewItemListEvent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55184);
|
|
159
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20997);
|
|
160
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
// Adds/Replaces ?page= to the querystring of the page
|
|
169
|
+
const replacePagination = (page, router) => {
|
|
170
|
+
const url = new URL(window.location.href); // In case the page argument already matches the target page
|
|
171
|
+
|
|
172
|
+
if (url.searchParams.get('page') === page) {
|
|
173
|
+
return;
|
|
174
|
+
} // Set ?page= parameter and replace route
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
url.searchParams.set('page', page);
|
|
178
|
+
router.replace(url, undefined, {
|
|
179
|
+
shallow: true,
|
|
180
|
+
scroll: false
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Use this component to add a boundary between pages so we can
|
|
185
|
+
* change the current page being viewed on infinite pagination.
|
|
186
|
+
*
|
|
187
|
+
* For more info: https://developers.google.com/search/blog/2014/02/infinite-scroll-search-friendly
|
|
188
|
+
*
|
|
189
|
+
* Also, this component's name is kind of curious. Wikipedia calls is Page Break(https://en.wikipedia.org/wiki/Page_break)
|
|
190
|
+
* however all codes I've seen online use Sentinel
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
function Sentinel({
|
|
195
|
+
page,
|
|
196
|
+
pageSize,
|
|
197
|
+
products,
|
|
198
|
+
title
|
|
199
|
+
}) {
|
|
200
|
+
const viewedRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
|
|
201
|
+
const {
|
|
202
|
+
ref,
|
|
203
|
+
inView
|
|
204
|
+
} = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_1__.useInView)();
|
|
205
|
+
const {
|
|
206
|
+
pages
|
|
207
|
+
} = (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_5__/* .useSearch */ .R)();
|
|
208
|
+
const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
|
|
209
|
+
const {
|
|
210
|
+
sendViewItemListEvent
|
|
211
|
+
} = (0,_analytics_hooks_useViewItemListEvent__WEBPACK_IMPORTED_MODULE_3__/* .useViewItemListEvent */ .m)({
|
|
212
|
+
products,
|
|
213
|
+
title,
|
|
214
|
+
page,
|
|
215
|
+
pageSize
|
|
216
|
+
});
|
|
217
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
218
|
+
// Only replace pagination state when infinite scroll
|
|
219
|
+
// state has more than one page being rendered to the screen
|
|
220
|
+
if (inView && pages.length > 1) {
|
|
221
|
+
replacePagination(page.toString(), router);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (inView && !viewedRef.current && products.length) {
|
|
225
|
+
sendViewItemListEvent();
|
|
226
|
+
viewedRef.current = true;
|
|
227
|
+
}
|
|
228
|
+
}, [pages.length, inView, page, router, sendViewItemListEvent, products.length]);
|
|
229
|
+
return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx("div", {
|
|
230
|
+
ref: ref
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sentinel);
|
|
235
|
+
|
|
236
|
+
/***/ })
|
|
237
|
+
|
|
238
|
+
};
|
|
239
|
+
;
|