@usereactify/search 5.59.1-beta.0 → 5.60.0-beta.1

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 (273) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/package.json +5 -7
  3. package/dist/src/components/ClearAll/ClearAll.d.ts +1 -1
  4. package/dist/src/components/ClearAll/ClearAll.js +9 -4
  5. package/dist/src/components/ClearAll/ClearAll.js.map +1 -1
  6. package/dist/src/components/CustomComponent/CustomComponent.d.ts +1 -1
  7. package/dist/src/components/CustomComponent/CustomComponent.js +2 -2
  8. package/dist/src/components/CustomComponent/CustomComponent.js.map +1 -1
  9. package/dist/src/components/Example/ExampleClearAll.d.ts +2 -2
  10. package/dist/src/components/Example/ExampleClearAll.js +5 -2
  11. package/dist/src/components/Example/ExampleClearAll.js.map +1 -1
  12. package/dist/src/components/Example/ExampleCustomComponent.d.ts +1 -1
  13. package/dist/src/components/Example/ExampleCustomComponent.js +7 -3
  14. package/dist/src/components/Example/ExampleCustomComponent.js.map +1 -1
  15. package/dist/src/components/Example/ExampleFilterList.d.ts +2 -2
  16. package/dist/src/components/Example/ExampleFilterList.js +66 -31
  17. package/dist/src/components/Example/ExampleFilterList.js.map +1 -1
  18. package/dist/src/components/Example/ExampleFilterRange.d.ts +2 -2
  19. package/dist/src/components/Example/ExampleFilterRange.js +12 -2
  20. package/dist/src/components/Example/ExampleFilterRange.js.map +1 -1
  21. package/dist/src/components/Example/ExampleFilterSlider.d.ts +2 -2
  22. package/dist/src/components/Example/ExampleFilterSlider.js +18 -11
  23. package/dist/src/components/Example/ExampleFilterSlider.js.map +1 -1
  24. package/dist/src/components/Example/ExampleFilters.d.ts +1 -1
  25. package/dist/src/components/Example/ExampleFilters.js +8 -3
  26. package/dist/src/components/Example/ExampleFilters.js.map +1 -1
  27. package/dist/src/components/Example/ExampleFiltersSelected.d.ts +2 -2
  28. package/dist/src/components/Example/ExampleFiltersSelected.js +24 -3
  29. package/dist/src/components/Example/ExampleFiltersSelected.js.map +1 -1
  30. package/dist/src/components/Example/ExampleHookUseFilters.d.ts +1 -1
  31. package/dist/src/components/Example/ExampleHookUseFilters.js +10 -3
  32. package/dist/src/components/Example/ExampleHookUseFilters.js.map +1 -1
  33. package/dist/src/components/Example/ExampleHookUseResults.d.ts +1 -1
  34. package/dist/src/components/Example/ExampleHookUseResults.js +8 -3
  35. package/dist/src/components/Example/ExampleHookUseResults.js.map +1 -1
  36. package/dist/src/components/Example/ExampleHookUseSearch.js +2 -2
  37. package/dist/src/components/Example/ExampleHookUseSearch.js.map +1 -1
  38. package/dist/src/components/Example/ExampleHookUseSortBy.js +1 -2
  39. package/dist/src/components/Example/ExampleHookUseSortBy.js.map +1 -1
  40. package/dist/src/components/Example/ExampleProductCardWeight.d.ts +1 -1
  41. package/dist/src/components/Example/ExampleProductCardWeight.js +47 -14
  42. package/dist/src/components/Example/ExampleProductCardWeight.js.map +1 -1
  43. package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.d.ts +1 -1
  44. package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.js +6 -2
  45. package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.js.map +1 -1
  46. package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.d.ts +1 -1
  47. package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.js +6 -2
  48. package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.js.map +1 -1
  49. package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.d.ts +1 -1
  50. package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.js +6 -2
  51. package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.js.map +1 -1
  52. package/dist/src/components/Example/ExampleResultCardCallout.d.ts +1 -1
  53. package/dist/src/components/Example/ExampleResultCardCallout.js +4 -2
  54. package/dist/src/components/Example/ExampleResultCardCallout.js.map +1 -1
  55. package/dist/src/components/Example/ExampleResultCardProduct.d.ts +2 -2
  56. package/dist/src/components/Example/ExampleResultCardProduct.js +12 -2
  57. package/dist/src/components/Example/ExampleResultCardProduct.js.map +1 -1
  58. package/dist/src/components/Example/ExampleResultPaginationInfiniteScroll.d.ts +2 -2
  59. package/dist/src/components/Example/ExampleResultPaginationInfiniteScroll.js +5 -2
  60. package/dist/src/components/Example/ExampleResultPaginationInfiniteScroll.js.map +1 -1
  61. package/dist/src/components/Example/ExampleResultPaginationLoadMore.d.ts +2 -2
  62. package/dist/src/components/Example/ExampleResultPaginationLoadMore.js +5 -2
  63. package/dist/src/components/Example/ExampleResultPaginationLoadMore.js.map +1 -1
  64. package/dist/src/components/Example/ExampleResultPaginationNextPrev.d.ts +2 -2
  65. package/dist/src/components/Example/ExampleResultPaginationNextPrev.js +7 -2
  66. package/dist/src/components/Example/ExampleResultPaginationNextPrev.js.map +1 -1
  67. package/dist/src/components/Example/ExampleResultPaginationNumbered.d.ts +2 -2
  68. package/dist/src/components/Example/ExampleResultPaginationNumbered.js +20 -6
  69. package/dist/src/components/Example/ExampleResultPaginationNumbered.js.map +1 -1
  70. package/dist/src/components/Example/ExampleResults.d.ts +1 -1
  71. package/dist/src/components/Example/ExampleResults.js +10 -7
  72. package/dist/src/components/Example/ExampleResults.js.map +1 -1
  73. package/dist/src/components/Example/ExampleSearch.d.ts +1 -1
  74. package/dist/src/components/Example/ExampleSearch.js +2 -2
  75. package/dist/src/components/Example/ExampleSearch.js.map +1 -1
  76. package/dist/src/components/Example/ExampleSortBy.d.ts +2 -2
  77. package/dist/src/components/Example/ExampleSortBy.js +5 -2
  78. package/dist/src/components/Example/ExampleSortBy.js.map +1 -1
  79. package/dist/src/components/Example/ExampleStats.d.ts +2 -2
  80. package/dist/src/components/Example/ExampleStats.js +8 -2
  81. package/dist/src/components/Example/ExampleStats.js.map +1 -1
  82. package/dist/src/components/Example/ExampleSuggestions.d.ts +2 -2
  83. package/dist/src/components/Example/ExampleSuggestions.js +7 -2
  84. package/dist/src/components/Example/ExampleSuggestions.js.map +1 -1
  85. package/dist/src/components/Example/index.d.ts +6 -6
  86. package/dist/src/components/Example/index.js +6 -6
  87. package/dist/src/components/Example/index.js.map +1 -1
  88. package/dist/src/components/Filter/Filter.d.ts +1 -1
  89. package/dist/src/components/Filter/Filter.js +35 -30
  90. package/dist/src/components/Filter/Filter.js.map +1 -1
  91. package/dist/src/components/Filter/Filters.d.ts +4 -4
  92. package/dist/src/components/Filter/Filters.js +6 -3
  93. package/dist/src/components/Filter/Filters.js.map +1 -1
  94. package/dist/src/components/Filter/FiltersSelected.d.ts +1 -1
  95. package/dist/src/components/Filter/FiltersSelected.js +9 -4
  96. package/dist/src/components/Filter/FiltersSelected.js.map +1 -1
  97. package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.d.ts +2 -2
  98. package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js +8 -20
  99. package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js.map +1 -1
  100. package/dist/src/components/Result/ResultCardCallout.d.ts +2 -2
  101. package/dist/src/components/Result/ResultCardCallout.js +2 -3
  102. package/dist/src/components/Result/ResultCardCallout.js.map +1 -1
  103. package/dist/src/components/Result/ResultCardProduct.d.ts +1 -1
  104. package/dist/src/components/Result/ResultCardProduct.js +3 -4
  105. package/dist/src/components/Result/ResultCardProduct.js.map +1 -1
  106. package/dist/src/components/Result/ResultPaginationInfiniteScroll.d.ts +3 -3
  107. package/dist/src/components/Result/ResultPaginationInfiniteScroll.js +6 -3
  108. package/dist/src/components/Result/ResultPaginationInfiniteScroll.js.map +1 -1
  109. package/dist/src/components/Result/ResultPaginationLoadMore.d.ts +3 -3
  110. package/dist/src/components/Result/ResultPaginationLoadMore.js +6 -3
  111. package/dist/src/components/Result/ResultPaginationLoadMore.js.map +1 -1
  112. package/dist/src/components/Result/ResultPaginationNextPrev.d.ts +3 -3
  113. package/dist/src/components/Result/ResultPaginationNextPrev.js +6 -3
  114. package/dist/src/components/Result/ResultPaginationNextPrev.js.map +1 -1
  115. package/dist/src/components/Result/ResultPaginationNumbered.d.ts +3 -3
  116. package/dist/src/components/Result/ResultPaginationNumbered.js +6 -3
  117. package/dist/src/components/Result/ResultPaginationNumbered.js.map +1 -1
  118. package/dist/src/components/Result/ResultStateProvider.d.ts +2 -2
  119. package/dist/src/components/Result/ResultStateProvider.js +3 -3
  120. package/dist/src/components/Result/ResultStateProvider.js.map +1 -1
  121. package/dist/src/components/Result/Results.d.ts +2 -2
  122. package/dist/src/components/Result/Results.js +52 -50
  123. package/dist/src/components/Result/Results.js.map +1 -1
  124. package/dist/src/components/Result/index.d.ts +4 -4
  125. package/dist/src/components/Result/index.js +4 -4
  126. package/dist/src/components/Result/index.js.map +1 -1
  127. package/dist/src/components/Search/Search.d.ts +1 -1
  128. package/dist/src/components/Search/Search.js +6 -3
  129. package/dist/src/components/Search/Search.js.map +1 -1
  130. package/dist/src/components/Sensor/SensorCollection.d.ts +1 -1
  131. package/dist/src/components/Sensor/SensorCollection.js +2 -2
  132. package/dist/src/components/Sensor/SensorCollection.js.map +1 -1
  133. package/dist/src/components/Sensor/SensorCustom.d.ts +2 -1
  134. package/dist/src/components/Sensor/SensorCustom.js +6 -5
  135. package/dist/src/components/Sensor/SensorCustom.js.map +1 -1
  136. package/dist/src/components/Sensor/SensorExplain.js +2 -2
  137. package/dist/src/components/Sensor/SensorExplain.js.map +1 -1
  138. package/dist/src/components/Sensor/SensorInventoryAvailable.d.ts +1 -1
  139. package/dist/src/components/Sensor/SensorInventoryAvailable.js +2 -2
  140. package/dist/src/components/Sensor/SensorInventoryAvailable.js.map +1 -1
  141. package/dist/src/components/Sensor/SensorPublished.d.ts +1 -1
  142. package/dist/src/components/Sensor/SensorPublished.js +2 -2
  143. package/dist/src/components/Sensor/SensorPublished.js.map +1 -1
  144. package/dist/src/components/Sensor/SensorSearchTerm.js +29 -6
  145. package/dist/src/components/Sensor/SensorSearchTerm.js.map +1 -1
  146. package/dist/src/components/Sensor/SensorSort.d.ts +1 -1
  147. package/dist/src/components/Sensor/SensorSort.js +2 -2
  148. package/dist/src/components/Sensor/SensorSort.js.map +1 -1
  149. package/dist/src/components/Sensor/Sensors.js +23 -8
  150. package/dist/src/components/Sensor/Sensors.js.map +1 -1
  151. package/dist/src/components/Sensor/index.d.ts +7 -7
  152. package/dist/src/components/Sensor/index.js +6 -6
  153. package/dist/src/components/Sensor/index.js.map +1 -1
  154. package/dist/src/components/SortBy/SortBy.d.ts +1 -1
  155. package/dist/src/components/SortBy/SortBy.js +6 -3
  156. package/dist/src/components/SortBy/SortBy.js.map +1 -1
  157. package/dist/src/components/Stats/Stats.d.ts +2 -2
  158. package/dist/src/components/Stats/Stats.js +5 -2
  159. package/dist/src/components/Stats/Stats.js.map +1 -1
  160. package/dist/src/components/Suggestions/Suggestions.d.ts +1 -1
  161. package/dist/src/components/Suggestions/Suggestions.js +8 -7
  162. package/dist/src/components/Suggestions/Suggestions.js.map +1 -1
  163. package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.d.ts +1 -1
  164. package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js +3 -3
  165. package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js.map +1 -1
  166. package/dist/src/components/Utility/index.js.map +1 -1
  167. package/dist/src/components/index.d.ts +2 -2
  168. package/dist/src/components/index.js +2 -2
  169. package/dist/src/components/index.js.map +1 -1
  170. package/dist/src/hooks/index.d.ts +11 -11
  171. package/dist/src/hooks/index.js +11 -11
  172. package/dist/src/hooks/index.js.map +1 -1
  173. package/dist/src/hooks/react-slider/useReactSliderProps.d.ts +2 -2
  174. package/dist/src/hooks/react-slider/useReactSliderProps.js +6 -6
  175. package/dist/src/hooks/react-slider/useReactSliderProps.js.map +1 -1
  176. package/dist/src/hooks/reactivesearch/useReactiveBaseProps.d.ts +1 -1
  177. package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js +2 -2
  178. package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js.map +1 -1
  179. package/dist/src/hooks/useAnalytics.js.map +1 -1
  180. package/dist/src/hooks/useConfig.d.ts +1 -1
  181. package/dist/src/hooks/useConfig.js +1 -1
  182. package/dist/src/hooks/useConfig.js.map +1 -1
  183. package/dist/src/hooks/useCuration.d.ts +1 -1
  184. package/dist/src/hooks/useCuration.js +25 -9
  185. package/dist/src/hooks/useCuration.js.map +1 -1
  186. package/dist/src/hooks/useDebugger.js +3 -3
  187. package/dist/src/hooks/useDebugger.js.map +1 -1
  188. package/dist/src/hooks/useFilterCollapsedState.d.ts +1 -1
  189. package/dist/src/hooks/useFilterCollapsedState.js.map +1 -1
  190. package/dist/src/hooks/useFilterListProps.d.ts +2 -2
  191. package/dist/src/hooks/useFilterListProps.js +11 -7
  192. package/dist/src/hooks/useFilterListProps.js.map +1 -1
  193. package/dist/src/hooks/useFilterRangeProps.d.ts +1 -1
  194. package/dist/src/hooks/useFilterRangeProps.js +14 -11
  195. package/dist/src/hooks/useFilterRangeProps.js.map +1 -1
  196. package/dist/src/hooks/useFilterSliderProps.d.ts +1 -1
  197. package/dist/src/hooks/useFilterSliderProps.js +9 -10
  198. package/dist/src/hooks/useFilterSliderProps.js.map +1 -1
  199. package/dist/src/hooks/useFilters.d.ts +1 -1
  200. package/dist/src/hooks/useFilters.js +7 -4
  201. package/dist/src/hooks/useFilters.js.map +1 -1
  202. package/dist/src/hooks/useIndices.js +2 -2
  203. package/dist/src/hooks/useIndices.js.map +1 -1
  204. package/dist/src/hooks/usePagination.d.ts +1 -1
  205. package/dist/src/hooks/usePagination.js +14 -6
  206. package/dist/src/hooks/usePagination.js.map +1 -1
  207. package/dist/src/hooks/usePaginationLoadable.d.ts +1 -1
  208. package/dist/src/hooks/usePaginationLoadable.js +5 -3
  209. package/dist/src/hooks/usePaginationLoadable.js.map +1 -1
  210. package/dist/src/hooks/useProductPrice.d.ts +1 -1
  211. package/dist/src/hooks/useProductPrice.js +1 -3
  212. package/dist/src/hooks/useProductPrice.js.map +1 -1
  213. package/dist/src/hooks/useReactifySearchContext.d.ts +1 -1
  214. package/dist/src/hooks/useReactifySearchContext.js.map +1 -1
  215. package/dist/src/hooks/useResults.d.ts +1 -1
  216. package/dist/src/hooks/useResults.js +4 -4
  217. package/dist/src/hooks/useResults.js.map +1 -1
  218. package/dist/src/hooks/useSearch.d.ts +1 -1
  219. package/dist/src/hooks/useSearch.js +9 -8
  220. package/dist/src/hooks/useSearch.js.map +1 -1
  221. package/dist/src/hooks/useSortBy.d.ts +1 -1
  222. package/dist/src/hooks/useSortBy.js +1 -1
  223. package/dist/src/hooks/useSortBy.js.map +1 -1
  224. package/dist/src/index.js.map +1 -1
  225. package/dist/src/search-request-builder/base-builders.d.ts +2 -2
  226. package/dist/src/search-request-builder/base-builders.js +2 -2
  227. package/dist/src/search-request-builder/base-builders.js.map +1 -1
  228. package/dist/src/search-request-builder/curation-builders.d.ts +1 -1
  229. package/dist/src/search-request-builder/curation-builders.js +1 -1
  230. package/dist/src/search-request-builder/curation-builders.js.map +1 -1
  231. package/dist/src/search-request-builder/index.d.ts +2 -2
  232. package/dist/src/search-request-builder/index.js +2 -2
  233. package/dist/src/search-request-builder/index.js.map +1 -1
  234. package/dist/src/search-request-builder/search-request-builder.d.ts +1 -1
  235. package/dist/src/search-request-builder/search-request-builder.js.map +1 -1
  236. package/dist/src/search-request-builder/types.d.ts +3 -3
  237. package/dist/src/search-request-builder/types.js.map +1 -1
  238. package/dist/src/search-request-builder/utils.d.ts +2 -2
  239. package/dist/src/search-request-builder/utils.js +1 -1
  240. package/dist/src/search-request-builder/utils.js.map +1 -1
  241. package/dist/src/types/config.d.ts +1 -1
  242. package/dist/src/types/config.js.map +1 -1
  243. package/dist/src/types/elastic.d.ts +2 -2
  244. package/dist/src/types/elastic.js.map +1 -1
  245. package/dist/src/types/firestore.d.ts +3 -3
  246. package/dist/src/types/firestore.js.map +1 -1
  247. package/dist/src/types/index.js.map +1 -1
  248. package/dist/src/types/reactivesearch.d.ts +1 -1
  249. package/dist/src/types/reactivesearch.js.map +1 -1
  250. package/dist/src/types/shopify.d.ts +1 -1
  251. package/dist/src/types/shopify.js.map +1 -1
  252. package/dist/src/utility/config.d.ts +1 -1
  253. package/dist/src/utility/config.js +1 -1
  254. package/dist/src/utility/config.js.map +1 -1
  255. package/dist/src/utility/curation.d.ts +2 -2
  256. package/dist/src/utility/curation.js +1 -1
  257. package/dist/src/utility/curation.js.map +1 -1
  258. package/dist/src/utility/debug.js +1 -1
  259. package/dist/src/utility/debug.js.map +1 -1
  260. package/dist/src/utility/filters.d.ts +2 -2
  261. package/dist/src/utility/filters.js.map +1 -1
  262. package/dist/src/utility/liquid.d.ts +2 -2
  263. package/dist/src/utility/liquid.js +5 -2
  264. package/dist/src/utility/liquid.js.map +1 -1
  265. package/dist/src/utility/props.d.ts +2 -2
  266. package/dist/src/utility/props.js +8 -8
  267. package/dist/src/utility/props.js.map +1 -1
  268. package/dist/src/utility/server.d.ts +1 -1
  269. package/dist/src/utility/server.js +3 -3
  270. package/dist/src/utility/server.js.map +1 -1
  271. package/dist/src/utility/sortOption.d.ts +2 -2
  272. package/dist/src/utility/sortOption.js.map +1 -1
  273. package/package.json +5 -7
