@faststore/core 3.77.3 → 3.78.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 (168) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +49 -49
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/prerender-manifest.js +1 -1
  10. package/.next/prerender-manifest.json +1 -1
  11. package/.next/react-loadable-manifest.json +71 -57
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/chunks/1270.js +1 -0
  14. package/.next/server/chunks/1911.js +1 -0
  15. package/.next/server/chunks/2430.js +1 -0
  16. package/.next/server/chunks/3006.js +1 -1
  17. package/.next/server/chunks/3836.js +1 -1
  18. package/.next/server/chunks/3945.js +1 -0
  19. package/.next/server/chunks/5402.js +1 -0
  20. package/.next/server/chunks/6698.js +1 -0
  21. package/.next/server/chunks/6789.js +1 -1
  22. package/.next/server/chunks/{7178.js → 8071.js} +1 -1
  23. package/.next/server/chunks/83.js +1 -1
  24. package/.next/server/chunks/831.js +1 -1
  25. package/.next/server/chunks/8474.js +9 -0
  26. package/.next/server/chunks/8563.js +1 -0
  27. package/.next/server/chunks/9088.js +1 -1
  28. package/.next/server/chunks/9117.js +1 -0
  29. package/.next/server/chunks/948.js +1 -1
  30. package/.next/server/chunks/9563.js +2 -2
  31. package/.next/server/chunks/9630.js +101 -4
  32. package/.next/server/chunks/9853.js +1 -1
  33. package/.next/server/chunks/UIBannerText.js +1 -1
  34. package/.next/server/chunks/UISKUMatrixSidebar.js +1 -1
  35. package/.next/server/middleware-build-manifest.js +1 -1
  36. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  37. package/.next/server/pages/404.js.nft.json +1 -1
  38. package/.next/server/pages/500.js.nft.json +1 -1
  39. package/.next/server/pages/[...slug].js +1 -1
  40. package/.next/server/pages/[...slug].js.nft.json +1 -1
  41. package/.next/server/pages/[slug]/p.js +1 -1
  42. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  43. package/.next/server/pages/_app.js.nft.json +1 -1
  44. package/.next/server/pages/_document.js.nft.json +1 -1
  45. package/.next/server/pages/_error.js.nft.json +1 -1
  46. package/.next/server/pages/account/403.js.nft.json +1 -1
  47. package/.next/server/pages/account/404.js.nft.json +1 -1
  48. package/.next/server/pages/account/[...unknown].js.nft.json +1 -1
  49. package/.next/server/pages/account/orders/[id].js.nft.json +1 -1
  50. package/.next/server/pages/account/orders.js +1 -1
  51. package/.next/server/pages/account/orders.js.nft.json +1 -1
  52. package/.next/server/pages/account/profile.js.nft.json +1 -1
  53. package/.next/server/pages/account/security.js.nft.json +1 -1
  54. package/.next/server/pages/account/user-details.js.nft.json +1 -1
  55. package/.next/server/pages/account.js.nft.json +1 -1
  56. package/.next/server/pages/api/graphql.js +2 -2
  57. package/.next/server/pages/api/graphql.js.nft.json +1 -1
  58. package/.next/server/pages/api/health/live.js.nft.json +1 -1
  59. package/.next/server/pages/api/health/ready.js.nft.json +1 -1
  60. package/.next/server/pages/api/preview.js.nft.json +1 -1
  61. package/.next/server/pages/checkout.js.nft.json +1 -1
  62. package/.next/server/pages/en-US/404.html +1 -1
  63. package/.next/server/pages/en-US/500.html +1 -1
  64. package/.next/server/pages/en-US/checkout.html +1 -1
  65. package/.next/server/pages/en-US/login.html +1 -1
  66. package/.next/server/pages/en-US/s.html +1 -1
  67. package/.next/server/pages/en-US.html +1 -1
  68. package/.next/server/pages/index.js.nft.json +1 -1
  69. package/.next/server/pages/login.js.nft.json +1 -1
  70. package/.next/server/pages/s.js +1 -1
  71. package/.next/server/pages/s.js.nft.json +1 -1
  72. package/.next/server/pages-manifest.json +1 -1
  73. package/.next/static/{xFgIjKNUaH5r_Yo0uIAnc → 6VSKTBCq7vRe86nXQK6nv}/_buildManifest.js +1 -1
  74. package/.next/static/chunks/3155.c3fa96f983101956.js +1 -0
  75. package/.next/static/chunks/3166-a1d98d71987c90d6.js +1 -0
  76. package/.next/static/chunks/3399.60aae5ddb9123ef5.js +1 -0
  77. package/.next/static/chunks/3836.a2f49cd66f78bcb2.js +1 -0
  78. package/.next/static/chunks/4836.ef87204971e182f4.js +1 -0
  79. package/.next/static/chunks/6789.634a5fcc1ed30b8d.js +1 -0
  80. package/.next/static/chunks/7026.e990acc86d95259d.js +1 -0
  81. package/.next/static/chunks/7191-2b424236f6799274.js +1 -0
  82. package/.next/static/chunks/7351.8ef7b6b1d6e1505a.js +1 -0
  83. package/.next/static/chunks/83.affac11ef34a0c11.js +1 -0
  84. package/.next/static/chunks/8325.b3ddbb43feda1a85.js +1 -0
  85. package/.next/static/chunks/8587.1d6d458c9b697351.js +1 -0
  86. package/.next/static/chunks/9173-acced9d62b9088c8.js +1 -0
  87. package/.next/static/chunks/9666-9be3f1e484eeb148.js +1 -0
  88. package/.next/static/chunks/{7351.e90a4cc21797c136.js → 9714.68af2d4bf27f560b.js} +1 -1
  89. package/.next/static/chunks/9781.dd4028663db7414b.js +1 -0
  90. package/.next/static/chunks/BannerNewsletter.d91d065d644d15f3.js +1 -0
  91. package/.next/static/chunks/BannerText.3bc2f0af3687e984.js +1 -0
  92. package/.next/static/chunks/CartSidebar.f2f885b6d9a227e2.js +1 -0
  93. package/.next/static/chunks/ProductShelf.dcdeffe85dca1ace.js +1 -0
  94. package/.next/static/chunks/ProductTiles.12e553830401871d.js +1 -0
  95. package/.next/static/chunks/RegionModal.0aff964cb36eb49a.js +1 -0
  96. package/.next/static/chunks/RegionSlider.cbf2ac28eeac8dbe.js +1 -0
  97. package/.next/static/chunks/Toast.c06d4e2e2e7913c5.js +1 -0
  98. package/.next/static/chunks/UIBannerText.08c65db460bd1695.js +1 -0
  99. package/.next/static/chunks/UIToast.55af19d2eba3d8a1.js +1 -0
  100. package/.next/static/chunks/pages/{[...slug]-b3a9bdfcf0127006.js → [...slug]-1e68a914dfca7da9.js} +1 -1
  101. package/.next/static/chunks/pages/[slug]/p-2c73921b1ab00c27.js +1 -0
  102. package/.next/static/chunks/pages/_app-57478e0d1d2ddf62.js +1 -0
  103. package/.next/static/chunks/pages/{s-989fccebe1b60a4e.js → s-e7745eef6c834c3e.js} +1 -1
  104. package/.next/static/chunks/webpack-d29ca7e9684f9a33.js +1 -0
  105. package/.next/static/css/{70353bf19c496790.css → 297be4be3be36ff0.css} +1 -1
  106. package/.next/static/css/{0a57ee6c7a57788c.css → 4b8252ed2f23ac67.css} +1 -1
  107. package/.next/static/css/{6831395ff5fd317a.css → 6d92375b6ee8276a.css} +1 -1
  108. package/.next/static/css/8f6350925b347380.css +1 -0
  109. package/.next/trace +136 -135
  110. package/.turbo/turbo-build.log +19 -19
  111. package/.turbo/turbo-test.log +5 -5
  112. package/@generated/gql.ts +20 -4
  113. package/@generated/graphql.ts +310 -6
  114. package/@generated/persisted-documents.json +6 -5
  115. package/@generated/schema.graphql +39 -1
  116. package/CHANGELOG.md +6 -0
  117. package/cms/faststore/sections.json +99 -0
  118. package/package.json +4 -4
  119. package/src/components/product/ProductCard/ProductCard.tsx +74 -35
  120. package/src/components/product/ProductGrid/ProductGrid.tsx +16 -0
  121. package/src/components/sections/ProductDetails/ProductDetails.tsx +4 -0
  122. package/src/components/sections/ProductGallery/DefaultComponents.ts +15 -0
  123. package/src/components/sections/ProductGallery/ProductGallery.tsx +1 -0
  124. package/src/components/sections/ProductGallery/section.module.scss +16 -3
  125. package/src/components/ui/ProductComparison/ProductComparisonSidebar.tsx +256 -0
  126. package/src/components/ui/ProductComparison/index.ts +1 -0
  127. package/src/components/ui/ProductGallery/ProductGallery.tsx +251 -173
  128. package/src/components/ui/ProductGallery/ProductGalleryPage.tsx +6 -0
  129. package/src/sdk/product/useProductsSelected.tsx +45 -0
  130. package/src/typings/overrides.ts +30 -1
  131. package/test/server/index.test.ts +1 -0
  132. package/.next/server/chunks/1333.js +0 -1
  133. package/.next/server/chunks/2295.js +0 -1
  134. package/.next/server/chunks/2778.js +0 -9
  135. package/.next/server/chunks/3918.js +0 -1
  136. package/.next/server/chunks/3963.js +0 -1
  137. package/.next/server/chunks/5607.js +0 -1
  138. package/.next/server/chunks/6335.js +0 -1
  139. package/.next/server/chunks/76.js +0 -1
  140. package/.next/server/chunks/7794.js +0 -1
  141. package/.next/server/chunks/839.js +0 -1
  142. package/.next/static/chunks/3155.243c7558a71f0695.js +0 -1
  143. package/.next/static/chunks/3166-e2e2d3255aa5f208.js +0 -1
  144. package/.next/static/chunks/3399.93804fb74f79436c.js +0 -1
  145. package/.next/static/chunks/3836.c0487aea7bd0c6f0.js +0 -1
  146. package/.next/static/chunks/5781.28d03feacead66ad.js +0 -1
  147. package/.next/static/chunks/6355.454b14737c2bf69c.js +0 -1
  148. package/.next/static/chunks/6857.b2c06171638955ea.js +0 -1
  149. package/.next/static/chunks/7191-7badbb9888b79ce9.js +0 -1
  150. package/.next/static/chunks/7481.3c4ad3642e346232.js +0 -1
  151. package/.next/static/chunks/7498-0dc4f9a9ed199d3a.js +0 -1
  152. package/.next/static/chunks/83.ee1fdbe283ac65b6.js +0 -1
  153. package/.next/static/chunks/9173-3a00edf7b695a319.js +0 -1
  154. package/.next/static/chunks/BannerNewsletter.fe0181162c046991.js +0 -1
  155. package/.next/static/chunks/BannerText.681f118e9f149f6c.js +0 -1
  156. package/.next/static/chunks/CartSidebar.55cc31a37ffa6ee6.js +0 -1
  157. package/.next/static/chunks/ProductShelf.b75a7ab8e313ea07.js +0 -1
  158. package/.next/static/chunks/ProductTiles.35cd23ada22f5a96.js +0 -1
  159. package/.next/static/chunks/RegionModal.04b02aafc0836d49.js +0 -1
  160. package/.next/static/chunks/RegionSlider.d063ccee38bdfdb7.js +0 -1
  161. package/.next/static/chunks/Toast.75a18f47eb23b703.js +0 -1
  162. package/.next/static/chunks/UIBannerText.f4167ceafb96cf67.js +0 -1
  163. package/.next/static/chunks/UIToast.a49584c87d3adc17.js +0 -1
  164. package/.next/static/chunks/pages/[slug]/p-73a253032aaf8ce2.js +0 -1
  165. package/.next/static/chunks/pages/_app-df4ba03d82beaf86.js +0 -1
  166. package/.next/static/chunks/webpack-c996443db6f4fa91.js +0 -1
  167. package/.next/static/css/4bd5e2314f697713.css +0 -1
  168. /package/.next/static/{xFgIjKNUaH5r_Yo0uIAnc → 6VSKTBCq7vRe86nXQK6nv}/_ssgManifest.js +0 -0
