@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.
Files changed (76) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +37 -37
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/next-server.js.nft.json +1 -1
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/react-loadable-manifest.json +2 -2
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/74.js +1593 -166
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  18. package/.next/server/pages/404.js.nft.json +1 -1
  19. package/.next/server/pages/500.js.nft.json +1 -1
  20. package/.next/server/pages/[...slug].js +1 -1
  21. package/.next/server/pages/[...slug].js.nft.json +1 -1
  22. package/.next/server/pages/[slug]/p.js +30 -1278
  23. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  24. package/.next/server/pages/_app.js.nft.json +1 -1
  25. package/.next/server/pages/account.js.nft.json +1 -1
  26. package/.next/server/pages/checkout.js.nft.json +1 -1
  27. package/.next/server/pages/en-US/404.html +2 -2
  28. package/.next/server/pages/en-US/500.html +2 -2
  29. package/.next/server/pages/en-US/account.html +2 -2
  30. package/.next/server/pages/en-US/checkout.html +2 -2
  31. package/.next/server/pages/en-US/login.html +2 -2
  32. package/.next/server/pages/en-US/s.html +2 -2
  33. package/.next/server/pages/en-US.html +2 -2
  34. package/.next/server/pages/index.js +1 -1
  35. package/.next/server/pages/index.js.nft.json +1 -1
  36. package/.next/server/pages/login.js.nft.json +1 -1
  37. package/.next/server/pages/s.js +1 -1
  38. package/.next/server/pages/s.js.nft.json +1 -1
  39. package/.next/server/pages-manifest.json +3 -3
  40. package/.next/static/chunks/158-3ad2d91ade721ede.js +1 -0
  41. package/.next/static/chunks/497-e24ad9b81a2b2cba.js +1 -0
  42. package/.next/static/chunks/{585.4e673e43d8daf336.js → 585.f056dcd6e8625c41.js} +1 -1
  43. package/.next/static/chunks/988.a57dac6501fb5184.js +1 -0
  44. package/.next/static/chunks/pages/{[...slug]-b82b56ce1651ea4f.js → [...slug]-73ed6192e9f16de9.js} +1 -1
  45. package/.next/static/chunks/pages/[slug]/p-0006885a8666b680.js +1 -0
  46. package/.next/static/chunks/pages/index-eb26d4cf53e13666.js +1 -0
  47. package/.next/static/chunks/{webpack-ec84ae4e89cebb1f.js → webpack-3382def1b25b17f8.js} +1 -1
  48. package/.next/static/css/4729e602d10c1332.css +1 -0
  49. package/.next/static/css/f2ab72459fcdabcc.css +1 -0
  50. package/.next/static/{sToiuT4rncwaUIk2owcIX → kWyk6RSC1bsGWTDX1FSk5}/_buildManifest.js +1 -1
  51. package/.next/trace +81 -81
  52. package/.turbo/turbo-build.log +12 -12
  53. package/.turbo/turbo-test.log +9 -9
  54. package/package.json +2 -2
  55. package/public/icons.svg +3 -1
  56. package/src/components/sections/ProductDetails/DefaultComponents.ts +34 -0
  57. package/src/components/sections/ProductDetails/OverriddenDefaultProductDetails.ts +12 -0
  58. package/src/components/sections/ProductDetails/ProductDetails.tsx +33 -34
  59. package/src/components/ui/ImageGallery/ImageGallery.tsx +10 -6
  60. package/src/components/ui/ProductDetails/ProductDetailsSettings.tsx +12 -13
  61. package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +4 -2
  62. package/src/components/ui/SkuSelector/Selectors.tsx +3 -1
  63. package/src/pages/[slug]/p.tsx +1 -1
  64. package/src/sdk/overrides/sections.tsx +5 -1
  65. package/src/typings/overrides.ts +1 -1
  66. package/.next/server/chunks/693.js +0 -58
  67. package/.next/server/chunks/779.js +0 -58
  68. package/.next/static/chunks/158-ef35da4842083552.js +0 -1
  69. package/.next/static/chunks/497-37c1e4e1d862b354.js +0 -1
  70. package/.next/static/chunks/988.afda042dd9ba11d1.js +0 -1
  71. package/.next/static/chunks/pages/[slug]/p-39599bd4d6faeeb6.js +0 -1
  72. package/.next/static/chunks/pages/index-84457d91d9060925.js +0 -1
  73. package/.next/static/css/0cb5d7afb952bb02.css +0 -1
  74. package/.next/static/css/cbccabebb36f7f92.css +0 -1
  75. package/src/components/sections/ProductDetails/Overrides.tsx +0 -73
  76. /package/.next/static/{sToiuT4rncwaUIk2owcIX → kWyk6RSC1bsGWTDX1FSk5}/_ssgManifest.js +0 -0
@@ -86,1282 +86,45 @@ __webpack_async_result__();
86
86
 
87
87
  /***/ }),
88
88
 
89
- /***/ 2694:
90
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
89
+ /***/ 6458:
90
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
91
91
 
92
92
  "use strict";
93
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
94
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
95
+ /* harmony export */ "L": () => (/* binding */ OverriddenDefaultProductDetails)
96
+ /* harmony export */ });
97
+ /* harmony import */ var src_customizations_src_components_overrides_ProductDetails__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2925);
98
+ /* harmony import */ var src_sdk_overrides_getOverriddenSection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8788);
99
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_sdk_overrides_getOverriddenSection__WEBPACK_IMPORTED_MODULE_0__]);
100
+ src_sdk_overrides_getOverriddenSection__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
93
101
 