@@ -1,13 +1,18 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleFilters = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
8
+ const Filter_1 = require("../Filter");
5
9
  const ExampleFilterList_1 = require("./ExampleFilterList");
6
10
  const ExampleFilterRange_1 = require("./ExampleFilterRange");
7
11
  const ExampleFilterSlider_1 = require("./ExampleFilterSlider");
8
- const Filter_1 = require("../Filter");
9
12
  const ExampleFilters = () => {
10
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { children: "Filters" }), (0, jsx_runtime_1.jsx)(Filter_1.Filters, { renderFilterList: ExampleFilterList_1.ExampleFilterList, renderFilterRange: ExampleFilterRange_1.ExampleFilterRange, renderFilterSlider: ExampleFilterSlider_1.ExampleFilterSlider })] }));
13
+ return (react_1.default.createElement("div", null,
14
+ react_1.default.createElement("h3", null, "Filters"),
15
+ react_1.default.createElement(Filter_1.Filters, { renderFilterList: ExampleFilterList_1.ExampleFilterList, renderFilterRange: ExampleFilterRange_1.ExampleFilterRange, renderFilterSlider: ExampleFilterSlider_1.ExampleFilterSlider })));
11
16
  };
12
17
  exports.ExampleFilters = ExampleFilters;
13
18
  //# sourceMappingURL=ExampleFilters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilters.tsx"],"names":[],"mappings":";;;;AACA,2DAAwD;AACxD,6DAA0D;AAC1D,+DAA4D;AAC5D,sCAAoC;AAE7B,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,OAAO,CACL,4CACE,yCAAK,SAAS,GAAM,EACpB,uBAAC,gBAAO,IACN,gBAAgB,EAAE,qCAAiB,EACnC,iBAAiB,EAAE,uCAAkB,EACrC,kBAAkB,EAAE,yCAAmB,GACvC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,cAAc,kBAWzB","sourcesContent":["import type React from \"react\";\nimport { ExampleFilterList } from \"./ExampleFilterList\";\nimport { ExampleFilterRange } from \"./ExampleFilterRange\";\nimport { ExampleFilterSlider } from \"./ExampleFilterSlider\";\nimport { Filters } from \"../Filter\";\n\nexport const ExampleFilters: React.FC = () => {\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n <Filters\n renderFilterList={ExampleFilterList}\n renderFilterRange={ExampleFilterRange}\n renderFilterSlider={ExampleFilterSlider}\n />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilters.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,sCAAoC;AAEpC,2DAAwD;AACxD,6DAA0D;AAC1D,+DAA4D;AAErD,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,OAAO,CACL;QACE,0CAAK,SAAS,CAAM;QACpB,8BAAC,gBAAO,IACN,gBAAgB,EAAE,qCAAiB,EACnC,iBAAiB,EAAE,uCAAkB,EACrC,kBAAkB,EAAE,yCAAmB,GACvC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,cAAc,kBAWzB","sourcesContent":["import React from \"react\";\nimport { Filters } from \"../Filter\";\n\nimport { ExampleFilterList } from \"./ExampleFilterList\";\nimport { ExampleFilterRange } from \"./ExampleFilterRange\";\nimport { ExampleFilterSlider } from \"./ExampleFilterSlider\";\n\nexport const ExampleFilters: React.FC = () => {\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n <Filters\n renderFilterList={ExampleFilterList}\n renderFilterRange={ExampleFilterRange}\n renderFilterSlider={ExampleFilterSlider}\n />\n </div>\n );\n};\n"]}