@@ -2005,6 +2005,105 @@
2005
2005
  }
2006
2006
  }
2007
2007
  }
2008
+ },
2009
+ "productComparison": {
2010
+ "title": "Product Comparison",
2011
+ "type": "object",
2012
+ "properties": {
2013
+ "enabled": {
2014
+ "title": "Enable Product Comparison",
2015
+ "type": "boolean",
2016
+ "default": false
2017
+ },
2018
+ "labels": {
2019
+ "title": "Labels",
2020
+ "type": "object",
2021
+ "properties": {
2022
+ "compareButton": {
2023
+ "title": "Compare Button",
2024
+ "type": "string",
2025
+ "default": "Compare"
2026
+ },
2027
+ "clearSelectionButton": {
2028
+ "title": "Clear Selection Button",
2029
+ "type": "string",
2030
+ "default": "Clear Selection"
2031
+ },
2032
+ "selectionWarning": {
2033
+ "title": "Selection Warning",
2034
+ "type": "string",
2035
+ "default": "Select at least 2"
2036
+ },
2037
+ "sidebarComponent": {
2038
+ "title": "Sidebar component",
2039
+ "type": "object",
2040
+ "properties": {
2041
+ "title": {
2042
+ "title": "Title",
2043
+ "type": "string",
2044
+ "default": "Compare Products"
2045
+ },
2046
+ "filterLabel": {
2047
+ "title": "Filter text",
2048
+ "type": "string",
2049
+ "default": "Filters"
2050
+ },
2051
+ "productNameFilterLabel": {
2052
+ "title": "Filter by product name text",
2053
+ "type": "string",
2054
+ "default": "Product name"
2055
+ },
2056
+ "sortLabel": {
2057
+ "title": "Sort filter text",
2058
+ "type": "string",
2059
+ "default": "Sort by"
2060
+ },
2061
+ "toggleFieldLabel": {
2062
+ "title": "Toggle filter text",
2063
+ "type": "string",
2064
+ "default": "Show only differences"
2065
+ },
2066
+ "preferencesLabel": {
2067
+ "title": "Preferences text",
2068
+ "type": "string",
2069
+ "default": "Preferences"
2070
+ },
2071
+ "cartButtonLabel": {
2072
+ "title": "Add to cart button",
2073
+ "type": "string",
2074
+ "default": "Add to cart"
2075
+ },
2076
+ "priceLabel": {
2077
+ "title": "Price text",
2078
+ "type": "string",
2079
+ "default": "Price"
2080
+ },
2081
+ "priceWithTaxLabel": {
2082
+ "title": "Price with taxes text",
2083
+ "type": "string",
2084
+ "default": "Price with taxes"
2085
+ }
2086
+ }
2087
+ },
2088
+ "technicalInformation": {
2089
+ "title": "Technical Information",
2090
+ "type": "object",
2091
+ "properties": {
2092
+ "title": {
2093
+ "title": "Title",
2094
+ "type": "string",
2095
+ "default": "Technical Information"
2096
+ },
2097
+ "description": {
2098
+ "title": "Description",
2099
+ "type": "string",
2100
+ "default": "Technical facts and information about the product."
2101
+ }
2102
+ }
2103
+ }
2104
+ }
2105
+ }
2106
+ }
2008
2107
  }