94
- // EXPORTS
95
- __webpack_require__.d(__webpack_exports__, {
96
- "Z": () => (/* binding */ ProductDetails_ProductDetails)
97
- });
98
-
99
- // UNUSED EXPORTS: fragment
100
-
101
- // EXTERNAL MODULE: external "react"
102
- var external_react_ = __webpack_require__(6689);
103
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
104
- // EXTERNAL MODULE: ../sdk/dist/analytics/sendAnalyticsEvent.js
105
- var sendAnalyticsEvent = __webpack_require__(1072);
106
- // EXTERNAL MODULE: ./src/sdk/product/useFormattedPrice.ts
107
- var useFormattedPrice = __webpack_require__(5346);
108
- // EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
109
- var session = __webpack_require__(7295);
110
- // EXTERNAL MODULE: ./src/components/sections/Section/Section.tsx
111
- var Section = __webpack_require__(3271);
112
- // EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/Accordion.js
113
- var Accordion = __webpack_require__(1516);
114
- // EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/AccordionItem.js
115
- var AccordionItem = __webpack_require__(783);
116
- // EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/AccordionButton.js
117
- var AccordionButton = __webpack_require__(7734);
118
- // EXTERNAL MODULE: ../components/dist/esm/molecules/Accordion/AccordionPanel.js
119
- var AccordionPanel = __webpack_require__(7583);
120
- // EXTERNAL MODULE: external "react/jsx-runtime"
121
- var jsx_runtime_ = __webpack_require__(997);
122
- ;// CONCATENATED MODULE: ./src/components/ui/ProductDescription/ProductDescription.tsx
123
-
124
-
125
-
126
-
127
-
128
- function ProductDescription({
129
- descriptionData,
130
- initiallyExpanded = 'first'
131
- }) {
132
- /**
133
- * Maps 'initiallyExpanded' prop values to indices
134
- */
135
- const INITIALLY_EXPANDED_MAP = (0,external_react_.useMemo)(() => ({
136
- none: [],
137
- first: [0],
138
- all: [0, 1, 2, 3]
139
- }), []);
140
- const {
141
- 0: indices,
142
- 1: setIndices
143
- } = (0,external_react_.useState)(new Set(INITIALLY_EXPANDED_MAP[initiallyExpanded]));
144
-
145
- const onChange = index => {
146
- setIndices(currentIndices => {
147
- const newIndices = new Set(currentIndices);
148
-
149
- if (currentIndices.has(index)) {
150
- newIndices.delete(index);
151
- } else {
152
- newIndices.add(index);
153
- }
154
-
155
- return newIndices;
156
- });
157
- };
158
-
159
- return /*#__PURE__*/jsx_runtime_.jsx("section", {
160
- "data-fs-product-description": true,
161
- children: /*#__PURE__*/jsx_runtime_.jsx(Accordion/* default */.Z, {
162
- indices: indices,
163
- onChange: onChange,
164
- "aria-label": "Product Details Content",
165
- children: descriptionData.map(({
166
- title,
167
- content
168
- }, index) => /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
169
- as: "article",
170
- index: index,
171
- prefixId: "product-description",
172
- "data-fs-product-details-description": true,
173
- children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
174
- children: title
175
- }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
176
- children: /*#__PURE__*/jsx_runtime_.jsx("div", {
177
- // Applies display: contents through FastStore UI
178
- "data-fs-product-details-description-content": true // The content is already sanitized by FastStore API
179
- ,
180
- dangerouslySetInnerHTML: {
181
- __html: content
182
- }
183
- })
184
- })]
185
- }, String(index)))
186
- })
187
- });
188
- }
189
-
190
- /* harmony default export */ const ProductDescription_ProductDescription = (ProductDescription);
191
- // EXTERNAL MODULE: ../components/dist/esm/hooks/UIProvider.js
192
- var UIProvider = __webpack_require__(6652);
193
- // EXTERNAL MODULE: ./src/sdk/cart/index.ts + 1 modules
194
- var cart = __webpack_require__(6073);
195
- ;// CONCATENATED MODULE: ./src/sdk/cart/useBuyButton.ts
196
-
197
-
198
-
199
-
200
-
201
- const useBuyButton = item => {
202
- const {
203
- openCart
204
- } = (0,UIProvider/* useUI */.l)();
205
- const {
206
- currency: {
207
- code
208
- }
209
- } = (0,session/* useSession */.kP)();
210
- const onClick = (0,external_react_.useCallback)(e => {
211
- e.preventDefault();
212
-
213
- if (!item) {
214
- return;
215
- }
216
-
217
- (0,sendAnalyticsEvent/* sendAnalyticsEvent */._)({
218
- name: 'add_to_cart',
219
- params: {
220
- currency: code,
221
- // TODO: In the future, we can explore more robust ways of
222
- // calculating the value (gift items, discounts, etc.).
223
- value: item.price * item.quantity,
224
- items: [{
225
- item_id: item.itemOffered.isVariantOf.productGroupID,
226
- item_name: item.itemOffered.isVariantOf.name,
227
- item_brand: item.itemOffered.brand.name,
228
- item_variant: item.itemOffered.sku,
229
- quantity: item.quantity,
230
- price: item.price,
231
- discount: item.listPrice - item.price,
232
- currency: code,
233
- item_variant_name: item.itemOffered.name,
234
- product_reference_id: item.itemOffered.gtin
235
- }]
236
- }
237
- });
238
- cart/* cartStore.addItem */.i8.addItem(item);
239
- openCart();
240
- }, [code, item, openCart]);
241
- return {
242
- onClick,
243
- 'data-testid': 'buy-button',
244
- 'data-sku': item?.itemOffered.sku,
245
- 'data-seller': item?.seller.identifier
246
- };
247
- };
248
- // EXTERNAL MODULE: ./node_modules/next/link.js
249
- var next_link = __webpack_require__(1664);
250
- var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
251
- // EXTERNAL MODULE: ./src/components/ui/Image/Image.tsx + 1 modules
252
- var Image = __webpack_require__(5731);
253
- // EXTERNAL MODULE: ../components/dist/esm/molecules/Rating/Rating.js
254
- var Rating = __webpack_require__(3024);
255
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/ProductTitle/ProductTitle.js
256
-
257
-
258
- const ProductTitle = (0,external_react_.forwardRef)(function ProductTitle({ title, label, refTag = 'Ref.: ', refNumber, testId = 'fs-product-title', ratingValue, ...otherProps }, ref) {
259
- return (external_react_default().createElement("header", { ref: ref, "data-fs-product-title": true, "data-testid": testId, ...otherProps },
260
- external_react_default().createElement("div", { "data-fs-product-title-header": true },
261
- title,
262
- !!label && label),
263
- (refNumber || ratingValue) && (external_react_default().createElement("div", { "data-fs-product-title-addendum": true },
264
- ratingValue && external_react_default().createElement(Rating/* default */.Z, { value: ratingValue }),
265
- refNumber && (external_react_default().createElement((external_react_default()).Fragment, null,
266
- refTag,
267
- " ",
268
- refNumber))))));
269
- });
270
- /* harmony default export */ const ProductTitle_ProductTitle = (ProductTitle);
271
- //# sourceMappingURL=ProductTitle.js.map
272
- // EXTERNAL MODULE: ../components/dist/esm/molecules/DiscountBadge/DiscountBadge.js + 1 modules
273
- var DiscountBadge = __webpack_require__(2946);
274
- // EXTERNAL MODULE: ../components/dist/esm/atoms/Button/Button.js
275
- var Button = __webpack_require__(3339);
276
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/BuyButton/BuyButton.js
277
-
278
-
279
- function BuyButton({ testId = 'fs-buy-button', icon, children, ...otherProps }) {
280
- return (external_react_default().createElement(Button/* default */.Z, { "data-fs-buy-button": true, icon: icon, iconPosition: "left", "data-testid": testId, ...otherProps }, children));
281
- }
282
- /* harmony default export */ const BuyButton_BuyButton = (BuyButton);
283
- //# sourceMappingURL=BuyButton.js.map
284
- // EXTERNAL MODULE: ../components/dist/esm/atoms/Icon/Icon.js
285
- var Icon = __webpack_require__(2614);
286
- // EXTERNAL MODULE: ../components/dist/esm/atoms/Price/Price.js
287
- var Price = __webpack_require__(9767);
288
- // EXTERNAL MODULE: ../components/dist/esm/molecules/QuantitySelector/QuantitySelector.js
289
- var QuantitySelector = __webpack_require__(6693);
290
- // EXTERNAL MODULE: ../components/dist/esm/atoms/Label/Label.js
291
- var Label = __webpack_require__(1953);
292
- // EXTERNAL MODULE: ../components/dist/esm/atoms/Link/Link.js
293
- var Link = __webpack_require__(727);
294
- // EXTERNAL MODULE: ../components/dist/esm/atoms/SROnly/SROnly.js
295
- var SROnly = __webpack_require__(5450);
296
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/SkuSelector/useDefineVariant.js
297
-
298
- const getImageName = (src) => {
299
- const sourcePath = new URL(src).pathname;
300
- const imageName = sourcePath.split('/').slice(-1)[0];
301
- return imageName;
302
- };
303
- const useDefineVariant = (options, variant) => (0,external_react_.useMemo)(() => {
304
- if (variant)
305
- return variant;
306
- const allOptionsHaveHexColor = options.every((option) => option.hexColor);
307
- if (allOptionsHaveHexColor) {
308
- return 'color';
309
- }
310
- const firstImageName = options[0]?.src && getImageName(options[0].src);
311
- const areSourcesEqualsOrNull = options.every((option) => {
312
- if (!option.src) {
313
- return true;
314
- }
315
- const optionImageName = getImageName(option.src);
316
- return optionImageName === firstImageName;
317
- });
318
- if (!areSourcesEqualsOrNull) {
319
- return 'image';
320
- }
321
- return 'label';
322
- }, [options, variant]);
323
- //# sourceMappingURL=useDefineVariant.js.map
324
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/SkuSelector/useSkuSlug.js
325
-
326
- function getSkuSlug(slugsMap, selectedVariations, dominantVariation) {
327
- const slugsMapKey = Object.entries(selectedVariations).flat().join('-');
328
- if (slugsMapKey in slugsMap) {
329
- return slugsMap[slugsMapKey];
330
- }
331
- const possibleVariants = Object.keys(slugsMap);
332
- const firstVariationForDominantValue = possibleVariants.find((slug) => slug.includes(`${dominantVariation}-${selectedVariations[dominantVariation]}`));
333
- return slugsMap[firstVariationForDominantValue ?? possibleVariants[0]];
334
- }
335
- const useSkuSlug = (activeVariations, slugsMap, skuPropertyName, getItemHrefProp) => {
336
- const getItemHref = (0,external_react_.useCallback)((option) => {
337
- if (getItemHrefProp)
338
- return { getItemHrefProp };
339
- const currentItemHref = `/${getSkuSlug(slugsMap, {
340
- ...activeVariations,
341
- [skuPropertyName]: option.value,
342
- }, skuPropertyName)}/p`;
343
- return currentItemHref;
344
- }, [activeVariations, getItemHrefProp, slugsMap, skuPropertyName]);
345
- return { getItemHref };
346
- };
347
- //# sourceMappingURL=useSkuSlug.js.map
348
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/SkuSelector/SkuSelector.js
349
-
350
-
351
-
352
-
353
- // TODO: Change by ImageComponent when it be right
354
- const ImageComponentFallback = ({ src, alt, ...otherProps }) => external_react_default().createElement("img", { src: src, alt: alt, ...otherProps });
355
- const SkuSelector = (0,external_react_.forwardRef)(function SkuSelector({ availableVariations, skuPropertyName, testId, activeVariations, linkProps, slugsMap, getItemHref: getItemHrefProp, ImageComponent = ImageComponentFallback, variant: variantProp, ...otherProps }, ref) {
356
- const activeSelectorValue = activeVariations[skuPropertyName];
357
- const options = availableVariations[skuPropertyName];
358
- const variant = useDefineVariant(options, variantProp);
359
- const { getItemHref } = useSkuSlug(activeVariations, slugsMap, skuPropertyName, getItemHrefProp);
360
- return (external_react_default().createElement("div", { ref: ref, "data-fs-sku-selector": true, "data-testid": testId, "data-fs-sku-selector-variant": variant, ...otherProps },
361
- skuPropertyName && (external_react_default().createElement(Label/* default */.Z, { "data-fs-sku-selector-title": true },
362
- skuPropertyName,
363
- ": ",
364
- external_react_default().createElement("strong", null, activeSelectorValue))),
365
- external_react_default().createElement("ul", { "data-fs-sku-selector-list": true }, options.map((option, index) => {
366
- 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] },
367
- external_react_default().createElement(Link/* default */.Z, { "data-fs-sku-selector-option-link": true, href: getItemHref(option), ...linkProps },
368
- external_react_default().createElement(SROnly/* default */.Z, { text: option.label })),
369
- variant === 'label' && external_react_default().createElement("span", null, option.value),
370
- variant === 'image' && ImageComponent && (external_react_default().createElement("span", null,
371
- external_react_default().createElement(ImageComponent, { src: option.src ?? '', alt: option.alt ?? '', "data-fs-sku-selector-option-image": true }))),
372
- variant === 'color' && (external_react_default().createElement("span", null,
373
- external_react_default().createElement("div", { "data-fs-sku-selector-option-color": true, title: option.value, style: {
374
- '--data-fs-sku-selector-option-color-bkg-color': option.hexColor,
375
- } })))));
376
- }))));
377
- });
378
- /* harmony default export */ const SkuSelector_SkuSelector = (SkuSelector);
379
- //# sourceMappingURL=SkuSelector.js.map
380
- // EXTERNAL MODULE: ../components/dist/esm/molecules/InputField/InputField.js
381
- var InputField = __webpack_require__(3779);
382
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/Table.js
383
-
384
- const Table = (0,external_react_.forwardRef)(function Table({ children, variant = 'colored', testId = 'fs-table', ...otherProps }, ref) {
385
- return (external_react_default().createElement("div", { "data-fs-table": true },
386
- external_react_default().createElement("table", { ref: ref, "data-fs-table-content": true, "data-fs-table-variant": variant, "data-testid": testId, ...otherProps }, children)));
387
- });
388
- /* harmony default export */ const Table_Table = (Table);
389
- //# sourceMappingURL=Table.js.map
390
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/TableBody.js
391
-
392
- const TableBody = (0,external_react_.forwardRef)(function TableBody({ children, testId = 'fs-table-body', ...otherProps }, ref) {
393
- return (external_react_default().createElement("tbody", { ref: ref, "data-testid": testId, "data-fs-table-body": true, ...otherProps }, children));
394
- });
395
- /* harmony default export */ const Table_TableBody = (TableBody);
396
- //# sourceMappingURL=TableBody.js.map
397
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/TableRow.js
398
-
399
- const TableRow = (0,external_react_.forwardRef)(function TableRow({ children, testId = 'fs-table-row', ...otherProps }, ref) {
400
- return (external_react_default().createElement("tr", { ref: ref, "data-fs-table-row": true, "data-testid": testId, ...otherProps }, children));
401
- });
402
- /* harmony default export */ const Table_TableRow = (TableRow);
403
- //# sourceMappingURL=TableRow.js.map
404
- ;// CONCATENATED MODULE: ../components/dist/esm/molecules/Table/TableCell.js
405
-
406
- const TableCell = (0,external_react_.forwardRef)(function TableCell({ scope, align, children, variant = 'data', testId = 'fs-table-cell', ...otherProps }, ref) {
407
- const Cell = variant === 'header' ? 'th' : 'td';
408
- 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));
409
- });
410
- /* harmony default export */ const Table_TableCell = (TableCell);
411
- //# sourceMappingURL=TableCell.js.map
412
- ;// CONCATENATED MODULE: ../components/dist/esm/organisms/ShippingSimulation/ShippingSimulation.js
413
-
414
-
415
- 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 }) {
416
- const hasShippingOptions = !!options && options.length > 0;
417
- return (external_react_default().createElement("section", { "data-fs-shipping-simulation": true, "data-fs-shipping-simulation-empty": !hasShippingOptions ? 'true' : 'false', "data-testid": testId, ...otherProps },
418
- external_react_default().createElement("h2", { "data-fs-shipping-simulation-title": true }, title),
419
- 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 }),
420
- 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,
421
- "I don't know my Postal Code",
422
- external_react_default().createElement(Icon/* default */.Z, { name: "ArrowSquareOut", width: 20, height: 20 })))),
423
- hasShippingOptions && (external_react_default().createElement((external_react_default()).Fragment, null,
424
- external_react_default().createElement("header", { "data-fs-shipping-simulation-header": true },
425
- external_react_default().createElement("h3", { "data-fs-shipping-simulation-subtitle": true }, optionsLabel),
426
- external_react_default().createElement("p", { "data-fs-shipping-simulation-location": true }, location)),
427
- external_react_default().createElement(Table_Table, null,
428
- external_react_default().createElement(Table_TableBody, null, options.map((option) => (external_react_default().createElement(Table_TableRow, { key: option.carrier },
429
- external_react_default().createElement(Table_TableCell, { align: "left" }, option.carrier),
430
- external_react_default().createElement(Table_TableCell, null, option.localizedEstimates),
431
- external_react_default().createElement(Table_TableCell, { align: "right" }, option.price && (external_react_default().createElement(Price/* default */.Z, { formatter: formatter, value: option.price, SRText: "price" }))))))))))));
432
- }
433
- /* harmony default export */ const ShippingSimulation_ShippingSimulation = (ShippingSimulation);
434
- //# sourceMappingURL=ShippingSimulation.js.map
435
- // EXTERNAL MODULE: external "react-intersection-observer"
436
- var external_react_intersection_observer_ = __webpack_require__(9785);
437
- // EXTERNAL MODULE: ../components/dist/esm/molecules/IconButton/IconButton.js
438
- var IconButton = __webpack_require__(7041);
439
- ;// CONCATENATED MODULE: ../components/dist/esm/organisms/ImageGallery/ImageGallerySelector.js
440
-
441
-
442
-
443
- const SCROLL_MARGIN_VALUE = 400;
444
- const moveScroll = (container, value) => {
445
- if (container) {
446
- if (container.scrollHeight > container.clientHeight) {
447
- // TODO: Temporary workaround for scroll-behavior with scrollTop – Safari 15.4) https://developer.apple.com/forums/thread/703294
448
- container.style.overflow = 'auto';
449
- window.requestAnimationFrame(() => container.scrollTo({ top: value, behavior: 'smooth' }));
450
- setTimeout(() => (container.style.overflow = 'hidden'), 2000);
451
- }
452
- else {
453
- container.scrollLeft += value;
454
- }
455
- }
456
- };
457
- const hasScroll = (container) => {
458
- if (container) {
459
- return (container.scrollHeight > container.clientHeight ||
460
- container.scrollWidth > container.clientWidth);
461
- }
462
- return false;
463
- };
464
- 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', }) {
465
- const elementsRef = (0,external_react_.useRef)(null);
466
- const elementHasScroll = hasScroll(elementsRef.current);
467
- const [firstImageInView, setFirstImageInView] = (0,external_react_.useState)(true);
468
- const [lastImageInView, setLastImageInView] = (0,external_react_.useState)(true);
469
- const inViewChange = (0,external_react_.useCallback)((idx, inView) => {
470
- idx === 0 && setFirstImageInView(inView);
471
- idx === images.length - 1 && setLastImageInView(inView);
472
- }, [images.length]);
473
- return (external_react_default().createElement("section", { "data-fs-image-gallery-selector": true, "data-testid": testId, "aria-label": ariaLabel },
474
- elementHasScroll && !firstImageInView && (external_react_default().createElement("div", { "data-fs-image-gallery-selector-control": true },
475
- 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) }))),
476
- external_react_default().createElement("div", { "data-fs-image-gallery-selector-elements": true, ref: elementsRef }, images.map((image, idx) => {
477
- return (external_react_default().createElement(external_react_intersection_observer_.InView, { key: idx, onChange: (inView) => inViewChange(idx, inView) },
478
- 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' },
479
- external_react_default().createElement(ImageComponent, { url: image.url ?? '', loading: idx === 0 ? 'eager' : 'lazy', alternateName: image.alternateName ?? '' }))));
480
- })),
481
- elementHasScroll && !lastImageInView && (external_react_default().createElement("div", { "data-fs-image-gallery-selector-control": true },
482
- 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) })))));
483
- }
484
- /* harmony default export */ const ImageGallery_ImageGallerySelector = (ImageGallerySelector);
485
- //# sourceMappingURL=ImageGallerySelector.js.map
486
- ;// CONCATENATED MODULE: ../components/dist/esm/organisms/ImageGallery/ImageGallery.js
487
-
488
-
489
- const ImageGallery = (0,external_react_.forwardRef)(function ImageGallery({ images, children, ImageComponent, selectedImageIdx, setSelectedImageIdx, testId = 'fs-image-gallery', ...otherProps }, ref) {
490
- const hasSelector = images.length > 1;
491
- return (external_react_default().createElement("section", { ref: ref, "data-fs-image-gallery": hasSelector ? 'with-selector' : 'without-selector', "data-testid": testId, ...otherProps },
492
- children,
493
- hasSelector && (external_react_default().createElement(ImageGallery_ImageGallerySelector, { images: images, onSelect: setSelectedImageIdx, currentImageIdx: selectedImageIdx, ImageComponent: ImageComponent }))));
494
- });
495
- /* harmony default export */ const ImageGallery_ImageGallery = (ImageGallery);
496
- //# sourceMappingURL=ImageGallery.js.map
497
- ;// CONCATENATED MODULE: ../components/dist/esm/organisms/ImageGallery/ImageGalleryViewer.js
498
-
499
- const ImageGalleryViewer = ({ children, }) => {
500
- return external_react_default().createElement((external_react_default()).Fragment, null, children);
501
- };
502
- /* harmony default export */ const ImageGallery_ImageGalleryViewer = (ImageGalleryViewer);
503
- //# sourceMappingURL=ImageGalleryViewer.js.map
504
- // EXTERNAL MODULE: external "next/router"
505
- var router_ = __webpack_require__(1853);
506
- ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/ImageGallery.tsx
507
- const _excluded = ["images"];
508
-
509
- 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; }
510
-
511
- 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; }
512
-
513
- 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; }
514
-
515
- 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; }
516
-
517
- 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; }
518
-
519
-
520
-
521
-
522
-
523
-
524
- const ImageComponent = ({
525
- url,
526
- alternateName
527
- }) => {
528
- return /*#__PURE__*/jsx_runtime_.jsx(__experimentalImageGalleryImage.Component, {
529
- src: url,
530
- alt: alternateName,
531
- width: 68,
532
- height: 68
533
- });
534
- };
535
-
536
- const ImageGallery_ImageGallery_ImageGallery = _ref => {
537
- let {
538
- images
539
- } = _ref,
540
- otherProps = _objectWithoutProperties(_ref, _excluded);
541
-
542
- const {
543
- 0: selectedImageIdx,
544
- 1: setSelectedImageIdx
545
- } = (0,external_react_.useState)(0);
546
- const currentImage = images[selectedImageIdx] ?? images[0];
547
- const dynamicRoute = (0,router_.useRouter)().asPath;
548
- (0,external_react_.useEffect)(() => setSelectedImageIdx(0), [dynamicRoute]);
549
- return /*#__PURE__*/jsx_runtime_.jsx(Overrides_ImageGallery.Component, _objectSpread(_objectSpread(_objectSpread({}, Overrides_ImageGallery.props), {}, {
550
- images: images,
551
- ImageComponent: ImageComponent,
552
- selectedImageIdx: selectedImageIdx,
553
- setSelectedImageIdx: setSelectedImageIdx
554
- }, otherProps), {}, {
555
- children: /*#__PURE__*/jsx_runtime_.jsx(Overrides_ImageGalleryViewer.Component, _objectSpread(_objectSpread({}, Overrides_ImageGalleryViewer.props), {}, {
556
- children: /*#__PURE__*/jsx_runtime_.jsx(__experimentalImageGalleryImage.Component, _objectSpread(_objectSpread({
557
- sizes: "(max-width: 360px) 50vw, (max-width: 768px) 90vw, 50vw",
558
- width: 691,
559
- height: 691 * (3 / 4),
560
- loading: "eager"
561
- }, __experimentalImageGalleryImage.props), {}, {
562
- src: currentImage.url,
563
- alt: currentImage.alternateName
564
- }))
565
- }))
566
- }));
567
- };
568
-
569
- /* harmony default export */ const ui_ImageGallery_ImageGallery = (ImageGallery_ImageGallery_ImageGallery);
570
- // EXTERNAL MODULE: ./src/sdk/graphql/request.ts
571
- var request = __webpack_require__(180);
572
- ;// CONCATENATED MODULE: ./src/sdk/shipping/index.ts
573
-
574
- const query = "ClientShippingSimulationQuery";
575
- const getShippingSimulation = async ({
576
- items,
577
- postalCode,
578
- country
579
- }) => {
580
- const data = await (0,request/* request */.W)(query, {
581
- items,
582
- postalCode,
583
- country
584
- });
585
- return data;
586
- };
587
- /* harmony default export */ const shipping = (getShippingSimulation);
588
- ;// CONCATENATED MODULE: ./src/sdk/shipping/useShippingSimulation.ts
589
- 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; }
590
-
591
- 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; }
592
-
593
- 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; }
594
-
595
-
596
-
597
-
598
-
599
- const createEmptySimulation = () => ({
600
- input: {
601
- postalCode: '',
602
- displayClearButton: false,
603
- errorMessage: ''
604
- },
605
- shippingSimulation: undefined
606
- });
607
-
608
- const reducer = (state, action) => {
609
- const {
610
- type
611
- } = action;
612
-
613
- switch (type) {
614
- case 'clear':
615
- {
616
- return createEmptySimulation();
617
- }
618
-
619
- case 'update':
620
- {
621
- const {
622
- payload
623
- } = action;
624
- return {
625
- input: useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state.input), payload.input),
626
- shippingSimulation: useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state.shippingSimulation), payload.shippingSimulation)
627
- };
628
- }
629
-
630
- case 'onInput':
631
- {
632
- const {
633
- payload
634
- } = action;
635
- return useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state), {}, {
636
- input: useShippingSimulation_objectSpread({}, payload)
637
- });
638
- }
639
-
640
- case 'onError':
641
- {
642
- const {
643
- payload
644
- } = action;
645
- return useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state), {}, {
646
- input: useShippingSimulation_objectSpread(useShippingSimulation_objectSpread({}, state.input), payload)
647
- });
648
- }
649
-
650
- default:
651
- throw new Error(`Action ${type} not implemented`);
652
- }
653
- };
654
-
655
- const useShippingSimulation = shippingItem => {
656
- const {
657
- 0: {
658
- input,
659
- shippingSimulation
660
- },
661
- 1: dispatch
662
- } = (0,external_react_.useReducer)(reducer, null, createEmptySimulation);
663
- const {
664
- country,
665
- postalCode: sessionPostalCode
666
- } = (0,session/* useSession */.kP)();
667
- const {
668
- postalCode: shippingPostalCode
669
- } = input;
670
- const shippingPostalCodeRef = (0,external_react_.useRef)(shippingPostalCode);
671
- (0,external_react_.useEffect)(() => {
672
- const shouldFetch = sessionPostalCode && !shippingPostalCodeRef.current;
673
-
674
- if (!shouldFetch) {
675
- return;
676
- } // Use sessionPostalCode if there is no shippingPostalCode
677
-
678
-
679
- async function fetchShipping() {
680
- const data = await shipping({
681
- country,
682
- postalCode: sessionPostalCode ?? '',
683
- items: [shippingItem]
684
- });
685
- const shippingSimulation = data.shipping;
686
- dispatch({
687
- type: 'update',
688
- payload: {
689
- input: {
690
- postalCode: sessionPostalCode ?? '',
691
- displayClearButton: true,
692
- errorMessage: ''
693
- },
694
- shippingSimulation
695
- }
696
- });
697
- }
698
-
699
- fetchShipping();
700
- }, [country, sessionPostalCode, shippingItem]);
701
- const handleSubmit = (0,external_react_.useCallback)(async () => {
702
- try {
703
- const data = await shipping({
704
- country,
705
- postalCode: shippingPostalCode ?? '',
706
- items: [shippingItem]
707
- });
708
- const shippingSimulation = data.shipping;
709
- dispatch({
710
- type: 'update',
711
- payload: {
712
- input: {
713
- displayClearButton: true,
714
- errorMessage: ''
715
- },
716
- shippingSimulation
717
- }
718
- });
719
- } catch (error) {
720
- dispatch({
721
- type: 'onError',
722
- payload: {
723
- displayClearButton: true,
724
- errorMessage: 'You entered an invalid Postal Code'
725
- }
726
- });
727
- }
728
- }, [country, shippingItem, shippingPostalCode]);
729
- const handleOnInput = (0,external_react_.useCallback)(e => {
730
- const currentValue = e.currentTarget.value;
731
-
732
- if (currentValue) {
733
- dispatch({
734
- type: 'onInput',
735
- payload: {
736
- postalCode: currentValue,
737
- displayClearButton: false,
738
- errorMessage: ''
739
- }
740
- });
741
- } else {
742
- dispatch({
743
- type: 'clear'
744
- });
745
- }
746
- }, []);
747
- return {
748
- input,
749
- shippingSimulation,
750
- handleOnClear: () => {
751
- dispatch({
752
- type: 'clear'
753
- });
754
- },
755
- handleSubmit,
756
- handleOnInput
757
- };
758
- };
759
- ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/ShippingSimulation.tsx
760
- const ShippingSimulation_excluded = ["productShippingInfo", "formatter", "inputLabel", "title", "idkPostalCodeLinkProps"];
761
-
762
- 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; }
763
-
764
- 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; }
765
-
766
- 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; }
767
-
768
- 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; }
769
-
770
- 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; }
771
-
772
-
773
-
774
-
775
- function ShippingSimulation_ShippingSimulation_ShippingSimulation(_ref) {
776
- let {
777
- productShippingInfo,
778
- formatter,
779
- inputLabel,
780
- title,
781
- idkPostalCodeLinkProps
782
- } = _ref,
783
- otherProps = ShippingSimulation_objectWithoutProperties(_ref, ShippingSimulation_excluded);
784
102
 
785
- const {
786
- input,
787
- shippingSimulation,
788
- handleSubmit,
789
- handleOnInput,
790
- handleOnClear
791
- } = useShippingSimulation(productShippingInfo);
792
- const {
793
- postalCode,
794
- displayClearButton,
795
- errorMessage
796
- } = input;
797
- const location = [shippingSimulation?.address?.neighborhood, shippingSimulation?.address?.city].filter(Boolean).join(' / ') ?? '';
798
- const options = shippingSimulation?.logisticsInfo?.[0]?.slas ?? [];
799
- return /*#__PURE__*/jsx_runtime_.jsx(Overrides_ShippingSimulation.Component, ShippingSimulation_objectSpread({
800
- formatter: formatter,
801
- onInput: handleOnInput,
802
- onSubmit: handleSubmit,
803
- onClear: handleOnClear,
804
- location: location,
805
- options: options,
806
- address: shippingSimulation?.address,
807
- displayClearButton: displayClearButton,
808
- errorMessage: errorMessage,
809
- postalCode: postalCode,
810
- inputLabel: inputLabel,
811
- title: title,
812
- idkPostalCodeLinkProps: idkPostalCodeLinkProps
813
- }, otherProps));
814
- }
815
- ;// CONCATENATED MODULE: ./src/components/product/NotAvailableButton/NotAvailableButton.tsx
816
- // TODO: Remove this component when <OutOfStock /> is ready to use
817
103
 