@@ -1,4 +1,4 @@
1
- import type React from "react";
2
- import type { FiltersSelectedProps } from "../../components";
1
+ import React from "react";
2
+ import { FiltersSelectedProps } from "../../components";
3
3
  export type ExampleFiltersSelectedProps = React.ComponentProps<NonNullable<FiltersSelectedProps["render"]>>;
4
4
  export declare const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps>;
@@ -1,16 +1,37 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleFiltersSelected = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
5
8
  const hooks_1 = require("../../hooks");
6
9
  const ExampleFiltersSelected = (props) => {
7
- return ((0, jsx_runtime_1.jsxs)("div", { className: "rs__filters-selected", children: [(0, jsx_runtime_1.jsx)("h3", { className: "rs__filters-selected__name", children: "Filters Selected" }), (0, jsx_runtime_1.jsx)("ul", { className: "rs__filters-selected__list", children: props.selectedFilters.map((selectedFilter) => ((0, jsx_runtime_1.jsx)(ExampleFiltersSelectedItem, { handleRemove: props.handleRemove, selectedFilter: selectedFilter }, selectedFilter.key + selectedFilter.value))) })] }));
10
+ return (react_1.default.createElement("div", { className: "rs__filters-selected" },
11
+ react_1.default.createElement("h3", { className: "rs__filters-selected__name" }, "Filters Selected"),
12
+ react_1.default.createElement("ul", { className: "rs__filters-selected__list" }, props.selectedFilters.map((selectedFilter) => (react_1.default.createElement(ExampleFiltersSelectedItem, { key: selectedFilter.key + selectedFilter.value, selectedFilter: selectedFilter, handleRemove: props.handleRemove }))))));
8
13
  };
9
14
  exports.ExampleFiltersSelected = ExampleFiltersSelected;
10
15
  const ExampleFiltersSelectedItem = (props) => {
11
16
  var _a;
12
17
  const filtersHook = (0, hooks_1.useFilters)();
13
18
  const filter = (_a = filtersHook.filters) === null || _a === void 0 ? void 0 : _a.find((filter) => filter.handle === props.selectedFilter.key);
14
- return ((0, jsx_runtime_1.jsx)("li", { className: "rs__filters-selected__list-item", children: (0, jsx_runtime_1.jsxs)("label", { className: "rs__filters-selected__list-item-label", children: [(0, jsx_runtime_1.jsxs)("span", { className: "rs__filters-selected__list-item-label", onClick: () => props.handleRemove(props.selectedFilter.key), children: [props.selectedFilter.label, ": "] }), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView === "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: (0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [props.selectedFilter.value.label]), children: props.selectedFilter.value.label }) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView !== "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: (0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [props.selectedFilter.value]), children: props.selectedFilter.value }) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView === "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: props.selectedFilter.value.map((value) => ((0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [value.label]), children: value.label }, value.label))) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView !== "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: props.selectedFilter.value.map((value) => ((0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [value]), children: value }, value))) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "slider" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: (0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [""]), children: `${filter.displaySliderPrefix}${props.selectedFilter.value[0]} to ${filter.displaySliderPrefix}${props.selectedFilter.value[1]}` }) }))] }) }));
19
+ return (react_1.default.createElement("li", { className: "rs__filters-selected__list-item" },
20
+ react_1.default.createElement("label", { className: "rs__filters-selected__list-item-label" },
21
+ react_1.default.createElement("span", { className: "rs__filters-selected__list-item-label", onClick: () => props.handleRemove(props.selectedFilter.key) },
22
+ props.selectedFilter.label,
23
+ ": "),
24
+ (filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView === "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" },
25
+ react_1.default.createElement("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [
26
+ props.selectedFilter.value.label,
27
+ ]) }, props.selectedFilter.value.label))),
28
+ (filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView !== "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" },
29
+ react_1.default.createElement("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [
30
+ props.selectedFilter.value,
31
+ ]) }, props.selectedFilter.value))),
32
+ (filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView === "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" }, props.selectedFilter.value.map((value) => (react_1.default.createElement("span", { key: value.label, onClick: () => props.handleRemove(props.selectedFilter.key, [value.label]) }, value.label))))),
33
+ (filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView !== "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" }, props.selectedFilter.value.map((value) => (react_1.default.createElement("span", { key: value, onClick: () => props.handleRemove(props.selectedFilter.key, [value]) }, value))))),
34
+ (filter === null || filter === void 0 ? void 0 : filter.displayType) === "slider" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" },
35
+ react_1.default.createElement("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [""]) }, `${filter.displaySliderPrefix}${props.selectedFilter.value[0]} to ${filter.displaySliderPrefix}${props.selectedFilter.value[1]}`))))));
15
36
  };
