@faststore/core 2.1.55 → 2.1.57
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/.turbo/turbo-build.log +6 -6
- package/faststore.config.js +4 -0
- package/package.json +4 -4
- package/.next/BUILD_ID +0 -1
- package/.next/build-manifest.json +0 -129
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/cache/config.json +0 -7
- package/.next/cache/eslint/.cache_1gneedd +0 -1
- package/.next/cache/next-server.js.nft.json +0 -1
- 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 +0 -1
- package/.next/images-manifest.json +0 -1
- package/.next/next-server.js.nft.json +0 -1
- package/.next/package.json +0 -1
- package/.next/prerender-manifest.json +0 -1
- package/.next/react-loadable-manifest.json +0 -44
- package/.next/required-server-files.json +0 -1
- package/.next/routes-manifest.json +0 -1
- package/.next/server/chunks/107.js +0 -56
- package/.next/server/chunks/143.js +0 -106
- package/.next/server/chunks/183.js +0 -91
- package/.next/server/chunks/184.js +0 -61
- package/.next/server/chunks/186.js +0 -112
- package/.next/server/chunks/188.js +0 -119
- package/.next/server/chunks/289.js +0 -238
- package/.next/server/chunks/309.js +0 -624
- package/.next/server/chunks/312.js +0 -688
- package/.next/server/chunks/350.js +0 -143
- package/.next/server/chunks/430.js +0 -648
- package/.next/server/chunks/487.js +0 -9142
- package/.next/server/chunks/576.js +0 -91
- package/.next/server/chunks/581.js +0 -513
- package/.next/server/chunks/650.js +0 -9142
- package/.next/server/chunks/676.js +0 -32
- package/.next/server/chunks/74.js +0 -4022
- package/.next/server/chunks/744.js +0 -60
- package/.next/server/chunks/751.js +0 -210
- package/.next/server/chunks/825.js +0 -4039
- package/.next/server/chunks/854.js +0 -72
- package/.next/server/chunks/859.js +0 -959
- package/.next/server/chunks/90.js +0 -57
- package/.next/server/chunks/907.js +0 -1903
- package/.next/server/chunks/934.js +0 -508
- package/.next/server/chunks/953.js +0 -1250
- package/.next/server/chunks/98.js +0 -124
- package/.next/server/chunks/font-manifest.json +0 -1
- package/.next/server/font-manifest.json +0 -1
- package/.next/server/middleware-build-manifest.js +0 -1
- package/.next/server/middleware-manifest.json +0 -6
- package/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/.next/server/pages/404.js +0 -386
- package/.next/server/pages/404.js.nft.json +0 -1
- package/.next/server/pages/500.js +0 -388
- package/.next/server/pages/500.js.nft.json +0 -1
- package/.next/server/pages/[...slug].js +0 -1005
- package/.next/server/pages/[...slug].js.nft.json +0 -1
- package/.next/server/pages/[slug]/p.js +0 -2364
- package/.next/server/pages/[slug]/p.js.nft.json +0 -1
- package/.next/server/pages/_app.js +0 -281
- package/.next/server/pages/_app.js.nft.json +0 -1
- package/.next/server/pages/_document.js +0 -352
- package/.next/server/pages/_document.js.nft.json +0 -1
- package/.next/server/pages/_error.js +0 -164
- package/.next/server/pages/_error.js.nft.json +0 -1
- package/.next/server/pages/account.js +0 -363
- package/.next/server/pages/account.js.nft.json +0 -1
- package/.next/server/pages/api/graphql.js +0 -365
- package/.next/server/pages/api/graphql.js.nft.json +0 -1
- package/.next/server/pages/api/preview.js +0 -148
- package/.next/server/pages/api/preview.js.nft.json +0 -1
- package/.next/server/pages/checkout.js +0 -363
- package/.next/server/pages/checkout.js.nft.json +0 -1
- package/.next/server/pages/en-US/404.html +0 -81
- package/.next/server/pages/en-US/404.json +0 -1
- package/.next/server/pages/en-US/500.html +0 -81
- package/.next/server/pages/en-US/500.json +0 -1
- package/.next/server/pages/en-US/account.html +0 -81
- package/.next/server/pages/en-US/account.json +0 -1
- package/.next/server/pages/en-US/checkout.html +0 -81
- package/.next/server/pages/en-US/checkout.json +0 -1
- package/.next/server/pages/en-US/login.html +0 -81
- package/.next/server/pages/en-US/login.json +0 -1
- package/.next/server/pages/en-US/s.html +0 -81
- package/.next/server/pages/en-US/s.json +0 -1
- package/.next/server/pages/en-US.html +0 -81
- package/.next/server/pages/en-US.json +0 -1
- package/.next/server/pages/index.js +0 -439
- package/.next/server/pages/index.js.nft.json +0 -1
- package/.next/server/pages/login.js +0 -368
- package/.next/server/pages/login.js.nft.json +0 -1
- package/.next/server/pages/s.js +0 -466
- package/.next/server/pages/s.js.nft.json +0 -1
- package/.next/server/pages-manifest.json +0 -16
- package/.next/server/webpack-api-runtime.js +0 -229
- package/.next/server/webpack-runtime.js +0 -229
- package/.next/static/chunks/143.dd8a556e6957baa1.js +0 -1
- package/.next/static/chunks/27.37e4942c9236a071.js +0 -1
- package/.next/static/chunks/309.548249b3b3588d3b.js +0 -1
- package/.next/static/chunks/33-7f26ec3a5ae7a227.js +0 -1
- package/.next/static/chunks/548-ab84e9e8b49413ab.js +0 -1
- package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
- package/.next/static/chunks/676.b7bc42f3e37ff88f.js +0 -1
- package/.next/static/chunks/686-78f207384adb0d83.js +0 -1
- package/.next/static/chunks/738-67a288ca3569cdbb.js +0 -1
- package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
- package/.next/static/chunks/751.f9415d15cb5be269.js +0 -1
- package/.next/static/chunks/917-bf452887bdb70e03.js +0 -1
- package/.next/static/chunks/98.97381d2021f86cd9.js +0 -1
- package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
- package/.next/static/chunks/main-fd466221927468fd.js +0 -1
- package/.next/static/chunks/pages/404-7812758b206af5cc.js +0 -1
- package/.next/static/chunks/pages/500-0c1b954316d40621.js +0 -1
- package/.next/static/chunks/pages/[...slug]-fd9cc16734d8f161.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-5a83993d8ff855a6.js +0 -1
- package/.next/static/chunks/pages/_app-73e1a1982ec17ff6.js +0 -1
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
- package/.next/static/chunks/pages/account-ac4fa43a2d996db5.js +0 -1
- package/.next/static/chunks/pages/checkout-fa13dc49318df859.js +0 -1
- package/.next/static/chunks/pages/index-e8b556e0a22cf818.js +0 -1
- package/.next/static/chunks/pages/login-5759fba9bb7ae351.js +0 -1
- package/.next/static/chunks/pages/s-a63dd94090d398be.js +0 -1
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
- package/.next/static/chunks/webpack-1d498edbf92d70ad.js +0 -1
- package/.next/static/css/527e334fa69cf40a.css +0 -1
- package/.next/static/css/6e1a7434f061d0ef.css +0 -1
- package/.next/static/css/a2eefb25a4608343.css +0 -1
- package/.next/static/css/a4effc58a718c27a.css +0 -1
- package/.next/static/css/b3f8dd61e5d35ef6.css +0 -1
- package/.next/static/css/cb7d1fcea42fab9c.css +0 -1
- package/.next/static/css/dcc281598933766a.css +0 -1
- package/.next/static/css/df588bb98c0b0ca6.css +0 -1
- package/.next/static/css/e3d648c53f88c1b9.css +0 -1
- package/.next/static/css/ebc1e9d3e686bad3.css +0 -1
- package/.next/static/eyFnbBbCBoWbp9h5XhZVV/_buildManifest.js +0 -1
- package/.next/static/eyFnbBbCBoWbp9h5XhZVV/_ssgManifest.js +0 -1
- package/.next/trace +0 -80
- package/public/~partytown/debug/partytown-atomics.js +0 -556
- package/public/~partytown/debug/partytown-media.js +0 -374
- package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
- package/public/~partytown/debug/partytown-sw.js +0 -59
- package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
- package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
- package/public/~partytown/debug/partytown.js +0 -72
- package/public/~partytown/partytown-atomics.js +0 -2
- package/public/~partytown/partytown-media.js +0 -2
- package/public/~partytown/partytown-sw.js +0 -2
- package/public/~partytown/partytown.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
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/eyFnbBbCBoWbp9h5XhZVV/index.json$"},{"page":"/404","dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/404.json$"},{"page":"/500","dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/500.json$"},{"page":"/account","dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/account.json$"},{"page":"/checkout","dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/checkout.json$"},{"page":"/login","dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/login.json$"},{"page":"/s","dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/s.json$"},{"page":"/[slug]/p","routeKeys":{"slug":"slug"},"dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/([^/]+?)/p\\.json$","namedDataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/(?<slug>[^/]+?)/p\\.json$"},{"page":"/[...slug]","routeKeys":{"slug":"slug"},"dataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/(.+?)\\.json$","namedDataRouteRegex":"^/_next/data/eyFnbBbCBoWbp9h5XhZVV/(?<slug>.+?)\\.json$"}],"i18n":{"locales":["en-US"],"defaultLocale":"en-US"},"rewrites":[]}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 107;
|
|
3
|
-
exports.ids = [107];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 37993:
|
|
7
|
-
/***/ ((__unused_webpack___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 */ });
|
|
12
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
13
|
-
|
|
14
|
-
const Label = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Label({ testId = 'fs-label', children, ...otherProps }, ref) {
|
|
15
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { ref: ref, "data-fs-label": true, "data-testid": testId, ...otherProps }, children));
|
|
16
|
-
});
|
|
17
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Label);
|
|
18
|
-
//# sourceMappingURL=Label.js.map
|
|
19
|
-
|
|
20
|
-
/***/ }),
|
|
21
|
-
|
|
22
|
-
/***/ 87107:
|
|
23
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
24
|
-
|
|
25
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
27
|
-
/* harmony export */ });
|
|
28
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
29
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72644);
|
|
30
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37993);
|
|
31
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90518);
|
|
32
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(82185);
|
|
33
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33815);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const InputField = ({ id, label, type = 'text', error, displayClearButton, actionable, buttonActionText = 'Apply', onSubmit, onClear, placeholder = ' ', // initializes with an empty space to style float label using `placeholder-shown`
|
|
37
|
-
inputRef, disabled, value, testId = 'fs-input-field', ...otherProps }) => {
|
|
38
|
-
const shouldDisplayError = !disabled && error && error !== '';
|
|
39
|
-
const shouldDisplayButton = actionable && !disabled && value !== '';
|
|
40
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { "data-fs-input-field": true, "data-fs-input-field-actionable": actionable, "data-fs-input-field-error": error && error !== '', "data-testid": testId },
|
|
41
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { id: id, type: type, value: value, ref: inputRef, disabled: disabled, placeholder: placeholder, ...otherProps }),
|
|
42
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { htmlFor: id }, label),
|
|
43
|
-
shouldDisplayButton &&
|
|
44
|
-
(displayClearButton || error ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement(___WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { size: "small", "aria-label": "Clear Field", icon: react__WEBPACK_IMPORTED_MODULE_0__.createElement(___WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { name: "XCircle" }), onClick: () => {
|
|
45
|
-
onClear?.();
|
|
46
|
-
inputRef?.current?.focus();
|
|
47
|
-
} })) : (react__WEBPACK_IMPORTED_MODULE_0__.createElement(___WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, { variant: "tertiary", size: "small", onClick: onSubmit }, buttonActionText))),
|
|
48
|
-
shouldDisplayError && (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { "data-fs-input-field-error-message": true }, error))));
|
|
49
|
-
};
|
|
50
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InputField);
|
|
51
|
-
//# sourceMappingURL=InputField.js.map
|
|
52
|
-
|
|
53
|
-
/***/ })
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 143;
|
|
3
|
-
exports.ids = [143];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 29143:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
__webpack_require__.r(__webpack_exports__);
|
|
10
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12
|
-
/* harmony export */ });
|
|
13
|
-
/* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97183);
|
|
14
|
-
/* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_faststore_config__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* More info at: https://www.notion.so/vtexhandbook/Event-API-Documentation-48eee26730cf4d7f80f8fd7262231f84
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
const THIRTY_MINUTES_S = 30 * 60;
|
|
26
|
-
const ONE_YEAR_S = 365 * 24 * 3600;
|
|
27
|
-
|
|
28
|
-
const randomUUID = () => typeof crypto.randomUUID === 'function' ? crypto.randomUUID() : (Math.random() * 1e6).toFixed(0);
|
|
29
|
-
|
|
30
|
-
const createStorage = (key, expiresSecond) => {
|
|
31
|
-
const timelapsed = past => (Date.now() - past) / 1e3;
|
|
32
|
-
|
|
33
|
-
return () => {
|
|
34
|
-
const item = JSON.parse(localStorage.getItem(key) ?? 'null');
|
|
35
|
-
const isExpired = !item || timelapsed(item.createdAt) > expiresSecond;
|
|
36
|
-
const payload = isExpired ? randomUUID() : item.payload;
|
|
37
|
-
|
|
38
|
-
if (isExpired) {
|
|
39
|
-
const data = {
|
|
40
|
-
payload,
|
|
41
|
-
createdAt: Date.now()
|
|
42
|
-
};
|
|
43
|
-
localStorage.setItem(key, JSON.stringify(data));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return payload;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const user = {
|
|
51
|
-
anonymous: createStorage('vtex.search.anonymous', ONE_YEAR_S),
|
|
52
|
-
session: createStorage('vtex.search.session', THIRTY_MINUTES_S)
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const sendEvent = options => fetch(`https://sp.vtex.com/event-api/v1/${(_faststore_config__WEBPACK_IMPORTED_MODULE_0___default().api.storeId)}/event`, {
|
|
56
|
-
method: 'POST',
|
|
57
|
-
body: JSON.stringify(_objectSpread(_objectSpread({}, options), {}, {
|
|
58
|
-
userAgent: navigator.userAgent,
|
|
59
|
-
anonymous: user.anonymous(),
|
|
60
|
-
session: user.session()
|
|
61
|
-
})),
|
|
62
|
-
headers: {
|
|
63
|
-
'content-type': 'application/json'
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const isFullTextSearch = url => typeof url.searchParams.get('q') === 'string' && /^\/s(\/)?$/g.test(url.pathname);
|
|
68
|
-
|
|
69
|
-
const handleEvent = event => {
|
|
70
|
-
if (event.name !== 'search_select_item') {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const url = new URL(event.params.url);
|
|
75
|
-
|
|
76
|
-
if (!isFullTextSearch(url)) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
for (const item of event.params.items ?? []) {
|
|
81
|
-
const productId = item.item_id ?? item.item_variant;
|
|
82
|
-
const position = item.index;
|
|
83
|
-
|
|
84
|
-
if (productId && position) {
|
|
85
|
-
sendEvent({
|
|
86
|
-
type: 'search.click',
|
|
87
|
-
productId,
|
|
88
|
-
position,
|
|
89
|
-
url: url.href,
|
|
90
|
-
text: url.searchParams.get('q') ?? '<empty>'
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
setInterval(() => sendEvent({
|
|
97
|
-
type: 'session.ping'
|
|
98
|
-
}), 60 * 1e3
|
|
99
|
-
/* One minute */
|
|
100
|
-
);
|
|
101
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (handleEvent);
|
|
102
|
-
|
|
103
|
-
/***/ })
|
|
104
|
-
|
|
105
|
-
};
|
|
106
|
-
;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
exports.id = 183;
|
|
2
|
-
exports.ids = [183];
|
|
3
|
-
exports.modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 97183:
|
|
6
|
-
/***/ ((module) => {
|
|
7
|
-
|
|
8
|
-
module.exports = {
|
|
9
|
-
seo: {
|
|
10
|
-
title: 'NextJSStore',
|
|
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: true,
|
|
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
|
-
};
|
|
87
|
-
|
|
88
|
-
/***/ })
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
;
|
|
@@ -1,61 +0,0 @@
|
|
|
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
|
-
;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
exports.id = 186;
|
|
2
|
-
exports.ids = [186];
|
|
3
|
-
exports.modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 11186:
|
|
6
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
|
|
10
|
-
// EXPORTS
|
|
11
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
"Z": () => (/* reexport */ sections_EmptyState_EmptyState)
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// EXTERNAL MODULE: ./src/components/sections/Section/index.ts
|
|
16
|
-
var Section = __webpack_require__(57067);
|
|
17
|
-
// EXTERNAL MODULE: ./src/components/sections/EmptyState/section.module.scss
|
|
18
|
-
var section_module = __webpack_require__(96791);
|
|
19
|
-
var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
|
|
20
|
-
// EXTERNAL MODULE: ../components/dist/organisms/EmptyState/EmptyState.js
|
|
21
|
-
var EmptyState = __webpack_require__(35611);
|
|
22
|
-
// EXTERNAL MODULE: ./src/utils/overrides.ts
|
|
23
|
-
var overrides = __webpack_require__(59104);
|
|
24
|
-
;// CONCATENATED MODULE: ./src/customizations/components/overrides/EmptyState.tsx
|
|
25
|
-
// This is an example of how it can be used on the starter.
|
|
26
|
-
const SECTION = 'EmptyState';
|
|
27
|
-
const override = {
|
|
28
|
-
section: SECTION
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
;// CONCATENATED MODULE: ./src/components/sections/EmptyState/Overrides.tsx
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const {
|
|
36
|
-
EmptyState: Overrides_EmptyState
|
|
37
|
-
} = (0,overrides/* getSectionOverrides */.f)({
|
|
38
|
-
EmptyState: EmptyState/* default */.Z
|
|
39
|
-
}, override);
|
|
40
|
-
|
|
41
|
-
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
42
|
-
var jsx_runtime_ = __webpack_require__(20997);
|
|
43
|
-
;// CONCATENATED MODULE: ./src/components/sections/EmptyState/EmptyState.tsx
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
function EmptyState_EmptyState({
|
|
56
|
-
title = Overrides_EmptyState.props.title,
|
|
57
|
-
titleIcon = Overrides_EmptyState.props.titleIcon,
|
|
58
|
-
children
|
|
59
|
-
}) {
|
|
60
|
-
return /*#__PURE__*/jsx_runtime_.jsx(Section/* default */.Z, {
|
|
61
|
-
className: `${(section_module_default()).section} section-empty-state`,
|
|
62
|
-
children: /*#__PURE__*/jsx_runtime_.jsx(Overrides_EmptyState.Component, _objectSpread(_objectSpread({
|
|
63
|
-
bkgColor: "light"
|
|
64
|
-
}, Overrides_EmptyState.props), {}, {
|
|
65
|
-
title: title,
|
|
66
|
-
titleIcon: titleIcon,
|
|
67
|
-
children: children
|
|
68
|
-
}))
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* harmony default export */ const sections_EmptyState_EmptyState = (EmptyState_EmptyState);
|
|
73
|
-
;// CONCATENATED MODULE: ./src/components/sections/EmptyState/index.ts
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/***/ }),
|
|
77
|
-
|
|
78
|
-
/***/ 96791:
|
|
79
|
-
/***/ ((module) => {
|
|
80
|
-
|
|
81
|
-
// Exports
|
|
82
|
-
module.exports = {
|
|
83
|
-
"section": "section_section__TgowL",
|
|
84
|
-
"load": "section_load__F5rqW"
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/***/ }),
|
|
89
|
-
|
|
90
|
-
/***/ 35611:
|
|
91
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
92
|
-
|
|
93
|
-
"use strict";
|
|
94
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
95
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
96
|
-
/* harmony export */ });
|
|
97
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
98
|
-
|
|
99
|
-
function EmptyState({ testId = 'fs-empty-state', title, titleIcon, variant = 'default', bkgColor = 'default', children, ...otherProps }) {
|
|
100
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.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 },
|
|
101
|
-
title && (react__WEBPACK_IMPORTED_MODULE_0__.createElement("header", { "data-fs-empty-state-title": true },
|
|
102
|
-
titleIcon && react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, titleIcon),
|
|
103
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, title))),
|
|
104
|
-
children));
|
|
105
|
-
}
|
|
106
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EmptyState);
|
|
107
|
-
//# sourceMappingURL=EmptyState.js.map
|
|
108
|
-
|
|
109
|
-
/***/ })
|
|
110
|
-
|
|
111
|
-
};
|
|
112
|
-
;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 188;
|
|
3
|
-
exports.ids = [188];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 14950:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ "Wg": () => (/* binding */ unwrap),
|
|
11
|
-
/* harmony export */ "re": () => (/* binding */ wrap),
|
|
12
|
-
/* harmony export */ "vi": () => (/* binding */ ANALYTICS_EVENT_TYPE)
|
|
13
|
-
/* harmony export */ });
|
|
14
|
-
/* unused harmony export STORE_EVENT_PREFIX */
|
|
15
|
-
const STORE_EVENT_PREFIX = 'store:';
|
|
16
|
-
const ANALYTICS_EVENT_TYPE = 'AnalyticsEvent';
|
|
17
|
-
const wrap = (event) => ({
|
|
18
|
-
name: ANALYTICS_EVENT_TYPE,
|
|
19
|
-
params: {
|
|
20
|
-
...event,
|
|
21
|
-
name: `${STORE_EVENT_PREFIX}${event.name}`,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
const unwrap = (event) => {
|
|
25
|
-
return {
|
|
26
|
-
...event.params,
|
|
27
|
-
name: event.params.name.slice(STORE_EVENT_PREFIX.length, event.params.name.length),
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=wrap.js.map
|
|
31
|
-
|
|
32
|
-
/***/ }),
|
|
33
|
-
|
|
34
|
-
/***/ 35728:
|
|
35
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
36
|
-
|
|
37
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
39
|
-
/* harmony export */ "l": () => (/* binding */ useUI)
|
|
40
|
-
/* harmony export */ });
|
|
41
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
|
|
42
|
-
|
|
43
|
-
const reducer = (state, action) => {
|
|
44
|
-
const { type } = action;
|
|
45
|
-
switch (type) {
|
|
46
|
-
case 'open': {
|
|
47
|
-
const { payload } = action;
|
|
48
|
-
document.body.classList.add('no-scroll');
|
|
49
|
-
return {
|
|
50
|
-
...state,
|
|
51
|
-
[payload]: true,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
case 'close': {
|
|
55
|
-
const { payload } = action;
|
|
56
|
-
document.body.classList.remove('no-scroll');
|
|
57
|
-
return {
|
|
58
|
-
...state,
|
|
59
|
-
[payload]: false,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
case 'pushToast': {
|
|
63
|
-
return {
|
|
64
|
-
...state,
|
|
65
|
-
toasts: [...state.toasts, action.payload],
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
case 'popToast': {
|
|
69
|
-
return {
|
|
70
|
-
...state,
|
|
71
|
-
toasts: state.toasts.slice(1),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
default:
|
|
75
|
-
throw new Error(`Action ${type} not implemented`);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const initializer = () => ({
|
|
79
|
-
cart: false,
|
|
80
|
-
modal: false,
|
|
81
|
-
navbar: false,
|
|
82
|
-
filter: false,
|
|
83
|
-
toasts: [],
|
|
84
|
-
});
|
|
85
|
-
const UIContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);
|
|
86
|
-
function UIProvider({ children }) {
|
|
87
|
-
const [ui, dispatch] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)(reducer, undefined, initializer);
|
|
88
|
-
const callbacks = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
|
|
89
|
-
openFilter: () => dispatch({ type: 'open', payload: 'filter' }),
|
|
90
|
-
closeFilter: () => dispatch({ type: 'close', payload: 'filter' }),
|
|
91
|
-
openNavbar: () => dispatch({ type: 'open', payload: 'navbar' }),
|
|
92
|
-
closeNavbar: () => dispatch({ type: 'close', payload: 'navbar' }),
|
|
93
|
-
openCart: () => dispatch({ type: 'open', payload: 'cart' }),
|
|
94
|
-
closeCart: () => dispatch({ type: 'close', payload: 'cart' }),
|
|
95
|
-
openModal: () => dispatch({ type: 'open', payload: 'modal' }),
|
|
96
|
-
closeModal: () => dispatch({ type: 'close', payload: 'modal' }),
|
|
97
|
-
pushToast: (toast) => dispatch({ type: 'pushToast', payload: toast }),
|
|
98
|
-
popToast: () => dispatch({ type: 'popToast' }),
|
|
99
|
-
}), []);
|
|
100
|
-
const value = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
|
|
101
|
-
...ui,
|
|
102
|
-
...callbacks,
|
|
103
|
-
}), [callbacks, ui]);
|
|
104
|
-
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(UIContext.Provider, { value: value }, children);
|
|
105
|
-
}
|
|
106
|
-
function useUI() {
|
|
107
|
-
const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(UIContext);
|
|
108
|
-
if (context === undefined) {
|
|
109
|
-
throw new Error('Missing UI context on React tree');
|
|
110
|
-
}
|
|
111
|
-
return context;
|
|
112
|
-
}
|
|
113
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UIProvider);
|
|
114
|
-
//# sourceMappingURL=UIProvider.js.map
|
|
115
|
-
|
|
116
|
-
/***/ })
|
|
117
|
-
|
|
118
|
-
};
|
|
119
|
-
;
|