2009
2108
  }
2010
2109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.77.3",
3
+ "version": "3.78.0",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,11 +44,11 @@
44
44
  "@envelop/graphql-jit": "^8.0.3",
45
45
  "@envelop/parser-cache": "^6.0.2",
46
46
  "@envelop/validation-cache": "^6.0.2",
47
- "@faststore/api": "^3.73.0",
47
+ "@faststore/api": "^3.78.0",
48
48
  "@faststore/graphql-utils": "^3.56.1",
49
49
  "@faststore/lighthouse": "^3.56.1",
50
50
  "@faststore/sdk": "^3.77.2",
51
- "@faststore/ui": "^3.70.2",
51
+ "@faststore/ui": "^3.78.0",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
54
54
  "@graphql-codegen/typescript": "4.0.7",
@@ -108,5 +108,5 @@
108
108
  "ts-jest": "29.1.1",
109
109
  "typescript": "5.3.2"
110
110
  },
111
- "gitHead": "87d2a27bd3afc8327bda2d611ac08d64b00fc607"
111
+ "gitHead": "e4853a8c962f5ba4527694ea4b60984fa21e1208"
112
112
  }
@@ -2,6 +2,7 @@ import {
2
2
  ProductCard as UIProductCard,
3
3
  ProductCardContent as UIProductCardContent,
4
4
  ProductCardImage as UIProductCardImage,
5
+ ProductComparisonTrigger as UIProductComparisonTrigger,
5
6
  } from '@faststore/ui'