16
37
  //# sourceMappingURL=ExampleFiltersSelected.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleFiltersSelected.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFiltersSelected.tsx"],"names":[],"mappings":";;;;AAEA,uCAAyC;AAIlC,MAAM,sBAAsB,GAA0C,CAAC,KAAK,EAAE,EAAE;IACrF,OAAO,CACL,iCAAK,SAAS,EAAC,sBAAsB,aACnC,+BAAI,SAAS,EAAC,4BAA4B,YAAE,kBAAkB,GAAM,EACpE,+BAAI,SAAS,EAAC,4BAA4B,YACvC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAC7C,uBAAC,0BAA0B,IACzB,YAAY,EAAE,KAAK,CAAC,YAAY,EAEhC,cAAc,EAAE,cAAc,IADzB,cAAc,CAAC,GAAG,GAAG,cAAc,CAAC,KAAK,CAE9C,CACH,CAAC,GACC,IACD,CACP,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,sBAAsB,0BAejC;AAOF,M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,CAAC,KAAa,CAAC,CAAC,CAAC,EAAE,GACvE,GACF,CACR,IACK,GACL,CACN,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type React from \"react\";\nimport type { FiltersSelectedProps } from \"../../components\";\nimport { useFilters } from \"../../hooks\";\n\nexport type ExampleFiltersSelectedProps = React.ComponentProps<NonNullable<FiltersSelectedProps[\"render\"]>>;\n\nexport const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps> = (props) => {\n return (\n <div className=\"rs__filters-selected\">\n <h3 className=\"rs__filters-selected__name\">{\"Filters Selected\"}</h3>\n <ul className=\"rs__filters-selected__list\">\n {props.selectedFilters.map((selectedFilter) => (\n <ExampleFiltersSelectedItem\n handleRemove={props.handleRemove}\n key={selectedFilter.key + selectedFilter.value}\n selectedFilter={selectedFilter}\n />\n ))}\n </ul>\n </div>\n );\n};\n\ntype ExampleFiltersSelectedItemProps = {\n selectedFilter: ExampleFiltersSelectedProps[\"selectedFilters\"][number];\n handleRemove: ExampleFiltersSelectedProps[\"handleRemove\"];\n};\n\nconst ExampleFiltersSelectedItem: React.FC<ExampleFiltersSelectedItemProps> = (props) => {\n const filtersHook = useFilters();\n const filter = filtersHook.filters?.find((filter) => filter.handle === props.selectedFilter.key);\n\n return (\n <li className=\"rs__filters-selected__list-item\">\n <label className=\"rs__filters-selected__list-item-label\">\n <span\n className=\"rs__filters-selected__list-item-label\"\n onClick={() => props.handleRemove(props.selectedFilter.key)}\n >\n {props.selectedFilter.label}\n {\": \"}\n </span>\n\n {filter?.displayType === \"single\" && filter.displayView === \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [(props.selectedFilter.value as { label: string }).label])\n }\n >\n {(props.selectedFilter.value as { label: string }).label}\n </span>\n </span>\n )}\n {filter?.displayType === \"single\" && filter.displayView !== \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span onClick={() => props.handleRemove(props.selectedFilter.key, [props.selectedFilter.value as string])}>\n {props.selectedFilter.value as string}\n </span>\n </span>\n )}\n {filter?.displayType === \"multi\" && filter.displayView === \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n {(props.selectedFilter.value as Array<{ label: string }>).map((value) => (\n <span key={value.label} onClick={() => props.handleRemove(props.selectedFilter.key, [value.label])}>\n {value.label}\n </span>\n ))}\n </span>\n )}\n {filter?.displayType === \"multi\" && filter.displayView !== \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n {(props.selectedFilter.value as Array<string>).map((value) => (\n <span key={value} onClick={() => props.handleRemove(props.selectedFilter.key, [value])}>\n {value}\n </span>\n ))}\n </span>\n )}\n {filter?.displayType === \"slider\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span onClick={() => props.handleRemove(props.selectedFilter.key, [\"\"])}>\n {`${filter.displaySliderPrefix}${\n (props.selectedFilter.value as any)[0]\n } to ${filter.displaySliderPrefix}${(props.selectedFilter.value as any)[1]}`}\n </span>\n </span>\n )}\n </label>\n </li>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleFiltersSelected.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFiltersSelected.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,uCAAyC;AAMlC,MAAM,sBAAsB,GAA0C,CAC3E,KAAK,EACL,EAAE;IACF,OAAO,CACL,uCAAK,SAAS,EAAC,sBAAsB;QACnC,sCAAI,SAAS,EAAC,4BAA4B,IAAE,kBAAkB,CAAM;QACpE,sCAAI,SAAS,EAAC,4BAA4B,IACvC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAC7C,8BAAC,0BAA0B,IACzB,GAAG,EAAE,cAAc,CAAC,GAAG,GAAG,cAAc,CAAC,KAAK,EAC9C,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,KAAK,CAAC,YAAY,GAChC,CACH,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC,CAAC;A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C,CAAC,CACvC,OAAO,MAAM,CAAC,mBAAmB,GAC9B,KAAK,CAAC,cAAc,CAAC,KAAa,CAAC,CAAC,CACvC,EAAE,CACG,CACF,CACR,CACK,CACL,CACN,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from \"react\";\n\nimport { FiltersSelectedProps } from \"../../components\";\nimport { useFilters } from \"../../hooks\";\n\nexport type ExampleFiltersSelectedProps = React.ComponentProps<\n NonNullable<FiltersSelectedProps[\"render\"]>\n>;\n\nexport const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps> = (\n props\n) => {\n return (\n <div className=\"rs__filters-selected\">\n <h3 className=\"rs__filters-selected__name\">{\"Filters Selected\"}</h3>\n <ul className=\"rs__filters-selected__list\">\n {props.selectedFilters.map((selectedFilter) => (\n <ExampleFiltersSelectedItem\n key={selectedFilter.key + selectedFilter.value}\n selectedFilter={selectedFilter}\n handleRemove={props.handleRemove}\n />\n ))}\n </ul>\n </div>\n );\n};\n\ntype ExampleFiltersSelectedItemProps = {\n selectedFilter: ExampleFiltersSelectedProps[\"selectedFilters\"][number];\n handleRemove: ExampleFiltersSelectedProps[\"handleRemove\"];\n};\n\nconst ExampleFiltersSelectedItem: React.FC<ExampleFiltersSelectedItemProps> = (\n props\n) => {\n const filtersHook = useFilters();\n const filter = filtersHook.filters?.find(\n (filter) => filter.handle === props.selectedFilter.key\n );\n\n return (\n <li\n className=\"rs__filters-selected__list-item\"\n >\n <label className=\"rs__filters-selected__list-item-label\">\n <span\n className=\"rs__filters-selected__list-item-label\"\n onClick={() => props.handleRemove(props.selectedFilter.key)}\n >\n {props.selectedFilter.label}\n {\": \"}\n </span>\n\n {filter?.displayType === \"single\" && filter.displayView === \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [\n (props.selectedFilter.value as { label: string }).label,\n ])\n }\n >\n {(props.selectedFilter.value as { label: string }).label}\n </span>\n </span>\n )}\n {filter?.displayType === \"single\" && filter.displayView !== \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [\n props.selectedFilter.value as string,\n ])\n }\n >\n {props.selectedFilter.value as string}\n </span>\n </span>\n )}\n {filter?.displayType === \"multi\" && filter.displayView === \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n {(props.selectedFilter.value as Array<{ label: string }>).map(\n (value) => (\n <span\n key={value.label}\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [value.label])\n }\n >\n {value.label}\n </span>\n )\n )}\n </span>\n )}\n {filter?.displayType === \"multi\" && filter.displayView !== \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n {(props.selectedFilter.value as Array<string>).map((value) => (\n <span\n key={value}\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [value])\n }\n >\n {value}\n </span>\n ))}\n </span>\n )}\n {filter?.displayType === \"slider\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span\n onClick={() => props.handleRemove(props.selectedFilter.key, [\"\"])}\n >\n {`${filter.displaySliderPrefix}${\n (props.selectedFilter.value as any)[0]\n } to ${filter.displaySliderPrefix}${\n (props.selectedFilter.value as any)[1]\n }`}\n </span>\n </span>\n )}\n </label>\n </li>\n );\n};\n"]}
@@ -1,2 +1,2 @@
1
- import type React from "react";
1
+ import React from "react";
2
2
  export declare const ExampleHookUseFilters: React.FC;
@@ -1,13 +1,20 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleHookUseFilters = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const components_1 = require("../../components");
7
+ const react_1 = __importDefault(require("react"));
6
8
  const hooks_1 = require("../../hooks");
9
+ const components_1 = require("../../components");
7
10
  const ExampleHookUseFilters = () => {
8
11
  var _a;
9
12
  const filtersHook = (0, hooks_1.useFilters)();
10
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { children: "Filters" }), (_a = filtersHook.filters) === null || _a === void 0 ? void 0 : _a.map((filter) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { children: filter.name }), (0, jsx_runtime_1.jsx)(components_1.Filter, { filter: filter })] }, filter.id)))] }));
13
+ return (react_1.default.createElement("div", null,
14
+ react_1.default.createElement("h3", null, "Filters"), (_a = filtersHook.filters) === null || _a === void 0 ? void 0 :
15
+ _a.map((filter) => (react_1.default.createElement("div", null,
16
+ react_1.default.createElement("p", null, filter.name),
17
+ react_1.default.createElement(components_1.Filter, { key: filter.id, filter: filter }))))));
11
18
  };
12
19
  exports.ExampleHookUseFilters = ExampleHookUseFilters;