104
+ /**
105
+ * This component exists to support overrides 1.0
106
+ *
107
+ * This allows users to override the default ProductDetails section present in the Headless CMS
108
+ */
109
+ const OverriddenDefaultProductDetails = (0,src_sdk_overrides_getOverriddenSection__WEBPACK_IMPORTED_MODULE_0__/* .getOverriddenSection */ .v)(src_customizations_src_components_overrides_ProductDetails__WEBPACK_IMPORTED_MODULE_1__/* .override */ .K);
110
+ __webpack_async_result__();
111
+ } catch(e) { __webpack_async_result__(e); } });
818
112
 
113
+ /***/ }),
819
114
 
820
- function NotAvailableButton({
821
- children
822
- }) {
823
- return /*#__PURE__*/jsx_runtime_.jsx(Button/* default */.Z, {
824
- variant: "primary",
825
- disabled: true,
826
- "data-fs-buy-button": true,
827
- children: children
828
- });
829
- }
115
+ /***/ 2925:
116
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
830
117
 
831
- /* harmony default export */ const NotAvailableButton_NotAvailableButton = (NotAvailableButton);
832
- // EXTERNAL MODULE: ./src/sdk/overrides/overrides.ts
833
- var overrides = __webpack_require__(7506);
834
- ;// CONCATENATED MODULE: ./src/customizations/src/components/overrides/ProductDetails.tsx
118
+ "use strict";
119
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
120
+ /* harmony export */ "K": () => (/* binding */ override)
121
+ /* harmony export */ });
835
122
  // This is an example of how it can be used on the starter.
