@coveo/atomic 3.33.8-pre.4dadface29 → 3.33.8-pre.4e37aa6985

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 (220) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/atomic.esm.js.map +1 -1
  3. package/dist/atomic/components/_index.d.ts +2 -2
  4. package/dist/atomic/components/_index.js +1 -1
  5. package/dist/atomic/components/analytics-config.js +1 -1
  6. package/dist/atomic/components/atomic-category-facet.js +1 -1
  7. package/dist/atomic/components/atomic-facet.js +1 -1
  8. package/dist/atomic/components/atomic-format-currency.js +1 -1
  9. package/dist/atomic/components/atomic-format-number.js +1 -1
  10. package/dist/atomic/components/atomic-format-unit.js +1 -1
  11. package/dist/atomic/components/atomic-insight-pager.js +2 -38
  12. package/dist/atomic/components/atomic-insight-pager.js.map +1 -1
  13. package/dist/atomic/components/atomic-insight-search-box.js +29 -2
  14. package/dist/atomic/components/atomic-insight-search-box.js.map +1 -1
  15. package/dist/atomic/components/atomic-numeric-facet.js +1 -1
  16. package/dist/atomic/components/atomic-pager.d.ts +11 -0
  17. package/dist/atomic/components/atomic-pager.js +134 -0
  18. package/dist/atomic/components/atomic-pager.js.map +1 -0
  19. package/dist/atomic/components/atomic-query-error.js +1 -1
  20. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  21. package/dist/atomic/components/atomic-quickview.js +1 -1
  22. package/dist/atomic/components/atomic-refine-modal2.js +1 -1
  23. package/dist/atomic/components/atomic-refine-toggle.js +1 -1
  24. package/dist/atomic/components/atomic-relevance-inspector2.js +2 -2
  25. package/dist/atomic/components/atomic-result-children.js +1 -1
  26. package/dist/atomic/components/atomic-result-fields-list.js +1 -1
  27. package/dist/atomic/components/atomic-result-link.js +1 -1
  28. package/dist/atomic/components/atomic-result-list.js +1 -1
  29. package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
  30. package/dist/atomic/components/atomic-search-box-recent-queries2.js +1 -1
  31. package/dist/atomic/components/atomic-search-box.js +5 -11
  32. package/dist/atomic/components/atomic-search-box.js.map +1 -1
  33. package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
  34. package/dist/atomic/components/atomic-sort-dropdown.js +2 -2
  35. package/dist/atomic/components/atomic-sort-expression.js +1 -1
  36. package/dist/atomic/components/atomic-tab-manager.js +1 -1
  37. package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +49 -7
  38. package/dist/atomic/components/components/commerce/atomic-commerce-pager/atomic-commerce-pager.js +2 -3
  39. package/dist/atomic/components/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.js +2 -2
  40. package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +25 -10
  41. package/dist/atomic/components/components/search/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.js +107 -0
  42. package/dist/atomic/components/components/search/index.js +1 -1
  43. package/dist/atomic/components/components/search/lazy-index.js +1 -1
  44. package/dist/atomic/components/global/environment.js +1 -1
  45. package/dist/atomic/components/stencil-pager-navigation.js +42 -0
  46. package/dist/atomic/components/stencil-pager-navigation.js.map +1 -0
  47. package/dist/atomic/{p-e8d5e852.entry.js → p-021f01d6.entry.js} +2 -2
  48. package/dist/atomic/{p-45037e00.entry.js → p-0acc4539.entry.js} +2 -2
  49. package/dist/atomic/p-211d7d6a.js +2 -0
  50. package/dist/atomic/p-211d7d6a.js.map +1 -0
  51. package/dist/atomic/{p-ee1cfdb5.js → p-26755f34.js} +2 -2
  52. package/dist/atomic/{p-3af5c567.entry.js → p-330e6e7c.entry.js} +2 -2
  53. package/dist/atomic/{p-4e9d1f9e.entry.js → p-39e63678.entry.js} +2 -2
  54. package/dist/atomic/{p-6f988841.entry.js → p-3c8d109e.entry.js} +2 -2
  55. package/dist/atomic/{p-65373475.entry.js → p-4b3d253b.entry.js} +2 -2
  56. package/dist/atomic/{p-4c30ca3e.entry.js → p-52ba404c.entry.js} +2 -2
  57. package/dist/atomic/{p-0222c2fe.entry.js → p-5fe27003.entry.js} +2 -2
  58. package/dist/atomic/{p-45c4685e.entry.js → p-75e00690.entry.js} +2 -2
  59. package/dist/atomic/{p-8acb1466.entry.js → p-78b70622.entry.js} +2 -2
  60. package/dist/atomic/p-7a06a356.entry.js +2 -0
  61. package/dist/atomic/p-7a06a356.entry.js.map +1 -0
  62. package/dist/atomic/{p-f073a78d.entry.js → p-7b0b9e9b.entry.js} +2 -2
  63. package/dist/atomic/{p-a02b1209.entry.js → p-7b899b57.entry.js} +2 -2
  64. package/dist/atomic/{p-bf50b64d.entry.js → p-7dfcd6af.entry.js} +2 -2
  65. package/dist/atomic/{p-5adbf098.entry.js → p-877d35b1.entry.js} +2 -2
  66. package/dist/atomic/{p-9883415e.entry.js → p-93e29b24.entry.js} +2 -2
  67. package/dist/atomic/{p-be1b98a6.entry.js → p-a760d9f9.entry.js} +2 -2
  68. package/dist/atomic/{p-00e5bb15.entry.js → p-ae060711.entry.js} +2 -2
  69. package/dist/atomic/{p-4915faeb.entry.js → p-ae98c582.entry.js} +2 -2
  70. package/dist/atomic/{p-71bb8125.entry.js → p-b28011e6.entry.js} +2 -2
  71. package/dist/atomic/{p-2dc111f9.entry.js → p-c32de8ca.entry.js} +2 -2
  72. package/dist/atomic/{p-d11b2b24.entry.js → p-c49cfa0c.entry.js} +2 -2
  73. package/dist/atomic/{p-fb7ad34b.entry.js → p-c88a3d2d.entry.js} +2 -2
  74. package/dist/atomic/{p-b4ad3036.entry.js → p-d00a12e9.entry.js} +2 -2
  75. package/dist/atomic/p-d2b14ff1.entry.js +2 -0
  76. package/dist/atomic/p-d2b14ff1.entry.js.map +1 -0
  77. package/dist/atomic/{p-757de797.entry.js → p-de066001.entry.js} +2 -2
  78. package/dist/atomic/{p-d2d22ab2.entry.js → p-f22bcb8c.entry.js} +2 -2
  79. package/dist/atomic/p-fa8b7c4c.entry.js +2 -0
  80. package/dist/atomic/p-fa8b7c4c.entry.js.map +1 -0
  81. package/dist/atomic/p-fcf3f7d7.entry.js +2 -0
  82. package/dist/atomic/p-fcf3f7d7.entry.js.map +1 -0
  83. package/dist/cjs/_loader.cjs.js +1 -1
  84. package/dist/cjs/{analytics-config-cac91609.js → analytics-config-44722cff.js} +2 -2
  85. package/dist/cjs/{analytics-config-cac91609.js.map → analytics-config-44722cff.js.map} +1 -1
  86. package/dist/cjs/atomic-category-facet.cjs.entry.js +1 -1
  87. package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
  88. package/dist/cjs/atomic-format-currency.cjs.entry.js +1 -1
  89. package/dist/cjs/atomic-format-number.cjs.entry.js +1 -1
  90. package/dist/cjs/atomic-format-unit.cjs.entry.js +1 -1
  91. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  92. package/dist/cjs/atomic-insight-pager.cjs.entry.js +7 -41
  93. package/dist/cjs/atomic-insight-pager.cjs.entry.js.map +1 -1
  94. package/dist/cjs/atomic-insight-search-box.cjs.entry.js +30 -4
  95. package/dist/cjs/atomic-insight-search-box.cjs.entry.js.map +1 -1
  96. package/dist/cjs/atomic-numeric-facet.cjs.entry.js +1 -1
  97. package/dist/cjs/atomic-pager.cjs.entry.js +121 -0
  98. package/dist/cjs/atomic-pager.cjs.entry.js.map +1 -0
  99. package/dist/cjs/atomic-query-error.cjs.entry.js +1 -1
  100. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  101. package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
  102. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  103. package/dist/cjs/atomic-refine-modal.cjs.entry.js +1 -1
  104. package/dist/cjs/atomic-refine-toggle.cjs.entry.js +1 -1
  105. package/dist/cjs/atomic-relevance-inspector.cjs.entry.js +2 -2
  106. package/dist/cjs/atomic-result-children.cjs.entry.js +1 -1
  107. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
  108. package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
  109. package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
  110. package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +1 -1
  111. package/dist/cjs/{atomic-search-box-query-suggestions_2.cjs.entry.js → atomic-search-box-recent-queries.cjs.entry.js} +5 -68
  112. package/dist/cjs/atomic-search-box-recent-queries.cjs.entry.js.map +1 -0
  113. package/dist/cjs/atomic-search-box.cjs.entry.js +4 -4
  114. package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
  115. package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
  116. package/dist/cjs/atomic-sort-dropdown.cjs.entry.js +2 -2
  117. package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
  118. package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
  119. package/dist/cjs/atomic.cjs.js +1 -1
  120. package/dist/cjs/index-757bc886.js +6 -2
  121. package/dist/cjs/stencil-pager-navigation-c20b8a95.js +48 -0
  122. package/dist/cjs/stencil-pager-navigation-c20b8a95.js.map +1 -0
  123. package/dist/cjs/version.cjs.js +2 -2
  124. package/dist/esm/_loader.js +1 -1
  125. package/dist/esm/{analytics-config-89e8f18b.js → analytics-config-a1bf404f.js} +2 -2
  126. package/dist/esm/{analytics-config-89e8f18b.js.map → analytics-config-a1bf404f.js.map} +1 -1
  127. package/dist/esm/atomic-category-facet.entry.js +1 -1
  128. package/dist/esm/atomic-facet.entry.js +1 -1
  129. package/dist/esm/atomic-format-currency.entry.js +1 -1
  130. package/dist/esm/atomic-format-number.entry.js +1 -1
  131. package/dist/esm/atomic-format-unit.entry.js +1 -1
  132. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  133. package/dist/esm/atomic-insight-pager.entry.js +4 -38
  134. package/dist/esm/atomic-insight-pager.entry.js.map +1 -1
  135. package/dist/esm/atomic-insight-search-box.entry.js +29 -3
  136. package/dist/esm/atomic-insight-search-box.entry.js.map +1 -1
  137. package/dist/esm/atomic-numeric-facet.entry.js +1 -1
  138. package/dist/esm/atomic-pager.entry.js +117 -0
  139. package/dist/esm/atomic-pager.entry.js.map +1 -0
  140. package/dist/esm/atomic-query-error.entry.js +1 -1
  141. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  142. package/dist/esm/atomic-quickview.entry.js +1 -1
  143. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  144. package/dist/esm/atomic-refine-modal.entry.js +1 -1
  145. package/dist/esm/atomic-refine-toggle.entry.js +1 -1
  146. package/dist/esm/atomic-relevance-inspector.entry.js +2 -2
  147. package/dist/esm/atomic-result-children.entry.js +1 -1
  148. package/dist/esm/atomic-result-fields-list.entry.js +1 -1
  149. package/dist/esm/atomic-result-link.entry.js +1 -1
  150. package/dist/esm/atomic-result-list.entry.js +1 -1
  151. package/dist/esm/atomic-result-placeholder_8.entry.js +1 -1
  152. package/dist/esm/{atomic-search-box-query-suggestions_2.entry.js → atomic-search-box-recent-queries.entry.js} +8 -70
  153. package/dist/esm/atomic-search-box-recent-queries.entry.js.map +1 -0
  154. package/dist/esm/atomic-search-box.entry.js +4 -4
  155. package/dist/esm/atomic-search-interface.entry.js +1 -1
  156. package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
  157. package/dist/esm/atomic-sort-dropdown.entry.js +2 -2
  158. package/dist/esm/atomic-sort-expression.entry.js +1 -1
  159. package/dist/esm/atomic-tab-manager.entry.js +1 -1
  160. package/dist/esm/atomic.js +1 -1
  161. package/dist/esm/index-3f35faca.js +6 -2
  162. package/dist/esm/stencil-pager-navigation-7261a834.js +42 -0
  163. package/dist/esm/stencil-pager-navigation-7261a834.js.map +1 -0
  164. package/dist/esm/version.js +2 -2
  165. package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +29 -1
  166. package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +1 -0
  167. package/dist/types/components/search/atomic-pager/atomic-pager.d.ts +16 -26
  168. package/dist/types/components/search/{search-box-suggestions/atomic-search-box-query-suggestions → atomic-search-box-query-suggestions}/atomic-search-box-query-suggestions.d.ts +16 -7
  169. package/dist/types/components/search/index.d.ts +1 -1
  170. package/dist/types/components.d.ts +65 -49
  171. package/docs/atomic-docs.json +169 -102
  172. package/package.json +3 -3
  173. package/dist/atomic/components/atomic-search-box-query-suggestions.d.ts +0 -11
  174. package/dist/atomic/components/atomic-search-box-query-suggestions.js +0 -8
  175. package/dist/atomic/components/atomic-search-box-query-suggestions.js.map +0 -1
  176. package/dist/atomic/components/atomic-search-box-query-suggestions2.js +0 -89
  177. package/dist/atomic/components/atomic-search-box-query-suggestions2.js.map +0 -1
  178. package/dist/atomic/components/components/search/atomic-pager/atomic-pager.js +0 -178
  179. package/dist/atomic/components/stencil-query-suggestions.js +0 -33
  180. package/dist/atomic/components/stencil-query-suggestions.js.map +0 -1
  181. package/dist/atomic/p-26a51a77.entry.js +0 -2
  182. package/dist/atomic/p-26a51a77.entry.js.map +0 -1
  183. package/dist/atomic/p-516b8165.entry.js +0 -2
  184. package/dist/atomic/p-516b8165.entry.js.map +0 -1
  185. package/dist/atomic/p-593903ec.entry.js +0 -2
  186. package/dist/atomic/p-593903ec.entry.js.map +0 -1
  187. package/dist/atomic/p-af93b44c.js +0 -2
  188. package/dist/atomic/p-af93b44c.js.map +0 -1
  189. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js.map +0 -1
  190. package/dist/cjs/stencil-query-suggestions-03268ecc.js +0 -38
  191. package/dist/cjs/stencil-query-suggestions-03268ecc.js.map +0 -1
  192. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js.map +0 -1
  193. package/dist/esm/stencil-query-suggestions-5d6a46d7.js +0 -33
  194. package/dist/esm/stencil-query-suggestions-5d6a46d7.js.map +0 -1
  195. /package/dist/atomic/{p-e8d5e852.entry.js.map → p-021f01d6.entry.js.map} +0 -0
  196. /package/dist/atomic/{p-45037e00.entry.js.map → p-0acc4539.entry.js.map} +0 -0
  197. /package/dist/atomic/{p-ee1cfdb5.js.map → p-26755f34.js.map} +0 -0
  198. /package/dist/atomic/{p-3af5c567.entry.js.map → p-330e6e7c.entry.js.map} +0 -0
  199. /package/dist/atomic/{p-4e9d1f9e.entry.js.map → p-39e63678.entry.js.map} +0 -0
  200. /package/dist/atomic/{p-6f988841.entry.js.map → p-3c8d109e.entry.js.map} +0 -0
  201. /package/dist/atomic/{p-65373475.entry.js.map → p-4b3d253b.entry.js.map} +0 -0
  202. /package/dist/atomic/{p-4c30ca3e.entry.js.map → p-52ba404c.entry.js.map} +0 -0
  203. /package/dist/atomic/{p-0222c2fe.entry.js.map → p-5fe27003.entry.js.map} +0 -0
  204. /package/dist/atomic/{p-45c4685e.entry.js.map → p-75e00690.entry.js.map} +0 -0
  205. /package/dist/atomic/{p-8acb1466.entry.js.map → p-78b70622.entry.js.map} +0 -0
  206. /package/dist/atomic/{p-f073a78d.entry.js.map → p-7b0b9e9b.entry.js.map} +0 -0
  207. /package/dist/atomic/{p-a02b1209.entry.js.map → p-7b899b57.entry.js.map} +0 -0
  208. /package/dist/atomic/{p-bf50b64d.entry.js.map → p-7dfcd6af.entry.js.map} +0 -0
  209. /package/dist/atomic/{p-5adbf098.entry.js.map → p-877d35b1.entry.js.map} +0 -0
  210. /package/dist/atomic/{p-9883415e.entry.js.map → p-93e29b24.entry.js.map} +0 -0
  211. /package/dist/atomic/{p-be1b98a6.entry.js.map → p-a760d9f9.entry.js.map} +0 -0
  212. /package/dist/atomic/{p-00e5bb15.entry.js.map → p-ae060711.entry.js.map} +0 -0
  213. /package/dist/atomic/{p-4915faeb.entry.js.map → p-ae98c582.entry.js.map} +0 -0
  214. /package/dist/atomic/{p-71bb8125.entry.js.map → p-b28011e6.entry.js.map} +0 -0
  215. /package/dist/atomic/{p-2dc111f9.entry.js.map → p-c32de8ca.entry.js.map} +0 -0
  216. /package/dist/atomic/{p-d11b2b24.entry.js.map → p-c49cfa0c.entry.js.map} +0 -0
  217. /package/dist/atomic/{p-fb7ad34b.entry.js.map → p-c88a3d2d.entry.js.map} +0 -0
  218. /package/dist/atomic/{p-b4ad3036.entry.js.map → p-d00a12e9.entry.js.map} +0 -0
  219. /package/dist/atomic/{p-757de797.entry.js.map → p-de066001.entry.js.map} +0 -0
  220. /package/dist/atomic/{p-d2d22ab2.entry.js.map → p-f22bcb8c.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-09-29T14:56:24",
2
+ "timestamp": "2025-09-30T15:49:01",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
@@ -5833,6 +5833,172 @@
5833
5833
  "dependencies": [],
5834
5834
  "dependencyGraph": {}
5835
5835
  },