13
20
  //# sourceMappingURL=ExampleHookUseFilters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleHookUseFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseFilters.tsx"],"names":[],"mappings":";;;;AACA,iDAA0C;AAC1C,uCAAyC;AAElC,MAAM,qBAAqB,GAAa,GAAG,EAAE;;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,OAAO,CACL,4CACE,yCAAK,SAAS,GAAM,EACnB,MAAA,WAAW,CAAC,OAAO,0CAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACpC,4CACE,wCAAI,MAAM,CAAC,IAAI,GAAK,EACpB,uBAAC,mBAAM,IAAC,MAAM,EAAE,MAAM,GAAI,KAFlB,MAAM,CAAC,EAAE,CAGb,CACP,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,qBAAqB,yBAchC","sourcesContent":["import type React from \"react\";\nimport { Filter } from \"../../components\";\nimport { useFilters } from \"../../hooks\";\n\nexport const ExampleHookUseFilters: React.FC = () => {\n const filtersHook = useFilters();\n\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n {filtersHook.filters?.map((filter) => (\n <div key={filter.id}>\n <p>{filter.name}</p>\n <Filter filter={filter} />\n </div>\n ))}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleHookUseFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseFilters.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAyC;AACzC,iDAA0C;AAEnC,MAAM,qBAAqB,GAAa,GAAG,EAAE;;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,OAAO,CACL;QACE,0CAAK,SAAS,CAAM,EACnB,MAAA,WAAW,CAAC,OAAO;WAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACpC;YACE,yCAAI,MAAM,CAAC,IAAI,CAAK;YACpB,8BAAC,mBAAM,IAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAI,CACtC,CACP,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,qBAAqB,yBAchC","sourcesContent":["import React from \"react\";\n\nimport { useFilters } from \"../../hooks\";\nimport { Filter } from \"../../components\";\n\nexport const ExampleHookUseFilters: React.FC = () => {\n const filtersHook = useFilters();\n\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n {filtersHook.filters?.map((filter) => (\n <div>\n <p>{filter.name}</p>\n <Filter key={filter.id} filter={filter} />\n </div>\n ))}\n </div>\n );\n};\n"]}
@@ -1,2 +1,2 @@
1
- import type React from "react";
1
+ import React from "react";
2
2
  export declare const ExampleHookUseResults: React.FC;
@@ -1,20 +1,25 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleHookUseResults = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
5
8
  const hooks_1 = require("../../hooks");
6
9
  const types_1 = require("../../types");
