@searchcraft/javascript-sdk 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +81 -11
  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-d95bc2a0.js → p-3df3ff8b.js} +17 -21
  93. package/dist/components/p-3df3ff8b.js.map +1 -0
  94. package/dist/components/{p-1234974c.js → p-433f974c.js} +9 -8
  95. package/dist/components/p-433f974c.js.map +1 -0
  96. package/dist/components/{p-4b92ae26.js → p-4e9cd62e.js} +4 -4
  97. package/dist/components/{p-4b92ae26.js.map → p-4e9cd62e.js.map} +1 -1
  98. package/dist/components/{p-755f491b.js → p-6104fe5d.js} +2 -2
  99. package/dist/components/p-6104fe5d.js.map +1 -0
  100. package/dist/components/{p-b4a8fcbe.js → p-97332d3e.js} +51 -59
  101. package/dist/components/p-97332d3e.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-7f4dd50c.entry.js +2 -0
  204. package/dist/searchcraft-javascript-sdk/p-9340f4e4.entry.js +2 -0
  205. package/dist/searchcraft-javascript-sdk/p-9340f4e4.entry.js.map +1 -0
  206. package/dist/searchcraft-javascript-sdk/p-a3074a6d.entry.js +2 -0
  207. package/dist/searchcraft-javascript-sdk/p-a3074a6d.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 +20 -1
  236. package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +1 -1
  237. package/dist/types/components.d.ts +476 -166
  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-b4a8fcbe.js.map +0 -1
  269. package/dist/components/p-d95bc2a0.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-26f5263d.entry.js +0 -2
  277. package/dist/searchcraft-javascript-sdk/p-26f5263d.entry.js.map +0 -1
  278. package/dist/searchcraft-javascript-sdk/p-2ff7eb35.entry.js +0 -2
  279. package/dist/searchcraft-javascript-sdk/p-2ff7eb35.entry.js.map +0 -1
  280. package/dist/searchcraft-javascript-sdk/p-36f0532e.entry.js +0 -2
  281. package/dist/searchcraft-javascript-sdk/p-36f0532e.entry.js.map +0 -1
  282. package/dist/searchcraft-javascript-sdk/p-41b6bc5d.entry.js +0 -2
  283. package/dist/searchcraft-javascript-sdk/p-41b6bc5d.entry.js.map +0 -1
  284. package/dist/searchcraft-javascript-sdk/p-57eddb07.entry.js +0 -2
  285. package/dist/searchcraft-javascript-sdk/p-57eddb07.entry.js.map +0 -1
  286. package/dist/searchcraft-javascript-sdk/p-5d6fbee0.entry.js +0 -2
  287. package/dist/searchcraft-javascript-sdk/p-5d6fbee0.entry.js.map +0 -1
  288. package/dist/searchcraft-javascript-sdk/p-64c5a1d2.entry.js +0 -2
  289. package/dist/searchcraft-javascript-sdk/p-64c5a1d2.entry.js.map +0 -1
  290. package/dist/searchcraft-javascript-sdk/p-755f491b.js.map +0 -1
  291. package/dist/searchcraft-javascript-sdk/p-8b0a60b3.entry.js +0 -2
  292. package/dist/searchcraft-javascript-sdk/p-8b0a60b3.entry.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
