@faststore/core 2.0.75-alpha.0 → 2.0.76-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +6 -0
  3. package/package.json +2 -2
  4. package/src/components/cart/CartSidebar/CartSidebar.tsx +5 -1
  5. package/.next/BUILD_ID +0 -1
  6. package/.next/build-manifest.json +0 -103
  7. package/.next/cache/.tsbuildinfo +0 -1
  8. package/.next/cache/config.json +0 -7
  9. package/.next/cache/eslint/.cache_1gneedd +0 -1
  10. package/.next/cache/next-server.js.nft.json +0 -1
  11. package/.next/cache/webpack/client-production/0.pack +0 -0
  12. package/.next/cache/webpack/client-production/index.pack +0 -0
  13. package/.next/cache/webpack/server-production/0.pack +0 -0
  14. package/.next/cache/webpack/server-production/index.pack +0 -0
  15. package/.next/export-marker.json +0 -1
  16. package/.next/images-manifest.json +0 -1
  17. package/.next/next-server.js.nft.json +0 -1
  18. package/.next/package.json +0 -1
  19. package/.next/prerender-manifest.json +0 -1
  20. package/.next/react-loadable-manifest.json +0 -49
  21. package/.next/required-server-files.json +0 -1
  22. package/.next/routes-manifest.json +0 -1
  23. package/.next/server/chunks/104.js +0 -196
  24. package/.next/server/chunks/143.js +0 -106
  25. package/.next/server/chunks/154.js +0 -201
  26. package/.next/server/chunks/183.js +0 -72
  27. package/.next/server/chunks/247.js +0 -61
  28. package/.next/server/chunks/264.js +0 -67
  29. package/.next/server/chunks/280.js +0 -417
  30. package/.next/server/chunks/287.js +0 -79
  31. package/.next/server/chunks/307.js +0 -109
  32. package/.next/server/chunks/312.js +0 -714
  33. package/.next/server/chunks/317.js +0 -126
  34. package/.next/server/chunks/350.js +0 -120
  35. package/.next/server/chunks/371.js +0 -1467
  36. package/.next/server/chunks/377.js +0 -82
  37. package/.next/server/chunks/394.js +0 -3801
  38. package/.next/server/chunks/439.js +0 -175
  39. package/.next/server/chunks/444.js +0 -464
  40. package/.next/server/chunks/465.js +0 -91
  41. package/.next/server/chunks/576.js +0 -72
  42. package/.next/server/chunks/650.js +0 -216
  43. package/.next/server/chunks/664.js +0 -124
  44. package/.next/server/chunks/676.js +0 -32
  45. package/.next/server/chunks/732.js +0 -51
  46. package/.next/server/chunks/746.js +0 -237
  47. package/.next/server/chunks/849.js +0 -665
  48. package/.next/server/chunks/854.js +0 -72
  49. package/.next/server/chunks/859.js +0 -959
  50. package/.next/server/chunks/872.js +0 -378
  51. package/.next/server/chunks/881.js +0 -320
  52. package/.next/server/chunks/898.js +0 -240
  53. package/.next/server/chunks/914.js +0 -96
  54. package/.next/server/chunks/953.js +0 -673
  55. package/.next/server/chunks/98.js +0 -266
  56. package/.next/server/chunks/992.js +0 -562
  57. package/.next/server/chunks/font-manifest.json +0 -1
  58. package/.next/server/font-manifest.json +0 -1
  59. package/.next/server/middleware-build-manifest.js +0 -1
  60. package/.next/server/middleware-manifest.json +0 -6
  61. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  62. package/.next/server/pages/404.js.nft.json +0 -1
  63. package/.next/server/pages/500.js.nft.json +0 -1
  64. package/.next/server/pages/[...slug].js +0 -609
  65. package/.next/server/pages/[...slug].js.nft.json +0 -1
  66. package/.next/server/pages/[slug]/p.js +0 -2560
  67. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  68. package/.next/server/pages/_app.js +0 -2058
  69. package/.next/server/pages/_app.js.nft.json +0 -1
  70. package/.next/server/pages/_document.js +0 -304
  71. package/.next/server/pages/_document.js.nft.json +0 -1
  72. package/.next/server/pages/_error.js +0 -164
  73. package/.next/server/pages/_error.js.nft.json +0 -1
  74. package/.next/server/pages/account.js.nft.json +0 -1
  75. package/.next/server/pages/api/graphql.js +0 -259
  76. package/.next/server/pages/api/graphql.js.nft.json +0 -1
  77. package/.next/server/pages/api/preview.js +0 -118
  78. package/.next/server/pages/api/preview.js.nft.json +0 -1
  79. package/.next/server/pages/checkout.js.nft.json +0 -1
  80. package/.next/server/pages/en-US/404.html +0 -81
  81. package/.next/server/pages/en-US/500.html +0 -81
  82. package/.next/server/pages/en-US/account.html +0 -81
  83. package/.next/server/pages/en-US/checkout.html +0 -81
  84. package/.next/server/pages/en-US/login.html +0 -81
  85. package/.next/server/pages/en-US/s.html +0 -81
  86. package/.next/server/pages/en-US.html +0 -81
  87. package/.next/server/pages/en-US.json +0 -1
  88. package/.next/server/pages/index.js +0 -407
  89. package/.next/server/pages/index.js.nft.json +0 -1
  90. package/.next/server/pages/login.js.nft.json +0 -1
  91. package/.next/server/pages/s.js.nft.json +0 -1
  92. package/.next/server/pages-manifest.json +0 -16
  93. package/.next/server/webpack-api-runtime.js +0 -229
  94. package/.next/server/webpack-runtime.js +0 -229
  95. package/.next/static/chunks/143.dd8a556e6957baa1.js +0 -1
  96. package/.next/static/chunks/153-a20e3f2da180607e.js +0 -1
  97. package/.next/static/chunks/260-994385416f68673d.js +0 -1
  98. package/.next/static/chunks/307.10facde65af3066a.js +0 -1
  99. package/.next/static/chunks/337-4b719ca7a86d8d8c.js +0 -1
  100. package/.next/static/chunks/351-a4e28d64f48c5269.js +0 -1
  101. package/.next/static/chunks/588.591fb3bf1a136c66.js +0 -1
  102. package/.next/static/chunks/650.807852d1c36bfe44.js +0 -1
  103. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  104. package/.next/static/chunks/686.36adeba271636edd.js +0 -1
  105. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  106. package/.next/static/chunks/817-728f854c2948afc0.js +0 -1
  107. package/.next/static/chunks/909.ea3532bde0943808.js +0 -1
  108. package/.next/static/chunks/953.77a48c854f628dcf.js +0 -1
  109. package/.next/static/chunks/98.97381d2021f86cd9.js +0 -1
  110. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  111. package/.next/static/chunks/main-9746772201fe3ac1.js +0 -1
  112. package/.next/static/chunks/pages/404-ba608a2a9f0c420a.js +0 -1
  113. package/.next/static/chunks/pages/500-910883c20541d9ce.js +0 -1
  114. package/.next/static/chunks/pages/[...slug]-9443b18a60d89746.js +0 -1
  115. package/.next/static/chunks/pages/[slug]/p-cb8ef12f6449cf26.js +0 -1
  116. package/.next/static/chunks/pages/_app-9cc7312632f19e94.js +0 -1
  117. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  118. package/.next/static/chunks/pages/account-f19102933e6fd84c.js +0 -1
  119. package/.next/static/chunks/pages/checkout-f8cb7cb22225ef9d.js +0 -1
  120. package/.next/static/chunks/pages/index-6717326cc207d674.js +0 -1
  121. package/.next/static/chunks/pages/login-0b9ea80d9fa0f91b.js +0 -1
  122. package/.next/static/chunks/pages/s-86fe1e3303388123.js +0 -1
  123. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  124. package/.next/static/chunks/webpack-fc7c18f8a868734c.js +0 -1
  125. package/.next/static/css/14ebc84fc6d6c80c.css +0 -1
  126. package/.next/static/css/430b8cafbf7c23c1.css +0 -1
  127. package/.next/static/css/43d61b402f41569b.css +0 -1
  128. package/.next/static/css/4d7e7f156483493d.css +0 -1
  129. package/.next/static/css/6507cb48401e73a4.css +0 -1
  130. package/.next/static/css/9dd1d1084d254c66.css +0 -1
  131. package/.next/static/css/b2f16bd4b93e0aca.css +0 -1
  132. package/.next/static/css/bd743407c8049677.css +0 -1
  133. package/.next/static/css/e63697a078fd522e.css +0 -1
  134. package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
  135. package/.next/static/xmQIY_XtSwwYX1xvtcDOJ/_buildManifest.js +0 -1
  136. package/.next/static/xmQIY_XtSwwYX1xvtcDOJ/_ssgManifest.js +0 -1
  137. package/.next/trace +0 -64
  138. package/public/~partytown/debug/partytown-atomics.js +0 -556
  139. package/public/~partytown/debug/partytown-media.js +0 -374
  140. package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
  141. package/public/~partytown/debug/partytown-sw.js +0 -59
  142. package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
  143. package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
  144. package/public/~partytown/debug/partytown.js +0 -72
  145. package/public/~partytown/partytown-atomics.js +0 -2
  146. package/public/~partytown/partytown-media.js +0 -2
  147. package/public/~partytown/partytown-sw.js +0 -2
  148. package/public/~partytown/partytown.js +0 -2
