@magento/venia-pwa-live-search 1.0.0-alpha6

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 (202) hide show
  1. package/package.json +31 -0
  2. package/postcss.config.js +3 -0
  3. package/src/api/fragments.js +193 -0
  4. package/src/api/graphql.js +26 -0
  5. package/src/api/mutations.js +94 -0
  6. package/src/api/queries.js +225 -0
  7. package/src/api/search.js +222 -0
  8. package/src/components/AddToCartButton/AddToCartButton.jsx +32 -0
  9. package/src/components/AddToCartButton/AddToCartButton.stories.mdx +14 -0
  10. package/src/components/AddToCartButton/index.js +10 -0
  11. package/src/components/Alert/Alert.jsx +155 -0
  12. package/src/components/Alert/index.js +11 -0
  13. package/src/components/Breadcrumbs/Breadcrumbs.jsx +34 -0
  14. package/src/components/Breadcrumbs/MockPages.js +14 -0
  15. package/src/components/Breadcrumbs/index.js +11 -0
  16. package/src/components/ButtonShimmer/ButtonShimmer.css +32 -0
  17. package/src/components/ButtonShimmer/ButtonShimmer.jsx +23 -0
  18. package/src/components/ButtonShimmer/index.js +11 -0
  19. package/src/components/CategoryFilters/CategoryFilters.jsx +59 -0
  20. package/src/components/CategoryFilters/index.js +10 -0
  21. package/src/components/Facets/Facets.jsx +50 -0
  22. package/src/components/Facets/Range/RangeFacet.js +20 -0
  23. package/src/components/Facets/Scalar/ScalarFacet.js +29 -0
  24. package/src/components/Facets/SelectedFilters.js +80 -0
  25. package/src/components/Facets/format.js +52 -0
  26. package/src/components/Facets/index.js +14 -0
  27. package/src/components/Facets/mocks.js +119 -0
  28. package/src/components/FacetsShimmer/FacetsShimmer.css +49 -0
  29. package/src/components/FacetsShimmer/FacetsShimmer.jsx +25 -0
  30. package/src/components/FacetsShimmer/index.js +11 -0
  31. package/src/components/FilterButton/FilterButton.jsx +40 -0
  32. package/src/components/FilterButton/index.js +11 -0
  33. package/src/components/ImageCarousel/Image.jsx +34 -0
  34. package/src/components/ImageCarousel/ImageCarousel.jsx +103 -0
  35. package/src/components/ImageCarousel/index.js +11 -0
  36. package/src/components/InputButtonGroup/InputButtonGroup.jsx +120 -0
  37. package/src/components/InputButtonGroup/index.js +11 -0
  38. package/src/components/LabelledInput/LabelledInput.jsx +51 -0
  39. package/src/components/LabelledInput/index.js +11 -0
  40. package/src/components/Loading/Loading.jsx +32 -0
  41. package/src/components/Loading/index.js +11 -0
  42. package/src/components/NoResults/NoResults.jsx +55 -0
  43. package/src/components/NoResults/index.js +11 -0
  44. package/src/components/Pagination/Pagination.jsx +105 -0
  45. package/src/components/Pagination/index.js +10 -0
  46. package/src/components/PerPagePicker/PerPagePicker.jsx +114 -0
  47. package/src/components/PerPagePicker/index.js +11 -0
  48. package/src/components/Pill/Pill.jsx +34 -0
  49. package/src/components/Pill/index.js +11 -0
  50. package/src/components/Pill/mock.js +23 -0
  51. package/src/components/ProductCardShimmer/ProductCardShimmer.css +72 -0
  52. package/src/components/ProductCardShimmer/ProductCardShimmer.jsx +28 -0
  53. package/src/components/ProductCardShimmer/index.js +11 -0
  54. package/src/components/ProductItem/MockData.js +508 -0
  55. package/src/components/ProductItem/ProductItem.css +84 -0
  56. package/src/components/ProductItem/ProductItem.jsx +347 -0
  57. package/src/components/ProductItem/ProductPrice.jsx +181 -0
  58. package/src/components/ProductItem/index.js +11 -0
  59. package/src/components/ProductList/MockData.js +190 -0
  60. package/src/components/ProductList/ProductList.jsx +127 -0
  61. package/src/components/ProductList/index.js +11 -0
  62. package/src/components/ProductList/product-list.css +18 -0
  63. package/src/components/SearchBar/SearchBar.jsx +33 -0
  64. package/src/components/SearchBar/index.js +11 -0
  65. package/src/components/Shimmer/Shimmer.css +82 -0
  66. package/src/components/Shimmer/Shimmer.jsx +66 -0
  67. package/src/components/Shimmer/index.js +11 -0
  68. package/src/components/Slider/Slider.css +61 -0
  69. package/src/components/Slider/Slider.jsx +103 -0
  70. package/src/components/Slider/index.jsx +11 -0
  71. package/src/components/SliderDoubleControl/SliderDoubleControl.css +83 -0
  72. package/src/components/SliderDoubleControl/SliderDoubleControl.jsx +220 -0
  73. package/src/components/SliderDoubleControl/index.js +11 -0
  74. package/src/components/SortDropdown/SortDropdown.jsx +126 -0
  75. package/src/components/SortDropdown/index.js +11 -0
  76. package/src/components/SwatchButton/SwatchButton.jsx +72 -0
  77. package/src/components/SwatchButton/index.js +11 -0
  78. package/src/components/SwatchButtonGroup/SwatchButtonGroup.jsx +86 -0
  79. package/src/components/SwatchButtonGroup/index.js +11 -0
  80. package/src/components/ViewSwitcher/ViewSwitcher.jsx +46 -0
  81. package/src/components/ViewSwitcher/index.js +11 -0
  82. package/src/components/WishlistButton/WishlistButton.jsx +67 -0
  83. package/src/components/WishlistButton/index.js +11 -0
  84. package/src/containers/App.jsx +145 -0
  85. package/src/containers/LiveSearchPLPLoader.jsx +24 -0
  86. package/src/containers/LiveSearchPopoverLoader.jsx +190 -0
  87. package/src/containers/LiveSearchSRLPLoader.jsx +24 -0
  88. package/src/containers/ProductListingPage.jsx +66 -0
  89. package/src/containers/ProductsContainer.jsx +145 -0
  90. package/src/containers/ProductsHeader.jsx +123 -0
  91. package/src/context/attributeMetadata.js +63 -0
  92. package/src/context/cart.js +97 -0
  93. package/src/context/displayChange.js +90 -0
  94. package/src/context/events.js +160 -0
  95. package/src/context/index.js +19 -0
  96. package/src/context/products.jsx +336 -0
  97. package/src/context/resultsModifierContext.js +35 -0
  98. package/src/context/search.jsx +127 -0
  99. package/src/context/store.jsx +93 -0
  100. package/src/context/translation.jsx +125 -0
  101. package/src/context/widgetConfig.jsx +120 -0
  102. package/src/context/wishlist.jsx +97 -0
  103. package/src/hooks/eventing/useEventListener.js +13 -0
  104. package/src/hooks/eventing/useLocation.js +21 -0
  105. package/src/hooks/eventing/useMagentoExtensionContext.js +28 -0
  106. package/src/hooks/eventing/usePageView.js +36 -0
  107. package/src/hooks/eventing/useShopperContext.js +33 -0
  108. package/src/hooks/eventing/useStorefrontInstanceContext.js +46 -0
  109. package/src/hooks/eventing/useViewedOffsets.js +74 -0
  110. package/src/hooks/useAccessibleDropdown.js +148 -0
  111. package/src/hooks/useLiveSearchPLPConfig.js +112 -0
  112. package/src/hooks/useLiveSearchPopoverConfig.js +83 -0
  113. package/src/hooks/useLiveSearchSRLPConfig.js +97 -0
  114. package/src/hooks/usePagination.js +83 -0
  115. package/src/hooks/useRangeFacet.js +62 -0
  116. package/src/hooks/useScalarFacet.js +61 -0
  117. package/src/hooks/useSliderFacet.js +43 -0
  118. package/src/i18n/Sorani.js +60 -0
  119. package/src/i18n/ar_AE.js +60 -0
  120. package/src/i18n/bg_BG.js +60 -0
  121. package/src/i18n/bn_IN.js +60 -0
  122. package/src/i18n/ca_ES.js +60 -0
  123. package/src/i18n/cs_CZ.js +60 -0
  124. package/src/i18n/da_DK.js +60 -0
  125. package/src/i18n/de_DE.js +60 -0
  126. package/src/i18n/el_GR.js +60 -0
  127. package/src/i18n/en_GA.js +60 -0
  128. package/src/i18n/en_GB.js +60 -0
  129. package/src/i18n/en_US.js +70 -0
  130. package/src/i18n/es_ES.js +60 -0
  131. package/src/i18n/et_EE.js +60 -0
  132. package/src/i18n/eu_ES.js +60 -0
  133. package/src/i18n/fa_IR.js +60 -0
  134. package/src/i18n/fi_FI.js +60 -0
  135. package/src/i18n/fr_FR.js +60 -0
  136. package/src/i18n/gl_ES.js +60 -0
  137. package/src/i18n/hi_IN.js +60 -0
  138. package/src/i18n/hu_HU.js +60 -0
  139. package/src/i18n/hy_AM.js +60 -0
  140. package/src/i18n/id_ID.js +60 -0
  141. package/src/i18n/index.js +89 -0
  142. package/src/i18n/it_IT.js +60 -0
  143. package/src/i18n/ja_JP.js +60 -0
  144. package/src/i18n/ko_KR.js +60 -0
  145. package/src/i18n/lt_LT.js +60 -0
  146. package/src/i18n/lv_LV.js +60 -0
  147. package/src/i18n/nb_NO.js +60 -0
  148. package/src/i18n/nl_NL.js +60 -0
  149. package/src/i18n/pt_BR.js +60 -0
  150. package/src/i18n/pt_PT.js +60 -0
  151. package/src/i18n/ro_RO.js +60 -0
  152. package/src/i18n/ru_RU.js +60 -0
  153. package/src/i18n/sv_SE.js +60 -0
  154. package/src/i18n/th_TH.js +60 -0
  155. package/src/i18n/tr_TR.js +60 -0
  156. package/src/i18n/zh_Hans_CN.js +60 -0
  157. package/src/i18n/zh_Hant_TW.js +60 -0
  158. package/src/icons/NoImage.svg +1 -0
  159. package/src/icons/adjustments.svg +3 -0
  160. package/src/icons/cart.svg +3 -0
  161. package/src/icons/checkmark.svg +3 -0
  162. package/src/icons/chevron.svg +3 -0
  163. package/src/icons/emptyHeart.svg +3 -0
  164. package/src/icons/error.svg +3 -0
  165. package/src/icons/filledHeart.svg +3 -0
  166. package/src/icons/filter.svg +29 -0
  167. package/src/icons/gridView.svg +11 -0
  168. package/src/icons/info.svg +3 -0
  169. package/src/icons/listView.svg +5 -0
  170. package/src/icons/loading.svg +6 -0
  171. package/src/icons/plus.svg +4 -0
  172. package/src/icons/sort.svg +18 -0
  173. package/src/icons/warning.svg +3 -0
  174. package/src/icons/x.svg +3 -0
  175. package/src/index.jsx +65 -0
  176. package/src/queries/customerGroupCode.gql.js +10 -0
  177. package/src/queries/eventing/getMagentoExtensionContext.gql.js +13 -0
  178. package/src/queries/eventing/getPageType.gql.js +14 -0
  179. package/src/queries/eventing/getStorefrontContext.gql.js +27 -0
  180. package/src/queries/index.js +3 -0
  181. package/src/queries/liveSearchPlpConfigs.gql.js +30 -0
  182. package/src/queries/liveSearchPopoverConfigs.gql.js +28 -0
  183. package/src/styles/autocomplete.module.css +56 -0
  184. package/src/styles/index.css +1638 -0
  185. package/src/styles/searchBar.module.css +119 -0
  186. package/src/styles/tokens.css +99 -0
  187. package/src/targets/intercept.js +21 -0
  188. package/src/utils/constants.js +26 -0
  189. package/src/utils/decodeHtmlString.js +13 -0
  190. package/src/utils/dom.js +14 -0
  191. package/src/utils/eventing/getCookie.js +9 -0
  192. package/src/utils/eventing/usePageTypeFromUrl.js +26 -0
  193. package/src/utils/getProductImage.js +94 -0
  194. package/src/utils/getProductPrice.js +83 -0
  195. package/src/utils/getUserViewHistory.js +27 -0
  196. package/src/utils/handleUrlFilters.js +164 -0
  197. package/src/utils/htmlStringDecode.js +13 -0
  198. package/src/utils/modifyResults.js +164 -0
  199. package/src/utils/sort.js +95 -0
  200. package/src/utils/useIntersectionObserver.js +27 -0
  201. package/src/utils/validateStoreDetails.js +39 -0
  202. package/src/wrappers/wrapUseApp.js +28 -0
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright 2024 Adobe
3
+ All Rights Reserved.
4
+
5
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ accordance with the terms of the Adobe license agreement accompanying
7
+ it.
8
+ */
9
+
10
+ export const sv_SE = {
11
+ Filter: {
12
+ title: 'Filter',
13
+ showTitle: 'Visa filter',
14
+ hideTitle: 'Dölj filter',
15
+ clearAll: 'Rensa allt'
16
+ },
17
+ InputButtonGroup: {
18
+ title: 'Kategorier',
19
+ price: 'Pris',
20
+ customPrice: 'Anpassat pris',
21
+ priceIncluded: 'ja',
22
+ priceExcluded: 'nej',
23
+ priceExcludedMessage: 'Inte {title}',
24
+ priceRange: ' eller mer',
25
+ showmore: 'Visa mer'
26
+ },
27
+ Loading: {
28
+ title: 'Läser in'
29
+ },
30
+ NoResults: {
31
+ heading: 'Inga sökresultat.',
32
+ subheading: 'Försök igen …'
33
+ },
34
+ SortDropdown: {
35
+ title: 'Sortera på',
36
+ option: 'Sortera på: {selectedOption}',
37
+ relevanceLabel: 'Mest relevant',
38
+ positionLabel: 'Position'
39
+ },
40
+ CategoryFilters: {
41
+ results: 'resultat för {phrase}',
42
+ products: '{totalCount} produkter'
43
+ },
44
+ ProductCard: {
45
+ asLowAs: 'Så lite som {discountPrice}',
46
+ startingAt: 'Från {productPrice}',
47
+ bundlePrice: 'Från {fromBundlePrice} till {toBundlePrice}',
48
+ from: 'Från {productPrice}'
49
+ },
50
+ ProductContainers: {
51
+ minquery:
52
+ 'Din sökterm {variables.phrase} har inte nått upp till minimiantalet tecken, {minQueryLength}.',
53
+ noresults: 'Sökningen gav inget resultat.',
54
+ pagePicker: 'Visa {pageSize} per sida',
55
+ showAll: 'alla'
56
+ },
57
+ SearchBar: {
58
+ placeholder: 'Sök …'
59
+ }
60
+ };
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright 2024 Adobe
3
+ All Rights Reserved.
4
+
5
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ accordance with the terms of the Adobe license agreement accompanying
7
+ it.
8
+ */
9
+
10
+ export const th_TH = {
11
+ Filter: {
12
+ title: 'ตัวกรอง',
13
+ showTitle: 'แสดงตัวกรอง',
14
+ hideTitle: 'ซ่อนตัวกรอง',
15
+ clearAll: 'ล้างทั้งหมด'
16
+ },
17
+ InputButtonGroup: {
18
+ title: 'หมวดหมู่',
19
+ price: 'ราคา',
20
+ customPrice: 'ปรับแต่งราคา',
21
+ priceIncluded: 'ใช่',
22
+ priceExcluded: 'ไม่',
23
+ priceExcludedMessage: 'ไม่ใช่ {title}',
24
+ priceRange: ' และสูงกว่า',
25
+ showmore: 'แสดงมากขึ้น'
26
+ },
27
+ Loading: {
28
+ title: 'กำลังโหลด'
29
+ },
30
+ NoResults: {
31
+ heading: 'ไม่มีผลลัพธ์สำหรับการค้นหาของคุณ',
32
+ subheading: 'โปรดลองอีกครั้ง...'
33
+ },
34
+ SortDropdown: {
35
+ title: 'เรียงตาม',
36
+ option: 'เรียงตาม: {selectedOption}',
37
+ relevanceLabel: 'เกี่ยวข้องมากที่สุด',
38
+ positionLabel: 'ตำแหน่ง'
39
+ },
40
+ CategoryFilters: {
41
+ results: 'ผลลัพธ์สำหรับ {phrase}',
42
+ products: '{totalCount} ผลิตภัณฑ์'
43
+ },
44
+ ProductCard: {
45
+ asLowAs: 'ต่ำสุดที่ {discountPrice}',
46
+ startingAt: 'เริ่มต้นที่ {productPrice}',
47
+ bundlePrice: 'ตั้งแต่ {fromBundlePrice} ถึง {toBundlePrice}',
48
+ from: 'ตั้งแต่ {productPrice}'
49
+ },
50
+ ProductContainers: {
51
+ minquery:
52
+ 'คำว่า {variables.phrase} ที่คุณใช้ค้นหายังมีจำนวนอักขระไม่ถึงจำนวนขั้นต่ำ {minQueryLength} อักขระ',
53
+ noresults: 'การค้นหาของคุณไม่มีผลลัพธ์',
54
+ pagePicker: 'แสดง {pageSize} ต่อหน้า',
55
+ showAll: 'ทั้งหมด'
56
+ },
57
+ SearchBar: {
58
+ placeholder: 'ค้นหา...'
59
+ }
60
+ };
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright 2024 Adobe
3
+ All Rights Reserved.
4
+
5
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ accordance with the terms of the Adobe license agreement accompanying
7
+ it.
8
+ */
9
+
10
+ export const tr_TR = {
11
+ Filter: {
12
+ title: 'Filtreler',
13
+ showTitle: 'Filtreleri göster',
14
+ hideTitle: 'Filtreleri gizle',
15
+ clearAll: 'Tümünü temizle'
16
+ },
17
+ InputButtonGroup: {
18
+ title: 'Kategoriler',
19
+ price: 'Fiyat',
20
+ customPrice: 'Özel Fiyat',
21
+ priceIncluded: 'evet',
22
+ priceExcluded: 'hayır',
23
+ priceExcludedMessage: 'Hariç: {title}',
24
+ priceRange: ' ve üzeri',
25
+ showmore: 'Diğerlerini göster'
26
+ },
27
+ Loading: {
28
+ title: 'Yükleniyor'
29
+ },
30
+ NoResults: {
31
+ heading: 'Aramanız hiç sonuç döndürmedi',
32
+ subheading: 'Lütfen tekrar deneyin...'
33
+ },
34
+ SortDropdown: {
35
+ title: 'Sırala',
36
+ option: 'Sıralama ölçütü: {selectedOption}',
37
+ relevanceLabel: 'En Çok İlişkili',
38
+ positionLabel: 'Konum'
39
+ },
40
+ CategoryFilters: {
41
+ results: '{phrase} için sonuçlar',
42
+ products: '{totalCount} ürün'
43
+ },
44
+ ProductCard: {
45
+ asLowAs: 'En düşük: {discountPrice}',
46
+ startingAt: 'Başlangıç fiyatı: {productPrice}',
47
+ bundlePrice: '{fromBundlePrice} - {toBundlePrice} arası',
48
+ from: 'Başlangıç: {productPrice}'
49
+ },
50
+ ProductContainers: {
51
+ minquery:
52
+ 'Arama teriminiz ({variables.phrase}) minimum {minQueryLength} karakter sınırlamasından daha kısa.',
53
+ noresults: 'Aramanız hiç sonuç döndürmedi.',
54
+ pagePicker: 'Sayfa başına {pageSize} göster',
55
+ showAll: 'tümü'
56
+ },
57
+ SearchBar: {
58
+ placeholder: 'Ara...'
59
+ }
60
+ };
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright 2024 Adobe
3
+ All Rights Reserved.
4
+
5
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ accordance with the terms of the Adobe license agreement accompanying
7
+ it.
8
+ */
9
+
10
+ export const zh_Hans_CN = {
11
+ Filter: {
12
+ title: '筛选条件',
13
+ showTitle: '显示筛选条件',
14
+ hideTitle: '隐藏筛选条件',
15
+ clearAll: '全部清除'
16
+ },
17
+ InputButtonGroup: {
18
+ title: '类别',
19
+ price: '价格',
20
+ customPrice: '自定义价格',
21
+ priceIncluded: '是',
22
+ priceExcluded: '否',
23
+ priceExcludedMessage: '不是 {title}',
24
+ priceRange: ' 及以上',
25
+ showmore: '显示更多'
26
+ },
27
+ Loading: {
28
+ title: '正在加载'
29
+ },
30
+ NoResults: {
31
+ heading: '无搜索结果。',
32
+ subheading: '请重试...'
33
+ },
34
+ SortDropdown: {
35
+ title: '排序依据',
36
+ option: '排序依据:{selectedOption}',
37
+ relevanceLabel: '最相关',
38
+ positionLabel: '位置'
39
+ },
40
+ CategoryFilters: {
41
+ results: '{phrase} 的结果',
42
+ products: '{totalCount} 个产品'
43
+ },
44
+ ProductCard: {
45
+ asLowAs: '低至 {discountPrice}',
46
+ startingAt: '起价为 {productPrice}',
47
+ bundlePrice: '从 {fromBundlePrice} 到 {toBundlePrice}',
48
+ from: '从 {productPrice} 起'
49
+ },
50
+ ProductContainers: {
51
+ minquery:
52
+ '您的搜索词 {variables.phrase} 尚未达到最少 {minQueryLength} 个字符这一要求。',
53
+ noresults: '您的搜索未返回任何结果。',
54
+ pagePicker: '每页显示 {pageSize} 项',
55
+ showAll: '全部'
56
+ },
57
+ SearchBar: {
58
+ placeholder: '搜索...'
59
+ }
60
+ };
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright 2024 Adobe
3
+ All Rights Reserved.
4
+
5
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ accordance with the terms of the Adobe license agreement accompanying
7
+ it.
8
+ */
9
+
10
+ export const zh_Hant_TW = {
11
+ Filter: {
12
+ title: '篩選器',
13
+ showTitle: '顯示篩選器',
14
+ hideTitle: '隱藏篩選器',
15
+ clearAll: '全部清除'
16
+ },
17
+ InputButtonGroup: {
18
+ title: '類別',
19
+ price: '價格',
20
+ customPrice: '自訂價格',
21
+ priceIncluded: '是',
22
+ priceExcluded: '否',
23
+ priceExcludedMessage: '不是 {title}',
24
+ priceRange: ' 以上',
25
+ showmore: '顯示更多'
26
+ },
27
+ Loading: {
28
+ title: '載入中'
29
+ },
30
+ NoResults: {
31
+ heading: '沒有符合搜尋的結果。',
32
+ subheading: '請再試一次…'
33
+ },
34
+ SortDropdown: {
35
+ title: '排序依據',
36
+ option: '排序方式:{selectedOption}',
37
+ relevanceLabel: '最相關',
38
+ positionLabel: '位置'
39
+ },
40
+ CategoryFilters: {
41
+ results: '{phrase} 的結果',
42
+ products: '{totalCount} 個產品'
43
+ },
44
+ ProductCard: {
45
+ asLowAs: '低至 {discountPrice}',
46
+ startingAt: '起價為 {productPrice}',
47
+ bundlePrice: '從 {fromBundlePrice} 到 {toBundlePrice}',
48
+ from: '起價為 {productPrice}'
49
+ },
50
+ ProductContainers: {
51
+ minquery:
52
+ '您的搜尋字詞 {variables.phrase} 未達到最少 {minQueryLength} 個字元。',
53
+ noresults: '您的搜尋未傳回任何結果。',
54
+ pagePicker: '顯示每頁 {pageSize}',
55
+ showAll: '全部'
56
+ },
57
+ SearchBar: {
58
+ placeholder: '搜尋…'
59
+ }
60
+ };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 74"><path d="M26,85H70a8.009,8.009,0,0,0,8-8V29.941a7.947,7.947,0,0,0-2.343-5.657L64.716,13.343A7.946,7.946,0,0,0,59.059,11H26a8.009,8.009,0,0,0-8,8V77a8.009,8.009,0,0,0,8,8ZM20,19a6.007,6.007,0,0,1,6-6H59.059A5.96,5.96,0,0,1,63.3,14.757L74.242,25.7A5.96,5.96,0,0,1,76,29.941V77a6.007,6.007,0,0,1-6,6H26a6.007,6.007,0,0,1-6-6Zm6.614,51.06h0L68,69.98a.75.75,0,0,0,.545-1.263L57.67,57.129a1.99,1.99,0,0,0-2.808-.028L51.6,60.467l-.024.026-7.087-7.543a1.73,1.73,0,0,0-1.229-.535,1.765,1.765,0,0,0-1.249.5L26.084,68.778a.75.75,0,0,0,.529,1.281Zm26.061-8.548,3.252-3.354a.333.333,0,0,1,.332-.123.463.463,0,0,1,.324.126L66.27,68.484l-7.177.014-6.5-6.916a.735.735,0,0,0,.078-.071Zm-9.611-7.526a.235.235,0,0,1,.168-.069.212.212,0,0,1,.168.068L57.039,68.5l-28.606.055Zm20.05-.43h.079a5.087,5.087,0,0,0,3.583-1.47,5.146,5.146,0,1,0-7.279-.109,5.089,5.089,0,0,0,3.617,1.579Zm-2.456-7.839a3.6,3.6,0,0,1,2.534-1.042h.056a3.7,3.7,0,0,1,2.478,6.34,3.51,3.51,0,0,1-2.589,1.041,3.6,3.6,0,0,1-2.557-1.118,3.715,3.715,0,0,1,.079-5.221Z" transform="translate(-18 -11)" fill="#8e8e8e"/></svg>
@@ -0,0 +1,3 @@
1
+ <svg className="w-6 h-6 mr-1" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="black">
2
+ <path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 11-3 0m3 0a1.5 1.5 0 10-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-9.75 0h9.75"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.9002 18.2899H18.6502V16.7899H17.9002V18.2899ZM6.13016 17.5399L5.38475 17.6228C5.42698 18.0026 5.74801 18.2899 6.13016 18.2899V17.5399ZM4.34016 1.43994L5.08556 1.35707C5.04334 0.977265 4.7223 0.689941 4.34016 0.689941V1.43994ZM1.66016 0.689941H0.910156V2.18994H1.66016V0.689941ZM21.3402 6.80996L22.0856 6.89324C22.1077 6.69506 22.05 6.49622 21.9253 6.34067C21.8005 6.18512 21.6189 6.08566 21.4206 6.06428L21.3402 6.80996ZM20.5402 13.97V14.72C20.9222 14.72 21.2432 14.4329 21.2856 14.0532L20.5402 13.97ZM6.30029 19.0499C6.30029 19.4641 5.96451 19.7999 5.55029 19.7999V21.2999C6.79293 21.2999 7.80029 20.2926 7.80029 19.0499H6.30029ZM5.55029 19.7999C5.13608 19.7999 4.80029 19.4641 4.80029 19.0499H3.30029C3.30029 20.2926 4.30765 21.2999 5.55029 21.2999V19.7999ZM4.80029 19.0499C4.80029 18.6357 5.13608 18.2999 5.55029 18.2999V16.7999C4.30765 16.7999 3.30029 17.8073 3.30029 19.0499H4.80029ZM5.55029 18.2999C5.96451 18.2999 6.30029 18.6357 6.30029 19.0499H7.80029C7.80029 17.8073 6.79293 16.7999 5.55029 16.7999V18.2999ZM19.3003 19.0499C19.3003 19.4641 18.9645 19.7999 18.5503 19.7999V21.2999C19.7929 21.2999 20.8003 20.2926 20.8003 19.0499H19.3003ZM18.5503 19.7999C18.1361 19.7999 17.8003 19.4641 17.8003 19.0499H16.3003C16.3003 20.2926 17.3077 21.2999 18.5503 21.2999V19.7999ZM17.8003 19.0499C17.8003 18.6357 18.1361 18.2999 18.5503 18.2999V16.7999C17.3077 16.7999 16.3003 17.8073 16.3003 19.0499H17.8003ZM18.5503 18.2999C18.9645 18.2999 19.3003 18.6357 19.3003 19.0499H20.8003C20.8003 17.8073 19.7929 16.7999 18.5503 16.7999V18.2999ZM17.9002 16.7899H6.13016V18.2899H17.9002V16.7899ZM6.87556 17.4571L5.08556 1.35707L3.59475 1.52282L5.38475 17.6228L6.87556 17.4571ZM4.34016 0.689941H1.66016V2.18994H4.34016V0.689941ZM4.65983 5.76564L21.2598 7.55564L21.4206 6.06428L4.82064 4.27428L4.65983 5.76564ZM20.5949 6.72668L19.7949 13.8867L21.2856 14.0532L22.0856 6.89324L20.5949 6.72668ZM20.5402 13.22H5.74023V14.72H20.5402V13.22Z" fill="white"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-circle-fill" viewBox="0 0 16 16">
2
+ <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.122 5.121" stroke="currentColor">
2
+ <path id="chevron" d="M199.75,367.5l3,3,3-3" transform="translate(-198.689 -366.435)" fill="none" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
2
+ <path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-circle-fill" viewBox="0 0 16 16">
2
+ <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
2
+ <path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" />
3
+ </svg>
@@ -0,0 +1,29 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17.5 16">
2
+ <g id="Group_173236" data-name="Group 173236" transform="translate(-31.25)">
3
+ <rect id="area" width="16" height="16" transform="translate(32)" fill="none" opacity="0.3" />
4
+ <g id="filters" transform="translate(32 0.75)">
5
+ <line id="Line_737" data-name="Line 737" x2="10.07" transform="translate(5.93 7.11)" fill="none" stroke="#4b4b4b"
6
+ stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
7
+ <line id="Line_738" data-name="Line 738" x2="2.37" transform="translate(0 7.11)" fill="none" stroke="#4b4b4b"
8
+ stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
9
+ <line id="Line_739" data-name="Line 739" x2="2.37" transform="translate(13.63 1.777)" fill="none" stroke="#4b4b4b"
10
+ stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
11
+ <line id="Line_740" data-name="Line 740" x2="10.07" transform="translate(0 1.777)" fill="none" stroke="#4b4b4b"
12
+ stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
13
+ <line id="Line_741" data-name="Line 741" x2="10.07" transform="translate(0 12.443)" fill="none" stroke="#4b4b4b"
14
+ stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
15
+ <line id="Line_742" data-name="Line 742" x2="2.37" transform="translate(13.63 12.443)" fill="none"
16
+ stroke="#4b4b4b" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
17
+ <path id="Path_38507" data-name="Path 38507"
18
+ d="M6.676,2.528A1.778,1.778,0,1,1,4.9.75,1.778,1.778,0,0,1,6.676,2.528Z" transform="translate(6.95 -0.75)"
19
+ fill="none" stroke="#4b4b4b" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
20
+ <path id="Path_38508" data-name="Path 38508"
21
+ d="M14.379,7.861A1.778,1.778,0,1,1,12.6,6.084,1.778,1.778,0,0,1,14.379,7.861Z"
22
+ transform="translate(-8.453 -0.75)" fill="none" stroke="#4b4b4b" stroke-linecap="round" stroke-linejoin="round"
23
+ stroke-width="1.5" />
24
+ <path id="Path_38509" data-name="Path 38509"
25
+ d="M6.676,13.194A1.778,1.778,0,1,1,4.9,11.417,1.778,1.778,0,0,1,6.676,13.194Z" transform="translate(6.95 -0.75)"
26
+ fill="none" stroke="#4b4b4b" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
27
+ </g>
28
+ </g>
29
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3.75 1.25H2.25C1.69772 1.25 1.25 1.69772 1.25 2.25V3.75C1.25 4.30228 1.69772 4.75 2.25 4.75H3.75C4.30228 4.75 4.75 4.30228 4.75 3.75V2.25C4.75 1.69772 4.30228 1.25 3.75 1.25Z" fill="#222222"/>
3
+ <path d="M9.75 1.25H8.25C7.69772 1.25 7.25 1.69772 7.25 2.25V3.75C7.25 4.30228 7.69772 4.75 8.25 4.75H9.75C10.3023 4.75 10.75 4.30228 10.75 3.75V2.25C10.75 1.69772 10.3023 1.25 9.75 1.25Z" fill="#222222"/>
4
+ <path d="M15.75 1.25H14.25C13.6977 1.25 13.25 1.69772 13.25 2.25V3.75C13.25 4.30228 13.6977 4.75 14.25 4.75H15.75C16.3023 4.75 16.75 4.30228 16.75 3.75V2.25C16.75 1.69772 16.3023 1.25 15.75 1.25Z" fill="#222222"/>
5
+ <path d="M3.75 7.25H2.25C1.69772 7.25 1.25 7.69772 1.25 8.25V9.75C1.25 10.3023 1.69772 10.75 2.25 10.75H3.75C4.30228 10.75 4.75 10.3023 4.75 9.75V8.25C4.75 7.69772 4.30228 7.25 3.75 7.25Z" fill="#222222"/>
6
+ <path d="M9.75 7.25H8.25C7.69772 7.25 7.25 7.69772 7.25 8.25V9.75C7.25 10.3023 7.69772 10.75 8.25 10.75H9.75C10.3023 10.75 10.75 10.3023 10.75 9.75V8.25C10.75 7.69772 10.3023 7.25 9.75 7.25Z" fill="#222222"/>
7
+ <path d="M15.75 7.25H14.25C13.6977 7.25 13.25 7.69772 13.25 8.25V9.75C13.25 10.3023 13.6977 10.75 14.25 10.75H15.75C16.3023 10.75 16.75 10.3023 16.75 9.75V8.25C16.75 7.69772 16.3023 7.25 15.75 7.25Z" fill="#222222"/>
8
+ <path d="M3.75 13.25H2.25C1.69772 13.25 1.25 13.6977 1.25 14.25V15.75C1.25 16.3023 1.69772 16.75 2.25 16.75H3.75C4.30228 16.75 4.75 16.3023 4.75 15.75V14.25C4.75 13.6977 4.30228 13.25 3.75 13.25Z" fill="#222222"/>
9
+ <path d="M9.75 13.25H8.25C7.69772 13.25 7.25 13.6977 7.25 14.25V15.75C7.25 16.3023 7.69772 16.75 8.25 16.75H9.75C10.3023 16.75 10.75 16.3023 10.75 15.75V14.25C10.75 13.6977 10.3023 13.25 9.75 13.25Z" fill="#222222"/>
10
+ <path d="M15.75 13.25H14.25C13.6977 13.25 13.25 13.6977 13.25 14.25V15.75C13.25 16.3023 13.6977 16.75 14.25 16.75H15.75C16.3023 16.75 16.75 16.3023 16.75 15.75V14.25C16.75 13.6977 16.3023 13.25 15.75 13.25Z" fill="#222222"/>
11
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle-fill" viewBox="0 0 16 16">
2
+ <path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.5 4H3.5C3.22386 4 3 4.22386 3 4.5V5.5C3 5.77614 3.22386 6 3.5 6H14.5C14.7761 6 15 5.77614 15 5.5V4.5C15 4.22386 14.7761 4 14.5 4Z" fill="#222222"/>
3
+ <path d="M14.5 8H3.5C3.22386 8 3 8.22386 3 8.5V9.5C3 9.77614 3.22386 10 3.5 10H14.5C14.7761 10 15 9.77614 15 9.5V8.5C15 8.22386 14.7761 8 14.5 8Z" fill="#222222"/>
4
+ <path d="M14.5 12H3.5C3.22386 12 3 12.2239 3 12.5V13.5C3 13.7761 3.22386 14 3.5 14H14.5C14.7761 14 15 13.7761 15 13.5V12.5C15 12.2239 14.7761 12 14.5 12Z" fill="#222222"/>
5
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <circle className="opacity-50" cx="12" cy="12" r="10" fill="white" stroke="white" stroke-width="4"></circle>
3
+ <path
4
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
5
+ </path>
6
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
2
+ <path fillRule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
3
+ clipRule="evenodd" />
4
+ </svg>
@@ -0,0 +1,18 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.158 16" stroke="currentColor">
2
+ <g id="icon-mini-sort" transform="translate(-4 -8)">
3
+ <rect id="Placement_area" data-name="Placement area" width="16" height="16" transform="translate(4 8)"
4
+ opacity="0.004" />
5
+ <g id="icon" transform="translate(-290.537 -358.082)">
6
+ <path id="Path_38562" data-name="Path 38562" d="M309.634,376.594l-1.5,1.5-1.5-1.5" stroke-linecap="round"
7
+ stroke-linejoin="round" stroke-width="1.5" />
8
+ <line id="Line_510" data-name="Line 510" x2="6.833" transform="translate(295.537 373.59)" stroke-linecap="round"
9
+ stroke-linejoin="round" stroke-width="1.5" />
10
+ <line id="Line_511" data-name="Line 511" x2="8.121" transform="translate(295.537 369.726)" stroke-linecap="round"
11
+ stroke-linejoin="round" stroke-width="1.5" />
12
+ <line id="Line_511-2" data-name="Line 511" y2="9.017" transform="translate(308.13 369.082)" stroke-linecap="round"
13
+ stroke-linejoin="round" stroke-width="1.5" />
14
+ <line id="Line_512" data-name="Line 512" x2="5.545" transform="translate(295.537 377.455)" stroke-linecap="round"
15
+ stroke-linejoin="round" stroke-width="1.5" />
16
+ </g>
17
+ </g>
18
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-triangle-fill" viewBox="0 0 16 16">
2
+ <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
2
+ <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
3
+ </svg>
package/src/index.jsx ADDED
@@ -0,0 +1,65 @@
1
+ /*
2
+ Copyright 2024 Adobe
3
+ All Rights Reserved.
4
+
5
+ NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ accordance with the terms of the Adobe license agreement accompanying
7
+ it.
8
+ */
9
+
10
+ //import { render } from 'react'; // Ensure we're using React
11
+ import React from 'react';
12
+
13
+ import './styles/index.css';
14
+
15
+ import { getUserViewHistory } from '../src/utils/getUserViewHistory';
16
+ import App from './containers/App';
17
+ import {
18
+ AttributeMetadataProvider,
19
+ CartProvider,
20
+ ProductsContextProvider,
21
+ SearchProvider,
22
+ StoreContextProvider,
23
+ } from './context/';
24
+ import Resize from './context/displayChange';
25
+ import Translation from './context/translation';
26
+ import { validateStoreDetailsKeys } from './utils/validateStoreDetails';
27
+
28
+ /**
29
+ * @param {{ storeDetails: object }} props
30
+ */
31
+ const LiveSearchPLP = ({ storeDetails }) => {
32
+ if (!storeDetails) {
33
+ throw new Error("Livesearch PLP's storeDetails prop was not provided");
34
+ }
35
+
36
+ const userViewHistory = getUserViewHistory();
37
+
38
+ const updatedStoreDetails = {
39
+ ...storeDetails,
40
+ context: {
41
+ ...storeDetails.context,
42
+ userViewHistory,
43
+ },
44
+ };
45
+
46
+ return (
47
+ <StoreContextProvider {...validateStoreDetailsKeys(updatedStoreDetails)}>
48
+ <AttributeMetadataProvider>
49
+ <SearchProvider>
50
+ <Resize>
51
+ <Translation>
52
+ <ProductsContextProvider>
53
+ <CartProvider>
54
+ <App />
55
+ </CartProvider>
56
+ </ProductsContextProvider>
57
+ </Translation>
58
+ </Resize>
59
+ </SearchProvider>
60
+ </AttributeMetadataProvider>
61
+ </StoreContextProvider>
62
+ );
63
+ };
64
+
65
+ export default LiveSearchPLP;
@@ -0,0 +1,10 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const GET_CUSTOMER_GROUP_CODE = gql`
4
+ query GetCustomerForLiveSearch {
5
+ customer {
6
+ id
7
+ group_code
8
+ }
9
+ }
10
+ `;
@@ -0,0 +1,13 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const GET_MAGENTO_EXTENSION_CONTEXT = gql`
4
+ query magentoExtensionContext {
5
+ magentoExtensionContext: dataServicesMagentoExtensionContext {
6
+ magento_extension_version
7
+ }
8
+ }
9
+ `;
10
+
11
+ export default {
12
+ getMagentoExtensionContext: GET_MAGENTO_EXTENSION_CONTEXT
13
+ };
@@ -0,0 +1,14 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const RESOLVE_PAGE_TYPE = gql`
4
+ query ResolveURL($url: String!) {
5
+ urlResolver(url: $url) {
6
+ id
7
+ type
8
+ }
9
+ }
10
+ `;
11
+
12
+ export default {
13
+ resolvePagetypeQuery: RESOLVE_PAGE_TYPE
14
+ };
@@ -0,0 +1,27 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const GET_STOREFRONT_CONTEXT = gql`
4
+ query storefrontContext {
5
+ storefrontInstanceContext: dataServicesStorefrontInstanceContext {
6
+ catalog_extension_version
7
+ environment
8
+ environment_id
9
+ store_code
10
+ store_id
11
+ store_name
12
+ store_url
13
+ store_view_code
14
+ store_view_id
15
+ store_view_name
16
+ website_code
17
+ website_id
18
+ website_name
19
+ store_view_currency_code
20
+ base_currency_code
21
+ }
22
+ }
23
+ `;
24
+
25
+ export default {
26
+ getStorefrontContext: GET_STOREFRONT_CONTEXT
27
+ };
@@ -0,0 +1,3 @@
1
+ export * from './customerGroupCode.gql';
2
+ export * from './liveSearchPlpConfigs.gql';
3
+ export * from './liveSearchPopoverConfigs.gql';
@@ -0,0 +1,30 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const GET_STORE_CONFIG_FOR_PLP = gql`
4
+ query GetStoreConfigForLiveSearchPLP {
5
+ storeConfig {
6
+ id
7
+ ls_service_api_key
8
+ ls_environment_type
9
+ ls_environment_id
10
+ website_code
11
+ store_group_code
12
+ store_code
13
+ ls_autocomplete_limit
14
+ ls_min_query_length
15
+ #currency_symbol
16
+ base_currency_code
17
+ #currency_rate
18
+ ls_display_out_of_stock
19
+ ls_allow_all
20
+ ls_locale
21
+ ls_page_size_options
22
+ ls_page_size_default
23
+ base_url
24
+ }
25
+ currency {
26
+ default_display_currency_code
27
+ default_display_currency_symbol
28
+ }
29
+ }
30
+ `;
@@ -0,0 +1,28 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const GET_STORE_CONFIG_FOR_LIVE_SEARCH_POPOVER = gql`
4
+ query GetStoreConfigForLiveSearchPopover {
5
+ storeConfig {
6
+ id
7
+ ls_environment_id
8
+ website_code
9
+ store_group_code
10
+ store_code
11
+ ls_autocomplete_limit
12
+ ls_min_query_length
13
+ #currency_symbol
14
+ base_currency_code
15
+ #currency_rate
16
+ ls_display_out_of_stock
17
+ ls_allow_all
18
+ ls_locale
19
+ ls_page_size_options
20
+ ls_page_size_default
21
+ base_url
22
+ }
23
+ currency {
24
+ default_display_currency_code
25
+ default_display_currency_symbol
26
+ }
27
+ }
28
+ `;