@searchcraft/javascript-sdk 0.7.2 → 0.8.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 (306) hide show
  1. package/dist/cjs/{store-f6ba3dfb.js → SearchcraftStore-75fac5e0.js} +576 -443
  2. package/dist/cjs/SearchcraftStore-75fac5e0.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +2 -3
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/searchcraft-base-search-result_2.cjs.entry.js +152 -0
  7. package/dist/cjs/searchcraft-base-search-result_2.cjs.entry.js.map +1 -0
  8. package/dist/cjs/searchcraft-base-search-results.cjs.entry.js +30 -80
  9. package/dist/cjs/searchcraft-base-search-results.cjs.entry.js.map +1 -1
  10. package/dist/cjs/searchcraft-button_3.cjs.entry.js +22 -7
  11. package/dist/cjs/searchcraft-button_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js +19 -18
  13. package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js.map +1 -1
  14. package/dist/cjs/searchcraft-filter-panel.cjs.entry.js +6 -6
  15. package/dist/cjs/searchcraft-filter-panel.cjs.entry.js.map +1 -1
  16. package/dist/cjs/searchcraft-input-form_2.cjs.entry.js +20 -33
  17. package/dist/cjs/searchcraft-input-form_2.cjs.entry.js.map +1 -1
  18. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +1 -1
  19. package/dist/cjs/searchcraft-pagination.cjs.entry.js +106 -0
  20. package/dist/cjs/searchcraft-pagination.cjs.entry.js.map +1 -0
  21. package/dist/cjs/searchcraft-popover-button.cjs.entry.js +3 -3
  22. package/dist/cjs/searchcraft-popover-button.cjs.entry.js.map +1 -1
  23. package/dist/cjs/searchcraft-popover-form.cjs.entry.js +27 -25
  24. package/dist/cjs/searchcraft-popover-form.cjs.entry.js.map +1 -1
  25. package/dist/cjs/searchcraft-popover-list-item_2.cjs.entry.js +101 -0
  26. package/dist/cjs/searchcraft-popover-list-item_2.cjs.entry.js.map +1 -0
  27. package/dist/cjs/searchcraft-results-info.cjs.entry.js +51 -13
  28. package/dist/cjs/searchcraft-results-info.cjs.entry.js.map +1 -1
  29. package/dist/cjs/searchcraft-search-results-per-page.cjs.entry.js +75 -0
  30. package/dist/cjs/searchcraft-search-results-per-page.cjs.entry.js.map +1 -0
  31. package/dist/cjs/searchcraft-select.cjs.entry.js +70 -0
  32. package/dist/cjs/searchcraft-select.cjs.entry.js.map +1 -0
  33. package/dist/cjs/searchcraft-theme.cjs.entry.js +29 -11
  34. package/dist/cjs/searchcraft-theme.cjs.entry.js.map +1 -1
  35. package/dist/cjs/units-fe4d8083.js.map +1 -1
  36. package/dist/collection/collection-manifest.json +5 -0
  37. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +86 -208
  38. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
  39. package/dist/collection/components/searchcraft-base-search-result-ad/searchcraft-base-search-result-ad.js +73 -0
  40. package/dist/collection/components/searchcraft-base-search-result-ad/searchcraft-base-search-result-ad.js.map +1 -0
  41. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +37 -144
  42. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
  43. package/dist/collection/components/searchcraft-button/searchcraft-button.js +87 -17
  44. package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -1
  45. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +1 -1
  46. package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js +8 -8
  47. package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js.map +1 -1
  48. package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js +7 -7
  49. package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js.map +1 -1
  50. package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.js +10 -14
  51. package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.js.map +1 -1
  52. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +1 -1
  53. package/dist/collection/components/searchcraft-pagination/searchcraft-pagination.js +141 -0
  54. package/dist/collection/components/searchcraft-pagination/searchcraft-pagination.js.map +1 -0
  55. package/dist/collection/components/searchcraft-popover-button/searchcraft-popover-button.js +1 -1
  56. package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.js +26 -21
  57. package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.js.map +1 -1
  58. package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.js +59 -92
  59. package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.js.map +1 -1
  60. package/dist/collection/components/searchcraft-popover-list-item-ad/searchcraft-popover-list-item-ad.js +73 -0
  61. package/dist/collection/components/searchcraft-popover-list-item-ad/searchcraft-popover-list-item-ad.js.map +1 -0
  62. package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.js +77 -24
  63. package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.js.map +1 -1
  64. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js +105 -17
  65. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js.map +1 -1
  66. package/dist/collection/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.js +129 -0
  67. package/dist/collection/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.js.map +1 -0
  68. package/dist/collection/components/searchcraft-select/searchcraft-select.js +261 -0
  69. package/dist/collection/components/searchcraft-select/searchcraft-select.js.map +1 -0
  70. package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +2 -2
  71. package/dist/collection/components/searchcraft-theme/searchcraft-theme.js +72 -12
  72. package/dist/collection/components/searchcraft-theme/searchcraft-theme.js.map +1 -1
  73. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +7 -6
  74. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -1
  75. package/dist/collection/index.js +1 -2
  76. package/dist/collection/index.js.map +1 -1
  77. package/dist/collection/provider/SearchcraftStore.js +160 -0
  78. package/dist/collection/provider/SearchcraftStore.js.map +1 -0
  79. package/dist/collection/provider/SearchcraftStore.types.js +2 -0
  80. package/dist/collection/provider/SearchcraftStore.types.js.map +1 -0
  81. package/dist/collection/provider/store.js +2 -136
  82. package/dist/collection/provider/store.js.map +1 -1
  83. package/dist/collection/utils/units.js.map +1 -1
  84. package/dist/components/index.js +11 -1
  85. package/dist/components/index.js.map +1 -1
  86. package/dist/components/{p-a75ef832.js → p-0e393fe1.js} +2 -2
  87. package/dist/components/{p-a75ef832.js.map → p-0e393fe1.js.map} +1 -1
  88. package/dist/components/p-25ee7496.js +58 -0
  89. package/dist/components/p-25ee7496.js.map +1 -0
  90. package/dist/components/{p-936e2ed4.js → p-38419178.js} +576 -442
  91. package/dist/components/p-38419178.js.map +1 -0
  92. package/dist/components/{p-1234974c.js → p-433f974c.js} +9 -8
  93. package/dist/components/p-433f974c.js.map +1 -0
  94. package/dist/components/{p-4b92ae26.js → p-4e9cd62e.js} +4 -4
  95. package/dist/components/{p-4b92ae26.js.map → p-4e9cd62e.js.map} +1 -1
  96. package/dist/components/{p-755f491b.js → p-6104fe5d.js} +2 -2
  97. package/dist/components/p-6104fe5d.js.map +1 -0
  98. package/dist/components/{p-b4a8fcbe.js → p-97332d3e.js} +51 -59
  99. package/dist/components/p-97332d3e.js.map +1 -0
  100. package/dist/components/{p-960ddc89.js → p-ae78be68.js} +17 -21
  101. package/dist/components/p-ae78be68.js.map +1 -0
  102. package/dist/components/p-bf6a086a.js +92 -0
  103. package/dist/components/p-bf6a086a.js.map +1 -0
  104. package/dist/components/p-bff4d3fc.js +65 -0
  105. package/dist/components/p-bff4d3fc.js.map +1 -0
  106. package/dist/components/{p-521fe971.js → p-d19bf6ff.js} +25 -8
  107. package/dist/components/p-d19bf6ff.js.map +1 -0
  108. package/dist/components/p-de4a48b1.js +65 -0
  109. package/dist/components/p-de4a48b1.js.map +1 -0
  110. package/dist/components/{p-ca881e5c.js → p-e55a7970.js} +2 -2
  111. package/dist/components/{p-ca881e5c.js.map → p-e55a7970.js.map} +1 -1
  112. package/dist/components/p-ec0d230e.js +75 -0
  113. package/dist/components/p-ec0d230e.js.map +1 -0
  114. package/dist/components/{p-54998882.js → p-fc7cda96.js} +10 -10
  115. package/dist/components/p-fc7cda96.js.map +1 -0
  116. package/dist/components/searchcraft-base-search-result-ad.d.ts +11 -0
  117. package/dist/components/searchcraft-base-search-result-ad.js +8 -0
  118. package/dist/components/searchcraft-base-search-result-ad.js.map +1 -0
  119. package/dist/components/searchcraft-base-search-result.js +1 -1
  120. package/dist/components/searchcraft-base-search-results.js +44 -89
  121. package/dist/components/searchcraft-base-search-results.js.map +1 -1
  122. package/dist/components/searchcraft-button.js +1 -1
  123. package/dist/components/searchcraft-error-message.js +1 -1
  124. package/dist/components/searchcraft-facet-list.js +1 -1
  125. package/dist/components/searchcraft-filter-panel.js +9 -9
  126. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  127. package/dist/components/searchcraft-input-form.js +1 -1
  128. package/dist/components/searchcraft-input-label.js +1 -1
  129. package/dist/components/searchcraft-pagination.d.ts +11 -0
  130. package/dist/components/searchcraft-pagination.js +135 -0
  131. package/dist/components/searchcraft-pagination.js.map +1 -0
  132. package/dist/components/searchcraft-popover-button.js +2 -2
  133. package/dist/components/searchcraft-popover-form.js +41 -30
  134. package/dist/components/searchcraft-popover-form.js.map +1 -1
  135. package/dist/components/searchcraft-popover-list-item-ad.d.ts +11 -0
  136. package/dist/components/searchcraft-popover-list-item-ad.js +8 -0
  137. package/dist/components/searchcraft-popover-list-item-ad.js.map +1 -0
  138. package/dist/components/searchcraft-popover-list-item.js +1 -1
  139. package/dist/components/searchcraft-popover-list-view.js +1 -1
  140. package/dist/components/searchcraft-results-info.js +60 -17
  141. package/dist/components/searchcraft-results-info.js.map +1 -1
  142. package/dist/components/searchcraft-search-results-per-page.d.ts +11 -0
  143. package/dist/components/searchcraft-search-results-per-page.js +105 -0
  144. package/dist/components/searchcraft-search-results-per-page.js.map +1 -0
  145. package/dist/components/searchcraft-select.d.ts +11 -0
  146. package/dist/components/searchcraft-select.js +8 -0
  147. package/dist/components/searchcraft-select.js.map +1 -0
  148. package/dist/components/searchcraft-slider.js +1 -1
  149. package/dist/components/searchcraft-theme.js +34 -13
  150. package/dist/components/searchcraft-theme.js.map +1 -1
  151. package/dist/components/searchcraft-toggle-button.js +1 -1
  152. package/dist/esm/{store-aa071d9c.js → SearchcraftStore-3cfd565a.js} +576 -442
  153. package/dist/esm/SearchcraftStore-3cfd565a.js.map +1 -0
  154. package/dist/esm/index.js +1 -1
  155. package/dist/esm/loader.js +1 -1
  156. package/dist/esm/searchcraft-base-search-result_2.entry.js +147 -0
  157. package/dist/esm/searchcraft-base-search-result_2.entry.js.map +1 -0
  158. package/dist/esm/searchcraft-base-search-results.entry.js +30 -80
  159. package/dist/esm/searchcraft-base-search-results.entry.js.map +1 -1
  160. package/dist/esm/searchcraft-button_3.entry.js +22 -7
  161. package/dist/esm/searchcraft-button_3.entry.js.map +1 -1
  162. package/dist/esm/searchcraft-facet-list_3.entry.js +17 -16
  163. package/dist/esm/searchcraft-facet-list_3.entry.js.map +1 -1
  164. package/dist/esm/searchcraft-filter-panel.entry.js +5 -5
  165. package/dist/esm/searchcraft-filter-panel.entry.js.map +1 -1
  166. package/dist/esm/searchcraft-input-form_2.entry.js +19 -32
  167. package/dist/esm/searchcraft-input-form_2.entry.js.map +1 -1
  168. package/dist/esm/searchcraft-javascript-sdk.js +1 -1
  169. package/dist/esm/searchcraft-pagination.entry.js +102 -0
  170. package/dist/esm/searchcraft-pagination.entry.js.map +1 -0
  171. package/dist/esm/searchcraft-popover-button.entry.js +2 -2
  172. package/dist/esm/searchcraft-popover-form.entry.js +20 -18
  173. package/dist/esm/searchcraft-popover-form.entry.js.map +1 -1
  174. package/dist/esm/searchcraft-popover-list-item_2.entry.js +96 -0
  175. package/dist/esm/searchcraft-popover-list-item_2.entry.js.map +1 -0
  176. package/dist/esm/searchcraft-results-info.entry.js +51 -13
  177. package/dist/esm/searchcraft-results-info.entry.js.map +1 -1
  178. package/dist/esm/searchcraft-search-results-per-page.entry.js +71 -0
  179. package/dist/esm/searchcraft-search-results-per-page.entry.js.map +1 -0
  180. package/dist/esm/searchcraft-select.entry.js +66 -0
  181. package/dist/esm/searchcraft-select.entry.js.map +1 -0
  182. package/dist/esm/searchcraft-theme.entry.js +29 -11
  183. package/dist/esm/searchcraft-theme.entry.js.map +1 -1
  184. package/dist/esm/{units-b6eba560.js → units-daaf96f5.js} +2 -2
  185. package/dist/esm/units-daaf96f5.js.map +1 -0
  186. package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
  187. package/dist/searchcraft-javascript-sdk/p-279f3e15.entry.js +2 -0
  188. package/dist/searchcraft-javascript-sdk/p-279f3e15.entry.js.map +1 -0
  189. package/dist/searchcraft-javascript-sdk/p-2bc82b48.entry.js +2 -0
  190. package/dist/searchcraft-javascript-sdk/p-2bc82b48.entry.js.map +1 -0
  191. package/dist/searchcraft-javascript-sdk/p-2dc07b47.entry.js +2 -0
  192. package/dist/searchcraft-javascript-sdk/p-2dc07b47.entry.js.map +1 -0
  193. package/dist/searchcraft-javascript-sdk/p-38419178.js +11 -0
  194. package/dist/searchcraft-javascript-sdk/p-38419178.js.map +1 -0
  195. package/dist/searchcraft-javascript-sdk/p-5e064c07.entry.js +2 -0
  196. package/dist/searchcraft-javascript-sdk/p-5e064c07.entry.js.map +1 -0
  197. package/dist/searchcraft-javascript-sdk/{p-755f491b.js → p-6104fe5d.js} +2 -2
  198. package/dist/searchcraft-javascript-sdk/p-6104fe5d.js.map +1 -0
  199. package/dist/searchcraft-javascript-sdk/p-69da4e58.entry.js +2 -0
  200. package/dist/searchcraft-javascript-sdk/p-69da4e58.entry.js.map +1 -0
  201. package/dist/searchcraft-javascript-sdk/p-6bffd3f5.entry.js +2 -0
  202. package/dist/searchcraft-javascript-sdk/p-6bffd3f5.entry.js.map +1 -0
  203. package/dist/searchcraft-javascript-sdk/p-75779e4b.entry.js +2 -0
  204. package/dist/searchcraft-javascript-sdk/p-75779e4b.entry.js.map +1 -0
  205. package/dist/searchcraft-javascript-sdk/p-7f4dd50c.entry.js +2 -0
  206. package/dist/searchcraft-javascript-sdk/p-9340f4e4.entry.js +2 -0
  207. package/dist/searchcraft-javascript-sdk/p-9340f4e4.entry.js.map +1 -0
  208. package/dist/searchcraft-javascript-sdk/p-a84b1548.entry.js +2 -0
  209. package/dist/searchcraft-javascript-sdk/p-a84b1548.entry.js.map +1 -0
  210. package/dist/searchcraft-javascript-sdk/p-b8ea0454.entry.js +2 -0
  211. package/dist/searchcraft-javascript-sdk/p-b8ea0454.entry.js.map +1 -0
  212. package/dist/searchcraft-javascript-sdk/p-c4a9d8ab.entry.js +2 -0
  213. package/dist/searchcraft-javascript-sdk/p-c4a9d8ab.entry.js.map +1 -0
  214. package/dist/searchcraft-javascript-sdk/p-d2fffca9.entry.js +2 -0
  215. package/dist/searchcraft-javascript-sdk/p-d2fffca9.entry.js.map +1 -0
  216. package/dist/searchcraft-javascript-sdk/p-e11de2d6.entry.js +2 -0
  217. package/dist/searchcraft-javascript-sdk/p-e11de2d6.entry.js.map +1 -0
  218. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
  219. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  220. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +20 -41
  221. package/dist/types/components/searchcraft-base-search-result-ad/searchcraft-base-search-result-ad.d.ts +14 -0
  222. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +9 -18
  223. package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +17 -6
  224. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +1 -1
  225. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +2 -2
  226. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +1 -1
  227. package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +33 -0
  228. package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +9 -7
  229. package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +9 -12
  230. package/dist/types/components/searchcraft-popover-list-item-ad/searchcraft-popover-list-item-ad.d.ts +14 -0
  231. package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +7 -4
  232. package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +26 -4
  233. package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +33 -0
  234. package/dist/types/components/searchcraft-select/searchcraft-select.d.ts +64 -0
  235. package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +11 -2
  236. package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +1 -1
  237. package/dist/types/components.d.ts +444 -170
  238. package/dist/types/index.d.ts +1 -2
  239. package/dist/types/provider/SearchcraftStore.d.ts +4 -0
  240. package/dist/types/provider/SearchcraftStore.types.d.ts +44 -0
  241. package/dist/types/provider/store.d.ts +2 -34
  242. package/dist/types/utils/units.d.ts +1 -1
  243. package/package.json +3 -3
  244. package/dist/cjs/searchcraft-base-search-result.cjs.entry.js +0 -117
  245. package/dist/cjs/searchcraft-base-search-result.cjs.entry.js.map +0 -1
  246. package/dist/cjs/searchcraft-popover-list-item.cjs.entry.js +0 -49
  247. package/dist/cjs/searchcraft-popover-list-item.cjs.entry.js.map +0 -1
  248. package/dist/cjs/store-f6ba3dfb.js.map +0 -1
  249. package/dist/collection/types/_shared.types.js +0 -2
  250. package/dist/collection/types/_shared.types.js.map +0 -1
  251. package/dist/collection/types/index.js +0 -5
  252. package/dist/collection/types/index.js.map +0 -1
  253. package/dist/collection/types/searchcraft-base-search-results.types.js +0 -2
  254. package/dist/collection/types/searchcraft-base-search-results.types.js.map +0 -1
  255. package/dist/collection/types/searchcraft-filter-panel.types.js +0 -2
  256. package/dist/collection/types/searchcraft-filter-panel.types.js.map +0 -1
  257. package/dist/collection/types/searchcraft-popover-form.types.js +0 -2
  258. package/dist/collection/types/searchcraft-popover-form.types.js.map +0 -1
  259. package/dist/components/p-0ef4ab33.js +0 -66
  260. package/dist/components/p-0ef4ab33.js.map +0 -1
  261. package/dist/components/p-1234974c.js.map +0 -1
  262. package/dist/components/p-506cdac1.js +0 -58
  263. package/dist/components/p-506cdac1.js.map +0 -1
  264. package/dist/components/p-521fe971.js.map +0 -1
  265. package/dist/components/p-54998882.js.map +0 -1
  266. package/dist/components/p-755f491b.js.map +0 -1
  267. package/dist/components/p-936e2ed4.js.map +0 -1
  268. package/dist/components/p-960ddc89.js.map +0 -1
  269. package/dist/components/p-b4a8fcbe.js.map +0 -1
  270. package/dist/esm/searchcraft-base-search-result.entry.js +0 -113
  271. package/dist/esm/searchcraft-base-search-result.entry.js.map +0 -1
  272. package/dist/esm/searchcraft-popover-list-item.entry.js +0 -45
  273. package/dist/esm/searchcraft-popover-list-item.entry.js.map +0 -1
  274. package/dist/esm/store-aa071d9c.js.map +0 -1
  275. package/dist/esm/units-b6eba560.js.map +0 -1
  276. package/dist/searchcraft-javascript-sdk/p-109ab0e0.entry.js +0 -2
  277. package/dist/searchcraft-javascript-sdk/p-109ab0e0.entry.js.map +0 -1
  278. package/dist/searchcraft-javascript-sdk/p-26f5263d.entry.js +0 -2
  279. package/dist/searchcraft-javascript-sdk/p-26f5263d.entry.js.map +0 -1
  280. package/dist/searchcraft-javascript-sdk/p-2ff7eb35.entry.js +0 -2
  281. package/dist/searchcraft-javascript-sdk/p-2ff7eb35.entry.js.map +0 -1
  282. package/dist/searchcraft-javascript-sdk/p-36f0532e.entry.js +0 -2
  283. package/dist/searchcraft-javascript-sdk/p-36f0532e.entry.js.map +0 -1
  284. package/dist/searchcraft-javascript-sdk/p-41b6bc5d.entry.js +0 -2
  285. package/dist/searchcraft-javascript-sdk/p-41b6bc5d.entry.js.map +0 -1
  286. package/dist/searchcraft-javascript-sdk/p-57eddb07.entry.js +0 -2
  287. package/dist/searchcraft-javascript-sdk/p-57eddb07.entry.js.map +0 -1
  288. package/dist/searchcraft-javascript-sdk/p-5d6fbee0.entry.js +0 -2
  289. package/dist/searchcraft-javascript-sdk/p-5d6fbee0.entry.js.map +0 -1
  290. package/dist/searchcraft-javascript-sdk/p-64c5a1d2.entry.js +0 -2
  291. package/dist/searchcraft-javascript-sdk/p-64c5a1d2.entry.js.map +0 -1
  292. package/dist/searchcraft-javascript-sdk/p-755f491b.js.map +0 -1
  293. package/dist/searchcraft-javascript-sdk/p-936e2ed4.js +0 -11
  294. package/dist/searchcraft-javascript-sdk/p-936e2ed4.js.map +0 -1
  295. package/dist/searchcraft-javascript-sdk/p-c7df8be6.entry.js +0 -2
  296. package/dist/searchcraft-javascript-sdk/p-c7df8be6.entry.js.map +0 -1
  297. package/dist/searchcraft-javascript-sdk/p-eb6058e8.entry.js +0 -2
  298. package/dist/searchcraft-javascript-sdk/p-eb6058e8.entry.js.map +0 -1
  299. package/dist/searchcraft-javascript-sdk/p-faaa4394.entry.js +0 -2
  300. package/dist/types/types/_shared.types.d.ts +0 -46
  301. package/dist/types/types/index.d.ts +0 -5
  302. package/dist/types/types/searchcraft-base-search-results.types.d.ts +0 -11
  303. package/dist/types/types/searchcraft-filter-panel.types.d.ts +0 -43
  304. package/dist/types/types/searchcraft-popover-form.types.d.ts +0 -9
  305. /package/dist/searchcraft-javascript-sdk/{p-faaa4394.entry.js.map → p-7f4dd50c.entry.js.map} +0 -0
  306. /package/dist/types/{types → themes}/raw.d.ts +0 -0