7
10
  const ExampleHookUseResults = () => {
8
11
  const resultsHook = (0, hooks_1.useResults)();
9
12
  const collections = resultsHook.results
10
- .flatMap((result) => {
13
+ .map((result) => {
11
14
  if (result.type === types_1.ElasticDocumentType.Product) {
12
15
  return result.collections;
13
16
  }
14
17
  return [];
15
18
  })
19
+ .flat()
16
20
  .filter((item, index, self) => self.findIndex((itemNested) => (itemNested === null || itemNested === void 0 ? void 0 : itemNested.id) === (item === null || item === void 0 ? void 0 : item.id)) === index);
17
- return ((0, jsx_runtime_1.jsx)("ul", { children: collections.map((collection) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", { href: `/collections/${collection === null || collection === void 0 ? void 0 : collection.handle}`, children: collection === null || collection === void 0 ? void 0 : collection.title }) }, collection === null || collection === void 0 ? void 0 : collection.id))) }));
21
+ return (react_1.default.createElement("ul", null, collections.map((collection) => (react_1.default.createElement("li", null,
22
+ react_1.default.createElement("a", { href: `/collections/${collection === null || collection === void 0 ? void 0 : collection.handle}` }, collection === null || collection === void 0 ? void 0 : collection.title))))));
18
23
  };
19
24
  exports.ExampleHookUseResults = ExampleHookUseResults;
20
25
  //# sourceMappingURL=ExampleHookUseResults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleHookUseResults.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseResults.tsx"],"names":[],"mappings":";;;;AACA,uCAAyC;AACzC,uCAAkD;AAE3C,MAAM,qBAAqB,GAAa,GAAG,EAAE;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO;SACpC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClB,IAAI,MAAM,CAAC,IAAI,KAAK,2BAAmB,CAAC,OAAO,EAAE,CAAC;YAChD,OAAO,MAAM,CAAC,WAAW,CAAC;QAC5B,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE,OAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAA,CAAC,KAAK,KAAK,CAAC,CAAC;IAExG,OAAO,CACL,yCACG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC/B,yCACE,8BAAG,IAAI,EAAE,gBAAgB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAE,YAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,GAAK,IAD/D,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE,CAElB,CACN,CAAC,GACC,CACN,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,qBAAqB,yBAsBhC","sourcesContent":["import type React from \"react\";\nimport { useResults } from \"../../hooks\";\nimport { ElasticDocumentType } from \"../../types\";\n\nexport const ExampleHookUseResults: React.FC = () => {\n const resultsHook = useResults();\n\n const collections = resultsHook.results\n .flatMap((result) => {\n if (result.type === ElasticDocumentType.Product) {\n return result.collections;\n }\n\n return [];\n })\n .filter((item, index, self) => self.findIndex((itemNested) => itemNested?.id === item?.id) === index);\n\n return (\n <ul>\n {collections.map((collection) => (\n <li key={collection?.id}>\n <a href={`/collections/${collection?.handle}`}>{collection?.title}</a>\n </li>\n ))}\n </ul>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleHookUseResults.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseResults.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAyC;AACzC,uCAAkD;AAE3C,MAAM,qBAAqB,GAAa,GAAG,EAAE;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO;SACpC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,IAAI,MAAM,CAAC,IAAI,KAAK,2BAAmB,CAAC,OAAO,EAAE,CAAC;YAChD,OAAO,MAAM,CAAC,WAAW,CAAC;QAC5B,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;SACD,IAAI,EAAE;SACN,MAAM,CACL,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACpB,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE,OAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAA,CAAC,KAAK,KAAK,CACxE,CAAC;IAEJ,OAAO,CACL,0CACG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC/B;QACE,qCAAG,IAAI,EAAE,gBAAgB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAE,IAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAK,CACnE,CACN,CAAC,CACC,CACN,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,qBAAqB,yBA0BhC","sourcesContent":["import React from \"react\";\n\nimport { useResults } from \"../../hooks\";\nimport { ElasticDocumentType } from \"../../types\";\n\nexport const ExampleHookUseResults: React.FC = () => {\n const resultsHook = useResults();\n\n const collections = resultsHook.results\n .map((result) => {\n if (result.type === ElasticDocumentType.Product) {\n return result.collections;\n }\n\n return [];\n })\n .flat()\n .filter(\n (item, index, self) =>\n self.findIndex((itemNested) => itemNested?.id === item?.id) === index\n );\n\n return (\n <ul>\n {collections.map((collection) => (\n <li>\n <a href={`/collections/${collection?.handle}`}>{collection?.title}</a>\n </li>\n ))}\n </ul>\n );\n};\n"]}
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExampleHookUseSearch = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
7
  const react_1 = __importDefault(require("react"));
9
8
  const hooks_1 = require("../../hooks");
10
9
  const ExampleHookUseSearch = () => {
@@ -16,7 +15,8 @@ const ExampleHookUseSearch = () => {
16
15
  const handleInputChange = react_1.default.useCallback((event) => {
17
16
  searchHook.setSearchTerm(event.target.value);
18
17
  }, [searchHook.setSearchTerm]);
19
- return ((0, jsx_runtime_1.jsx)("form", { onSubmit: handleFormSubmit, children: (0, jsx_runtime_1.jsx)("input", { onChange: handleInputChange, type: "text", value: searchHook.searchTerm }) }));
18
+ return (react_1.default.createElement("form", { onSubmit: handleFormSubmit },
19
+ react_1.default.createElement("input", { type: "text", value: searchHook.searchTerm, onChange: handleInputChange })));
20
20
  };
21
21
  exports.ExampleHookUseSearch = ExampleHookUseSearch;
22
22
  //# sourceMappingURL=ExampleHookUseSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleHookUseSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSearch.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAAuC,EAAE,EAAE;QAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC,EACD,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAC9B,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAK,CAAC,WAAW,CACzC,CAAC,KAA0C,EAAE,EAAE;QAC7C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,iCAAM,QAAQ,EAAE,gBAAgB,YAC9B,kCAAO,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,UAAU,CAAC,UAAU,GAAI,GAC3E,CACR,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,oBAAoB,wBAuB/B","sourcesContent":["import React from \"react\";\nimport { useSearch } from \"../../hooks\";\n\nexport const ExampleHookUseSearch: React.FC = () => {\n const searchHook = useSearch();\n\n const handleFormSubmit = React.useCallback(\n (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n searchHook.submitSearchTerm();\n },\n [searchHook.submitSearchTerm]\n );\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n searchHook.setSearchTerm(event.target.value);\n },\n [searchHook.setSearchTerm]\n );\n\n return (\n <form onSubmit={handleFormSubmit}>\n <input onChange={handleInputChange} type=\"text\" value={searchHook.searchTerm} />\n </form>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleHookUseSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAAuC,EAAE,EAAE;QAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC,EACD,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAC9B,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAK,CAAC,WAAW,CACzC,CAAC,KAA0C,EAAE,EAAE;QAC7C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,wCAAM,QAAQ,EAAE,gBAAgB;QAC9B,yCACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,UAAU,CAAC,UAAU,EAC5B,QAAQ,EAAE,iBAAiB,GAC3B,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,oBAAoB,wBA2B/B","sourcesContent":["import React from \"react\";\n\nimport { useSearch } from \"../../hooks\";\n\nexport const ExampleHookUseSearch: React.FC = () => {\n const searchHook = useSearch();\n\n const handleFormSubmit = React.useCallback(\n (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n searchHook.submitSearchTerm();\n },\n [searchHook.submitSearchTerm]\n );\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n searchHook.setSearchTerm(event.target.value);\n },\n [searchHook.setSearchTerm]\n );\n\n return (\n <form onSubmit={handleFormSubmit}>\n <input\n type=\"text\"\n value={searchHook.searchTerm}\n onChange={handleInputChange}\n />\n </form>\n );\n};\n"]}
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExampleHookUseSortBy = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
7
  const react_1 = __importDefault(require("react"));
9
8
  const hooks_1 = require("../../hooks");
10
9
  const ExampleHookUseSortBy = () => {
@@ -13,7 +12,7 @@ const ExampleHookUseSortBy = () => {
13
12
  const handleSelectChange = react_1.default.useCallback((event) => {
14
13
  sortByHook.setSortOption(event.target.value);
15
14
  }, [sortByHook.setSortOption]);
16
- return ((0, jsx_runtime_1.jsx)("select", { onChange: handleSelectChange, value: (_a = sortByHook.sortOption) === null || _a === void 0 ? void 0 : _a.handle, children: sortByHook.sortOptions.map((sortOption) => ((0, jsx_runtime_1.jsx)("option", { value: sortOption.handle, children: sortOption.name }, sortOption.handle))) }));
15
+ return (react_1.default.createElement("select", { value: (_a = sortByHook.sortOption) === null || _a === void 0 ? void 0 : _a.handle, onChange: handleSelectChange }, sortByHook.sortOptions.map((sortOption) => (react_1.default.createElement("option", { key: sortOption.handle, value: sortOption.handle }, sortOption.name)))));
17
16
  };
18
17
  exports.ExampleHookUseSortBy = ExampleHookUseSortBy;
19
18
  //# sourceMappingURL=ExampleHookUseSortBy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleHookUseSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSortBy.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,kBAAkB,GAAG,eAAK,CAAC,WAAW,CAC1C,CAAC,KAA2C,EAAE,EAAE;QAC9C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,mCAAQ,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAA,UAAU,CAAC,UAAU,0CAAE,MAAM,YACvE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC1C,mCAAgC,KAAK,EAAE,UAAU,CAAC,MAAM,YACrD,UAAU,CAAC,IAAI,IADL,UAAU,CAAC,MAAM,CAErB,CACV,CAAC,GACK,CACV,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B","sourcesContent":["import React from \"react\";\nimport { useSortBy } from \"../../hooks\";\n\nexport const ExampleHookUseSortBy: React.FC = () => {\n const sortByHook = useSortBy();\n\n const handleSelectChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n sortByHook.setSortOption(event.target.value);\n },\n [sortByHook.setSortOption]\n );\n\n return (\n <select onChange={handleSelectChange} value={sortByHook.sortOption?.handle}>\n {sortByHook.sortOptions.map((sortOption) => (\n <option key={sortOption.handle} value={sortOption.handle}>\n {sortOption.name}\n </option>\n ))}\n </select>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleHookUseSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSortBy.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,kBAAkB,GAAG,eAAK,CAAC,WAAW,CAC1C,CAAC,KAA2C,EAAE,EAAE;QAC9C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,0CAAQ,KAAK,EAAE,MAAA,UAAU,CAAC,UAAU,0CAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,IACvE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC1C,0CAAQ,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,IACrD,UAAU,CAAC,IAAI,CACT,CACV,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B","sourcesContent":["import React from \"react\";\n\nimport { useSortBy } from \"../../hooks\";\n\nexport const ExampleHookUseSortBy: React.FC = () => {\n const sortByHook = useSortBy();\n\n const handleSelectChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n sortByHook.setSortOption(event.target.value);\n },\n [sortByHook.setSortOption]\n );\n\n return (\n <select value={sortByHook.sortOption?.handle} onChange={handleSelectChange}>\n {sortByHook.sortOptions.map((sortOption) => (\n <option key={sortOption.handle} value={sortOption.handle}>\n {sortOption.name}\n </option>\n ))}\n </select>\n );\n};\n"]}
@@ -1,4 +1,4 @@
1
- import type { ElasticProduct } from "../../types";
1
+ import { ElasticProduct } from "../../types";
2
2
  export interface ExampleProductCardWeightProps {
3
3
  document: ElasticProduct;
4
4
  }
@@ -1,8 +1,30 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.ExampleProductCardWeight = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
27
+ const react_1 = __importStar(require("react"));
6
28
  const hooks_1 = require("../../hooks");
7
29
  const utility_1 = require("../../utility");
8
30
  const ExampleProductCardWeight = ({ document }) => {
@@ -18,7 +40,7 @@ const ExampleProductCardWeight = ({ document }) => {
18
40
  return null;
19
41
  if (!weight)
20
42
  return null;
21
- return ((0, jsx_runtime_1.jsxs)("div", { className: "rs__result-card-product__weight", onKeyUp: toggleWeightBreakdown, style: {
43
+ return (react_1.default.createElement("div", { className: "rs__result-card-product__weight", onClick: toggleWeightBreakdown, style: {
22
44
  background: "rgba(0, 0, 0, 0.8)",
23
45
  borderRadius: "4px",
24
46
  color: "white",
@@ -28,17 +50,28 @@ const ExampleProductCardWeight = ({ document }) => {
28
50
  fontWeight: "bold",
29
51
  maxWidth: "100%",
30
52
  padding: "4px 8px",
31
- }, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Weight: ", weight.toFixed(2)] }), showWeightBreakdown && weightBreakdown.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { style: {
32
- backgroundColor: "rgba(255, 255, 255, 0.95)",
33
- border: "1px solid #ccc",
34
- borderRadius: "4px",
35
- color: "black",
36
- fontSize: "10px",
37
- marginTop: "8px",
38
- maxHeight: "150px",
39
- overflowY: "auto",
40
- padding: "8px",
41
- }, children: [(0, jsx_runtime_1.jsx)("strong", { style: { display: "block", marginBottom: "4px" }, children: "Breakdown:" }), weightBreakdown.map((item) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "2px" }, children: [(0, jsx_runtime_1.jsxs)("strong", { children: [item.field, ":"] }), " ", item.weight.toFixed(2)] }, item.field)))] }))] }));
53
+ } },
54
+ react_1.default.createElement("div", null,
55
+ "Weight: ",
56
+ weight.toFixed(2)),
57
+ showWeightBreakdown && weightBreakdown.length > 0 && (react_1.default.createElement("div", { style: {
58
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
59
+ border: "1px solid #ccc",
60
+ borderRadius: "4px",
61
+ color: "black",
62
+ fontSize: "10px",
63
+ marginTop: "8px",
64
+ maxHeight: "150px",
65
+ overflowY: "auto",
66
+ padding: "8px",
67
+ } },
68
+ react_1.default.createElement("strong", { style: { display: "block", marginBottom: "4px" } }, "Breakdown:"),
69
+ weightBreakdown.map((item, index) => (react_1.default.createElement("div", { key: index, style: { marginBottom: "2px" } },
70
+ react_1.default.createElement("strong", null,
71
+ item.field,
72
+ ":"),
73
+ " ",
74
+ item.weight.toFixed(2))))))));
42
75
  };
43
76
  exports.ExampleProductCardWeight = ExampleProductCardWeight;
44
77
  //# sourceMappingURL=ExampleProductCardWeight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleProductCardWeight.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleProductCardWeight.tsx"],"names":[],"mappings":";;;;AAAA,iCAA0C;AAC1C,uCAAuD;AAEvD,2CAA4G;AAMrG,MAAM,wBAAwB,GAAG,CAAC,EAAE,QAAQ,EAAiC,EAAE,EAAE;IACtF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,gCAAwB,GAAE,CAAC;IAC/C,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEtE,8CAA8C;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,eAAO,EACpB,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,mBAAS,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC9D,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAC/B,CAAC;IAEF,0CAA0C;IAC1C,MAAM,eAAe,GAA0B,IAAA,eAAO,EACpD,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,uBAAa,EAAC,WAAiC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAC3E,CAAC,WAAW,CAAC,CACd,CAAC;IAEF,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC,mBAAmB,CAAC,CAAC;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useState } from \"react\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport type { ElasticProduct } from \"../../types\";\nimport { type ExplainParsedWeight, type ExplainScoreDetail, explainWeight, getWeight } from \"../../utility\";\n\nexport interface ExampleProductCardWeightProps {\n document: ElasticProduct;\n}\n\nexport const ExampleProductCardWeight = ({ document }: ExampleProductCardWeightProps) => {\n const { options } = useReactifySearchContext();\n const [showWeightBreakdown, setShowWeightBreakdown] = useState(false);\n\n // Extract score and explanation from document\n const explanation = document._explanation;\n const weight = useMemo(\n () => (explanation ? getWeight(explanation) : document._score),\n [explanation, document._score]\n );\n\n // Parse the weight breakdown if available\n const weightBreakdown: ExplainParsedWeight[] = useMemo(\n () => (explanation ? explainWeight(explanation as ExplainScoreDetail) : []),\n [explanation]\n );\n\n const toggleWeightBreakdown = () => setShowWeightBreakdown(!showWeightBreakdown);\n\n if (!options.devMode) return null;\n\n if (!weight) return null;\n\n return (\n <div\n className=\"rs__result-card-product__weight\"\n onKeyUp={toggleWeightBreakdown}\n style={{\n background: \"rgba(0, 0, 0, 0.8)\",\n borderRadius: \"4px\",\n color: \"white\",\n cursor: \"pointer\",\n fontFamily: \"monospace\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n maxWidth: \"100%\",\n padding: \"4px 8px\",\n }}\n >\n <div>Weight: {weight.toFixed(2)}</div>\n\n {showWeightBreakdown && weightBreakdown.length > 0 && (\n <div\n style={{\n backgroundColor: \"rgba(255, 255, 255, 0.95)\",\n border: \"1px solid #ccc\",\n borderRadius: \"4px\",\n color: \"black\",\n fontSize: \"10px\",\n marginTop: \"8px\",\n maxHeight: \"150px\",\n overflowY: \"auto\",\n padding: \"8px\",\n }}\n >\n <strong style={{ display: \"block\", marginBottom: \"4px\" }}>Breakdown:</strong>\n {weightBreakdown.map((item) => (\n <div key={item.field} style={{ marginBottom: \"2px\" }}>\n <strong>{item.field}:</strong> {item.weight.toFixed(2)}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n"]}
1
+ {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AK,EAAE,OAAO;YACd,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,WAAW;YACvB,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,SAAS;SACnB;QAED;;YAAc,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAO;QAErC,mBAAmB,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CACpD,uCACE,KAAK,EAAE;gBACL,eAAe,EAAE,2BAA2B;gBAC5C,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,KAAK;gBACnB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,KAAK;aACf;YAED,0CAAQ,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAqB;YAC5E,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACpC,uCAAK,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;gBAC7C;oBAAS,IAAI,CAAC,KAAK;wBAAW;;gBAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAClD,CACP,CAAC,CACE,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,wBAAwB,4BAiEnC","sourcesContent":["import React, { useState, useMemo } from \"react\";\n\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { explainWeight, getWeight, ExplainScoreDetail, ExplainParsedWeight } from \"../../utility\";\nimport { ElasticProduct } from \"../../types\";\n\nexport interface ExampleProductCardWeightProps {\n document: ElasticProduct;\n}\n\nexport const ExampleProductCardWeight = ({ document }: ExampleProductCardWeightProps) => {\n const { options } = useReactifySearchContext();\n const [showWeightBreakdown, setShowWeightBreakdown] = useState(false);\n\n // Extract score and explanation from document\n const explanation = document._explanation;\n const weight = useMemo(\n () => (explanation ? getWeight(explanation) : document._score),\n [explanation, document._score]\n );\n\n // Parse the weight breakdown if available\n const weightBreakdown: ExplainParsedWeight[] = useMemo(\n () => (explanation ? explainWeight(explanation as ExplainScoreDetail) : []),\n [explanation]\n );\n\n const toggleWeightBreakdown = () => setShowWeightBreakdown(!showWeightBreakdown);\n\n if (!options.devMode) return null;\n\n if (!weight) return null;\n\n return (\n <div\n className=\"rs__result-card-product__weight\"\n onClick={toggleWeightBreakdown}\n style={{\n background: \"rgba(0, 0, 0, 0.8)\",\n borderRadius: \"4px\",\n color: \"white\",\n cursor: \"pointer\",\n fontFamily: \"monospace\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n maxWidth: \"100%\",\n padding: \"4px 8px\",\n }}\n >\n <div>Weight: {weight.toFixed(2)}</div>\n\n {showWeightBreakdown && weightBreakdown.length > 0 && (\n <div\n style={{\n backgroundColor: \"rgba(255, 255, 255, 0.95)\",\n border: \"1px solid #ccc\",\n borderRadius: \"4px\",\n color: \"black\",\n fontSize: \"10px\",\n marginTop: \"8px\",\n maxHeight: \"150px\",\n overflowY: \"auto\",\n padding: \"8px\",\n }}\n >\n <strong style={{ display: \"block\", marginBottom: \"4px\" }}>Breakdown:</strong>\n {weightBreakdown.map((item, index) => (\n <div key={index} style={{ marginBottom: \"2px\" }}>\n <strong>{item.field}:</strong> {item.weight.toFixed(2)}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n"]}
@@ -1,2 +1,2 @@
1
- import type React from "react";
1
+ import React from "react";
2
2
  export declare const ExampleReactiveSearchProviderCollection: React.FC;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleReactiveSearchProviderCollection = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