836
123
  const SECTION = 'ProductDetails';
837
124
  const override = {
838
125
  section: SECTION
839
126
  };
840
127
 
841
- ;// CONCATENATED MODULE: ./src/components/sections/ProductDetails/Overrides.tsx
842
-
843
-
844
-
845
-
846
-
847
-
848
-
849
- const {
850
- ProductTitle: Overrides_ProductTitle,
851
- DiscountBadge: Overrides_DiscountBadge,
852
- BuyButton: Overrides_BuyButton,
853
- Icon: Overrides_Icon,
854
- Price: Overrides_Price,
855
- QuantitySelector: Overrides_QuantitySelector,
856
- SkuSelector: Overrides_SkuSelector,
857
- ShippingSimulation: Overrides_ShippingSimulation,
858
- ImageGallery: Overrides_ImageGallery,
859
- ImageGalleryViewer: Overrides_ImageGalleryViewer,
860
- __experimentalImageGalleryImage,
861
- __experimentalImageGallery,
862
- __experimentalShippingSimulation,
863
- __experimentalNotAvailableButton
864
- } = (0,overrides/* getSectionOverrides */.f)({
865
- ProductTitle: ProductTitle_ProductTitle,
866
- DiscountBadge: DiscountBadge/* default */.Z,
867
- BuyButton: BuyButton_BuyButton,
868
- Icon: Icon/* default */.Z,
869
- Price: Price/* default */.Z,
870
- QuantitySelector: QuantitySelector/* default */.Z,
871
- SkuSelector: SkuSelector_SkuSelector,
872
- ShippingSimulation: ShippingSimulation_ShippingSimulation,
873
- ImageGallery: ImageGallery_ImageGallery,
874
- ImageGalleryViewer: ImageGallery_ImageGalleryViewer,
875
- __experimentalImageGalleryImage: Image/* default */.Z,
876
- __experimentalImageGallery: ui_ImageGallery_ImageGallery,
877
- __experimentalShippingSimulation: ShippingSimulation_ShippingSimulation_ShippingSimulation,
878
- __experimentalNotAvailableButton: NotAvailableButton_NotAvailableButton
879
- }, override);
880
-
881
- ;// CONCATENATED MODULE: ./src/components/ui/SkuSelector/Selectors.tsx
882
- const Selectors_excluded = ["src", "alt"],
883
- _excluded2 = ["slugsMap", "activeVariations", "availableVariations"];
884
-
885
- function Selectors_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; }
886
-
887
- function Selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? Selectors_ownKeys(Object(source), !0).forEach(function (key) { Selectors_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : Selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
888
-
889
- function Selectors_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; }
890
-
891
- function Selectors_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Selectors_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; }
892
-
893
- function Selectors_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; }
894
-
895
-
896
-
897
-
898
-
899
-
900
-
901
- const Selectors_ImageComponent = _ref => {
902
- let {
903
- src,
904
- alt
905
- } = _ref,
906
- otherProps = Selectors_objectWithoutProperties(_ref, Selectors_excluded);
907
-
908
- return /*#__PURE__*/jsx_runtime_.jsx(Image/* default */.Z, Selectors_objectSpread({
909
- src: src,
910
- alt: alt,
911
- width: 34,
912
- height: 34
913
- }, otherProps));
914
- };
915
-
916
- function Selectors(_ref2) {
917
- let {
918
- slugsMap,
919
- activeVariations,
920
- availableVariations
921
- } = _ref2,
922
- otherProps = Selectors_objectWithoutProperties(_ref2, _excluded2);
923
-
924
- return /*#__PURE__*/jsx_runtime_.jsx("section", Selectors_objectSpread(Selectors_objectSpread({}, otherProps), {}, {
925
- children: availableVariations && Object.keys(availableVariations).map(skuVariant => /*#__PURE__*/(0,external_react_.createElement)(Overrides_SkuSelector.Component, Selectors_objectSpread(Selectors_objectSpread({
926
- ImageComponent: Selectors_ImageComponent
927
- }, Overrides_SkuSelector.props), {}, {
928
- key: skuVariant,
929
- skuPropertyName: skuVariant,
930
- availableVariations: availableVariations,
931
- activeVariations: activeVariations,
932
- slugsMap: slugsMap,
933
- linkProps: Selectors_objectSpread(Selectors_objectSpread({}, Overrides_SkuSelector.props.linkProps ?? {}), {}, {
934
- as: Overrides_SkuSelector.props.linkProps?.as ?? (link_default()),
935
- legacyBehavior: Overrides_SkuSelector.props.linkProps?.legacyBehavior ?? false
936
- })
937
- })))
938
- }));
939
- }
940
-
941
- /* harmony default export */ const SkuSelector_Selectors = (Selectors);
942
- ;// CONCATENATED MODULE: ./src/components/ui/ProductDetails/AddToCartLoadingSkeleton.tsx
943
-
944
-
945
- function AddToCartLoadingSkeleton() {
946
- return (
947
- /*#__PURE__*/
948
- // Generated via https://skeletonreact.com/.
949
- (0,jsx_runtime_.jsxs)("svg", {
950
- role: "img",
951
- width: "100%",
952
- height: "48",
953
- "aria-labelledby": "loading-aria",
954
- viewBox: "0 0 112 48",
955
- preserveAspectRatio: "none",
956
- children: [/*#__PURE__*/jsx_runtime_.jsx("title", {
957
- id: "loading-aria",
958
- children: "Loading..."
959
- }), /*#__PURE__*/jsx_runtime_.jsx("rect", {
960
- x: "0",
961
- y: "0",
962
- width: "100%",
963
- height: "100%",
964
- clipPath: "url(#clip-path)",
965
- style: {
966
- fill: 'url("#fill")'
967
- }
968
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("defs", {
969
- children: [/*#__PURE__*/jsx_runtime_.jsx("clipPath", {
970
- id: "clip-path",
971
- children: /*#__PURE__*/jsx_runtime_.jsx("rect", {
972
- x: "0",
973
- y: "0",
974
- rx: "2",
975
- ry: "2",
976
- width: "112",
977
- height: "48"
978
- })
979
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("linearGradient", {
980
- id: "fill",
981
- children: [/*#__PURE__*/jsx_runtime_.jsx("stop", {
982
- offset: "0.599964",
983
- stopColor: "#f3f3f3",
984
- stopOpacity: "1",
985
- children: /*#__PURE__*/jsx_runtime_.jsx("animate", {
986
- attributeName: "offset",
987
- values: "-2; -2; 1",
988
- keyTimes: "0; 0.25; 1",
989
- dur: "2s",
990
- repeatCount: "indefinite"
991
- })
992
- }), /*#__PURE__*/jsx_runtime_.jsx("stop", {
993
- offset: "1.59996",
994
- stopColor: "#ecebeb",
995
- stopOpacity: "1",
996
- children: /*#__PURE__*/jsx_runtime_.jsx("animate", {
997
- attributeName: "offset",
998
- values: "-1; -1; 2",
999
- keyTimes: "0; 0.25; 1",
1000
- dur: "2s",
1001
- repeatCount: "indefinite"
1002
- })
1003
- }), /*#__PURE__*/jsx_runtime_.jsx("stop", {
1004
- offset: "2.59996",
1005
- stopColor: "#f3f3f3",
1006
- stopOpacity: "1",
1007
- children: /*#__PURE__*/jsx_runtime_.jsx("animate", {
1008
- attributeName: "offset",
1009
- values: "0; 0; 3",
1010
- keyTimes: "0; 0.25; 1",
1011
- dur: "2s",
1012
- repeatCount: "indefinite"
1013
- })
1014
- })]
1015
- })]
1016
- })]
1017
- })
1018
- );
1019
- }
1020
- ;// CONCATENATED MODULE: ./src/components/ui/ProductDetails/ProductDetailsSettings.tsx
1021
- 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; }
1022
-
1023
- 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; }
1024
-
1025
- 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; }
1026
-
1027
-
1028
-
1029
-
1030
-
1031
-
1032
-
1033
-
1034
-
1035
-
1036
-
1037
- function ProductDetailsSettings({
1038
- product,
1039
- buyButtonTitle,
1040
- isValidating,
1041
- quantity,
1042
- setQuantity,
1043
- buyButtonIcon: {
1044
- icon: buyButtonIconName = Overrides_Icon.props.name,
1045
- alt: buyButtonIconAlt = Overrides_Icon.props["aria-label"]
1046
- },
1047
- notAvailableButtonTitle
1048
- }) {
1049
- const {
1050
- id,
1051
- sku,
1052
- gtin,
1053
- name: variantName,
1054
- brand,
1055
- isVariantOf,
1056
- isVariantOf: {
1057
- skuVariants
1058
- },
1059
- image: productImages,
1060
- additionalProperty,
1061
- offers: {
1062
- lowPrice,
1063
- offers: [{
1064
- availability,
1065
- price,
1066
- listPrice,
1067
- seller
1068
- }]
1069
- }
1070
- } = product;
1071
- const buyProps = useBuyButton({
1072
- id,
1073
- price,
1074
- listPrice,
1075
- seller,
1076
- quantity,
1077
- itemOffered: {
1078
- sku,
1079
- name: variantName,
1080
- gtin,
1081
- image: productImages,
1082
- brand,
1083
- isVariantOf,
1084
- additionalProperty
1085
- }
1086
- });
1087
- const outOfStock = (0,external_react_.useMemo)(() => availability === 'https://schema.org/OutOfStock', [availability]);
1088
- const shouldShowDiscountedPrice = (0,external_react_.useMemo)(() => lowPrice !== listPrice, [lowPrice, listPrice]);
1089
-
1090
- const AddToCartButton = () => {
1091
- return outOfStock ?
1092
- /*#__PURE__*/
1093
- // TODO: Adds <OutOfStock /> when component is ready to use
1094
- jsx_runtime_.jsx(__experimentalNotAvailableButton.Component, {
1095
- children: notAvailableButtonTitle
1096
- }) : /*#__PURE__*/jsx_runtime_.jsx(Overrides_BuyButton.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({}, Overrides_BuyButton.props), {}, {
1097
- icon: /*#__PURE__*/jsx_runtime_.jsx(Overrides_Icon.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({}, Overrides_Icon.props), {}, {
1098
- name: buyButtonIconName,
1099
- "aria-label": buyButtonIconAlt
1100
- }))
1101
- }, buyProps), {}, {
1102
- children: buyButtonTitle || 'Add to Cart'
1103
- }));
1104
- };
1105
-
1106
- return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
1107
- children: [!outOfStock && /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
1108
- "data-fs-product-details-values": true,
1109
- children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
1110
- "data-fs-product-details-prices": true,
1111
- children: shouldShowDiscountedPrice ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
1112
- children: [/*#__PURE__*/jsx_runtime_.jsx(Overrides_Price.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
1113
- formatter: useFormattedPrice/* useFormattedPrice */.P,
1114
- testId: "list-price",
1115
- variant: "listing",
1116
- SRText: "Original price:"
1117
- }, Overrides_Price.props), {}, {
1118
- // Dynamic props shouldn't be overridable
1119
- // This decision can be reviewed later if needed
1120
- value: listPrice,
1121
- "data-value": listPrice
1122
- })), /*#__PURE__*/jsx_runtime_.jsx(Overrides_Price.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
1123
- formatter: useFormattedPrice/* useFormattedPrice */.P,
1124
- testId: "price",
1125
- variant: "spot",
1126
- className: "text__lead",
1127
- SRText: "Sale Price:"
1128
- }, Overrides_Price.props), {}, {
1129
- // Dynamic props shouldn't be overridable
1130
- // This decision can be reviewed later if needed
1131
- value: lowPrice,
1132
- "data-value": lowPrice
1133
- }))]
1134
- }) : /*#__PURE__*/jsx_runtime_.jsx(Overrides_Price.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
1135
- formatter: useFormattedPrice/* useFormattedPrice */.P,
1136
- testId: "list-price",
1137
- variant: "spot",
1138
- className: "text__lead",
1139
- SRText: "Original price:"
1140
- }, Overrides_Price.props), {}, {
1141
- // Dynamic props shouldn't be overridable
1142
- // This decision can be reviewed later if needed
1143
- value: lowPrice,
1144
- "data-value": lowPrice
1145
- }))
1146
- }), /*#__PURE__*/jsx_runtime_.jsx(Overrides_QuantitySelector.Component, ProductDetailsSettings_objectSpread(ProductDetailsSettings_objectSpread({
1147
- min: 1,
1148
- max: 10
1149
- }, Overrides_QuantitySelector.props), {}, {
1150
- // Dynamic props shouldn't be overridable
1151
- // This decision can be reviewed later if needed
1152
- onChange: setQuantity
1153
- }))]
1154
- }), skuVariants && /*#__PURE__*/jsx_runtime_.jsx(SkuSelector_Selectors, {
1155
- slugsMap: skuVariants.slugsMap,
1156
- availableVariations: skuVariants.availableVariations,
1157
- activeVariations: skuVariants.activeVariations,
1158
- "data-fs-product-details-selectors": true
1159
- }), isValidating ?
1160
- /*#__PURE__*/
1161
-
1162
- /* NOTE:
1163
- A loading skeleton had to be used to avoid a Lighthouse's
1164
- non-composited animation violation due to the button transitioning its
1165
- background color when changing from its initial disabled to active state.
1166
- See full explanation on commit https://git.io/JyXV5. */
1167
- jsx_runtime_.jsx(AddToCartLoadingSkeleton, {}) : /*#__PURE__*/jsx_runtime_.jsx(AddToCartButton, {})]
1168
- });
1169
- }
1170
-
1171
- /* harmony default export */ const ProductDetails_ProductDetailsSettings = (ProductDetailsSettings);
1172
- // EXTERNAL MODULE: ./src/components/sections/ProductDetails/section.module.scss
1173
- var section_module = __webpack_require__(9034);
1174
- var section_module_default = /*#__PURE__*/__webpack_require__.n(section_module);
1175
- // EXTERNAL MODULE: ./src/sdk/overrides/PageProvider.tsx
1176
- var PageProvider = __webpack_require__(5953);
1177
- ;// CONCATENATED MODULE: ./src/components/sections/ProductDetails/ProductDetails.tsx
1178
- 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; }
1179
-
1180
- 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; }
1181
-
1182
- 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; }
1183
-
1184
-
1185
-
1186
-
1187
-
1188
-
1189
-
1190
-
1191
-
1192
-
1193
-
1194
-
1195
-
1196
-
1197
- function ProductDetails({
1198
- productTitle: {
1199
- refNumber: showRefNumber,
1200
- discountBadge: {
1201
- showDiscountBadge,
1202
- size: discountBadgeSize = Overrides_DiscountBadge.props.size
1203
- }
1204
- },
1205
- buyButton: {
1206
- icon: buyButtonIcon,
1207
- title: buyButtonTitle
1208
- },
1209
- shippingSimulator: {
1210
- title: shippingSimulatorTitle = __experimentalShippingSimulation.props.title,
1211
- inputLabel: shippingSimulatorInputLabel = __experimentalShippingSimulation.props.inputLabel,
1212
- shippingOptionsTableTitle: shippingSimulatorOptionsTableTitle = __experimentalShippingSimulation.props.optionsLabel,
1213
- link: {
1214
- to: shippingSimulatorLinkUrl = __experimentalShippingSimulation.props.idkPostalCodeLinkProps?.href,
1215
- text: shippingSimulatorLinkText = __experimentalShippingSimulation.props.idkPostalCodeLinkProps?.children
1216
- }
1217
- },
1218
- productDescription: {
1219
- title: productDescriptionDetailsTitle,
1220
- initiallyExpanded: productDescriptionInitiallyExpanded,
1221
- displayDescription: shouldDisplayProductDescription
1222
- },
1223
- notAvailableButton: {
1224
- title: notAvailableButtonTitle = __experimentalNotAvailableButton.props.title
1225
- }
1226
- }) {
1227
- const {
1228
- currency
1229
- } = (0,session/* useSession */.kP)();
1230
- const {
1231
- 0: quantity,
1232
- 1: setQuantity
1233
- } = (0,external_react_.useState)(1);
1234
- const context = (0,PageProvider/* usePDP */.al)();
1235
- const {
1236
- product,
1237
- isValidating
1238
- } = context?.data;
1239
-
1240
- if (!product) {
1241
- throw new Error('NotFound');
1242
- }
1243
-
1244
- const {
1245
- id,
1246
- sku,
1247
- gtin,
1248
- name: variantName,
1249
- brand,
1250
- isVariantOf,
1251
- description,
1252
- isVariantOf: {
1253
- name,
1254
- productGroupID: productId
1255
- },
1256
- image: productImages,
1257
- offers: {
1258
- offers: [{
1259
- availability,
1260
- price,
1261
- listPrice,
1262
- seller
1263
- }],
1264
- lowPrice
1265
- }
1266
- } = product;
1267
- (0,external_react_.useEffect)(() => {
1268
- (0,sendAnalyticsEvent/* sendAnalyticsEvent */._)({
1269
- name: 'view_item',
1270
- params: {
1271
- currency: currency.code,
1272
- value: price,
1273
- items: [{
1274
- item_id: isVariantOf.productGroupID,
1275
- item_name: isVariantOf.name,
1276
- item_brand: brand.name,
1277
- item_variant: sku,
1278
- price,
1279
- discount: listPrice - price,
1280
- currency: currency.code,
1281
- item_variant_name: variantName,
1282
- product_reference_id: gtin
1283
- }]
1284
- }
1285
- });
1286
- }, [isVariantOf.productGroupID, isVariantOf.name, brand.name, sku, price, listPrice, currency.code, variantName, gtin]);
1287
- const outOfStock = (0,external_react_.useMemo)(() => availability === 'https://schema.org/OutOfStock', [availability]);
1288
- return /*#__PURE__*/jsx_runtime_.jsx(Section/* default */.Z, {
1289
- className: `${(section_module_default()).section} section-product-details`,
1290
- children: /*#__PURE__*/jsx_runtime_.jsx("section", {
1291
- "data-fs-product-details": true,
1292
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
1293
- "data-fs-product-details-body": true,
1294
- "data-fs-content": "product-details",
1295
- children: [/*#__PURE__*/jsx_runtime_.jsx("header", {
1296
- "data-fs-product-details-title": true,
1297
- "data-fs-product-details-section": true,
1298
- children: /*#__PURE__*/jsx_runtime_.jsx(Overrides_ProductTitle.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({
1299
- // TODO: We should review this prop. There's now way to override the title and use the dynamic name value.
1300
- // Maybe passing a ProductTitleHeader component as a prop would be better, as it would be overridable.
1301
- // 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.
1302
- title: /*#__PURE__*/jsx_runtime_.jsx("h1", {
1303
- children: name
1304
- })
1305
- }, Overrides_ProductTitle.props), {}, {
1306
- label: showDiscountBadge && /*#__PURE__*/jsx_runtime_.jsx(Overrides_DiscountBadge.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({}, Overrides_DiscountBadge.props), {}, {
1307
- size: discountBadgeSize // Dynamic props shouldn't be overridable
1308
- // This decision can be reviewed later if needed
1309
- ,
1310
- listPrice: listPrice,
1311
- spotPrice: lowPrice
1312
- })),
1313
- refNumber: showRefNumber && productId
1314
- }))
1315
- }), /*#__PURE__*/jsx_runtime_.jsx(__experimentalImageGallery.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({
1316
- "data-fs-product-details-gallery": true
1317
- }, __experimentalImageGallery.props), {}, {
1318
- images: productImages
1319
- })), /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
1320
- "data-fs-product-details-info": true,
1321
- children: [/*#__PURE__*/jsx_runtime_.jsx("section", {
1322
- "data-fs-product-details-settings": true,
1323
- "data-fs-product-details-section": true,
1324
- children: /*#__PURE__*/jsx_runtime_.jsx(ProductDetails_ProductDetailsSettings, {
1325
- product: product,
1326
- isValidating: isValidating,
1327
- buyButtonTitle: buyButtonTitle,
1328
- quantity: quantity,
1329
- setQuantity: setQuantity,
1330
- buyButtonIcon: buyButtonIcon,
1331
- notAvailableButtonTitle: notAvailableButtonTitle
1332
- })
1333
- }), !outOfStock && /*#__PURE__*/jsx_runtime_.jsx(__experimentalShippingSimulation.Component, ProductDetails_objectSpread(ProductDetails_objectSpread({
1334
- "data-fs-product-details-section": true,
1335
- "data-fs-product-details-shipping": true,
1336
- formatter: useFormattedPrice/* useFormattedPrice */.P
1337
- }, __experimentalShippingSimulation.props), {}, {
1338
- idkPostalCodeLinkProps: ProductDetails_objectSpread(ProductDetails_objectSpread({}, __experimentalShippingSimulation.props.idkPostalCodeLinkProps), {}, {
1339
- href: shippingSimulatorLinkUrl,
1340
- children: shippingSimulatorLinkText
1341
- }),
1342
- productShippingInfo: {
1343
- id,
1344
- quantity,
1345
- seller: seller.identifier
1346
- },
1347
- title: shippingSimulatorTitle,
1348
- inputLabel: shippingSimulatorInputLabel,
1349
- optionsLabel: shippingSimulatorOptionsTableTitle
1350
- }))]
1351
- }), shouldDisplayProductDescription && /*#__PURE__*/jsx_runtime_.jsx(ProductDescription_ProductDescription, {
1352
- initiallyExpanded: productDescriptionInitiallyExpanded,
1353
- descriptionData: [{
1354
- title: productDescriptionDetailsTitle,
1355
- content: description
1356
- }]
1357
- })]
1358
- })
1359
- })
1360
- });
1361
- }
1362
-
1363
- const fragment = "unknown";
1364
- /* harmony default export */ const ProductDetails_ProductDetails = (ProductDetails);
1365
128
 