6
7
  import { memo, useMemo } from 'react'
7
8
 
@@ -61,6 +62,14 @@ export interface ProductCardProps {
61
62
  * Specifies the sponsored label, if advertisement is applicable.
62
63
  */
63
64
  sponsoredLabel?: string
65
+ /**
66
+ * Enable the compare checkbox on display.
67
+ */
68
+ enableCompareCheckbox?: boolean
69
+ /**
70
+ * Label for the compare checkbox.
71
+ */
72
+ compareLabel?: string
64
73
  }
65
74
 
66
75
  function ProductCard({
@@ -76,6 +85,8 @@ function ProductCard({
76
85
  showDiscountBadge = true,
77
86
  taxesConfiguration,
78
87
  sponsoredLabel,
88
+ enableCompareCheckbox = false,
89
+ compareLabel,
79
90
  ...otherProps
80
91
  }: ProductCardProps) {
81
92
  const {
@@ -121,42 +132,52 @@ function ProductCard({
121
132
  : {}
122
133
 
123
134
  return (
124
- <UIProductCard
125
- outOfStock={outOfStock}
126
- bordered={bordered}
127
- variant={variant}
128
- data-fs-product-card-sku={sku}
129
- {...advertisementDataAttributes}
130
- {...otherProps}
131
- >
132
- <UIProductCardImage aspectRatio={aspectRatio}>
133
- <Image
134
- src={img.url}
135
- alt={img.alternateName}
136
- sizes={`${imgProps?.sizes ?? '(max-width: 768px) 40vw, 30vw'}`}
137
- width={imgProps?.width ?? 360}
138
- height={Math.round((Number(imgProps?.height) || 360) / aspectRatio)}
139
- loading={imgProps?.loading}
135
+ <>
136
+ {enableCompareCheckbox && (
137
+ <UIProductComparisonTrigger
138
+ label={compareLabel}
139
+ product={product}
140
+ id={product.id}
140
141
  />
141
- </UIProductCardImage>
142
- <UIProductCardContent
143
- title={name}
144
- price={{
145
- value: spotPrice,
146
- listPrice: listPrice,
147
- formatter: useFormattedPrice,
148
- }}
149
- ratingValue={ratingValue}
142
+ )}
143
+
144
+ <UIProductCard
150
145
  outOfStock={outOfStock}
151
- onButtonClick={onButtonClick}
152
- linkProps={linkProps}
153
- showDiscountBadge={hasDiscount && showDiscountBadge}
154
- includeTaxes={taxesConfiguration?.usePriceWithTaxes}
155
- includeTaxesLabel={taxesConfiguration?.taxesLabel}
156
- sponsored={!!advertisement}
157
- sponsoredLabel={sponsoredLabel}
158
- />
159
- </UIProductCard>
146
+ bordered={bordered}
147
+ variant={variant}
148
+ data-fs-product-card-sku={sku}
149
+ {...advertisementDataAttributes}
150
+ {...otherProps}
151
+ >
152
+ <UIProductCardImage aspectRatio={aspectRatio}>
153
+ <Image
154
+ src={img.url}
155
+ alt={img.alternateName}
156
+ sizes={`${imgProps?.sizes ?? '(max-width: 768px) 40vw, 30vw'}`}
157
+ width={imgProps?.width ?? 360}
158
+ height={Math.round((Number(imgProps?.height) || 360) / aspectRatio)}
159
+ loading={imgProps?.loading}
160
+ />
161
+ </UIProductCardImage>
162
+ <UIProductCardContent
163
+ title={name}
164
+ price={{
165
+ value: spotPrice,
166
+ listPrice: listPrice,
167
+ formatter: useFormattedPrice,
168
+ }}
169
+ ratingValue={ratingValue}
170
+ outOfStock={outOfStock}
171
+ onButtonClick={onButtonClick}
172
+ linkProps={linkProps}
173
+ showDiscountBadge={hasDiscount && showDiscountBadge}
174
+ includeTaxes={taxesConfiguration?.usePriceWithTaxes}
175
+ includeTaxesLabel={taxesConfiguration?.taxesLabel}
176
+ sponsored={!!advertisement}
177
+ sponsoredLabel={sponsoredLabel}
178
+ />
179
+ </UIProductCard>
180
+ </>
160
181
  )
161
182
  }
162
183
 
@@ -200,7 +221,7 @@ export const fragment = gql(`
200
221
  price
201
222
  listPrice
202
223
  listPriceWithTaxes
203
- priceWithTaxes
224
+ priceWithTaxes
204
225
  quantity
205
226
  seller {
206
227
  identifier
@@ -215,6 +236,24 @@ export const fragment = gql(`
215
236
  valueReference
216
237
  }
217
238
 
239
+ hasSpecifications
240
+
241
+ unitMultiplier
242
+
243
+ isVariantOf {
244
+ productGroupID
245
+ name
246
+ skuVariants {
247
+ activeVariations
248
+ slugsMap
249
+ availableVariations
250
+ allVariantProducts {
251
+ name
252
+ productID
253
+ }
254
+ }
255
+ }
256
+
218
257
  advertisement {
219
258
  adId
220
259
  adResponseId
@@ -36,6 +36,14 @@ interface Props {
36
36
  * Determine if the current page is the first page.
37
37
  */
38
38
  firstPage?: number
39
+ /**
40
+ * Determine whether to show the comparison checkbox.
41
+ */
42
+ shouldShowComparison?: boolean
43
+ /**
44
+ * Label for comparison text.
45
+ */
46
+ compareLabel?: string
39
47
  /**
40
48
  * Title for the `ProductGrid` component that will be send to GA events.
41
49
  */
@@ -53,6 +61,8 @@ function ProductGrid({
53
61
  sponsoredLabel,
54
62
  } = {},
55
63
  firstPage,
64
+ shouldShowComparison,
65
+ compareLabel,
56
66
  title,
57
67
  }: Props) {
58
68
  const { isMobile } = useScreenResize()
@@ -80,6 +90,8 @@ function ProductGrid({
80
90
  pageSize={pageSize}
81
91
  >
82
92
  <ProductCard.Component
93
+ enableCompareCheckbox={shouldShowComparison}
94
+ compareLabel={compareLabel}
83
95
  aspectRatio={aspectRatio}
84
96
  imgProps={{
85
97
  width: 150,
@@ -110,6 +122,8 @@ function ProductGrid({
110
122
  pageSize={pageSize}
111
123
  >
112
124
  <ProductCard.Component
125
+ enableCompareCheckbox={shouldShowComparison}
126
+ compareLabel={compareLabel}
113
127
  aspectRatio={aspectRatio}
114
128
  imgProps={{
115
129
  width: 150,
@@ -143,6 +157,8 @@ function ProductGrid({
143
157
  pageSize={pageSize}
144
158
  >
145
159
  <ProductCard.Component
160
+ enableCompareCheckbox={shouldShowComparison}
161
+ compareLabel={compareLabel}
146
162
  aspectRatio={aspectRatio}
147
163
  imgProps={{
148
164
  width: 150,
@@ -353,6 +353,10 @@ export const fragment = gql(`
353
353
  activeVariations
354
354
  slugsMap
355
355
  availableVariations
356
+ allVariantProducts {
357
+ name
358
+ productID
359
+ }
356
360
  }
357
361
  }
358
362
 
@@ -3,6 +3,10 @@ import {
3
3
  Icon as UIIcon,
4
4
  LinkButton as UILinkButton,
5
5
  Skeleton as UISkeleton,
6
+ ToggleField as UIToggleField,
7
+ ProductComparison as UIProductComparison,
8
+ ProductComparisonSidebar as UIProductComparisonSidebar,
9
+ ProductComparisonToolbar as UIProductComparisonToolbar,
6
10
  } from '@faststore/ui'
7
11
 
8
12
  import dynamic from 'next/dynamic'
@@ -29,6 +33,12 @@ const FilterSlider = dynamic(
29
33
  import('src/components/search/Filter/FilterSlider')
30
34
  )
31
35
 
36
+ const ProductComparisonSidebar = dynamic(
37
+ () =>
38
+ /* webpackChunkName: "ProductComparisonSidebar" */
39
+ import('src/components/ui/ProductComparison')
40
+ )
41
+
32
42
  export const ProductGalleryDefaultComponents = {
33
43
  MobileFilterButton: UIButton,
34
44
  FilterIcon: UIIcon,
@@ -36,10 +46,15 @@ export const ProductGalleryDefaultComponents = {
36
46
  ResultsCountSkeleton: UISkeleton,
37
47
  SortSkeleton: UISkeleton,
38
48
  FilterButtonSkeleton: UISkeleton,
49
+ ToggleField: UIToggleField,
50
+ ProductComparison: UIProductComparison,
51
+ ProductComparisonSidebar: UIProductComparisonSidebar,
52
+ ProductComparisonToolbar: UIProductComparisonToolbar,
39
53
  LinkButtonPrev: UILinkButton,
40
54
  LinkButtonNext: UILinkButton,
41
55
  __experimentalFilterDesktop: FilterDesktop,
42
56
  __experimentalFilterSlider: FilterSlider,
43
57
  __experimentalProductCard: ProductCard,
44
58
  __experimentalEmptyGallery: EmptyGallery,
59
+ __experimentalProductComparisonSidebar: ProductComparisonSidebar,
45
60
  } as const
@@ -26,6 +26,7 @@ export interface ProductGallerySectionProps {
26
26
  sortBySelector?: ProductGalleryProps['sortBySelector']
27
27
  productCard?: ProductGalleryProps['productCard']
28
28
  emptyGallery?: EmptyGalleryProps
29
+ productComparison?: ProductGalleryProps['productComparison']
29
30
  }
30
31
 
31
32
  function ProductGallerySection({
@@ -2,7 +2,10 @@
2
2
  .section {
3
3
  @include media("<notebook") {
4
4
  margin-top: 0;
5
- &:last-child { margin-bottom: 0; }
5
+
6
+ &:last-child {
7
+ margin-bottom: 0;
8
+ }
6
9
 
7
10
  @include section-divisor(bottom, 0);
8
11
  }
@@ -22,7 +25,10 @@
22
25
  h1 {
23
26
  font-size: var(--fs-text-size-4);
24
27
 
25
- @include media(">=tablet") { padding-top: var(--fs-spacing-4); font-size: var(--fs-text-size-5); }
28
+ @include media(">=tablet") {
29
+ padding-top: var(--fs-spacing-4);
30
+ font-size: var(--fs-text-size-5);
31
+ }
26
32
 
27
33
  span {
28
34
  font-weight: var(--fs-text-weight-bold);
@@ -43,19 +49,26 @@
43
49
  @import "@faststore/ui/src/components/atoms/Skeleton/styles";
44
50
  @import "@faststore/ui/src/components/atoms/Slider/styles.scss";
45
51
  @import "@faststore/ui/src/components/molecules/Accordion/styles.scss";
52
+ @import "@faststore/ui/src/components/molecules/CheckboxField/styles.scss";
46
53
  @import "@faststore/ui/src/components/molecules/DiscountBadge/styles.scss";
54
+ @import "@faststore/ui/src/components/molecules/Dropdown/styles.scss";
47
55
  @import "@faststore/ui/src/components/molecules/InputField/styles.scss";
48
56
  @import "@faststore/ui/src/components/molecules/LinkButton/styles.scss";
57
+ @import "@faststore/ui/src/components/molecules/Modal/styles.scss";
49
58
  @import "@faststore/ui/src/components/molecules/ProductCard/styles.scss";
50
59
  @import "@faststore/ui/src/components/molecules/ProductCardSkeleton/styles";
51
60
  @import "@faststore/ui/src/components/molecules/ProductPrice/styles.scss";
52
61
  @import "@faststore/ui/src/components/molecules/RadioField/styles.scss";
53
62
  @import "@faststore/ui/src/components/molecules/SelectField/styles.scss";
63
+ @import "@faststore/ui/src/components/molecules/Toggle/styles.scss";
64
+ @import "@faststore/ui/src/components/molecules/ToggleField/styles.scss";
54
65
  @import "@faststore/ui/src/components/organisms/EmptyState/styles.scss";
55
66
  @import "@faststore/ui/src/components/organisms/Filter/styles.scss";
56
67
  @import "@faststore/ui/src/components/organisms/FilterSkeleton/styles.scss";
57
68
  @import "@faststore/ui/src/components/organisms/PriceRange/styles.scss";
58
- @import "@faststore/ui/src/components/organisms/ProductGrid/styles.scss";
69
+ @import "@faststore/ui/src/components/organisms/ProductComparison/styles";
59
70
  @import "@faststore/ui/src/components/organisms/ProductGallery/styles.scss";
71
+ @import "@faststore/ui/src/components/organisms/ProductGrid/styles.scss";
72
+ @import "@faststore/ui/src/components/organisms/SlideOver/styles";
60
73
  }
61
74
  }