5
8
  const components_1 = require("../../components");
6
- const ExampleReactiveSearchProviderCollection = () => ((0, jsx_runtime_1.jsx)(components_1.ReactifySearchProvider, { collectionHandle: "example-collection", mode: "collection", shopifyPermanentDomain: "usereactify-demo.myshopify.com" }));
9
+ const ExampleReactiveSearchProviderCollection = () => (react_1.default.createElement(components_1.ReactifySearchProvider, { mode: "collection", shopifyPermanentDomain: "usereactify-demo.myshopify.com", collectionHandle: "example-collection" },
10
+ react_1.default.createElement(react_1.default.Fragment, null)));
7
11
  exports.ExampleReactiveSearchProviderCollection = ExampleReactiveSearchProviderCollection;
8
12
  //# sourceMappingURL=ExampleReactiveSearchProviderCollection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleReactiveSearchProviderCollection.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderCollection.tsx"],"names":[],"mappings":";;;;AACA,iDAA0D;AAEnD,MAAM,uCAAuC,GAAa,GAAG,EAAE,CAAC,CACrE,uBAAC,mCAAsB,IACrB,gBAAgB,EAAC,oBAAoB,EACrC,IAAI,EAAC,YAAY,EACjB,sBAAsB,EAAC,gCAAgC,GACvD,CACH,CAAC;AANW,QAAA,uCAAuC,2CAMlD","sourcesContent":["import type React from \"react\";\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderCollection: React.FC = () => (\n <ReactifySearchProvider\n collectionHandle=\"example-collection\"\n mode=\"collection\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n />\n);\n"]}
1
+ {"version":3,"file":"ExampleReactiveSearchProviderCollection.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderCollection.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAA0D;AAEnD,MAAM,uCAAuC,GAAa,GAAG,EAAE,CAAC,CACrE,8BAAC,mCAAsB,IACrB,IAAI,EAAC,YAAY,EACjB,sBAAsB,EAAC,gCAAgC,EACvD,gBAAgB,EAAC,oBAAoB;IAErC,6DAAK,CACkB,CAC1B,CAAC;AARW,QAAA,uCAAuC,2CAQlD","sourcesContent":["import React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderCollection: React.FC = () => (\n <ReactifySearchProvider\n mode=\"collection\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n collectionHandle=\"example-collection\"\n >\n <></>\n </ReactifySearchProvider>\n);\n"]}
@@ -1,2 +1,2 @@
1
- import type React from "react";
1
+ import React from "react";
2
2
  export declare const ExampleReactiveSearchProviderInstantSearch: React.FC;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleReactiveSearchProviderInstantSearch = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
5
8
  const components_1 = require("../../components");
6
- const ExampleReactiveSearchProviderInstantSearch = () => ((0, jsx_runtime_1.jsx)(components_1.ReactifySearchProvider, { mode: "instant-search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" }));
9
+ const ExampleReactiveSearchProviderInstantSearch = () => (react_1.default.createElement(components_1.ReactifySearchProvider, { mode: "instant-search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" },
10
+ react_1.default.createElement(react_1.default.Fragment, null)));
7
11
  exports.ExampleReactiveSearchProviderInstantSearch = ExampleReactiveSearchProviderInstantSearch;
8
12
  //# sourceMappingURL=ExampleReactiveSearchProviderInstantSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleReactiveSearchProviderInstantSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderInstantSearch.tsx"],"names":[],"mappings":";;;;AACA,iDAA0D;AAEnD,MAAM,0CAA0C,GAAa,GAAG,EAAE,CAAC,CACxE,uBAAC,mCAAsB,IAAC,IAAI,EAAC,gBAAgB,EAAC,sBAAsB,EAAC,gCAAgC,GAAG,CACzG,CAAC;AAFW,QAAA,0CAA0C,8CAErD","sourcesContent":["import type React from \"react\";\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderInstantSearch: React.FC = () => (\n <ReactifySearchProvider mode=\"instant-search\" shopifyPermanentDomain=\"usereactify-demo.myshopify.com\" />\n);\n"]}
1
+ {"version":3,"file":"ExampleReactiveSearchProviderInstantSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderInstantSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAA0D;AAEnD,MAAM,0CAA0C,GAAa,GAAG,EAAE,CAAC,CACxE,8BAAC,mCAAsB,IACrB,IAAI,EAAC,gBAAgB,EACrB,sBAAsB,EAAC,gCAAgC;IAEvD,6DAAK,CACkB,CAC1B,CAAC;AAPW,QAAA,0CAA0C,8CAOrD","sourcesContent":["import React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderInstantSearch: React.FC = () => (\n <ReactifySearchProvider\n mode=\"instant-search\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n >\n <></>\n </ReactifySearchProvider>\n);\n"]}
@@ -1,2 +1,2 @@
1
- import type React from "react";
1
+ import React from "react";
2
2
  export declare const ExampleReactiveSearchProviderSearch: React.FC;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleReactiveSearchProviderSearch = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
5
8
  const components_1 = require("../../components");
6
- const ExampleReactiveSearchProviderSearch = () => ((0, jsx_runtime_1.jsx)(components_1.ReactifySearchProvider, { mode: "search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" }));
9
+ const ExampleReactiveSearchProviderSearch = () => (react_1.default.createElement(components_1.ReactifySearchProvider, { mode: "search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" },
10
+ react_1.default.createElement(react_1.default.Fragment, null)));
7
11
  exports.ExampleReactiveSearchProviderSearch = ExampleReactiveSearchProviderSearch;
8
12
  //# sourceMappingURL=ExampleReactiveSearchProviderSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleReactiveSearchProviderSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderSearch.tsx"],"names":[],"mappings":";;;;AACA,iDAA0D;AAEnD,MAAM,mCAAmC,GAAa,GAAG,EAAE,CAAC,CACjE,uBAAC,mCAAsB,IAAC,IAAI,EAAC,QAAQ,EAAC,sBAAsB,EAAC,gCAAgC,GAAG,CACjG,CAAC;AAFW,QAAA,mCAAmC,uCAE9C","sourcesContent":["import type React from \"react\";\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderSearch: React.FC = () => (\n <ReactifySearchProvider mode=\"search\" shopifyPermanentDomain=\"usereactify-demo.myshopify.com\" />\n);\n"]}
