@faststore/core 2.0.75-alpha.0 → 2.0.76-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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/package.json +2 -2
- package/src/components/cart/CartSidebar/CartSidebar.tsx +5 -1
- package/.next/BUILD_ID +0 -1
- package/.next/build-manifest.json +0 -103
- 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 -49
- package/.next/required-server-files.json +0 -1
- package/.next/routes-manifest.json +0 -1
- package/.next/server/chunks/104.js +0 -196
- package/.next/server/chunks/143.js +0 -106
- package/.next/server/chunks/154.js +0 -201
- package/.next/server/chunks/183.js +0 -72
- package/.next/server/chunks/247.js +0 -61
- package/.next/server/chunks/264.js +0 -67
- package/.next/server/chunks/280.js +0 -417
- package/.next/server/chunks/287.js +0 -79
- package/.next/server/chunks/307.js +0 -109
- package/.next/server/chunks/312.js +0 -714
- package/.next/server/chunks/317.js +0 -126
- package/.next/server/chunks/350.js +0 -120
- package/.next/server/chunks/371.js +0 -1467
- package/.next/server/chunks/377.js +0 -82
- package/.next/server/chunks/394.js +0 -3801
- package/.next/server/chunks/439.js +0 -175
- package/.next/server/chunks/444.js +0 -464
- package/.next/server/chunks/465.js +0 -91
- package/.next/server/chunks/576.js +0 -72
- package/.next/server/chunks/650.js +0 -216
- package/.next/server/chunks/664.js +0 -124
- package/.next/server/chunks/676.js +0 -32
- package/.next/server/chunks/732.js +0 -51
- package/.next/server/chunks/746.js +0 -237
- package/.next/server/chunks/849.js +0 -665
- package/.next/server/chunks/854.js +0 -72
- package/.next/server/chunks/859.js +0 -959
- package/.next/server/chunks/872.js +0 -378
- package/.next/server/chunks/881.js +0 -320
- package/.next/server/chunks/898.js +0 -240
- package/.next/server/chunks/914.js +0 -96
- package/.next/server/chunks/953.js +0 -673
- package/.next/server/chunks/98.js +0 -266
- package/.next/server/chunks/992.js +0 -562
- 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.nft.json +0 -1
- package/.next/server/pages/500.js.nft.json +0 -1
- package/.next/server/pages/[...slug].js +0 -609
- package/.next/server/pages/[...slug].js.nft.json +0 -1
- package/.next/server/pages/[slug]/p.js +0 -2560
- package/.next/server/pages/[slug]/p.js.nft.json +0 -1
- package/.next/server/pages/_app.js +0 -2058
- package/.next/server/pages/_app.js.nft.json +0 -1
- package/.next/server/pages/_document.js +0 -304
- 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.nft.json +0 -1
- package/.next/server/pages/api/graphql.js +0 -259
- package/.next/server/pages/api/graphql.js.nft.json +0 -1
- package/.next/server/pages/api/preview.js +0 -118
- package/.next/server/pages/api/preview.js.nft.json +0 -1
- 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/500.html +0 -81
- package/.next/server/pages/en-US/account.html +0 -81
- package/.next/server/pages/en-US/checkout.html +0 -81
- package/.next/server/pages/en-US/login.html +0 -81
- package/.next/server/pages/en-US/s.html +0 -81
- 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 -407
- package/.next/server/pages/index.js.nft.json +0 -1
- package/.next/server/pages/login.js.nft.json +0 -1
- 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/153-a20e3f2da180607e.js +0 -1
- package/.next/static/chunks/260-994385416f68673d.js +0 -1
- package/.next/static/chunks/307.10facde65af3066a.js +0 -1
- package/.next/static/chunks/337-4b719ca7a86d8d8c.js +0 -1
- package/.next/static/chunks/351-a4e28d64f48c5269.js +0 -1
- package/.next/static/chunks/588.591fb3bf1a136c66.js +0 -1
- package/.next/static/chunks/650.807852d1c36bfe44.js +0 -1
- package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
- package/.next/static/chunks/686.36adeba271636edd.js +0 -1
- package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
- package/.next/static/chunks/817-728f854c2948afc0.js +0 -1
- package/.next/static/chunks/909.ea3532bde0943808.js +0 -1
- package/.next/static/chunks/953.77a48c854f628dcf.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-9746772201fe3ac1.js +0 -1
- package/.next/static/chunks/pages/404-ba608a2a9f0c420a.js +0 -1
- package/.next/static/chunks/pages/500-910883c20541d9ce.js +0 -1
- package/.next/static/chunks/pages/[...slug]-9443b18a60d89746.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-cb8ef12f6449cf26.js +0 -1
- package/.next/static/chunks/pages/_app-9cc7312632f19e94.js +0 -1
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
- package/.next/static/chunks/pages/account-f19102933e6fd84c.js +0 -1
- package/.next/static/chunks/pages/checkout-f8cb7cb22225ef9d.js +0 -1
- package/.next/static/chunks/pages/index-6717326cc207d674.js +0 -1
- package/.next/static/chunks/pages/login-0b9ea80d9fa0f91b.js +0 -1
- package/.next/static/chunks/pages/s-86fe1e3303388123.js +0 -1
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
- package/.next/static/chunks/webpack-fc7c18f8a868734c.js +0 -1
- package/.next/static/css/14ebc84fc6d6c80c.css +0 -1
- package/.next/static/css/430b8cafbf7c23c1.css +0 -1
- package/.next/static/css/43d61b402f41569b.css +0 -1
- package/.next/static/css/4d7e7f156483493d.css +0 -1
- package/.next/static/css/6507cb48401e73a4.css +0 -1
- package/.next/static/css/9dd1d1084d254c66.css +0 -1
- package/.next/static/css/b2f16bd4b93e0aca.css +0 -1
- package/.next/static/css/bd743407c8049677.css +0 -1
- package/.next/static/css/e63697a078fd522e.css +0 -1
- package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
- package/.next/static/xmQIY_XtSwwYX1xvtcDOJ/_buildManifest.js +0 -1
- package/.next/static/xmQIY_XtSwwYX1xvtcDOJ/_ssgManifest.js +0 -1
- package/.next/trace +0 -64
- 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,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 465;
|
|
3
|
-
exports.ids = [465];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 8460:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ "_": () => (/* binding */ sendAnalyticsEvent)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* harmony import */ var _wrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6716);
|
|
13
|
-
|
|
14
|
-
const sendAnalyticsEvent = (event) => {
|
|
15
|
-
try {
|
|
16
|
-
window.postMessage((0,_wrap__WEBPACK_IMPORTED_MODULE_0__/* .wrap */ .re)(event), window.origin);
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
19
|
-
// IE and Edge have a bug on postMessage inside promises.
|
|
20
|
-
// Ignoring for now, will try to find a workaround that
|
|
21
|
-
// makes postMessage work on those browsers.
|
|
22
|
-
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14719328/
|
|
23
|
-
console.error(e);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=sendAnalyticsEvent.js.map
|
|
27
|
-
|
|
28
|
-
/***/ }),
|
|
29
|
-
|
|
30
|
-
/***/ 6751:
|
|
31
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
32
|
-
|
|
33
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34
|
-
/* harmony export */ "W": () => (/* binding */ useAnalyticsEvent)
|
|
35
|
-
/* harmony export */ });
|
|
36
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
37
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
38
|
-
/* harmony import */ var _wrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6716);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const useAnalyticsEvent = (handler) => {
|
|
42
|
-
const callback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((message) => {
|
|
43
|
-
try {
|
|
44
|
-
if (message.data.name !== _wrap__WEBPACK_IMPORTED_MODULE_1__/* .ANALYTICS_EVENT_TYPE */ .vi) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
handler((0,_wrap__WEBPACK_IMPORTED_MODULE_1__/* .unwrap */ .Wg)(message.data));
|
|
48
|
-
}
|
|
49
|
-
catch (err) {
|
|
50
|
-
console.error('Something went wrong while running Analytics handler');
|
|
51
|
-
}
|
|
52
|
-
}, [handler]);
|
|
53
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
54
|
-
window.addEventListener('message', callback);
|
|
55
|
-
return () => window.removeEventListener('message', callback);
|
|
56
|
-
}, [callback]);
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=useAnalyticsEvent.js.map
|
|
59
|
-
|
|
60
|
-
/***/ }),
|
|
61
|
-
|
|
62
|
-
/***/ 6716:
|
|
63
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
64
|
-
|
|
65
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66
|
-
/* harmony export */ "Wg": () => (/* binding */ unwrap),
|
|
67
|
-
/* harmony export */ "re": () => (/* binding */ wrap),
|
|
68
|
-
/* harmony export */ "vi": () => (/* binding */ ANALYTICS_EVENT_TYPE)
|
|
69
|
-
/* harmony export */ });
|
|
70
|
-
/* unused harmony export STORE_EVENT_PREFIX */
|
|
71
|
-
const STORE_EVENT_PREFIX = 'store:';
|
|
72
|
-
const ANALYTICS_EVENT_TYPE = 'AnalyticsEvent';
|
|
73
|
-
const wrap = (event) => ({
|
|
74
|
-
name: ANALYTICS_EVENT_TYPE,
|
|
75
|
-
params: {
|
|
76
|
-
...event,
|
|
77
|
-
name: `${STORE_EVENT_PREFIX}${event.name}`,
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
const unwrap = (event) => {
|
|
81
|
-
return {
|
|
82
|
-
...event.params,
|
|
83
|
-
name: event.params.name.slice(STORE_EVENT_PREFIX.length, event.params.name.length),
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=wrap.js.map
|
|
87
|
-
|
|
88
|
-
/***/ })
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
exports.id = 576;
|
|
2
|
-
exports.ids = [576];
|
|
3
|
-
exports.modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 5576:
|
|
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
|
-
},
|
|
26
|
-
// Default session
|
|
27
|
-
session: {
|
|
28
|
-
currency: {
|
|
29
|
-
code: 'USD',
|
|
30
|
-
symbol: '$'
|
|
31
|
-
},
|
|
32
|
-
locale: 'en-US',
|
|
33
|
-
channel: '{"salesChannel":"1","regionId":""}',
|
|
34
|
-
country: 'USA',
|
|
35
|
-
postalCode: null,
|
|
36
|
-
person: null
|
|
37
|
-
},
|
|
38
|
-
// Production URLs
|
|
39
|
-
storeUrl: 'https://vtexfaststore.com',
|
|
40
|
-
secureSubdomain: 'https://secure.vtexfaststore.com',
|
|
41
|
-
checkoutUrl: 'https://secure.vtexfaststore.com/checkout',
|
|
42
|
-
loginUrl: 'https://secure.vtexfaststore.com/api/io/login',
|
|
43
|
-
accountUrl: 'https://secure.vtexfaststore.com/api/io/account',
|
|
44
|
-
// Lighthouse CI
|
|
45
|
-
lighthouse: {
|
|
46
|
-
server: process.env.BASE_SITE_URL || 'http://localhost:3000',
|
|
47
|
-
pages: {
|
|
48
|
-
home: '/',
|
|
49
|
-
pdp: '/apple-magic-mouse/p',
|
|
50
|
-
collection: '/office'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
// E2E CI
|
|
54
|
-
cypress: {
|
|
55
|
-
pages: {
|
|
56
|
-
home: '/',
|
|
57
|
-
pdp: '/apple-magic-mouse/p',
|
|
58
|
-
collection: '/office',
|
|
59
|
-
collection_filtered: '/office/?category-1=office&marca=acer&facets=category-1%2Cmarca',
|
|
60
|
-
search: '/s?q=orange'
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
analytics: {
|
|
64
|
-
// https://developers.google.com/tag-platform/tag-manager/web#standard_web_page_installation,
|
|
65
|
-
gtmContainerId: 'GTM-PGHZ95N'
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/***/ })
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
;
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
exports.id = 650;
|
|
2
|
-
exports.ids = [650];
|
|
3
|
-
exports.modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 650:
|
|
6
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
// ESM COMPAT FLAG
|
|
10
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11
|
-
|
|
12
|
-
// EXPORTS
|
|
13
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
14
|
-
"RegionalizationModalContent": () => (/* reexport */ RegionalizationModal_RegionalizationModalContent),
|
|
15
|
-
"default": () => (/* reexport */ RegionalizationModal_RegionalizationModal)
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// EXTERNAL MODULE: ../components/dist/molecules/Modal/Modal.js + 3 modules
|
|
19
|
-
var Modal = __webpack_require__(9600);
|
|
20
|
-
// EXTERNAL MODULE: external "react"
|
|
21
|
-
var external_react_ = __webpack_require__(6689);
|
|
22
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
23
|
-
// EXTERNAL MODULE: ../components/dist/assets/X.js
|
|
24
|
-
var X = __webpack_require__(2543);
|
|
25
|
-
// EXTERNAL MODULE: ../components/dist/molecules/IconButton/IconButton.js
|
|
26
|
-
var IconButton = __webpack_require__(2765);
|
|
27
|
-
;// CONCATENATED MODULE: ../components/dist/molecules/Modal/ModalHeader.js
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const ModalHeader = ({ onClose, title, closeBtnProps = {}, description, }) => {
|
|
32
|
-
return (external_react_default().createElement("header", { "data-fs-modal-header": true },
|
|
33
|
-
onClose && (external_react_default().createElement(IconButton/* default */.Z, { onClick: () => onClose?.(), "data-fs-modal-header-close-button": true, icon: external_react_default().createElement(X/* default */.Z, null), "aria-label": "Close modal", ...closeBtnProps })),
|
|
34
|
-
external_react_default().createElement("p", { "data-fs-modal-header-title": true }, title),
|
|
35
|
-
description && external_react_default().createElement("p", { "data-fs-modal-header-description": true }, description)));
|
|
36
|
-
};
|
|
37
|
-
/* harmony default export */ const Modal_ModalHeader = (ModalHeader);
|
|
38
|
-
//# sourceMappingURL=ModalHeader.js.map
|
|
39
|
-
;// CONCATENATED MODULE: ../components/dist/molecules/Modal/ModalBody.js
|
|
40
|
-
|
|
41
|
-
const ModalBody = ({ children, ...otherProps }) => (external_react_default().createElement("div", { "data-fs-modal-body": true, ...otherProps }, children));
|
|
42
|
-
/* harmony default export */ const Modal_ModalBody = (ModalBody);
|
|
43
|
-
//# sourceMappingURL=ModalBody.js.map
|
|
44
|
-
// EXTERNAL MODULE: ../components/dist/molecules/InputField/InputField.js
|
|
45
|
-
var InputField = __webpack_require__(8287);
|
|
46
|
-
// EXTERNAL MODULE: ./src/sdk/session/index.ts
|
|
47
|
-
var sdk_session = __webpack_require__(5971);
|
|
48
|
-
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
49
|
-
var jsx_runtime_ = __webpack_require__(997);
|
|
50
|
-
;// CONCATENATED MODULE: ./src/components/regionalization/RegionalizationInput/RegionalizationInput.tsx
|
|
51
|
-
const _excluded = ["isValidating"];
|
|
52
|
-
|
|
53
|
-
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; }
|
|
54
|
-
|
|
55
|
-
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; }
|
|
56
|
-
|
|
57
|
-
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; }
|
|
58
|
-
|
|
59
|
-
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; }
|
|
60
|
-
|
|
61
|
-
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; }
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
function RegionInput({
|
|
69
|
-
closeModal
|
|
70
|
-
}) {
|
|
71
|
-
const inputRef = (0,external_react_.useRef)(null);
|
|
72
|
-
|
|
73
|
-
const _useSession = (0,sdk_session/* useSession */.kP)(),
|
|
74
|
-
{
|
|
75
|
-
isValidating
|
|
76
|
-
} = _useSession,
|
|
77
|
-
session = _objectWithoutProperties(_useSession, _excluded);
|
|
78
|
-
|
|
79
|
-
const {
|
|
80
|
-
0: errorMessage,
|
|
81
|
-
1: setErrorMessage
|
|
82
|
-
} = (0,external_react_.useState)('');
|
|
83
|
-
const {
|
|
84
|
-
0: input,
|
|
85
|
-
1: setInput
|
|
86
|
-
} = (0,external_react_.useState)('');
|
|
87
|
-
|
|
88
|
-
const handleSubmit = async () => {
|
|
89
|
-
const postalCode = inputRef.current?.value;
|
|
90
|
-
|
|
91
|
-
if (typeof postalCode !== 'string') {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
setErrorMessage('');
|
|
96
|
-
|
|
97
|
-
try {
|
|
98
|
-
const newSession = _objectSpread(_objectSpread({}, session), {}, {
|
|
99
|
-
postalCode
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
const validatedSession = await (0,sdk_session/* validateSession */.je)(newSession);
|
|
103
|
-
sdk_session/* sessionStore.set */.Qf.set(validatedSession ?? newSession);
|
|
104
|
-
closeModal();
|
|
105
|
-
} catch (error) {
|
|
106
|
-
setErrorMessage('You entered an invalid Postal Code');
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
return /*#__PURE__*/jsx_runtime_.jsx("div", {
|
|
111
|
-
className: "regionalization-input",
|
|
112
|
-
children: /*#__PURE__*/jsx_runtime_.jsx(InputField/* default */.Z, {
|
|
113
|
-
inputRef: inputRef,
|
|
114
|
-
id: "postal-code-input",
|
|
115
|
-
error: errorMessage,
|
|
116
|
-
label: "Postal Code",
|
|
117
|
-
actionable: true,
|
|
118
|
-
value: input,
|
|
119
|
-
onInput: e => {
|
|
120
|
-
errorMessage !== '' && setErrorMessage('');
|
|
121
|
-
setInput(e.currentTarget.value);
|
|
122
|
-
},
|
|
123
|
-
onSubmit: handleSubmit,
|
|
124
|
-
onClear: () => setInput('')
|
|
125
|
-
})
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* harmony default export */ const RegionalizationInput = (RegionInput);
|
|
130
|
-
;// CONCATENATED MODULE: ./src/components/regionalization/RegionalizationInput/index.ts
|
|
131
|
-
|
|
132
|
-
// EXTERNAL MODULE: ./src/components/ui/Icon/index.ts + 1 modules
|
|
133
|
-
var Icon = __webpack_require__(2478);
|
|
134
|
-
// EXTERNAL MODULE: ./src/components/ui/Link/index.ts + 1 modules
|
|
135
|
-
var Link = __webpack_require__(1093);
|
|
136
|
-
// EXTERNAL MODULE: ./src/components/regionalization/RegionalizationModal/regionalization-modal-body.module.scss
|
|
137
|
-
var regionalization_modal_body_module = __webpack_require__(4872);
|
|
138
|
-
var regionalization_modal_body_module_default = /*#__PURE__*/__webpack_require__.n(regionalization_modal_body_module);
|
|
139
|
-
;// CONCATENATED MODULE: ./src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
function RegionalizationModalContent({
|
|
150
|
-
onClose
|
|
151
|
-
}) {
|
|
152
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
153
|
-
children: [/*#__PURE__*/jsx_runtime_.jsx(Modal_ModalHeader, {
|
|
154
|
-
onClose: () => onClose(),
|
|
155
|
-
title: "Set your location",
|
|
156
|
-
description: "Prices, offers and availability may vary according to your location.",
|
|
157
|
-
closeBtnProps: {
|
|
158
|
-
'aria-label': 'Close Regionalization Modal'
|
|
159
|
-
}
|
|
160
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(Modal_ModalBody, {
|
|
161
|
-
className: (regionalization_modal_body_module_default()).fsRegionalizationModalBody,
|
|
162
|
-
children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
|
|
163
|
-
"data-fs-regionalization-modal-input": true,
|
|
164
|
-
children: /*#__PURE__*/jsx_runtime_.jsx(RegionalizationInput, {
|
|
165
|
-
closeModal: () => onClose()
|
|
166
|
-
})
|
|
167
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(Link/* default */.Z, {
|
|
168
|
-
href: "/",
|
|
169
|
-
"data-fs-regionalization-modal-link": true,
|
|
170
|
-
children: ["I don't know my Postal Code", /*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
|
|
171
|
-
name: "ArrowSquareOut",
|
|
172
|
-
width: 18,
|
|
173
|
-
height: 18
|
|
174
|
-
})]
|
|
175
|
-
})]
|
|
176
|
-
})]
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/* harmony default export */ const RegionalizationModal_RegionalizationModalContent = (RegionalizationModalContent);
|
|
181
|
-
;// CONCATENATED MODULE: ./src/components/regionalization/RegionalizationModal/RegionalizationModal.tsx
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
function RegionalizationModal() {
|
|
187
|
-
return /*#__PURE__*/jsx_runtime_.jsx(Modal/* default */.Z, {
|
|
188
|
-
children: ({
|
|
189
|
-
fadeOut
|
|
190
|
-
}) => /*#__PURE__*/jsx_runtime_.jsx(RegionalizationModal_RegionalizationModalContent, {
|
|
191
|
-
onClose: fadeOut
|
|
192
|
-
})
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/* harmony default export */ const RegionalizationModal_RegionalizationModal = (RegionalizationModal);
|
|
197
|
-
;// CONCATENATED MODULE: ./src/components/regionalization/RegionalizationModal/index.ts
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
/***/ }),
|
|
202
|
-
|
|
203
|
-
/***/ 4872:
|
|
204
|
-
/***/ ((module) => {
|
|
205
|
-
|
|
206
|
-
// Exports
|
|
207
|
-
module.exports = {
|
|
208
|
-
"fs-regionalization-modal-body": "regionalization-modal-body_fs-regionalization-modal-body__RBye7",
|
|
209
|
-
"fsRegionalizationModalBody": "regionalization-modal-body_fs-regionalization-modal-body__RBye7"
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
/***/ })
|
|
214
|
-
|
|
215
|
-
};
|
|
216
|
-
;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 664;
|
|
3
|
-
exports.ids = [664,143];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 3664:
|
|
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": () => (/* binding */ sendEvent)
|
|
12
|
-
/* harmony export */ });
|
|
13
|
-
/* harmony import */ var _search__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9143);
|
|
14
|
-
|
|
15
|
-
function sendEvent(event) {
|
|
16
|
-
// VTEX RC
|
|
17
|
-
window?.sendrc?.(event.name, event.params); // VTEX Intelligent Search
|
|
18
|
-
|
|
19
|
-
(0,_search__WEBPACK_IMPORTED_MODULE_0__["default"])(event);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/***/ }),
|
|
23
|
-
|
|
24
|
-
/***/ 9143:
|
|
25
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26
|
-
|
|
27
|
-
__webpack_require__.r(__webpack_exports__);
|
|
28
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
30
|
-
/* harmony export */ });
|
|
31
|
-
/* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7183);
|
|
32
|
-
/* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_faststore_config__WEBPACK_IMPORTED_MODULE_0__);
|
|
33
|
-
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; }
|
|
34
|
-
|
|
35
|
-
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; }
|
|
36
|
-
|
|
37
|
-
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; }
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* More info at: https://www.notion.so/vtexhandbook/Event-API-Documentation-48eee26730cf4d7f80f8fd7262231f84
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
const THIRTY_MINUTES_S = 30 * 60;
|
|
44
|
-
const ONE_YEAR_S = 365 * 24 * 3600;
|
|
45
|
-
|
|
46
|
-
const randomUUID = () => typeof crypto.randomUUID === 'function' ? crypto.randomUUID() : (Math.random() * 1e6).toFixed(0);
|
|
47
|
-
|
|
48
|
-
const createStorage = (key, expiresSecond) => {
|
|
49
|
-
const timelapsed = past => (Date.now() - past) / 1e3;
|
|
50
|
-
|
|
51
|
-
return () => {
|
|
52
|
-
const item = JSON.parse(localStorage.getItem(key) ?? 'null');
|
|
53
|
-
const isExpired = !item || timelapsed(item.createdAt) > expiresSecond;
|
|
54
|
-
const payload = isExpired ? randomUUID() : item.payload;
|
|
55
|
-
|
|
56
|
-
if (isExpired) {
|
|
57
|
-
const data = {
|
|
58
|
-
payload,
|
|
59
|
-
createdAt: Date.now()
|
|
60
|
-
};
|
|
61
|
-
localStorage.setItem(key, JSON.stringify(data));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return payload;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const user = {
|
|
69
|
-
anonymous: createStorage('vtex.search.anonymous', ONE_YEAR_S),
|
|
70
|
-
session: createStorage('vtex.search.session', THIRTY_MINUTES_S)
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const sendEvent = options => fetch(`https://sp.vtex.com/event-api/v1/${(_faststore_config__WEBPACK_IMPORTED_MODULE_0___default().api.storeId)}/event`, {
|
|
74
|
-
method: 'POST',
|
|
75
|
-
body: JSON.stringify(_objectSpread(_objectSpread({}, options), {}, {
|
|
76
|
-
userAgent: navigator.userAgent,
|
|
77
|
-
anonymous: user.anonymous(),
|
|
78
|
-
session: user.session()
|
|
79
|
-
})),
|
|
80
|
-
headers: {
|
|
81
|
-
'content-type': 'application/json'
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const isFullTextSearch = url => typeof url.searchParams.get('q') === 'string' && /^\/s(\/)?$/g.test(url.pathname);
|
|
86
|
-
|
|
87
|
-
const handleEvent = event => {
|
|
88
|
-
if (event.name !== 'search_select_item') {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const url = new URL(event.params.url);
|
|
93
|
-
|
|
94
|
-
if (!isFullTextSearch(url)) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
for (const item of event.params.items ?? []) {
|
|
99
|
-
const productId = item.item_id ?? item.item_variant;
|
|
100
|
-
const position = item.index;
|
|
101
|
-
|
|
102
|
-
if (productId && position) {
|
|
103
|
-
sendEvent({
|
|
104
|
-
type: 'search.click',
|
|
105
|
-
productId,
|
|
106
|
-
position,
|
|
107
|
-
url: url.href,
|
|
108
|
-
text: url.searchParams.get('q') ?? '<empty>'
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
setInterval(() => sendEvent({
|
|
115
|
-
type: 'session.ping'
|
|
116
|
-
}), 60 * 1e3
|
|
117
|
-
/* One minute */
|
|
118
|
-
);
|
|
119
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (handleEvent);
|
|
120
|
-
|
|
121
|
-
/***/ })
|
|
122
|
-
|
|
123
|
-
};
|
|
124
|
-
;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 676;
|
|
3
|
-
exports.ids = [676];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 676:
|
|
7
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
11
|
-
value: true
|
|
12
|
-
}));
|
|
13
|
-
exports["default"] = isError;
|
|
14
|
-
exports.getProperError = getProperError;
|
|
15
|
-
var _isPlainObject = __webpack_require__(8524);
|
|
16
|
-
function isError(err) {
|
|
17
|
-
return typeof err === "object" && err !== null && "name" in err && "message" in err;
|
|
18
|
-
}
|
|
19
|
-
function getProperError(err) {
|
|
20
|
-
if (isError(err)) {
|
|
21
|
-
return err;
|
|
22
|
-
}
|
|
23
|
-
if (false) {}
|
|
24
|
-
return new Error((0, _isPlainObject).isPlainObject(err) ? JSON.stringify(err) : err + "");
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=is-error.js.map
|
|
28
|
-
|
|
29
|
-
/***/ })
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 732;
|
|
3
|
-
exports.ids = [732];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 7732:
|
|
7
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
10
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
-
/* harmony export */ "WN": () => (/* binding */ DEFAULT_OPTIONS),
|
|
12
|
-
/* harmony export */ "aM": () => (/* binding */ useQuery),
|
|
13
|
-
/* harmony export */ "km": () => (/* binding */ getKey)
|
|
14
|
-
/* harmony export */ });
|
|
15
|
-
/* harmony import */ var swr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5941);
|
|
16
|
-
/* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(180);
|
|
17
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([swr__WEBPACK_IMPORTED_MODULE_0__]);
|
|
18
|
-
swr__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
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; }
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const getKey = (operationName, variables) => `${operationName}::${JSON.stringify(variables)}`;
|
|
28
|
-
const DEFAULT_OPTIONS = {
|
|
29
|
-
errorRetryCount: 3,
|
|
30
|
-
refreshWhenHidden: false,
|
|
31
|
-
refreshWhenOffline: false,
|
|
32
|
-
revalidateOnFocus: false,
|
|
33
|
-
revalidateOnReconnect: false,
|
|
34
|
-
shouldRetryOnError: true
|
|
35
|
-
};
|
|
36
|
-
const useQuery = (operationName, variables, options) => (0,swr__WEBPACK_IMPORTED_MODULE_0__["default"])(getKey(operationName, variables), _objectSpread(_objectSpread({
|
|
37
|
-
fetcher: () => {
|
|
38
|
-
return new Promise(resolve => {
|
|
39
|
-
setTimeout(async () => {
|
|
40
|
-
resolve(await (0,_request__WEBPACK_IMPORTED_MODULE_1__/* .request */ .W)(operationName, variables, options));
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}, DEFAULT_OPTIONS), options));
|
|
45
|
-
__webpack_async_result__();
|
|
46
|
-
} catch(e) { __webpack_async_result__(e); } });
|
|
47
|
-
|
|
48
|
-
/***/ })
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
;
|