@faststore/core 2.2.57 → 2.2.59
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 -1
- package/.next/build-manifest.json +37 -37
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1gneedd +1 -1
- package/.next/cache/next-server.js.nft.json +1 -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/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +2 -2
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/74.js +1593 -166
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +30 -1278
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account.html +2 -2
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +3 -3
- package/.next/static/chunks/158-3ad2d91ade721ede.js +1 -0
- package/.next/static/chunks/497-e24ad9b81a2b2cba.js +1 -0
- package/.next/static/chunks/{585.4e673e43d8daf336.js → 585.f056dcd6e8625c41.js} +1 -1
- package/.next/static/chunks/988.a57dac6501fb5184.js +1 -0
- package/.next/static/chunks/pages/{[...slug]-b82b56ce1651ea4f.js → [...slug]-73ed6192e9f16de9.js} +1 -1
- package/.next/static/chunks/pages/[slug]/p-0006885a8666b680.js +1 -0
- package/.next/static/chunks/pages/index-eb26d4cf53e13666.js +1 -0
- package/.next/static/chunks/{webpack-ec84ae4e89cebb1f.js → webpack-3382def1b25b17f8.js} +1 -1
- package/.next/static/css/4729e602d10c1332.css +1 -0
- package/.next/static/css/f2ab72459fcdabcc.css +1 -0
- package/.next/static/{sToiuT4rncwaUIk2owcIX → kWyk6RSC1bsGWTDX1FSk5}/_buildManifest.js +1 -1
- package/.next/trace +81 -81
- package/.turbo/turbo-build.log +12 -12
- package/.turbo/turbo-test.log +9 -9
- package/package.json +2 -2
- package/public/icons.svg +3 -1
- package/src/components/sections/ProductDetails/DefaultComponents.ts +34 -0
- package/src/components/sections/ProductDetails/OverriddenDefaultProductDetails.ts +12 -0
- package/src/components/sections/ProductDetails/ProductDetails.tsx +33 -34
- package/src/components/ui/ImageGallery/ImageGallery.tsx +10 -6
- package/src/components/ui/ProductDetails/ProductDetailsSettings.tsx +12 -13
- package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +4 -2
- package/src/components/ui/SkuSelector/Selectors.tsx +3 -1
- package/src/pages/[slug]/p.tsx +1 -1
- package/src/sdk/overrides/sections.tsx +5 -1
- package/src/typings/overrides.ts +1 -1
- package/.next/server/chunks/693.js +0 -58
- package/.next/server/chunks/779.js +0 -58
- package/.next/static/chunks/158-ef35da4842083552.js +0 -1
- package/.next/static/chunks/497-37c1e4e1d862b354.js +0 -1
- package/.next/static/chunks/988.afda042dd9ba11d1.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-39599bd4d6faeeb6.js +0 -1
- package/.next/static/chunks/pages/index-84457d91d9060925.js +0 -1
- package/.next/static/css/0cb5d7afb952bb02.css +0 -1
- package/.next/static/css/cbccabebb36f7f92.css +0 -1
- package/src/components/sections/ProductDetails/Overrides.tsx +0 -73
- /package/.next/static/{sToiuT4rncwaUIk2owcIX → kWyk6RSC1bsGWTDX1FSk5}/_ssgManifest.js +0 -0
|
@@ -92,6 +92,24 @@ const Input = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Input({
|
|
|
92
92
|
|
|
93
93
|
/***/ }),
|
|
94
94
|
|
|
95
|
+
/***/ 1953:
|
|
96
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
97
|
+
|
|
98
|
+
"use strict";
|
|
99
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
100
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
101
|
+
/* harmony export */ });
|
|
102
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
103
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
104
|
+
|
|
105
|
+
const Label = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Label({ testId = 'fs-label', children, ...otherProps }, ref) {
|
|
106
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { ref: ref, "data-fs-label": true, "data-testid": testId, ...otherProps }, children));
|
|
107
|
+
});
|
|
108
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Label);
|
|
109
|
+
//# sourceMappingURL=Label.js.map
|
|
110
|
+
|
|
111
|
+
/***/ }),
|
|
112
|
+
|
|
95
113
|
/***/ 727:
|
|
96
114
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
97
115
|
|
|
@@ -525,6 +543,41 @@ const IconButton = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Ic
|
|
|
525
543
|
|
|
526
544
|
/***/ }),
|
|
527
545
|
|
|
546
|
+
/***/ 3779:
|
|
547
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
548
|
+
|
|
549
|
+
"use strict";
|
|
550
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
551
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
552
|
+
/* harmony export */ });
|
|
553
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
554
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
555
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2256);
|
|
556
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1953);
|
|
557
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7041);
|
|
558
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2614);
|
|
559
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3339);
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
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`
|
|
563
|
+
inputRef, disabled, value, testId = 'fs-input-field', ...otherProps }) => {
|
|
564
|
+
const shouldDisplayError = !disabled && error && error !== '';
|
|
565
|
+
const shouldDisplayButton = actionable && !disabled && value !== '';
|
|
566
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-input-field": true, "data-fs-input-field-actionable": actionable, "data-fs-input-field-error": error && error !== '', "data-testid": testId },
|
|
567
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { id: id, type: type, value: value, ref: inputRef, disabled: disabled, placeholder: placeholder, ...otherProps }),
|
|
568
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { htmlFor: id }, label),
|
|
569
|
+
shouldDisplayButton &&
|
|
570
|
+
(displayClearButton || error ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { size: "small", "aria-label": "Clear Field", icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { name: "XCircle" }), onClick: () => {
|
|
571
|
+
onClear?.();
|
|
572
|
+
inputRef?.current?.focus();
|
|
573
|
+
} })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, { variant: "tertiary", size: "small", onClick: onSubmit }, buttonActionText))),
|
|
574
|
+
shouldDisplayError && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { "data-fs-input-field-error-message": true }, error))));
|
|
575
|
+
};
|
|
576
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InputField);
|
|
577
|
+
//# sourceMappingURL=InputField.js.map
|
|
578
|
+
|
|
579
|
+
/***/ }),
|
|
580
|
+
|
|
528
581
|
/***/ 3922:
|
|
529
582
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
530
583
|
|
|
@@ -724,6 +777,58 @@ const Modal = ({ children, testId = 'fs-modal', isOpen = true, onDismiss, overla
|
|
|
724
777
|
|
|
725
778
|
/***/ }),
|
|
726
779
|
|
|
780
|
+
/***/ 6693:
|
|
781
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
782
|
+
|
|
783
|
+
"use strict";
|
|
784
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
785
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
786
|
+
/* harmony export */ });
|
|
787
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
788
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
789
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7041);
|
|
790
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2614);
|
|
791
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2256);
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
const QuantitySelector = ({ max, min = 1, initial, disabled = false, onChange, testId = 'fs-quantity-selector', ...otherProps }) => {
|
|
795
|
+
const [quantity, setQuantity] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initial ?? min);
|
|
796
|
+
const isLeftDisabled = quantity === min;
|
|
797
|
+
const isRightDisabled = quantity === max;
|
|
798
|
+
const changeQuantity = (increaseValue) => {
|
|
799
|
+
const quantityValue = validateQuantityBounds(quantity + increaseValue);
|
|
800
|
+
onChange?.(quantityValue);
|
|
801
|
+
setQuantity(quantityValue);
|
|
802
|
+
};
|
|
803
|
+
const increase = () => changeQuantity(1);
|
|
804
|
+
const decrease = () => changeQuantity(-1);
|
|
805
|
+
function validateQuantityBounds(n) {
|
|
806
|
+
const maxValue = min ? Math.max(n, min) : n;
|
|
807
|
+
return max ? Math.min(maxValue, max) : maxValue;
|
|
808
|
+
}
|
|
809
|
+
function validateInput(e) {
|
|
810
|
+
const val = e.currentTarget.value;
|
|
811
|
+
if (!Number.isNaN(Number(val))) {
|
|
812
|
+
setQuantity(() => {
|
|
813
|
+
const quantityValue = validateQuantityBounds(Number(val));
|
|
814
|
+
onChange?.(quantityValue);
|
|
815
|
+
return quantityValue;
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
820
|
+
initial && setQuantity(initial);
|
|
821
|
+
}, [initial]);
|
|
822
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-quantity-selector": disabled ? 'disabled' : 'true', "data-testid": testId, ...otherProps },
|
|
823
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { "data-quantity-selector-button": "left", icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { name: "Minus", width: 16, height: 16, weight: "bold" }), "aria-label": "Decrement Quantity", "aria-controls": "quantity-selector-input", disabled: isLeftDisabled || disabled, onClick: decrease, testId: `${testId}-left-button`, size: "small" }),
|
|
824
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { "data-quantity-selector-input": true, id: "quantity-selector-input", "aria-label": "Quantity", value: quantity, onChange: validateInput, disabled: disabled }),
|
|
825
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { "data-quantity-selector-button": "right", "aria-controls": "quantity-selector-input", "aria-label": "Increment Quantity", disabled: isRightDisabled || disabled, icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { name: "Plus", width: 16, height: 16, weight: "bold" }), onClick: increase, testId: `${testId}-right-button`, size: "small" })));
|
|
826
|
+
};
|
|
827
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (QuantitySelector);
|
|
828
|
+
//# sourceMappingURL=QuantitySelector.js.map
|
|
829
|
+
|
|
830
|
+
/***/ }),
|
|
831
|
+
|
|
727
832
|
/***/ 3024:
|
|
728
833
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
729
834
|
|
|
@@ -1039,8 +1144,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
1039
1144
|
|
|
1040
1145
|
|
|
1041
1146
|
|
|
1042
|
-
const RegionModal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)(() =>
|
|
1043
|
-
const CartSidebar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)(() =>
|
|
1147
|
+
const RegionModal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/* import() */ 988).then(__webpack_require__.bind(__webpack_require__, 5988)));
|
|
1148
|
+
const CartSidebar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/* import() */ 585).then(__webpack_require__.bind(__webpack_require__, 6585)));
|
|
1044
1149
|
const GLOBAL_SECTIONS_CONTENT_TYPE = 'globalSections';
|
|
1045
1150
|
|
|
1046
1151
|
/* A list of components that can be used in the CMS. */
|
|
@@ -3083,139 +3188,278 @@ const {
|
|
|
3083
3188
|
|
|
3084
3189
|
/***/ }),
|
|
3085
3190
|
|
|
3086
|
-
/***/
|
|
3087
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3088
|
-
|
|
3089
|
-
"use strict";
|
|
3090
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3091
|
-
/* harmony export */ "B": () => (/* binding */ ProductShelfDefaultComponents)
|
|
3092
|
-
/* harmony export */ });
|
|
3093
|
-
/* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6737);
|
|
3094
|
-
/* harmony import */ var src_components_product_ProductCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8553);
|
|
3095
|
-
/* harmony import */ var src_components_ui_Carousel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8619);
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
const ProductShelfDefaultComponents = {
|
|
3100
|
-
ProductShelf: _faststore_ui__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z,
|
|
3101
|
-
__experimentalCarousel: src_components_ui_Carousel__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z,
|
|
3102
|
-
__experimentalProductCard: src_components_product_ProductCard__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z
|
|
3103
|
-
};
|
|
3104
|
-
|
|
3105
|
-
/***/ }),
|
|
3106
|
-
|
|
3107
|
-
/***/ 8569:
|
|
3108
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
3109
|
-
|
|
3110
|
-
"use strict";
|
|
3111
|
-
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
3112
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3113
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3114
|
-
/* harmony export */ });
|
|
3115
|
-
/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9785);
|
|
3116
|
-
/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_intersection_observer__WEBPACK_IMPORTED_MODULE_0__);
|
|
3117
|
-
/* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3271);
|
|
3118
|
-
/* harmony import */ var src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7691);
|
|
3119
|
-
/* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6627);
|
|
3120
|
-
/* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_section_module_scss__WEBPACK_IMPORTED_MODULE_3__);
|
|
3121
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(997);
|
|
3122
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
|
3123
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__]);
|
|
3124
|
-
src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
3125
|
-
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; }
|
|
3126
|
-
|
|
3127
|
-
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; }
|
|
3128
|
-
|
|
3129
|
-
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; }
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
function ProductShelfSection(_ref) {
|
|
3138
|
-
let otherProps = Object.assign({}, _ref);
|
|
3139
|
-
const {
|
|
3140
|
-
ref,
|
|
3141
|
-
inView
|
|
3142
|
-
} = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_0__.useInView)();
|
|
3143
|
-
return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx(_Section__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
|
|
3144
|
-
className: `${(_section_module_scss__WEBPACK_IMPORTED_MODULE_3___default().section)} section-product-shelf layout__section`,
|
|
3145
|
-
ref: ref,
|
|
3146
|
-
children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx(src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, _objectSpread({
|
|
3147
|
-
inView: inView
|
|
3148
|
-
}, otherProps))
|
|
3149
|
-
});
|
|
3150
|
-
}
|
|
3151
|
-
|
|
3152
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductShelfSection);
|
|
3153
|
-
__webpack_async_result__();
|
|
3154
|
-
} catch(e) { __webpack_async_result__(e); } });
|
|
3155
|
-
|
|
3156
|
-
/***/ }),
|
|
3157
|
-
|
|
3158
|
-
/***/ 3830:
|
|
3191
|
+
/***/ 1307:
|
|
3159
3192
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3160
3193
|
|
|
3161
3194
|
"use strict";
|
|
3162
3195
|
|
|
3163
3196
|
// EXPORTS
|
|
3164
3197
|
__webpack_require__.d(__webpack_exports__, {
|
|
3165
|
-
"
|
|
3198
|
+
"l": () => (/* binding */ ProductDetailsDefaultComponents)
|
|
3166
3199
|
});
|
|
3167
3200
|
|
|
3168
|
-
// EXTERNAL MODULE: ../components/dist/esm/hooks/UIProvider.js
|
|
3169
|
-
var UIProvider = __webpack_require__(6652);
|
|
3170
|
-
// EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
|
|
3171
|
-
var session = __webpack_require__(7295);
|
|
3172
3201
|
// EXTERNAL MODULE: external "react"
|
|
3173
3202
|
var external_react_ = __webpack_require__(6689);
|
|
3174
3203
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
3204
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/Rating/Rating.js
|
|
3205
|
+
var Rating = __webpack_require__(3024);
|
|
3206
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/ProductTitle/ProductTitle.js
|
|
3207
|
+
|
|
3208
|
+
|
|
3209
|
+
const ProductTitle = (0,external_react_.forwardRef)(function ProductTitle({ title, label, refTag = 'Ref.: ', refNumber, testId = 'fs-product-title', ratingValue, ...otherProps }, ref) {
|
|
3210
|
+
return (external_react_default().createElement("header", { ref: ref, "data-fs-product-title": true, "data-testid": testId, ...otherProps },
|
|
3211
|
+
external_react_default().createElement("div", { "data-fs-product-title-header": true },
|
|
3212
|
+
title,
|
|
3213
|
+
!!label && label),
|
|
3214
|
+
(refNumber || ratingValue) && (external_react_default().createElement("div", { "data-fs-product-title-addendum": true },
|
|
3215
|
+
ratingValue && external_react_default().createElement(Rating/* default */.Z, { value: ratingValue }),
|
|
3216
|
+
refNumber && (external_react_default().createElement((external_react_default()).Fragment, null,
|
|
3217
|
+
refTag,
|
|
3218
|
+
" ",
|
|
3219
|
+
refNumber))))));
|
|
3220
|
+
});
|
|
3221
|
+
/* harmony default export */ const ProductTitle_ProductTitle = (ProductTitle);
|
|
3222
|
+
//# sourceMappingURL=ProductTitle.js.map
|
|
3223
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/DiscountBadge/DiscountBadge.js + 1 modules
|
|
3224
|
+
var DiscountBadge = __webpack_require__(2946);
|
|
3175
3225
|
// EXTERNAL MODULE: ../components/dist/esm/atoms/Button/Button.js
|
|
3176
3226
|
var Button = __webpack_require__(3339);
|
|
3177
|
-
;// CONCATENATED MODULE: ../components/dist/esm/molecules/
|
|
3227
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/BuyButton/BuyButton.js
|
|
3178
3228
|
|
|
3179
3229
|
|
|
3180
|
-
|
|
3181
|
-
return (external_react_default().createElement("
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
external_react_default().createElement("span", { "data-fs-region-bar-postal-code": true }, postalCode),
|
|
3186
|
-
!!editLabel && external_react_default().createElement("span", { "data-fs-region-bar-cta": true }, editLabel))) : (external_react_default().createElement("span", { "data-fs-region-bar-message": true }, label)))));
|
|
3187
|
-
});
|
|
3188
|
-
/* harmony default export */ const RegionBar_RegionBar = (RegionBar);
|
|
3189
|
-
//# sourceMappingURL=RegionBar.js.map
|
|
3230
|
+
function BuyButton({ testId = 'fs-buy-button', icon, children, ...otherProps }) {
|
|
3231
|
+
return (external_react_default().createElement(Button/* default */.Z, { "data-fs-buy-button": true, icon: icon, iconPosition: "left", "data-testid": testId, ...otherProps }, children));
|
|
3232
|
+
}
|
|
3233
|
+
/* harmony default export */ const BuyButton_BuyButton = (BuyButton);
|
|
3234
|
+
//# sourceMappingURL=BuyButton.js.map
|
|
3190
3235
|
// EXTERNAL MODULE: ../components/dist/esm/atoms/Icon/Icon.js
|
|
3191
3236
|
var Icon = __webpack_require__(2614);
|
|
3192
|
-
// EXTERNAL MODULE:
|
|
3193
|
-
var
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3237
|
+
// EXTERNAL MODULE: ../components/dist/esm/atoms/Price/Price.js
|
|
3238
|
+
var Price = __webpack_require__(9767);
|
|
3239
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/QuantitySelector/QuantitySelector.js
|
|
3240
|
+
var QuantitySelector = __webpack_require__(6693);
|
|
3241
|
+
// EXTERNAL MODULE: ../components/dist/esm/atoms/Label/Label.js
|
|
3242
|
+
var Label = __webpack_require__(1953);
|
|
3243
|
+
// EXTERNAL MODULE: ../components/dist/esm/atoms/Link/Link.js
|
|
3244
|
+
var Link = __webpack_require__(727);
|
|
3245
|
+
// EXTERNAL MODULE: ../components/dist/esm/atoms/SROnly/SROnly.js
|
|
3246
|
+
var SROnly = __webpack_require__(5450);
|
|
3247
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/SkuSelector/useDefineVariant.js
|
|
3248
|
+
|
|
3249
|
+
const getImageName = (src) => {
|
|
3250
|
+
const sourcePath = new URL(src).pathname;
|
|
3251
|
+
const imageName = sourcePath.split('/').slice(-1)[0];
|
|
3252
|
+
return imageName;
|
|
3253
|
+
};
|
|
3254
|
+
const useDefineVariant = (options, variant) => (0,external_react_.useMemo)(() => {
|
|
3255
|
+
if (variant)
|
|
3256
|
+
return variant;
|
|
3257
|
+
const allOptionsHaveHexColor = options.every((option) => option.hexColor);
|
|
3258
|
+
if (allOptionsHaveHexColor) {
|
|
3259
|
+
return 'color';
|
|
3260
|
+
}
|
|
3261
|
+
const firstImageName = options[0]?.src && getImageName(options[0].src);
|
|
3262
|
+
const areSourcesEqualsOrNull = options.every((option) => {
|
|
3263
|
+
if (!option.src) {
|
|
3264
|
+
return true;
|
|
3265
|
+
}
|
|
3266
|
+
const optionImageName = getImageName(option.src);
|
|
3267
|
+
return optionImageName === firstImageName;
|
|
3268
|
+
});
|
|
3269
|
+
if (!areSourcesEqualsOrNull) {
|
|
3270
|
+
return 'image';
|
|
3271
|
+
}
|
|
3272
|
+
return 'label';
|
|
3273
|
+
}, [options, variant]);
|
|
3274
|
+
//# sourceMappingURL=useDefineVariant.js.map
|
|
3275
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/SkuSelector/useSkuSlug.js
|
|
3276
|
+
|
|
3277
|
+
function getSkuSlug(slugsMap, selectedVariations, dominantVariation) {
|
|
3278
|
+
const slugsMapKey = Object.entries(selectedVariations).flat().join('-');
|
|
3279
|
+
if (slugsMapKey in slugsMap) {
|
|
3280
|
+
return slugsMap[slugsMapKey];
|
|
3281
|
+
}
|
|
3282
|
+
const possibleVariants = Object.keys(slugsMap);
|
|
3283
|
+
const firstVariationForDominantValue = possibleVariants.find((slug) => slug.includes(`${dominantVariation}-${selectedVariations[dominantVariation]}`));
|
|
3284
|
+
return slugsMap[firstVariationForDominantValue ?? possibleVariants[0]];
|
|
3285
|
+
}
|
|
3286
|
+
const useSkuSlug = (activeVariations, slugsMap, skuPropertyName, getItemHrefProp) => {
|
|
3287
|
+
const getItemHref = (0,external_react_.useCallback)((option) => {
|
|
3288
|
+
if (getItemHrefProp)
|
|
3289
|
+
return { getItemHrefProp };
|
|
3290
|
+
const currentItemHref = `/${getSkuSlug(slugsMap, {
|
|
3291
|
+
...activeVariations,
|
|
3292
|
+
[skuPropertyName]: option.value,
|
|
3293
|
+
}, skuPropertyName)}/p`;
|
|
3294
|
+
return currentItemHref;
|
|
3295
|
+
}, [activeVariations, getItemHrefProp, slugsMap, skuPropertyName]);
|
|
3296
|
+
return { getItemHref };
|
|
3199
3297
|
};
|
|
3298
|
+
//# sourceMappingURL=useSkuSlug.js.map
|
|
3299
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/SkuSelector/SkuSelector.js
|
|
3300
|
+
|
|
3301
|
+
|
|
3302
|
+
|
|
3303
|
+
|
|
3304
|
+
// TODO: Change by ImageComponent when it be right
|
|
3305
|
+
const ImageComponentFallback = ({ src, alt, ...otherProps }) => external_react_default().createElement("img", { src: src, alt: alt, ...otherProps });
|
|
3306
|
+
const SkuSelector = (0,external_react_.forwardRef)(function SkuSelector({ availableVariations, skuPropertyName, testId, activeVariations, linkProps, slugsMap, getItemHref: getItemHrefProp, ImageComponent = ImageComponentFallback, variant: variantProp, ...otherProps }, ref) {
|
|
3307
|
+
const activeSelectorValue = activeVariations[skuPropertyName];
|
|
3308
|
+
const options = availableVariations[skuPropertyName];
|
|
3309
|
+
const variant = useDefineVariant(options, variantProp);
|
|
3310
|
+
const { getItemHref } = useSkuSlug(activeVariations, slugsMap, skuPropertyName, getItemHrefProp);
|
|
3311
|
+
return (external_react_default().createElement("div", { ref: ref, "data-fs-sku-selector": true, "data-testid": testId, "data-fs-sku-selector-variant": variant, ...otherProps },
|
|
3312
|
+
skuPropertyName && (external_react_default().createElement(Label/* default */.Z, { "data-fs-sku-selector-title": true },
|
|
3313
|
+
skuPropertyName,
|
|
3314
|
+
": ",
|
|
3315
|
+
external_react_default().createElement("strong", null, activeSelectorValue))),
|
|
3316
|
+
external_react_default().createElement("ul", { "data-fs-sku-selector-list": true }, options.map((option, index) => {
|
|
3317
|
+
return (external_react_default().createElement("li", { key: String(index), title: option.label, "data-fs-sku-selector-option": true, "data-fs-sku-selector-disabled": option.disabled, "data-fs-sku-selector-checked": option.value === activeVariations[skuPropertyName] },
|
|
3318
|
+
external_react_default().createElement(Link/* default */.Z, { "data-fs-sku-selector-option-link": true, href: getItemHref(option), ...linkProps },
|
|
3319
|
+
external_react_default().createElement(SROnly/* default */.Z, { text: option.label })),
|
|
3320
|
+
variant === 'label' && external_react_default().createElement("span", null, option.value),
|
|
3321
|
+
variant === 'image' && ImageComponent && (external_react_default().createElement("span", null,
|
|
3322
|
+
external_react_default().createElement(ImageComponent, { src: option.src ?? '', alt: option.alt ?? '', "data-fs-sku-selector-option-image": true }))),
|
|
3323
|
+
variant === 'color' && (external_react_default().createElement("span", null,
|
|
3324
|
+
external_react_default().createElement("div", { "data-fs-sku-selector-option-color": true, title: option.value, style: {
|
|
3325
|
+
'--data-fs-sku-selector-option-color-bkg-color': option.hexColor,
|
|
3326
|
+
} })))));
|
|
3327
|
+
}))));
|
|
3328
|
+
});
|
|
3329
|
+
/* harmony default export */ const SkuSelector_SkuSelector = (SkuSelector);
|
|
3330
|
+
//# sourceMappingURL=SkuSelector.js.map
|
|
3331
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/InputField/InputField.js
|
|
3332
|
+
var InputField = __webpack_require__(3779);
|
|
3333
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/Table.js
|
|
3334
|
+
|
|
3335
|
+
const Table = (0,external_react_.forwardRef)(function Table({ children, variant = 'colored', testId = 'fs-table', ...otherProps }, ref) {
|
|
3336
|
+
return (external_react_default().createElement("div", { "data-fs-table": true },
|
|
3337
|
+
external_react_default().createElement("table", { ref: ref, "data-fs-table-content": true, "data-fs-table-variant": variant, "data-testid": testId, ...otherProps }, children)));
|
|
3338
|
+
});
|
|
3339
|
+
/* harmony default export */ const Table_Table = (Table);
|
|
3340
|
+
//# sourceMappingURL=Table.js.map
|
|
3341
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/TableBody.js
|
|
3200
3342
|
|
|
3201
|
-
|
|
3343
|
+
const TableBody = (0,external_react_.forwardRef)(function TableBody({ children, testId = 'fs-table-body', ...otherProps }, ref) {
|
|
3344
|
+
return (external_react_default().createElement("tbody", { ref: ref, "data-testid": testId, "data-fs-table-body": true, ...otherProps }, children));
|
|
3345
|
+
});
|
|
3346
|
+
/* harmony default export */ const Table_TableBody = (TableBody);
|
|
3347
|
+
//# sourceMappingURL=TableBody.js.map
|
|
3348
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/TableRow.js
|
|
3202
3349
|
|
|
3350
|
+
const TableRow = (0,external_react_.forwardRef)(function TableRow({ children, testId = 'fs-table-row', ...otherProps }, ref) {
|
|
3351
|
+
return (external_react_default().createElement("tr", { ref: ref, "data-fs-table-row": true, "data-testid": testId, ...otherProps }, children));
|
|
3352
|
+
});
|
|
3353
|
+
/* harmony default export */ const Table_TableRow = (TableRow);
|
|
3354
|
+
//# sourceMappingURL=TableRow.js.map
|
|
3355
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/TableCell.js
|
|
3203
3356
|
|
|
3357
|
+
const TableCell = (0,external_react_.forwardRef)(function TableCell({ scope, align, children, variant = 'data', testId = 'fs-table-cell', ...otherProps }, ref) {
|
|
3358
|
+
const Cell = variant === 'header' ? 'th' : 'td';
|
|
3359
|
+
return (external_react_default().createElement(Cell, { ref: ref, "data-fs-table-cell": variant, "data-fs-table-cell-align": align, "data-testid": testId, scope: scope, ...otherProps }, children));
|
|
3360
|
+
});
|
|
3361
|
+
/* harmony default export */ const Table_TableCell = (TableCell);
|
|
3362
|
+
//# sourceMappingURL=TableCell.js.map
|
|
3363
|
+
;// CONCATENATED MODULE: ../components/dist/esm/organisms/ShippingSimulation/ShippingSimulation.js
|
|
3364
|
+
|
|
3365
|
+
|
|
3366
|
+
function ShippingSimulation({ testId = 'fs-shipping-simulation', formatter, title = 'Shipping', inputLabel = 'Postal Code', optionsLabel = 'Shipping options', idkPostalCodeLinkProps, onInput, onSubmit, onClear, location, options = [], displayClearButton = false, errorMessage, postalCode, ...otherProps }) {
|
|
3367
|
+
const hasShippingOptions = !!options && options.length > 0;
|
|
3368
|
+
return (external_react_default().createElement("section", { "data-fs-shipping-simulation": true, "data-fs-shipping-simulation-empty": !hasShippingOptions ? 'true' : 'false', "data-testid": testId, ...otherProps },
|
|
3369
|
+
external_react_default().createElement("h2", { "data-fs-shipping-simulation-title": true }, title),
|
|
3370
|
+
external_react_default().createElement(InputField/* default */.Z, { actionable: true, error: errorMessage, id: `${testId}-input-field`, label: inputLabel, value: postalCode, onInput: (event) => onInput?.(event), onSubmit: () => onSubmit?.(), onClear: () => onClear?.(), displayClearButton: displayClearButton }),
|
|
3371
|
+
external_react_default().createElement(Link/* default */.Z, { href: "/", "data-fs-shipping-simulation-link": true, size: "small", ...idkPostalCodeLinkProps }, idkPostalCodeLinkProps?.children ?? (external_react_default().createElement((external_react_default()).Fragment, null,
|
|
3372
|
+
"I don't know my Postal Code",
|
|
3373
|
+
external_react_default().createElement(Icon/* default */.Z, { name: "ArrowSquareOut", width: 20, height: 20 })))),
|
|
3374
|
+
hasShippingOptions && (external_react_default().createElement((external_react_default()).Fragment, null,
|
|
3375
|
+
external_react_default().createElement("header", { "data-fs-shipping-simulation-header": true },
|
|
3376
|
+
external_react_default().createElement("h3", { "data-fs-shipping-simulation-subtitle": true }, optionsLabel),
|
|
3377
|
+
external_react_default().createElement("p", { "data-fs-shipping-simulation-location": true }, location)),
|
|
3378
|
+
external_react_default().createElement(Table_Table, null,
|
|
3379
|
+
external_react_default().createElement(Table_TableBody, null, options.map((option) => (external_react_default().createElement(Table_TableRow, { key: option.carrier },
|
|
3380
|
+
external_react_default().createElement(Table_TableCell, { align: "left" }, option.carrier),
|
|
3381
|
+
external_react_default().createElement(Table_TableCell, null, option.localizedEstimates),
|
|
3382
|
+
external_react_default().createElement(Table_TableCell, { align: "right" }, option.price && (external_react_default().createElement(Price/* default */.Z, { formatter: formatter, value: option.price, SRText: "price" }))))))))))));
|
|
3383
|
+
}
|
|
3384
|
+
/* harmony default export */ const ShippingSimulation_ShippingSimulation = (ShippingSimulation);
|
|
3385
|
+
//# sourceMappingURL=ShippingSimulation.js.map
|
|
3386
|
+
// EXTERNAL MODULE: external "react-intersection-observer"
|
|
3387
|
+
var external_react_intersection_observer_ = __webpack_require__(9785);
|
|
3388
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/IconButton/IconButton.js
|
|
3389
|
+
var IconButton = __webpack_require__(7041);
|
|
3390
|
+
;// CONCATENATED MODULE: ../components/dist/esm/organisms/ImageGallery/ImageGallerySelector.js
|
|
3204
3391
|
|
|
3205
|
-
const {
|
|
3206
|
-
RegionBar: Overrides_RegionBar,
|
|
3207
|
-
LocationIcon,
|
|
3208
|
-
ButtonIcon
|
|
3209
|
-
} = (0,overrides/* getSectionOverrides */.f)({
|
|
3210
|
-
RegionBar: RegionBar_RegionBar,
|
|
3211
|
-
LocationIcon: Icon/* default */.Z,
|
|
3212
|
-
ButtonIcon: Icon/* default */.Z
|
|
3213
|
-
}, override);
|
|
3214
3392
|
|
|
3393
|
+
|
|
3394
|
+
const SCROLL_MARGIN_VALUE = 400;
|
|
3395
|
+
const moveScroll = (container, value) => {
|
|
3396
|
+
if (container) {
|
|
3397
|
+
if (container.scrollHeight > container.clientHeight) {
|
|
3398
|
+
// TODO: Temporary workaround for scroll-behavior with scrollTop – Safari 15.4) https://developer.apple.com/forums/thread/703294
|
|
3399
|
+
container.style.overflow = 'auto';
|
|
3400
|
+
window.requestAnimationFrame(() => container.scrollTo({ top: value, behavior: 'smooth' }));
|
|
3401
|
+
setTimeout(() => (container.style.overflow = 'hidden'), 2000);
|
|
3402
|
+
}
|
|
3403
|
+
else {
|
|
3404
|
+
container.scrollLeft += value;
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
};
|
|
3408
|
+
const hasScroll = (container) => {
|
|
3409
|
+
if (container) {
|
|
3410
|
+
return (container.scrollHeight > container.clientHeight ||
|
|
3411
|
+
container.scrollWidth > container.clientWidth);
|
|
3412
|
+
}
|
|
3413
|
+
return false;
|
|
3414
|
+
};
|
|
3415
|
+
function ImageGallerySelector({ images, onSelect, ImageComponent, currentImageIdx, testId = 'fs-image-gallery-selector', 'aria-label': ariaLabel = 'Product Images', navigationButtonLeftAriaLabel = 'Backward slide image selector', navigationButtonRightAriaLabel = 'Forward slide image selector', }) {
|
|
3416
|
+
const elementsRef = (0,external_react_.useRef)(null);
|
|
3417
|
+
const elementHasScroll = hasScroll(elementsRef.current);
|
|
3418
|
+
const [firstImageInView, setFirstImageInView] = (0,external_react_.useState)(true);
|
|
3419
|
+
const [lastImageInView, setLastImageInView] = (0,external_react_.useState)(true);
|
|
3420
|
+
const inViewChange = (0,external_react_.useCallback)((idx, inView) => {
|
|
3421
|
+
idx === 0 && setFirstImageInView(inView);
|
|
3422
|
+
idx === images.length - 1 && setLastImageInView(inView);
|
|
3423
|
+
}, [images.length]);
|
|
3424
|
+
return (external_react_default().createElement("section", { "data-fs-image-gallery-selector": true, "data-testid": testId, "aria-label": ariaLabel },
|
|
3425
|
+
elementHasScroll && !firstImageInView && (external_react_default().createElement("div", { "data-fs-image-gallery-selector-control": true },
|
|
3426
|
+
external_react_default().createElement(IconButton/* default */.Z, { "data-fs-image-gallery-selector-control-button": true, "aria-label": navigationButtonLeftAriaLabel, icon: external_react_default().createElement(Icon/* default */.Z, { name: "ArrowLeft" }), onClick: () => moveScroll(elementsRef.current, -SCROLL_MARGIN_VALUE) }))),
|
|
3427
|
+
external_react_default().createElement("div", { "data-fs-image-gallery-selector-elements": true, ref: elementsRef }, images.map((image, idx) => {
|
|
3428
|
+
return (external_react_default().createElement(external_react_intersection_observer_.InView, { key: idx, onChange: (inView) => inViewChange(idx, inView) },
|
|
3429
|
+
external_react_default().createElement(Button/* default */.Z, { key: idx, "aria-label": `${image.alternateName} - Image ${idx + 1} of ${images.length}`, onClick: () => onSelect(idx), "data-fs-image-gallery-selector-thumbnail": idx === currentImageIdx ? 'selected' : 'true' },
|
|
3430
|
+
external_react_default().createElement(ImageComponent, { url: image.url ?? '', loading: idx === 0 ? 'eager' : 'lazy', alternateName: image.alternateName ?? '' }))));
|
|
3431
|
+
})),
|
|
3432
|
+
elementHasScroll && !lastImageInView && (external_react_default().createElement("div", { "data-fs-image-gallery-selector-control": true },
|
|
3433
|
+
external_react_default().createElement(IconButton/* default */.Z, { "data-fs-image-gallery-selector-control-button": true, "aria-label": navigationButtonRightAriaLabel, icon: external_react_default().createElement(Icon/* default */.Z, { name: "ArrowLeft" }), onClick: () => moveScroll(elementsRef.current, +SCROLL_MARGIN_VALUE) })))));
|
|
3434
|
+
}
|
|
3435
|
+
/* harmony default export */ const ImageGallery_ImageGallerySelector = (ImageGallerySelector);
|
|
3436
|
+
//# sourceMappingURL=ImageGallerySelector.js.map
|
|
3437
|
+
;// CONCATENATED MODULE: ../components/dist/esm/organisms/ImageGallery/ImageGallery.js
|
|
3438
|
+
|
|
3439
|
+
|
|
3440
|
+
const ImageGallery = (0,external_react_.forwardRef)(function ImageGallery({ images, children, ImageComponent, selectedImageIdx, setSelectedImageIdx, testId = 'fs-image-gallery', ...otherProps }, ref) {
|
|
3441
|
+
const hasSelector = images.length > 1;
|
|
3442
|
+
return (external_react_default().createElement("section", { ref: ref, "data-fs-image-gallery": hasSelector ? 'with-selector' : 'without-selector', "data-testid": testId, ...otherProps },
|
|
3443
|
+
children,
|
|
3444
|
+
hasSelector && (external_react_default().createElement(ImageGallery_ImageGallerySelector, { images: images, onSelect: setSelectedImageIdx, currentImageIdx: selectedImageIdx, ImageComponent: ImageComponent }))));
|
|
3445
|
+
});
|
|
3446
|
+
/* harmony default export */ const ImageGallery_ImageGallery = (ImageGallery);
|
|
3447
|
+
//# sourceMappingURL=ImageGallery.js.map
|
|
3448
|
+
;// CONCATENATED MODULE: ../components/dist/esm/organisms/ImageGallery/ImageGalleryViewer.js
|
|
3449
|
+
|
|
3450
|
+
const ImageGalleryViewer = ({ children, }) => {
|
|
3451
|
+
return external_react_default().createElement((external_react_default()).Fragment, null, children);
|
|
3452
|
+
};
|
|
3453
|
+
/* harmony default export */ const ImageGallery_ImageGalleryViewer = (ImageGalleryViewer);
|
|
3454
|
+
//# sourceMappingURL=ImageGalleryViewer.js.map
|
|
3455
|
+
// EXTERNAL MODULE: external "next/router"
|
|
3456
|
+
var router_ = __webpack_require__(1853);
|
|
3457
|
+
// EXTERNAL MODULE: ./src/sdk/overrides/OverrideContext.tsx
|
|
3458
|
+
var OverrideContext = __webpack_require__(5522);
|
|
3215
3459
|
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
3216
3460
|
var jsx_runtime_ = __webpack_require__(997);
|
|
3217
|
-
;// CONCATENATED MODULE: ./src/components/
|
|
3218
|
-
const _excluded = ["
|
|
3461
|
+
;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/ImageGallery.tsx
|
|
3462
|
+
const _excluded = ["images"];
|
|
3219
3463
|
|
|
3220
3464
|
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; }
|
|
3221
3465
|
|
|
@@ -3232,56 +3476,1222 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
3232
3476
|
|
|
3233
3477
|
|
|
3234
3478
|
|
|
3235
|
-
|
|
3479
|
+
const ImageComponent = ({
|
|
3480
|
+
url,
|
|
3481
|
+
alternateName
|
|
3482
|
+
}) => {
|
|
3483
|
+
const {
|
|
3484
|
+
__experimentalImageGalleryImage: Image
|
|
3485
|
+
} = (0,OverrideContext/* useOverrideComponents */.r3)();
|
|
3486
|
+
return /*#__PURE__*/jsx_runtime_.jsx(Image.Component, {
|
|
3487
|
+
src: url,
|
|
3488
|
+
alt: alternateName,
|
|
3489
|
+
width: 68,
|
|
3490
|
+
height: 68
|
|
3491
|
+
});
|
|
3492
|
+
};
|
|
3493
|
+
|
|
3494
|
+
const ImageGallery_ImageGallery_ImageGallery = _ref => {
|
|
3236
3495
|
let {
|
|
3237
|
-
|
|
3238
|
-
icon: locationIcon = LocationIcon.props.name,
|
|
3239
|
-
alt: locationIconAlt = LocationIcon.props["aria-label"]
|
|
3240
|
-
},
|
|
3241
|
-
buttonIcon: {
|
|
3242
|
-
icon: buttonIcon = ButtonIcon.props.name,
|
|
3243
|
-
alt: buttonIconAlt = ButtonIcon.props["aria-label"]
|
|
3244
|
-
},
|
|
3245
|
-
label = Overrides_RegionBar.props.label,
|
|
3246
|
-
editLabel = Overrides_RegionBar.props.editLabel
|
|
3496
|
+
images
|
|
3247
3497
|
} = _ref,
|
|
3248
3498
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
3249
3499
|
|
|
3250
3500
|
const {
|
|
3251
|
-
|
|
3252
|
-
|
|
3501
|
+
ImageGallery: ImageGalleryWrapper,
|
|
3502
|
+
ImageGalleryViewer,
|
|
3503
|
+
__experimentalImageGalleryImage: Image
|
|
3504
|
+
} = (0,OverrideContext/* useOverrideComponents */.r3)();
|
|
3253
3505
|
const {
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3506
|
+
0: selectedImageIdx,
|
|
3507
|
+
1: setSelectedImageIdx
|
|
3508
|
+
} = (0,external_react_.useState)(0);
|
|
3509
|
+
const currentImage = images[selectedImageIdx] ?? images[0];
|
|
3510
|
+
const dynamicRoute = (0,router_.useRouter)().asPath;
|
|
3511
|
+
(0,external_react_.useEffect)(() => setSelectedImageIdx(0), [dynamicRoute]);
|
|
3512
|
+
return /*#__PURE__*/jsx_runtime_.jsx(ImageGalleryWrapper.Component, _objectSpread(_objectSpread(_objectSpread({}, ImageGalleryWrapper.props), {}, {
|
|
3513
|
+
images: images,
|
|
3514
|
+
ImageComponent: ImageComponent,
|
|
3515
|
+
selectedImageIdx: selectedImageIdx,
|
|
3516
|
+
setSelectedImageIdx: setSelectedImageIdx
|
|
3517
|
+
}, otherProps), {}, {
|
|
3518
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(ImageGalleryViewer.Component, _objectSpread(_objectSpread({}, ImageGalleryViewer.props), {}, {
|
|
3519
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(Image.Component, _objectSpread(_objectSpread({
|
|
3520
|
+
sizes: "(max-width: 360px) 50vw, (max-width: 768px) 90vw, 50vw",
|
|
3521
|
+
width: 691,
|
|
3522
|
+
height: 691 * (3 / 4),
|
|
3523
|
+
loading: "eager"
|
|
3524
|
+
}, Image.props), {}, {
|
|
3525
|
+
src: currentImage.url,
|
|
3526
|
+
alt: currentImage.alternateName
|
|
3527
|
+
}))
|
|
3264
3528
|
}))
|
|
3265
|
-
}
|
|
3266
|
-
|
|
3267
|
-
editLabel: editLabel // Dynamic props shouldn't be overridable
|
|
3268
|
-
// This decision can be reviewed later if needed
|
|
3269
|
-
,
|
|
3270
|
-
onButtonClick: openModal,
|
|
3271
|
-
postalCode: postalCode
|
|
3272
|
-
}, otherProps));
|
|
3273
|
-
}
|
|
3274
|
-
|
|
3275
|
-
/* harmony default export */ const region_RegionBar_RegionBar = (RegionBar_RegionBar_RegionBar);
|
|
3276
|
-
// EXTERNAL MODULE: ./src/components/sections/Section/Section.tsx
|
|
3277
|
-
var Section = __webpack_require__(3271);
|
|
3278
|
-
// EXTERNAL MODULE: ./src/components/sections/RegionBar/section.module.scss
|
|
3279
|
-
var section_module = __webpack_require__(3472);
|
|
3280
|
-
var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
|
|
3281
|
-
;// CONCATENATED MODULE: ./src/components/sections/RegionBar/RegionBar.tsx
|
|
3282
|
-
const RegionBar_excluded = ["className"];
|
|
3529
|
+
}));
|
|
3530
|
+
};
|
|
3283
3531
|
|
|
3284
|
-
|
|
3532
|
+
/* harmony default export */ const ui_ImageGallery_ImageGallery = (ImageGallery_ImageGallery_ImageGallery);
|
|
3533
|
+
// EXTERNAL MODULE: ./src/sdk/graphql/request.ts
|
|
3534
|
+
var request = __webpack_require__(180);
|
|
3535
|
+
;// CONCATENATED MODULE: ./src/sdk/shipping/index.ts
|
|
3536
|
+
|
|
3537
|
+
const query = "ClientShippingSimulationQuery";
|
|
3538
|
+
const getShippingSimulation = async ({
|
|
3539
|
+
items,
|
|
3540
|
+
postalCode,
|
|
3541
|
+
country
|
|
3542
|
+
}) => {
|
|
3543
|
+
const data = await (0,request/* request */.W)(query, {
|
|
3544
|
+
items,
|
|
3545
|
+
postalCode,
|
|
3546
|
+
country
|
|
3547
|
+
});
|
|
3548
|
+
return data;
|
|
3549
|
+
};
|
|
3550
|
+
/* harmony default export */ const shipping = (getShippingSimulation);
|
|
3551
|
+
// EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
|
|
3552
|
+
var session = __webpack_require__(7295);
|
|
3553
|
+
;// CONCATENATED MODULE: ./src/sdk/shipping/useShippingSimulation.ts
|
|
3554
|
+
function useShippingSimulation_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; }
|
|
3555
|
+
|
|
3556
|
+
function useShippingSimulation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? useShippingSimulation_ownKeys(Object(source), !0).forEach(function (key) { useShippingSimulation_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : useShippingSimulation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3557
|
+
|
|
3558
|
+
function useShippingSimulation_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; }
|
|
3559
|
+
|
|
3560
|
+
|
|
3561
|
+
|
|
3562
|
+
|
|
3563
|
+
|
|
3564
|
+
const createEmptySimulation = () => ({
|
|
3565
|
+
input: {
|
|
3566
|
+
postalCode: '',
|
|
3567
|
+
displayClearButton: false,
|
|
3568
|
+
errorMessage: ''
|
|
3569
|
+
},
|
|
3570
|
+
shippingSimulation: undefined
|
|
3571
|
+
});
|
|
3572
|
+
|
|
3573
|
+
const reducer = (state, action) => {
|
|
3574
|
+
const {
|
|
3575
|
+
type
|
|
3576
|
+
} = action;
|
|
3577
|
+
|
|
3578
|
+
switch (type) {
|
|
3579
|
+
case 'clear':
|
|
3580
|
+
{
|
|
3581
|
+
return createEmptySimulation();
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
case 'update':
|
|
3585
|
+
{
|
|
3586
|
+
const {
|
|
3587
|
+
payload
|
|
3588
|
+
} = action;
|
|
3589
|
+
return {
|
|
3590
|
+
input: useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state.input), payload.input),
|
|
3591
|
+
shippingSimulation: useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state.shippingSimulation), payload.shippingSimulation)
|
|
3592
|
+
};
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
case 'onInput':
|
|
3596
|
+
{
|
|
3597
|
+
const {
|
|
3598
|
+
payload
|
|
3599
|
+
} = action;
|
|
3600
|
+
return useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state), {}, {
|
|
3601
|
+
input: useShippingSimulation_objectSpread({}, payload)
|
|
3602
|
+
});
|
|
3603
|
+
}
|
|
3604
|
+
|
|
3605
|
+
case 'onError':
|
|
3606
|
+
{
|
|
3607
|
+
const {
|
|
3608
|
+
payload
|
|
3609
|
+
} = action;
|
|
3610
|
+
return useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state), {}, {
|
|
3611
|
+
input: useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state.input), payload)
|
|
3612
|
+
});
|
|
3613
|
+
}
|
|
3614
|
+
|
|
3615
|
+
default:
|
|
3616
|
+
throw new Error(`Action ${type} not implemented`);
|
|
3617
|
+
}
|
|
3618
|
+
};
|
|
3619
|
+
|
|
3620
|
+
const useShippingSimulation = shippingItem => {
|
|
3621
|
+
const {
|
|
3622
|
+
0: {
|
|
3623
|
+
input,
|
|
3624
|
+
shippingSimulation
|
|
3625
|
+
},
|
|
3626
|
+
1: dispatch
|
|
3627
|
+
} = (0,external_react_.useReducer)(reducer, null, createEmptySimulation);
|
|
3628
|
+
const {
|
|
3629
|
+
country,
|
|
3630
|
+
postalCode: sessionPostalCode
|
|
3631
|
+
} = (0,session/* useSession */.kP)();
|
|
3632
|
+
const {
|
|
3633
|
+
postalCode: shippingPostalCode
|
|
3634
|
+
} = input;
|
|
3635
|
+
const shippingPostalCodeRef = (0,external_react_.useRef)(shippingPostalCode);
|
|
3636
|
+
(0,external_react_.useEffect)(() => {
|
|
3637
|
+
const shouldFetch = sessionPostalCode && !shippingPostalCodeRef.current;
|
|
3638
|
+
|
|
3639
|
+
if (!shouldFetch) {
|
|
3640
|
+
return;
|
|
3641
|
+
} // Use sessionPostalCode if there is no shippingPostalCode
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
async function fetchShipping() {
|
|
3645
|
+
const data = await shipping({
|
|
3646
|
+
country,
|
|
3647
|
+
postalCode: sessionPostalCode ?? '',
|
|
3648
|
+
items: [shippingItem]
|
|
3649
|
+
});
|
|
3650
|
+
const shippingSimulation = data.shipping;
|
|
3651
|
+
dispatch({
|
|
3652
|
+
type: 'update',
|
|
3653
|
+
payload: {
|
|
3654
|
+
input: {
|
|
3655
|
+
postalCode: sessionPostalCode ?? '',
|
|
3656
|
+
displayClearButton: true,
|
|
3657
|
+
errorMessage: ''
|
|
3658
|
+
},
|
|
3659
|
+
shippingSimulation
|
|
3660
|
+
}
|
|
3661
|
+
});
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3664
|
+
fetchShipping();
|
|
3665
|
+
}, [country, sessionPostalCode, shippingItem]);
|
|
3666
|
+
const handleSubmit = (0,external_react_.useCallback)(async () => {
|
|
3667
|
+
try {
|
|
3668
|
+
const data = await shipping({
|
|
3669
|
+
country,
|
|
3670
|
+
postalCode: shippingPostalCode ?? '',
|
|
3671
|
+
items: [shippingItem]
|
|
3672
|
+
});
|
|
3673
|
+
const shippingSimulation = data.shipping;
|
|
3674
|
+
dispatch({
|
|
3675
|
+
type: 'update',
|
|
3676
|
+
payload: {
|
|
3677
|
+
input: {
|
|
3678
|
+
displayClearButton: true,
|
|
3679
|
+
errorMessage: ''
|
|
3680
|
+
},
|
|
3681
|
+
shippingSimulation
|
|
3682
|
+
}
|
|
3683
|
+
});
|
|
3684
|
+
} catch (error) {
|
|
3685
|
+
dispatch({
|
|
3686
|
+
type: 'onError',
|
|
3687
|
+
payload: {
|
|
3688
|
+
displayClearButton: true,
|
|
3689
|
+
errorMessage: 'You entered an invalid Postal Code'
|
|
3690
|
+
}
|
|
3691
|
+
});
|
|
3692
|
+
}
|
|
3693
|
+
}, [country, shippingItem, shippingPostalCode]);
|
|
3694
|
+
const handleOnInput = (0,external_react_.useCallback)(e => {
|
|
3695
|
+
const currentValue = e.currentTarget.value;
|
|
3696
|
+
|
|
3697
|
+
if (currentValue) {
|
|
3698
|
+
dispatch({
|
|
3699
|
+
type: 'onInput',
|
|
3700
|
+
payload: {
|
|
3701
|
+
postalCode: currentValue,
|
|
3702
|
+
displayClearButton: false,
|
|
3703
|
+
errorMessage: ''
|
|
3704
|
+
}
|
|
3705
|
+
});
|
|
3706
|
+
} else {
|
|
3707
|
+
dispatch({
|
|
3708
|
+
type: 'clear'
|
|
3709
|
+
});
|
|
3710
|
+
}
|
|
3711
|
+
}, []);
|
|
3712
|
+
return {
|
|
3713
|
+
input,
|
|
3714
|
+
shippingSimulation,
|
|
3715
|
+
handleOnClear: () => {
|
|
3716
|
+
dispatch({
|
|
3717
|
+
type: 'clear'
|
|
3718
|
+
});
|
|
3719
|
+
},
|
|
3720
|
+
handleSubmit,
|
|
3721
|
+
handleOnInput
|
|
3722
|
+
};
|
|
3723
|
+
};
|
|
3724
|
+
;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/ShippingSimulation.tsx
|
|
3725
|
+
const ShippingSimulation_excluded = ["productShippingInfo", "formatter", "inputLabel", "title", "idkPostalCodeLinkProps"];
|
|
3726
|
+
|
|
3727
|
+
function ShippingSimulation_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; }
|
|
3728
|
+
|
|
3729
|
+
function ShippingSimulation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ShippingSimulation_ownKeys(Object(source), !0).forEach(function (key) { ShippingSimulation_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ShippingSimulation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3730
|
+
|
|
3731
|
+
function ShippingSimulation_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; }
|
|
3732
|
+
|
|
3733
|
+
function ShippingSimulation_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = ShippingSimulation_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; }
|
|
3734
|
+
|
|
3735
|
+
function ShippingSimulation_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; }
|
|
3736
|
+
|
|
3737
|
+
|
|
3738
|
+
|
|
3739
|
+
|
|
3740
|
+
function ShippingSimulation_ShippingSimulation_ShippingSimulation(_ref) {
|
|
3741
|
+
let {
|
|
3742
|
+
productShippingInfo,
|
|
3743
|
+
formatter,
|
|
3744
|
+
inputLabel,
|
|
3745
|
+
title,
|
|
3746
|
+
idkPostalCodeLinkProps
|
|
3747
|
+
} = _ref,
|
|
3748
|
+
otherProps = ShippingSimulation_objectWithoutProperties(_ref, ShippingSimulation_excluded);
|
|
3749
|
+
|
|
3750
|
+
const {
|
|
3751
|
+
ShippingSimulation: ShippingSimulationWrapper
|
|
3752
|
+
} = (0,OverrideContext/* useOverrideComponents */.r3)();
|
|
3753
|
+
const {
|
|
3754
|
+
input,
|
|
3755
|
+
shippingSimulation,
|
|
3756
|
+
handleSubmit,
|
|
3757
|
+
handleOnInput,
|
|
3758
|
+
handleOnClear
|
|
3759
|
+
} = useShippingSimulation(productShippingInfo);
|
|
3760
|
+
const {
|
|
3761
|
+
postalCode,
|
|
3762
|
+
displayClearButton,
|
|
3763
|
+
errorMessage
|
|
3764
|
+
} = input;
|
|
3765
|
+
const location = [shippingSimulation?.address?.neighborhood, shippingSimulation?.address?.city].filter(Boolean).join(' / ') ?? '';
|
|
3766
|
+
const options = shippingSimulation?.logisticsInfo?.[0]?.slas ?? [];
|
|
3767
|
+
return /*#__PURE__*/jsx_runtime_.jsx(ShippingSimulationWrapper.Component, ShippingSimulation_objectSpread({
|
|
3768
|
+
formatter: formatter,
|
|
3769
|
+
onInput: handleOnInput,
|
|
3770
|
+
onSubmit: handleSubmit,
|
|
3771
|
+
onClear: handleOnClear,
|
|
3772
|
+
location: location,
|
|
3773
|
+
options: options,
|
|
3774
|
+
address: shippingSimulation?.address,
|
|
3775
|
+
displayClearButton: displayClearButton,
|
|
3776
|
+
errorMessage: errorMessage,
|
|
3777
|
+
postalCode: postalCode,
|
|
3778
|
+
inputLabel: inputLabel,
|
|
3779
|
+
title: title,
|
|
3780
|
+
idkPostalCodeLinkProps: idkPostalCodeLinkProps
|
|
3781
|
+
}, otherProps));
|
|
3782
|
+
}
|
|
3783
|
+
// EXTERNAL MODULE: ./src/components/ui/Image/Image.tsx + 1 modules
|
|
3784
|
+
var Image = __webpack_require__(5731);
|
|
3785
|
+
;// CONCATENATED MODULE: ./src/components/product/NotAvailableButton/NotAvailableButton.tsx
|
|
3786
|
+
// TODO: Remove this component when <OutOfStock /> is ready to use
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
|
+
|
|
3790
|
+
function NotAvailableButton({
|
|
3791
|
+
children
|
|
3792
|
+
}) {
|
|
3793
|
+
return /*#__PURE__*/jsx_runtime_.jsx(Button/* default */.Z, {
|
|
3794
|
+
variant: "primary",
|
|
3795
|
+
disabled: true,
|
|
3796
|
+
"data-fs-buy-button": true,
|
|
3797
|
+
children: children
|
|
3798
|
+
});
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
/* harmony default export */ const NotAvailableButton_NotAvailableButton = (NotAvailableButton);
|
|
3802
|
+
;// CONCATENATED MODULE: ./src/components/sections/ProductDetails/DefaultComponents.ts
|
|
3803
|
+
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
|
+
const ProductDetailsDefaultComponents = {
|
|
3809
|
+
ProductTitle: ProductTitle_ProductTitle,
|
|
3810
|
+
DiscountBadge: DiscountBadge/* default */.Z,
|
|
3811
|
+
BuyButton: BuyButton_BuyButton,
|
|
3812
|
+
Icon: Icon/* default */.Z,
|
|
3813
|
+
Price: Price/* default */.Z,
|
|
3814
|
+
QuantitySelector: QuantitySelector/* default */.Z,
|
|
3815
|
+
SkuSelector: SkuSelector_SkuSelector,
|
|
3816
|
+
ShippingSimulation: ShippingSimulation_ShippingSimulation,
|
|
3817
|
+
ImageGallery: ImageGallery_ImageGallery,
|
|
3818
|
+
ImageGalleryViewer: ImageGallery_ImageGalleryViewer,
|
|
3819
|
+
__experimentalImageGalleryImage: Image/* default */.Z,
|
|
3820
|
+
__experimentalImageGallery: ui_ImageGallery_ImageGallery,
|
|
3821
|
+
__experimentalShippingSimulation: ShippingSimulation_ShippingSimulation_ShippingSimulation,
|
|
3822
|
+
__experimentalNotAvailableButton: NotAvailableButton_NotAvailableButton
|
|
3823
|
+
};
|
|
3824
|
+
|
|
3825
|
+
/***/ }),
|
|
3826
|
+
|
|
3827
|
+
/***/ 8663:
|
|
3828
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3829
|
+
|
|
3830
|
+
"use strict";
|
|
3831
|
+
|
|
3832
|
+
// EXPORTS
|
|
3833
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
3834
|
+
"Z": () => (/* binding */ ProductDetails_ProductDetails)
|
|
3835
|
+
});
|
|
3836
|
+
|
|
3837
|
+
// UNUSED EXPORTS: fragment
|
|
3838
|
+
|
|
3839
|
+
// EXTERNAL MODULE: external "react"
|
|
3840
|
+
var external_react_ = __webpack_require__(6689);
|
|
3841
|
+
// EXTERNAL MODULE: ../sdk/dist/analytics/sendAnalyticsEvent.js
|
|
3842
|
+
var sendAnalyticsEvent = __webpack_require__(1072);
|
|
3843
|
+
// EXTERNAL MODULE: ./src/sdk/product/useFormattedPrice.ts
|
|
3844
|
+
var useFormattedPrice = __webpack_require__(5346);
|
|
3845
|
+
// EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
|
|
3846
|
+
var session = __webpack_require__(7295);
|
|
3847
|
+
// EXTERNAL MODULE: ./src/components/sections/Section/Section.tsx
|
|
3848
|
+
var Section = __webpack_require__(3271);
|
|
3849
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/Accordion.js
|
|
3850
|
+
var Accordion = __webpack_require__(1516);
|
|
3851
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/AccordionItem.js
|
|
3852
|
+
var AccordionItem = __webpack_require__(783);
|
|
3853
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/AccordionButton.js
|
|
3854
|
+
var AccordionButton = __webpack_require__(7734);
|
|
3855
|
+
// EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/AccordionPanel.js
|
|
3856
|
+
var AccordionPanel = __webpack_require__(7583);
|
|
3857
|
+
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
3858
|
+
var jsx_runtime_ = __webpack_require__(997);
|
|
3859
|
+
;// CONCATENATED MODULE: ./src/components/ui/ProductDescription/ProductDescription.tsx
|
|
3860
|
+
|
|
3861
|
+
|
|
3862
|
+
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
function ProductDescription({
|
|
3866
|
+
descriptionData,
|
|
3867
|
+
initiallyExpanded = 'first'
|
|
3868
|
+
}) {
|
|
3869
|
+
/**
|
|
3870
|
+
* Maps 'initiallyExpanded' prop values to indices
|
|
3871
|
+
*/
|
|
3872
|
+
const INITIALLY_EXPANDED_MAP = (0,external_react_.useMemo)(() => ({
|
|
3873
|
+
none: [],
|
|
3874
|
+
first: [0],
|
|
3875
|
+
all: [0, 1, 2, 3]
|
|
3876
|
+
}), []);
|
|
3877
|
+
const {
|
|
3878
|
+
0: indices,
|
|
3879
|
+
1: setIndices
|
|
3880
|
+
} = (0,external_react_.useState)(new Set(INITIALLY_EXPANDED_MAP[initiallyExpanded]));
|
|
3881
|
+
|
|
3882
|
+
const onChange = index => {
|
|
3883
|
+
setIndices(currentIndices => {
|
|
3884
|
+
const newIndices = new Set(currentIndices);
|
|
3885
|
+
|
|
3886
|
+
if (currentIndices.has(index)) {
|
|
3887
|
+
newIndices.delete(index);
|
|
3888
|
+
} else {
|
|
3889
|
+
newIndices.add(index);
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
return newIndices;
|
|
3893
|
+
});
|
|
3894
|
+
};
|
|
3895
|
+
|
|
3896
|
+
return /*#__PURE__*/jsx_runtime_.jsx("section", {
|
|
3897
|
+
"data-fs-product-description": true,
|
|
3898
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(Accordion/* default */.Z, {
|
|
3899
|
+
indices: indices,
|
|
3900
|
+
onChange: onChange,
|
|
3901
|
+
"aria-label": "Product Details Content",
|
|
3902
|
+
children: descriptionData.map(({
|
|
3903
|
+
title,
|
|
3904
|
+
content
|
|
3905
|
+
}, index) => /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
|
|
3906
|
+
as: "article",
|
|
3907
|
+
index: index,
|
|
3908
|
+
prefixId: "product-description",
|
|
3909
|
+
"data-fs-product-details-description": true,
|
|
3910
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
|
|
3911
|
+
children: title
|
|
3912
|
+
}), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
|
|
3913
|
+
children: /*#__PURE__*/jsx_runtime_.jsx("div", {
|
|
3914
|
+
// Applies display: contents through FastStore UI
|
|
3915
|
+
"data-fs-product-details-description-content": true // The content is already sanitized by FastStore API
|
|
3916
|
+
,
|
|
3917
|
+
dangerouslySetInnerHTML: {
|
|
3918
|
+
__html: content
|
|
3919
|
+
}
|
|
3920
|
+
})
|
|
3921
|
+
})]
|
|
3922
|
+
}, String(index)))
|
|
3923
|
+
})
|
|
3924
|
+
});
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
/* harmony default export */ const ProductDescription_ProductDescription = (ProductDescription);
|
|
3928
|
+
// EXTERNAL MODULE: ../components/dist/esm/hooks/UIProvider.js
|
|
3929
|
+
var UIProvider = __webpack_require__(6652);
|
|
3930
|
+
// EXTERNAL MODULE: ./src/sdk/cart/index.ts + 1 modules
|
|
3931
|
+
var cart = __webpack_require__(6073);
|
|
3932
|
+
;// CONCATENATED MODULE: ./src/sdk/cart/useBuyButton.ts
|
|
3933
|
+
|
|
3934
|
+
|
|
3935
|
+
|
|
3936
|
+
|
|
3937
|
+
|
|
3938
|
+
const useBuyButton = item => {
|
|
3939
|
+
const {
|
|
3940
|
+
openCart
|
|
3941
|
+
} = (0,UIProvider/* useUI */.l)();
|
|
3942
|
+
const {
|
|
3943
|
+
currency: {
|
|
3944
|
+
code
|
|
3945
|
+
}
|
|
3946
|
+
} = (0,session/* useSession */.kP)();
|
|
3947
|
+
const onClick = (0,external_react_.useCallback)(e => {
|
|
3948
|
+
e.preventDefault();
|
|
3949
|
+
|
|
3950
|
+
if (!item) {
|
|
3951
|
+
return;
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
(0,sendAnalyticsEvent/* sendAnalyticsEvent */._)({
|
|
3955
|
+
name: 'add_to_cart',
|
|
3956
|
+
params: {
|
|
3957
|
+
currency: code,
|
|
3958
|
+
// TODO: In the future, we can explore more robust ways of
|
|
3959
|
+
// calculating the value (gift items, discounts, etc.).
|
|
3960
|
+
value: item.price * item.quantity,
|
|
3961
|
+
items: [{
|
|
3962
|
+
item_id: item.itemOffered.isVariantOf.productGroupID,
|
|
3963
|
+
item_name: item.itemOffered.isVariantOf.name,
|
|
3964
|
+
item_brand: item.itemOffered.brand.name,
|
|
3965
|
+
item_variant: item.itemOffered.sku,
|
|
3966
|
+
quantity: item.quantity,
|
|
3967
|
+
price: item.price,
|
|
3968
|
+
discount: item.listPrice - item.price,
|
|
3969
|
+
currency: code,
|
|
3970
|
+
item_variant_name: item.itemOffered.name,
|
|
3971
|
+
product_reference_id: item.itemOffered.gtin
|
|
3972
|
+
}]
|
|
3973
|
+
}
|
|
3974
|
+
});
|
|
3975
|
+
cart/* cartStore.addItem */.i8.addItem(item);
|
|
3976
|
+
openCart();
|
|
3977
|
+
}, [code, item, openCart]);
|
|
3978
|
+
return {
|
|
3979
|
+
onClick,
|
|
3980
|
+
'data-testid': 'buy-button',
|
|
3981
|
+
'data-sku': item?.itemOffered.sku,
|
|
3982
|
+
'data-seller': item?.seller.identifier
|
|
3983
|
+
};
|
|
3984
|
+
};
|
|
3985
|
+
// EXTERNAL MODULE: ./node_modules/next/link.js
|
|
3986
|
+
var next_link = __webpack_require__(1664);
|
|
3987
|
+
var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
|
|
3988
|
+
// EXTERNAL MODULE: ./src/components/ui/Image/Image.tsx + 1 modules
|
|
3989
|
+
var Image = __webpack_require__(5731);
|
|
3990
|
+
// EXTERNAL MODULE: ./src/sdk/overrides/OverrideContext.tsx
|
|
3991
|
+
var OverrideContext = __webpack_require__(5522);
|
|
3992
|
+
;// CONCATENATED MODULE: ./src/components/ui/SkuSelector/Selectors.tsx
|
|
3993
|
+
const _excluded = ["src", "alt"],
|
|
3994
|
+
_excluded2 = ["slugsMap", "activeVariations", "availableVariations"];
|
|
3995
|
+
|
|
3996
|
+
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; }
|
|
3997
|
+
|
|
3998
|
+
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; }
|
|
3999
|
+
|
|
4000
|
+
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; }
|
|
4001
|
+
|
|
4002
|
+
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; }
|
|
4003
|
+
|
|
4004
|
+
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; }
|
|
4005
|
+
|
|
4006
|
+
|
|
4007
|
+
|
|
4008
|
+
|
|
4009
|
+
|
|
4010
|
+
|
|
4011
|
+
|
|
4012
|
+
const ImageComponent = _ref => {
|
|
4013
|
+
let {
|
|
4014
|
+
src,
|
|
4015
|
+
alt
|
|
4016
|
+
} = _ref,
|
|
4017
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
4018
|
+
|
|
4019
|
+
return /*#__PURE__*/jsx_runtime_.jsx(Image/* default */.Z, _objectSpread({
|
|
4020
|
+
src: src,
|
|
4021
|
+
alt: alt,
|
|
4022
|
+
width: 34,
|
|
4023
|
+
height: 34
|
|
4024
|
+
}, otherProps));
|
|
4025
|
+
};
|
|
4026
|
+
|
|
4027
|
+
function Selectors(_ref2) {
|
|
4028
|
+
let {
|
|
4029
|
+
slugsMap,
|
|
4030
|
+
activeVariations,
|
|
4031
|
+
availableVariations
|
|
4032
|
+
} = _ref2,
|
|
4033
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
4034
|
+
|
|
4035
|
+
const {
|
|
4036
|
+
SkuSelector
|
|
4037
|
+
} = (0,OverrideContext/* useOverrideComponents */.r3)();
|
|
4038
|
+
return /*#__PURE__*/jsx_runtime_.jsx("section", _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
4039
|
+
children: availableVariations && Object.keys(availableVariations).map(skuVariant => /*#__PURE__*/(0,external_react_.createElement)(SkuSelector.Component, _objectSpread(_objectSpread({
|
|
4040
|
+
ImageComponent: ImageComponent
|
|
4041
|
+
}, SkuSelector.props), {}, {
|
|
4042
|
+
key: skuVariant,
|
|
4043
|
+
skuPropertyName: skuVariant,
|
|
4044
|
+
availableVariations: availableVariations,
|
|
4045
|
+
activeVariations: activeVariations,
|
|
4046
|
+
slugsMap: slugsMap,
|
|
4047
|
+
linkProps: _objectSpread(_objectSpread({}, SkuSelector.props.linkProps ?? {}), {}, {
|
|
4048
|
+
as: SkuSelector.props.linkProps?.as ?? (link_default()),
|
|
4049
|
+
legacyBehavior: SkuSelector.props.linkProps?.legacyBehavior ?? false
|
|
4050
|
+
})
|
|
4051
|
+
})))
|
|
4052
|
+
}));
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
/* harmony default export */ const SkuSelector_Selectors = (Selectors);
|
|
4056
|
+
;// CONCATENATED MODULE: ./src/components/ui/ProductDetails/AddToCartLoadingSkeleton.tsx
|
|
4057
|
+
|
|
4058
|
+
|
|
4059
|
+
function AddToCartLoadingSkeleton() {
|
|
4060
|
+
return (
|
|
4061
|
+
/*#__PURE__*/
|
|
4062
|
+
// Generated via https://skeletonreact.com/.
|
|
4063
|
+
(0,jsx_runtime_.jsxs)("svg", {
|
|
4064
|
+
role: "img",
|
|
4065
|
+
width: "100%",
|
|
4066
|
+
height: "48",
|
|
4067
|
+
"aria-labelledby": "loading-aria",
|
|
4068
|
+
viewBox: "0 0 112 48",
|
|
4069
|
+
preserveAspectRatio: "none",
|
|
4070
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx("title", {
|
|
4071
|
+
id: "loading-aria",
|
|
4072
|
+
children: "Loading..."
|
|
4073
|
+
}), /*#__PURE__*/jsx_runtime_.jsx("rect", {
|
|
4074
|
+
x: "0",
|
|
4075
|
+
y: "0",
|
|
4076
|
+
width: "100%",
|
|
4077
|
+
height: "100%",
|
|
4078
|
+
clipPath: "url(#clip-path)",
|
|
4079
|
+
style: {
|
|
4080
|
+
fill: 'url("#fill")'
|
|
4081
|
+
}
|
|
4082
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)("defs", {
|
|
4083
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx("clipPath", {
|
|
4084
|
+
id: "clip-path",
|
|
4085
|
+
children: /*#__PURE__*/jsx_runtime_.jsx("rect", {
|
|
4086
|
+
x: "0",
|
|
4087
|
+
y: "0",
|
|
4088
|
+
rx: "2",
|
|
4089
|
+
ry: "2",
|
|
4090
|
+
width: "112",
|
|
4091
|
+
height: "48"
|
|
4092
|
+
})
|
|
4093
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)("linearGradient", {
|
|
4094
|
+
id: "fill",
|
|
4095
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx("stop", {
|
|
4096
|
+
offset: "0.599964",
|
|
4097
|
+
stopColor: "#f3f3f3",
|
|
4098
|
+
stopOpacity: "1",
|
|
4099
|
+
children: /*#__PURE__*/jsx_runtime_.jsx("animate", {
|
|
4100
|
+
attributeName: "offset",
|
|
4101
|
+
values: "-2; -2; 1",
|
|
4102
|
+
keyTimes: "0; 0.25; 1",
|
|
4103
|
+
dur: "2s",
|
|
4104
|
+
repeatCount: "indefinite"
|
|
4105
|
+
})
|
|
4106
|
+
}), /*#__PURE__*/jsx_runtime_.jsx("stop", {
|
|
4107
|
+
offset: "1.59996",
|
|
4108
|
+
stopColor: "#ecebeb",
|
|
4109
|
+
stopOpacity: "1",
|
|
4110
|
+
children: /*#__PURE__*/jsx_runtime_.jsx("animate", {
|
|
4111
|
+
attributeName: "offset",
|
|
4112
|
+
values: "-1; -1; 2",
|
|
4113
|
+
keyTimes: "0; 0.25; 1",
|
|
4114
|
+
dur: "2s",
|
|
4115
|
+
repeatCount: "indefinite"
|
|
4116
|
+
})
|
|
4117
|
+
}), /*#__PURE__*/jsx_runtime_.jsx("stop", {
|
|
4118
|
+
offset: "2.59996",
|
|
4119
|
+
stopColor: "#f3f3f3",
|
|
4120
|
+
stopOpacity: "1",
|
|
4121
|
+
children: /*#__PURE__*/jsx_runtime_.jsx("animate", {
|
|
4122
|
+
attributeName: "offset",
|
|
4123
|
+
values: "0; 0; 3",
|
|
4124
|
+
keyTimes: "0; 0.25; 1",
|
|
4125
|
+
dur: "2s",
|
|
4126
|
+
repeatCount: "indefinite"
|
|
4127
|
+
})
|
|
4128
|
+
})]
|
|
4129
|
+
})]
|
|
4130
|
+
})]
|
|
4131
|
+
})
|
|
4132
|
+
);
|
|
4133
|
+
}
|
|
4134
|
+
;// CONCATENATED MODULE: ./src/components/ui/ProductDetails/ProductDetailsSettings.tsx
|
|
4135
|
+
function ProductDetailsSettings_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; }
|
|
4136
|
+
|
|
4137
|
+
function ProductDetailsSettings_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ProductDetailsSettings_ownKeys(Object(source), !0).forEach(function (key) { ProductDetailsSettings_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ProductDetailsSettings_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4138
|
+
|
|
4139
|
+
function ProductDetailsSettings_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; }
|
|
4140
|
+
|
|
4141
|
+
|
|
4142
|
+
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
|
|
4149
|
+
|
|
4150
|
+
|
|
4151
|
+
function ProductDetailsSettings({
|
|
4152
|
+
product,
|
|
4153
|
+
buyButtonTitle,
|
|
4154
|
+
isValidating,
|
|
4155
|
+
quantity,
|
|
4156
|
+
setQuantity,
|
|
4157
|
+
buyButtonIcon: {
|
|
4158
|
+
icon: buyButtonIconName,
|
|
4159
|
+
alt: buyButtonIconAlt
|
|
4160
|
+
},
|
|
4161
|
+
notAvailableButtonTitle
|
|
4162
|
+
}) {
|
|
4163
|
+
const {
|
|
4164
|
+
BuyButton,
|
|
4165
|
+
Icon,
|
|
4166
|
+
Price,
|
|
4167
|
+
QuantitySelector,
|
|
4168
|
+
__experimentalNotAvailableButton: NotAvailableButton
|
|
4169
|
+
} = (0,OverrideContext/* useOverrideComponents */.r3)();
|
|
4170
|
+
const {
|
|
4171
|
+
id,
|
|
4172
|
+
sku,
|
|
4173
|
+
gtin,
|
|
4174
|
+
name: variantName,
|
|
4175
|
+
brand,
|
|
4176
|
+
isVariantOf,
|
|
4177
|
+
isVariantOf: {
|
|
4178
|
+
skuVariants
|
|
4179
|
+
},
|
|
4180
|
+
image: productImages,
|
|
4181
|
+
additionalProperty,
|
|
4182
|
+
offers: {
|
|
4183
|
+
lowPrice,
|
|
4184
|
+
offers: [{
|
|
4185
|
+
availability,
|
|
4186
|
+
price,
|
|
4187
|
+
listPrice,
|
|
4188
|
+
seller
|
|
4189
|
+
}]
|
|
4190
|
+
}
|
|
4191
|
+
} = product;
|
|
4192
|
+
const buyProps = useBuyButton({
|
|
4193
|
+
id,
|
|
4194
|
+
price,
|
|
4195
|
+
listPrice,
|
|
4196
|
+
seller,
|
|
4197
|
+
quantity,
|
|
4198
|
+
itemOffered: {
|
|
4199
|
+
sku,
|
|
4200
|
+
name: variantName,
|
|
4201
|
+
gtin,
|
|
4202
|
+
image: productImages,
|
|
4203
|
+
brand,
|
|
4204
|
+
isVariantOf,
|
|
4205
|
+
additionalProperty
|
|
4206
|
+
}
|
|
4207
|
+
});
|
|
4208
|
+
const outOfStock = (0,external_react_.useMemo)(() => availability === 'https://schema.org/OutOfStock', [availability]);
|
|
4209
|
+
const shouldShowDiscountedPrice = (0,external_react_.useMemo)(() => lowPrice !== listPrice, [lowPrice, listPrice]);
|
|
4210
|
+
|
|
4211
|
+
const AddToCartButton = () => {
|
|
4212
|
+
return outOfStock ?
|
|
4213
|
+
/*#__PURE__*/
|
|
4214
|
+
// TODO: Adds <OutOfStock /> when component is ready to use
|
|
4215
|
+
jsx_runtime_.jsx(NotAvailableButton.Component, {
|
|
4216
|
+
children: notAvailableButtonTitle
|
|
4217
|
+
}) : /*#__PURE__*/jsx_runtime_.jsx(BuyButton.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({}, BuyButton.props), {}, {
|
|
4218
|
+
icon: /*#__PURE__*/jsx_runtime_.jsx(Icon.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({}, Icon.props), {}, {
|
|
4219
|
+
name: buyButtonIconName ?? Icon.props.name,
|
|
4220
|
+
"aria-label": buyButtonIconAlt ?? Icon.props['aria-label']
|
|
4221
|
+
}))
|
|
4222
|
+
}, buyProps), {}, {
|
|
4223
|
+
children: buyButtonTitle || 'Add to Cart'
|
|
4224
|
+
}));
|
|
4225
|
+
};
|
|
4226
|
+
|
|
4227
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
4228
|
+
children: [!outOfStock && /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
|
|
4229
|
+
"data-fs-product-details-values": true,
|
|
4230
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
|
|
4231
|
+
"data-fs-product-details-prices": true,
|
|
4232
|
+
children: shouldShowDiscountedPrice ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
4233
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx(Price.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
|
|
4234
|
+
formatter: useFormattedPrice/* useFormattedPrice */.P,
|
|
4235
|
+
testId: "list-price",
|
|
4236
|
+
variant: "listing",
|
|
4237
|
+
SRText: "Original price:"
|
|
4238
|
+
}, Price.props), {}, {
|
|
4239
|
+
// Dynamic props shouldn't be overridable
|
|
4240
|
+
// This decision can be reviewed later if needed
|
|
4241
|
+
value: listPrice,
|
|
4242
|
+
"data-value": listPrice
|
|
4243
|
+
})), /*#__PURE__*/jsx_runtime_.jsx(Price.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
|
|
4244
|
+
formatter: useFormattedPrice/* useFormattedPrice */.P,
|
|
4245
|
+
testId: "price",
|
|
4246
|
+
variant: "spot",
|
|
4247
|
+
className: "text__lead",
|
|
4248
|
+
SRText: "Sale Price:"
|
|
4249
|
+
}, Price.props), {}, {
|
|
4250
|
+
// Dynamic props shouldn't be overridable
|
|
4251
|
+
// This decision can be reviewed later if needed
|
|
4252
|
+
value: lowPrice,
|
|
4253
|
+
"data-value": lowPrice
|
|
4254
|
+
}))]
|
|
4255
|
+
}) : /*#__PURE__*/jsx_runtime_.jsx(Price.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
|
|
4256
|
+
formatter: useFormattedPrice/* useFormattedPrice */.P,
|
|
4257
|
+
testId: "list-price",
|
|
4258
|
+
variant: "spot",
|
|
4259
|
+
className: "text__lead",
|
|
4260
|
+
SRText: "Original price:"
|
|
4261
|
+
}, Price.props), {}, {
|
|
4262
|
+
// Dynamic props shouldn't be overridable
|
|
4263
|
+
// This decision can be reviewed later if needed
|
|
4264
|
+
value: lowPrice,
|
|
4265
|
+
"data-value": lowPrice
|
|
4266
|
+
}))
|
|
4267
|
+
}), /*#__PURE__*/jsx_runtime_.jsx(QuantitySelector.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
|
|
4268
|
+
min: 1,
|
|
4269
|
+
max: 10
|
|
4270
|
+
}, QuantitySelector.props), {}, {
|
|
4271
|
+
// Dynamic props shouldn't be overridable
|
|
4272
|
+
// This decision can be reviewed later if needed
|
|
4273
|
+
onChange: setQuantity
|
|
4274
|
+
}))]
|
|
4275
|
+
}), skuVariants && /*#__PURE__*/jsx_runtime_.jsx(SkuSelector_Selectors, {
|
|
4276
|
+
slugsMap: skuVariants.slugsMap,
|
|
4277
|
+
availableVariations: skuVariants.availableVariations,
|
|
4278
|
+
activeVariations: skuVariants.activeVariations,
|
|
4279
|
+
"data-fs-product-details-selectors": true
|
|
4280
|
+
}), isValidating ?
|
|
4281
|
+
/*#__PURE__*/
|
|
4282
|
+
|
|
4283
|
+
/* NOTE:
|
|
4284
|
+
A loading skeleton had to be used to avoid a Lighthouse's
|
|
4285
|
+
non-composited animation violation due to the button transitioning its
|
|
4286
|
+
background color when changing from its initial disabled to active state.
|
|
4287
|
+
See full explanation on commit https://git.io/JyXV5. */
|
|
4288
|
+
jsx_runtime_.jsx(AddToCartLoadingSkeleton, {}) : /*#__PURE__*/jsx_runtime_.jsx(AddToCartButton, {})]
|
|
4289
|
+
});
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
/* harmony default export */ const ProductDetails_ProductDetailsSettings = (ProductDetailsSettings);
|
|
4293
|
+
// EXTERNAL MODULE: ./src/components/sections/ProductDetails/section.module.scss
|
|
4294
|
+
var section_module = __webpack_require__(9034);
|
|
4295
|
+
var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
|
|
4296
|
+
// EXTERNAL MODULE: ./src/sdk/overrides/PageProvider.tsx
|
|
4297
|
+
var PageProvider = __webpack_require__(5953);
|
|
4298
|
+
;// CONCATENATED MODULE: ./src/components/sections/ProductDetails/ProductDetails.tsx
|
|
4299
|
+
function ProductDetails_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; }
|
|
4300
|
+
|
|
4301
|
+
function ProductDetails_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ProductDetails_ownKeys(Object(source), !0).forEach(function (key) { ProductDetails_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ProductDetails_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4302
|
+
|
|
4303
|
+
function ProductDetails_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; }
|
|
4304
|
+
|
|
4305
|
+
|
|
4306
|
+
|
|
4307
|
+
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
|
|
4311
|
+
|
|
4312
|
+
|
|
4313
|
+
|
|
4314
|
+
|
|
4315
|
+
|
|
4316
|
+
|
|
4317
|
+
|
|
4318
|
+
function ProductDetails({
|
|
4319
|
+
productTitle: {
|
|
4320
|
+
refNumber: showRefNumber,
|
|
4321
|
+
discountBadge: {
|
|
4322
|
+
showDiscountBadge,
|
|
4323
|
+
size: discountBadgeSize
|
|
4324
|
+
}
|
|
4325
|
+
},
|
|
4326
|
+
buyButton: {
|
|
4327
|
+
icon: buyButtonIcon,
|
|
4328
|
+
title: buyButtonTitle
|
|
4329
|
+
},
|
|
4330
|
+
shippingSimulator: {
|
|
4331
|
+
title: shippingSimulatorTitle,
|
|
4332
|
+
inputLabel: shippingSimulatorInputLabel,
|
|
4333
|
+
shippingOptionsTableTitle: shippingSimulatorOptionsTableTitle,
|
|
4334
|
+
link: {
|
|
4335
|
+
to: shippingSimulatorLinkUrl,
|
|
4336
|
+
text: shippingSimulatorLinkText
|
|
4337
|
+
}
|
|
4338
|
+
},
|
|
4339
|
+
productDescription: {
|
|
4340
|
+
title: productDescriptionDetailsTitle,
|
|
4341
|
+
initiallyExpanded: productDescriptionInitiallyExpanded,
|
|
4342
|
+
displayDescription: shouldDisplayProductDescription
|
|
4343
|
+
},
|
|
4344
|
+
notAvailableButton: {
|
|
4345
|
+
title: notAvailableButtonTitle
|
|
4346
|
+
}
|
|
4347
|
+
}) {
|
|
4348
|
+
const {
|
|
4349
|
+
DiscountBadge,
|
|
4350
|
+
ProductTitle,
|
|
4351
|
+
__experimentalImageGallery: ImageGallery,
|
|
4352
|
+
__experimentalShippingSimulation: ShippingSimulation,
|
|
4353
|
+
__experimentalNotAvailableButton: NotAvailableButton
|
|
4354
|
+
} = (0,OverrideContext/* useOverrideComponents */.r3)();
|
|
4355
|
+
const {
|
|
4356
|
+
currency
|
|
4357
|
+
} = (0,session/* useSession */.kP)();
|
|
4358
|
+
const {
|
|
4359
|
+
0: quantity,
|
|
4360
|
+
1: setQuantity
|
|
4361
|
+
} = (0,external_react_.useState)(1);
|
|
4362
|
+
const context = (0,PageProvider/* usePDP */.al)();
|
|
4363
|
+
const {
|
|
4364
|
+
product,
|
|
4365
|
+
isValidating
|
|
4366
|
+
} = context?.data;
|
|
4367
|
+
|
|
4368
|
+
if (!product) {
|
|
4369
|
+
throw new Error('NotFound');
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4372
|
+
const {
|
|
4373
|
+
id,
|
|
4374
|
+
sku,
|
|
4375
|
+
gtin,
|
|
4376
|
+
name: variantName,
|
|
4377
|
+
brand,
|
|
4378
|
+
isVariantOf,
|
|
4379
|
+
description,
|
|
4380
|
+
isVariantOf: {
|
|
4381
|
+
name,
|
|
4382
|
+
productGroupID: productId
|
|
4383
|
+
},
|
|
4384
|
+
image: productImages,
|
|
4385
|
+
offers: {
|
|
4386
|
+
offers: [{
|
|
4387
|
+
availability,
|
|
4388
|
+
price,
|
|
4389
|
+
listPrice,
|
|
4390
|
+
seller
|
|
4391
|
+
}],
|
|
4392
|
+
lowPrice
|
|
4393
|
+
}
|
|
4394
|
+
} = product;
|
|
4395
|
+
(0,external_react_.useEffect)(() => {
|
|
4396
|
+
(0,sendAnalyticsEvent/* sendAnalyticsEvent */._)({
|
|
4397
|
+
name: 'view_item',
|
|
4398
|
+
params: {
|
|
4399
|
+
currency: currency.code,
|
|
4400
|
+
value: price,
|
|
4401
|
+
items: [{
|
|
4402
|
+
item_id: isVariantOf.productGroupID,
|
|
4403
|
+
item_name: isVariantOf.name,
|
|
4404
|
+
item_brand: brand.name,
|
|
4405
|
+
item_variant: sku,
|
|
4406
|
+
price,
|
|
4407
|
+
discount: listPrice - price,
|
|
4408
|
+
currency: currency.code,
|
|
4409
|
+
item_variant_name: variantName,
|
|
4410
|
+
product_reference_id: gtin
|
|
4411
|
+
}]
|
|
4412
|
+
}
|
|
4413
|
+
});
|
|
4414
|
+
}, [isVariantOf.productGroupID, isVariantOf.name, brand.name, sku, price, listPrice, currency.code, variantName, gtin]);
|
|
4415
|
+
const outOfStock = (0,external_react_.useMemo)(() => availability === 'https://schema.org/OutOfStock', [availability]);
|
|
4416
|
+
return /*#__PURE__*/jsx_runtime_.jsx(Section/* default */.Z, {
|
|
4417
|
+
className: `${(section_module_default()).section} section-product-details`,
|
|
4418
|
+
children: /*#__PURE__*/jsx_runtime_.jsx("section", {
|
|
4419
|
+
"data-fs-product-details": true,
|
|
4420
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
|
|
4421
|
+
"data-fs-product-details-body": true,
|
|
4422
|
+
"data-fs-content": "product-details",
|
|
4423
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx("header", {
|
|
4424
|
+
"data-fs-product-details-title": true,
|
|
4425
|
+
"data-fs-product-details-section": true,
|
|
4426
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(ProductTitle.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({
|
|
4427
|
+
// TODO: We should review this prop. There's now way to override the title and use the dynamic name value.
|
|
4428
|
+
// Maybe passing a ProductTitleHeader component as a prop would be better, as it would be overridable.
|
|
4429
|
+
// Maybe now it's worth to make title always a h1 and receive only the name, as it would be easier for users to override.
|
|
4430
|
+
title: /*#__PURE__*/jsx_runtime_.jsx("h1", {
|
|
4431
|
+
children: name
|
|
4432
|
+
})
|
|
4433
|
+
}, ProductTitle.props), {}, {
|
|
4434
|
+
label: showDiscountBadge && /*#__PURE__*/jsx_runtime_.jsx(DiscountBadge.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({}, DiscountBadge.props), {}, {
|
|
4435
|
+
size: discountBadgeSize ?? DiscountBadge.props.size // Dynamic props shouldn't be overridable
|
|
4436
|
+
// This decision can be reviewed later if needed
|
|
4437
|
+
,
|
|
4438
|
+
listPrice: listPrice,
|
|
4439
|
+
spotPrice: lowPrice
|
|
4440
|
+
})),
|
|
4441
|
+
refNumber: showRefNumber && productId
|
|
4442
|
+
}))
|
|
4443
|
+
}), /*#__PURE__*/jsx_runtime_.jsx(ImageGallery.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({
|
|
4444
|
+
"data-fs-product-details-gallery": true
|
|
4445
|
+
}, ImageGallery.props), {}, {
|
|
4446
|
+
images: productImages
|
|
4447
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
|
|
4448
|
+
"data-fs-product-details-info": true,
|
|
4449
|
+
children: [/*#__PURE__*/jsx_runtime_.jsx("section", {
|
|
4450
|
+
"data-fs-product-details-settings": true,
|
|
4451
|
+
"data-fs-product-details-section": true,
|
|
4452
|
+
children: /*#__PURE__*/jsx_runtime_.jsx(ProductDetails_ProductDetailsSettings, {
|
|
4453
|
+
product: product,
|
|
4454
|
+
isValidating: isValidating,
|
|
4455
|
+
buyButtonTitle: buyButtonTitle,
|
|
4456
|
+
quantity: quantity,
|
|
4457
|
+
setQuantity: setQuantity,
|
|
4458
|
+
buyButtonIcon: buyButtonIcon,
|
|
4459
|
+
notAvailableButtonTitle: notAvailableButtonTitle ?? NotAvailableButton.props.title
|
|
4460
|
+
})
|
|
4461
|
+
}), !outOfStock && /*#__PURE__*/jsx_runtime_.jsx(ShippingSimulation.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({
|
|
4462
|
+
"data-fs-product-details-section": true,
|
|
4463
|
+
"data-fs-product-details-shipping": true,
|
|
4464
|
+
formatter: useFormattedPrice/* useFormattedPrice */.P
|
|
4465
|
+
}, ShippingSimulation.props), {}, {
|
|
4466
|
+
idkPostalCodeLinkProps: ProductDetails_objectSpread(ProductDetails_objectSpread({}, ShippingSimulation.props.idkPostalCodeLinkProps), {}, {
|
|
4467
|
+
href: shippingSimulatorLinkUrl ?? ShippingSimulation.props.idkPostalCodeLinkProps?.href,
|
|
4468
|
+
children: shippingSimulatorLinkText ?? ShippingSimulation.props.idkPostalCodeLinkProps?.children
|
|
4469
|
+
}),
|
|
4470
|
+
productShippingInfo: {
|
|
4471
|
+
id,
|
|
4472
|
+
quantity,
|
|
4473
|
+
seller: seller.identifier
|
|
4474
|
+
},
|
|
4475
|
+
title: shippingSimulatorTitle ?? ShippingSimulation.props.title,
|
|
4476
|
+
inputLabel: shippingSimulatorInputLabel ?? ShippingSimulation.props.inputLabel,
|
|
4477
|
+
optionsLabel: shippingSimulatorOptionsTableTitle ?? ShippingSimulation.props.optionsLabel
|
|
4478
|
+
}))]
|
|
4479
|
+
}), shouldDisplayProductDescription && /*#__PURE__*/jsx_runtime_.jsx(ProductDescription_ProductDescription, {
|
|
4480
|
+
initiallyExpanded: productDescriptionInitiallyExpanded,
|
|
4481
|
+
descriptionData: [{
|
|
4482
|
+
title: productDescriptionDetailsTitle,
|
|
4483
|
+
content: description
|
|
4484
|
+
}]
|
|
4485
|
+
})]
|
|
4486
|
+
})
|
|
4487
|
+
})
|
|
4488
|
+
});
|
|
4489
|
+
}
|
|
4490
|
+
|
|
4491
|
+
const fragment = "unknown";
|
|
4492
|
+
/* harmony default export */ const ProductDetails_ProductDetails = (ProductDetails);
|
|
4493
|
+
|
|
4494
|
+
/***/ }),
|
|
4495
|
+
|
|
4496
|
+
/***/ 2432:
|
|
4497
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4498
|
+
|
|
4499
|
+
"use strict";
|
|
4500
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4501
|
+
/* harmony export */ "B": () => (/* binding */ ProductShelfDefaultComponents)
|
|
4502
|
+
/* harmony export */ });
|
|
4503
|
+
/* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6737);
|
|
4504
|
+
/* harmony import */ var src_components_product_ProductCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8553);
|
|
4505
|
+
/* harmony import */ var src_components_ui_Carousel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8619);
|
|
4506
|
+
|
|
4507
|
+
|
|
4508
|
+
|
|
4509
|
+
const ProductShelfDefaultComponents = {
|
|
4510
|
+
ProductShelf: _faststore_ui__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z,
|
|
4511
|
+
__experimentalCarousel: src_components_ui_Carousel__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z,
|
|
4512
|
+
__experimentalProductCard: src_components_product_ProductCard__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z
|
|
4513
|
+
};
|
|
4514
|
+
|
|
4515
|
+
/***/ }),
|
|
4516
|
+
|
|
4517
|
+
/***/ 8569:
|
|
4518
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
4519
|
+
|
|
4520
|
+
"use strict";
|
|
4521
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
4522
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4523
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4524
|
+
/* harmony export */ });
|
|
4525
|
+
/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9785);
|
|
4526
|
+
/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_intersection_observer__WEBPACK_IMPORTED_MODULE_0__);
|
|
4527
|
+
/* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3271);
|
|
4528
|
+
/* harmony import */ var src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7691);
|
|
4529
|
+
/* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6627);
|
|
4530
|
+
/* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_section_module_scss__WEBPACK_IMPORTED_MODULE_3__);
|
|
4531
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(997);
|
|
4532
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
|
4533
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__]);
|
|
4534
|
+
src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
4535
|
+
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; }
|
|
4536
|
+
|
|
4537
|
+
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; }
|
|
4538
|
+
|
|
4539
|
+
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; }
|
|
4540
|
+
|
|
4541
|
+
|
|
4542
|
+
|
|
4543
|
+
|
|
4544
|
+
|
|
4545
|
+
|
|
4546
|
+
|
|
4547
|
+
function ProductShelfSection(_ref) {
|
|
4548
|
+
let otherProps = Object.assign({}, _ref);
|
|
4549
|
+
const {
|
|
4550
|
+
ref,
|
|
4551
|
+
inView
|
|
4552
|
+
} = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_0__.useInView)();
|
|
4553
|
+
return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx(_Section__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
|
|
4554
|
+
className: `${(_section_module_scss__WEBPACK_IMPORTED_MODULE_3___default().section)} section-product-shelf layout__section`,
|
|
4555
|
+
ref: ref,
|
|
4556
|
+
children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx(src_components_ui_ProductShelf__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, _objectSpread({
|
|
4557
|
+
inView: inView
|
|
4558
|
+
}, otherProps))
|
|
4559
|
+
});
|
|
4560
|
+
}
|
|
4561
|
+
|
|
4562
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductShelfSection);
|
|
4563
|
+
__webpack_async_result__();
|
|
4564
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
4565
|
+
|
|
4566
|
+
/***/ }),
|
|
4567
|
+
|
|
4568
|
+
/***/ 3830:
|
|
4569
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4570
|
+
|
|
4571
|
+
"use strict";
|
|
4572
|
+
|
|
4573
|
+
// EXPORTS
|
|
4574
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
4575
|
+
"Z": () => (/* binding */ sections_RegionBar_RegionBar)
|
|
4576
|
+
});
|
|
4577
|
+
|
|
4578
|
+
// EXTERNAL MODULE: ../components/dist/esm/hooks/UIProvider.js
|
|
4579
|
+
var UIProvider = __webpack_require__(6652);
|
|
4580
|
+
// EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
|
|
4581
|
+
var session = __webpack_require__(7295);
|
|
4582
|
+
// EXTERNAL MODULE: external "react"
|
|
4583
|
+
var external_react_ = __webpack_require__(6689);
|
|
4584
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
4585
|
+
// EXTERNAL MODULE: ../components/dist/esm/atoms/Button/Button.js
|
|
4586
|
+
var Button = __webpack_require__(3339);
|
|
4587
|
+
;// CONCATENATED MODULE: ../components/dist/esm/molecules/RegionBar/RegionBar.js
|
|
4588
|
+
|
|
4589
|
+
|
|
4590
|
+
const RegionBar = (0,external_react_.forwardRef)(function RegionBar({ postalCode, icon, label, editLabel, buttonIcon, onButtonClick, ...otherProps }, ref) {
|
|
4591
|
+
return (external_react_default().createElement("div", { ref: ref, "data-fs-region-bar": true, ...otherProps },
|
|
4592
|
+
external_react_default().createElement(Button/* default */.Z, { variant: "tertiary", iconPosition: "right", onClick: onButtonClick, icon: buttonIcon },
|
|
4593
|
+
!!icon && icon,
|
|
4594
|
+
postalCode ? (external_react_default().createElement((external_react_default()).Fragment, null,
|
|
4595
|
+
external_react_default().createElement("span", { "data-fs-region-bar-postal-code": true }, postalCode),
|
|
4596
|
+
!!editLabel && external_react_default().createElement("span", { "data-fs-region-bar-cta": true }, editLabel))) : (external_react_default().createElement("span", { "data-fs-region-bar-message": true }, label)))));
|
|
4597
|
+
});
|
|
4598
|
+
/* harmony default export */ const RegionBar_RegionBar = (RegionBar);
|
|
4599
|
+
//# sourceMappingURL=RegionBar.js.map
|
|
4600
|
+
// EXTERNAL MODULE: ../components/dist/esm/atoms/Icon/Icon.js
|
|
4601
|
+
var Icon = __webpack_require__(2614);
|
|
4602
|
+
// EXTERNAL MODULE: ./src/sdk/overrides/overrides.ts
|
|
4603
|
+
var overrides = __webpack_require__(7506);
|
|
4604
|
+
;// CONCATENATED MODULE: ./src/customizations/src/components/overrides/RegionBar.tsx
|
|
4605
|
+
// This is an example of how it can be used on the starter.
|
|
4606
|
+
const SECTION = 'RegionBar';
|
|
4607
|
+
const override = {
|
|
4608
|
+
section: SECTION
|
|
4609
|
+
};
|
|
4610
|
+
|
|
4611
|
+
;// CONCATENATED MODULE: ./src/components/sections/RegionBar/Overrides.tsx
|
|
4612
|
+
|
|
4613
|
+
|
|
4614
|
+
|
|
4615
|
+
const {
|
|
4616
|
+
RegionBar: Overrides_RegionBar,
|
|
4617
|
+
LocationIcon,
|
|
4618
|
+
ButtonIcon
|
|
4619
|
+
} = (0,overrides/* getSectionOverrides */.f)({
|
|
4620
|
+
RegionBar: RegionBar_RegionBar,
|
|
4621
|
+
LocationIcon: Icon/* default */.Z,
|
|
4622
|
+
ButtonIcon: Icon/* default */.Z
|
|
4623
|
+
}, override);
|
|
4624
|
+
|
|
4625
|
+
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
4626
|
+
var jsx_runtime_ = __webpack_require__(997);
|
|
4627
|
+
;// CONCATENATED MODULE: ./src/components/region/RegionBar/RegionBar.tsx
|
|
4628
|
+
const _excluded = ["icon", "buttonIcon", "label", "editLabel"];
|
|
4629
|
+
|
|
4630
|
+
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; }
|
|
4631
|
+
|
|
4632
|
+
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; }
|
|
4633
|
+
|
|
4634
|
+
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; }
|
|
4635
|
+
|
|
4636
|
+
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; }
|
|
4637
|
+
|
|
4638
|
+
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; }
|
|
4639
|
+
|
|
4640
|
+
|
|
4641
|
+
|
|
4642
|
+
|
|
4643
|
+
|
|
4644
|
+
|
|
4645
|
+
function RegionBar_RegionBar_RegionBar(_ref) {
|
|
4646
|
+
let {
|
|
4647
|
+
icon: {
|
|
4648
|
+
icon: locationIcon = LocationIcon.props.name,
|
|
4649
|
+
alt: locationIconAlt = LocationIcon.props["aria-label"]
|
|
4650
|
+
},
|
|
4651
|
+
buttonIcon: {
|
|
4652
|
+
icon: buttonIcon = ButtonIcon.props.name,
|
|
4653
|
+
alt: buttonIconAlt = ButtonIcon.props["aria-label"]
|
|
4654
|
+
},
|
|
4655
|
+
label = Overrides_RegionBar.props.label,
|
|
4656
|
+
editLabel = Overrides_RegionBar.props.editLabel
|
|
4657
|
+
} = _ref,
|
|
4658
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
4659
|
+
|
|
4660
|
+
const {
|
|
4661
|
+
openModal
|
|
4662
|
+
} = (0,UIProvider/* useUI */.l)();
|
|
4663
|
+
const {
|
|
4664
|
+
postalCode
|
|
4665
|
+
} = (0,session/* useSession */.kP)();
|
|
4666
|
+
return /*#__PURE__*/jsx_runtime_.jsx(Overrides_RegionBar.Component, _objectSpread(_objectSpread({
|
|
4667
|
+
icon: /*#__PURE__*/jsx_runtime_.jsx(LocationIcon.Component, _objectSpread(_objectSpread({}, LocationIcon.props), {}, {
|
|
4668
|
+
name: locationIcon,
|
|
4669
|
+
"aria-label": locationIconAlt
|
|
4670
|
+
})),
|
|
4671
|
+
buttonIcon: /*#__PURE__*/jsx_runtime_.jsx(ButtonIcon.Component, _objectSpread(_objectSpread({}, ButtonIcon.props), {}, {
|
|
4672
|
+
name: buttonIcon,
|
|
4673
|
+
"aria-label": buttonIconAlt
|
|
4674
|
+
}))
|
|
4675
|
+
}, Overrides_RegionBar.props), {}, {
|
|
4676
|
+
label: label,
|
|
4677
|
+
editLabel: editLabel // Dynamic props shouldn't be overridable
|
|
4678
|
+
// This decision can be reviewed later if needed
|
|
4679
|
+
,
|
|
4680
|
+
onButtonClick: openModal,
|
|
4681
|
+
postalCode: postalCode
|
|
4682
|
+
}, otherProps));
|
|
4683
|
+
}
|
|
4684
|
+
|
|
4685
|
+
/* harmony default export */ const region_RegionBar_RegionBar = (RegionBar_RegionBar_RegionBar);
|
|
4686
|
+
// EXTERNAL MODULE: ./src/components/sections/Section/Section.tsx
|
|
4687
|
+
var Section = __webpack_require__(3271);
|
|
4688
|
+
// EXTERNAL MODULE: ./src/components/sections/RegionBar/section.module.scss
|
|
4689
|
+
var section_module = __webpack_require__(3472);
|
|
4690
|
+
var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
|
|
4691
|
+
;// CONCATENATED MODULE: ./src/components/sections/RegionBar/RegionBar.tsx
|
|
4692
|
+
const RegionBar_excluded = ["className"];
|
|
4693
|
+
|
|
4694
|
+
function RegionBar_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; }
|
|
3285
4695
|
|
|
3286
4696
|
function RegionBar_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? RegionBar_ownKeys(Object(source), !0).forEach(function (key) { RegionBar_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : RegionBar_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3287
4697
|
|
|
@@ -4923,15 +6333,19 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
4923
6333
|
/* harmony import */ var _components_sections_Alert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6893);
|
|
4924
6334
|
/* harmony import */ var _components_sections_BannerText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9315);
|
|
4925
6335
|
/* harmony import */ var _components_sections_Hero__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2849);
|
|
4926
|
-
/* harmony import */ var
|
|
6336
|
+
/* harmony import */ var _components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8569);
|
|
4927
6337
|
/* harmony import */ var _components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(994);
|
|
4928
|
-
/* harmony import */ var
|
|
4929
|
-
/* harmony import */ var
|
|
4930
|
-
/* harmony import */ var
|
|
4931
|
-
/* harmony import */ var
|
|
4932
|
-
/* harmony import */ var
|
|
4933
|
-
var
|
|
4934
|
-
|
|
6338
|
+
/* harmony import */ var _components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8663);
|
|
6339
|
+
/* harmony import */ var _components_sections_Alert_DefaultComponents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6948);
|
|
6340
|
+
/* harmony import */ var _components_sections_BannerText_DefaultComponents__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(719);
|
|
6341
|
+
/* harmony import */ var src_components_sections_CrossSellingShelf_DefaultComponents__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8435);
|
|
6342
|
+
/* harmony import */ var _components_sections_Hero_DefaultComponents__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9569);
|
|
6343
|
+
/* harmony import */ var _components_sections_ProductShelf_DefaultComponents__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2432);
|
|
6344
|
+
/* harmony import */ var _components_sections_ProductDetails_DefaultComponents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(1307);
|
|
6345
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_2__, _components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_5__]);
|
|
6346
|
+
([_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_2__, _components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_5__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
6347
|
+
|
|
6348
|
+
|
|
4935
6349
|
|
|
4936
6350
|
|
|
4937
6351
|
|
|
@@ -4947,14 +6361,16 @@ const Sections = {
|
|
|
4947
6361
|
BannerText: _components_sections_BannerText__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z,
|
|
4948
6362
|
CrossSellingShelf: _components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z,
|
|
4949
6363
|
Hero: _components_sections_Hero__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z,
|
|
4950
|
-
|
|
6364
|
+
ProductDetails: _components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z,
|
|
6365
|
+
ProductShelf: _components_sections_ProductShelf__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z
|
|
4951
6366
|
};
|
|
4952
6367
|
const DefaultComponents = {
|
|
4953
|
-
Alert:
|
|
4954
|
-
BannerText:
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
6368
|
+
Alert: _components_sections_Alert_DefaultComponents__WEBPACK_IMPORTED_MODULE_6__/* .AlertDefaultComponents */ .p,
|
|
6369
|
+
BannerText: _components_sections_BannerText_DefaultComponents__WEBPACK_IMPORTED_MODULE_7__/* .BannerTextDefaultComponents */ .b,
|
|
6370
|
+
CrossSellingShelf: src_components_sections_CrossSellingShelf_DefaultComponents__WEBPACK_IMPORTED_MODULE_8__/* .CrossSellingShelfDefaultComponents */ .q,
|
|
6371
|
+
Hero: _components_sections_Hero_DefaultComponents__WEBPACK_IMPORTED_MODULE_9__/* .HeroDefaultComponents */ .O,
|
|
6372
|
+
ProductDetails: _components_sections_ProductDetails_DefaultComponents__WEBPACK_IMPORTED_MODULE_10__/* .ProductDetailsDefaultComponents */ .l,
|
|
6373
|
+
ProductShelf: _components_sections_ProductShelf_DefaultComponents__WEBPACK_IMPORTED_MODULE_11__/* .ProductShelfDefaultComponents */ .B
|
|
4958
6374
|
};
|
|
4959
6375
|
__webpack_async_result__();
|
|
4960
6376
|
} catch(e) { __webpack_async_result__(e); } });
|
|
@@ -5599,6 +7015,17 @@ module.exports = {
|
|
|
5599
7015
|
};
|
|
5600
7016
|
|
|
5601
7017
|
|
|
7018
|
+
/***/ }),
|
|
7019
|
+
|
|
7020
|
+
/***/ 9034:
|
|
7021
|
+
/***/ ((module) => {
|
|
7022
|
+
|
|
7023
|
+
// Exports
|
|
7024
|
+
module.exports = {
|
|
7025
|
+
"section": "section_section__XsOoR"
|
|
7026
|
+
};
|
|
7027
|
+
|
|
7028
|
+
|
|
5602
7029
|
/***/ }),
|
|
5603
7030
|
|
|
5604
7031
|
/***/ 6627:
|