@coveo/atomic 3.33.8 → 3.33.9-pre.01801cbde1
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.
- package/dist/atomic/_atomic.esm.js +1 -1
- package/dist/atomic/atomic.esm.js.map +1 -1
- package/dist/atomic/autoloader/index.cjs.js +2 -2
- package/dist/atomic/autoloader/index.esm.js +2 -2
- package/dist/atomic/components/_index.d.ts +0 -4
- package/dist/atomic/components/_index.js +0 -2
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/analytics-config.js.map +1 -1
- package/dist/atomic/components/atomic-category-facet.js +1 -1
- package/dist/atomic/components/atomic-citation.js +1 -1
- package/dist/atomic/components/atomic-facet-manager.js +1 -1
- package/dist/atomic/components/atomic-facet.js +1 -1
- package/dist/atomic/components/atomic-format-currency.js +1 -1
- package/dist/atomic/components/atomic-format-number.js +1 -1
- package/dist/atomic/components/atomic-format-unit.js +1 -1
- package/dist/atomic/components/atomic-generated-answer-feedback-modal.js +1 -1
- package/dist/atomic/components/atomic-html2.js +1 -1
- package/dist/atomic/components/atomic-insight-edit-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-facet.js +1 -1
- package/dist/atomic/components/atomic-insight-folded-result-list.js +1 -1
- package/dist/atomic/components/atomic-insight-full-search-button.js +1 -1
- package/dist/atomic/components/atomic-insight-history-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-interface.js +1 -1
- package/dist/atomic/components/atomic-insight-no-results.js +1 -1
- package/dist/atomic/components/atomic-insight-numeric-facet.js +1 -1
- package/dist/atomic/components/atomic-insight-pager.js +41 -5
- package/dist/atomic/components/atomic-insight-pager.js.map +1 -1
- package/dist/atomic/components/atomic-insight-query-error.js +1 -1
- package/dist/atomic/components/atomic-insight-refine-modal2.js +2 -2
- package/dist/atomic/components/atomic-insight-refine-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-result-action.js +1 -1
- package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +1 -1
- package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js +1 -1
- package/dist/atomic/components/atomic-insight-result-children.js +1 -1
- package/dist/atomic/components/atomic-insight-result-list.js +1 -1
- package/dist/atomic/components/atomic-insight-result-quickview-action.js +1 -1
- package/dist/atomic/components/atomic-insight-result2.js +1 -1
- package/dist/atomic/components/atomic-insight-search-box.js +2 -2
- package/dist/atomic/components/atomic-insight-smart-snippet-feedback-modal2.js +2 -2
- package/dist/atomic/components/atomic-insight-tabs.js +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-session2.js +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-toggle.js +1 -1
- package/dist/atomic/components/atomic-ipx-body2.js +2 -2
- package/dist/atomic/components/atomic-ipx-button.js +2 -2
- package/dist/atomic/components/atomic-ipx-embedded.js +1 -1
- package/dist/atomic/components/atomic-ipx-modal.js +2 -2
- package/dist/atomic/components/atomic-ipx-recs-list.js +1 -1
- package/dist/atomic/components/atomic-ipx-refine-modal2.js +1 -1
- package/dist/atomic/components/atomic-ipx-refine-toggle.js +1 -1
- package/dist/atomic/components/atomic-ipx-result-link.js +1 -1
- package/dist/atomic/components/atomic-ipx-tabs.js +1 -1
- package/dist/atomic/components/atomic-load-more-results.js +1 -1
- package/dist/atomic/components/atomic-no-results.js +1 -1
- package/dist/atomic/components/atomic-numeric-facet.js +2 -1
- package/dist/atomic/components/atomic-numeric-facet.js.map +1 -1
- package/dist/atomic/components/atomic-query-error.js +1 -1
- package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
- package/dist/atomic/components/atomic-quickview.js +1 -1
- package/dist/atomic/components/atomic-recs-error.js +1 -1
- package/dist/atomic/components/atomic-recs-interface.js +1 -1
- package/dist/atomic/components/atomic-recs-list.js +1 -1
- package/dist/atomic/components/atomic-refine-modal2.js +1 -1
- package/dist/atomic/components/atomic-refine-toggle.js +1 -1
- package/dist/atomic/components/atomic-relevance-inspector.js +46 -1
- package/dist/atomic/components/atomic-relevance-inspector.js.map +1 -1
- package/dist/atomic/components/atomic-result-children.js +1 -1
- package/dist/atomic/components/atomic-result-fields-list.js +1 -1
- package/dist/atomic/components/atomic-result-link.js +1 -1
- package/dist/atomic/components/atomic-result-list.js +1 -1
- package/dist/atomic/components/atomic-result-placeholder2.js +2 -2
- package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
- package/dist/atomic/components/atomic-search-box-instant-results.js +1 -1
- package/dist/atomic/components/atomic-search-box-query-suggestions2.js +1 -1
- package/dist/atomic/components/atomic-search-box-recent-queries2.js +1 -1
- package/dist/atomic/components/atomic-search-box.js +3 -3
- package/dist/atomic/components/atomic-smart-snippet-answer2.js +1 -1
- package/dist/atomic/components/atomic-smart-snippet-collapse-wrapper2.js +2 -2
- package/dist/atomic/components/atomic-smart-snippet-expandable-answer2.js +1 -1
- package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
- package/dist/atomic/components/atomic-smart-snippet-source2.js +1 -1
- package/dist/atomic/components/atomic-sort-dropdown.js +2 -2
- package/dist/atomic/components/atomic-sort-expression.js +1 -1
- package/dist/atomic/components/atomic-stencil-facet-date-input.js +3 -3
- package/dist/atomic/components/atomic-suggestion-renderer2.js +1 -1
- package/dist/atomic/components/atomic-tab-manager.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-pager/atomic-commerce-pager.js +25 -11
- package/dist/atomic/components/components/search/atomic-pager/atomic-pager.js +188 -0
- package/dist/atomic/components/components/search/atomic-search-interface/analytics-config.js +57 -0
- package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +496 -0
- package/dist/atomic/components/components/search/atomic-search-layout/atomic-search-layout.js +20 -9
- package/dist/atomic/components/components/search/index.js +2 -0
- package/dist/atomic/components/components/search/lazy-index.js +2 -0
- package/dist/atomic/components/facet-number-input.js +2 -2
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/index.js.map +1 -1
- package/dist/atomic/components/tab-button.js +1 -1
- package/dist/atomic/components/tab-popover.js +1 -1
- package/dist/atomic/{p-6329ff94.entry.js → p-004adbb8.entry.js} +2 -2
- package/dist/atomic/{p-d0f47b33.entry.js → p-00a6ab8c.entry.js} +2 -2
- package/dist/atomic/{p-3b20b011.entry.js → p-0610b3e7.entry.js} +2 -2
- package/dist/atomic/{p-ee6771f1.entry.js → p-07b6424c.entry.js} +2 -2
- package/dist/atomic/{p-7e2109e9.entry.js → p-09ce78e0.entry.js} +2 -2
- package/dist/atomic/{p-93e29b24.entry.js → p-09d99fc7.entry.js} +2 -2
- package/dist/atomic/{p-f5b58a15.entry.js → p-0b3f6994.entry.js} +2 -2
- package/dist/atomic/{p-83c9244a.entry.js → p-0e27d4f2.entry.js} +2 -2
- package/dist/atomic/{p-c126ee6b.entry.js → p-0e5dc57f.entry.js} +2 -2
- package/dist/atomic/p-0edea6f9.entry.js +2 -0
- package/dist/atomic/{p-20341936.entry.js → p-10b5e0f3.entry.js} +2 -2
- package/dist/atomic/{p-2ca352f4.entry.js → p-15406648.entry.js} +2 -2
- package/dist/atomic/{p-a3efa89e.entry.js → p-160553ce.entry.js} +2 -2
- package/dist/atomic/{p-021f01d6.entry.js → p-18911f64.entry.js} +2 -2
- package/dist/atomic/{p-d716d680.entry.js → p-2148764e.entry.js} +2 -2
- package/dist/atomic/{p-3b023e83.entry.js → p-21bde6fe.entry.js} +2 -2
- package/dist/atomic/{p-de066001.entry.js → p-2c792837.entry.js} +2 -2
- package/dist/atomic/{p-26a51a77.entry.js → p-3213225f.entry.js} +2 -2
- package/dist/atomic/{p-f289269f.entry.js → p-3cbab25b.entry.js} +2 -2
- package/dist/atomic/{p-e23b3334.entry.js → p-441b1a7b.entry.js} +2 -2
- package/dist/atomic/{p-09a3a067.entry.js → p-49a9cba9.entry.js} +2 -2
- package/dist/atomic/{p-744da781.entry.js → p-4b8c0026.entry.js} +2 -2
- package/dist/atomic/{p-89085429.entry.js → p-57af710b.entry.js} +2 -2
- package/dist/atomic/{p-ae060711.entry.js → p-5a67b7c5.entry.js} +2 -2
- package/dist/atomic/{p-92548ab6.entry.js → p-5fe54a66.entry.js} +2 -2
- package/dist/atomic/{p-a8882a2a.entry.js → p-60800b2f.entry.js} +2 -2
- package/dist/atomic/{p-c1999888.entry.js → p-754909fe.entry.js} +2 -2
- package/dist/atomic/{p-36fab158.entry.js → p-7a6468a7.entry.js} +2 -2
- package/dist/atomic/{p-3a2c900c.entry.js → p-7b1a3cab.entry.js} +2 -2
- package/dist/atomic/{p-d93adf52.entry.js → p-7d63bf7b.entry.js} +2 -2
- package/dist/atomic/{p-d364064c.entry.js → p-7f40e57d.entry.js} +2 -2
- package/dist/atomic/{p-d785121d.entry.js → p-856e858c.entry.js} +2 -2
- package/dist/atomic/{p-89ab44de.entry.js → p-8a352ff3.entry.js} +2 -2
- package/dist/atomic/{p-e162805d.entry.js → p-8a7a23b7.entry.js} +2 -2
- package/dist/atomic/{p-604c4085.entry.js → p-8df7270f.entry.js} +2 -2
- package/dist/atomic/{p-8256cd44.entry.js → p-9147b0db.entry.js} +2 -2
- package/dist/atomic/{p-37374964.entry.js → p-9727f36b.entry.js} +2 -2
- package/dist/atomic/p-97829295.entry.js +2 -0
- package/dist/atomic/{p-31aa052e.entry.js → p-97e42c43.entry.js} +2 -2
- package/dist/atomic/{p-1ef658d8.entry.js → p-9d023f0b.entry.js} +2 -2
- package/dist/atomic/{p-40635c2d.entry.js → p-9e771351.entry.js} +2 -2
- package/dist/atomic/{p-ada63017.entry.js → p-9fb66d62.entry.js} +2 -2
- package/dist/atomic/{p-ada63017.entry.js.map → p-9fb66d62.entry.js.map} +1 -1
- package/dist/atomic/{p-035f8dc8.entry.js → p-a3fa6695.entry.js} +2 -2
- package/dist/atomic/{p-d8245258.entry.js → p-a522e38c.entry.js} +2 -2
- package/dist/atomic/{p-5f1fa581.entry.js → p-a5714bc4.entry.js} +2 -2
- package/dist/atomic/{p-f0c2dfe8.entry.js → p-abb14108.entry.js} +2 -2
- package/dist/atomic/p-af1068c1.entry.js +2 -0
- package/dist/atomic/p-af1068c1.entry.js.map +1 -0
- package/dist/atomic/{p-48f57fd8.entry.js → p-b0c50194.entry.js} +2 -2
- package/dist/atomic/{p-b0b17e21.entry.js → p-b4c34553.entry.js} +2 -2
- package/dist/atomic/{p-98c5b9b8.entry.js → p-b6377fb6.entry.js} +2 -2
- package/dist/atomic/{p-ea446721.entry.js → p-bd32625e.entry.js} +2 -2
- package/dist/atomic/{p-939eaaac.entry.js → p-bd99fcc1.entry.js} +2 -2
- package/dist/atomic/{p-7dfcd6af.entry.js → p-be9e40d9.entry.js} +2 -2
- package/dist/atomic/{p-a9b32844.entry.js → p-bf1dff76.entry.js} +2 -2
- package/dist/atomic/{p-99b8d52d.entry.js → p-bf49fed3.entry.js} +2 -2
- package/dist/atomic/{p-48f239b8.js → p-c073d31f.js} +2 -2
- package/dist/atomic/{p-48f239b8.js.map → p-c073d31f.js.map} +1 -1
- package/dist/atomic/{p-3f912e98.entry.js → p-c08f4ee6.entry.js} +2 -2
- package/dist/atomic/p-c2b4b401.entry.js +2 -0
- package/dist/atomic/{p-49c38b27.entry.js → p-c33da203.entry.js} +2 -2
- package/dist/atomic/{p-a53c7821.entry.js → p-c538c8ac.entry.js} +2 -2
- package/dist/atomic/{p-43d708cb.entry.js → p-c9fe4f77.entry.js} +2 -2
- package/dist/atomic/{p-1d1f54a5.entry.js → p-cf810f7a.entry.js} +2 -2
- package/dist/atomic/{p-627e1265.entry.js → p-d50c96c2.entry.js} +2 -2
- package/dist/atomic/{p-bc0d6d3d.entry.js → p-dee60597.entry.js} +2 -2
- package/dist/atomic/{p-4c2f230f.entry.js → p-df4397ab.entry.js} +2 -2
- package/dist/atomic/{p-b2ff1330.entry.js → p-e1c99e2e.entry.js} +2 -2
- package/dist/atomic/{p-b6963bae.entry.js → p-e398835b.entry.js} +2 -2
- package/dist/atomic/{p-6e6d686e.entry.js → p-e3af1bb4.entry.js} +2 -2
- package/dist/atomic/{p-089be992.entry.js → p-e6684bd4.entry.js} +2 -2
- package/dist/atomic/{p-0879d77a.entry.js → p-eda7de4c.entry.js} +2 -2
- package/dist/atomic/{p-594488f2.entry.js → p-f0012580.entry.js} +2 -2
- package/dist/atomic/{p-2ce8220a.entry.js → p-f05f114f.entry.js} +2 -2
- package/dist/atomic/{p-fea7bf3b.entry.js → p-f936f55e.entry.js} +2 -2
- package/dist/atomic/{p-fbfe913d.entry.js → p-fb1a1e2e.entry.js} +2 -2
- package/dist/cjs/_loader.cjs.js +1 -1
- package/dist/cjs/{analytics-config-64ae1273.js → analytics-config-346b4720.js} +2 -2
- package/dist/cjs/analytics-config-346b4720.js.map +1 -0
- package/dist/cjs/atomic-category-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-citation.cjs.entry.js +1 -1
- package/dist/cjs/atomic-facet-manager.cjs.entry.js +1 -1
- package/dist/cjs/atomic-facet-number-input.cjs.entry.js +2 -2
- package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-format-currency.cjs.entry.js +1 -1
- package/dist/cjs/atomic-format-number.cjs.entry.js +1 -1
- package/dist/cjs/atomic-format-unit.cjs.entry.js +1 -1
- package/dist/cjs/atomic-generated-answer-feedback-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-html.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-edit-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-folded-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-full-search-button.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-no-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-numeric-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-pager.cjs.entry.js +41 -7
- package/dist/cjs/atomic-insight-pager.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-query-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-refine-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-refine-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-action.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-children.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-search-box.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-smart-snippet-feedback-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-tabs.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-user-actions-session_2.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-body.cjs.entry.js +2 -2
- package/dist/cjs/atomic-ipx-button.cjs.entry.js +2 -2
- package/dist/cjs/atomic-ipx-embedded.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-refine-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-refine-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/atomic-load-more-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-no-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-numeric-facet.cjs.entry.js +2 -1
- package/dist/cjs/atomic-numeric-facet.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-query-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-recs-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-refine-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-refine-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-relevance-inspector.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-children.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +3 -3
- package/dist/cjs/atomic-search-box-instant-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +2 -2
- package/dist/cjs/atomic-search-box.cjs.entry.js +3 -3
- package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +2 -2
- package/dist/cjs/atomic-smart-snippet-collapse-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-sort-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
- package/dist/cjs/atomic-stencil-facet-date-input.cjs.entry.js +3 -3
- package/dist/cjs/atomic-suggestion-renderer.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-button.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
- package/dist/cjs/atomic.cjs.js +1 -1
- package/dist/cjs/index-757bc886.js +4 -12
- package/dist/cjs/version.cjs.js +1 -1
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-94a94d25.js → analytics-config-4644bac0.js} +2 -2
- package/dist/esm/analytics-config-4644bac0.js.map +1 -0
- package/dist/esm/atomic-category-facet.entry.js +1 -1
- package/dist/esm/atomic-citation.entry.js +1 -1
- package/dist/esm/atomic-facet-manager.entry.js +1 -1
- package/dist/esm/atomic-facet-number-input.entry.js +2 -2
- package/dist/esm/atomic-facet.entry.js +1 -1
- package/dist/esm/atomic-format-currency.entry.js +1 -1
- package/dist/esm/atomic-format-number.entry.js +1 -1
- package/dist/esm/atomic-format-unit.entry.js +1 -1
- package/dist/esm/atomic-generated-answer-feedback-modal.entry.js +1 -1
- package/dist/esm/atomic-html.entry.js +1 -1
- package/dist/esm/atomic-insight-edit-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-facet.entry.js +1 -1
- package/dist/esm/atomic-insight-folded-result-list.entry.js +1 -1
- package/dist/esm/atomic-insight-full-search-button.entry.js +1 -1
- package/dist/esm/atomic-insight-history-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-interface.entry.js +2 -2
- package/dist/esm/atomic-insight-no-results.entry.js +1 -1
- package/dist/esm/atomic-insight-numeric-facet.entry.js +1 -1
- package/dist/esm/atomic-insight-pager.entry.js +41 -7
- package/dist/esm/atomic-insight-pager.entry.js.map +1 -1
- package/dist/esm/atomic-insight-query-error.entry.js +1 -1
- package/dist/esm/atomic-insight-refine-modal.entry.js +2 -2
- package/dist/esm/atomic-insight-refine-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-result-action.entry.js +1 -1
- package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +1 -1
- package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js +1 -1
- package/dist/esm/atomic-insight-result-children.entry.js +1 -1
- package/dist/esm/atomic-insight-result-list.entry.js +1 -1
- package/dist/esm/atomic-insight-result-quickview-action.entry.js +1 -1
- package/dist/esm/atomic-insight-result.entry.js +1 -1
- package/dist/esm/atomic-insight-search-box.entry.js +2 -2
- package/dist/esm/atomic-insight-smart-snippet-feedback-modal.entry.js +2 -2
- package/dist/esm/atomic-insight-tabs.entry.js +1 -1
- package/dist/esm/atomic-insight-user-actions-session_2.entry.js +1 -1
- package/dist/esm/atomic-insight-user-actions-toggle.entry.js +1 -1
- package/dist/esm/atomic-ipx-body.entry.js +2 -2
- package/dist/esm/atomic-ipx-button.entry.js +2 -2
- package/dist/esm/atomic-ipx-embedded.entry.js +1 -1
- package/dist/esm/atomic-ipx-modal.entry.js +2 -2
- package/dist/esm/atomic-ipx-recs-list.entry.js +1 -1
- package/dist/esm/atomic-ipx-refine-modal.entry.js +1 -1
- package/dist/esm/atomic-ipx-refine-toggle.entry.js +1 -1
- package/dist/esm/atomic-ipx-result-link.entry.js +1 -1
- package/dist/esm/atomic-ipx-tabs.entry.js +1 -1
- package/dist/esm/atomic-load-more-results.entry.js +1 -1
- package/dist/esm/atomic-no-results.entry.js +1 -1
- package/dist/esm/atomic-numeric-facet.entry.js +2 -1
- package/dist/esm/atomic-numeric-facet.entry.js.map +1 -1
- package/dist/esm/atomic-query-error.entry.js +1 -1
- package/dist/esm/atomic-quickview-modal.entry.js +1 -1
- package/dist/esm/atomic-quickview.entry.js +1 -1
- package/dist/esm/atomic-recs-error.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +2 -2
- package/dist/esm/atomic-recs-list.entry.js +1 -1
- package/dist/esm/atomic-refine-modal.entry.js +1 -1
- package/dist/esm/atomic-refine-toggle.entry.js +1 -1
- package/dist/esm/atomic-relevance-inspector.entry.js +2 -2
- package/dist/esm/atomic-result-children.entry.js +1 -1
- package/dist/esm/atomic-result-fields-list.entry.js +1 -1
- package/dist/esm/atomic-result-link.entry.js +1 -1
- package/dist/esm/atomic-result-list.entry.js +1 -1
- package/dist/esm/atomic-result-placeholder_8.entry.js +3 -3
- package/dist/esm/atomic-search-box-instant-results.entry.js +1 -1
- package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +2 -2
- package/dist/esm/atomic-search-box.entry.js +3 -3
- package/dist/esm/atomic-smart-snippet-answer_2.entry.js +2 -2
- package/dist/esm/atomic-smart-snippet-collapse-wrapper_2.entry.js +3 -3
- package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
- package/dist/esm/atomic-sort-dropdown.entry.js +2 -2
- package/dist/esm/atomic-sort-expression.entry.js +1 -1
- package/dist/esm/atomic-stencil-facet-date-input.entry.js +3 -3
- package/dist/esm/atomic-suggestion-renderer.entry.js +1 -1
- package/dist/esm/atomic-tab-bar_2.entry.js +1 -1
- package/dist/esm/atomic-tab-button.entry.js +1 -1
- package/dist/esm/atomic-tab-manager.entry.js +1 -1
- package/dist/esm/atomic.js +1 -1
- package/dist/esm/index-3f35faca.js +4 -12
- package/dist/esm/version.js +1 -1
- package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +1 -1
- package/dist/types/components/commerce/atomic-commerce-pager/atomic-commerce-pager.d.ts +5 -3
- package/dist/types/components/search/atomic-pager/atomic-pager.d.ts +28 -16
- package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +46 -44
- package/dist/types/components/search/atomic-search-interface/interfaces.d.ts +2 -1
- package/dist/types/components/search/atomic-search-layout/atomic-search-layout.d.ts +3 -1
- package/dist/types/components/search/index.d.ts +2 -0
- package/dist/types/components.d.ts +2 -230
- package/docs/atomic-docs.json +85 -814
- package/package.json +2 -2
- package/dist/atomic/components/atomic-pager.d.ts +0 -11
- package/dist/atomic/components/atomic-pager.js +0 -134
- package/dist/atomic/components/atomic-pager.js.map +0 -1
- package/dist/atomic/components/atomic-relevance-inspector2.js +0 -50
- package/dist/atomic/components/atomic-relevance-inspector2.js.map +0 -1
- package/dist/atomic/components/atomic-search-interface.d.ts +0 -11
- package/dist/atomic/components/atomic-search-interface.js +0 -552
- package/dist/atomic/components/atomic-search-interface.js.map +0 -1
- package/dist/atomic/components/stencil-pager-navigation.js +0 -42
- package/dist/atomic/components/stencil-pager-navigation.js.map +0 -1
- package/dist/atomic/p-1992b245.entry.js +0 -2
- package/dist/atomic/p-211d7d6a.js +0 -2
- package/dist/atomic/p-211d7d6a.js.map +0 -1
- package/dist/atomic/p-79bc66b9.entry.js +0 -2
- package/dist/atomic/p-79bc66b9.entry.js.map +0 -1
- package/dist/atomic/p-d24d34a7.entry.js +0 -2
- package/dist/atomic/p-e2afb475.entry.js +0 -2
- package/dist/atomic/p-fa8b7c4c.entry.js +0 -2
- package/dist/atomic/p-fa8b7c4c.entry.js.map +0 -1
- package/dist/atomic/p-fcf3f7d7.entry.js +0 -2
- package/dist/atomic/p-fcf3f7d7.entry.js.map +0 -1
- package/dist/cjs/analytics-config-64ae1273.js.map +0 -1
- package/dist/cjs/atomic-pager.cjs.entry.js +0 -121
- package/dist/cjs/atomic-pager.cjs.entry.js.map +0 -1
- package/dist/cjs/atomic-search-interface.cjs.entry.js +0 -511
- package/dist/cjs/atomic-search-interface.cjs.entry.js.map +0 -1
- package/dist/cjs/stencil-pager-navigation-c20b8a95.js +0 -48
- package/dist/cjs/stencil-pager-navigation-c20b8a95.js.map +0 -1
- package/dist/esm/analytics-config-94a94d25.js.map +0 -1
- package/dist/esm/atomic-pager.entry.js +0 -117
- package/dist/esm/atomic-pager.entry.js.map +0 -1
- package/dist/esm/atomic-search-interface.entry.js +0 -507
- package/dist/esm/atomic-search-interface.entry.js.map +0 -1
- package/dist/esm/stencil-pager-navigation-7261a834.js +0 -42
- package/dist/esm/stencil-pager-navigation-7261a834.js.map +0 -1
- /package/dist/atomic/{p-6329ff94.entry.js.map → p-004adbb8.entry.js.map} +0 -0
- /package/dist/atomic/{p-d0f47b33.entry.js.map → p-00a6ab8c.entry.js.map} +0 -0
- /package/dist/atomic/{p-3b20b011.entry.js.map → p-0610b3e7.entry.js.map} +0 -0
- /package/dist/atomic/{p-ee6771f1.entry.js.map → p-07b6424c.entry.js.map} +0 -0
- /package/dist/atomic/{p-7e2109e9.entry.js.map → p-09ce78e0.entry.js.map} +0 -0
- /package/dist/atomic/{p-93e29b24.entry.js.map → p-09d99fc7.entry.js.map} +0 -0
- /package/dist/atomic/{p-f5b58a15.entry.js.map → p-0b3f6994.entry.js.map} +0 -0
- /package/dist/atomic/{p-83c9244a.entry.js.map → p-0e27d4f2.entry.js.map} +0 -0
- /package/dist/atomic/{p-c126ee6b.entry.js.map → p-0e5dc57f.entry.js.map} +0 -0
- /package/dist/atomic/{p-1992b245.entry.js.map → p-0edea6f9.entry.js.map} +0 -0
- /package/dist/atomic/{p-20341936.entry.js.map → p-10b5e0f3.entry.js.map} +0 -0
- /package/dist/atomic/{p-2ca352f4.entry.js.map → p-15406648.entry.js.map} +0 -0
- /package/dist/atomic/{p-a3efa89e.entry.js.map → p-160553ce.entry.js.map} +0 -0
- /package/dist/atomic/{p-021f01d6.entry.js.map → p-18911f64.entry.js.map} +0 -0
- /package/dist/atomic/{p-d716d680.entry.js.map → p-2148764e.entry.js.map} +0 -0
- /package/dist/atomic/{p-3b023e83.entry.js.map → p-21bde6fe.entry.js.map} +0 -0
- /package/dist/atomic/{p-de066001.entry.js.map → p-2c792837.entry.js.map} +0 -0
- /package/dist/atomic/{p-26a51a77.entry.js.map → p-3213225f.entry.js.map} +0 -0
- /package/dist/atomic/{p-f289269f.entry.js.map → p-3cbab25b.entry.js.map} +0 -0
- /package/dist/atomic/{p-e23b3334.entry.js.map → p-441b1a7b.entry.js.map} +0 -0
- /package/dist/atomic/{p-09a3a067.entry.js.map → p-49a9cba9.entry.js.map} +0 -0
- /package/dist/atomic/{p-744da781.entry.js.map → p-4b8c0026.entry.js.map} +0 -0
- /package/dist/atomic/{p-89085429.entry.js.map → p-57af710b.entry.js.map} +0 -0
- /package/dist/atomic/{p-ae060711.entry.js.map → p-5a67b7c5.entry.js.map} +0 -0
- /package/dist/atomic/{p-92548ab6.entry.js.map → p-5fe54a66.entry.js.map} +0 -0
- /package/dist/atomic/{p-a8882a2a.entry.js.map → p-60800b2f.entry.js.map} +0 -0
- /package/dist/atomic/{p-c1999888.entry.js.map → p-754909fe.entry.js.map} +0 -0
- /package/dist/atomic/{p-36fab158.entry.js.map → p-7a6468a7.entry.js.map} +0 -0
- /package/dist/atomic/{p-3a2c900c.entry.js.map → p-7b1a3cab.entry.js.map} +0 -0
- /package/dist/atomic/{p-d93adf52.entry.js.map → p-7d63bf7b.entry.js.map} +0 -0
- /package/dist/atomic/{p-d364064c.entry.js.map → p-7f40e57d.entry.js.map} +0 -0
- /package/dist/atomic/{p-d785121d.entry.js.map → p-856e858c.entry.js.map} +0 -0
- /package/dist/atomic/{p-89ab44de.entry.js.map → p-8a352ff3.entry.js.map} +0 -0
- /package/dist/atomic/{p-e162805d.entry.js.map → p-8a7a23b7.entry.js.map} +0 -0
- /package/dist/atomic/{p-604c4085.entry.js.map → p-8df7270f.entry.js.map} +0 -0
- /package/dist/atomic/{p-8256cd44.entry.js.map → p-9147b0db.entry.js.map} +0 -0
- /package/dist/atomic/{p-37374964.entry.js.map → p-9727f36b.entry.js.map} +0 -0
- /package/dist/atomic/{p-d24d34a7.entry.js.map → p-97829295.entry.js.map} +0 -0
- /package/dist/atomic/{p-31aa052e.entry.js.map → p-97e42c43.entry.js.map} +0 -0
- /package/dist/atomic/{p-1ef658d8.entry.js.map → p-9d023f0b.entry.js.map} +0 -0
- /package/dist/atomic/{p-40635c2d.entry.js.map → p-9e771351.entry.js.map} +0 -0
- /package/dist/atomic/{p-035f8dc8.entry.js.map → p-a3fa6695.entry.js.map} +0 -0
- /package/dist/atomic/{p-d8245258.entry.js.map → p-a522e38c.entry.js.map} +0 -0
- /package/dist/atomic/{p-5f1fa581.entry.js.map → p-a5714bc4.entry.js.map} +0 -0
- /package/dist/atomic/{p-f0c2dfe8.entry.js.map → p-abb14108.entry.js.map} +0 -0
- /package/dist/atomic/{p-48f57fd8.entry.js.map → p-b0c50194.entry.js.map} +0 -0
- /package/dist/atomic/{p-b0b17e21.entry.js.map → p-b4c34553.entry.js.map} +0 -0
- /package/dist/atomic/{p-98c5b9b8.entry.js.map → p-b6377fb6.entry.js.map} +0 -0
- /package/dist/atomic/{p-ea446721.entry.js.map → p-bd32625e.entry.js.map} +0 -0
- /package/dist/atomic/{p-939eaaac.entry.js.map → p-bd99fcc1.entry.js.map} +0 -0
- /package/dist/atomic/{p-7dfcd6af.entry.js.map → p-be9e40d9.entry.js.map} +0 -0
- /package/dist/atomic/{p-a9b32844.entry.js.map → p-bf1dff76.entry.js.map} +0 -0
- /package/dist/atomic/{p-99b8d52d.entry.js.map → p-bf49fed3.entry.js.map} +0 -0
- /package/dist/atomic/{p-3f912e98.entry.js.map → p-c08f4ee6.entry.js.map} +0 -0
- /package/dist/atomic/{p-e2afb475.entry.js.map → p-c2b4b401.entry.js.map} +0 -0
- /package/dist/atomic/{p-49c38b27.entry.js.map → p-c33da203.entry.js.map} +0 -0
- /package/dist/atomic/{p-a53c7821.entry.js.map → p-c538c8ac.entry.js.map} +0 -0
- /package/dist/atomic/{p-43d708cb.entry.js.map → p-c9fe4f77.entry.js.map} +0 -0
- /package/dist/atomic/{p-1d1f54a5.entry.js.map → p-cf810f7a.entry.js.map} +0 -0
- /package/dist/atomic/{p-627e1265.entry.js.map → p-d50c96c2.entry.js.map} +0 -0
- /package/dist/atomic/{p-bc0d6d3d.entry.js.map → p-dee60597.entry.js.map} +0 -0
- /package/dist/atomic/{p-4c2f230f.entry.js.map → p-df4397ab.entry.js.map} +0 -0
- /package/dist/atomic/{p-b2ff1330.entry.js.map → p-e1c99e2e.entry.js.map} +0 -0
- /package/dist/atomic/{p-b6963bae.entry.js.map → p-e398835b.entry.js.map} +0 -0
- /package/dist/atomic/{p-6e6d686e.entry.js.map → p-e3af1bb4.entry.js.map} +0 -0
- /package/dist/atomic/{p-089be992.entry.js.map → p-e6684bd4.entry.js.map} +0 -0
- /package/dist/atomic/{p-0879d77a.entry.js.map → p-eda7de4c.entry.js.map} +0 -0
- /package/dist/atomic/{p-594488f2.entry.js.map → p-f0012580.entry.js.map} +0 -0
- /package/dist/atomic/{p-2ce8220a.entry.js.map → p-f05f114f.entry.js.map} +0 -0
- /package/dist/atomic/{p-fea7bf3b.entry.js.map → p-f936f55e.entry.js.map} +0 -0
- /package/dist/atomic/{p-fbfe913d.entry.js.map → p-fb1a1e2e.entry.js.map} +0 -0
package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js
ADDED
@@ -0,0 +1,496 @@
|
|
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 { buildSearchEngine, buildSearchStatus, buildUrlManager, EcommerceDefaultFieldsToInclude, VERSION as HEADLESS_VERSION, loadFieldActions, loadQueryActions, loadSearchConfigurationActions, } from '@coveo/headless';
|
8
|
+
import { provide } from '@lit/context';
|
9
|
+
import i18next from 'i18next';
|
10
|
+
import { css, html, LitElement } from 'lit';
|
11
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
12
|
+
import { when } from 'lit/directives/when.js';
|
13
|
+
import { InterfaceController, } from "../../common/interface/interface-controller";
|
14
|
+
import { MobileBreakpointController } from "../../common/layout/mobile-breakpoint-controller";
|
15
|
+
import { bindingsContext } from "../../context/bindings-context";
|
16
|
+
import { errorSelector, firstSearchExecutedSelector, noResultsSelector, } from "../atomic-search-layout/search-layout";
|
17
|
+
import { booleanConverter } from "../../../converters/boolean-converter";
|
18
|
+
import { errorGuard } from "../../../decorators/error-guard";
|
19
|
+
import { watch } from "../../../decorators/watch";
|
20
|
+
import { withTailwindStyles } from "../../../decorators/with-tailwind-styles.js";
|
21
|
+
import { ChildrenUpdateCompleteMixin } from "../../../mixins/children-update-complete-mixin";
|
22
|
+
import { markParentAsReady } from "../../../utils/init-queue";
|
23
|
+
import { SafeStorage, StorageItems, } from "../../../utils/local-storage-utils";
|
24
|
+
import { getAnalyticsConfig } from './analytics-config';
|
25
|
+
import { createSearchStore } from './store';
|
26
|
+
// TODO - Remove once all components that use atomic-modal have been migrated.
|
27
|
+
import "../../common/atomic-modal/atomic-modal";
|
28
|
+
const FirstSearchExecutedFlag = 'firstSearchExecuted';
|
29
|
+
/**
|
30
|
+
* The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
|
31
|
+
*
|
32
|
+
* @slot default - The default slot where you can add child components to the interface.
|
33
|
+
*/
|
34
|
+
let AtomicSearchInterface = class AtomicSearchInterface extends ChildrenUpdateCompleteMixin(LitElement) {
|
35
|
+
constructor() {
|
36
|
+
super();
|
37
|
+
this.bindings = {};
|
38
|
+
this.relevanceInspectorIsOpen = false;
|
39
|
+
this.unsubscribeUrlManager = () => { };
|
40
|
+
this.unsubscribeSearchStatus = () => { };
|
41
|
+
this.initialized = false;
|
42
|
+
this.interfaceController = new InterfaceController(this, 'CoveoAtomic', HEADLESS_VERSION);
|
43
|
+
/**
|
44
|
+
* A list of non-default fields to include in the query results.
|
45
|
+
*
|
46
|
+
* Specify the property as an array using a JSON string representation:
|
47
|
+
* ```html
|
48
|
+
* <atomic-search-interface fields-to-include='["fieldA", "fieldB"]'></atomic-search-interface>
|
49
|
+
* ```
|
50
|
+
*/
|
51
|
+
this.fieldsToInclude = [];
|
52
|
+
// TODO - KIT-4994: Add disableAnalytics property that defaults to false.
|
53
|
+
// TODO - KIT-4994: Deprecate in favor of disableAnalytics property.
|
54
|
+
// TODO - (v4) KIT-4990: Remove.
|
55
|
+
/**
|
56
|
+
* Whether analytics should be enabled.
|
57
|
+
*/
|
58
|
+
this.analytics = true;
|
59
|
+
/**
|
60
|
+
* The search interface language.
|
61
|
+
*/
|
62
|
+
this.language = 'en';
|
63
|
+
// TODO - (v4) KIT-4823: Remove.
|
64
|
+
/**
|
65
|
+
* Whether the state should be reflected in the URL parameters.
|
66
|
+
* @deprecated - replaced by `disable-state-reflection-in-url` (this defaults to `true`, while the replacement defaults to `false`).
|
67
|
+
*/
|
68
|
+
this.reflectStateInUrl = true;
|
69
|
+
/**
|
70
|
+
* Whether to disable state reflection in the URL parameters.
|
71
|
+
*/
|
72
|
+
this.disableStateReflectionInUrl = false;
|
73
|
+
/**
|
74
|
+
* The CSS selector for the container where the interface will scroll back to.
|
75
|
+
*/
|
76
|
+
this.scrollContainer = 'atomic-search-interface';
|
77
|
+
/**
|
78
|
+
* The language assets path. By default, this will be a relative URL pointing to `./lang`.
|
79
|
+
*
|
80
|
+
* Example: "/mypublicpath/languages"
|
81
|
+
*
|
82
|
+
*/
|
83
|
+
this.languageAssetsPath = './lang';
|
84
|
+
/**
|
85
|
+
* The icon assets path. By default, this will be a relative URL pointing to `./assets`.
|
86
|
+
*
|
87
|
+
* Example: "/mypublicpath/icons"
|
88
|
+
*
|
89
|
+
*/
|
90
|
+
this.iconAssetsPath = './assets';
|
91
|
+
// TODO - (v4) KIT-5004: Remove.
|
92
|
+
/**
|
93
|
+
* Whether the relevance inspector shortcut should be enabled for this interface.
|
94
|
+
*
|
95
|
+
* The relevance inspector can be opened by holding the Alt key (Option on Mac) while over the interface, and performing a double click.
|
96
|
+
*
|
97
|
+
* The relevance inspector allows to troubleshoot and debug queries.
|
98
|
+
* @deprecated - replaced by `disable-relevance-inspector` (this defaults to `true`, while the replacement defaults to `false`).
|
99
|
+
*/
|
100
|
+
this.enableRelevanceInspector = true;
|
101
|
+
/**
|
102
|
+
* Whether to disable the relevance inspector shortcut for this interface.
|
103
|
+
*/
|
104
|
+
this.disableRelevanceInspector = false;
|
105
|
+
this.handleInitialization = (event) => {
|
106
|
+
this.interfaceController.onComponentInitializing(event);
|
107
|
+
};
|
108
|
+
this.handleRelevanceInspectorDoubleClick = (e) => {
|
109
|
+
if (e.altKey) {
|
110
|
+
this.relevanceInspectorIsOpen = !this.relevanceInspectorIsOpen;
|
111
|
+
}
|
112
|
+
};
|
113
|
+
this.onHashChange = () => {
|
114
|
+
this.urlManager.synchronize(this.fragment);
|
115
|
+
};
|
116
|
+
this.store = createSearchStore();
|
117
|
+
new MobileBreakpointController(this, this.store);
|
118
|
+
const { promise, resolve } = Promise.withResolvers();
|
119
|
+
this.i18Initialized = promise;
|
120
|
+
this.i18n = i18next.createInstance(undefined, resolve);
|
121
|
+
}
|
122
|
+
connectedCallback() {
|
123
|
+
super.connectedCallback();
|
124
|
+
this.store.setLoadingFlag(FirstSearchExecutedFlag);
|
125
|
+
this.initRelevanceInspector();
|
126
|
+
this.addEventListener('atomic/initializeComponent', this.handleInitialization);
|
127
|
+
this.addEventListener('atomic/scrollToTop', this.scrollToTop);
|
128
|
+
this.addEventListener('atomic/relevanceInspector/close', this.closeRelevanceInspector);
|
129
|
+
}
|
130
|
+
willUpdate(changedProperties) {
|
131
|
+
super.willUpdate(changedProperties);
|
132
|
+
if (changedProperties.has('fieldsToInclude')) {
|
133
|
+
this.initFieldsToInclude();
|
134
|
+
}
|
135
|
+
}
|
136
|
+
disconnectedCallback() {
|
137
|
+
super.disconnectedCallback();
|
138
|
+
if (typeof this.unsubscribeUrlManager === 'function') {
|
139
|
+
this.unsubscribeUrlManager();
|
140
|
+
}
|
141
|
+
if (typeof this.unsubscribeSearchStatus === 'function') {
|
142
|
+
this.unsubscribeSearchStatus();
|
143
|
+
}
|
144
|
+
window.removeEventListener('hashchange', this.onHashChange);
|
145
|
+
this.removeEventListener('atomic/initializeComponent', this.handleInitialization);
|
146
|
+
this.removeEventListener('atomic/scrollToTop', this.scrollToTop);
|
147
|
+
this.removeEventListener('atomic/relevanceInspector/close', this.closeRelevanceInspector);
|
148
|
+
this.removeEventListener('dblclick', this.handleRelevanceInspectorDoubleClick);
|
149
|
+
}
|
150
|
+
// TODO - (v4) KIT-4991: Make private.
|
151
|
+
scrollToTop() {
|
152
|
+
const scrollContainerElement = document.querySelector(this.scrollContainer);
|
153
|
+
if (!scrollContainerElement) {
|
154
|
+
this.bindings.engine.logger.warn(`Could not find the scroll container with the selector "${this.scrollContainer}". This will prevent UX interactions that require a scroll from working correctly. Please review the CSS selector in the scrollContainer option`);
|
155
|
+
return;
|
156
|
+
}
|
157
|
+
scrollContainerElement.scrollIntoView({ behavior: 'smooth' });
|
158
|
+
}
|
159
|
+
closeRelevanceInspector() {
|
160
|
+
this.relevanceInspectorIsOpen = false;
|
161
|
+
}
|
162
|
+
/**
|
163
|
+
* Initializes the connection with the headless search engine using options for `accessToken` (required), `organizationId` (required), `environment` (defaults to `prod`), and `renewAccessToken`.
|
164
|
+
*/
|
165
|
+
initialize(options) {
|
166
|
+
return this.internalInitialization(() => this.initEngine(options));
|
167
|
+
}
|
168
|
+
/**
|
169
|
+
* Initializes the interface using the provided [headless search engine](https://docs.coveo.com/en/headless/latest/reference/modules/Search.html, as opposed to the `initialize` method which internally builds a search engine instance.
|
170
|
+
* This bypasses the properties set on the component, such as analytics, searchHub, pipeline, language, timezone & logLevel.
|
171
|
+
*/
|
172
|
+
initializeWithSearchEngine(engine) {
|
173
|
+
if (this.pipeline && this.pipeline !== engine.state.pipeline) {
|
174
|
+
console.warn('Mismatch between search interface pipeline and engine pipeline. The engine pipeline will be used.');
|
175
|
+
}
|
176
|
+
if (this.searchHub && this.searchHub !== engine.state.searchHub) {
|
177
|
+
console.warn('Mismatch between search interface search hub and engine search hub. The engine search hub will be used.');
|
178
|
+
}
|
179
|
+
return this.internalInitialization(() => {
|
180
|
+
this.engine = engine;
|
181
|
+
});
|
182
|
+
}
|
183
|
+
/**
|
184
|
+
*
|
185
|
+
* Executes the first search and logs the interface load event to analytics, after initializing connection to the headless search engine.
|
186
|
+
*/
|
187
|
+
async executeFirstSearch() {
|
188
|
+
if (!this.interfaceController.engineIsCreated(this.engine)) {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
if (!this.initialized) {
|
192
|
+
console.error('You have to wait until the "initialize" promise is fulfilled before executing a search.', this);
|
193
|
+
return;
|
194
|
+
}
|
195
|
+
const safeStorage = new SafeStorage();
|
196
|
+
const standaloneSearchBoxData = safeStorage.getParsedJSON(StorageItems.STANDALONE_SEARCH_BOX_DATA, null);
|
197
|
+
if (!standaloneSearchBoxData) {
|
198
|
+
this.engine.executeFirstSearch();
|
199
|
+
return;
|
200
|
+
}
|
201
|
+
safeStorage.removeItem(StorageItems.STANDALONE_SEARCH_BOX_DATA);
|
202
|
+
const { updateQuery } = loadQueryActions(this.engine);
|
203
|
+
const { value, enableQuerySyntax, analytics } = standaloneSearchBoxData;
|
204
|
+
this.engine.dispatch(updateQuery({ q: value, enableQuerySyntax }));
|
205
|
+
this.engine.executeFirstSearchAfterStandaloneSearchBoxRedirect(analytics);
|
206
|
+
}
|
207
|
+
updateSearchConfiguration(updatedProp, newValue) {
|
208
|
+
if (!this.interfaceController.engineIsCreated(this.engine)) {
|
209
|
+
return;
|
210
|
+
}
|
211
|
+
if (this.engine.state[updatedProp] === newValue) {
|
212
|
+
return;
|
213
|
+
}
|
214
|
+
const { updateSearchConfiguration } = loadSearchConfigurationActions(this.engine);
|
215
|
+
this.engine.dispatch(updateSearchConfiguration({
|
216
|
+
[updatedProp]: newValue,
|
217
|
+
}));
|
218
|
+
}
|
219
|
+
updateSearchHub() {
|
220
|
+
this.updateSearchConfiguration('searchHub', this.searchHub ?? 'default');
|
221
|
+
}
|
222
|
+
updatePipeline() {
|
223
|
+
this.updateSearchConfiguration('pipeline', this.pipeline);
|
224
|
+
}
|
225
|
+
toggleAnalytics() {
|
226
|
+
this.interfaceController.onAnalyticsChange();
|
227
|
+
}
|
228
|
+
updateLanguage() {
|
229
|
+
if (!this.interfaceController.engineIsCreated(this.engine) ||
|
230
|
+
!this.language) {
|
231
|
+
return;
|
232
|
+
}
|
233
|
+
const { updateSearchConfiguration } = loadSearchConfigurationActions(this.engine);
|
234
|
+
this.engine.dispatch(updateSearchConfiguration({
|
235
|
+
locale: this.language,
|
236
|
+
}));
|
237
|
+
return this.interfaceController.onLanguageChange();
|
238
|
+
}
|
239
|
+
updateIconAssetsPath() {
|
240
|
+
this.store.state.iconAssetsPath = this.iconAssetsPath;
|
241
|
+
}
|
242
|
+
getBindings() {
|
243
|
+
return {
|
244
|
+
engine: this.engine,
|
245
|
+
i18n: this.i18n,
|
246
|
+
store: this.store,
|
247
|
+
interfaceElement: this,
|
248
|
+
createStyleElement: () => {
|
249
|
+
const styleTag = document.createElement('style');
|
250
|
+
return styleTag;
|
251
|
+
},
|
252
|
+
// TODO - KIT-4893: Remove once atomic-quickview-modal migration is complete.
|
253
|
+
createScriptElement: () => {
|
254
|
+
const scriptTag = document.createElement('script');
|
255
|
+
return scriptTag;
|
256
|
+
},
|
257
|
+
};
|
258
|
+
}
|
259
|
+
initFieldsToInclude() {
|
260
|
+
const fields = EcommerceDefaultFieldsToInclude.concat(this.fieldsToInclude);
|
261
|
+
this.store.addFieldsToInclude(fields);
|
262
|
+
}
|
263
|
+
registerFieldsToInclude() {
|
264
|
+
this.engine?.dispatch(loadFieldActions(this.engine).registerFieldsToInclude(this.store.state.fieldsToInclude));
|
265
|
+
}
|
266
|
+
initEngine(options) {
|
267
|
+
const searchConfig = this.getSearchConfiguration(options);
|
268
|
+
const analyticsConfig = getAnalyticsConfig(options, this.analytics, this.store);
|
269
|
+
try {
|
270
|
+
this.engine = buildSearchEngine({
|
271
|
+
configuration: {
|
272
|
+
...options,
|
273
|
+
search: searchConfig,
|
274
|
+
analytics: analyticsConfig,
|
275
|
+
},
|
276
|
+
loggerOptions: {
|
277
|
+
level: this.logLevel,
|
278
|
+
},
|
279
|
+
});
|
280
|
+
}
|
281
|
+
catch (error) {
|
282
|
+
this.error = error;
|
283
|
+
throw error;
|
284
|
+
}
|
285
|
+
}
|
286
|
+
getSearchConfiguration(options) {
|
287
|
+
const searchConfigFromProps = {
|
288
|
+
searchHub: this.searchHub ?? 'default',
|
289
|
+
pipeline: this.pipeline,
|
290
|
+
locale: this.language,
|
291
|
+
timezone: this.timezone,
|
292
|
+
};
|
293
|
+
if (options.search) {
|
294
|
+
return {
|
295
|
+
...searchConfigFromProps,
|
296
|
+
...options.search,
|
297
|
+
};
|
298
|
+
}
|
299
|
+
return searchConfigFromProps;
|
300
|
+
}
|
301
|
+
get fragment() {
|
302
|
+
return window.location.hash.slice(1);
|
303
|
+
}
|
304
|
+
initUrlManager() {
|
305
|
+
if (this.disableStateReflectionInUrl) {
|
306
|
+
return;
|
307
|
+
}
|
308
|
+
if (!this.reflectStateInUrl) {
|
309
|
+
return;
|
310
|
+
}
|
311
|
+
this.urlManager = buildUrlManager(this.engine, {
|
312
|
+
initialState: { fragment: this.fragment },
|
313
|
+
});
|
314
|
+
this.unsubscribeUrlManager = this.urlManager.subscribe(() => this.updateHash());
|
315
|
+
window.addEventListener('hashchange', this.onHashChange);
|
316
|
+
}
|
317
|
+
initRelevanceInspector() {
|
318
|
+
if (this.enableRelevanceInspector && !this.disableRelevanceInspector) {
|
319
|
+
this.addEventListener('dblclick', this.handleRelevanceInspectorDoubleClick);
|
320
|
+
}
|
321
|
+
}
|
322
|
+
initSearchStatus() {
|
323
|
+
this.searchStatus = buildSearchStatus(this.engine);
|
324
|
+
this.unsubscribeSearchStatus = this.searchStatus.subscribe(() => {
|
325
|
+
const hasNoResultsAfterInitialSearch = !this.searchStatus.state.hasResults &&
|
326
|
+
this.searchStatus.state.firstSearchExecuted &&
|
327
|
+
!this.searchStatus.state.hasError;
|
328
|
+
this.classList.toggle(noResultsSelector, hasNoResultsAfterInitialSearch);
|
329
|
+
this.classList.toggle(errorSelector, this.searchStatus.state.hasError);
|
330
|
+
this.classList.toggle(firstSearchExecutedSelector, this.searchStatus.state.firstSearchExecuted);
|
331
|
+
if (this.searchStatus.state.firstSearchExecuted &&
|
332
|
+
this.store.hasLoadingFlag(FirstSearchExecutedFlag)) {
|
333
|
+
this.store.unsetLoadingFlag(FirstSearchExecutedFlag);
|
334
|
+
}
|
335
|
+
});
|
336
|
+
}
|
337
|
+
updateHash() {
|
338
|
+
const newFragment = this.urlManager.state.fragment;
|
339
|
+
if (!this.searchStatus.state.firstSearchExecuted) {
|
340
|
+
history.replaceState(null, document.title, `#${newFragment}`);
|
341
|
+
this.bindings.engine.logger.info(`History replaceState #${newFragment}`);
|
342
|
+
return;
|
343
|
+
}
|
344
|
+
history.pushState(null, document.title, `#${newFragment}`);
|
345
|
+
this.bindings.engine.logger.info(`History pushState #${newFragment}`);
|
346
|
+
}
|
347
|
+
async internalInitialization(initEngine) {
|
348
|
+
await Promise.all([
|
349
|
+
this.interfaceController.onInitialization(initEngine),
|
350
|
+
this.i18Initialized,
|
351
|
+
]);
|
352
|
+
this.updateLanguage();
|
353
|
+
this.bindings = this.getBindings();
|
354
|
+
markParentAsReady(this);
|
355
|
+
this.pipeline = this.engine.state.pipeline;
|
356
|
+
this.searchHub = this.engine.state.searchHub;
|
357
|
+
this.initSearchStatus();
|
358
|
+
await this.getUpdateComplete();
|
359
|
+
this.initUrlManager();
|
360
|
+
this.initialized = true;
|
361
|
+
}
|
362
|
+
render() {
|
363
|
+
return html `
|
364
|
+
${when(this.bindings?.engine &&
|
365
|
+
this.enableRelevanceInspector &&
|
366
|
+
!this.disableRelevanceInspector, () => html `<atomic-relevance-inspector
|
367
|
+
?open=${this.relevanceInspectorIsOpen}
|
368
|
+
.bindings=${this.bindings}
|
369
|
+
></atomic-relevance-inspector>`)}
|
370
|
+
<slot></slot>
|
371
|
+
`;
|
372
|
+
}
|
373
|
+
};
|
374
|
+
AtomicSearchInterface.styles = [
|
375
|
+
css`:host{height:inherit;width:inherit;&>slot{height:inherit}}`,
|
376
|
+
];
|
377
|
+
__decorate([
|
378
|
+
state(),
|
379
|
+
provide({ context: bindingsContext })
|
380
|
+
], AtomicSearchInterface.prototype, "bindings", void 0);
|
381
|
+
__decorate([
|
382
|
+
state()
|
383
|
+
], AtomicSearchInterface.prototype, "error", void 0);
|
384
|
+
__decorate([
|
385
|
+
state()
|
386
|
+
], AtomicSearchInterface.prototype, "relevanceInspectorIsOpen", void 0);
|
387
|
+
__decorate([
|
388
|
+
property({
|
389
|
+
type: Array,
|
390
|
+
attribute: 'fields-to-include',
|
391
|
+
converter: {
|
392
|
+
fromAttribute: (value) => {
|
393
|
+
if (!value)
|
394
|
+
return [];
|
395
|
+
try {
|
396
|
+
const parsed = JSON.parse(value);
|
397
|
+
return Array.isArray(parsed) ? parsed : [];
|
398
|
+
}
|
399
|
+
catch {
|
400
|
+
return [];
|
401
|
+
}
|
402
|
+
},
|
403
|
+
toAttribute: (value) => JSON.stringify(value),
|
404
|
+
},
|
405
|
+
})
|
406
|
+
], AtomicSearchInterface.prototype, "fieldsToInclude", void 0);
|
407
|
+
__decorate([
|
408
|
+
property({ type: String, reflect: true })
|
409
|
+
], AtomicSearchInterface.prototype, "pipeline", void 0);
|
410
|
+
__decorate([
|
411
|
+
property({ type: String, attribute: 'search-hub', reflect: true })
|
412
|
+
], AtomicSearchInterface.prototype, "searchHub", void 0);
|
413
|
+
__decorate([
|
414
|
+
property({
|
415
|
+
type: Boolean,
|
416
|
+
converter: booleanConverter,
|
417
|
+
reflect: true,
|
418
|
+
})
|
419
|
+
], AtomicSearchInterface.prototype, "analytics", void 0);
|
420
|
+
__decorate([
|
421
|
+
property({ type: String, reflect: true })
|
422
|
+
], AtomicSearchInterface.prototype, "timezone", void 0);
|
423
|
+
__decorate([
|
424
|
+
property({ type: String, attribute: 'log-level', reflect: true })
|
425
|
+
], AtomicSearchInterface.prototype, "logLevel", void 0);
|
426
|
+
__decorate([
|
427
|
+
property({ type: Object, attribute: false })
|
428
|
+
], AtomicSearchInterface.prototype, "i18n", void 0);
|
429
|
+
__decorate([
|
430
|
+
property({ type: String, reflect: true })
|
431
|
+
], AtomicSearchInterface.prototype, "language", void 0);
|
432
|
+
__decorate([
|
433
|
+
property({ type: Object, attribute: false })
|
434
|
+
], AtomicSearchInterface.prototype, "engine", void 0);
|
435
|
+
__decorate([
|
436
|
+
property({
|
437
|
+
type: Boolean,
|
438
|
+
attribute: 'reflect-state-in-url',
|
439
|
+
reflect: true,
|
440
|
+
converter: booleanConverter,
|
441
|
+
})
|
442
|
+
], AtomicSearchInterface.prototype, "reflectStateInUrl", void 0);
|
443
|
+
__decorate([
|
444
|
+
property({
|
445
|
+
type: Boolean,
|
446
|
+
attribute: 'disable-state-reflection-in-url',
|
447
|
+
reflect: true,
|
448
|
+
})
|
449
|
+
], AtomicSearchInterface.prototype, "disableStateReflectionInUrl", void 0);
|
450
|
+
__decorate([
|
451
|
+
property({ type: String, attribute: 'scroll-container', reflect: true })
|
452
|
+
], AtomicSearchInterface.prototype, "scrollContainer", void 0);
|
453
|
+
__decorate([
|
454
|
+
property({ type: String, attribute: 'language-assets-path', reflect: true })
|
455
|
+
], AtomicSearchInterface.prototype, "languageAssetsPath", void 0);
|
456
|
+
__decorate([
|
457
|
+
property({ type: String, attribute: 'icon-assets-path', reflect: true })
|
458
|
+
], AtomicSearchInterface.prototype, "iconAssetsPath", void 0);
|
459
|
+
__decorate([
|
460
|
+
property({
|
461
|
+
type: Boolean,
|
462
|
+
attribute: 'enable-relevance-inspector',
|
463
|
+
reflect: true,
|
464
|
+
converter: booleanConverter,
|
465
|
+
})
|
466
|
+
], AtomicSearchInterface.prototype, "enableRelevanceInspector", void 0);
|
467
|
+
__decorate([
|
468
|
+
property({
|
469
|
+
type: Boolean,
|
470
|
+
attribute: 'disable-relevance-inspector',
|
471
|
+
reflect: true,
|
472
|
+
})
|
473
|
+
], AtomicSearchInterface.prototype, "disableRelevanceInspector", void 0);
|
474
|
+
__decorate([
|
475
|
+
watch('searchHub')
|
476
|
+
], AtomicSearchInterface.prototype, "updateSearchHub", null);
|
477
|
+
__decorate([
|
478
|
+
watch('pipeline')
|
479
|
+
], AtomicSearchInterface.prototype, "updatePipeline", null);
|
480
|
+
__decorate([
|
481
|
+
watch('analytics')
|
482
|
+
], AtomicSearchInterface.prototype, "toggleAnalytics", null);
|
483
|
+
__decorate([
|
484
|
+
watch('language')
|
485
|
+
], AtomicSearchInterface.prototype, "updateLanguage", null);
|
486
|
+
__decorate([
|
487
|
+
watch('iconAssetsPath')
|
488
|
+
], AtomicSearchInterface.prototype, "updateIconAssetsPath", null);
|
489
|
+
__decorate([
|
490
|
+
errorGuard()
|
491
|
+
], AtomicSearchInterface.prototype, "render", null);
|
492
|
+
AtomicSearchInterface = __decorate([
|
493
|
+
customElement('atomic-search-interface'),
|
494
|
+
withTailwindStyles
|
495
|
+
], AtomicSearchInterface);
|
496
|
+
export { AtomicSearchInterface };
|
package/dist/atomic/components/components/search/atomic-search-layout/atomic-search-layout.js
CHANGED
@@ -4,12 +4,13 @@ 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
|
-
import { LitElement
|
7
|
+
import { LitElement } from 'lit';
|
8
8
|
import { customElement, property, state } from 'lit/decorators.js';
|
9
|
+
import { LayoutStylesController } from "../../common/layout/layout-styles-controller";
|
10
|
+
import { watch } from "../../../decorators/watch";
|
9
11
|
import { ChildrenUpdateCompleteMixin } from "../../../mixins/children-update-complete-mixin";
|
10
12
|
import { LightDomMixin } from "../../../mixins/light-dom";
|
11
|
-
import {
|
12
|
-
import { DEFAULT_MOBILE_BREAKPOINT } from '../../../utils/replace-breakpoint-utils';
|
13
|
+
import { DEFAULT_MOBILE_BREAKPOINT } from "../../../utils/replace-breakpoint-utils";
|
13
14
|
import styles from './atomic-search-layout.tw.css';
|
14
15
|
import { buildSearchLayout } from './search-layout';
|
15
16
|
/**
|
@@ -27,15 +28,22 @@ let AtomicSearchLayout = class AtomicSearchLayout extends LightDomMixin(Children
|
|
27
28
|
* E.g., 800px, 65rem.
|
28
29
|
*/
|
29
30
|
this.mobileBreakpoint = DEFAULT_MOBILE_BREAKPOINT;
|
30
|
-
|
31
|
-
async addStyles() {
|
32
|
-
await this.getUpdateComplete();
|
33
|
-
this.injectStyles(unsafeCSS(buildSearchLayout(this, this.mobileBreakpoint)));
|
31
|
+
this.layoutStylesController = new LayoutStylesController(this, buildSearchLayout, 'atomic-search-layout-');
|
34
32
|
}
|
35
33
|
connectedCallback() {
|
36
34
|
super.connectedCallback();
|
37
|
-
this.
|
38
|
-
|
35
|
+
this.emitBreakpointChangeEvent();
|
36
|
+
}
|
37
|
+
emitBreakpointChangeEvent() {
|
38
|
+
this.dispatchEvent(new CustomEvent('atomic-layout-breakpoint-change', {
|
39
|
+
detail: { breakpoint: this.mobileBreakpoint },
|
40
|
+
bubbles: true,
|
41
|
+
composed: true,
|
42
|
+
}));
|
43
|
+
}
|
44
|
+
onMobileBreakpointChange() {
|
45
|
+
this.layoutStylesController.updateStyles();
|
46
|
+
this.emitBreakpointChangeEvent();
|
39
47
|
}
|
40
48
|
};
|
41
49
|
AtomicSearchLayout.styles = [styles];
|
@@ -45,6 +53,9 @@ __decorate([
|
|
45
53
|
__decorate([
|
46
54
|
property({ type: String, reflect: true, attribute: 'mobile-breakpoint' })
|
47
55
|
], AtomicSearchLayout.prototype, "mobileBreakpoint", void 0);
|
56
|
+
__decorate([
|
57
|
+
watch('mobileBreakpoint')
|
58
|
+
], AtomicSearchLayout.prototype, "onMobileBreakpointChange", null);
|
48
59
|
AtomicSearchLayout = __decorate([
|
49
60
|
customElement('atomic-search-layout')
|
50
61
|
], AtomicSearchLayout);
|
@@ -1,4 +1,6 @@
|
|
1
1
|
// Auto-generated file
|
2
|
+
export { AtomicPager } from './atomic-pager/atomic-pager.js';
|
2
3
|
export { AtomicQuerySummary } from './atomic-query-summary/atomic-query-summary.js';
|
3
4
|
export { AtomicResultsPerPage } from './atomic-results-per-page/atomic-results-per-page.js';
|
5
|
+
export { AtomicSearchInterface } from './atomic-search-interface/atomic-search-interface.js';
|
4
6
|
export { AtomicSearchLayout } from './atomic-search-layout/atomic-search-layout.js';
|
@@ -1,6 +1,8 @@
|
|
1
1
|
// Auto-generated file
|
2
2
|
export default {
|
3
|
+
'atomic-pager': async () => await import('./atomic-pager/atomic-pager.js'),
|
3
4
|
'atomic-query-summary': async () => await import('./atomic-query-summary/atomic-query-summary.js'),
|
4
5
|
'atomic-results-per-page': async () => await import('./atomic-results-per-page/atomic-results-per-page.js'),
|
6
|
+
'atomic-search-interface': async () => await import('./atomic-search-interface/atomic-search-interface.js'),
|
5
7
|
'atomic-search-layout': async () => await import('./atomic-search-layout/atomic-search-layout.js'),
|
6
8
|
};
|
@@ -42,11 +42,11 @@ const FacetNumberInput = /*@__PURE__*/ proxyCustomElement(class FacetNumberInput
|
|
42
42
|
const inputClasses = 'p-2.5 input-primary placeholder-neutral-dark min-w-0 mr-1';
|
43
43
|
const labelClasses = 'text-neutral-dark text-sm';
|
44
44
|
const step = this.type === 'integer' ? '1' : 'any';
|
45
|
-
return (h("form", { key: '
|
45
|
+
return (h("form", { key: '3afc8c27aad7fc2f3f280a8e5305dfdbc5291f74', class: "mt-4 gap-y-0.5 px-2", part: "input-form", onSubmit: (e) => {
|
46
46
|
e.preventDefault();
|
47
47
|
this.apply();
|
48
48
|
return false;
|
49
|
-
} }, h("label", { key: '
|
49
|
+
} }, h("label", { key: '9749444397b017e575f1cbc598ef8d4e440dc8b0', part: "label-start", class: labelClasses, htmlFor: `${this.filterState.facetId}_start` }, minText), h("input", { key: '94b1e3e64ec6ef14aff52ecf8e18c52bc987c7a7', part: "input-start", id: `${this.filterState.facetId}_start`, type: "number", step: step, ref: (ref) => (this.startRef = ref), class: inputClasses, "aria-label": minAria, required: true, min: Number.MIN_SAFE_INTEGER, max: this.end, value: this.filterState.range?.start, onInput: (e) => (this.start = e.target.valueAsNumber) }), h("label", { key: '89da4fb4747fb9d0cba5251dd3972677867301de', part: "label-end", class: labelClasses, htmlFor: `${this.filterState.facetId}_end` }, maxText), h("input", { key: '17813e5183986382376d765716ed60bff74de98c', part: "input-end", id: `${this.filterState.facetId}_end`, type: "number", step: step, ref: (ref) => (this.endRef = ref), class: inputClasses, "aria-label": maxAria, required: true, min: this.start, max: Number.MAX_SAFE_INTEGER, value: this.filterState.range?.end, onInput: (e) => (this.end = e.target.valueAsNumber) }), h(Button, { key: 'a98a7d0b356bb5c3eeec2512d96fd5bedc3605a6', style: "outline-primary", type: "submit", part: "input-apply-button", class: "flex-none truncate p-2.5", ariaLabel: applyAria, text: apply })));
|
50
50
|
}
|
51
51
|
static get style() { return AtomicFacetNumberInputStyle0; }
|
52
52
|
}, [0, "atomic-facet-number-input", {
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"index.js","mappings":"
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;MCHa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,WAAmB,EAAE,UAAkB;QACjD,KAAK,CACH,QAAQ,WAAW,sCAAsC,UAAU,YAAY,CAChF,CAAC;KACH;;;ACfH,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;SAIpC,gBAAgB,CAAI,OAAgB,EAAE,UAAkB;IACtE,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM;QACpC,MAAM,KAAK,GAAG,gBAAgB,CAC5B,oBAAoB,EACpB,CAAC,IAAO;YACN,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;SACtB,CACF,CAAC;QACF,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;YACjC,MAAM,CACJ,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CACnE,CAAC;SACH;KACF,CAAC,CAAC;AACL;;ACoDA;;;;;;;;;;SAUgB,mBAAmB,CAAoB,OAAgB;IACrE,OAAO,gBAAgB,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACxD;;;;","names":[],"sources":["src/components/commerce/product-template-component-utils/stencil-product-template-decorators.tsx","src/components/common/item-list/context/item-context-controller.ts","src/components/common/item-list/fetch-item-context.ts","src/decorators/commerce/product-template-decorators.ts"],"sourcesContent":["import {Product} from '@coveo/headless/commerce';\nimport {itemContext} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This method is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered \"atomic-product\".\n * @returns A promise that resolves on initialization of the parent \"atomic-product\" element, or rejects when there is no parent \"atomic-product\" element.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \\@/src/decorators/commerce/product-template-decorators.ts\n */\nexport function productContext<T extends Product>(element: Element) {\n return itemContext<T>(element, 'atomic-product');\n}\n","import type {LitElement, ReactiveController, ReactiveControllerHost} from 'lit';\nimport type {InitializableComponent} from '@/src/decorators/types.js';\nimport {buildCustomEvent} from '@/src/utils/event-utils';\n\ntype LitElementWithError = Omit<\n Pick<InitializableComponent, 'error'>,\n 'error'\n> &\n LitElement & {\n error: Error | null;\n };\n\nconst itemContextEventName = 'atomic/resolveResult';\n\nexport class MissingParentError extends Error {\n constructor(elementName: string, parentName: string) {\n super(\n `The \"${elementName}\" element must be the child of an \"${parentName}\" element.`\n );\n }\n}\n\nfunction extractFolded<T = Record<string, unknown>>(\n item: Record<string, unknown>,\n returnFolded: boolean\n): T {\n if (returnFolded) {\n if ('children' in item) {\n return item as T;\n } else {\n return {children: [], result: item} as T;\n }\n }\n\n if ('children' in item && 'result' in item) {\n return item.result as T;\n }\n return item as T;\n}\n\n/**\n * A reactive controller that manages item context data from parent components.\n * Handles fetching item data via custom events and manages error states.\n */\nexport class ItemContextController<T = Record<string, unknown>>\n implements ReactiveController\n{\n private host: ReactiveControllerHost & LitElementWithError;\n private parentName: string;\n private folded: boolean;\n private _item: T | null = null;\n private _error: MissingParentError | null = null;\n\n constructor(\n host: ReactiveControllerHost & LitElementWithError,\n options: {parentName?: string; folded?: boolean} = {}\n ) {\n this.host = host;\n this.parentName = options.parentName ?? 'atomic-result';\n this.folded = options.folded ?? false;\n host.addController(this);\n }\n\n get item(): T | null {\n return this._error ? null : this._item;\n }\n\n get error(): MissingParentError | null {\n return this._error;\n }\n\n get hasError(): boolean {\n return this._error !== null;\n }\n\n hostConnected(): void {\n this._resolveItemContext();\n }\n\n private _resolveItemContext(): void {\n const event = buildCustomEvent(\n itemContextEventName,\n (item: Record<string, unknown>) => {\n this._item = extractFolded<T>(item, this.folded);\n this._error = null;\n this.host.error = null;\n this.host.requestUpdate();\n }\n );\n\n const canceled = this.host.dispatchEvent(event);\n if (canceled) {\n const elementName = (this.host as Element).nodeName.toLowerCase();\n this._error = new MissingParentError(elementName, this.parentName);\n this._item = null;\n this.host.error = this._error;\n this.host.requestUpdate();\n }\n }\n}\n\ntype ItemContextEventHandler<T> = (item: T) => void;\nexport type ItemContextEvent<T> = CustomEvent<ItemContextEventHandler<T>>;\n","import {closest} from '../../../utils/dom-utils.js';\nimport {buildCustomEvent} from '../../../utils/event-utils.js';\nimport {MissingParentError} from './context/item-context-controller.js';\n\nconst itemContextEventName = 'atomic/resolveResult';\n\ntype ItemContextEventHandler<T> = (item: T) => void;\n\nexport function fetchItemContext<T>(element: Element, parentName: string) {\n return new Promise<T>((resolve, reject) => {\n const event = buildCustomEvent<ItemContextEventHandler<T>>(\n itemContextEventName,\n (item: T) => {\n return resolve(item);\n }\n );\n element.dispatchEvent(event);\n\n if (!closest(element, parentName)) {\n reject(\n new MissingParentError(element.nodeName.toLowerCase(), parentName)\n );\n }\n });\n}\n","import type {InteractiveProduct, Product} from '@coveo/headless/commerce';\nimport type {LitElement} from 'lit';\nimport {\n InteractiveItemContextController,\n type InteractiveItemContextEvent,\n} from '@/src/components/common/item-list/context/interactive-item-context-controller';\nimport {\n ItemContextController,\n type ItemContextEvent,\n} from '@/src/components/common/item-list/context/item-context-controller';\nimport {fetchItemContext} from '@/src/components/common/item-list/fetch-item-context';\n\n/**\n * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing product context in product template components.\n *\n * @param host - The Lit component instance\n * @param options - Configuration options\n * @returns ItemContextController instance configured for atomic-product\n *\n * @example\n * ```typescript\n * @customElement('my-product-component')\n * export class MyProductComponent extends LitElement {\n * private productController = createProductContextController(this);\n *\n * @state() product!: Product;\n *\n * render() {\n * this.product = this.productController.item;\n * return html`<div>${this.product?.ec_name}</div>`;\n * }\n * }\n * ```\n */\nexport function createProductContextController(\n host: LitElement & {error: Error | null},\n options: {folded?: boolean} = {}\n): ItemContextController<Product> {\n return new ItemContextController<Product>(host, {\n parentName: 'atomic-product',\n folded: options.folded ?? false,\n });\n}\n\n/**\n * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing interactive product context in product template components.\n *\n * @param host - The Lit component instance\n * @returns InteractiveItemContextController instance\n *\n * @example\n * ```typescript\n * @customElement('my-interactive-product-component')\n * export class MyInteractiveProductComponent extends LitElement {\n * private interactiveProductController = createInteractiveProductContextController(this);\n *\n * @state() product!: Product;\n *\n * render() {\n * this.product = this.interactiveProductController.interactiveItem;\n * return html`<div>${this.product?.ec_name}</div>`;\n * }\n * }\n * ```\n */\nexport function createInteractiveProductContextController(\n host: LitElement & {error: Error}\n): InteractiveItemContextController<InteractiveProduct> {\n return new InteractiveItemContextController<InteractiveProduct>(host);\n}\n\nexport type ProductContextEvent<T = Product> = ItemContextEvent<T>;\nexport type InteractiveProductContextEvent<\n T extends InteractiveProduct = InteractiveProduct,\n> = InteractiveItemContextEvent<T>;\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This utility function is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the utility function in the [`connectedCallback` lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.\n * @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.\n */\nexport function fetchProductContext<T extends Product>(element: Element) {\n return fetchItemContext<T>(element, 'atomic-product');\n}\n"],"version":3}
|
@@ -25,7 +25,7 @@ const AtomicTabButton = /*@__PURE__*/ proxyCustomElement(class AtomicTabButton e
|
|
25
25
|
return this.active ? '' : 'text-neutral-dark hover:text-primary-light';
|
26
26
|
}
|
27
27
|
render() {
|
28
|
-
return (h(Host, { key: '
|
28
|
+
return (h(Host, { key: '664e3146ffed0c73ec4baa3dc016da5de5865da4', role: "listitem", class: `${this.activeTabClass}`, "aria-current": this.active ? 'true' : 'false', "aria-label": 'tab for ' + this.label, part: 'button-container' + (this.active ? '-active' : '') }, h(Button, { key: 'dc11bc1ebcaa478d87a544d143028d06d11d6089', class: `w-full truncate px-2 pb-1 text-xl sm:px-6 ${this.activeTabTextClass}`, part: 'tab-button' + (this.active ? '-active' : ''), onClick: this.select, style: "text-transparent" }, this.label)));
|
29
29
|
}
|
30
30
|
static get style() { return AtomicTabButtonStyle0; }
|
31
31
|
}, [0, "atomic-tab-button", {
|