5836
+ {
5837
+ "filePath": "src/components/search/atomic-pager/atomic-pager.tsx",
5838
+ "encapsulation": "shadow",
5839
+ "tag": "atomic-pager",
5840
+ "docs": "The `atomic-pager` provides buttons that allow the end user to navigate through the different result pages.",
5841
+ "docsTags": [
5842
+ {
5843
+ "name": "part",
5844
+ "text": "buttons - The list of the next/previous buttons and page-buttons."
5845
+ },
5846
+ {
5847
+ "name": "part",
5848
+ "text": "page-buttons - The list of page buttons."
5849
+ },
5850
+ {
5851
+ "name": "part",
5852
+ "text": "page-button - The page button."
5853
+ },
5854
+ {
5855
+ "name": "part",
5856
+ "text": "active-page-button - The active page button."
5857
+ },
5858
+ {
5859
+ "name": "part",
5860
+ "text": "previous-button - The previous button."
5861
+ },
5862
+ {
5863
+ "name": "part",
5864
+ "text": "next-button - The next button."
5865
+ },
5866
+ {
5867
+ "name": "part",
5868
+ "text": "previous-button-icon - Icon of the previous button."
5869
+ },
5870
+ {
5871
+ "name": "part",
5872
+ "text": "next-button-icon - Icon of the next button."
5873
+ }
5874
+ ],
5875
+ "usage": {},
5876
+ "props": [
5877
+ {
5878
+ "name": "nextButtonIcon",
5879
+ "type": "string",
5880
+ "complexType": {
5881
+ "original": "string",
5882
+ "resolved": "string",
5883
+ "references": {}
5884
+ },
5885
+ "mutable": false,
5886
+ "attr": "next-button-icon",
5887
+ "reflectToAttr": true,
5888
+ "docs": "The SVG icon to use to display the Next button.\n\n- Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n- Use a value that starts with `assets://`, to display an icon from the Atomic package.\n- Use a stringified SVG to display it directly.",
5889
+ "docsTags": [],
5890
+ "default": "ArrowRightIcon",
5891
+ "values": [
5892
+ {
5893
+ "type": "string"
5894
+ }
5895
+ ],
5896
+ "optional": false,
5897
+ "required": false
5898
+ },
5899
+ {
5900
+ "name": "numberOfPages",
5901
+ "type": "number",
5902
+ "complexType": {
5903
+ "original": "number",
5904
+ "resolved": "number",
5905
+ "references": {}
5906
+ },
5907
+ "mutable": false,
5908
+ "attr": "number-of-pages",
5909
+ "reflectToAttr": true,
5910
+ "docs": "Specifies how many page buttons to display in the pager.",
5911
+ "docsTags": [],
5912
+ "default": "5",
5913
+ "values": [
5914
+ {
5915
+ "type": "number"
5916
+ }
5917
+ ],
5918
+ "optional": false,
5919
+ "required": false
5920
+ },
5921
+ {
5922
+ "name": "previousButtonIcon",
5923
+ "type": "string",
5924
+ "complexType": {
5925
+ "original": "string",
5926
+ "resolved": "string",
5927
+ "references": {}
5928
+ },
5929
+ "mutable": false,
5930
+ "attr": "previous-button-icon",
5931
+ "reflectToAttr": true,
5932
+ "docs": "The SVG icon to use to display the Previous button.\n\n- Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n- Use a value that starts with `assets://`, to display an icon from the Atomic package.\n- Use a stringified SVG to display it directly.",
5933
+ "docsTags": [],
5934
+ "default": "ArrowLeftIcon",
5935
+ "values": [
5936
+ {
5937
+ "type": "string"
5938
+ }
5939
+ ],
5940
+ "optional": false,
5941
+ "required": false
5942
+ }
5943
+ ],
5944
+ "methods": [],
5945
+ "events": [
5946
+ {
5947
+ "event": "atomic/scrollToTop",
5948
+ "detail": "any",
5949
+ "bubbles": true,
5950
+ "complexType": {
5951
+ "original": "any",
5952
+ "resolved": "any",
5953
+ "references": {}
5954
+ },
5955
+ "cancelable": true,
5956
+ "composed": true,
5957
+ "docs": "",
5958
+ "docsTags": []
5959
+ }
5960
+ ],
5961
+ "listeners": [],
5962
+ "styles": [],
5963
+ "slots": [],
5964
+ "parts": [
5965
+ {
5966
+ "name": "active-page-button",
5967
+ "docs": "The active page button."
5968
+ },
5969
+ {
5970
+ "name": "buttons",
5971
+ "docs": "The list of the next/previous buttons and page-buttons."
5972
+ },
5973
+ {
5974
+ "name": "next-button",
5975
+ "docs": "The next button."
5976
+ },
5977
+ {
5978
+ "name": "next-button-icon",
5979
+ "docs": "Icon of the next button."
5980
+ },
5981
+ {
5982
+ "name": "page-button",
5983
+ "docs": "The page button."
5984
+ },
5985
+ {
5986
+ "name": "page-buttons",
5987
+ "docs": "The list of page buttons."
5988
+ },
5989
+ {
5990
+ "name": "previous-button",
5991
+ "docs": "The previous button."
5992
+ },
5993
+ {
5994
+ "name": "previous-button-icon",
5995
+ "docs": "Icon of the previous button."
5996
+ }
5997
+ ],
5998
+ "dependents": [],
5999
+ "dependencies": [],
6000
+ "dependencyGraph": {}
6001
+ },
5836
6002
  {
5837
6003
  "filePath": "src/components/search/facets/atomic-popover/atomic-popover.tsx",
5838
6004
  "encapsulation": "shadow",
@@ -12314,14 +12480,12 @@
12314
12480
  "dependents": [],
12315
12481
  "dependencies": [
12316
12482
  "atomic-suggestion-renderer",
12317
- "atomic-search-box-recent-queries",
12318
- "atomic-search-box-query-suggestions"
12483
+ "atomic-search-box-recent-queries"
12319
12484
  ],
12320
12485
  "dependencyGraph": {
12321
12486
  "atomic-search-box": [
12322
12487
  "atomic-suggestion-renderer",
12323
- "atomic-search-box-recent-queries",
12324
- "atomic-search-box-query-suggestions"
12488
+ "atomic-search-box-recent-queries"
12325
12489
  ]
12326
12490
  }
12327
12491
  },