@@ -1,5 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
- import { getDocumentValueFromSearchResultMapping } from "../../utils/index";
3
2
  /**
4
3
  * This web component is designed to display a list of results within a popover interface.
5
4
  * It is consumed within the `searchcraft-popover-form` component.
@@ -17,22 +16,14 @@ export class SearchcraftPopoverListView {
17
16
  */
18
17
  popoverResultMappings;
19
18
  /**
20
- * The documents to render in the list view.
19
+ * The items to render in the list view.
21
20
  */
22
- documents;
23
- renderDocument(document, index) {
24
- /**
25
- * Index field values -> Result container props mappings.
26
- */
27
- const titleContent = getDocumentValueFromSearchResultMapping(document, this.popoverResultMappings?.title);
28
- const subtitleContent = getDocumentValueFromSearchResultMapping(document, this.popoverResultMappings?.subtitle);
29
- const href = getDocumentValueFromSearchResultMapping(document, this.popoverResultMappings?.href);
30
- const imageSource = getDocumentValueFromSearchResultMapping(document, this.popoverResultMappings?.imageSource);
31
- const imageAlt = getDocumentValueFromSearchResultMapping(document, this.popoverResultMappings?.imageAlt);
32
- return (h("searchcraft-popover-list-item", { key: `${document.document_id}-${index}`, "title-content": titleContent, "subtitle-content": subtitleContent, "image-src": imageSource, "image-alt": imageAlt, href: href, "document-position": index }));
33
- }
21
+ searchClientResponseItems;
22
+ adClientResponseItems;
23
+ searchResultsPage;
24
+ searchResultsPerPage;
34
25
  render() {
35
- return (h("div", { key: '2eee5552a2bf24bd0c75a224d4de6da8526df316', class: 'searchcraft-popover-list-view' }, this.documents?.map((document, index) => this.renderDocument(document, index))));
26
+ return (h("div", { key: 'a869d98e96f6fbbc80ecb79058c4753b4a3a8b1d', class: 'searchcraft-popover-list-view' }, this.adClientResponseItems?.map((item) => (h("searchcraft-popover-list-item-ad", { adClientResponseItem: item, key: item.adId }))), this.searchClientResponseItems?.map((item, index) => (h("searchcraft-popover-list-item", { item: item, key: item.id, popoverResultMappings: this.popoverResultMappings, documentPosition: this.searchResultsPerPage * (this.searchResultsPage - 1) + index })))));
36
27
  }