@@ -5,12 +5,10 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { PopoverResultMappings, SearchResultMappings } from "./types/index";
9
- import { FilterItem } from "./types/searchcraft-filter-panel.types";
10
- import { SearchcraftConfig } from "@searchcraft/core";
11
- export { PopoverResultMappings, SearchResultMappings } from "./types/index";
12
- export { FilterItem } from "./types/searchcraft-filter-panel.types";
13
- export { SearchcraftConfig } from "@searchcraft/core";
8
+ import { AdClientResponseItem, FilterItem, PopoverResultMappings, SearchClientResponseItem, SearchcraftConfig, SearchResultMappings } from "@searchcraft/core";
9
+ import { SearchcraftSelectOption } from "./components/searchcraft-select/searchcraft-select";
10
+ export { AdClientResponseItem, FilterItem, PopoverResultMappings, SearchClientResponseItem, SearchcraftConfig, SearchResultMappings } from "@searchcraft/core";
11
+ export { SearchcraftSelectOption } from "./components/searchcraft-select/searchcraft-select";
14
12
  export namespace Components {
15
13
  /**
16
14
  * This web component is designed to display detailed information for a single search result.
@@ -18,18 +16,6 @@ export namespace Components {
18
16
  * It is consumed within the `searchcraft-base-search-results` component.
19
17
  */
20
18
  interface SearchcraftBaseSearchResult {
21
- /**
22
- * The body content.
23
- */
24
- "bodyContent": string | undefined;
25
- /**
26
- * The link for the button rendered when containerHref is not present.
27
- */
28
- "buttonHref": string | undefined;
29
- /**
30
- * The label for the button rendered when containerHref is not present.
31
- */
32
- "buttonLabel": string | undefined;
33
19
  /**
34
20
  * The relationship between the current document and the link for the button rendered when containerHref is not present.
35
21
  */
@@ -38,10 +24,6 @@ export namespace Components {
38
24
  * Where to open the link for the button rendered when containerHref is not present.
39
25
  */
40
26
  "buttonTarget": '_blank' | '_self' | '_top' | '_parent';
41
- /**
42
- * The link for the containing element.
43
- */
44
- "containerHref": string | undefined;
45
27
  /**
46
28
  * The relationship between the current document and the link for the containing element.
47
29
  */
@@ -58,30 +40,18 @@ export namespace Components {
58
40
  * The position in the document. Used with the "document_clicked" measure event.
59
41
  */
60
42
  "documentPosition": number;
61
- /**
62
- * The footer content.
63
- */
64
- "footerContent": string | undefined;
65
- /**
66
- * The image alternative text.
67
- */
68
- "imageAlt": string | undefined;
69
43
  /**
70
44
  * The placement of the image.
71
45
  */
72
46
  "imagePlacement": 'left' | 'right';
73
- /**
74
- * The image source.
75
- */
76
- "imageSrc": string | undefined;
77
- /**
78
- * The subtitle content.
79
- */
80
- "subtitleContent": string | undefined;
81
- /**
82
- * The title content.
83
- */
84
- "titleContent": string | undefined;
47
+ "item": SearchClientResponseItem | undefined;
48
+ "searchResultMappings": SearchResultMappings | undefined;
49
+ }
50
+ /**
51
+ * A single list item rendered in a searchcraft-popover-list-view.
52
+ */
53
+ interface SearchcraftBaseSearchResultAd {
54
+ "adClientResponseItem"?: AdClientResponseItem;
85
55
  }
86
56
  /**
87
57
  * This web component is responsible for displaying the results of a search query.
@@ -112,10 +82,6 @@ export namespace Components {
112
82
  * ```
113
83
  */
114
84
  interface SearchcraftBaseSearchResults {
115
- /**
116
- * How often ads are injected.
117
- */
118
- "adInterval": number;
119
85
  /**
120
86
  * The label for the button rendered when containerHref is not present for each result.
121
87
  */
@@ -142,14 +108,6 @@ export namespace Components {
142
108
  "customStylesForResults": | string
143
109
  | Record<string, Record<string, string>>
144
110
  | undefined;
145
- /**
146
- * Should an ad be placed at the end of the results.
147
- */
148
- "placeAdAtEnd": boolean;
149
- /**
150
- * Should an ad be placed at the start of the results.
151
- */
152
- "placeAdAtStart": boolean;
153
111
  /**
154
112
  * The placement of the image for each result.
155
113
  */
@@ -165,22 +123,34 @@ export namespace Components {
165
123
  * It is consumed within the `searchcraft-input-form` component.
166
124
  */
167
125
  interface SearchcraftButton {
126
+ /**
127
+ * Whether the button is disabled.
128
+ */
129
+ "disabled"?: boolean;
130
+ /**
131
+ * Controls the visual representation of the button.
132
+ */
133
+ "hierarchy"?: 'primary' | 'tertiary';
168
134
  /**
169
135
  * The icon element.
170
136
  */
171
- "iconElement"?: Element;
137
+ "icon"?: Element;
172
138
  /**
173
139
  * Should the button only display an icon.
174
140
  */
175
- "iconOnly": boolean;
141
+ "iconOnly"?: boolean;
176
142
  /**
177
143
  * The position of the icon.
178
144
  */
179
- "iconPosition": string;
145
+ "iconPosition"?: 'left' | 'right';
180
146
  /**
181
147
  * The label for the button.
182
148
  */
183
149
  "label": string;
150
+ /**
151
+ * The type of the button.
152
+ */
153
+ "type"?: 'submit' | 'reset' | 'button';
184
154
  }
185
155
  /**
186
156
  * This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
@@ -243,7 +213,7 @@ export namespace Components {
243
213
  * ```js
244
214
  * // index.js
245
215
  * const searchInputForm = document.querySelector('searchcraft-input-form');
246
- * seardchInputForm.config = {
216
+ * searchInputForm.config = {
247
217
  * index: [],
248
218
  * readKey: '',
249
219
  * endpointUrl: '',
@@ -302,13 +272,28 @@ export namespace Components {
302
272
  "inputLabelClassName"?: string | undefined;
303
273
  "label": string;
304
274
  }
275
+ /**
276
+ * This web component is designed to facilitate pagination of search results.
277
+ * Once a query is submitted, calculates the number for pages.
278
+ * ## Usage
279
+ * ```html
280
+ * <!-- index.html -->
281
+ * <searchcraft-pagination />
282
+ * ```
283
+ */
284
+ interface SearchcraftPagination {
285
+ /**
286
+ * The custom styles object.
287
+ */
288
+ "customStyles"?: string;
289
+ }
305
290
  /**
306
291
  * Renders a button which, when clicked, turns on popover visibility.
307
292
  */
308
293
  interface SearchcraftPopoverButton {
309
294
  }
310
295
  /**
311
- * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field.
296
+ * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
312
297
  * ## Usage
313
298
  * ```html
314
299
  * <!-- index.html -->
@@ -363,56 +348,128 @@ export namespace Components {
363
348
  * The document position relative to the search results (For Measure)
364
349
  */
365
350
  "documentPosition": number;
351
+ "item": SearchClientResponseItem | undefined;
352
+ "popoverResultMappings": PopoverResultMappings | undefined;
353
+ }
354
+ /**
355
+ * A single list item rendered in a searchcraft-popover-list-view.
356
+ */
357
+ interface SearchcraftPopoverListItemAd {
358
+ "adClientResponseItem"?: AdClientResponseItem;
359
+ }
360
+ /**
361
+ * This web component is designed to display a list of results within a popover interface.
362
+ * It is consumed within the `searchcraft-popover-form` component.
363
+ * ## Usage
364
+ * ```html
365
+ * <!-- index.html -->
366
+ * <searchcraft-popover-list-view />
367
+ * ```
368
+ */
369
+ interface SearchcraftPopoverListView {
370
+ "adClientResponseItems": AdClientResponseItem[] | undefined;
366
371
  /**
367
- * The link href
368
- */
369
- "href": string | undefined;
370
- /**
371
- * The image alt tag.
372
+ * The mappings that define how the data in the documents are mapped to the list-view-item elements.
372
373
  */
373
- "imageAlt": string | undefined;
374
+ "popoverResultMappings": PopoverResultMappings | undefined;
374
375
  /**
375
- * The source of the image. If not included, no item will be rendered.
376
+ * The items to render in the list view.
376
377
  */
377
- "imageSrc": string | undefined;
378
+ "searchClientResponseItems": SearchClientResponseItem[] | undefined;
379
+ "searchResultsPage": number;
380
+ "searchResultsPerPage": number;
381
+ }
382
+ /**
383
+ * This web component is designed to display the number of results returned from a search query.
384
+ * ## Usage
385
+ * ```html
386
+ * <!-- index.html -->
387
+ * <script>
388
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
389
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
390
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
391
+ * </script>
392
+ * <searchcraft-results-info />
393
+ * ```
394
+ */
395
+ interface SearchcraftResultsInfo {
378
396
  /**
379
- * The result subtitle
397
+ * The custom formatter for the resulting string.
398
+ * @example ```ts resultsInfo.customFormatter = (range, count, responseTime) => `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`; ```
380
399
  */
381
- "subtitleContent": string | undefined;
400
+ "customFormatter"?: (
401
+ range: [string, string],
402
+ count: string,
403
+ responseTime: string,
404
+ ) => void;
382
405
  /**
383
- * The result title
406
+ * The custom styles object.
384
407
  */
385
- "titleContent": string | undefined;
408
+ "customStyles"?: string;
386
409
  }
387
410
  /**
388
- * This web component is designed to display a list of results within a popover interface.
389
- * It is consumed within the `searchcraft-popover-form` component.
411
+ * This web component is designed to choose the number of search results displayed.
390
412
  * ## Usage
391
413
  * ```html
392
414
  * <!-- index.html -->
393
- * <searchcraft-popover-list-view />
415
+ * <searchcraft-search-results-per-page increment="20" />
394
416
  * ```
395
417
  */
396
- interface SearchcraftPopoverListView {
418
+ interface SearchcraftSearchResultsPerPage {
397
419
  /**
398
- * The documents to render in the list view.
420
+ * The custom styles object.
399
421
  */
400
- "documents": Record<string, unknown>[] | undefined;
422
+ "customStyles"?: string;
401
423
  /**
402
- * The mappings that define how the data in the documents are mapped to the list-view-item elements.
424
+ * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
403
425
  */
404
- "popoverResultMappings": PopoverResultMappings | undefined;
426
+ "increment": string | number;
405
427
  }
406
428
  /**
407
- * This web component is designed to display the number of results returned from a search query.
408
- * It provides users with real-time feedback on the scale of the results, such as the total number of items found.
429
+ * This web component is designed to allow users to select between a group of options.
409
430
  * ## Usage
410
431
  * ```html
411
432
  * <!-- index.html -->
412
- * <searchcraft-results-info />
433
+ * <searchcraft-select
434
+ * inputId="searchcraft-select"
435
+ * name="searchcraft-select"
436
+ * options="[{ label: 'label', value: 'value' }]"
437
+ * />
413
438
  * ```
414
439
  */
415
- interface SearchcraftResultsInfo {
440
+ interface SearchcraftSelect {
441
+ /**
442
+ * The caption displayed below the select input.
443
+ */
444
+ "caption"?: string;
445
+ /**
446
+ * A custom styles object.
447
+ */
448
+ "customStyles"?: string;
449
+ /**
450
+ * Whether the select input is disabled.
451
+ */
452
+ "disabled"?: boolean;
453
+ /**
454
+ * The ID for the select input.
455
+ */
456
+ "inputId": string;
457
+ /**
458
+ * The label of the select input.
459
+ */
460
+ "label"?: string;
461
+ /**
462
+ * The ID for the label of the select input.
463
+ */
464
+ "labelId"?: string;
465
+ /**
466
+ * The name of the select input.
467
+ */
468
+ "name": string;
469
+ /**
470
+ * The options for the select input.
471
+ */
472
+ "options": SearchcraftSelectOption[] | string;
416
473
  }
417
474
  /**
418
475
  * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
@@ -437,7 +494,24 @@ export namespace Components {
437
494
  */
438
495
  "min": number;
439
496
  }
497
+ /**
498
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
499
+ * It does not render anything visible, its only function is to manage the css styles on the page.
500
+ * ## Usage
501
+ * ```html
502
+ * <!-- index.html -->
503
+ * <searchcraft-theme theme="light" custom-theme="{}" />
504
+ * ```
505
+ */
440
506
  interface SearchcraftTheme {
507
+ /**
508
+ * The custom theme configuration object.
509
+ */
510
+ "customTheme": string;
511
+ /**
512
+ * The name of the theme.
513
+ */
514
+ "theme": string;
441
515
  }
442
516
  /**
443
517
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
@@ -470,6 +544,10 @@ export interface SearchcraftInputFormCustomEvent<T> extends CustomEvent<T> {
470
544
  detail: T;
471
545
  target: HTMLSearchcraftInputFormElement;
472
546
  }
547
+ export interface SearchcraftSelectCustomEvent<T> extends CustomEvent<T> {
548
+ detail: T;
549
+ target: HTMLSearchcraftSelectElement;
550
+ }
473
551
  export interface SearchcraftSliderCustomEvent<T> extends CustomEvent<T> {
474
552
  detail: T;
475
553
  target: HTMLSearchcraftSliderElement;
@@ -490,6 +568,15 @@ declare global {
490
568
  prototype: HTMLSearchcraftBaseSearchResultElement;
491
569
  new (): HTMLSearchcraftBaseSearchResultElement;
492
570
  };
571
+ /**
572
+ * A single list item rendered in a searchcraft-popover-list-view.
573
+ */
574
+ interface HTMLSearchcraftBaseSearchResultAdElement extends Components.SearchcraftBaseSearchResultAd, HTMLStencilElement {
575
+ }
576
+ var HTMLSearchcraftBaseSearchResultAdElement: {
577
+ prototype: HTMLSearchcraftBaseSearchResultAdElement;
578
+ new (): HTMLSearchcraftBaseSearchResultAdElement;
579
+ };
493
580
  interface HTMLSearchcraftBaseSearchResultsElementEventMap {
494
581
  "noResults": void;
495
582
  }
@@ -637,7 +724,7 @@ declare global {
637
724
  * ```js
638
725
  * // index.js
639
726
  * const searchInputForm = document.querySelector('searchcraft-input-form');
640
- * seardchInputForm.config = {
727
+ * searchInputForm.config = {
641
728
  * index: [],
642
729
  * readKey: '',
643
730
  * endpointUrl: '',
@@ -675,6 +762,21 @@ declare global {
675
762
  prototype: HTMLSearchcraftInputLabelElement;
676
763
  new (): HTMLSearchcraftInputLabelElement;
677
764
  };
765
+ /**
766
+ * This web component is designed to facilitate pagination of search results.
767
+ * Once a query is submitted, calculates the number for pages.
768
+ * ## Usage
769
+ * ```html
770
+ * <!-- index.html -->
771
+ * <searchcraft-pagination />
772
+ * ```
773
+ */
774
+ interface HTMLSearchcraftPaginationElement extends Components.SearchcraftPagination, HTMLStencilElement {
775
+ }
776
+ var HTMLSearchcraftPaginationElement: {
777
+ prototype: HTMLSearchcraftPaginationElement;
778
+ new (): HTMLSearchcraftPaginationElement;
779
+ };
678
780
  /**
679
781
  * Renders a button which, when clicked, turns on popover visibility.
680
782
  */
@@ -685,7 +787,7 @@ declare global {
685
787
  new (): HTMLSearchcraftPopoverButtonElement;
686
788
  };
687
789
  /**
688
- * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field.
790
+ * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
689
791
  * ## Usage
690
792
  * ```html
691
793
  * <!-- index.html -->
@@ -725,6 +827,15 @@ declare global {
725
827
  prototype: HTMLSearchcraftPopoverListItemElement;
726
828
  new (): HTMLSearchcraftPopoverListItemElement;
727
829
  };
830
+ /**
831
+ * A single list item rendered in a searchcraft-popover-list-view.
832
+ */
833
+ interface HTMLSearchcraftPopoverListItemAdElement extends Components.SearchcraftPopoverListItemAd, HTMLStencilElement {
834
+ }
835
+ var HTMLSearchcraftPopoverListItemAdElement: {
836
+ prototype: HTMLSearchcraftPopoverListItemAdElement;
837
+ new (): HTMLSearchcraftPopoverListItemAdElement;
838
+ };
728
839
  /**
729
840
  * This web component is designed to display a list of results within a popover interface.
730
841
  * It is consumed within the `searchcraft-popover-form` component.
@@ -742,10 +853,14 @@ declare global {
742
853
  };
743
854
  /**
744
855
  * This web component is designed to display the number of results returned from a search query.
745
- * It provides users with real-time feedback on the scale of the results, such as the total number of items found.
746
856
  * ## Usage
747
857
  * ```html
748
858
  * <!-- index.html -->
859
+ * <script>
860
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
861
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
862
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
863
+ * </script>
749
864
  * <searchcraft-results-info />
750
865
  * ```
751
866
  */
@@ -755,6 +870,49 @@ declare global {
755
870
  prototype: HTMLSearchcraftResultsInfoElement;
756
871
  new (): HTMLSearchcraftResultsInfoElement;
757
872
  };
873
+ /**
874
+ * This web component is designed to choose the number of search results displayed.
875
+ * ## Usage
876
+ * ```html
877
+ * <!-- index.html -->
878
+ * <searchcraft-search-results-per-page increment="20" />
879
+ * ```
880
+ */
881
+ interface HTMLSearchcraftSearchResultsPerPageElement extends Components.SearchcraftSearchResultsPerPage, HTMLStencilElement {
882
+ }
883
+ var HTMLSearchcraftSearchResultsPerPageElement: {
884
+ prototype: HTMLSearchcraftSearchResultsPerPageElement;
885
+ new (): HTMLSearchcraftSearchResultsPerPageElement;
886
+ };
887
+ interface HTMLSearchcraftSelectElementEventMap {
888
+ "selectChange": string;
889
+ }
890
+ /**
891
+ * This web component is designed to allow users to select between a group of options.
892
+ * ## Usage
893
+ * ```html
894
+ * <!-- index.html -->
895
+ * <searchcraft-select
896
+ * inputId="searchcraft-select"
897
+ * name="searchcraft-select"
898
+ * options="[{ label: 'label', value: 'value' }]"
899
+ * />
900
+ * ```
901
+ */
902
+ interface HTMLSearchcraftSelectElement extends Components.SearchcraftSelect, HTMLStencilElement {
903
+ addEventListener<K extends keyof HTMLSearchcraftSelectElementEventMap>(type: K, listener: (this: HTMLSearchcraftSelectElement, ev: SearchcraftSelectCustomEvent<HTMLSearchcraftSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
904
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
905
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
906
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
907
+ removeEventListener<K extends keyof HTMLSearchcraftSelectElementEventMap>(type: K, listener: (this: HTMLSearchcraftSelectElement, ev: SearchcraftSelectCustomEvent<HTMLSearchcraftSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
908
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
909
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
910
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
911
+ }
912
+ var HTMLSearchcraftSelectElement: {
913
+ prototype: HTMLSearchcraftSelectElement;
914
+ new (): HTMLSearchcraftSelectElement;
915
+ };
758
916
  interface HTMLSearchcraftSliderElementEventMap {
759
917
  "rangeChanged": any;
760
918
  }
@@ -777,6 +935,15 @@ declare global {
777
935
  prototype: HTMLSearchcraftSliderElement;
778
936
  new (): HTMLSearchcraftSliderElement;
779
937
  };
938
+ /**
939
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
940
+ * It does not render anything visible, its only function is to manage the css styles on the page.
941
+ * ## Usage
942
+ * ```html
943
+ * <!-- index.html -->
944
+ * <searchcraft-theme theme="light" custom-theme="{}" />
945
+ * ```
946
+ */
780
947
  interface HTMLSearchcraftThemeElement extends Components.SearchcraftTheme, HTMLStencilElement {
781
948
  }
782
949
  var HTMLSearchcraftThemeElement: {
@@ -806,6 +973,7 @@ declare global {
806
973
  };
807
974
  interface HTMLElementTagNameMap {
808
975
  "searchcraft-base-search-result": HTMLSearchcraftBaseSearchResultElement;
976
+ "searchcraft-base-search-result-ad": HTMLSearchcraftBaseSearchResultAdElement;
809
977
  "searchcraft-base-search-results": HTMLSearchcraftBaseSearchResultsElement;
810
978
  "searchcraft-button": HTMLSearchcraftButtonElement;
811
979
  "searchcraft-error-message": HTMLSearchcraftErrorMessageElement;
@@ -813,11 +981,15 @@ declare global {
813
981
  "searchcraft-filter-panel": HTMLSearchcraftFilterPanelElement;
814
982
  "searchcraft-input-form": HTMLSearchcraftInputFormElement;
815
983
  "searchcraft-input-label": HTMLSearchcraftInputLabelElement;
984
+ "searchcraft-pagination": HTMLSearchcraftPaginationElement;
816
985
  "searchcraft-popover-button": HTMLSearchcraftPopoverButtonElement;
817
986
  "searchcraft-popover-form": HTMLSearchcraftPopoverFormElement;
818
987
  "searchcraft-popover-list-item": HTMLSearchcraftPopoverListItemElement;
988
+ "searchcraft-popover-list-item-ad": HTMLSearchcraftPopoverListItemAdElement;
819
989
  "searchcraft-popover-list-view": HTMLSearchcraftPopoverListViewElement;
820
990
  "searchcraft-results-info": HTMLSearchcraftResultsInfoElement;
991
+ "searchcraft-search-results-per-page": HTMLSearchcraftSearchResultsPerPageElement;
992
+ "searchcraft-select": HTMLSearchcraftSelectElement;
821
993
  "searchcraft-slider": HTMLSearchcraftSliderElement;
822
994
  "searchcraft-theme": HTMLSearchcraftThemeElement;
823
995
  "searchcraft-toggle-button": HTMLSearchcraftToggleButtonElement;
@@ -830,18 +1002,6 @@ declare namespace LocalJSX {
830
1002
  * It is consumed within the `searchcraft-base-search-results` component.
831
1003
  */
832
1004
  interface SearchcraftBaseSearchResult {
833
- /**
834
- * The body content.
835
- */
836
- "bodyContent"?: string | undefined;
837
- /**
838
- * The link for the button rendered when containerHref is not present.
839
- */
840
- "buttonHref"?: string | undefined;
841
- /**
842
- * The label for the button rendered when containerHref is not present.
843
- */
844
- "buttonLabel"?: string | undefined;
845
1005
  /**
846
1006
  * The relationship between the current document and the link for the button rendered when containerHref is not present.
847
1007
  */
@@ -850,10 +1010,6 @@ declare namespace LocalJSX {
850
1010
  * Where to open the link for the button rendered when containerHref is not present.
851
1011
  */
852
1012
  "buttonTarget"?: '_blank' | '_self' | '_top' | '_parent';
853
- /**
854
- * The link for the containing element.
855
- */
856
- "containerHref"?: string | undefined;
857
1013
  /**
858
1014
  * The relationship between the current document and the link for the containing element.
859
1015
  */
@@ -870,30 +1026,18 @@ declare namespace LocalJSX {
870
1026
  * The position in the document. Used with the "document_clicked" measure event.
871
1027
  */
872
1028
  "documentPosition"?: number;
873
- /**
874
- * The footer content.
875
- */
876
- "footerContent"?: string | undefined;
877
- /**
878
- * The image alternative text.
879
- */
880
- "imageAlt"?: string | undefined;
881
1029
  /**
882
1030
  * The placement of the image.
883
1031
  */
884
1032
  "imagePlacement"?: 'left' | 'right';
885
- /**
886
- * The image source.
887
- */
888
- "imageSrc"?: string | undefined;
889
- /**
890
- * The subtitle content.
891
- */
892
- "subtitleContent"?: string | undefined;
893
- /**
894
- * The title content.
895
- */
896
- "titleContent"?: string | undefined;
1033
+ "item"?: SearchClientResponseItem | undefined;
1034
+ "searchResultMappings"?: SearchResultMappings | undefined;
1035
+ }
1036
+ /**
1037
+ * A single list item rendered in a searchcraft-popover-list-view.
1038
+ */
1039
+ interface SearchcraftBaseSearchResultAd {
1040
+ "adClientResponseItem"?: AdClientResponseItem;
897
1041
  }
898
1042
  /**
899
1043
  * This web component is responsible for displaying the results of a search query.
@@ -924,10 +1068,6 @@ declare namespace LocalJSX {
924
1068
  * ```
925
1069
  */
926
1070
  interface SearchcraftBaseSearchResults {
927
- /**
928
- * How often ads are injected.
929
- */
930
- "adInterval"?: number;
931
1071
  /**
932
1072
  * The label for the button rendered when containerHref is not present for each result.
933
1073
  */
@@ -958,14 +1098,6 @@ declare namespace LocalJSX {
958
1098
  * When no results are returned.
959
1099
  */
960
1100
  "onNoResults"?: (event: SearchcraftBaseSearchResultsCustomEvent<void>) => void;
961
- /**
962
- * Should an ad be placed at the end of the results.
963
- */
964
- "placeAdAtEnd"?: boolean;
965
- /**
966
- * Should an ad be placed at the start of the results.
967
- */
968
- "placeAdAtStart"?: boolean;
969
1101
  /**
970
1102
  * The placement of the image for each result.
971
1103
  */
@@ -981,10 +1113,18 @@ declare namespace LocalJSX {
981
1113
  * It is consumed within the `searchcraft-input-form` component.
982
1114
  */
983
1115
  interface SearchcraftButton {
1116
+ /**
1117
+ * Whether the button is disabled.
1118
+ */
1119
+ "disabled"?: boolean;
1120
+ /**
1121
+ * Controls the visual representation of the button.
1122
+ */
1123
+ "hierarchy"?: 'primary' | 'tertiary';
984
1124
  /**
985
1125
  * The icon element.
986
1126
  */
987
- "iconElement"?: Element;
1127
+ "icon"?: Element;
988
1128
  /**
989
1129
  * Should the button only display an icon.
990
1130
  */
@@ -992,15 +1132,19 @@ declare namespace LocalJSX {
992
1132
  /**
993
1133
  * The position of the icon.
994
1134
  */
995
- "iconPosition"?: string;
1135
+ "iconPosition"?: 'left' | 'right';
996
1136
  /**
997
1137
  * The label for the button.
998
1138
  */
999
1139
  "label"?: string;
1000
1140
  /**
1001
- * When the button is clicked.
1141
+ * The event fired when the button is clicked.
1002
1142
  */
1003
1143
  "onButtonClick"?: (event: SearchcraftButtonCustomEvent<void>) => void;
1144
+ /**
1145
+ * The type of the button.
1146
+ */
1147
+ "type"?: 'submit' | 'reset' | 'button';
1004
1148
  }
1005
1149
  /**
1006
1150
  * This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
@@ -1067,7 +1211,7 @@ declare namespace LocalJSX {
1067
1211
  * ```js
1068
1212
  * // index.js
1069
1213
  * const searchInputForm = document.querySelector('searchcraft-input-form');
1070
- * seardchInputForm.config = {
1214
+ * searchInputForm.config = {
1071
1215
  * index: [],
1072
1216
  * readKey: '',
1073
1217
  * endpointUrl: '',
@@ -1150,13 +1294,28 @@ declare namespace LocalJSX {
1150
1294
  "inputLabelClassName"?: string | undefined;
1151
1295
  "label"?: string;
1152
1296
  }
1297
+ /**
1298
+ * This web component is designed to facilitate pagination of search results.
1299
+ * Once a query is submitted, calculates the number for pages.
1300
+ * ## Usage
1301
+ * ```html
1302
+ * <!-- index.html -->
1303
+ * <searchcraft-pagination />
1304
+ * ```
1305
+ */
1306
+ interface SearchcraftPagination {
1307
+ /**
1308
+ * The custom styles object.
1309
+ */
1310
+ "customStyles"?: string;
1311
+ }
1153
1312
  /**
1154
1313
  * Renders a button which, when clicked, turns on popover visibility.
1155
1314
  */
1156
1315
  interface SearchcraftPopoverButton {
1157
1316
  }
1158
1317
  /**
1159
- * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field.
1318
+ * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
1160
1319
  * ## Usage
1161
1320
  * ```html
1162
1321
  * <!-- index.html -->
@@ -1211,56 +1370,132 @@ declare namespace LocalJSX {
1211
1370
  * The document position relative to the search results (For Measure)
1212
1371
  */
1213
1372
  "documentPosition"?: number;
1373
+ "item"?: SearchClientResponseItem | undefined;
1374
+ "popoverResultMappings"?: PopoverResultMappings | undefined;
1375
+ }
1376
+ /**
1377
+ * A single list item rendered in a searchcraft-popover-list-view.
1378
+ */
1379
+ interface SearchcraftPopoverListItemAd {
1380
+ "adClientResponseItem"?: AdClientResponseItem;
1381
+ }
1382
+ /**
1383
+ * This web component is designed to display a list of results within a popover interface.
1384
+ * It is consumed within the `searchcraft-popover-form` component.
1385
+ * ## Usage
1386
+ * ```html
1387
+ * <!-- index.html -->
1388
+ * <searchcraft-popover-list-view />
1389
+ * ```
1390
+ */
1391
+ interface SearchcraftPopoverListView {
1392
+ "adClientResponseItems"?: AdClientResponseItem[] | undefined;
1214
1393
  /**
1215
- * The link href
1216
- */
1217
- "href"?: string | undefined;
1218
- /**
1219
- * The image alt tag.
1394
+ * The mappings that define how the data in the documents are mapped to the list-view-item elements.
1220
1395
  */
1221
- "imageAlt"?: string | undefined;
1396
+ "popoverResultMappings"?: PopoverResultMappings | undefined;
1222
1397
  /**
1223
- * The source of the image. If not included, no item will be rendered.
1398
+ * The items to render in the list view.
1224
1399
  */
1225
- "imageSrc"?: string | undefined;
1400
+ "searchClientResponseItems"?: SearchClientResponseItem[] | undefined;
1401
+ "searchResultsPage": number;
1402
+ "searchResultsPerPage": number;
1403
+ }
1404
+ /**
1405
+ * This web component is designed to display the number of results returned from a search query.
1406
+ * ## Usage
1407
+ * ```html
1408
+ * <!-- index.html -->
1409
+ * <script>
1410
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
1411
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
1412
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
1413
+ * </script>
1414
+ * <searchcraft-results-info />
1415
+ * ```
1416
+ */
1417
+ interface SearchcraftResultsInfo {
1226
1418
  /**
1227
- * The result subtitle
1419
+ * The custom formatter for the resulting string.
1420
+ * @example ```ts resultsInfo.customFormatter = (range, count, responseTime) => `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`; ```
1228
1421
  */
1229
- "subtitleContent"?: string | undefined;
1422
+ "customFormatter"?: (
1423
+ range: [string, string],
1424
+ count: string,
1425
+ responseTime: string,
1426
+ ) => void;
1230
1427
  /**
1231
- * The result title
1428
+ * The custom styles object.
1232
1429
  */
1233
- "titleContent"?: string | undefined;
1430
+ "customStyles"?: string;
1234
1431
  }
1235
1432
  /**
1236
- * This web component is designed to display a list of results within a popover interface.
1237
- * It is consumed within the `searchcraft-popover-form` component.
1433
+ * This web component is designed to choose the number of search results displayed.
1238
1434
  * ## Usage
1239
1435
  * ```html
1240
1436
  * <!-- index.html -->
1241
- * <searchcraft-popover-list-view />
1437
+ * <searchcraft-search-results-per-page increment="20" />
1242
1438
  * ```
1243
1439
  */
1244
- interface SearchcraftPopoverListView {
1440
+ interface SearchcraftSearchResultsPerPage {
1245
1441
  /**
1246
- * The documents to render in the list view.
1442
+ * The custom styles object.
1247
1443
  */
1248
- "documents"?: Record<string, unknown>[] | undefined;
1444
+ "customStyles"?: string;
1249
1445
  /**
1250
- * The mappings that define how the data in the documents are mapped to the list-view-item elements.
1446
+ * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
1251
1447
  */
1252
- "popoverResultMappings"?: PopoverResultMappings | undefined;
1448
+ "increment"?: string | number;
1253
1449
  }
1254
1450
  /**
1255
- * This web component is designed to display the number of results returned from a search query.
1256
- * It provides users with real-time feedback on the scale of the results, such as the total number of items found.
1451
+ * This web component is designed to allow users to select between a group of options.
1257
1452
  * ## Usage
1258
1453
  * ```html
1259
1454
  * <!-- index.html -->
1260
- * <searchcraft-results-info />
1455
+ * <searchcraft-select
1456
+ * inputId="searchcraft-select"
1457
+ * name="searchcraft-select"
1458
+ * options="[{ label: 'label', value: 'value' }]"
1459
+ * />
1261
1460
  * ```
1262
1461
  */
1263
- interface SearchcraftResultsInfo {
1462
+ interface SearchcraftSelect {
1463
+ /**
1464
+ * The caption displayed below the select input.
1465
+ */
1466
+ "caption"?: string;
1467
+ /**
1468
+ * A custom styles object.
1469
+ */
1470
+ "customStyles"?: string;
1471
+ /**
1472
+ * Whether the select input is disabled.
1473
+ */
1474
+ "disabled"?: boolean;
1475
+ /**
1476
+ * The ID for the select input.
1477
+ */
1478
+ "inputId": string;
1479
+ /**
1480
+ * The label of the select input.
1481
+ */
1482
+ "label"?: string;
1483
+ /**
1484
+ * The ID for the label of the select input.
1485
+ */
1486
+ "labelId"?: string;
1487
+ /**
1488
+ * The name of the select input.
1489
+ */
1490
+ "name": string;
1491
+ /**
1492
+ * The event fired when the select is changed.
1493
+ */
1494
+ "onSelectChange"?: (event: SearchcraftSelectCustomEvent<string>) => void;
1495
+ /**
1496
+ * The options for the select input.
1497
+ */
1498
+ "options"?: SearchcraftSelectOption[] | string;
1264
1499
  }
1265
1500
  /**
1266
1501
  * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
@@ -1289,7 +1524,24 @@ declare namespace LocalJSX {
1289
1524
  */
1290
1525
  "onRangeChanged"?: (event: SearchcraftSliderCustomEvent<any>) => void;
1291
1526
  }
1527
+ /**
1528
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
1529
+ * It does not render anything visible, its only function is to manage the css styles on the page.
1530
+ * ## Usage
1531
+ * ```html
1532
+ * <!-- index.html -->
1533
+ * <searchcraft-theme theme="light" custom-theme="{}" />
1534
+ * ```
1535
+ */
1292
1536
  interface SearchcraftTheme {
1537
+ /**
1538
+ * The custom theme configuration object.
1539
+ */
1540
+ "customTheme"?: string;
1541
+ /**
1542
+ * The name of the theme.
1543
+ */
1544
+ "theme"?: string;
1293
1545
  }
1294
1546
  /**
1295
1547
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
@@ -1311,6 +1563,7 @@ declare namespace LocalJSX {
1311
1563
  }
1312
1564
  interface IntrinsicElements {
1313
1565
  "searchcraft-base-search-result": SearchcraftBaseSearchResult;
1566
+ "searchcraft-base-search-result-ad": SearchcraftBaseSearchResultAd;
1314
1567
  "searchcraft-base-search-results": SearchcraftBaseSearchResults;
1315
1568
  "searchcraft-button": SearchcraftButton;
1316
1569
  "searchcraft-error-message": SearchcraftErrorMessage;
@@ -1318,11 +1571,15 @@ declare namespace LocalJSX {
1318
1571
  "searchcraft-filter-panel": SearchcraftFilterPanel;
1319
1572
  "searchcraft-input-form": SearchcraftInputForm;
1320
1573
  "searchcraft-input-label": SearchcraftInputLabel;
1574
+ "searchcraft-pagination": SearchcraftPagination;
1321
1575
  "searchcraft-popover-button": SearchcraftPopoverButton;
1322
1576
  "searchcraft-popover-form": SearchcraftPopoverForm;
1323
1577
  "searchcraft-popover-list-item": SearchcraftPopoverListItem;
1578
+ "searchcraft-popover-list-item-ad": SearchcraftPopoverListItemAd;
1324
1579
  "searchcraft-popover-list-view": SearchcraftPopoverListView;
1325
1580
  "searchcraft-results-info": SearchcraftResultsInfo;
1581
+ "searchcraft-search-results-per-page": SearchcraftSearchResultsPerPage;
1582
+ "searchcraft-select": SearchcraftSelect;
1326
1583
  "searchcraft-slider": SearchcraftSlider;
1327
1584
  "searchcraft-theme": SearchcraftTheme;
1328
1585
  "searchcraft-toggle-button": SearchcraftToggleButton;
@@ -1338,6 +1595,10 @@ declare module "@stencil/core" {
1338
1595
  * It is consumed within the `searchcraft-base-search-results` component.
1339
1596
  */
1340
1597
  "searchcraft-base-search-result": LocalJSX.SearchcraftBaseSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultElement>;
1598
+ /**
1599
+ * A single list item rendered in a searchcraft-popover-list-view.
1600
+ */
1601
+ "searchcraft-base-search-result-ad": LocalJSX.SearchcraftBaseSearchResultAd & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultAdElement>;
1341
1602
  /**
1342
1603
  * This web component is responsible for displaying the results of a search query.
1343
1604
  * Once a query is submitted, the component formats and presents an ordered list of the results.
@@ -1419,7 +1680,7 @@ declare module "@stencil/core" {
1419
1680
  * ```js
1420
1681
  * // index.js
1421
1682
  * const searchInputForm = document.querySelector('searchcraft-input-form');
1422
- * seardchInputForm.config = {
1683
+ * searchInputForm.config = {
1423
1684
  * index: [],
1424
1685
  * readKey: '',
1425
1686
  * endpointUrl: '',
@@ -1439,12 +1700,22 @@ declare module "@stencil/core" {
1439
1700
  * ```
1440
1701
  */
1441
1702
  "searchcraft-input-label": LocalJSX.SearchcraftInputLabel & JSXBase.HTMLAttributes<HTMLSearchcraftInputLabelElement>;
1703
+ /**
1704
+ * This web component is designed to facilitate pagination of search results.
1705
+ * Once a query is submitted, calculates the number for pages.
1706
+ * ## Usage
1707
+ * ```html
1708
+ * <!-- index.html -->
1709
+ * <searchcraft-pagination />
1710
+ * ```
1711
+ */
1712
+ "searchcraft-pagination": LocalJSX.SearchcraftPagination & JSXBase.HTMLAttributes<HTMLSearchcraftPaginationElement>;
1442
1713
  /**
1443
1714
  * Renders a button which, when clicked, turns on popover visibility.
1444
1715
  */
1445
1716
  "searchcraft-popover-button": LocalJSX.SearchcraftPopoverButton & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverButtonElement>;
1446
1717
  /**
1447
- * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field.
1718
+ * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
1448
1719
  * ## Usage
1449
1720
  * ```html
1450
1721
  * <!-- index.html -->
@@ -1474,6 +1745,10 @@ declare module "@stencil/core" {
1474
1745
  * A single list item rendered in a searchcraft-popover-list-view.
1475
1746
  */
1476
1747
  "searchcraft-popover-list-item": LocalJSX.SearchcraftPopoverListItem & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListItemElement>;
1748
+ /**
1749
+ * A single list item rendered in a searchcraft-popover-list-view.
1750
+ */
1751
+ "searchcraft-popover-list-item-ad": LocalJSX.SearchcraftPopoverListItemAd & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListItemAdElement>;
1477
1752
  /**
1478
1753
  * This web component is designed to display a list of results within a popover interface.
1479
1754
  * It is consumed within the `searchcraft-popover-form` component.
@@ -1486,20 +1761,55 @@ declare module "@stencil/core" {
1486
1761
  "searchcraft-popover-list-view": LocalJSX.SearchcraftPopoverListView & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListViewElement>;
1487
1762
  /**
1488
1763
  * This web component is designed to display the number of results returned from a search query.
1489
- * It provides users with real-time feedback on the scale of the results, such as the total number of items found.
1490
1764
  * ## Usage
1491
1765
  * ```html
1492
1766
  * <!-- index.html -->
1767
+ * <script>
1768
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
1769
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
1770
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
1771
+ * </script>
1493
1772
  * <searchcraft-results-info />
1494
1773
  * ```
1495
1774
  */
1496
1775
  "searchcraft-results-info": LocalJSX.SearchcraftResultsInfo & JSXBase.HTMLAttributes<HTMLSearchcraftResultsInfoElement>;
1776
+ /**
1777
+ * This web component is designed to choose the number of search results displayed.
1778
+ * ## Usage
1779
+ * ```html
1780
+ * <!-- index.html -->
1781
+ * <searchcraft-search-results-per-page increment="20" />
1782
+ * ```
1783
+ */
1784
+ "searchcraft-search-results-per-page": LocalJSX.SearchcraftSearchResultsPerPage & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsPerPageElement>;
1785
+ /**
1786
+ * This web component is designed to allow users to select between a group of options.
1787
+ * ## Usage
1788
+ * ```html
1789
+ * <!-- index.html -->
1790
+ * <searchcraft-select
1791
+ * inputId="searchcraft-select"
1792
+ * name="searchcraft-select"
1793
+ * options="[{ label: 'label', value: 'value' }]"
1794
+ * />
1795
+ * ```
1796
+ */
1797
+ "searchcraft-select": LocalJSX.SearchcraftSelect & JSXBase.HTMLAttributes<HTMLSearchcraftSelectElement>;
1497
1798
  /**
1498
1799
  * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
1499
1800
  * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
1500
1801
  * It is consumed by the `searchcraft-filter-panel` component.
1501
1802
  */
1502
1803
  "searchcraft-slider": LocalJSX.SearchcraftSlider & JSXBase.HTMLAttributes<HTMLSearchcraftSliderElement>;
1804
+ /**
1805
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
1806
+ * It does not render anything visible, its only function is to manage the css styles on the page.
1807
+ * ## Usage
1808
+ * ```html
1809
+ * <!-- index.html -->
1810
+ * <searchcraft-theme theme="light" custom-theme="{}" />
1811
+ * ```
1812
+ */
1503
1813
  "searchcraft-theme": LocalJSX.SearchcraftTheme & JSXBase.HTMLAttributes<HTMLSearchcraftThemeElement>;
1504
1814
  /**
1505
1815
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.