1
+ {"version":3,"file":"ExampleReactiveSearchProviderSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAA0D;AAEnD,MAAM,mCAAmC,GAAa,GAAG,EAAE,CAAC,CACjE,8BAAC,mCAAsB,IACrB,IAAI,EAAC,QAAQ,EACb,sBAAsB,EAAC,gCAAgC;IAEvD,6DAAK,CACkB,CAC1B,CAAC;AAPW,QAAA,mCAAmC,uCAO9C","sourcesContent":["import React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderSearch: React.FC = () => (\n <ReactifySearchProvider\n mode=\"search\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n >\n <></>\n </ReactifySearchProvider>\n);\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { ResultCardCalloutProps } from "../../components";
2
+ import { ResultCardCalloutProps } from "../../components";
3
3
  export type ExampleResultCardCalloutProps = React.ComponentProps<NonNullable<ResultCardCalloutProps["render"]>>;
4
4
  export declare const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps>;
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExampleResultCardCallout = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
7
  const react_1 = __importDefault(require("react"));
9
8
  const ExampleResultCardCallout = (props) => {
10
9
  const styleProp = react_1.default.useMemo(() => {
@@ -14,7 +13,10 @@ const ExampleResultCardCallout = (props) => {
14
13
  gridColumn: `span ${(_b = props.callout.displayColumns) !== null && _b !== void 0 ? _b : 1}`,
15
14
  });
16
15
  }, [props.callout]);
17
- return ((0, jsx_runtime_1.jsx)("div", { className: "rs__result-card-callout", ref: props.itemRef, style: styleProp, children: (0, jsx_runtime_1.jsxs)("a", Object.assign({ className: "rs__result-card-callout__link", onClick: props.handleClick }, (!!props.callout.link && { href: props.callout.link }), { children: [props.callout.desktopImage && ((0, jsx_runtime_1.jsx)("img", { alt: "", className: "rs__result-card-callout__image", height: "190px", src: props.callout.desktopImage, width: "100%" })), (0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-callout__title", children: props.callout.title })] })) }));
16
+ return (react_1.default.createElement("div", { className: "rs__result-card-callout", ref: props.itemRef, style: styleProp },
17
+ react_1.default.createElement("a", Object.assign({ className: "rs__result-card-callout__link", onClick: props.handleClick }, (!!props.callout.link && { href: props.callout.link })),
18
+ props.callout.desktopImage && (react_1.default.createElement("img", { className: "rs__result-card-callout__image", src: props.callout.desktopImage, width: "100%", height: "190px" })),
19
+ react_1.default.createElement("span", { className: "rs__result-card-callout__title" }, props.callout.title))));
18
20
  };
19
21
  exports.ExampleResultCardCallout = ExampleResultCardCallout;
20
22
  //# sourceMappingURL=ExampleResultCardCallout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAKnB,MAAM,wBAAwB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACzF,MAAM,SAAS,GAAG,eAAK,CAAC,OAAO,CAC7B,GAAG,EAAE;;QAAC,OAAA,CAAC;YACL,OAAO,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,WAAW,mCAAI,CAAC,EAAE;YACjD,UAAU,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,cAAc,mCAAI,CAAC,EAAE;SACxD,CAAC,CAAA;KAAA,EACF,CAAC,KAAK,CAAC,OAAO,CAAC,CAChB,CAAC;IAEF,OAAO,CACL,gCAAK,SAAS,EAAC,yBAAyB,EAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,YAC3E,6CACE,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,KAAK,CAAC,WAAW,IACtB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,eAEzD,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAC7B,gCACE,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,gCAAgC,EAC1C,MAAM,EAAC,OAAO,EACd,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAC/B,KAAK,EAAC,MAAM,GACZ,CACH,EACD,iCAAM,SAAS,EAAC,gCAAgC,YAAE,KAAK,CAAC,OAAO,CAAC,KAAK,GAAQ,KAC3E,GACA,CACP,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,wBAAwB,4BA6BnC","sourcesContent":["import React from \"react\";\nimport type { ResultCardCalloutProps } from \"../../components\";\n\nexport type ExampleResultCardCalloutProps = React.ComponentProps<NonNullable<ResultCardCalloutProps[\"render\"]>>;\n\nexport const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps> = (props) => {\n const styleProp = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () => ({\n gridRow: `span ${props.callout.displayRows ?? 1}`,\n gridColumn: `span ${props.callout.displayColumns ?? 1}`,\n }),\n [props.callout]\n );\n\n return (\n <div className=\"rs__result-card-callout\" ref={props.itemRef} style={styleProp}>\n <a\n className=\"rs__result-card-callout__link\"\n onClick={props.handleClick}\n {...(!!props.callout.link && { href: props.callout.link })}\n >\n {props.callout.desktopImage && (\n <img\n alt=\"\"\n className=\"rs__result-card-callout__image\"\n height=\"190px\"\n src={props.callout.desktopImage}\n width=\"100%\"\n />\n )}\n <span className=\"rs__result-card-callout__title\">{props.callout.title}</span>\n </a>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,SAAS,GAAG,eAAK,CAAC,OAAO,CAC7B,GAAG,EAAE;;QAAC,OAAA,CAAC;YACL,OAAO,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,WAAW,mCAAI,CAAC,EAAE;YACjD,UAAU,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,cAAc,mCAAI,CAAC,EAAE;SACxD,CAAC,CAAA;KAAA,EACF,CAAC,KAAK,CAAC,OAAO,CAAC,CAChB,CAAC;IAEF,OAAO,CACL,uCACE,SAAS,EAAC,yBAAyB,EACnC,GAAG,EAAE,KAAK,CAAC,OAAO,EAClB,KAAK,EAAE,SAAS;QAEhB,mDACE,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,KAAK,CAAC,WAAW,IACtB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAEzD,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAC7B,uCACE,SAAS,EAAC,gCAAgC,EAC1C,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAC/B,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,OAAO,GACd,CACH;YACD,wCAAM,SAAS,EAAC,gCAAgC,IAC7C,KAAK,CAAC,OAAO,CAAC,KAAK,CACf,CACL,CACA,CACP,CAAC;AACJ,CAAC,CAAC;AAnCS,QAAA,wBAAwB,4BAmCjC","sourcesContent":["import React from \"react\";\n\nimport { ResultCardCalloutProps } from \"../../components\";\n\nexport type ExampleResultCardCalloutProps = React.ComponentProps<\n NonNullable<ResultCardCalloutProps[\"render\"]>\n>;\n\nexport const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps> =\n (props) => {\n const styleProp = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () => ({\n gridRow: `span ${props.callout.displayRows ?? 1}`,\n gridColumn: `span ${props.callout.displayColumns ?? 1}`,\n }),\n [props.callout]\n );\n\n return (\n <div\n className=\"rs__result-card-callout\"\n ref={props.itemRef}\n style={styleProp}\n >\n <a\n className=\"rs__result-card-callout__link\"\n onClick={props.handleClick}\n {...(!!props.callout.link && { href: props.callout.link })}\n >\n {props.callout.desktopImage && (\n <img\n className=\"rs__result-card-callout__image\"\n src={props.callout.desktopImage}\n width=\"100%\"\n height=\"190px\"\n />\n )}\n <span className=\"rs__result-card-callout__title\">\n {props.callout.title}\n </span>\n </a>\n </div>\n );\n };\n"]}
@@ -1,4 +1,4 @@
1
- import type React from "react";
2
- import type { ResultCardProductProps } from "../../components";
1
+ import React from "react";
2
+ import { ResultCardProductProps } from "../../components";
3
3
  export type ExampleResultCardProductProps = React.ComponentProps<NonNullable<ResultCardProductProps["render"]>>;
4
4
  export declare function ExampleResultCardProduct(props: ExampleResultCardProductProps): JSX.Element;
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ExampleResultCardProduct = ExampleResultCardProduct;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = __importDefault(require("react"));
5
8
  const ExampleProductCardWeight_1 = require("./ExampleProductCardWeight");
6
9
  function ExampleResultCardProduct(props) {
7
- return ((0, jsx_runtime_1.jsxs)("div", { className: "rs__result-card-product", ref: props.itemRef, style: { position: "relative" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { position: "absolute", right: "0", top: "0", zIndex: 1 }, children: (0, jsx_runtime_1.jsx)(ExampleProductCardWeight_1.ExampleProductCardWeight, { document: props.document }) }), (0, jsx_runtime_1.jsxs)("a", { className: "rs__result-card-product__link", href: `/products/${props.product.handle}`, onClick: props.handleClick, children: [props.product.image && ((0, jsx_runtime_1.jsx)("img", { alt: "", className: "rs__result-card-product__image", height: "190px", src: props.product.image, width: "100%" })), (0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-product__title", children: props.product.title })] }), (0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-product__price", children: props.formattedPrice }), props.onSale && ((0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-product__price-sale", style: { textDecoration: "line-through" }, children: props.formattedCompareAtPrice }))] }));
10
+ return (react_1.default.createElement("div", { ref: props.itemRef, className: "rs__result-card-product", style: { position: "relative" } },
11
+ react_1.default.createElement("div", { style: { position: "absolute", right: "0", top: "0", zIndex: 1 } },
12
+ react_1.default.createElement(ExampleProductCardWeight_1.ExampleProductCardWeight, { document: props.document })),
13
+ react_1.default.createElement("a", { className: "rs__result-card-product__link", onClick: props.handleClick, href: `/products/${props.product.handle}` },
14
+ props.product.image && (react_1.default.createElement("img", { className: "rs__result-card-product__image", src: props.product.image, width: "100%", height: "190px" })),
15
+ react_1.default.createElement("span", { className: "rs__result-card-product__title" }, props.product.title)),
16
+ react_1.default.createElement("span", { className: "rs__result-card-product__price" }, props.formattedPrice),
17
+ props.onSale && (react_1.default.createElement("span", { className: "rs__result-card-product__price-sale", style: { textDecoration: "line-through" } }, props.formattedCompareAtPrice))));
8
18
  }
9
19
  //# sourceMappingURL=ExampleResultCardProduct.js.map