37
28
  static get is() { return "searchcraft-popover-list-view"; }
38
29
  static get properties() {
@@ -46,8 +37,8 @@ export class SearchcraftPopoverListView {
46
37
  "references": {
47
38
  "PopoverResultMappings": {
48
39
  "location": "import",
49
- "path": "types",
50
- "id": "src/types/index.ts::PopoverResultMappings"
40
+ "path": "@searchcraft/core",
41
+ "id": "../core-sdk/dist/index.d.ts::PopoverResultMappings"
51
42
  }
52
43
  }
53
44
  },
@@ -60,16 +51,40 @@ export class SearchcraftPopoverListView {
60
51
  "getter": false,
61
52
  "setter": false
62
53
  },
63
- "documents": {
54
+ "searchClientResponseItems": {
55
+ "type": "unknown",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "SearchClientResponseItem[] | undefined",
59
+ "resolved": "SearchClientResponseItem[] | undefined",
60
+ "references": {
61
+ "SearchClientResponseItem": {
62
+ "location": "import",
63
+ "path": "@searchcraft/core",
64
+ "id": "../core-sdk/dist/index.d.ts::SearchClientResponseItem"
65
+ }
66
+ }
67
+ },
68
+ "required": false,
69
+ "optional": false,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": "The items to render in the list view."
73
+ },
74
+ "getter": false,
75
+ "setter": false
76
+ },
77
+ "adClientResponseItems": {
64
78
  "type": "unknown",
65
79
  "mutable": false,
66
80
  "complexType": {
67
- "original": "Record<string, unknown>[] | undefined",
68
- "resolved": "Record<string, unknown>[] | undefined",
81
+ "original": "AdClientResponseItem[] | undefined",
82
+ "resolved": "AdClientResponseItem[] | undefined",
69
83
  "references": {
70
- "Record": {
71
- "location": "global",
72
- "id": "global::Record"
84
+ "AdClientResponseItem": {
85
+ "location": "import",
86
+ "path": "@searchcraft/core",
87
+ "id": "../core-sdk/dist/index.d.ts::AdClientResponseItem"
73
88
  }
74
89
  }
75
90
  },
@@ -77,10 +92,48 @@ export class SearchcraftPopoverListView {
77
92
  "optional": false,
78
93
  "docs": {
79
94
  "tags": [],
80
- "text": "The documents to render in the list view."
95
+ "text": ""
81
96
  },
82
97
  "getter": false,
83
98
  "setter": false
99
+ },
100
+ "searchResultsPage": {
101
+ "type": "number",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "number",
105
+ "resolved": "number",
106
+ "references": {}
107
+ },
108
+ "required": true,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": ""
113
+ },
114
+ "getter": false,
115
+ "setter": false,
116
+ "attribute": "search-results-page",
117
+ "reflect": false
118
+ },
119
+ "searchResultsPerPage": {
120
+ "type": "number",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "number",
124
+ "resolved": "number",
125
+ "references": {}
126
+ },
127
+ "required": true,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": ""
132
+ },
133
+ "getter": false,
134
+ "setter": false,
135
+ "attribute": "search-results-per-page",
136
+ "reflect": false
84
137
  }