@@ -12542,103 +12706,6 @@
12542
12706
  ]
12543
12707
  }
12544
12708
  },
12545
- {
12546
- "filePath": "src/components/search/search-box-suggestions/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.tsx",
12547
- "encapsulation": "shadow",
12548
- "tag": "atomic-search-box-query-suggestions",
12549
- "docs": "The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.",
12550
- "docsTags": [],
12551
- "usage": {},
12552
- "props": [
12553
- {
12554
- "name": "icon",
12555
- "type": "string | undefined",
12556
- "complexType": {
12557
- "original": "string",
12558
- "resolved": "string | undefined",
12559
- "references": {}
12560
- },
12561
- "mutable": false,
12562
- "attr": "icon",
12563
- "reflectToAttr": false,
12564
- "docs": "The SVG icon to display.\n\n- Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n- Use a value that starts with `assets://`, to display an icon from the Atomic package.\n- Use a stringified SVG to display it directly.",
12565
- "docsTags": [],
12566
- "values": [
12567
- {
12568
- "type": "string"
12569
- },
12570
- {
12571
- "type": "undefined"
12572
- }
12573
- ],
12574
- "optional": true,
12575
- "required": false
12576
- },
12577
- {
12578
- "name": "maxWithQuery",
12579
- "type": "number | undefined",
12580
- "complexType": {
12581
- "original": "number",
12582
- "resolved": "number | undefined",
12583
- "references": {}
12584
- },
12585
- "mutable": false,
12586
- "attr": "max-with-query",
12587
- "reflectToAttr": true,
12588
- "docs": "The maximum number of suggestions that will be displayed if the user has typed something into the input field.",
12589
- "docsTags": [],
12590
- "values": [
12591
- {
12592
- "type": "number"
12593
- },
12594
- {
12595
- "type": "undefined"
12596
- }
12597
- ],
12598
- "optional": true,
12599
- "required": false
12600
- },
12601
- {
12602
- "name": "maxWithoutQuery",
12603
- "type": "number | undefined",
12604
- "complexType": {
12605
- "original": "number",
12606
- "resolved": "number | undefined",
12607
- "references": {}
12608
- },
12609
- "mutable": false,
12610
- "attr": "max-without-query",
12611
- "reflectToAttr": true,
12612
- "docs": "The maximum number of suggestions that will be displayed initially when the input field is empty.",
12613
- "docsTags": [],
12614
- "values": [
12615
- {
12616
- "type": "number"
12617
- },
12618
- {
12619
- "type": "undefined"
12620
- }
12621
- ],
12622
- "optional": true,
12623
- "required": false
12624
- }
12625
- ],
12626
- "methods": [],
12627
- "events": [],
12628
- "listeners": [],
12629
- "styles": [],
12630
- "slots": [],
12631
- "parts": [],
12632
- "dependents": [
12633
- "atomic-search-box"
12634
- ],
12635
- "dependencies": [],
12636
- "dependencyGraph": {
12637
- "atomic-search-box": [
12638
- "atomic-search-box-query-suggestions"
12639
- ]
12640
- }
12641
- },
12642
12709
  {
12643
12710
  "filePath": "src/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.tsx",
12644
12711
  "encapsulation": "shadow",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.33.8-pre.4dadface29",
4
+ "version": "3.33.8-pre.4e37aa6985",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@coveo/bueno": "1.1.2",
84
- "@coveo/headless": "3.31.1-pre.4dadface29",
84
+ "@coveo/headless": "3.31.1-pre.4e37aa6985",
85
85
  "@lit/context": "1.1.6",
86
86
  "@open-wc/lit-helpers": "0.7.0",
87
87
  "@popperjs/core": "2.11.8",
@@ -153,7 +153,7 @@
153
153
  },