1366
129
  /***/ }),
1367
130
 
@@ -1386,7 +149,7 @@ __webpack_require__.r(__webpack_exports__);
1386
149
  /* harmony import */ var src_components_sections_BannerText_OverriddenDefaultBannerText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1481);
1387
150
  /* harmony import */ var src_components_sections_Breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2390);
1388
151
  /* harmony import */ var src_components_sections_CrossSellingShelf_OverriddenDefaultCrossSellingShelf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4474);
1389
- /* harmony import */ var src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2694);
152
+ /* harmony import */ var src_components_sections_ProductDetails_OverriddenDefaultProductDetails__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6458);
1390
153
  /* harmony import */ var src_customizations_src_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3276);
1391
154
  /* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7295);
1392
155
  /* harmony import */ var src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(2541);
@@ -1399,8 +162,8 @@ __webpack_require__.r(__webpack_exports__);
1399
162
  /* harmony import */ var src_sdk_overrides_PageProvider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5953);
1400
163
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(997);
1401
164
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
1402
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_faststore_api__WEBPACK_IMPORTED_MODULE_0__, src_components_sections_CrossSellingShelf_OverriddenDefaultCrossSellingShelf__WEBPACK_IMPORTED_MODULE_6__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_7__, src_components_sections_BannerText_OverriddenDefaultBannerText__WEBPACK_IMPORTED_MODULE_8__, src_sdk_product_useProductQuery__WEBPACK_IMPORTED_MODULE_11__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__, src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_14__, src_server__WEBPACK_IMPORTED_MODULE_15__]);
1403
- ([_faststore_api__WEBPACK_IMPORTED_MODULE_0__, src_components_sections_CrossSellingShelf_OverriddenDefaultCrossSellingShelf__WEBPACK_IMPORTED_MODULE_6__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_7__, src_components_sections_BannerText_OverriddenDefaultBannerText__WEBPACK_IMPORTED_MODULE_8__, src_sdk_product_useProductQuery__WEBPACK_IMPORTED_MODULE_11__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__, src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_14__, src_server__WEBPACK_IMPORTED_MODULE_15__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
165
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_faststore_api__WEBPACK_IMPORTED_MODULE_0__, src_components_sections_ProductDetails_OverriddenDefaultProductDetails__WEBPACK_IMPORTED_MODULE_5__, src_components_sections_CrossSellingShelf_OverriddenDefaultCrossSellingShelf__WEBPACK_IMPORTED_MODULE_6__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_7__, src_components_sections_BannerText_OverriddenDefaultBannerText__WEBPACK_IMPORTED_MODULE_8__, src_sdk_product_useProductQuery__WEBPACK_IMPORTED_MODULE_11__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__, src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_14__, src_server__WEBPACK_IMPORTED_MODULE_15__]);
166
+ ([_faststore_api__WEBPACK_IMPORTED_MODULE_0__, src_components_sections_ProductDetails_OverriddenDefaultProductDetails__WEBPACK_IMPORTED_MODULE_5__, src_components_sections_CrossSellingShelf_OverriddenDefaultCrossSellingShelf__WEBPACK_IMPORTED_MODULE_6__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_7__, src_components_sections_BannerText_OverriddenDefaultBannerText__WEBPACK_IMPORTED_MODULE_8__, src_sdk_product_useProductQuery__WEBPACK_IMPORTED_MODULE_11__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__, src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_14__, src_server__WEBPACK_IMPORTED_MODULE_15__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
1404
167
  const _excluded = ["listPrice"];
1405
168
 
1406
169
  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; }
@@ -1441,7 +204,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
1441
204
 
1442
205
  const COMPONENTS = _objectSpread({
1443
206
  Breadcrumb: src_components_sections_Breadcrumb__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z,
1444
- ProductDetails: src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z,
207
+ ProductDetails: src_components_sections_ProductDetails_OverriddenDefaultProductDetails__WEBPACK_IMPORTED_MODULE_5__/* .OverriddenDefaultProductDetails */ .L,
1445
208
  CrossSellingShelf: src_components_sections_CrossSellingShelf_OverriddenDefaultCrossSellingShelf__WEBPACK_IMPORTED_MODULE_6__/* .OverriddenDefaultCrossSellingShelf */ .Z,
1446
209
  BannerNewsletter: src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z,
1447
210
  BannerText: src_components_sections_BannerText_OverriddenDefaultBannerText__WEBPACK_IMPORTED_MODULE_8__/* .OverriddenDefaultBannerText */ .i
@@ -1667,17 +430,6 @@ module.exports = {
1667
430
  };
1668
431
 
1669
432
 
1670
- /***/ }),
1671
-
1672
- /***/ 9034:
1673
- /***/ ((module) => {
1674
-
1675
- // Exports
1676
- module.exports = {
1677
- "section": "section_section__XsOoR"
1678
- };
1679
-
1680
-
1681
433
  /***/ }),
1682
434
 
1683
435
  /***/ 4691:
@@ -2215,7 +967,7 @@ module.exports = require("crypto");
2215
967
  var __webpack_require__ = require("../../webpack-runtime.js");
2216
968
  __webpack_require__.C(exports);
2217
969
  var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2218
- var __webpack_exports__ = __webpack_require__.X(0, [676,825,404,183,177,74,779,390,796,350,693], () => (__webpack_exec__(5779)));
970
+ var __webpack_exports__ = __webpack_require__.X(0, [676,825,404,183,177,74,390,796,350], () => (__webpack_exec__(5779)));
2219
971
  module.exports = __webpack_exports__;
2220
972
 
2221
973
  })();