@@ -1,67 +0,0 @@
1
- "use strict";
2
- exports.id = 264;
3
- exports.ids = [264];
4
- exports.modules = {
5
-
6
- /***/ 3264:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ "X": () => (/* binding */ useSearchState),
11
- /* harmony export */ "j": () => (/* binding */ initialize)
12
- /* harmony export */ });
13
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
14
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
15
- /* harmony import */ var _utils_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3364);
16
-
17
-
18
- const initialize = ({ sort = 'score_desc', selectedFacets = [], term = null, base = '/', page = 0, } = {}) => ({
19
- sort,
20
- selectedFacets,
21
- term,
22
- base: base.endsWith('/') ? base : `${base}/`,
23
- page,
24
- });
25
- const equals = (s1, s2) => (0,_utils_format__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(s1).href === (0,_utils_format__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(s2).href;
26
- const useSearchState = (initialState, onChange) => {
27
- const state = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => initialize(initialState), [initialState]);
28
- return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
29
- state,
30
- setState: (newState) => !equals(newState, state) && onChange((0,_utils_format__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(newState)),
31
- }), [onChange, state]);
32
- };
33
- //# sourceMappingURL=useSearchState.js.map
34
-
35
- /***/ }),
36
-
37
- /***/ 3364:
38
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
39
-
40
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
41
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
42
- /* harmony export */ });
43
- const format = (params) => {
44
- const url = new URL(params.base, 'http://localhost');
45
- const { page, selectedFacets, sort, term } = params;
46
- if (term !== null) {
47
- url.searchParams.set('q', term);
48
- }
49
- const facets = new Set();
50
- for (const facet of selectedFacets) {
51
- url.searchParams.append(facet.key, facet.value);
52
- facets.add(facet.key);
53
- }
54
- if (selectedFacets.length > 0) {
55
- url.searchParams.set('facets', Array.from(facets).join(','));
56
- }
57
- url.searchParams.set('sort', sort);
58
- url.searchParams.set('page', page.toString());
59
- return url;
60
- };
61
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (format);
62
- //# sourceMappingURL=format.js.map
63
-
64
- /***/ })
65
-
66
- };
67
- ;
@@ -1,417 +0,0 @@
1
- "use strict";
2
- exports.id = 280;
3
- exports.ids = [280];
4
- exports.modules = {
5
-
6
- /***/ 6632:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
11
- /* harmony export */ });
12
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
13
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
14
-
15
- // Icon from Phosphor Icons
16
- const ShoppingCart = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
17
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { width: "256", height: "256", fill: "none" }),
18
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M184,184H69.81818L41.92162,30.56892A8,8,0,0,0,34.05066,24H16", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
19
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { cx: "80", cy: "204", r: "20", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
20
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { cx: "184", cy: "204", r: "20", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
21
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M62.54543,144H188.10132a16,16,0,0,0,15.74192-13.13783L216,64H48", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })));
22
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppingCart);
23
- //# sourceMappingURL=ShoppingCart.js.map
24
-
25
- /***/ }),
26
-
27
- /***/ 593:
28
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29
-
30
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
31
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
32
- /* harmony export */ });
33
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
34
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
35
-
36
- // Icon from Phosphor Icons
37
- const Star = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 24, height: 24 },
38
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { width: "256", height: "256", fill: "none" }),
39
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M239.2,97.4A16.4,16.4,0,0,0,224.6,86l-59.4-4.1-22-55.5A16.4,16.4,0,0,0,128,16h0a16.4,16.4,0,0,0-15.2,10.4L90.4,82.2,31.4,86A16.5,16.5,0,0,0,16.8,97.4,16.8,16.8,0,0,0,22,115.5l45.4,38.4L53.9,207a18.5,18.5,0,0,0,7,19.6,18,18,0,0,0,20.1.6l46.9-29.7h.2l50.5,31.9a16.1,16.1,0,0,0,8.7,2.6,16.5,16.5,0,0,0,15.8-20.8l-14.3-58.1L234,115.5A16.8,16.8,0,0,0,239.2,97.4Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })));
40
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Star);
41
- //# sourceMappingURL=Star.js.map
42
-
43
- /***/ }),
44
-
45
- /***/ 9875:
46
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
47
-
48
-
49
- // EXPORTS
50
- __webpack_require__.d(__webpack_exports__, {
51
- "Z": () => (/* binding */ DiscountBadge_DiscountBadge)
52
- });
53
-
54
- // EXTERNAL MODULE: external "react"
55
- var external_react_ = __webpack_require__(6689);
56
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
57
- // EXTERNAL MODULE: ../components/dist/atoms/Badge/Badge.js
58
- var Badge = __webpack_require__(44);
59
- ;// CONCATENATED MODULE: ../components/dist/molecules/DiscountBadge/useDiscountPercent.js
60
-
61
- const useDiscountPercent = (listPrice, spotPrice) => {
62
- return (0,external_react_.useMemo)(() => {
63
- const diff = listPrice - spotPrice;
64
- const discount = (diff * 100) / listPrice;
65
- return Math.round(discount);
66
- }, [spotPrice, listPrice]);
67
- };
68
- //# sourceMappingURL=useDiscountPercent.js.map
69
- ;// CONCATENATED MODULE: ../components/dist/molecules/DiscountBadge/DiscountBadge.js
70
-
71
-
72
-
73
- const DiscountBadge = ({ listPrice, spotPrice, thresholdLow = 15, thresholdHigh = 40, size, testId = 'fs-discount-badge', }) => {
74
- const discountPercent = useDiscountPercent(listPrice, spotPrice);
75
- if (discountPercent === 0) {
76
- return external_react_default().createElement((external_react_default()).Fragment, null);
77
- }
78
- const discountVariant = discountPercent <= thresholdLow
79
- ? 'low'
80
- : discountPercent <= thresholdHigh
81
- ? 'medium'
82
- : 'high';
83
- return (external_react_default().createElement(Badge/* default */.Z, { "data-fs-discount-badge": true, "data-fs-discount-badge-variant": discountVariant, size: size, "data-testid": testId },
84
- discountPercent,
85
- "% off"));
86
- };
87
- /* harmony default export */ const DiscountBadge_DiscountBadge = (DiscountBadge);
88
- //# sourceMappingURL=DiscountBadge.js.map
89
-
90
- /***/ }),
91
-
92
- /***/ 783:
93
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
94
-
95
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
96
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
97
- /* harmony export */ });
98
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
99
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
100
- /* harmony import */ var _atoms_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1329);
101
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(593);
102
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2765);
103
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5045);
104
-
105
-
106
-
107
- const Rating = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Rating({ children, testId = 'fs-rating', length = 5, value = 0, icon, onChange, ...otherProps }, ref) {
108
- const [hover, setHover] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
109
- const ratingIcon = icon ? icon : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, null);
110
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_atoms_List__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { ref: ref, "data-fs-rating": true, "data-fs-rating-actionable": typeof onChange === 'function', "data-testid": testId, ...otherProps }, Array.from({ length }).map((_, index) => {
111
- const tempIndex = index + 1;
112
- const fillCheck = () => {
113
- if (tempIndex <= (hover || value)) {
114
- return 'full';
115
- }
116
- if (tempIndex - value > 0 && tempIndex - value < 1) {
117
- return 'partial';
118
- }
119
- return 'empty';
120
- };
121
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: `rating-${index}`, "data-fs-rating-item": fillCheck(), "data-testid": `${testId}-item` }, onChange ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { "data-fs-rating-button": true, icon: ratingIcon, size: "small", "aria-label": "rate", onClick: () => {
122
- onChange(tempIndex);
123
- }, onMouseEnter: () => setHover(tempIndex), onMouseLeave: () => setHover(value) })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
124
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-rating-icon-wrapper": true },
125
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { component: ratingIcon })),
126
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { "data-fs-rating-icon-outline": true, component: ratingIcon })))));
127
- })));
128
- });
129
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Rating);
130
- //# sourceMappingURL=Rating.js.map
131
-
132
- /***/ }),
133
-
134
- /***/ 8460:
135
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
136
-
137
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
138
- /* harmony export */ "_": () => (/* binding */ sendAnalyticsEvent)
139
- /* harmony export */ });
140
- /* harmony import */ var _wrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6716);
141
-
142
- const sendAnalyticsEvent = (event) => {
143
- try {
144
- window.postMessage((0,_wrap__WEBPACK_IMPORTED_MODULE_0__/* .wrap */ .re)(event), window.origin);
145
- }
146
- catch (e) {
147
- // IE and Edge have a bug on postMessage inside promises.
148
- // Ignoring for now, will try to find a workaround that
149
- // makes postMessage work on those browsers.
150
- // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14719328/
151
- console.error(e);
152
- }
153
- };
154
- //# sourceMappingURL=sendAnalyticsEvent.js.map
155
-
156
- /***/ }),
157
-
158
- /***/ 6716:
159
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
160
-
161
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
162
- /* harmony export */ "Wg": () => (/* binding */ unwrap),
163
- /* harmony export */ "re": () => (/* binding */ wrap),
164
- /* harmony export */ "vi": () => (/* binding */ ANALYTICS_EVENT_TYPE)
165
- /* harmony export */ });
166
- /* unused harmony export STORE_EVENT_PREFIX */
167
- const STORE_EVENT_PREFIX = 'store:';
168
- const ANALYTICS_EVENT_TYPE = 'AnalyticsEvent';
169
- const wrap = (event) => ({
170
- name: ANALYTICS_EVENT_TYPE,
171
- params: {
172
- ...event,
173
- name: `${STORE_EVENT_PREFIX}${event.name}`,
174
- },
175
- });
176
- const unwrap = (event) => {
177
- return {
178
- ...event.params,
179
- name: event.params.name.slice(STORE_EVENT_PREFIX.length, event.params.name.length),
180
- };
181
- };
182
- //# sourceMappingURL=wrap.js.map
183
-
184
- /***/ }),
185
-
186
- /***/ 6475:
187
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
188
-
189
-
190
- // EXPORTS
191
- __webpack_require__.d(__webpack_exports__, {
192
- "Z": () => (/* reexport */ product_ProductCard_ProductCard)
193
- });
194
-
195
- // EXTERNAL MODULE: external "react"
196
- var external_react_ = __webpack_require__(6689);
197
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
198
- ;// CONCATENATED MODULE: ../components/dist/molecules/ProductCard/ProductCard.js
199
-
200
- const ProductCard = (0,external_react_.forwardRef)(function ProductCard({ testId = 'fs-product-card', variant = 'default', bordered = false, outOfStock, children, ...otherProps }, ref) {
201
- return (external_react_default().createElement("article", { ref: ref, "data-fs-product-card": outOfStock ? 'out-of-stock' : '', "data-fs-product-card-variant": variant, "data-fs-product-card-bordered": bordered, "data-testid": testId, ...otherProps }, children));
202
- });
203
- /* harmony default export */ const ProductCard_ProductCard = (ProductCard);
204
- //# sourceMappingURL=ProductCard.js.map
205
- ;// CONCATENATED MODULE: ../components/dist/molecules/ProductCard/ProductCardImage.js
206
-
207
- const ProductCardImage = (0,external_react_.forwardRef)(function ProductCardImage({ testId = 'fs-product-card-image', aspectRatio = 1, children, ...otherProps }, ref) {
208
- return (external_react_default().createElement("div", { ref: ref, "data-fs-product-card-image": true, "data-testid": testId, style: {
209
- '--fs-product-card-image-aspect-ratio': aspectRatio
210
- }, ...otherProps }, children));
211
- });
212
- /* harmony default export */ const ProductCard_ProductCardImage = (ProductCardImage);
213
- //# sourceMappingURL=ProductCardImage.js.map
214
- // EXTERNAL MODULE: ../components/dist/atoms/Link/Link.js
215
- var Link = __webpack_require__(7865);
216
- // EXTERNAL MODULE: ../components/dist/atoms/Price/Price.js
217
- var Price = __webpack_require__(7549);
218
- // EXTERNAL MODULE: ../components/dist/molecules/Rating/Rating.js
219
- var Rating = __webpack_require__(783);
220
- // EXTERNAL MODULE: ../components/dist/molecules/DiscountBadge/DiscountBadge.js + 1 modules
221
- var DiscountBadge = __webpack_require__(9875);
222
- // EXTERNAL MODULE: ../components/dist/atoms/Badge/Badge.js
223
- var Badge = __webpack_require__(44);
224
- // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js + 1 modules
225
- var Button = __webpack_require__(4842);
226
- // EXTERNAL MODULE: ../components/dist/assets/Star.js
227
- var Star = __webpack_require__(593);
228
- // EXTERNAL MODULE: ../components/dist/assets/ShoppingCart.js
229
- var ShoppingCart = __webpack_require__(6632);
230
- ;// CONCATENATED MODULE: ../components/dist/molecules/ProductCard/ProductCardContent.js
231
-
232
-
233
-
234
- const ProductCardContent = (0,external_react_.forwardRef)(function CardContent({ testId = 'fs-product-card-content', title, linkProps, price, outOfStock, outOfStockLabel = 'Out of stock', ratingValue, showDiscountBadge, buttonLabel = 'Add', onButtonClick, children, ...otherProps }, ref) {
235
- return (external_react_default().createElement("section", { ref: ref, "data-fs-product-card-content": true, "data-fs-product-card-badge": showDiscountBadge, "data-testid": testId, ...otherProps },
236
- external_react_default().createElement("div", { "data-fs-product-card-heading": true },
237
- external_react_default().createElement("h3", { "data-fs-product-card-title": true },
238
- external_react_default().createElement(Link/* default */.Z, { ...linkProps, title: title }, title)),
239
- external_react_default().createElement("div", { "data-fs-product-card-prices": true },
240
- external_react_default().createElement(Price/* default */.Z, { value: price?.listPrice ? price.listPrice : 0, formatter: price?.formatter, testId: "list-price", "data-value": price?.listPrice, variant: "listing", SRText: "Original price:" }),
241
- external_react_default().createElement(Price/* default */.Z, { value: price?.value ? price.value : 0, formatter: price?.formatter, testId: "price", "data-value": price?.value, variant: "spot", SRText: "Sale Price:" })),
242
- ratingValue && external_react_default().createElement(Rating/* default */.Z, { value: ratingValue, icon: external_react_default().createElement(Star/* default */.Z, null) })),
243
- showDiscountBadge && !outOfStock && (external_react_default().createElement(DiscountBadge/* default */.Z, { listPrice: price?.listPrice ? price.listPrice : 0, spotPrice: price?.value ? price.value : 0 })),
244
- outOfStock && external_react_default().createElement(Badge/* default */.Z, null, outOfStockLabel),
245
- onButtonClick && !outOfStock && (external_react_default().createElement("div", { "data-fs-product-card-actions": true },
246
- external_react_default().createElement(Button/* default */.Z, { variant: "primary", icon: external_react_default().createElement(ShoppingCart/* default */.Z, null), iconPosition: "left", size: "small", onClick: onButtonClick }, buttonLabel)))));
247
- });
248
- /* harmony default export */ const ProductCard_ProductCardContent = (ProductCardContent);
249
- //# sourceMappingURL=ProductCardContent.js.map
250
- // EXTERNAL MODULE: ./src/components/ui/Image/index.ts + 3 modules
251
- var Image = __webpack_require__(2154);
252
- // EXTERNAL MODULE: ./src/sdk/product/useFormattedPrice.ts
253
- var useFormattedPrice = __webpack_require__(5346);
254
- // EXTERNAL MODULE: ./src/sdk/product/useProductLink.ts
255
- var useProductLink = __webpack_require__(9854);
256
- // EXTERNAL MODULE: ./node_modules/next/link.js
257
- var next_link = __webpack_require__(1664);
258
- var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
259
- // EXTERNAL MODULE: external "react/jsx-runtime"
260
- var jsx_runtime_ = __webpack_require__(997);
261
- ;// CONCATENATED MODULE: ./src/components/product/ProductCard/ProductCard.tsx
262
- const _excluded = ["product", "index", "bordered", "variant", "aspectRatio", "ratingValue", "buttonLabel", "onButtonClick", "showDiscountBadge"];
263
-
264
- 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; }
265
-
266
- 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; }
267
-
268
- 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; }
269
-
270
- 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; }
271
-
272
- 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; }
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
- function ProductCard_ProductCard_ProductCard(_ref) {
284
- let {
285
- product,
286
- index,
287
- bordered = false,
288
- variant = 'default',
289
- aspectRatio = 1,
290
- ratingValue,
291
- buttonLabel = 'Add',
292
- onButtonClick,
293
- showDiscountBadge = true
294
- } = _ref,
295
- otherProps = _objectWithoutProperties(_ref, _excluded);
296
-
297
- const {
298
- sku,
299
- isVariantOf: {
300
- name
301
- },
302
- image: [img],
303
- offers: {
304
- lowPrice: spotPrice,
305
- offers: [{
306
- listPrice,
307
- availability
308
- }]
309
- }
310
- } = product;
311
-
312
- const linkProps = _objectSpread(_objectSpread({}, (0,useProductLink/* useProductLink */.w)({
313
- product,
314
- selectedOffer: 0,
315
- index
316
- })), {}, {
317
- as: (link_default()),
318
- passHref: true,
319
- legacyBehavior: false
320
- });
321
-
322
- const outOfStock = availability !== 'https://schema.org/InStock';
323
- return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProductCard_ProductCard, _objectSpread(_objectSpread({
324
- outOfStock: outOfStock,
325
- bordered: bordered,
326
- variant: variant,
327
- "data-fs-product-card-sku": sku
328
- }, otherProps), {}, {
329
- children: [/*#__PURE__*/jsx_runtime_.jsx(ProductCard_ProductCardImage, {
330
- aspectRatio: aspectRatio,
331
- children: /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, {
332
- src: img.url,
333
- alt: img.alternateName,
334
- width: 360,
335
- height: 360 / aspectRatio,
336
- sizes: "(max-width: 768px) 25vw, 30vw",
337
- loading: "lazy"
338
- })
339
- }), /*#__PURE__*/jsx_runtime_.jsx(ProductCard_ProductCardContent, {
340
- title: name,
341
- price: {
342
- value: spotPrice,
343
- listPrice: listPrice,
344
- formatter: useFormattedPrice/* useFormattedPrice */.P
345
- },
346
- ratingValue: ratingValue,
347
- outOfStock: outOfStock,
348
- onButtonClick: onButtonClick,
349
- linkProps: linkProps,
350
- showDiscountBadge: showDiscountBadge
351
- })]
352
- }));
353
- }
354
-
355
- const fragment = "unknown";
356
- /* harmony default export */ const product_ProductCard_ProductCard = (/*#__PURE__*/(0,external_react_.memo)(ProductCard_ProductCard_ProductCard));
357
- ;// CONCATENATED MODULE: ./src/components/product/ProductCard/index.ts
358
-
359
-
360
- /***/ }),
361
-
362
- /***/ 5184:
363
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
364
-
365
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
366
- /* harmony export */ "m": () => (/* binding */ useViewItemListEvent)
367
- /* harmony export */ });
368
- /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8460);
369
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
370
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
371
- /* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5971);
372
-
373
-
374
-
375
- const useViewItemListEvent = ({
376
- products,
377
- title,
378
- page,
379
- pageSize
380
- }) => {
381
- const {
382
- currency: {
383
- code
384
- }
385
- } = (0,src_sdk_session__WEBPACK_IMPORTED_MODULE_1__/* .useSession */ .kP)();
386
- const sendViewItemListEvent = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
387
- (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_2__/* .sendAnalyticsEvent */ ._)({
388
- name: 'view_item_list',
389
- params: {
390
- item_list_name: title,
391
- item_list_id: title,
392
- items: products.map(({
393
- node: product
394
- }, index) => ({
395
- item_id: product.isVariantOf.productGroupID,
396
- item_name: product.isVariantOf.name,
397
- item_brand: product.brand.name,
398
- item_variant: product.sku,
399
- price: product.offers.offers[0].price,
400
- index: page * pageSize + index + 1,
401
- discount: product.offers.offers[0].listPrice - product.offers.offers[0].price,
402
- currency: code,
403
- item_variant_name: product.name,
404
- product_reference_id: product.gtin
405
- }))
406
- }
407
- });
408
- }, [code, products, title, page, pageSize]);
409
- return {
410
- sendViewItemListEvent
411
- };
412
- };
413
-
414
- /***/ })
415
-
416
- };
417
- ;
@@ -1,79 +0,0 @@
1
- "use strict";
2
- exports.id = 287;
3
- exports.ids = [287];
4
- exports.modules = {
5
-
6
- /***/ 3417:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
11
- /* harmony export */ });
12
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
13
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
14
-
15
- // Icon from Phosphor Icons
16
- const XCircle = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", viewBox: "0 0 256 256", strokeWidth: "16", width: 20, height: 20 },
17
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { width: "256", height: "256", fill: "none" }),
18
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { cx: "128", cy: "128", r: "96", fill: "none", stroke: "currentColor", strokeMiterlimit: "10" }),
19
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("line", { x1: "160", y1: "96", x2: "96", y2: "160", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
20
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement("line", { x1: "160", y1: "160", x2: "96", y2: "96", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })));
21
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (XCircle);
22
- //# sourceMappingURL=XCircle.js.map
23
-
24
- /***/ }),
25
-
26
- /***/ 7216:
27
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28
-
29
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
30
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
31
- /* harmony export */ });
32
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
33
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
34
-
35
- const Label = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Label({ testId = 'fs-label', children, ...otherProps }, ref) {
36
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { ref: ref, "data-fs-label": true, "data-testid": testId, ...otherProps }, children));
37
- });
38
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Label);
39
- //# sourceMappingURL=Label.js.map
40
-
41
- /***/ }),
42
-
43
- /***/ 8287:
44
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
45
-
46
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
47
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
48
- /* harmony export */ });
49
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
50
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
51
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(875);
52
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7216);
53
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2765);
54
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4842);
55
- /* harmony import */ var _assets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3417);
56
-
57
-
58
-
59
- 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`
60
- inputRef, disabled, value, testId = 'fs-input-field', ...otherProps }) => {
61
- const shouldDisplayError = !disabled && error && error !== '';
62
- const shouldDisplayButton = actionable && !disabled && value !== '';
63
- 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 },
64
- 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 }),
65
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { htmlFor: id }, label),
66
- shouldDisplayButton &&
67
- (displayClearButton || error ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { "data-fs-button-size": "small", "aria-label": "Clear Field", icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_assets__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, null), onClick: () => {
68
- onClear?.();
69
- inputRef?.current?.focus();
70
- } })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, { variant: "tertiary", size: "small", onClick: onSubmit }, buttonActionText))),
71
- shouldDisplayError && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { "data-fs-input-field-error-message": true }, error))));
72
- };
73
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InputField);
74
- //# sourceMappingURL=InputField.js.map
75
-
76
- /***/ })
77
-
78
- };
79
- ;