154
154
  "peerDependencies": {
155
155
  "@coveo/bueno": "1.1.2",
156
- "@coveo/headless": "3.31.1-pre.4dadface29",
156
+ "@coveo/headless": "3.31.1-pre.4e37aa6985",
157
157
  "typescript": ">=5.0.0"
158
158
  },
159
159
  "peerDependenciesMeta": {
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../../types/components";
2
-
3
- interface AtomicSearchBoxQuerySuggestions extends Components.AtomicSearchBoxQuerySuggestions, HTMLElement {}
4
- export const AtomicSearchBoxQuerySuggestions: {
5
- prototype: AtomicSearchBoxQuerySuggestions;
6
- new (): AtomicSearchBoxQuerySuggestions;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,8 +0,0 @@
1
- import { A as AtomicSearchBoxQuerySuggestions$1, d as defineCustomElement$1 } from './atomic-search-box-query-suggestions2.js';
2
-
3
- const AtomicSearchBoxQuerySuggestions = AtomicSearchBoxQuerySuggestions$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { AtomicSearchBoxQuerySuggestions, defineCustomElement };
7
-
8
- //# sourceMappingURL=atomic-search-box-query-suggestions.js.map
@@ -1 +0,0 @@
1
- {"file":"atomic-search-box-query-suggestions.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,89 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { loadQuerySuggestActions } from '@coveo/headless';
3
- import { S as SearchIcon } from './search.js';
4
- import { g as getPartialSearchBoxSuggestionElement, Q as QuerySuggestionContainer, a as QuerySuggestionIcon, b as QuerySuggestionText } from './stencil-query-suggestions.js';
5
- import { d as dispatchSearchBoxSuggestionsEvent } from './suggestions-events.js';
6
-
7
- const AtomicSearchBoxQuerySuggestions = /*@__PURE__*/ proxyCustomElement(class AtomicSearchBoxQuerySuggestions extends HTMLElement {
8
- constructor() {
9
- super();
10
- this.__registerHost();
11
- this.__attachShadow();
12
- this.error = undefined;
13
- this.icon = undefined;
14
- this.maxWithQuery = undefined;
15
- this.maxWithoutQuery = undefined;
16
- }
17
- componentWillLoad() {
18
- try {
19
- dispatchSearchBoxSuggestionsEvent((bindings) => {
20
- this.bindings = bindings;
21
- return this.initialize();
22
- }, this.host, ['atomic-search-box']);
23
- }
24
- catch (error) {
25
- this.error = error;
26
- }
27
- }
28
- initialize() {
29
- const engine = this.bindings.engine;
30
- const { registerQuerySuggest, fetchQuerySuggestions } = loadQuerySuggestActions(engine);
31
- engine.dispatch(registerQuerySuggest({
32
- id: this.bindings.id,
33
- count: this.bindings.numberOfQueries,
34
- }));
35
- return {
36
- position: Array.from(this.host.parentNode.children).indexOf(this.host),
37
- onInput: () => engine.dispatch(fetchQuerySuggestions({
38
- id: this.bindings.id,
39
- })),
40
- renderItems: () => this.renderItems(),
41
- };
42
- }
43
- renderItems() {
44
- const hasQuery = this.bindings.searchBoxController.state.value !== '';
45
- const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;
46
- return this.bindings.searchBoxController.state.suggestions
47
- .slice(0, max)
48
- .map((suggestion) => this.renderItem(suggestion));
49
- }
50
- renderItem(suggestion) {
51
- const hasQuery = this.bindings.searchBoxController.state.value !== '';
52
- const partialItem = getPartialSearchBoxSuggestionElement(suggestion, this.bindings.i18n);
53
- return {
54
- ...partialItem,
55
- content: (h(QuerySuggestionContainer, null, h(QuerySuggestionIcon, { icon: this.icon || SearchIcon, hasSuggestion: this.bindings.getSuggestions().length > 1 }), h(QuerySuggestionText, { suggestion: suggestion, hasQuery: hasQuery }))),
56
- onSelect: () => {
57
- this.bindings.searchBoxController.selectSuggestion(suggestion.rawValue);
58
- },
59
- };
60
- }
61
- render() {
62
- if (this.error) {
63
- return (h("atomic-component-error", { key: 'ee518dd01ee68d5ac1e13c37335888acf7089beb', element: this.host, error: this.error }));
64
- }
65
- }
66
- get host() { return this; }
67
- }, [1, "atomic-search-box-query-suggestions", {
68
- "icon": [1],
69
- "maxWithQuery": [514, "max-with-query"],
70
- "maxWithoutQuery": [514, "max-without-query"],
71
- "error": [32]
72
- }]);
73
- function defineCustomElement() {
74
- if (typeof customElements === "undefined") {
75
- return;
76
- }
77
- const components = ["atomic-search-box-query-suggestions"];
78
- components.forEach(tagName => { switch (tagName) {
79
- case "atomic-search-box-query-suggestions":
80
- if (!customElements.get(tagName)) {
81
- customElements.define(tagName, AtomicSearchBoxQuerySuggestions);
82
- }
83
- break;
84
- } });
85
- }
86
-
87
- export { AtomicSearchBoxQuerySuggestions as A, defineCustomElement as d };
88
-
89
- //# sourceMappingURL=atomic-search-box-query-suggestions2.js.map
@@ -1 +0,0 @@
1
- {"file":"atomic-search-box-query-suggestions2.js","mappings":";;;;;;MA8Ba,+BAA+B;;;;;;;;;;IAwB1C,iBAAiB;QACf,IAAI;YACF,iCAAiC,CAC/B,CAAC,QAAQ;gBACP,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBACzB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;aAC1B,EACD,IAAI,CAAC,IAAI,EACT,CAAC,mBAAmB,CAAC,CACtB,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,KAAK,GAAG,KAAc,CAAC;SAC7B;KACF;IAEO,UAAU;QAChB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAG3B,CAAC;QACH,MAAM,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,GACjD,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAElC,MAAM,CAAC,QAAQ,CACb,oBAAoB,CAAC;YACnB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE;YACpB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,eAAe;SACrC,CAAC,CACH,CAAC;QAEF,OAAO;YACL,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YACvE,OAAO,EAAE,MACP,MAAM,CAAC,QAAQ,CACb,qBAAqB,CAAC;gBACpB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE;aACrB,CAAC,CACH;YACH,WAAW,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE;SACtC,CAAC;KACH;IAEO,WAAW;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;QACtE,MAAM,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC;QAChE,OAAO,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,WAAW;aACvD,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;aACb,GAAG,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;KACrD;IAEO,UAAU,CAAC,UAAsB;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;QACtE,MAAM,WAAW,GAAG,oCAAoC,CACtD,UAAU,EACV,IAAI,CAAC,QAAQ,CAAC,IAAI,CACnB,CAAC;QAEF,OAAO;YACL,GAAG,WAAW;YACd,OAAO,GACL,EAAC,wBAAwB,QACvB,EAAC,mBAAmB,IAClB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,UAAU,EAC7B,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,MAAM,GAAG,CAAC,GACxD,EAEF,EAAC,mBAAmB,IAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAC1C,CAC5B;YACD,QAAQ,EAAE;gBACR,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;aACzE;SACF,CAAC;KACH;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,QACE,+EACE,OAAO,EAAE,IAAI,CAAC,IAAI,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACO,EAC1B;SACH;KACF;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/search/search-box-suggestions/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.tsx"],"sourcesContent":["import {\n loadQuerySuggestActions,\n SearchBox,\n SearchEngine,\n Suggestion,\n} from '@coveo/headless';\nimport {Component, Element, Prop, State, h} from '@stencil/core';\nimport SearchIcon from '../../../../images/search.svg';\nimport {\n getPartialSearchBoxSuggestionElement,\n QuerySuggestionContainer,\n QuerySuggestionIcon,\n QuerySuggestionText,\n} from '../../../common/suggestions/stencil-query-suggestions';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n} from '../../../common/suggestions/suggestions-events';\nimport type {\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-types';\n\n/**\n * The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.\n */\n@Component({\n tag: 'atomic-search-box-query-suggestions',\n shadow: true,\n})\nexport class AtomicSearchBoxQuerySuggestions {\n private bindings!: SearchBoxSuggestionsBindings<SearchBox>;\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The SVG icon to display.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly.\n */\n @Prop() public icon?: string;\n\n /**\n * The maximum number of suggestions that will be displayed if the user has typed something into the input field.\n */\n @Prop({reflect: true}) public maxWithQuery?: number;\n /**\n * The maximum number of suggestions that will be displayed initially when the input field is empty.\n */\n @Prop({reflect: true}) public maxWithoutQuery?: number;\n\n componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private initialize(): SearchBoxSuggestions {\n const engine = this.bindings.engine as SearchEngine<{\n querySet: string;\n querySuggest: string;\n }>;\n const {registerQuerySuggest, fetchQuerySuggestions} =\n loadQuerySuggestActions(engine);\n\n engine.dispatch(\n registerQuerySuggest({\n id: this.bindings.id,\n count: this.bindings.numberOfQueries,\n })\n );\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n onInput: () =>\n engine.dispatch(\n fetchQuerySuggestions({\n id: this.bindings.id,\n })\n ),\n renderItems: () => this.renderItems(),\n };\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;\n return this.bindings.searchBoxController.state.suggestions\n .slice(0, max)\n .map((suggestion) => this.renderItem(suggestion));\n }\n\n private renderItem(suggestion: Suggestion) {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const partialItem = getPartialSearchBoxSuggestionElement(\n suggestion,\n this.bindings.i18n\n );\n\n return {\n ...partialItem,\n content: (\n <QuerySuggestionContainer>\n <QuerySuggestionIcon\n icon={this.icon || SearchIcon}\n hasSuggestion={this.bindings.getSuggestions().length > 1}\n />\n\n <QuerySuggestionText suggestion={suggestion} hasQuery={hasQuery} />\n </QuerySuggestionContainer>\n ),\n onSelect: () => {\n this.bindings.searchBoxController.selectSuggestion(suggestion.rawValue);\n },\n };\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n"],"version":3}
@@ -1,178 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { NumberValue, Schema } from '@coveo/bueno';
8
- import { buildPager, buildSearchStatus, } from '@coveo/headless';
9
- import { html, LitElement } from 'lit';
10
- import { customElement, property, state } from 'lit/decorators.js';
11
- import { keyed } from 'lit/directives/keyed.js';
12
- import { when } from 'lit/directives/when.js';
13
- import { createAppLoadedListener } from "../../common/interface/store";
14
- import { renderPagerNavigation } from "../../common/pager/pager-navigation";
15
- import { bindStateToController } from "../../../decorators/bind-state";
16
- import { bindingGuard } from "../../../decorators/binding-guard";
17
- import { bindings } from "../../../decorators/bindings";
18
- import { errorGuard } from "../../../decorators/error-guard";
19
- import { withTailwindStyles } from "../../../decorators/with-tailwind-styles";
20
- import { InitializeBindingsMixin } from "../../../mixins/bindings-mixin";
21
- import { randomID } from "../../../utils/utils";
22
- const ArrowLeftIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m11.5 4.8-4.3 4.5c-.3.4-.3.9 0 1.3l4.3 4.6c.3.4.9.4 1.2 0s.3-.9 0-1.3l-3.7-4 3.7-3.9c.3-.4.3-.9 0-1.3-.3-.3-.9-.3-1.2.1z\"/></svg>";
23
- const ArrowRightIcon = "<svg viewBox=\"0 0 20 20\"><path d=\"m8.5 15.2 4.3-4.6c.3-.4.3-.9 0-1.3l-4.4-4.5c-.3-.4-.9-.4-1.2 0s-.3.9 0 1.3l3.7 4-3.7 3.9c-.3.4-.3.9 0 1.3.4.3 1 .3 1.3-.1z\"/></svg>";
24
- import { renderPageButtons, renderPagerNextButton, renderPagerPageButton, renderPagerPreviousButton, } from '../../common/pager/pager-buttons';
25
- /**
26
- * The `atomic-pager` provides buttons that allow the end user to navigate through the different result pages.
27
- *
28
- * @part buttons - The list of the next/previous buttons and page-buttons.
29
- * @part page-buttons - The list of page buttons.
30
- * @part page-button - The individual page buttons.
31
- * @part active-page-button - The active page button.
32
- * @part previous-button - The previous page button.
33
- * @part next-button - The next page button.
34
- * @part previous-button-icon - The icon displayed on the "previous page" button.
35
- * @part next-button-icon - The icon displayed on the "next page" button.
36
- *
37
- * @event atomic/scrollToTop - Emitted when the user clicks any of the buttons rendered by the component.
38
- */
39
- let AtomicPager = class AtomicPager extends InitializeBindingsMixin(LitElement) {
40
- constructor() {
41
- super(...arguments);
42
- this.isAppLoaded = false;
43
- /**
44
- * The maximum number of page buttons to display in the pager.
45
- */
46
- this.numberOfPages = 5;
47
- /**
48
- * The SVG icon to render on the "previous page" button.
49
- *
50
- * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.
51
- * - Use a value that starts with `assets://`, to display an icon from the Atomic package.
52
- * - Use a stringified SVG to display it directly.
53
- */
54
- this.previousButtonIcon = ArrowLeftIcon;
55
- /**
56
- * The SVG icon to render on the "next page" button.
57
- *
58
- * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.
59
- * - Use a value that starts with `assets://`, to display an icon from the Atomic package.
60
- * - Use a stringified SVG to display it directly.
61
- */
62
- this.nextButtonIcon = ArrowRightIcon;
63
- this.radioGroupName = randomID('atomic-pager-');
64
- }
65
- initialize() {
66
- this.validateProps();
67
- this.searchStatus = buildSearchStatus(this.bindings.engine);
68
- this.pager = buildPager(this.bindings.engine, {
69
- options: { numberOfPages: this.numberOfPages },
70
- });
71
- createAppLoadedListener(this.bindings.store, (isAppLoaded) => {
72
- this.isAppLoaded = isAppLoaded;
73
- });
74
- }
75
- render() {
76
- if (!this.pagerState?.currentPages) {
77
- return html ``;
78
- }
79
- const currentGroupName = `${this.radioGroupName}-${this.pagerState.currentPages.join('-')}`;
80
- return html `${when(!this.searchStatusState.hasError &&
81
- this.searchStatusState.hasResults &&
82
- this.isAppLoaded, () => html `
83
- ${renderPagerNavigation({
84
- props: {
85
- i18n: this.bindings.i18n,
86
- },
87
- })(html `
88
- ${renderPagerPreviousButton({
89
- props: {
90
- icon: this.previousButtonIcon,
91
- disabled: !this.pagerState.hasPreviousPage,
92
- i18n: this.bindings.i18n,
93
- onClick: () => {
94
- this.pager.previousPage();
95
- this.focusOnFirstResultAndScrollToTop();
96
- },
97
- },
98
- })}
99
- ${renderPageButtons({
100
- props: {
101
- i18n: this.bindings.i18n,
102
- },
103
- })(html `${this.pagerState.currentPages.map((pageNumber, index) => keyed(`page-${pageNumber}-${index}`, renderPagerPageButton({
104
- props: {
105
- isSelected: this.pager.isCurrentPage(pageNumber),
106
- ariaLabel: this.bindings.i18n.t('page-number', {
107
- pageNumber,
108
- }),
109
- onChecked: () => {
110
- this.pager.selectPage(pageNumber);
111
- this.focusOnFirstResultAndScrollToTop();
112
- },
113
- page: pageNumber,
114
- groupName: currentGroupName,
115
- text: pageNumber.toLocaleString(this.bindings.i18n.language),
116
- },
117
- })))}`)}
118
- ${renderPagerNextButton({
119
- props: {
120
- icon: this.nextButtonIcon,
121
- disabled: !this.pagerState.hasNextPage,
122
- i18n: this.bindings.i18n,
123
- onClick: () => {
124
- this.pager.nextPage();
125
- this.focusOnFirstResultAndScrollToTop();
126
- },
127
- },
128
- })}
129
- `)}`)}`;
130
- }
131
- validateProps() {
132
- new Schema({
133
- numberOfPages: new NumberValue({ min: 0 }),
134
- }).validate({
135
- numberOfPages: this.numberOfPages,
136
- });
137
- }
138
- async focusOnFirstResultAndScrollToTop() {
139
- await this.bindings.store.state.resultList?.focusOnFirstResultAfterNextSearch();
140
- this.dispatchEvent(new CustomEvent('atomic/scrollToTop'));
141
- }
142
- };
143
- __decorate([
144
- state()
145
- ], AtomicPager.prototype, "bindings", void 0);
146
- __decorate([
147
- state()
148
- ], AtomicPager.prototype, "error", void 0);
149
- __decorate([
150
- state()
151
- ], AtomicPager.prototype, "isAppLoaded", void 0);
152
- __decorate([
153
- bindStateToController('pager'),
154
- state()
155
- ], AtomicPager.prototype, "pagerState", void 0);
156
- __decorate([
157
- bindStateToController('searchStatus'),
158
- state()
159
- ], AtomicPager.prototype, "searchStatusState", void 0);
160
- __decorate([
161
- property({ reflect: true, attribute: 'number-of-pages', type: Number })
162
- ], AtomicPager.prototype, "numberOfPages", void 0);
163
- __decorate([
164
- property({ reflect: true, attribute: 'previous-button-icon', type: String })
165
- ], AtomicPager.prototype, "previousButtonIcon", void 0);
166
- __decorate([
167
- property({ reflect: true, attribute: 'next-button-icon', type: String })
168
- ], AtomicPager.prototype, "nextButtonIcon", void 0);
169
- __decorate([
170
- bindingGuard(),
171
- errorGuard()
172
- ], AtomicPager.prototype, "render", null);
173
- AtomicPager = __decorate([
174
- customElement('atomic-pager'),
175
- bindings(),
176
- withTailwindStyles
177
- ], AtomicPager);
178
- export { AtomicPager };
@@ -1,33 +0,0 @@
1
- import { h } from '@stencil/core/internal/client';
2
- import { e as encodeForDomAttribute } from './string-utils.js';
3
-
4
- const getPartialSearchBoxSuggestionElement = (suggestion, i18n) => {
5
- return {
6
- part: 'query-suggestion-item',
7
- key: `qs-${encodeForDomAttribute(suggestion.rawValue)}`,
8
- query: suggestion.rawValue,
9
- ariaLabel: i18n.t('query-suggestion-label', {
10
- query: suggestion.rawValue,
11
- interpolation: { escapeValue: false },
12
- }),
13
- };
14
- };
15
- const QuerySuggestionContainer = (_, children) => {
16
- return (h("div", { part: "query-suggestion-content", class: "flex items-center" }, children));
17
- };
18
- const QuerySuggestionIcon = ({ icon, hasSuggestion }) => {
19
- if (!hasSuggestion) {
20
- return;
21
- }
22
- return (h("atomic-icon", { part: "query-suggestion-icon", icon: icon, class: "mr-2 h-4 w-4 shrink-0" }));
23
- };
24
- const QuerySuggestionText = ({ suggestion, hasQuery }) => {
25
- if (hasQuery) {
26
- return (h("span", { part: "query-suggestion-text", class: "line-clamp-2 break-all", innerHTML: suggestion.highlightedValue }));
27
- }
28
- return (h("span", { part: "query-suggestion-text", class: "line-clamp-2 break-all" }, suggestion.rawValue));
29
- };
30
-
31
- export { QuerySuggestionContainer as Q, QuerySuggestionIcon as a, QuerySuggestionText as b, getPartialSearchBoxSuggestionElement as g };
32
-
33
- //# sourceMappingURL=stencil-query-suggestions.js.map