@coveo/atomic 3.34.0-pre.3832d9ea2f → 3.34.0-pre.3fcc0e3b8f

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 (214) 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 +0 -4
  4. package/dist/atomic/components/_index.js +0 -2
  5. package/dist/atomic/components/analytics-config.js +1 -1
  6. package/dist/atomic/components/atomic-category-facet.js +17 -7
  7. package/dist/atomic/components/atomic-category-facet.js.map +1 -1
  8. package/dist/atomic/components/atomic-facet.js +1 -1
  9. package/dist/atomic/components/atomic-format-currency.js +1 -1
  10. package/dist/atomic/components/atomic-format-number.js +1 -1
  11. package/dist/atomic/components/atomic-format-unit.js +1 -1
  12. package/dist/atomic/components/atomic-insight-pager.js +38 -2
  13. package/dist/atomic/components/atomic-insight-pager.js.map +1 -1
  14. package/dist/atomic/components/atomic-numeric-facet.js +1 -1
  15. package/dist/atomic/components/atomic-query-error.js +1 -1
  16. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  17. package/dist/atomic/components/atomic-quickview.js +1 -1
  18. package/dist/atomic/components/atomic-refine-modal2.js +1 -1
  19. package/dist/atomic/components/atomic-refine-toggle.js +1 -1
  20. package/dist/atomic/components/atomic-result-children.js +1 -1
  21. package/dist/atomic/components/atomic-result-fields-list.js +1 -1
  22. package/dist/atomic/components/atomic-result-link.js +1 -1
  23. package/dist/atomic/components/atomic-result-list.js +1 -1
  24. package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
  25. package/dist/atomic/components/atomic-search-box-query-suggestions2.js +1 -1
  26. package/dist/atomic/components/atomic-search-box-recent-queries2.js +1 -1
  27. package/dist/atomic/components/atomic-search-box.js +3 -3
  28. package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
  29. package/dist/atomic/components/atomic-sort-dropdown.js +2 -2
  30. package/dist/atomic/components/atomic-sort-expression.js +1 -1
  31. package/dist/atomic/components/atomic-tab-manager.js +1 -1
  32. package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +17 -32
  33. package/dist/atomic/components/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +3 -0
  34. package/dist/atomic/components/components/commerce/atomic-commerce-pager/atomic-commerce-pager.js +25 -11
  35. package/dist/atomic/components/components/common/facets/category-facet/all-categories-button.js +3 -2
  36. package/dist/atomic/components/components/common/facets/category-facet/all-categories-localized-label.js +9 -0
  37. package/dist/atomic/components/components/common/facets/category-facet/search-value.js +6 -1
  38. package/dist/atomic/components/components/common/validate-props-controller/validate-props-controller.js +50 -0
  39. package/dist/atomic/components/components/search/atomic-pager/atomic-pager.js +188 -0
  40. package/dist/atomic/components/components/search/atomic-relevance-inspector/atomic-relevance-inspector.js +100 -0
  41. package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +17 -24
  42. package/dist/atomic/components/components/search/index.js +2 -0
  43. package/dist/atomic/components/components/search/lazy-index.js +2 -0
  44. package/dist/atomic/components/global/environment.js +1 -1
  45. package/dist/atomic/components/index.js.map +1 -1
  46. package/dist/atomic/components/utils/compare-utils.js +49 -0
  47. package/dist/atomic/{p-44ef70b6.entry.js → p-01511388.entry.js} +2 -2
  48. package/dist/atomic/{p-8acb1466.entry.js → p-0ed76e65.entry.js} +2 -2
  49. package/dist/atomic/{p-8103bad3.entry.js → p-2fb49fe8.entry.js} +2 -2
  50. package/dist/atomic/{p-74822069.entry.js → p-3549a469.entry.js} +2 -2
  51. package/dist/atomic/{p-6abd5b2b.entry.js → p-3e9db2b5.entry.js} +2 -2
  52. package/dist/atomic/{p-3b98377b.js → p-46048998.js} +2 -2
  53. package/dist/atomic/{p-4ae14373.entry.js → p-4e2f8a73.entry.js} +2 -2
  54. package/dist/atomic/p-4e2f8a73.entry.js.map +1 -0
  55. package/dist/atomic/{p-37a28729.entry.js → p-4f4c9a03.entry.js} +2 -2
  56. package/dist/atomic/{p-0402ee69.entry.js → p-59f043a0.entry.js} +2 -2
  57. package/dist/atomic/{p-679739d9.entry.js → p-59f36999.entry.js} +2 -2
  58. package/dist/atomic/{p-aa616502.entry.js → p-65dd9017.entry.js} +2 -2
  59. package/dist/atomic/{p-b7cd0342.entry.js → p-736f4d7e.entry.js} +2 -2
  60. package/dist/atomic/{p-f073a78d.entry.js → p-7e971d15.entry.js} +2 -2
  61. package/dist/atomic/{p-dfc385b7.entry.js → p-83d3857f.entry.js} +2 -2
  62. package/dist/atomic/{p-df1d50c8.entry.js → p-87f69e53.entry.js} +2 -2
  63. package/dist/atomic/{p-4b9a166f.entry.js → p-8bf425b0.entry.js} +2 -2
  64. package/dist/atomic/{p-d2d22ab2.entry.js → p-b2b9e83f.entry.js} +2 -2
  65. package/dist/atomic/{p-62afcf79.entry.js → p-b313058c.entry.js} +2 -2
  66. package/dist/atomic/{p-20019654.entry.js → p-bbfe727a.entry.js} +2 -2
  67. package/dist/atomic/{p-45c76d98.entry.js → p-bd3542d2.entry.js} +2 -2
  68. package/dist/atomic/{p-30411cd4.entry.js → p-be2a43f4.entry.js} +2 -2
  69. package/dist/atomic/{p-5e569db1.entry.js → p-cb348b2b.entry.js} +2 -2
  70. package/dist/atomic/{p-b4ad3036.entry.js → p-d211a422.entry.js} +2 -2
  71. package/dist/atomic/{p-e3edbf14.entry.js → p-d82b85ab.entry.js} +2 -2
  72. package/dist/atomic/{p-516b8165.entry.js → p-ea1b81fa.entry.js} +2 -2
  73. package/dist/atomic/p-fdcd187d.entry.js +2 -0
  74. package/dist/atomic/p-fdcd187d.entry.js.map +1 -0
  75. package/dist/cjs/_loader.cjs.js +1 -1
  76. package/dist/cjs/{analytics-config-c1c73100.js → analytics-config-68d5b9a3.js} +2 -2
  77. package/dist/cjs/{analytics-config-c1c73100.js.map → analytics-config-68d5b9a3.js.map} +1 -1
  78. package/dist/cjs/atomic-category-facet.cjs.entry.js +17 -7
  79. package/dist/cjs/atomic-category-facet.cjs.entry.js.map +1 -1
  80. package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
  81. package/dist/cjs/atomic-format-currency.cjs.entry.js +1 -1
  82. package/dist/cjs/atomic-format-number.cjs.entry.js +1 -1
  83. package/dist/cjs/atomic-format-unit.cjs.entry.js +1 -1
  84. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  85. package/dist/cjs/atomic-insight-pager.cjs.entry.js +41 -7
  86. package/dist/cjs/atomic-insight-pager.cjs.entry.js.map +1 -1
  87. package/dist/cjs/atomic-numeric-facet.cjs.entry.js +1 -1
  88. package/dist/cjs/atomic-query-error.cjs.entry.js +1 -1
  89. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
  91. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  92. package/dist/cjs/atomic-refine-modal.cjs.entry.js +1 -1
  93. package/dist/cjs/atomic-refine-toggle.cjs.entry.js +1 -1
  94. package/dist/cjs/atomic-result-children.cjs.entry.js +1 -1
  95. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
  96. package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
  97. package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
  98. package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +1 -1
  99. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +2 -2
  100. package/dist/cjs/atomic-search-box.cjs.entry.js +3 -3
  101. package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
  102. package/dist/cjs/atomic-sort-dropdown.cjs.entry.js +2 -2
  103. package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
  104. package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
  105. package/dist/cjs/atomic.cjs.js +1 -1
  106. package/dist/cjs/index-757bc886.js +0 -8
  107. package/dist/cjs/version.cjs.js +1 -1
  108. package/dist/esm/_loader.js +1 -1
  109. package/dist/esm/{analytics-config-91e5bdcd.js → analytics-config-f19edb6a.js} +2 -2
  110. package/dist/esm/{analytics-config-91e5bdcd.js.map → analytics-config-f19edb6a.js.map} +1 -1
  111. package/dist/esm/atomic-category-facet.entry.js +17 -7
  112. package/dist/esm/atomic-category-facet.entry.js.map +1 -1
  113. package/dist/esm/atomic-facet.entry.js +1 -1
  114. package/dist/esm/atomic-format-currency.entry.js +1 -1
  115. package/dist/esm/atomic-format-number.entry.js +1 -1
  116. package/dist/esm/atomic-format-unit.entry.js +1 -1
  117. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  118. package/dist/esm/atomic-insight-pager.entry.js +38 -4
  119. package/dist/esm/atomic-insight-pager.entry.js.map +1 -1
  120. package/dist/esm/atomic-numeric-facet.entry.js +1 -1
  121. package/dist/esm/atomic-query-error.entry.js +1 -1
  122. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  123. package/dist/esm/atomic-quickview.entry.js +1 -1
  124. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  125. package/dist/esm/atomic-refine-modal.entry.js +1 -1
  126. package/dist/esm/atomic-refine-toggle.entry.js +1 -1
  127. package/dist/esm/atomic-result-children.entry.js +1 -1
  128. package/dist/esm/atomic-result-fields-list.entry.js +1 -1
  129. package/dist/esm/atomic-result-link.entry.js +1 -1
  130. package/dist/esm/atomic-result-list.entry.js +1 -1
  131. package/dist/esm/atomic-result-placeholder_8.entry.js +1 -1
  132. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +2 -2
  133. package/dist/esm/atomic-search-box.entry.js +3 -3
  134. package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
  135. package/dist/esm/atomic-sort-dropdown.entry.js +2 -2
  136. package/dist/esm/atomic-sort-expression.entry.js +1 -1
  137. package/dist/esm/atomic-tab-manager.entry.js +1 -1
  138. package/dist/esm/atomic.js +1 -1
  139. package/dist/esm/index-3f35faca.js +0 -8
  140. package/dist/esm/version.js +1 -1
  141. package/dist/types/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.d.ts +2 -3
  142. package/dist/types/components/commerce/atomic-commerce-pager/atomic-commerce-pager.d.ts +5 -3
  143. package/dist/types/components/common/facets/category-facet/all-categories-button.d.ts +2 -0
  144. package/dist/types/components/common/facets/category-facet/all-categories-localized-label.d.ts +6 -0
  145. package/dist/types/components/common/facets/category-facet/search-value.d.ts +1 -0
  146. package/dist/types/components/common/facets/category-facet/stencil-all-categories-button.d.ts +2 -0
  147. package/dist/types/components/common/facets/category-facet/stencil-search-value.d.ts +1 -0
  148. package/dist/types/components/common/facets/facet-search/facet-search-input-guard.d.ts +1 -1
  149. package/dist/types/components/common/no-items/guard.d.ts +1 -1
  150. package/dist/types/components/common/refine-modal/guard.d.ts +1 -1
  151. package/dist/types/components/common/sort/sort-guard.d.ts +1 -1
  152. package/dist/types/components/common/validate-props-controller/validate-props-controller.d.ts +32 -0
  153. package/dist/types/components/search/atomic-pager/atomic-pager.d.ts +28 -16
  154. package/dist/types/components/search/atomic-relevance-inspector/atomic-relevance-inspector.d.ts +18 -8
  155. package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +6 -3
  156. package/dist/types/components/search/index.d.ts +2 -0
  157. package/dist/types/components.d.ts +0 -118
  158. package/dist/types/directives/hierarchical-path.d.ts +1 -1
  159. package/dist/types/utils/compare-utils.d.ts +9 -0
  160. package/docs/atomic-docs.json +1 -254
  161. package/package.json +1 -1
  162. package/dist/atomic/components/atomic-pager.d.ts +0 -11
  163. package/dist/atomic/components/atomic-pager.js +0 -134
  164. package/dist/atomic/components/atomic-pager.js.map +0 -1
  165. package/dist/atomic/components/atomic-relevance-inspector.d.ts +0 -11
  166. package/dist/atomic/components/atomic-relevance-inspector.js +0 -53
  167. package/dist/atomic/components/atomic-relevance-inspector.js.map +0 -1
  168. package/dist/atomic/components/stencil-pager-navigation.js +0 -42
  169. package/dist/atomic/components/stencil-pager-navigation.js.map +0 -1
  170. package/dist/atomic/p-1201bf3d.entry.js +0 -2
  171. package/dist/atomic/p-1201bf3d.entry.js.map +0 -1
  172. package/dist/atomic/p-145e3a1c.entry.js +0 -2
  173. package/dist/atomic/p-145e3a1c.entry.js.map +0 -1
  174. package/dist/atomic/p-211d7d6a.js +0 -2
  175. package/dist/atomic/p-211d7d6a.js.map +0 -1
  176. package/dist/atomic/p-4ae14373.entry.js.map +0 -1
  177. package/dist/atomic/p-d8028950.entry.js +0 -2
  178. package/dist/atomic/p-d8028950.entry.js.map +0 -1
  179. package/dist/cjs/atomic-pager.cjs.entry.js +0 -121
  180. package/dist/cjs/atomic-pager.cjs.entry.js.map +0 -1
  181. package/dist/cjs/atomic-relevance-inspector.cjs.entry.js +0 -38
  182. package/dist/cjs/atomic-relevance-inspector.cjs.entry.js.map +0 -1
  183. package/dist/cjs/stencil-pager-navigation-c20b8a95.js +0 -48
  184. package/dist/cjs/stencil-pager-navigation-c20b8a95.js.map +0 -1
  185. package/dist/esm/atomic-pager.entry.js +0 -117
  186. package/dist/esm/atomic-pager.entry.js.map +0 -1
  187. package/dist/esm/atomic-relevance-inspector.entry.js +0 -34
  188. package/dist/esm/atomic-relevance-inspector.entry.js.map +0 -1
  189. package/dist/esm/stencil-pager-navigation-7261a834.js +0 -42
  190. package/dist/esm/stencil-pager-navigation-7261a834.js.map +0 -1
  191. /package/dist/atomic/{p-44ef70b6.entry.js.map → p-01511388.entry.js.map} +0 -0
  192. /package/dist/atomic/{p-8acb1466.entry.js.map → p-0ed76e65.entry.js.map} +0 -0
  193. /package/dist/atomic/{p-8103bad3.entry.js.map → p-2fb49fe8.entry.js.map} +0 -0
  194. /package/dist/atomic/{p-74822069.entry.js.map → p-3549a469.entry.js.map} +0 -0
  195. /package/dist/atomic/{p-6abd5b2b.entry.js.map → p-3e9db2b5.entry.js.map} +0 -0
  196. /package/dist/atomic/{p-3b98377b.js.map → p-46048998.js.map} +0 -0
  197. /package/dist/atomic/{p-37a28729.entry.js.map → p-4f4c9a03.entry.js.map} +0 -0
  198. /package/dist/atomic/{p-0402ee69.entry.js.map → p-59f043a0.entry.js.map} +0 -0
  199. /package/dist/atomic/{p-679739d9.entry.js.map → p-59f36999.entry.js.map} +0 -0
  200. /package/dist/atomic/{p-aa616502.entry.js.map → p-65dd9017.entry.js.map} +0 -0
  201. /package/dist/atomic/{p-b7cd0342.entry.js.map → p-736f4d7e.entry.js.map} +0 -0
  202. /package/dist/atomic/{p-f073a78d.entry.js.map → p-7e971d15.entry.js.map} +0 -0
  203. /package/dist/atomic/{p-dfc385b7.entry.js.map → p-83d3857f.entry.js.map} +0 -0
  204. /package/dist/atomic/{p-df1d50c8.entry.js.map → p-87f69e53.entry.js.map} +0 -0
  205. /package/dist/atomic/{p-4b9a166f.entry.js.map → p-8bf425b0.entry.js.map} +0 -0
  206. /package/dist/atomic/{p-d2d22ab2.entry.js.map → p-b2b9e83f.entry.js.map} +0 -0
  207. /package/dist/atomic/{p-62afcf79.entry.js.map → p-b313058c.entry.js.map} +0 -0
  208. /package/dist/atomic/{p-20019654.entry.js.map → p-bbfe727a.entry.js.map} +0 -0
  209. /package/dist/atomic/{p-45c76d98.entry.js.map → p-bd3542d2.entry.js.map} +0 -0
  210. /package/dist/atomic/{p-30411cd4.entry.js.map → p-be2a43f4.entry.js.map} +0 -0
  211. /package/dist/atomic/{p-5e569db1.entry.js.map → p-cb348b2b.entry.js.map} +0 -0
  212. /package/dist/atomic/{p-b4ad3036.entry.js.map → p-d211a422.entry.js.map} +0 -0
  213. /package/dist/atomic/{p-e3edbf14.entry.js.map → p-d82b85ab.entry.js.map} +0 -0
  214. /package/dist/atomic/{p-516b8165.entry.js.map → p-ea1b81fa.entry.js.map} +0 -0