85
138
  };
86
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"searchcraft-popover-list-view.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-popover-list-view/searchcraft-popover-list-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,uCAAuC,EAAE,MAAM,QAAQ,CAAC;AAGjE;;;;;;;;;GASG;AAKH,MAAM,OAAO,0BAA0B;IACrC;;;OAGG;IACK,qBAAqB,CAAoC;IACjE;;OAEG;IACK,SAAS,CAAwC;IAEzD,cAAc,CAAC,QAAiC,EAAE,KAAa;QAC7D;;WAEG;QACH,MAAM,YAAY,GAAG,uCAAuC,CAC1D,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,KAAK,CAClC,CAAC;QACF,MAAM,eAAe,GAAG,uCAAuC,CAC7D,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CACrC,CAAC;QACF,MAAM,IAAI,GAAG,uCAAuC,CAClD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,IAAI,CACjC,CAAC;QACF,MAAM,WAAW,GAAG,uCAAuC,CACzD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,WAAW,CACxC,CAAC;QACF,MAAM,QAAQ,GAAG,uCAAuC,CACtD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CACrC,CAAC;QAEF,OAAO,CACL,qCACE,GAAG,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI,KAAK,EAAE,mBACxB,YAAY,sBACT,eAAe,eACtB,WAAW,eACX,QAAQ,EACnB,IAAI,EAAE,IAAI,uBACS,KAAK,GACxB,CACH,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,+BAA+B,IACvC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CACvC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CACrC,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\nimport { getDocumentValueFromSearchResultMapping } from '@utils';\nimport type { PopoverResultMappings } from 'types';\n\n/**\n * This web component is designed to display a list of results within a popover interface.\n * It is consumed within the `searchcraft-popover-form` component.\n *\n * ## Usage\n * ```html\n * <!-- index.html -->\n * <searchcraft-popover-list-view />\n * ```\n */\n@Component({\n tag: 'searchcraft-popover-list-view',\n shadow: false,\n})\nexport class SearchcraftPopoverListView {\n /**\n * The mappings that define how the data in the documents are mapped to the\n * list-view-item elements.\n */\n @Prop() popoverResultMappings: PopoverResultMappings | undefined;\n /**\n * The documents to render in the list view.\n */\n @Prop() documents: Record<string, unknown>[] | undefined;\n\n renderDocument(document: Record<string, unknown>, index: number) {\n /**\n * Index field values -> Result container props mappings.\n */\n const titleContent = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.title,\n );\n const subtitleContent = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.subtitle,\n );\n const href = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.href,\n );\n const imageSource = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.imageSource,\n );\n const imageAlt = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.imageAlt,\n );\n\n return (\n <searchcraft-popover-list-item\n key={`${document.document_id}-${index}`}\n title-content={titleContent}\n subtitle-content={subtitleContent}\n image-src={imageSource}\n image-alt={imageAlt}\n href={href}\n document-position={index}\n />\n );\n }\n\n render() {\n return (\n <div class='searchcraft-popover-list-view'>\n {this.documents?.map((document, index) =>\n this.renderDocument(document, index),\n )}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"searchcraft-popover-list-view.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-popover-list-view/searchcraft-popover-list-view.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAInD;;;;;;;;;GASG;AAKH,MAAM,OAAO,0BAA0B;IACrC;;;OAGG;IACK,qBAAqB,CAAoC;IACjE;;OAEG;IACK,yBAAyB,CAAyC;IAClE,qBAAqB,CAAqC;IAC1D,iBAAiB,CAAU;IAC3B,oBAAoB,CAAU;IAEtC,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,+BAA+B;YACvC,IAAI,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzC,wCACE,oBAAoB,EAAE,IAAI,EAC1B,GAAG,EAAE,IAAI,CAAC,IAAI,GACd,CACH,CAAC;YACD,IAAI,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACpD,qCACE,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,EACjD,gBAAgB,EACd,IAAI,CAAC,oBAAoB,GAAG,CAAC,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,GAAG,KAAK,GAElE,CACH,CAAC,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type {\n AdClientResponseItem,\n SearchClientResponseItem,\n} from '@searchcraft/core';\nimport { Component, h, Prop } from '@stencil/core';\n\nimport type { PopoverResultMappings } from '@searchcraft/core';\n\n/**\n * This web component is designed to display a list of results within a popover interface.\n * It is consumed within the `searchcraft-popover-form` component.\n *\n * ## Usage\n * ```html\n * <!-- index.html -->\n * <searchcraft-popover-list-view />\n * ```\n */\n@Component({\n tag: 'searchcraft-popover-list-view',\n shadow: false,\n})\nexport class SearchcraftPopoverListView {\n /**\n * The mappings that define how the data in the documents are mapped to the\n * list-view-item elements.\n */\n @Prop() popoverResultMappings: PopoverResultMappings | undefined;\n /**\n * The items to render in the list view.\n */\n @Prop() searchClientResponseItems: SearchClientResponseItem[] | undefined;\n @Prop() adClientResponseItems: AdClientResponseItem[] | undefined;\n @Prop() searchResultsPage!: number;\n @Prop() searchResultsPerPage!: number;\n\n render() {\n return (\n <div class='searchcraft-popover-list-view'>\n {this.adClientResponseItems?.map((item) => (\n <searchcraft-popover-list-item-ad\n adClientResponseItem={item}\n key={item.adId}\n />\n ))}\n {this.searchClientResponseItems?.map((item, index) => (\n <searchcraft-popover-list-item\n item={item}\n key={item.id}\n popoverResultMappings={this.popoverResultMappings}\n documentPosition={\n this.searchResultsPerPage * (this.searchResultsPage - 1) + index\n }\n />\n ))}\n </div>\n );\n }\n}\n"]}
@@ -1,28 +1,66 @@
1
1
  import { h } from "@stencil/core";