@@ -582,7 +582,7 @@ const AtomicQuickviewModal = /*@__PURE__*/ proxyCustomElement(class AtomicQuickv
582
582
  });
583
583
  }
584
584
  render() {
585
- return (h("atomic-modal", { key: '9b31f319fb04a44adb84434f2e09bc211b7cf03a', fullscreen: this.bindings.store.isMobile(), class: 'atomic-quickview-modal', isOpen: this.isOpen, close: () => this.onClose(), exportparts: ATOMIC_MODAL_EXPORT_PARTS }, this.renderHeader(), this.renderBody(), this.renderFooter()));
585
+ return (h("atomic-modal", { key: '8ff1438b0d7ff43933a1fc0800891a7cb7065043', fullscreen: this.bindings.store.isMobile(), class: 'atomic-quickview-modal', isOpen: this.isOpen, close: () => this.onClose(), exportparts: ATOMIC_MODAL_EXPORT_PARTS }, this.renderHeader(), this.renderBody(), this.renderFooter()));
586
586
  }
587
587
  static get watchers() { return {
588
588
  "highlightKeywords": ["watchHighlightKeywords"]
@@ -106,7 +106,7 @@ const AtomicQuickview$1 = /*@__PURE__*/ proxyCustomElement(class AtomicQuickview
106
106
  }
107
107
  render() {
108
108
  if (this.quickviewState.resultHasPreview) {
109
- return (h(Button, { key: '923515932e09ccd18ec5060671a55800e5e6e83a', part: "button", title: this.bindings.i18n.t('quickview'), style: "outline-primary", class: "p-2", onClick: (event) => this.onClick(event), ref: this.focusTarget.setTarget }, h("atomic-icon", { key: '375e24610aae279d97f4efa17c6084cea5957008', part: "icon", class: "flex w-5 justify-center", icon: QuickviewIcon })));
109
+ return (h(Button, { key: 'ec6c644d9d557133df40428ccacddcb3d035c9fd', part: "button", title: this.bindings.i18n.t('quickview'), style: "outline-primary", class: "p-2", onClick: (event) => this.onClick(event), ref: this.focusTarget.setTarget }, h("atomic-icon", { key: 'fa4444026db63add82d7906e9fc0636c3a94e0d8', part: "icon", class: "flex w-5 justify-center", icon: QuickviewIcon })));
110
110
  }
111
111
  }
112
112
  static get style() { return AtomicQuickviewStyle0; }
@@ -204,7 +204,7 @@ const AtomicRefineModal = /*@__PURE__*/ proxyCustomElement(class AtomicRefineMod
204
204
  return (h(RefineModalFiltersSection, { i18n: i18n, withFacets: hasFacetElements, withAutomaticFacets: hasAutomaticFacets }, this.breadcrumbManagerState.hasBreadcrumbs && (h(RefineModalFiltersClearButton, { i18n: i18n, onClick: () => this.breadcrumbManager.deselectAll() }))));
205
205
  }
206
206
  render() {
207
- return (h(RefineModal, { key: '18a5154611c5a3d000f248fe1cd943f053b4f62a', i18n: this.bindings.i18n, host: this.host, isOpen: this.isOpen, onClose: () => (this.isOpen = false), title: this.bindings.i18n.t('sort-and-filter'), numberOfItems: this.querySummaryState.total, openButton: this.openButton }, h(RefineModalBody, { key: 'aa6c91f1069d2fec4c991b726e40a26b51917f7d' }, this.renderSort(), this.renderFilters())));
207
+ return (h(RefineModal, { key: 'c1903b44e0c9deffc57515099a0993203c92c9b7', i18n: this.bindings.i18n, host: this.host, isOpen: this.isOpen, onClose: () => (this.isOpen = false), title: this.bindings.i18n.t('sort-and-filter'), numberOfItems: this.querySummaryState.total, openButton: this.openButton }, h(RefineModalBody, { key: '7a48ac497f20763f538e115965d34e1f6eb776b7' }, this.renderSort(), this.renderFilters())));
208
208
  }
209
209
  componentDidLoad() {
210
210
  this.host.style.display = '';
@@ -68,7 +68,7 @@ const AtomicRefineToggle$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRefine
68
68
  this.modalRef && (this.modalRef.isOpen = true);
69
69
  }
70
70
  render() {
71
- return (h(RefineToggleGuard, { key: '8875d9746ca79657fbe241a742188d007ec1c51e', firstRequestExecuted: this.searchStatusState.firstSearchExecuted, hasError: this.searchStatusState.hasError, hasItems: this.searchStatusState.hasResults }, h(RefineToggleButton, { key: '557cff1ed38269217df5d1880a40f030c3283929', i18n: this.bindings.i18n, onClick: () => this.enableModal(), setRef: (button) => {
71
+ return (h(RefineToggleGuard, { key: '83730811042478dfaec5eab5fadc9ec63b613721', firstRequestExecuted: this.searchStatusState.firstSearchExecuted, hasError: this.searchStatusState.hasError, hasItems: this.searchStatusState.hasResults }, h(RefineToggleButton, { key: '8e9781b72935261a0ab7fc3009bb479ad1f65936', i18n: this.bindings.i18n, onClick: () => this.enableModal(), setRef: (button) => {
72
72
  if (!button) {
73
73
  return;
74
74
  }
@@ -138,7 +138,7 @@ const AtomicResultChildren$1 = /*@__PURE__*/ proxyCustomElement(class AtomicResu
138
138
  return (h(ChildrenWrapper, { hasChildren: children.length > 0 }, children.map((child, i) => this.renderChild(child, i === children.length - 1))));
139
139
  }
140
140
  render() {
141
- return (h(ResultChildrenGuard, { key: '87e4eb542feb7fd2fe4adafb1a966a77653195e6', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
141
+ return (h(ResultChildrenGuard, { key: 'eb224dfff016980d3d7aa281e6a87c3172286c78', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
142
142
  }
143
143
  get host() { return this; }
144
144
  static get style() { return AtomicResultChildrenStyle0; }
@@ -98,7 +98,7 @@ const AtomicResultFieldsList$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRe
98
98
  }
99
99
  }
100
100
  render() {
101
- return h(Host, { key: 'bb78009f1c331adf546e3fb7516413cce13de162' });
101
+ return h(Host, { key: '936654b1f7aa4fd793eecd6fb508e14b8c764bb0' });
102
102
  }
103
103
  get host() { return this; }
104
104
  static get style() { return AtomicResultFieldsListStyle0; }
@@ -43,7 +43,7 @@ const AtomicResultLink$1 = /*@__PURE__*/ proxyCustomElement(class AtomicResultLi
43
43
  const href = isUndefined(this.hrefTemplate)
44
44
  ? this.result.clickUri
45
45
  : buildStringTemplateFromResult(this.hrefTemplate, this.result, this.bindings);
46
- return (h(LinkWithItemAnalytics, { key: '161199ea164427d67db5456e43d7c3cb2ebe9d8d', href: href, onSelect: () => this.interactiveResult.select(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
46
+ return (h(LinkWithItemAnalytics, { key: '822263a18da861e80557adf11226427663627b8f', href: href, onSelect: () => this.interactiveResult.select(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
47
47
  }
48
48
  get host() { return this; }
49
49
  static get style() { return AtomicResultLinkStyle0; }
@@ -194,7 +194,7 @@ const AtomicResultList$1 = /*@__PURE__*/ proxyCustomElement(class AtomicResultLi
194
194
  render() {
195
195
  this.resultListCommon.updateBreakpoints();
196
196
  const listClasses = this.computeListDisplayClasses();
197
- return (h(TabGuard, { key: '649dedc762f1c1c9dd45851b000ef76ecd07effa', tabsIncluded: this.tabsIncluded, tabsExcluded: this.tabsExcluded, activeTab: this.tabManagerState.activeTab }, h(ItemListGuard, { key: '05afb457fd344b7ccf5cb925d0baf32227f2ddba', hasError: this.resultListState.hasError, hasTemplate: this.resultTemplateRegistered, templateHasError: this.itemTemplateProvider.hasError, firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, h(DisplayWrapper, { key: 'a68a18d3eb5c4fad3949bbc8f11a1610db400346', display: this.display, listClasses: listClasses }, h(ResultsPlaceholdersGuard, { key: '19c2415dc2c2497abc612acd1866f1284cdf2422', density: this.density, display: this.display, imageSize: this.imageSize, displayPlaceholders: !this.isAppLoaded, numberOfPlaceholders: this.resultsPerPageState.numberOfResults }), h(ItemDisplayGuard, { key: '5eadfb9707d35affe14cc9eabfe70a436981cc80', firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, this.display === 'table'
197
+ return (h(TabGuard, { key: 'c8b1ca9302ce0e9cfd5114067cb686fa27b6206f', tabsIncluded: this.tabsIncluded, tabsExcluded: this.tabsExcluded, activeTab: this.tabManagerState.activeTab }, h(ItemListGuard, { key: 'b6db922875d6156b42e0060ad2218bb82f9ed196', hasError: this.resultListState.hasError, hasTemplate: this.resultTemplateRegistered, templateHasError: this.itemTemplateProvider.hasError, firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, h(DisplayWrapper, { key: '03ee6cd85a8bc9e94005082b24b42fb5ca893907', display: this.display, listClasses: listClasses }, h(ResultsPlaceholdersGuard, { key: 'b6a6020f7e40bddb2365c6ca6ef3ee67c5598758', density: this.density, display: this.display, imageSize: this.imageSize, displayPlaceholders: !this.isAppLoaded, numberOfPlaceholders: this.resultsPerPageState.numberOfResults }), h(ItemDisplayGuard, { key: 'dea4c3d009fb28a556b81ba8d2fba8be5e02ed49', firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, this.display === 'table'
198
198
  ? this.renderAsTable()
199
199
  : this.display === 'grid'
200
200
  ? this.renderAsGrid()
@@ -18,7 +18,7 @@ const AtomicResultTablePlaceholder = /*@__PURE__*/ proxyCustomElement(class Atom
18
18
  return getItemDisplayClasses('table', this.density, this.imageSize);
19
19
  }
20
20
  render() {
21
- return (h("table", { key: 'f0cad781eac8ea643304812a6cec890aa77b588a', class: `list-root animate-pulse ${this.getClasses().join(' ')}` }, h("thead", { key: 'd12868ee81d0bc2ffebfb3d7959eb280324b5694' }, h("tr", { key: 'bd9ee9d2bd93a248b79d83a47525d136fb4619e8' }, h("th", { key: 'a41e32a184fb8cc15606153dc3471a391d5b0f3a' }, h("div", { key: 'a9d05f5c95c57e4b2ba373f44579ffc67014f168', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '14.5rem' } })), h("th", { key: '7a0f86e0b72d04776dd636e9a3186658ab7a04c2' }, h("div", { key: '504fd4539f8338a3e45aa61369815550cc8b1d75', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '9.75rem' } })), h("th", { key: '636260d5f1e591f9b89e17095ea3139d51d22cdf' }, h("div", { key: '79ba23e12e438b8324edad76c8cc646aaf32b2d9', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '6.5rem' } })))), h("tbody", { key: 'd5f76344025e0b6d3795a6d08952e54b75092180' }, Array.from({ length: this.rows }, () => (h("tr", null, h("td", null, h("div", { class: `mb-6 h-8 ${placeholderClasses}`, style: { width: '22.875rem' } }), h("div", { class: `mb-2 h-5 ${placeholderClasses}`, style: { width: '23.75rem' } }), h("div", { class: `h-5 ${placeholderClasses}`, style: { width: '11.5rem' } })), h("td", null, h("div", { class: `mt-1.5 h-5 ${placeholderClasses}`, style: { width: '11rem' } })), h("td", null, h("div", { class: `mt-1.5 h-5 ${placeholderClasses}`, style: { width: '4.875rem' } }))))))));
21
+ return (h("table", { key: 'ed3f575082ec1c2a9927251e2b09d5c0f70d78b5', class: `list-root animate-pulse ${this.getClasses().join(' ')}` }, h("thead", { key: 'd48900fa9c63a0a201379e034efce277095884e2' }, h("tr", { key: '46641a6003cadf5c7fc8dfad1ab9d1ef11c90190' }, h("th", { key: '617b903b6d8ffde30dcbb3e4dcbaaa4e377d3b19' }, h("div", { key: 'd082c63c3bde168ef9395afb9e0dd50fcb3a6825', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '14.5rem' } })), h("th", { key: '2fc5a593908aad27a251272284bce7b55ad521e6' }, h("div", { key: 'a49a28d807240f58b43fbe8a646f9de2218e34f9', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '9.75rem' } })), h("th", { key: '96676c1b68d7ab25dc14b9331642f5288d0f2b53' }, h("div", { key: '648e50f2fa4ba0214bc0b220d38520c86580013c', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '6.5rem' } })))), h("tbody", { key: '98adcdb91e5e58c6dd1cc09759e6cc0e7a08bf31' }, Array.from({ length: this.rows }, () => (h("tr", null, h("td", null, h("div", { class: `mb-6 h-8 ${placeholderClasses}`, style: { width: '22.875rem' } }), h("div", { class: `mb-2 h-5 ${placeholderClasses}`, style: { width: '23.75rem' } }), h("div", { class: `h-5 ${placeholderClasses}`, style: { width: '11.5rem' } })), h("td", null, h("div", { class: `mt-1.5 h-5 ${placeholderClasses}`, style: { width: '11rem' } })), h("td", null, h("div", { class: `mt-1.5 h-5 ${placeholderClasses}`, style: { width: '4.875rem' } }))))))));
22
22
  }
23
23
  static get style() { return AtomicResultTablePlaceholderStyle0; }
24
24
  }, [1, "atomic-result-table-placeholder", {
@@ -60,7 +60,7 @@ const AtomicSearchBoxQuerySuggestions = /*@__PURE__*/ proxyCustomElement(class A
60
60
  }
61
61
  render() {
62
62
  if (this.error) {
63
- return (h("atomic-component-error", { key: 'ee518dd01ee68d5ac1e13c37335888acf7089beb', element: this.host, error: this.error }));
63
+ return (h("atomic-component-error", { key: 'c5e8f0a3254a31cdae54c36868f70432c1673888', element: this.host, error: this.error }));
64
64
  }
65
65
  }
66
66
  get host() { return this; }
@@ -154,7 +154,7 @@ const AtomicSearchBoxRecentQueries = /*@__PURE__*/ proxyCustomElement(class Atom
154
154
  }
155
155
  render() {
156
156
  if (this.error) {
157
- return (h("atomic-component-error", { key: '577129c08c073b99dbb6b86b77e2ffa7c2ff7f69', element: this.host, error: this.error }));
157
+ return (h("atomic-component-error", { key: 'a428e82c6ce29e81704777cbbf3bea98937b906a', element: this.host, error: this.error }));
158
158
  }
159
159
  }
160
160
  get host() { return this; }
@@ -436,14 +436,14 @@ const AtomicSearchBox$1 = /*@__PURE__*/ proxyCustomElement(class AtomicSearchBox
436
436
  if (!this.suggestionManager.suggestions.length) {
437
437
  this.registerSearchboxSuggestionEvents();
438
438
  }
439
- return (h(Host, { key: 'cd802b14a08f90326685fc94fae9284512c4a4f4' }, this.renderAbsolutePositionSpacer(), [
440
- h(SearchBoxWrapper, { key: 'ca513e73ed33a17fa7dce2484680fd8c2fc4cba6', disabled: isDisabled, onFocusout: (event) => {
439
+ return (h(Host, { key: '6a53ad9feb241283fd9bcb638b8f0f703691937a' }, this.renderAbsolutePositionSpacer(), [
440
+ h(SearchBoxWrapper, { key: 'c704424a22aa17ead0ca97f0104e336df2c57475', disabled: isDisabled, onFocusout: (event) => {
441
441
  if (!isFocusingOut(event)) {
442
442
  return;
443
443
  }
444
444
  this.suggestionManager.clearSuggestions();
445
445
  this.isExpanded = false;
446
- } }, this.renderTextBox(searchLabel), h(SubmitButton, { key: '5e83f4af25eec9ab9ace26eeb59a58845a2a7d9b', bindings: this.bindings, disabled: isDisabled, onClick: () => {
446
+ } }, this.renderTextBox(searchLabel), h(SubmitButton, { key: 'ee7fc79825b31c970bad13d6568e0a91b01ff60e', bindings: this.bindings, disabled: isDisabled, onClick: () => {
447
447
  this.searchBox.submit();
448
448
  this.suggestionManager.clearSuggestions();
449
449
  } }), this.renderSuggestions()),
@@ -43,9 +43,9 @@ const AtomicSmartSnippetFeedbackModal = /*@__PURE__*/ proxyCustomElement(class A
43
43
  }
44
44
  render() {
45
45
  updateBreakpoints(this.host);
46
- return (h("atomic-modal", { key: '9915bc71b6329068bc8a3731971a793946762f39', fullscreen: false, source: this.source, container: this.host, isOpen: this.isOpen, close: () => this.close(), exportparts: ATOMIC_MODAL_EXPORT_PARTS }, h(SmartSnippetFeedbackModalHeader, { key: '385350607264cd3a0dce273b18eec02909220384', i18n: this.bindings.i18n }), h(SmartSnippetFeedbackModalBody, { key: 'e1a01e0df35dbaf9da6891c825ad5e5e1e6bc534', formId: this.formId, onSubmit: (e) => this.sendFeedback(e) }, h(SmartSnippetFeebackModalOptions, { key: 'd92a6395c26802cfafbcbd50fb1b2cd86bb907de', i18n: this.bindings.i18n }, smartSnippetFeedbackOptions.map(({ id, localeKey, correspondingAnswer }) => (h(SmartSnippetFeedbackModalOption, { correspondingAnswer: correspondingAnswer, currentAnswer: this.currentAnswer, i18n: this.bindings.i18n, id: id, localeKey: localeKey, onChange: () => {
46
+ return (h("atomic-modal", { key: 'fccd069b2c45bf7e14d51654d375b8bd41504d07', fullscreen: false, source: this.source, container: this.host, isOpen: this.isOpen, close: () => this.close(), exportparts: ATOMIC_MODAL_EXPORT_PARTS }, h(SmartSnippetFeedbackModalHeader, { key: '10fe706ebe195c1e5b242c7eff7bf5816c48a82e', i18n: this.bindings.i18n }), h(SmartSnippetFeedbackModalBody, { key: 'bcd2f185ac47ac85c441b935eea1c9b3e91aae9b', formId: this.formId, onSubmit: (e) => this.sendFeedback(e) }, h(SmartSnippetFeebackModalOptions, { key: 'e3fb4765abb2ca7088fbc8917cb9ef7e5877622c', i18n: this.bindings.i18n }, smartSnippetFeedbackOptions.map(({ id, localeKey, correspondingAnswer }) => (h(SmartSnippetFeedbackModalOption, { correspondingAnswer: correspondingAnswer, currentAnswer: this.currentAnswer, i18n: this.bindings.i18n, id: id, localeKey: localeKey, onChange: () => {
47
47
  this.currentAnswer = correspondingAnswer;
48
- } })))), h(SmartSnippetFeedbackModalDetails, { key: '6dfe87c931bc44d202d78c5a800936aa733b89de', currentAnswer: this.currentAnswer, i18n: this.bindings.i18n, setDetailsInputRef: (ref) => (this.detailsInputRef = ref) })), h(SmartSnippetFeedbackModalFooter, { key: '86f51c71ade3a7e360ce5c000e45939e8744ade4', formId: this.formId, i18n: this.bindings.i18n, onClick: () => this.close() })));
48
+ } })))), h(SmartSnippetFeedbackModalDetails, { key: 'c34b35c68d485dac9e6812d33c524d14bb8e56f3', currentAnswer: this.currentAnswer, i18n: this.bindings.i18n, setDetailsInputRef: (ref) => (this.detailsInputRef = ref) })), h(SmartSnippetFeedbackModalFooter, { key: '937338ef8608a5c01130f592386bb07f858c960a', formId: this.formId, i18n: this.bindings.i18n, onClick: () => this.close() })));
49
49
  }
50
50
  close() {
51
51
  this.isOpen = false;
@@ -117,8 +117,8 @@ const AtomicSortDropdown$1 = /*@__PURE__*/ proxyCustomElement(class AtomicSortDr
117
117
  const { hasError, hasResults, firstSearchExecuted } = this.searchStatusState;
118
118
  const { bindings: { i18n }, id, } = this;
119
119
  return [
120
- h(SortGuard, { key: '0669c3a8c7067eef9ba5c178a5f4d12752f8b085', firstSearchExecuted: firstSearchExecuted, hasError: hasError, hasResults: hasResults }, h(SortContainer, { key: '6eb9cc11bb18013dfd384b809e6e72d2177cbe60' }, h(SortLabel, { key: '4573530fcd7c614b7ed1d3dbb8f4ad5617477ee3', i18n: i18n, id: id }), h(SortSelect, { key: 'a5ee4b55058679c63fb628337c33d1db192cf481', i18n: i18n, id: id, onSelect: (evt) => this.select(evt) }, this.options.map(({ label, criteria, expression }) => (h(SortOption, { i18n: i18n, label: label, selected: this.sort.isSortedBy(criteria), value: expression })))))),
121
- h("slot", { key: '39a0d6e53adfe877b5f677d4cf9b0ff9177f84e8' }),
120
+ h(SortGuard, { key: '66f0c9de176fd2c9cb547d369f10fa3416d9a5fd', firstSearchExecuted: firstSearchExecuted, hasError: hasError, hasResults: hasResults }, h(SortContainer, { key: '5b3008b4f26abdeee78d2cd964d137f8001ad251' }, h(SortLabel, { key: '3f94d35e35aba4ec3f98711e33464327ba491174', i18n: i18n, id: id }), h(SortSelect, { key: '2c905601b8771fef1b74855608f4d28ece6bf662', i18n: i18n, id: id, onSelect: (evt) => this.select(evt) }, this.options.map(({ label, criteria, expression }) => (h(SortOption, { i18n: i18n, label: label, selected: this.sort.isSortedBy(criteria), value: expression })))))),
121
+ h("slot", { key: '6f21e177b858af29840e03dcfe0c3e932753b3a0' }),
122
122
  ];
123
123
  }
124
124
  get host() { return this; }
@@ -47,7 +47,7 @@ const AtomicSortExpression$1 = /*@__PURE__*/ proxyCustomElement(class AtomicSort
47
47
  const dropdownComponent = 'atomic-sort-dropdown';
48
48
  if (!this.host.closest(dropdownComponent)) {
49
49
  const error = new Error(`The "${this.host.nodeName.toLowerCase()}" component has to be used inside an ${dropdownComponent} element.`);
50
- return (h("atomic-component-error", { key: '4e946fe770ef49fc6346f0bc247db856fd38ba68', element: this.host, error: error }));
50
+ return (h("atomic-component-error", { key: '3b2db477a74789f11e9423b37104e5c27e30e61f', element: this.host, error: error }));
51
51
  }
52
52
  }
53
53
  get host() { return this; }
@@ -59,7 +59,7 @@ const AtomicTabManager$1 = /*@__PURE__*/ proxyCustomElement(class AtomicTabManag
59
59
  });
60
60
  }
61
61
  render() {
62
- return (h(Host, { key: 'ea60f4179a268319ba97570f95d6881c379c8b18' }, h("atomic-tab-bar", { key: 'ea83347d794b2f83b70706bdfc4240286c27d71e' }, h("div", { key: '9d9e588d7a4b7012f43419f3edae786b177498cc', role: "list", "aria-label": "tab-area", part: "tab-area", class: "border-neutral mb-2 flex w-full flex-row border-b" }, this.tabs.map((tab) => (h("atomic-tab-button", { active: this.tabManagerState.activeTab === tab.name, label: this.bindings.i18n.t(tab.label, {
62
+ return (h(Host, { key: '4530028bc53f31ae55c59cb476942e8b5e93ad1b' }, h("atomic-tab-bar", { key: 'c698720cc485471ec0c320b8d4ffbe32736e7028' }, h("div", { key: '9eed11f8457ca0fc6a6781eaf3fc8b6f510d1ea9', role: "list", "aria-label": "tab-area", part: "tab-area", class: "border-neutral mb-2 flex w-full flex-row border-b" }, this.tabs.map((tab) => (h("atomic-tab-button", { active: this.tabManagerState.activeTab === tab.name, label: this.bindings.i18n.t(tab.label, {
63
63
  defaultValue: tab.label,
64
64
  }), select: () => {
65
65
  if (!tab.tabController.state.isActive) {
@@ -8,6 +8,15 @@ import { NumberValue, Schema } from '@coveo/bueno';
8
8
  import { buildContext, buildProductListing, buildSearch, } from '@coveo/headless/commerce';
9
9
  import { html, LitElement, nothing } from 'lit';
10
10
  import { customElement, property, state } from 'lit/decorators.js';
11
+ import { renderBreadcrumbButton } from "../../common/breadbox/breadcrumb-button";
12
+ import { renderBreadcrumbClearAll } from "../../common/breadbox/breadcrumb-clear-all";
13
+ import { renderBreadcrumbContainer } from "../../common/breadbox/breadcrumb-container";
14
+ import { renderBreadcrumbContent } from "../../common/breadbox/breadcrumb-content";
15
+ import { renderBreadcrumbShowLess } from "../../common/breadbox/breadcrumb-show-less";
16
+ import { renderBreadcrumbShowMore } from "../../common/breadbox/breadcrumb-show-more";
17
+ import { formatHumanReadable } from "../../common/facets/numeric-facet/formatter";
18
+ import { defaultCurrencyFormatter, defaultNumberFormatter, } from "../../common/formats/format-common";
19
+ import { ValidatePropsController } from "../../common/validate-props-controller/validate-props-controller";
11
20
  import { bindStateToController } from "../../../decorators/bind-state";
12
21
  import { bindingGuard } from "../../../decorators/binding-guard";
13
22
  import { bindings } from "../../../decorators/bindings";
@@ -16,14 +25,6 @@ import { withTailwindStyles } from "../../../decorators/with-tailwind-styles.js"
16
25
  import { FocusTargetController } from "../../../utils/accessibility-utils";
17
26
  import { parseDate } from "../../../utils/date-utils";
18
27
  import { getFieldValueCaption } from "../../../utils/field-utils";
19
- import { renderBreadcrumbButton } from '../../common/breadbox/breadcrumb-button';
20
- import { renderBreadcrumbClearAll } from '../../common/breadbox/breadcrumb-clear-all';
21
- import { renderBreadcrumbContainer } from '../../common/breadbox/breadcrumb-container';
22
- import { renderBreadcrumbContent } from '../../common/breadbox/breadcrumb-content';
23
- import { renderBreadcrumbShowLess } from '../../common/breadbox/breadcrumb-show-less';
24
- import { renderBreadcrumbShowMore } from '../../common/breadbox/breadcrumb-show-more';
25
- import { formatHumanReadable } from '../../common/facets/numeric-facet/formatter';
26
- import { defaultCurrencyFormatter, defaultNumberFormatter, } from '../../common/formats/format-common';
27
28
  import styles from './atomic-commerce-breadbox.tw.css';
28
29
  /**
29
30
  * The `atomic-commerce-breadbox` component creates breadcrumbs that display a summary of the currently active facet values.
@@ -42,7 +43,7 @@ import styles from './atomic-commerce-breadbox.tw.css';
42
43
  */
43
44
  let AtomicCommerceBreadbox = class AtomicCommerceBreadbox extends LitElement {
44
45
  constructor() {
45
- super(...arguments);
46
+ super();
46
47
  this.lastRemovedBreadcrumbIndex = 0;
47
48
  this.numberOfBreadcrumbs = 0;
48
49
  this.numberOfCollapsedBreadcrumbs = 0;
@@ -96,9 +97,15 @@ let AtomicCommerceBreadbox = class AtomicCommerceBreadbox extends LitElement {
96
97
  }
97
98
  }
98
99
  };
100
+ new ValidatePropsController(this, () => ({ pathLimit: this.pathLimit }), new Schema({
101
+ pathLimit: new NumberValue({
102
+ default: 3,
103
+ min: 1,
104
+ required: false,
105
+ }),
106
+ }));
99
107
  }
100
108
  initialize() {
101
- this.validateProps();
102
109
  if (this.bindings.interfaceElement.type === 'product-listing') {
103
110
  this.searchOrListing = buildProductListing(this.bindings.engine);
104
111
  }
@@ -115,31 +122,9 @@ let AtomicCommerceBreadbox = class AtomicCommerceBreadbox extends LitElement {
115
122
  this.breadcrumbShowMoreFocus = new FocusTargetController(this, this.bindings);
116
123
  this.breadcrumbShowLessFocus = new FocusTargetController(this, this.bindings);
117
124
  }
118
- willUpdate(changedProperties) {
119
- if (changedProperties.has('pathLimit')) {
120
- this.validateProps();
121
- }
122
- }
123
125
  updated() {
124
126
  this.adaptBreadcrumbs();
125
127
  }
126
- validateProps() {
127
- try {
128
- new Schema({
129
- pathLimit: new NumberValue({
130
- default: 3,
131
- min: 1,
132
- required: false,
133
- }),
134
- }).validate({
135
- pathLimit: this.pathLimit,
136
- });
137
- }
138
- catch (error) {
139
- this.error = error;
140
- return;
141
- }
142
- }
143
128
  disconnectedCallback() {
144
129
  this.resizeObserver?.disconnect();
145
130
  }
@@ -165,6 +165,8 @@ let AtomicCommerceCategoryFacet = class AtomicCommerceCategoryFacet extends LitE
165
165
  this.focusTargets.activeValueFocus.focusAfterSearch();
166
166
  this.facet.deselectAll();
167
167
  },
168
+ facetId: this.facetState.facetId,
169
+ field: this.facet.state.field,
168
170
  },
169
171
  })}
170
172
  ${renderCategoryFacetParentAsTreeContainer({
@@ -258,6 +260,7 @@ let AtomicCommerceCategoryFacet = class AtomicCommerceCategoryFacet extends LitE
258
260
  props: {
259
261
  value,
260
262
  field: this.facetState.field,
263
+ facetId: this.facetState.facetId,
261
264
  searchQuery: this.facetState.facetSearch.query,
262
265
  i18n: this.bindings.i18n,
263
266
  onClick: () => {
@@ -4,10 +4,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
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
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var AtomicCommercePager_1;
7
8
  import { NumberValue, Schema } from '@coveo/bueno';
8
9
  import { buildProductListing, buildSearch, } from '@coveo/headless/commerce';
9
10
  import { html, LitElement } from 'lit';
10
11
  import { customElement, property, state } from 'lit/decorators.js';
12
+ import { keyed } from 'lit/directives/keyed.js';
11
13
  import { when } from 'lit/directives/when.js';
12
14
  import { bindStateToController } from "../../../decorators/bind-state";
13
15
  import { bindingGuard } from "../../../decorators/binding-guard";
@@ -35,9 +37,10 @@ import { getCurrentPagesRange } from './commerce-pager-utils';
35
37
  *
36
38
  * @event atomic/scrollToTop - Emitted when the user clicks the next or previous button, or a page button.
37
39
  */
38
- let AtomicCommercePager = class AtomicCommercePager extends LitElement {
40
+ let AtomicCommercePager = AtomicCommercePager_1 = class AtomicCommercePager extends LitElement {
39
41
  constructor() {
40
42
  super(...arguments);
43
+ this.radioGroupName = randomID('atomic-commerce-pager-');
41
44
  this.isAppLoaded = false;
42
45
  /**
43
46
  * The maximum number of page buttons to display.
@@ -59,7 +62,6 @@ let AtomicCommercePager = class AtomicCommercePager extends LitElement {
59
62
  * - Use a stringified SVG to display it directly.
60
63
  */
61
64
  this.nextButtonIcon = ArrowRightIcon;
62
- this.radioGroupName = randomID('atomic-commerce-pager-');
63
65
  }
64
66
  initialize() {
65
67
  this.validateProps();
@@ -74,12 +76,10 @@ let AtomicCommercePager = class AtomicCommercePager extends LitElement {
74
76
  this.isAppLoaded = isAppLoaded;
75
77
  });
76
78
  }
77
- validateProps() {
78
- new Schema({
79
- numberOfPages: new NumberValue({ min: 0 }),
80
- }).validate({
81
- numberOfPages: this.numberOfPages,
82
- });
79
+ willUpdate(changedProperties) {
80
+ if (changedProperties.has('numberOfPages')) {
81
+ this.validateProps();
82
+ }
83
83
  }
84
84
  render() {
85
85
  const pagesRange = getCurrentPagesRange(this.pagerState.page, this.numberOfPages, this.pagerState.totalPages - 1);
@@ -103,7 +103,7 @@ let AtomicCommercePager = class AtomicCommercePager extends LitElement {
103
103
  props: {
104
104
  i18n: this.bindings.i18n,
105
105
  },
106
- })(html `${pagesRange.map((pageNumber) => renderPagerPageButton({
106
+ })(html `${pagesRange.map((pageNumber, index) => keyed(`page-${pageNumber}-${index}`, renderPagerPageButton({
107
107
  props: {
108
108
  isSelected: pageNumber === this.pagerState.page,
109
109
  ariaLabel: this.bindings.i18n.t('page-number', {
@@ -117,7 +117,7 @@ let AtomicCommercePager = class AtomicCommercePager extends LitElement {
117
117
  groupName: this.radioGroupName,
118
118
  text: (pageNumber + 1).toLocaleString(this.bindings.i18n.language),
119
119
  },
120
- }))}`)}
120
+ })))}`)}
121
121
  ${renderPagerNextButton({
122
122
  props: {
123
123
  icon: this.nextButtonIcon,
@@ -131,11 +131,25 @@ let AtomicCommercePager = class AtomicCommercePager extends LitElement {
131
131
  })}
132
132
  `)}`)}`;
133
133
  }
134
+ validateProps() {
135
+ try {
136
+ AtomicCommercePager_1.propsSchema.validate({
137
+ numberOfPages: this.numberOfPages,
138
+ });
139
+ }
140
+ catch (error) {
141
+ this.error = error;
142
+ return;
143
+ }
144
+ }
134
145
  async focusOnFirstResultAndScrollToTop() {
135
146
  await this.bindings.store.state.resultList?.focusOnFirstResultAfterNextSearch();
136
147
  this.dispatchEvent(new CustomEvent('atomic/scrollToTop'));
137
148
  }
138
149
  };
150
+ AtomicCommercePager.propsSchema = new Schema({
151
+ numberOfPages: new NumberValue({ min: 0 }),
152
+ });
139
153
  __decorate([
140
154
  state()
141
155
  ], AtomicCommercePager.prototype, "bindings", void 0);
@@ -162,7 +176,7 @@ __decorate([
162
176
  bindingGuard(),
163
177
  errorGuard()
164
178
  ], AtomicCommercePager.prototype, "render", null);
165
- AtomicCommercePager = __decorate([
179
+ AtomicCommercePager = AtomicCommercePager_1 = __decorate([
166
180
  customElement('atomic-commerce-pager'),
167
181
  bindings(),
168
182
  withTailwindStyles
@@ -2,8 +2,9 @@ import "../../atomic-icon/atomic-icon";
2
2
  import { html } from 'lit';
3
3
  import { renderButton } from "../../button";
4
4
  const LeftArrow = "<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>";
5
- export const renderCategoryFacetAllCategoryButton = ({ props: { i18n, onClick } }) => {
6
- const allCategories = i18n.t('all-categories');
5
+ import { getAllCategoriesLocalizedLabel } from './all-categories-localized-label';
6
+ export const renderCategoryFacetAllCategoryButton = ({ props: { i18n, onClick, facetId, field } }) => {
7
+ const allCategories = getAllCategoriesLocalizedLabel({ facetId, field, i18n });
7
8
  return html `
8
9
  ${renderButton({
9
10
  props: {
@@ -0,0 +1,9 @@
1
+ export const getAllCategoriesLocalizedLabel = ({ facetId, field, i18n, }) => {
2
+ if (facetId && i18n.exists(`all-categories-${facetId}`)) {
3
+ return i18n.t(`all-categories-${facetId}`);
4
+ }
5
+ if (i18n.exists(`all-categories-${field}`)) {
6
+ return i18n.t(`all-categories-${field}`);
7
+ }
8
+ return i18n.t('all-categories');
9
+ };
@@ -4,12 +4,17 @@ import { renderButton } from "../../button";
4
4
  import { renderFacetValueLabelHighlight } from "../facet-value-label-highlight/facet-value-label-highlight";
5
5
  import { hierarchicalPath } from "../../../../directives/hierarchical-path";
6
6
  import { getFieldValueCaption } from "../../../../utils/field-utils";
7
+ import { getAllCategoriesLocalizedLabel } from './all-categories-localized-label';
7
8
  const SEPARATOR = '/';
8
9
  const PATH_MAX_LENGTH = 3;
9
10
  export const renderCategoryFacetSearchValue = ({ props }) => {
10
11
  const count = props.value.count.toLocaleString(props.i18n.language);
11
12
  const inLabel = props.i18n.t('in');
12
- const allCategories = props.i18n.t('all-categories');
13
+ const allCategories = getAllCategoriesLocalizedLabel({
14
+ facetId: props.facetId,
15
+ field: props.field,
16
+ i18n: props.i18n,
17
+ });
13
18
  const localizedPath = props.value.path.length
14
19
  ? props.value.path.map((value) => getFieldValueCaption(props.field, value, props.i18n))
15
20
  : [allCategories];
@@ -0,0 +1,50 @@
1
+ import { deepEqual } from "../../../utils/compare-utils";
2
+ /**
3
+ * A reactive controller that validates the props of a Lit component against a
4
+ * provided Bueno schema.
5
+ *
6
+ * It validates the props when the host is connected to the DOM and whenever
7
+ * the host updates, revalidating only if the props have changed since the last
8
+ * validation.
9
+ *
10
+ * If validation fails, the controller sets the `error` property on the host.
11
+ */
12
+ export class ValidatePropsController {
13
+ /**
14
+ * Creates a `ValidatePropsController`.
15
+ *
16
+ * @param host The host element.
17
+ * @param getProps A function that returns the current props to validate.
18
+ * @param schema The Bueno schema to validate the props against.
19
+ */
20
+ constructor(host, getProps, schema) {
21
+ this.host = host;
22
+ this.getProps = getProps;
23
+ this.schema = schema;
24
+ host.addController(this);
25
+ }
26
+ hostConnected() {
27
+ this.currentProps = this.getProps();
28
+ this._validateProps();
29
+ }
30
+ hostUpdate() {
31
+ this.currentProps = this.getProps();
32
+ if (deepEqual(this.currentProps, this.previousProps)) {
33
+ return;
34
+ }
35
+ // @ts-expect-error: we need to clear the error.
36
+ this.host.error = undefined;
37
+ this._validateProps();
38
+ }
39
+ _validateProps() {
40
+ try {
41
+ this.schema.validate(this.currentProps);
42
+ }
43
+ catch (error) {
44
+ this.host.error = error;
45
+ }
46
+ finally {
47
+ this.previousProps = this.currentProps;
48
+ }
49
+ }
50
+ }