2
+ import classNames from "classnames";
2
3
  import { useSearchcraftStore } from "../../provider/store";
3
- import { formatNumberWithCommas } from "../../utils/index";
4
+ import { formatNumberWithCommas, parseCustomStyles } from "../../utils/index";
4
5
  /**
5
6
  * This web component is designed to display the number of results returned from a search query.
6
- * It provides users with real-time feedback on the scale of the results, such as the total number of items found.
7
7
  *
8
8
  * ## Usage
9
9
  * ```html
10
10
  * <!-- index.html -->
11
+ * <script>
12
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
13
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
14
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
15
+ * </script>
16
+ *
11
17
  * <searchcraft-results-info />
12
18
  * ```
13
19
  */
14
20
  export class SearchcraftResultsInfo {
15
- isRequesting = false;
16
- resultsCount = 0;
17
- responseTime = '';
18
- query = '';
21
+ /**
22
+ * The custom formatter for the resulting string.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
27
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
28
+ * ```
29
+ */
30
+ customFormatter;
31
+ /**
32
+ * The custom styles object.
33
+ */
34
+ customStyles;
35
+ // store vars
36
+ searchTerm;
37
+ searchResultsPage;
38
+ searchResultsPerPage;
39
+ searchResultsCount;
40
+ // local vars
41
+ count = 0;
42
+ range = [0, 0];
43
+ responseTime = '0';
19
44
  unsubscribe = () => { };
20
45
  connectedCallback() {
21
46
  this.unsubscribe = useSearchcraftStore.subscribe((state) => {
22
- this.isRequesting = state.isRequesting;
23
- this.resultsCount = state.searchResults?.data?.count || 0;
24
- this.responseTime = ((state.searchResults?.data?.time_taken || 0) * 1000).toFixed(2);
25
- this.query = state.query || '';
47
+ // store vars
48
+ this.searchTerm = state.searchTerm;
49
+ this.searchResultsPage = state.searchResultsPage;
50
+ this.searchResultsPerPage = state.searchResultsPerPage;
51
+ this.searchResultsCount = state.searchResultsCount;
52
+ // local vars
53
+ this.count = this.searchResultsCount;
54
+ this.range[0] =
55
+ this.searchResultsPage <= 1
56
+ ? 1
57
+ : this.searchResultsPerPage * (this.searchResultsPage - 1);
58
+ this.range[1] = this.searchResultsPerPage * this.searchResultsPage;
59
+ this.range[1] =
60
+ this.range[1] > this.searchResultsCount
61
+ ? this.searchResultsCount
62
+ : this.range[1];
63
+ this.responseTime = ((state.searchResponseTimeTaken || 0) * 1000).toFixed(2);
26
64
  });
27
65
  }
28
66
  disconnectedCallback() {
@@ -31,19 +69,69 @@ export class SearchcraftResultsInfo {
31
69
  }
32
70
  }
33
71
  render() {
34
- if (!this.query || this.resultsCount === 0) {
72
+ if (!this.searchTerm || this.searchResultsCount === 0) {
35
73
  return null;
36
74
  }
37
- const formattedResults = formatNumberWithCommas(this.resultsCount);
38
- return (h("div", { class: 'searchcraft-results-info-container' }, h("p", { class: 'searchcraft-results-info-content' }, formattedResults, " results found in ", this.responseTime, "ms")));
75
+ return (h("p", { class: classNames('searchcraft-results-info', parseCustomStyles(this.customStyles || {})) }, this.customFormatter
76
+ ? this.customFormatter([
77
+ formatNumberWithCommas(this.range[0]),
78
+ formatNumberWithCommas(this.range[1]),
79
+ ], formatNumberWithCommas(this.count), this.responseTime)
80
+ : `${this.count} results found in ${this.responseTime}ms`));
39
81
  }
40
82
  static get is() { return "searchcraft-results-info"; }
83
+ static get properties() {
84
+ return {
85
+ "customFormatter": {
86
+ "type": "unknown",
87
+ "mutable": false,
88
+ "complexType": {
89
+ "original": "(\n range: [string, string],\n count: string,\n responseTime: string,\n ) => void",
90
+ "resolved": "((range: [string, string], count: string, responseTime: string) => void) | undefined",
91
+ "references": {}
92
+ },
93
+ "required": false,
94
+ "optional": true,
95
+ "docs": {
96
+ "tags": [{
97
+ "name": "example",
98
+ "text": "```ts\n resultsInfo.customFormatter = (range, count, responseTime) =>\n `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;\n```"
99
+ }],
100
+ "text": "The custom formatter for the resulting string."
101
+ },
102
+ "getter": false,
103
+ "setter": false
104
+ },
105
+ "customStyles": {
106
+ "type": "string",
107
+ "mutable": false,
108
+ "complexType": {
109
+ "original": "string",
110
+ "resolved": "string | undefined",
111
+ "references": {}
112
+ },
113
+ "required": false,
114
+ "optional": true,
115
+ "docs": {
116
+ "tags": [],
117
+ "text": "The custom styles object."
118
+ },
119
+ "getter": false,
120
+ "setter": false,
121
+ "attribute": "custom-styles",
122
+ "reflect": false
123
+ }
124
+ };
125
+ }
41
126
  static get states() {
42
127
  return {
43
- "isRequesting": {},
44
- "resultsCount": {},
45
- "responseTime": {},
46
- "query": {}
128
+ "searchTerm": {},
129
+ "searchResultsPage": {},
130
+ "searchResultsPerPage": {},
131
+ "searchResultsCount": {},
132
+ "count": {},
133
+ "range": {},
134
+ "responseTime": {}
47
135
  };
48
136
  }
49
137
  }
@@ -1 +1 @@
1
- {"version":3,"file":"searchcraft-results-info.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-results-info/searchcraft-results-info.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;;;;;;GASG;AAKH,MAAM,OAAO,sBAAsB;IACxB,YAAY,GAAG,KAAK,CAAC;IACrB,YAAY,GAAG,CAAC,CAAC;IACjB,YAAY,GAAG,EAAE,CAAC;IAClB,KAAK,GAAG,EAAE,CAAC;IAEpB,WAAW,GAAe,GAAG,EAAE,GAAE,CAAC,CAAC;IAEnC,iBAAiB;QACf,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;YACzD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;YACvC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC;YAC1D,IAAI,CAAC,YAAY,GAAG,CAClB,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,UAAU,IAAI,CAAC,CAAC,GAAG,IAAI,CACpD,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB;QAClB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,EAAE,CAAC;YAC3C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnE,OAAO,CACL,WAAK,KAAK,EAAC,oCAAoC;YAC7C,SAAG,KAAK,EAAC,kCAAkC;gBACxC,gBAAgB;;gBAAoB,IAAI,CAAC,YAAY;qBACpD,CACA,CACP,CAAC;IACJ,CAAC;;;;;;;;CACF","sourcesContent":["import { Component, h, State } from '@stencil/core';\n\nimport { useSearchcraftStore } from '@provider/store';\n\nimport { formatNumberWithCommas } from '@utils';\n\n/**\n * This web component is designed to display the number of results returned from a search query.\n * It provides users with real-time feedback on the scale of the results, such as the total number of items found.\n *\n * ## Usage\n * ```html\n * <!-- index.html -->\n * <searchcraft-results-info />\n * ```\n */\n@Component({\n tag: 'searchcraft-results-info',\n shadow: false,\n})\nexport class SearchcraftResultsInfo {\n @State() isRequesting = false;\n @State() resultsCount = 0;\n @State() responseTime = '';\n @State() query = '';\n\n unsubscribe: () => void = () => {};\n\n connectedCallback() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.isRequesting = state.isRequesting;\n this.resultsCount = state.searchResults?.data?.count || 0;\n this.responseTime = (\n (state.searchResults?.data?.time_taken || 0) * 1000\n ).toFixed(2);\n this.query = state.query || '';\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.query || this.resultsCount === 0) {\n return null;\n }\n const formattedResults = formatNumberWithCommas(this.resultsCount);\n return (\n <div class='searchcraft-results-info-container'>\n <p class='searchcraft-results-info-content'>\n {formattedResults} results found in {this.responseTime}ms\n </p>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"searchcraft-results-info.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-results-info/searchcraft-results-info.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, State, Prop } from '@stencil/core';\nimport classNames from 'classnames';\n\nimport { useSearchcraftStore } from '@provider/store';\n\nimport { formatNumberWithCommas, parseCustomStyles } from '@utils';\n\n/**\n * This web component is designed to display the number of results returned from a search query.\n *\n * ## Usage\n * ```html\n * <!-- index.html -->\n * <script>\n * const resultsInfo = document.querySelector('searchcraft-results-info');\n * resultsInfo.customFormatter = (range, count, responseTime) =>\n * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;\n * </script>\n *\n * <searchcraft-results-info />\n * ```\n */\n@Component({\n tag: 'searchcraft-results-info',\n shadow: false,\n})\nexport class SearchcraftResultsInfo {\n /**\n * The custom formatter for the resulting string.\n *\n * @example\n * ```ts\n * resultsInfo.customFormatter = (range, count, responseTime) =>\n * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;\n * ```\n */\n @Prop() customFormatter?: (\n range: [string, string],\n count: string,\n responseTime: string,\n ) => void;\n /**\n * The custom styles object.\n */\n @Prop() customStyles?: string;\n\n // store vars\n @State() searchTerm;\n @State() searchResultsPage;\n @State() searchResultsPerPage;\n @State() searchResultsCount;\n\n // local vars\n @State() count = 0;\n @State() range: number[] = [0, 0];\n @State() responseTime = '0';\n\n unsubscribe: () => void = () => {};\n\n connectedCallback() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n // store vars\n this.searchTerm = state.searchTerm;\n this.searchResultsPage = state.searchResultsPage;\n this.searchResultsPerPage = state.searchResultsPerPage;\n this.searchResultsCount = state.searchResultsCount;\n\n // local vars\n this.count = this.searchResultsCount;\n this.range[0] =\n this.searchResultsPage <= 1\n ? 1\n : this.searchResultsPerPage * (this.searchResultsPage - 1);\n this.range[1] = this.searchResultsPerPage * this.searchResultsPage;\n this.range[1] =\n this.range[1] > this.searchResultsCount\n ? this.searchResultsCount\n : this.range[1];\n this.responseTime = ((state.searchResponseTimeTaken || 0) * 1000).toFixed(\n 2,\n );\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.searchTerm || this.searchResultsCount === 0) {\n return null;\n }\n\n return (\n <p\n class={classNames(\n 'searchcraft-results-info',\n parseCustomStyles(this.customStyles || {}),\n )}\n >\n {this.customFormatter\n ? this.customFormatter(\n [\n formatNumberWithCommas(this.range[0]),\n formatNumberWithCommas(this.range[1]),\n ],\n formatNumberWithCommas(this.count),\n this.responseTime,\n )\n : `${this.count} results found in ${this.responseTime}ms`}\n </p>\n );\n }\n}\n"]}
@@ -0,0 +1,129 @@
1
+ import { useSearchcraftStore } from "../../provider/store";
2
+ import { h } from "@stencil/core";
3
+ import classNames from "classnames";
4
+ import { parseCustomStyles } from "../../utils/index";
5
+ /**
6
+ * This web component is designed to choose the number of search results displayed.
7
+ *
8
+ * ## Usage
9
+ * ```html
10
+ * <!-- index.html -->
11
+ * <searchcraft-search-results-per-page increment="20" />
12
+ * ```
13
+ */
14
+ export class SearchcraftSearchResultsPerPage {
15
+ /**
16
+ * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]).
17
+ * The base value is defined by the `searchResultsPerPage` option in the configuration.
18
+ */
19
+ increment = 20;
20
+ /**
21
+ * The custom styles object.
22
+ */
23
+ customStyles;
24
+ // store vars
25
+ searchTerm;
26
+ searchResultsPage;
27
+ searchResultsPerPage;
28
+ searchResultsCount;
29
+ searchResultsPagesCount;
30
+ // local vars
31
+ initialSearchResultsPerPage;
32
+ // store functions
33
+ setSearchResultsPerPage = () => { };
34
+ setSearchResultsPage = () => { };
35
+ unsubscribe = () => { };
36
+ componentDidLoad() {
37
+ this.unsubscribe = useSearchcraftStore.subscribe((state) => {
38
+ // store vars
39
+ this.searchTerm = state.searchTerm;
40
+ this.searchResultsPerPage = state.searchResultsPerPage;
41
+ this.searchResultsPage = state.searchResultsPage;
42
+ this.searchResultsCount = state.searchResultsCount;
43
+ // local vars
44
+ this.searchResultsPagesCount = Math.ceil(this.searchResultsCount / this.searchResultsPerPage);
45
+ // store functions
46
+ this.setSearchResultsPage = state.setSearchResultsPage;
47
+ this.setSearchResultsPerPage = state.setSearchResultsPerPage;
48
+ });
49
+ this.initialSearchResultsPerPage =
50
+ useSearchcraftStore.getState().searchResultsPerPage;
51
+ }
52
+ disconnectedCallback() {
53
+ this.unsubscribe?.();
54
+ }
55
+ render() {
56
+ // early return if there isn't a searchTerm or there is 1 or fewer pages of results
57
+ if (!this.searchTerm || this.searchResultsPagesCount <= 1) {
58
+ return;
59
+ }
60
+ return (h("div", { class: classNames('searchcraft-search-results-per-page', parseCustomStyles(this.customStyles || {})) }, h("div", { class: 'searchcraft-search-results-per-page-select' }, h("label", { class: 'searchcraft-search-results-per-page-select-label', htmlFor: 'searchcraft-search-results-per-page-select-input' }, "Results Per Page"), h("div", { class: 'searchcraft-search-results-per-page-select-input' }, h("searchcraft-select", { inputId: 'searchcraft-search-results-per-page-select-input', name: 'results-per-page', options: [...Array(5)].map((_, index) => {
61
+ const value = this.initialSearchResultsPerPage +
62
+ Number(this.increment) * index;
63
+ return {
64
+ label: `${value}`,
65
+ value,
66
+ };
67
+ }), onSelectChange: (event) => {
68
+ this.setSearchResultsPerPage(Number(event.detail));
69
+ this.setSearchResultsPage(1);
70
+ } })))));
71
+ }
72
+ static get is() { return "searchcraft-search-results-per-page"; }
73
+ static get properties() {
74
+ return {
75
+ "increment": {
76
+ "type": "any",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "string | number",
80
+ "resolved": "number | string",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": "The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]).\nThe base value is defined by the `searchResultsPerPage` option in the configuration."
88
+ },
89
+ "getter": false,
90
+ "setter": false,
91
+ "attribute": "increment",
92
+ "reflect": false,
93
+ "defaultValue": "20"
94
+ },
95
+ "customStyles": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string | undefined",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": true,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "The custom styles object."
108
+ },
109
+ "getter": false,
110
+ "setter": false,
111
+ "attribute": "custom-styles",
112
+ "reflect": false
113
+ }
114
+ };
115
+ }
116
+ static get states() {
117
+ return {
118
+ "searchTerm": {},
119
+ "searchResultsPage": {},
120
+ "searchResultsPerPage": {},
121
+ "searchResultsCount": {},
122
+ "searchResultsPagesCount": {},
123
+ "initialSearchResultsPerPage": {},
124
+ "setSearchResultsPerPage": {},
125
+ "setSearchResultsPage": {}
126
+ };
127
+ }
128
+ }
129
+ //# sourceMappingURL=searchcraft-search-results-per-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchcraft-search-results-per-page.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.tsx"],"names":[],"mappings":"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","sourcesContent":["import { useSearchcraftStore } from '@provider/store';\nimport { Component, h, State, Prop } from '@stencil/core';\nimport classNames from 'classnames';\n\nimport { parseCustomStyles } from '@utils';\n\n/**\n * This web component is designed to choose the number of search results displayed.\n *\n * ## Usage\n * ```html\n * <!-- index.html -->\n * <searchcraft-search-results-per-page increment=\"20\" />\n * ```\n */\n@Component({\n tag: 'searchcraft-search-results-per-page',\n shadow: false,\n})\nexport class SearchcraftSearchResultsPerPage {\n /**\n * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]).\n * The base value is defined by the `searchResultsPerPage` option in the configuration.\n */\n @Prop() increment: string | number = 20;\n /**\n * The custom styles object.\n */\n @Prop() customStyles?: string;\n\n // store vars\n @State() searchTerm;\n @State() searchResultsPage;\n @State() searchResultsPerPage;\n @State() searchResultsCount;\n @State() searchResultsPagesCount;\n\n // local vars\n @State() initialSearchResultsPerPage;\n\n // store functions\n @State() setSearchResultsPerPage: (perPage: number) => void = () => {};\n @State() setSearchResultsPage: (page: number) => void = () => {};\n\n private unsubscribe: () => void = () => {};\n\n componentDidLoad() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n // store vars\n this.searchTerm = state.searchTerm;\n this.searchResultsPerPage = state.searchResultsPerPage;\n this.searchResultsPage = state.searchResultsPage;\n this.searchResultsCount = state.searchResultsCount;\n\n // local vars\n this.searchResultsPagesCount = Math.ceil(\n this.searchResultsCount / this.searchResultsPerPage,\n );\n\n // store functions\n this.setSearchResultsPage = state.setSearchResultsPage;\n this.setSearchResultsPerPage = state.setSearchResultsPerPage;\n });\n\n this.initialSearchResultsPerPage =\n useSearchcraftStore.getState().searchResultsPerPage;\n }\n\n disconnectedCallback() {\n this.unsubscribe?.();\n }\n\n render() {\n // early return if there isn't a searchTerm or there is 1 or fewer pages of results\n if (!this.searchTerm || this.searchResultsPagesCount <= 1) {\n return;\n }\n\n return (\n <div\n class={classNames(\n 'searchcraft-search-results-per-page',\n parseCustomStyles(this.customStyles || {}),\n )}\n >\n <div class='searchcraft-search-results-per-page-select'>\n <label\n class='searchcraft-search-results-per-page-select-label'\n htmlFor='searchcraft-search-results-per-page-select-input'\n >\n Results Per Page\n </label>\n <div class='searchcraft-search-results-per-page-select-input'>\n <searchcraft-select\n inputId='searchcraft-search-results-per-page-select-input'\n name='results-per-page'\n options={[...Array(5)].map((_, index) => {\n const value =\n this.initialSearchResultsPerPage +\n Number(this.increment) * index;\n return {\n label: `${value}`,\n value,\n };\n })}\n onSelectChange={(event) => {\n this.setSearchResultsPerPage(Number(event.detail));\n this.setSearchResultsPage(1);\n }}\n />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}