@coveo/atomic 3.33.2-pre.8a6d9083d3 → 3.33.2-pre.9b6ad522eb
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/components/_index.d.ts +2 -0
- package/dist/atomic/components/_index.js +1 -0
- package/dist/atomic/components/analytics-config.js +2 -2
- package/dist/atomic/components/atomic-category-facet.js +1 -1
- package/dist/atomic/components/atomic-citation.js +1 -1
- package/dist/atomic/components/atomic-citation.js.map +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-generated-answer-feedback-modal.js.map +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.d.ts +11 -0
- package/dist/atomic/components/atomic-insight-interface.js +332 -0
- package/dist/atomic/components/atomic-insight-interface.js.map +1 -0
- package/dist/atomic/components/atomic-insight-layout.js +1 -80
- package/dist/atomic/components/atomic-insight-layout.js.map +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 +3 -3
- 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-timeline2.js.map +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-toggle.js.map +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-modal2.js +2 -2
- package/dist/atomic/components/atomic-no-results.js +1 -1
- package/dist/atomic/components/atomic-numeric-facet.js +1 -1
- package/dist/atomic/components/atomic-pager.js +3 -3
- package/dist/atomic/components/atomic-query-error.js +1 -1
- package/dist/atomic/components/atomic-query-summary.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 +2 -2
- 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-inspector2.js +2 -2
- 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 +4 -4
- package/dist/atomic/components/atomic-search-interface.js +1 -1
- 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 +2 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +2 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.js +1 -0
- package/dist/atomic/components/components/common/expandable-text/expandable-text.js +1 -1
- package/dist/atomic/components/components/insight/index.js +1 -2
- package/dist/atomic/components/components/insight/lazy-index.js +1 -3
- 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/insight-layout.js +87 -0
- package/dist/atomic/components/insight-layout.js.map +1 -0
- package/dist/atomic/components/tab-button.js +1 -1
- package/dist/atomic/components/tab-popover.js +1 -1
- package/dist/atomic/{p-81b6d12c.entry.js → p-0368a213.entry.js} +2 -2
- package/dist/atomic/{p-9507e1bc.entry.js → p-05ab5909.entry.js} +2 -2
- package/dist/atomic/p-05e9040f.entry.js +2 -0
- package/dist/atomic/p-05e9040f.entry.js.map +1 -0
- package/dist/atomic/{p-39698267.entry.js → p-069bf2b9.entry.js} +2 -2
- package/dist/atomic/{p-681610d3.entry.js → p-09924944.entry.js} +2 -2
- package/dist/atomic/{p-cd8f11ea.entry.js → p-0c9b553c.entry.js} +2 -2
- package/dist/atomic/{p-dac69bca.entry.js → p-100da102.entry.js} +2 -2
- package/dist/atomic/p-12f4bbea.entry.js +2 -0
- package/dist/atomic/{p-8187b910.entry.js.map → p-12f4bbea.entry.js.map} +1 -1
- package/dist/atomic/{p-f076efa7.entry.js → p-13e67ab3.entry.js} +2 -2
- package/dist/atomic/{p-c69ae97a.entry.js → p-15d952f3.entry.js} +2 -2
- package/dist/atomic/{p-edf102d6.entry.js → p-1a79c944.entry.js} +2 -2
- package/dist/atomic/p-1a79c944.entry.js.map +1 -0
- package/dist/atomic/{p-6bea42e6.entry.js → p-1c2d25ba.entry.js} +2 -2
- package/dist/atomic/{p-3c7ed752.entry.js → p-1c3363ec.entry.js} +2 -2
- package/dist/atomic/{p-b1c9b043.entry.js → p-1d091f9a.entry.js} +2 -2
- package/dist/atomic/{p-8b8eb35f.entry.js → p-258c3253.entry.js} +2 -2
- package/dist/atomic/{p-09953fee.entry.js → p-26098930.entry.js} +2 -2
- package/dist/atomic/{p-182a3f9e.entry.js → p-26ad479b.entry.js} +2 -2
- package/dist/atomic/{p-f79f31f8.entry.js → p-2c7d4967.entry.js} +2 -2
- package/dist/atomic/p-2caa1859.js +2 -0
- package/dist/atomic/p-2caa1859.js.map +1 -0
- package/dist/atomic/{p-bbed84f9.entry.js → p-2d3ef0f7.entry.js} +2 -2
- package/dist/atomic/{p-6b297a61.entry.js → p-2e91aea8.entry.js} +2 -2
- package/dist/atomic/{p-e20c18f0.entry.js → p-3af5e810.entry.js} +2 -2
- package/dist/atomic/p-412b233b.entry.js +2 -0
- package/dist/atomic/p-412b233b.entry.js.map +1 -0
- package/dist/atomic/{p-d1e5e2d7.entry.js → p-496da1c9.entry.js} +2 -2
- package/dist/atomic/{p-87747240.entry.js → p-4c7654eb.entry.js} +2 -2
- package/dist/atomic/{p-17564517.entry.js → p-500248e1.entry.js} +2 -2
- package/dist/atomic/{p-3e7ea7a5.entry.js → p-5027d796.entry.js} +2 -2
- package/dist/atomic/{p-f45a7b82.entry.js → p-50467793.entry.js} +2 -2
- package/dist/atomic/{p-bfb23490.entry.js → p-5138d839.entry.js} +2 -2
- package/dist/atomic/{p-ba9b2923.entry.js → p-516b5bd4.entry.js} +2 -2
- package/dist/atomic/p-52121e1e.entry.js +2 -0
- package/dist/atomic/{p-c9b1568b.entry.js → p-5225eb50.entry.js} +2 -2
- package/dist/atomic/{p-a0d04767.entry.js → p-552d1f66.entry.js} +2 -2
- package/dist/atomic/{p-2c64e9a2.entry.js → p-571c9614.entry.js} +2 -2
- package/dist/atomic/{p-c15fc656.entry.js → p-57b47b73.entry.js} +2 -2
- package/dist/atomic/{p-24c2110b.entry.js → p-58610952.entry.js} +2 -2
- package/dist/atomic/{p-0dc6ebf8.entry.js → p-5c995d77.entry.js} +2 -2
- package/dist/atomic/{p-7bff27b2.entry.js → p-612155f0.entry.js} +2 -2
- package/dist/atomic/{p-cbeca949.entry.js → p-633628d5.entry.js} +2 -2
- package/dist/atomic/{p-31e55d26.entry.js → p-6ad1adfb.entry.js} +2 -2
- package/dist/atomic/{p-43a0f6e2.entry.js → p-737f842d.entry.js} +2 -2
- package/dist/atomic/{p-e50b1d73.entry.js → p-79499898.entry.js} +2 -2
- package/dist/atomic/{p-0dac8e7b.entry.js → p-80055cf6.entry.js} +2 -2
- package/dist/atomic/{p-943b29c2.entry.js → p-82a8cf74.entry.js} +2 -2
- package/dist/atomic/{p-57c90e5f.entry.js → p-84befe35.entry.js} +2 -2
- package/dist/atomic/{p-57c90e5f.entry.js.map → p-84befe35.entry.js.map} +1 -1
- package/dist/atomic/{p-c434b50f.entry.js → p-875583aa.entry.js} +2 -2
- package/dist/atomic/{p-c81d1971.entry.js → p-88e4a2f9.entry.js} +2 -2
- package/dist/atomic/{p-c1721cb2.entry.js → p-896724e9.entry.js} +2 -2
- package/dist/atomic/{p-455fbbd7.entry.js → p-8b70f39a.entry.js} +2 -2
- package/dist/atomic/p-8ef0e022.entry.js +2 -0
- package/dist/atomic/{p-be6251ac.js → p-96f45065.js} +2 -2
- package/dist/atomic/{p-770da48e.entry.js → p-a14fd4de.entry.js} +2 -2
- package/dist/atomic/{p-e9922d7c.entry.js → p-a2714d7e.entry.js} +2 -2
- package/dist/atomic/{p-7753ae27.entry.js → p-a3a1f8e9.entry.js} +2 -2
- package/dist/atomic/{p-f30c4c7d.entry.js → p-a7dcf131.entry.js} +2 -2
- package/dist/atomic/p-a7dcf131.entry.js.map +1 -0
- package/dist/atomic/{p-971a8a73.entry.js → p-aa40956c.entry.js} +2 -2
- package/dist/atomic/{p-429270f6.entry.js → p-ab627e18.entry.js} +2 -2
- package/dist/atomic/{p-d6d0a47f.entry.js → p-aff3a66a.entry.js} +2 -2
- package/dist/atomic/{p-156aa33a.entry.js → p-b0bd2709.entry.js} +2 -2
- package/dist/atomic/{p-70c431f9.entry.js → p-b103b28a.entry.js} +2 -2
- package/dist/atomic/{p-db6034e2.entry.js → p-b328cab9.entry.js} +2 -2
- package/dist/atomic/{p-caabedeb.entry.js → p-b7f38541.entry.js} +2 -2
- package/dist/atomic/p-b7f38541.entry.js.map +1 -0
- package/dist/atomic/{p-45e88039.entry.js → p-b97abfb9.entry.js} +2 -2
- package/dist/atomic/{p-1d8eba10.entry.js → p-bfdecd0f.entry.js} +2 -2
- package/dist/atomic/{p-e67dabc9.entry.js → p-c3746d6e.entry.js} +2 -2
- package/dist/atomic/{p-52b66ca8.entry.js → p-c61609ea.entry.js} +2 -2
- package/dist/atomic/{p-a5751bb0.entry.js → p-c667812c.entry.js} +2 -2
- package/dist/atomic/{p-3a994997.entry.js → p-c9fa8526.entry.js} +2 -2
- package/dist/atomic/{p-c572a219.entry.js → p-cb051c21.entry.js} +2 -2
- package/dist/atomic/{p-11fc3a7b.entry.js → p-cbb819d2.entry.js} +2 -2
- package/dist/atomic/{p-fa1dcc3e.entry.js → p-cdd70f49.entry.js} +2 -2
- package/dist/atomic/{p-fe23b0b3.entry.js → p-ce83d873.entry.js} +2 -2
- package/dist/atomic/{p-117be4a4.entry.js → p-ce9e510c.entry.js} +2 -2
- package/dist/atomic/{p-05a3e5a4.entry.js → p-d1d2d945.entry.js} +2 -2
- package/dist/atomic/{p-d1caf040.entry.js → p-d5071b5a.entry.js} +2 -2
- package/dist/atomic/{p-8baf4780.entry.js → p-df2df66a.entry.js} +2 -2
- package/dist/atomic/{p-fce653a1.entry.js → p-e750df14.entry.js} +2 -2
- package/dist/atomic/{p-104c7d84.entry.js → p-ef22a3f2.entry.js} +2 -2
- package/dist/atomic/{p-d3b5c8e5.entry.js → p-f39de057.entry.js} +2 -2
- package/dist/atomic/{p-af487ad9.entry.js → p-fc6beee6.entry.js} +2 -2
- package/dist/cjs/_loader.cjs.js +1 -1
- package/dist/cjs/{analytics-config-0e22a0c9.js → analytics-config-6970332b.js} +2 -2
- package/dist/cjs/{analytics-config-0e22a0c9.js.map → analytics-config-6970332b.js.map} +1 -1
- 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-citation.cjs.entry.js.map +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-focus-trap_2.cjs.entry.js +2 -2
- 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-generated-answer-feedback-modal.cjs.entry.js.map +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 +307 -0
- package/dist/cjs/atomic-insight-interface.cjs.entry.js.map +1 -0
- package/dist/cjs/atomic-insight-layout.cjs.entry.js +4 -82
- package/dist/cjs/atomic-insight-layout.cjs.entry.js.map +1 -1
- 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 +3 -3
- 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-session_2.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js.map +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 +1 -1
- package/dist/cjs/atomic-pager.cjs.entry.js +3 -3
- package/dist/cjs/atomic-query-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-query-summary.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 +4 -4
- package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
- 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 -0
- package/dist/cjs/insight-layout-355a94dd.js +90 -0
- package/dist/cjs/insight-layout-355a94dd.js.map +1 -0
- package/dist/cjs/version.cjs.js +1 -1
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-d082e438.js → analytics-config-ed7665a6.js} +3 -3
- package/dist/esm/{analytics-config-d082e438.js.map → analytics-config-ed7665a6.js.map} +1 -1
- package/dist/esm/atomic-category-facet.entry.js +1 -1
- package/dist/esm/atomic-citation.entry.js +1 -1
- package/dist/esm/atomic-citation.entry.js.map +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-focus-trap_2.entry.js +2 -2
- 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-generated-answer-feedback-modal.entry.js.map +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 +303 -0
- package/dist/esm/atomic-insight-interface.entry.js.map +1 -0
- package/dist/esm/atomic-insight-layout.entry.js +2 -80
- package/dist/esm/atomic-insight-layout.entry.js.map +1 -1
- 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 +3 -3
- 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-session_2.entry.js.map +1 -1
- package/dist/esm/atomic-insight-user-actions-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-user-actions-toggle.entry.js.map +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 +1 -1
- package/dist/esm/atomic-pager.entry.js +3 -3
- package/dist/esm/atomic-query-error.entry.js +1 -1
- package/dist/esm/atomic-query-summary.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 +4 -4
- package/dist/esm/atomic-search-interface.entry.js +1 -1
- 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 -0
- package/dist/esm/insight-layout-776b87f2.js +87 -0
- package/dist/esm/insight-layout-776b87f2.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.d.ts +1 -0
- package/dist/types/components/common/generated-answer/atomic-citation/atomic-citation.d.ts +1 -1
- package/dist/types/components/common/generated-answer/atomic-generated-answer-feedback/atomic-generated-answer-feedback-modal.d.ts +1 -1
- package/dist/types/components/insight/atomic-insight-interface/atomic-insight-interface.d.ts +42 -36
- package/dist/types/components/insight/index.d.ts +1 -1
- package/dist/types/components/insight/user-actions/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.d.ts +2 -1
- package/dist/types/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.d.ts +1 -1
- package/dist/types/components.d.ts +169 -4
- package/docs/atomic-docs.json +1098 -181
- package/package.json +8 -12
- package/dist/atomic/components/components/insight/atomic-insight-interface/analytics-config.js +0 -31
- package/dist/atomic/components/components/insight/atomic-insight-interface/atomic-insight-interface.js +0 -253
- package/dist/atomic/p-256b5495.entry.js +0 -2
- package/dist/atomic/p-564be2a3.entry.js +0 -2
- package/dist/atomic/p-8187b910.entry.js +0 -2
- package/dist/atomic/p-bd404744.entry.js +0 -2
- package/dist/atomic/p-bd404744.entry.js.map +0 -1
- package/dist/atomic/p-caabedeb.entry.js.map +0 -1
- package/dist/atomic/p-edf102d6.entry.js.map +0 -1
- package/dist/atomic/p-f30c4c7d.entry.js.map +0 -1
- /package/dist/atomic/{p-81b6d12c.entry.js.map → p-0368a213.entry.js.map} +0 -0
- /package/dist/atomic/{p-9507e1bc.entry.js.map → p-05ab5909.entry.js.map} +0 -0
- /package/dist/atomic/{p-39698267.entry.js.map → p-069bf2b9.entry.js.map} +0 -0
- /package/dist/atomic/{p-681610d3.entry.js.map → p-09924944.entry.js.map} +0 -0
- /package/dist/atomic/{p-cd8f11ea.entry.js.map → p-0c9b553c.entry.js.map} +0 -0
- /package/dist/atomic/{p-dac69bca.entry.js.map → p-100da102.entry.js.map} +0 -0
- /package/dist/atomic/{p-f076efa7.entry.js.map → p-13e67ab3.entry.js.map} +0 -0
- /package/dist/atomic/{p-c69ae97a.entry.js.map → p-15d952f3.entry.js.map} +0 -0
- /package/dist/atomic/{p-6bea42e6.entry.js.map → p-1c2d25ba.entry.js.map} +0 -0
- /package/dist/atomic/{p-3c7ed752.entry.js.map → p-1c3363ec.entry.js.map} +0 -0
- /package/dist/atomic/{p-b1c9b043.entry.js.map → p-1d091f9a.entry.js.map} +0 -0
- /package/dist/atomic/{p-8b8eb35f.entry.js.map → p-258c3253.entry.js.map} +0 -0
- /package/dist/atomic/{p-09953fee.entry.js.map → p-26098930.entry.js.map} +0 -0
- /package/dist/atomic/{p-182a3f9e.entry.js.map → p-26ad479b.entry.js.map} +0 -0
- /package/dist/atomic/{p-f79f31f8.entry.js.map → p-2c7d4967.entry.js.map} +0 -0
- /package/dist/atomic/{p-bbed84f9.entry.js.map → p-2d3ef0f7.entry.js.map} +0 -0
- /package/dist/atomic/{p-6b297a61.entry.js.map → p-2e91aea8.entry.js.map} +0 -0
- /package/dist/atomic/{p-e20c18f0.entry.js.map → p-3af5e810.entry.js.map} +0 -0
- /package/dist/atomic/{p-d1e5e2d7.entry.js.map → p-496da1c9.entry.js.map} +0 -0
- /package/dist/atomic/{p-87747240.entry.js.map → p-4c7654eb.entry.js.map} +0 -0
- /package/dist/atomic/{p-17564517.entry.js.map → p-500248e1.entry.js.map} +0 -0
- /package/dist/atomic/{p-3e7ea7a5.entry.js.map → p-5027d796.entry.js.map} +0 -0
- /package/dist/atomic/{p-f45a7b82.entry.js.map → p-50467793.entry.js.map} +0 -0
- /package/dist/atomic/{p-bfb23490.entry.js.map → p-5138d839.entry.js.map} +0 -0
- /package/dist/atomic/{p-ba9b2923.entry.js.map → p-516b5bd4.entry.js.map} +0 -0
- /package/dist/atomic/{p-256b5495.entry.js.map → p-52121e1e.entry.js.map} +0 -0
- /package/dist/atomic/{p-c9b1568b.entry.js.map → p-5225eb50.entry.js.map} +0 -0
- /package/dist/atomic/{p-a0d04767.entry.js.map → p-552d1f66.entry.js.map} +0 -0
- /package/dist/atomic/{p-2c64e9a2.entry.js.map → p-571c9614.entry.js.map} +0 -0
- /package/dist/atomic/{p-c15fc656.entry.js.map → p-57b47b73.entry.js.map} +0 -0
- /package/dist/atomic/{p-24c2110b.entry.js.map → p-58610952.entry.js.map} +0 -0
- /package/dist/atomic/{p-0dc6ebf8.entry.js.map → p-5c995d77.entry.js.map} +0 -0
- /package/dist/atomic/{p-7bff27b2.entry.js.map → p-612155f0.entry.js.map} +0 -0
- /package/dist/atomic/{p-cbeca949.entry.js.map → p-633628d5.entry.js.map} +0 -0
- /package/dist/atomic/{p-31e55d26.entry.js.map → p-6ad1adfb.entry.js.map} +0 -0
- /package/dist/atomic/{p-43a0f6e2.entry.js.map → p-737f842d.entry.js.map} +0 -0
- /package/dist/atomic/{p-e50b1d73.entry.js.map → p-79499898.entry.js.map} +0 -0
- /package/dist/atomic/{p-0dac8e7b.entry.js.map → p-80055cf6.entry.js.map} +0 -0
- /package/dist/atomic/{p-943b29c2.entry.js.map → p-82a8cf74.entry.js.map} +0 -0
- /package/dist/atomic/{p-c434b50f.entry.js.map → p-875583aa.entry.js.map} +0 -0
- /package/dist/atomic/{p-c81d1971.entry.js.map → p-88e4a2f9.entry.js.map} +0 -0
- /package/dist/atomic/{p-c1721cb2.entry.js.map → p-896724e9.entry.js.map} +0 -0
- /package/dist/atomic/{p-455fbbd7.entry.js.map → p-8b70f39a.entry.js.map} +0 -0
- /package/dist/atomic/{p-564be2a3.entry.js.map → p-8ef0e022.entry.js.map} +0 -0
- /package/dist/atomic/{p-be6251ac.js.map → p-96f45065.js.map} +0 -0
- /package/dist/atomic/{p-770da48e.entry.js.map → p-a14fd4de.entry.js.map} +0 -0
- /package/dist/atomic/{p-e9922d7c.entry.js.map → p-a2714d7e.entry.js.map} +0 -0
- /package/dist/atomic/{p-7753ae27.entry.js.map → p-a3a1f8e9.entry.js.map} +0 -0
- /package/dist/atomic/{p-971a8a73.entry.js.map → p-aa40956c.entry.js.map} +0 -0
- /package/dist/atomic/{p-429270f6.entry.js.map → p-ab627e18.entry.js.map} +0 -0
- /package/dist/atomic/{p-d6d0a47f.entry.js.map → p-aff3a66a.entry.js.map} +0 -0
- /package/dist/atomic/{p-156aa33a.entry.js.map → p-b0bd2709.entry.js.map} +0 -0
- /package/dist/atomic/{p-70c431f9.entry.js.map → p-b103b28a.entry.js.map} +0 -0
- /package/dist/atomic/{p-db6034e2.entry.js.map → p-b328cab9.entry.js.map} +0 -0
- /package/dist/atomic/{p-45e88039.entry.js.map → p-b97abfb9.entry.js.map} +0 -0
- /package/dist/atomic/{p-1d8eba10.entry.js.map → p-bfdecd0f.entry.js.map} +0 -0
- /package/dist/atomic/{p-e67dabc9.entry.js.map → p-c3746d6e.entry.js.map} +0 -0
- /package/dist/atomic/{p-52b66ca8.entry.js.map → p-c61609ea.entry.js.map} +0 -0
- /package/dist/atomic/{p-a5751bb0.entry.js.map → p-c667812c.entry.js.map} +0 -0
- /package/dist/atomic/{p-3a994997.entry.js.map → p-c9fa8526.entry.js.map} +0 -0
- /package/dist/atomic/{p-c572a219.entry.js.map → p-cb051c21.entry.js.map} +0 -0
- /package/dist/atomic/{p-11fc3a7b.entry.js.map → p-cbb819d2.entry.js.map} +0 -0
- /package/dist/atomic/{p-fa1dcc3e.entry.js.map → p-cdd70f49.entry.js.map} +0 -0
- /package/dist/atomic/{p-fe23b0b3.entry.js.map → p-ce83d873.entry.js.map} +0 -0
- /package/dist/atomic/{p-117be4a4.entry.js.map → p-ce9e510c.entry.js.map} +0 -0
- /package/dist/atomic/{p-05a3e5a4.entry.js.map → p-d1d2d945.entry.js.map} +0 -0
- /package/dist/atomic/{p-d1caf040.entry.js.map → p-d5071b5a.entry.js.map} +0 -0
- /package/dist/atomic/{p-8baf4780.entry.js.map → p-df2df66a.entry.js.map} +0 -0
- /package/dist/atomic/{p-fce653a1.entry.js.map → p-e750df14.entry.js.map} +0 -0
- /package/dist/atomic/{p-104c7d84.entry.js.map → p-ef22a3f2.entry.js.map} +0 -0
- /package/dist/atomic/{p-d3b5c8e5.entry.js.map → p-f39de057.entry.js.map} +0 -0
- /package/dist/atomic/{p-af487ad9.entry.js.map → p-fc6beee6.entry.js.map} +0 -0
|
@@ -108,7 +108,7 @@ const AtomicQuickview$1 = /*@__PURE__*/ proxyCustomElement(class AtomicQuickview
|
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
110
|
if (this.quickviewState.resultHasPreview) {
|
|
111
|
-
return (h(Button, { key: '
|
|
111
|
+
return (h(Button, { key: 'b96d9a3049190935a2c4f041bae9faa89e62ce20', 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: 'a5be2ca28ccb7762d98ab9b71fec6a121eefcf38', part: "icon", class: "flex w-5 justify-center", icon: QuickviewIcon })));
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
static get style() { return AtomicQuickviewStyle0; }
|
|
@@ -39,7 +39,7 @@ const AtomicRecsError$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRecsError
|
|
|
39
39
|
if (hasError) {
|
|
40
40
|
this.ariaMessage = getAriaMessageFromErrorType(i18n, organizationId, url, error?.type);
|
|
41
41
|
}
|
|
42
|
-
return (h(QueryErrorGuard, { key: '
|
|
42
|
+
return (h(QueryErrorGuard, { key: 'bfb50f392a5102f3528974f4d9fec2e3913305c4', hasError: hasError }, h(QueryErrorContainer, { key: 'e970eb381ed1558629c10787ad335813f8f243ba' }, h(QueryErrorIcon, { key: '6ba3f9a746d608719495b49fb92d87140e981e90', errorType: error?.type }), h(QueryErrorTitle, { key: 'cd673e82164cc44e04852fbfe7f897737010ec5e', i18n: i18n, organizationId: organizationId }), h(QueryErrorDescription, { key: '540e87976960cd7924f7f5eb5dde43fe7eee3bed', i18n: i18n, organizationId: organizationId, url: url }), h(QueryErrorShowMore, { key: 'c24878763ccd26f5ccefd81e96900f75f92975bd', link: h(QueryErrorLink, { i18n: i18n, errorType: error?.type }), onShowMore: () => (this.showMoreInfo = !this.showMoreInfo), i18n: i18n }), h(QueryErrorDetails, { key: 'fb4d9e98a5861d24316775463dc11ac2e4c3915c', error: error, show: this.showMoreInfo }))));
|
|
43
43
|
}
|
|
44
44
|
static get style() { return AtomicRecsErrorStyle0; }
|
|
45
45
|
}, [1, "atomic-recs-error", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { m as markParentAsReady } from './init-queue.js';
|
|
3
3
|
import { loadRecommendationActions, loadSearchConfigurationActions, EcommerceDefaultFieldsToInclude, loadFieldActions, buildRecommendationEngine } from '@coveo/headless/recommendation';
|
|
4
|
-
import { g as getNextAnalyticsConfig,
|
|
4
|
+
import { g as getNextAnalyticsConfig, c as augmentAnalyticsConfigWithDocument, d as augmentAnalyticsConfigWithAtomicVersion, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config.js';
|
|
5
5
|
import { A as ArrayProp } from './props-utils.js';
|
|
6
6
|
import { u as unsetLoadingFlag, s as setLoadingFlag, a as createBaseStore } from './store.js';
|
|
7
7
|
|
|
@@ -242,7 +242,7 @@ const AtomicRecsInterface$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRecsI
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
render() {
|
|
245
|
-
return this.engine && h("slot", { key: '
|
|
245
|
+
return this.engine && h("slot", { key: '83b64f57da68e94c0ba4a28639296d8e4c29b77a' });
|
|
246
246
|
}
|
|
247
247
|
get host() { return this; }
|
|
248
248
|
static get watchers() { return {
|
|
@@ -262,7 +262,7 @@ const AtomicRecsList$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRecsList e
|
|
|
262
262
|
}))));
|
|
263
263
|
}
|
|
264
264
|
render() {
|
|
265
|
-
return (h(Fragment, { key: '
|
|
265
|
+
return (h(Fragment, { key: '3469818622186a476e010dc43d0ee7662ccc07af' }, this.renderHeading(), this.shouldRenderPagination ? (h(Carousel, { bindings: this.bindings, currentPage: this.currentPage, nextPage: () => this.nextPage(), previousPage: () => this.previousPage(), numberOfPages: this.numberOfPages }, this.renderListOfRecommendations())) : (this.renderListOfRecommendations())));
|
|
266
266
|
}
|
|
267
267
|
get host() { return this; }
|
|
268
268
|
static get watchers() { return {
|
|
@@ -206,7 +206,7 @@ const AtomicRefineModal = /*@__PURE__*/ proxyCustomElement(class AtomicRefineMod
|
|
|
206
206
|
return (h(RefineModalFiltersSection, { i18n: i18n, withFacets: hasFacetElements, withAutomaticFacets: hasAutomaticFacets }, this.breadcrumbManagerState.hasBreadcrumbs && (h(RefineModalFiltersClearButton, { i18n: i18n, onClick: () => this.breadcrumbManager.deselectAll() }))));
|
|
207
207
|
}
|
|
208
208
|
render() {
|
|
209
|
-
return (h(RefineModal, { key: '
|
|
209
|
+
return (h(RefineModal, { key: '578ba550f74e75f58a81e99e9d5f96fc6dd392bd', 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: 'bd18d383e63befd72165c1fa6a3d5cff75d1f25f' }, this.renderSort(), this.renderFilters())));
|
|
210
210
|
}
|
|
211
211
|
componentDidLoad() {
|
|
212
212
|
this.host.style.display = '';
|
|
@@ -70,7 +70,7 @@ const AtomicRefineToggle$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRefine
|
|
|
70
70
|
this.modalRef && (this.modalRef.isOpen = true);
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
|
-
return (h(RefineToggleGuard, { key: '
|
|
73
|
+
return (h(RefineToggleGuard, { key: 'a902220b34a81ac9e854301c21eca6fa98cf3970', firstRequestExecuted: this.searchStatusState.firstSearchExecuted, hasError: this.searchStatusState.hasError, hasItems: this.searchStatusState.hasResults }, h(RefineToggleButton, { key: '176c9580a4fbf1e4ec4f640c313f7105ba7524b9', i18n: this.bindings.i18n, onClick: () => this.enableModal(), setRef: (button) => {
|
|
74
74
|
if (!button) {
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
@@ -18,9 +18,9 @@ const AtomicRelevanceInspector = /*@__PURE__*/ proxyCustomElement(class AtomicRe
|
|
|
18
18
|
this.open = false;
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h("atomic-modal", { key: '
|
|
21
|
+
return (h("atomic-modal", { key: '95ee313534de72d4272913a035339af3a0ae2937', exportparts: "footer", isOpen: this.open, close: () => {
|
|
22
22
|
this.closeRelevanceInspector?.emit();
|
|
23
|
-
} }, h("p", { key: '
|
|
23
|
+
} }, h("p", { key: 'c123866bd818077dee3d84449137f0c0ed835d1c', slot: "header" }, "Open the relevance inspector"), h("p", { key: '71c58b0f8d088e51ba5ee8c70b315e259bb729b1', slot: "body" }, "The Relevance Inspector will open in the Coveo Administration Console."), h("div", { key: '6384f4af443d851a900085eae3aa76d29708872f', slot: "footer", class: "flex w-full items-center justify-end" }, h(Button, { key: '833244682dc439faca9238e59cd314b33c46375d', style: "outline-primary", class: "mr-2 p-2", onClick: () => this.closeRelevanceInspector?.emit() }, "Ignore"), h("a", { key: '430ea1d3f76db008bc71587a2e6dc0ccad2e8566', class: "btn-primary p-2", target: "_blank", href: this.adminHref, onClick: () => this.closeRelevanceInspector?.emit() }, "Open"))));
|
|
24
24
|
}
|
|
25
25
|
get adminHref() {
|
|
26
26
|
const { organizationId, environment } = this.bindings.engine.state.configuration;
|
|
@@ -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: '
|
|
141
|
+
return (h(ResultChildrenGuard, { key: '4792c391d2d6dfd5b6a8f9ca7de5f6e17856aaf7', 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: '
|
|
101
|
+
return h(Host, { key: '16dd76a0e5d91ab65deeeb1cef7e0eb666068ce7' });
|
|
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: '
|
|
46
|
+
return (h(LinkWithItemAnalytics, { key: '893426e32ef773352ce0dec5e005d12d37d35a67', 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: '
|
|
197
|
+
return (h(TabGuard, { key: '2a166d26e6ce4887d1ed43ea5041110a277f8d06', tabsIncluded: this.tabsIncluded, tabsExcluded: this.tabsExcluded, activeTab: this.tabManagerState.activeTab }, h(ItemListGuard, { key: '3c0a5e6697a02832a65a5ec3e70414184133062b', hasError: this.resultListState.hasError, hasTemplate: this.resultTemplateRegistered, templateHasError: this.itemTemplateProvider.hasError, firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, h(DisplayWrapper, { key: 'e54764caa5d90956732ed083af7b9cebb47c6eb4', display: this.display, listClasses: listClasses }, h(ResultsPlaceholdersGuard, { key: '379a10c62c510e78d4b2ce4a27670a54e33470a1', density: this.density, display: this.display, imageSize: this.imageSize, displayPlaceholders: !this.isAppLoaded, numberOfPlaceholders: this.resultsPerPageState.numberOfResults }), h(ItemDisplayGuard, { key: '6f86f55ec045b323dd2419ff7343c29de7afadfe', firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, this.display === 'table'
|
|
198
198
|
? this.renderAsTable()
|
|
199
199
|
: this.display === 'grid'
|
|
200
200
|
? this.renderAsGrid()
|
|
@@ -27,9 +27,9 @@ const AtomicResultPlaceholder = /*@__PURE__*/ proxyCustomElement(class AtomicRes
|
|
|
27
27
|
} }, h("div", { class: placeholderClasses, style: { height: 'var(--font-size)' } })));
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h("div", { key: '
|
|
30
|
+
return (h("div", { key: '752a3b1b722f00811ea5aadd0b1aa27293c31340', class: `result-root placeholder with-sections animate-pulse ${getItemDisplayClasses(this.display, this.density, this.imageSize)
|
|
31
31
|
.join(' ')
|
|
32
|
-
.trim()}` }, h("atomic-result-section-visual", { key: '
|
|
32
|
+
.trim()}` }, h("atomic-result-section-visual", { key: 'e06c304ae90feb5cea9d8efdc308a4cf09dd1dbe' }, h("div", { key: '1eba1b5d9487de316b17cc6a15f61a7ba1d6ea70', class: placeholderClasses })), h("atomic-result-section-badges", { key: '6aef58812f5605ef338bccff15fc7a551ce8f119' }, h("div", { key: 'f4ec59865edf2968f6ebe6ab9f1dafc14ba7426b', class: `badge ${placeholderClasses}` })), h("atomic-result-section-actions", { key: 'f0f20b8f9469ed30a008c2aec09411962cf20b18' }, h("div", { key: '388b26449b3654507e37caa63785d9426ff8b18d', class: `action ${placeholderClasses}` })), h("atomic-result-section-title", { key: '616c2a21d4b637937416ae2b57c208469dfc64d5' }, h("div", { key: '1c225eddae56c5594fe4ec44f2dfa7bbcc629a99', class: `title ${placeholderClasses}` })), h("atomic-result-section-excerpt", { key: 'b11afc665ca9da6c196456e0e09717714e6f252c' }, this.renderExcerptLine('100%'), this.renderExcerptLine('95%'), this.renderExcerptLine('98%')), h("atomic-result-section-bottom-metadata", { key: 'c0e022b150fcbd1c466ee15db2f873dbbfb10190' }, h("div", { key: 'bef611cf47c30f339b9450c7b4d34cff6f7b56f6', class: "fields-placeholder" }, Array.from({ length: 4 }, () => (h("div", { class: `field-value-placeholder ${placeholderClasses}` })))))));
|
|
33
33
|
}
|
|
34
34
|
static get style() { return AtomicResultPlaceholderStyle0; }
|
|
35
35
|
}, [1, "atomic-result-placeholder", {
|
|
@@ -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: '
|
|
21
|
+
return (h("table", { key: '803964f2463ed72ef839a4481f0b7be63b2a6cfb', class: `list-root animate-pulse ${this.getClasses().join(' ')}` }, h("thead", { key: '44f9f6bd2cf09e0ac2c495655af3bbddb8f19622' }, h("tr", { key: 'e612c986b6210df782e310b0baaec129f4236421' }, h("th", { key: 'aec1a52a77732aa7c3e2b5012f74331df312a3e0' }, h("div", { key: 'f4aa998fa72c24f38c429a49aa367251232b7805', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '14.5rem' } })), h("th", { key: '6bc77466104af5e73a2049dac70c048930cf2ac6' }, h("div", { key: 'dd1088eca32e478f008264c75fe57df25d1d808e', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '9.75rem' } })), h("th", { key: '8c17808b69eb0f54758c977448443854d005fbe2' }, h("div", { key: '19f1f33f57b60ea1a5c1cdc438dd1d8572744eeb', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '6.5rem' } })))), h("tbody", { key: 'd153a34ba99cff2379b719f9341013cadbb5699e' }, 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", {
|
|
@@ -172,7 +172,7 @@ const AtomicSearchBoxInstantResults$1 = /*@__PURE__*/ proxyCustomElement(class A
|
|
|
172
172
|
}
|
|
173
173
|
render() {
|
|
174
174
|
if (this.error) {
|
|
175
|
-
return (h("atomic-component-error", { key: '
|
|
175
|
+
return (h("atomic-component-error", { key: 'fdc7168e2ad782021d361221f692da91bff1c3af', element: this.host, error: this.error }));
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
get host() { return this; }
|
|
@@ -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: '
|
|
63
|
+
return (h("atomic-component-error", { key: '60fd04f52305a72133a2cf04e70ce0b1c489c10d', 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: '
|
|
157
|
+
return (h("atomic-component-error", { key: '9a6efb2a4483b2a1924418e9b52cc94164b4c8e4', element: this.host, error: this.error }));
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
get host() { return this; }
|
|
@@ -427,18 +427,18 @@ const AtomicSearchBox$1 = /*@__PURE__*/ proxyCustomElement(class AtomicSearchBox
|
|
|
427
427
|
if (!this.suggestionManager.suggestions.length) {
|
|
428
428
|
this.registerSearchboxSuggestionEvents();
|
|
429
429
|
}
|
|
430
|
-
return (h(Host, { key: '
|
|
431
|
-
h(SearchBoxWrapper, { key: '
|
|
430
|
+
return (h(Host, { key: '14bd784f74d5cfcbcb82136d6f8e6bc2aa4e2815' }, this.renderAbsolutePositionSpacer(), [
|
|
431
|
+
h(SearchBoxWrapper, { key: '5d13e6bcdb5c27f5f169a7881eb471f431d86a51', disabled: isDisabled, onFocusout: (event) => {
|
|
432
432
|
if (!isFocusingOut(event)) {
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
this.suggestionManager.clearSuggestions();
|
|
436
436
|
this.isExpanded = false;
|
|
437
|
-
} }, this.renderTextBox(searchLabel), h(SubmitButton, { key: '
|
|
437
|
+
} }, this.renderTextBox(searchLabel), h(SubmitButton, { key: '105c32ac0b57202156661fcbb2b82722ca357ea7', bindings: this.bindings, disabled: isDisabled, onClick: () => {
|
|
438
438
|
this.searchBox.submit();
|
|
439
439
|
this.suggestionManager.clearSuggestions();
|
|
440
440
|
} }), this.renderSuggestions()),
|
|
441
|
-
!this.suggestionManager.suggestions.length && (h("slot", { key: '
|
|
441
|
+
!this.suggestionManager.suggestions.length && (h("slot", { key: 'ceb85736ad1c30d088fa8e828134237a543dd908' }, h("atomic-search-box-recent-queries", { key: 'a3f0dfc0ac6f6177a20e8e6e5a4fbcc688b63a40' }), h("atomic-search-box-query-suggestions", { key: '7cf5f99564c9ed776d114cc4d75cbc75e44efa71' }))),
|
|
442
442
|
]));
|
|
443
443
|
}
|
|
444
444
|
get host() { return this; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { m as markParentAsReady } from './init-queue.js';
|
|
3
3
|
import { loadSearchConfigurationActions, loadQueryActions, EcommerceDefaultFieldsToInclude, loadFieldActions, buildSearchEngine, buildUrlManager, buildSearchStatus } from '@coveo/headless';
|
|
4
|
-
import { g as getNextAnalyticsConfig,
|
|
4
|
+
import { g as getNextAnalyticsConfig, d as augmentAnalyticsConfigWithAtomicVersion, c as augmentAnalyticsConfigWithDocument, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config.js';
|
|
5
5
|
import { S as StorageItems, a as SafeStorage } from './local-storage-utils.js';
|
|
6
6
|
import { A as ArrayProp } from './props-utils.js';
|
|
7
7
|
import { m as makeDesktopQuery, n as noResultsSelector, e as errorSelector, f as firstSearchExecutedSelector } from './search-layout.js';
|
|
@@ -89,7 +89,7 @@ const AtomicSmartSnippetAnswer = /*@__PURE__*/ proxyCustomElement(class AtomicSm
|
|
|
89
89
|
}), ref: (element) => element && this.bindAnalyticsToLinks(element), part: "answer", class: "margin" })));
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '9dc7ab52e182ea2958c0bf651547a172313d40e3' }, this.renderStyle(), this.renderContent()));
|
|
93
93
|
}
|
|
94
94
|
get host() { return this; }
|
|
95
95
|
static get style() { return AtomicSmartSnippetAnswerStyle0; }
|
|
@@ -56,11 +56,11 @@ const AtomicSmartSnippetCollapseWrapper = /*@__PURE__*/ proxyCustomElement(class
|
|
|
56
56
|
return (h("button", { onClick: () => (this.isExpanded = !this.isExpanded), class: "text-primary mb-4 hover:underline", part: this.isExpanded ? 'show-less-button' : 'show-more-button' }, this.bindings.i18n.t(this.isExpanded ? 'show-less' : 'show-more'), h("atomic-icon", { icon: ArrowDown, class: "ml-2 w-3 align-baseline" })));
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '11a4917faf70f82681d12bcf07ae8e61df918b5b', class: this.fullHeight || !this.shouldRenderButton
|
|
60
60
|
? this.isExpanded
|
|
61
61
|
? 'expanded'
|
|
62
62
|
: ''
|
|
63
|
-
: 'invisible' }, h("div", { key: '
|
|
63
|
+
: 'invisible' }, h("div", { key: 'e77394a919a5ffe3548df8066c069b251b76540f', part: "smart-snippet-collapse-wrapper", class: "block overflow-hidden" }, h("slot", { key: 'b765e464f429c3a0d931be29ee60e9fe9d767d9e' })), this.shouldRenderButton && this.renderButton()));
|
|
64
64
|
}
|
|
65
65
|
get host() { return this; }
|
|
66
66
|
static get style() { return AtomicSmartSnippetCollapseWrapperStyle0; }
|
|
@@ -87,7 +87,7 @@ const AtomicSmartSnippetExpandableAnswer = /*@__PURE__*/ proxyCustomElement(clas
|
|
|
87
87
|
return (h("button", { onClick: () => this.isExpanded ? this.collapse.emit() : this.expand.emit(), class: "text-primary mb-4 hover:underline", part: this.isExpanded ? 'show-less-button' : 'show-more-button' }, this.bindings.i18n.t(this.isExpanded ? 'show-less' : 'show-more'), h("atomic-icon", { icon: ArrowDown, class: "ml-2 w-3 align-baseline" })));
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
|
-
return (h("div", { key: '
|
|
90
|
+
return (h("div", { key: '07fab7157153bef9553fd898c3c768aae89e59d9', class: this.isExpanded ? 'expanded' : '' }, this.renderAnswer(), this.renderButton()));
|
|
91
91
|
}
|
|
92
92
|
get host() { return this; }
|
|
93
93
|
static get watchers() { return {
|
|
@@ -45,9 +45,9 @@ const AtomicSmartSnippetFeedbackModal = /*@__PURE__*/ proxyCustomElement(class A
|
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
47
|
updateBreakpoints(this.host);
|
|
48
|
-
return (h("atomic-modal", { key: '
|
|
48
|
+
return (h("atomic-modal", { key: 'a0cf5aeda0d5ddb9e897c93f91e80f92454c9e4f', fullscreen: false, source: this.source, container: this.host, isOpen: this.isOpen, close: () => this.close(), exportparts: ATOMIC_MODAL_EXPORT_PARTS }, h(SmartSnippetFeedbackModalHeader, { key: 'a24f8d4ab805d17086f7de7702fbe9e2709208b0', i18n: this.bindings.i18n }), h(SmartSnippetFeedbackModalBody, { key: 'f1329b3299fad8a6987c83d79ee5676ac2b80500', formId: this.formId, onSubmit: (e) => this.sendFeedback(e) }, h(SmartSnippetFeebackModalOptions, { key: 'c0630d7e8c086001530649d6e45aa44e862ae5f3', 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: () => {
|
|
49
49
|
this.currentAnswer = correspondingAnswer;
|
|
50
|
-
} })))), h(SmartSnippetFeedbackModalDetails, { key: '
|
|
50
|
+
} })))), h(SmartSnippetFeedbackModalDetails, { key: '9d71e67a52776a08b97a80b22e1078ea0086fd6c', currentAnswer: this.currentAnswer, i18n: this.bindings.i18n, setDetailsInputRef: (ref) => (this.detailsInputRef = ref) })), h(SmartSnippetFeedbackModalFooter, { key: '60a0d8d350aef37f9df02c267f11de297c805703', formId: this.formId, i18n: this.bindings.i18n, onClick: () => this.close() })));
|
|
51
51
|
}
|
|
52
52
|
close() {
|
|
53
53
|
this.isOpen = false;
|
|
@@ -33,7 +33,7 @@ const AtomicSmartSnippetSource = /*@__PURE__*/ proxyCustomElement(class AtomicSm
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '6e310815eb6ff1e946c53d1d6df1720486d4ed18' }, h(LinkWithItemAnalytics, { key: 'b3ded9dc0a96f9e5f76984d1f72c567ac778c560', title: this.source.clickUri, href: this.source.clickUri, className: "block truncate", part: "source-url", attributes: this.anchorAttributes, onSelect: () => this.selectSource.emit(), onBeginDelayedSelect: () => this.beginDelayedSelectSource.emit(), onCancelPendingSelect: () => this.cancelPendingSelectSource.emit() }, this.source.clickUri), h(LinkWithItemAnalytics, { key: '486e92c8a519b149cff8938687d0ba2e67e2d2f2', title: this.source.title, href: this.source.clickUri, attributes: this.anchorAttributes, className: "block", part: "source-title", onSelect: () => this.selectSource.emit(), onBeginDelayedSelect: () => this.beginDelayedSelectSource.emit(), onCancelPendingSelect: () => this.cancelPendingSelectSource.emit() }, h("atomic-result-text", { field: "title", default: "no-title", key: this.source.uniqueId }))));
|
|
37
37
|
}
|
|
38
38
|
}, [0, "atomic-smart-snippet-source", {
|
|
39
39
|
"source": [1040],
|
|
@@ -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: '
|
|
121
|
-
h("slot", { key: '
|
|
120
|
+
h(SortGuard, { key: '6bcf83c0920b696573d396e22f2d914cc1537022', firstSearchExecuted: firstSearchExecuted, hasError: hasError, hasResults: hasResults }, h(SortContainer, { key: '07a9afdfc2b3ccab21f4e3b11c535be4f1434d2e' }, h(SortLabel, { key: 'e934aa217d8b46af88c7911cfa9bde8a24c70b42', i18n: i18n, id: id }), h(SortSelect, { key: '6d9e56ae34355b2d8f194845bf1549b92ca82304', 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: '04455925e05235d7c024831ff217ca9aca774557' }),
|
|
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: '
|
|
50
|
+
return (h("atomic-component-error", { key: '4492cc004facf655eaad9558db0c7a161535a8b6', element: this.host, error: error }));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
get host() { return this; }
|
|
@@ -66,13 +66,13 @@ const FacetDateInput = /*@__PURE__*/ proxyCustomElement(class FacetDateInput ext
|
|
|
66
66
|
// Fallback for Safari < 14.1, date with format yyyy-mm-dd over 1400 (API limit)
|
|
67
67
|
const pattern = '^(1[4-9]\\d{2}|2\\d{3})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$';
|
|
68
68
|
const range = this.rangeGetter();
|
|
69
|
-
return (h("form", { key: '
|
|
69
|
+
return (h("form", { key: '084dd9894f80b7cd42138f934103d90dae3b140f', class: "mt-4 grid grid-cols-[min-content_1fr] gap-2 px-2", onSubmit: (e) => {
|
|
70
70
|
e.preventDefault();
|
|
71
71
|
this.apply();
|
|
72
72
|
return false;
|
|
73
|
-
} }, h("label", { key: '
|
|
73
|
+
} }, h("label", { key: '2a47b82cec5373a0665c0ae28aaac525399b206b', part: "input-label", class: labelClasses, htmlFor: `${this.facetId}_start` }, startLabel, ":"), h("input", { key: 'f7035e188f43beb3694b66d2a4c9a718b909bfaa', id: `${this.facetId}_start`, part: "input-start", type: "date", ref: (ref) => (this.startRef = ref), class: inputClasses, "aria-label": startAria, placeholder: placeholder, pattern: pattern, required: true,
|
|
74
74
|
// API/Index minimum supported date
|
|
75
|
-
min: this.min || this.formattedDateValue('1401-01-01'), max: this.end ? this.formattedDateValue(this.end) : this.max, value: this.formattedDateValue(range?.start), onInput: (e) => (this.start = parseDate(e.target.value).toDate()) }), h("label", { key: '
|
|
75
|
+
min: this.min || this.formattedDateValue('1401-01-01'), max: this.end ? this.formattedDateValue(this.end) : this.max, value: this.formattedDateValue(range?.start), onInput: (e) => (this.start = parseDate(e.target.value).toDate()) }), h("label", { key: 'd3d8f0f24b787d73391d86c5f739e22c08775b42', part: "input-label", class: labelClasses, htmlFor: `${this.facetId}_end` }, endLabel, ":"), h("input", { key: '71b451d78fa4df94a5e219d6baefbd9306c74687', id: `${this.facetId}_end`, part: "input-end", type: "date", ref: (ref) => (this.endRef = ref), class: inputClasses, "aria-label": endAria, placeholder: placeholder, pattern: pattern, required: true, min: this.formattedDateValue(this.start) || this.min, max: this.max, value: this.formattedDateValue(range?.end), onInput: (e) => (this.end = parseDate(e.target.value).toDate()) }), h(Button, { key: '0346899f0f10ef0493367493a25d8fc9988bfc0a', style: "outline-primary", type: "submit", part: "input-apply-button", class: "col-span-2 truncate p-2.5", ariaLabel: applyAria, text: apply })));
|
|
76
76
|
}
|
|
77
77
|
}, [0, "atomic-stencil-facet-date-input", {
|
|
78
78
|
"bindings": [16],
|
|
@@ -73,7 +73,7 @@ const AtomicSuggestionRenderer = /*@__PURE__*/ proxyCustomElement(class AtomicSu
|
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
75
|
const isButton = !!(this.suggestion.onSelect || this.suggestion.query);
|
|
76
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '97ab3d71c92310e5371d7803a511f747855370f4', class: "contents" }, isButton ? (h("button", { id: this.id, key: this.suggestion.key, part: this.parts, class: this.classes, onMouseDown: (e) => e.preventDefault(), onClick: (e) => this.onClick?.(e), onMouseOver: (e) => this.onMouseOver?.(e), "data-query": this.suggestion.query, "aria-label": this.ariaLabel(isButton), ref: (el) => {
|
|
77
77
|
if (!el) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
@@ -59,7 +59,7 @@ const AtomicTabManager$1 = /*@__PURE__*/ proxyCustomElement(class AtomicTabManag
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '4ea1e2534d1a02ca62d7ac6ec6462252e3d562ee' }, h("atomic-tab-bar", { key: '98896c96e0599094edee87021c10c9fe6fbf3ab0' }, h("div", { key: '2087916e6bda8851a9296a194bbe0cdca44e6330', 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) {
|
|
@@ -303,13 +303,13 @@ __decorate([
|
|
|
303
303
|
property({ type: String, attribute: 'log-level', reflect: true })
|
|
304
304
|
], AtomicCommerceInterface.prototype, "logLevel", void 0);
|
|
305
305
|
__decorate([
|
|
306
|
-
property({ type: Object })
|
|
306
|
+
property({ type: Object, attribute: false })
|
|
307
307
|
], AtomicCommerceInterface.prototype, "i18n", void 0);
|
|
308
308
|
__decorate([
|
|
309
309
|
property({ type: String, attribute: 'language', reflect: true })
|
|
310
310
|
], AtomicCommerceInterface.prototype, "language", void 0);
|
|
311
311
|
__decorate([
|
|
312
|
-
property({ type: Object })
|
|
312
|
+
property({ type: Object, attribute: false })
|
|
313
313
|
], AtomicCommerceInterface.prototype, "engine", void 0);
|
|
314
314
|
__decorate([
|
|
315
315
|
property({
|
|
@@ -183,10 +183,10 @@ __decorate([
|
|
|
183
183
|
state()
|
|
184
184
|
], AtomicCommerceRecommendationInterface.prototype, "error", void 0);
|
|
185
185
|
__decorate([
|
|
186
|
-
property({ type: Object })
|
|
186
|
+
property({ type: Object, attribute: false })
|
|
187
187
|
], AtomicCommerceRecommendationInterface.prototype, "i18n", void 0);
|
|
188
188
|
__decorate([
|
|
189
|
-
property({ type: Object })
|
|
189
|
+
property({ type: Object, attribute: false })
|
|
190
190
|
], AtomicCommerceRecommendationInterface.prototype, "engine", void 0);
|
|
191
191
|
__decorate([
|
|
192
192
|
property({ type: String, attribute: 'scroll-container', reflect: true })
|
|
@@ -70,6 +70,7 @@ let AtomicCommerceRecommendationList = class AtomicCommerceRecommendationList ex
|
|
|
70
70
|
this.imageSize = 'small';
|
|
71
71
|
/**
|
|
72
72
|
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading label, from 1 to 6.
|
|
73
|
+
* When set to 0, a `div` will be used instead of an Heading Element.
|
|
73
74
|
*/
|
|
74
75
|
this.headingLevel = 0;
|
|
75
76
|
}
|
|
@@ -24,7 +24,7 @@ export const renderExpandableText = ({ props: { isExpanded, isTruncated, isColla
|
|
|
24
24
|
const buttonClasses = tw({
|
|
25
25
|
'expandable-text-button p-1 text-xs leading-[calc(1/.75)]': true,
|
|
26
26
|
invisible: !isTruncated && !isExpanded,
|
|
27
|
-
hidden:
|
|
27
|
+
hidden: isExpanded && (!isTruncated || !isCollapsible),
|
|
28
28
|
});
|
|
29
29
|
const buttonClassString = Object.entries(buttonClasses)
|
|
30
30
|
.filter(([, value]) => value)
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { AtomicInsightInterface } from './atomic-insight-interface/atomic-insight-interface.js';
|
|
1
|
+
export {};
|
|
@@ -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: 'cb496200417a7ae923ed216a520d31d6a413b2e8', 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: '1e48ce21159e66f154cb46bb3a83d0d973e54cd0', part: "label-start", class: labelClasses, htmlFor: `${this.filterState.facetId}_start` }, minText), h("input", { key: '9a2421c00463cd2f5c361553d94353a193bf2734', 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: '075914740e743b2e26818d902cc903a2610b913b', part: "label-end", class: labelClasses, htmlFor: `${this.filterState.facetId}_end` }, maxText), h("input", { key: '726e7ddaf3144b7e2d0f78e18c7d2f657d29a1dc', 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: '3bc6b01792661d0ca214cba22d1a00a5acd2f003', 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;MCjCa,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 {\n InteractiveItemContext,\n InteractiveItemContextEvent,\n ItemContext,\n ItemContextEvent,\n itemContext,\n} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * A [StencilJS property decorator](https://stenciljs.com/) to be used for product template components.\n * This allows the Stencil component to fetch the current product from its rendered parent, the `atomic-product` component.\n *\n * Example:\n * ```\n * @ProductContext() private product!: Product;\n * ```\n *\n * For more information and examples, view the [Utilities section](https://github.com/coveo/ui-kit/tree/master/packages/atomic#utilities) of the Coveo Atomic README.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `createProductContextController` from \\@/src/decorators/commerce/product-template-decorators.ts\n */\nexport function ProductContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-product', folded: opts.folded});\n}\n\nexport function InteractiveProductContext() {\n return InteractiveItemContext();\n}\n\nexport type ProductContextEvent<T = Product> = ItemContextEvent<T>;\nexport type InteractiveProductContextEvent = InteractiveItemContextEvent;\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}
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;MCjCa,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 {\n InteractiveItemContext,\n InteractiveItemContextEvent,\n ItemContext,\n ItemContextEvent,\n itemContext,\n} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * A [StencilJS property decorator](https://stenciljs.com/) to be used for product template components.\n * This allows the Stencil component to fetch the current product from its rendered parent, the `atomic-product` component.\n *\n * Example:\n * ```\n * @ProductContext() private product!: Product;\n * ```\n *\n * For more information and examples, view the [Utilities section](https://github.com/coveo/ui-kit/tree/master/packages/atomic#utilities) of the Coveo Atomic README.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `createProductContextController` from \\@/src/decorators/commerce/product-template-decorators.ts\n */\nexport function ProductContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-product', folded: opts.folded});\n}\n\nexport function InteractiveProductContext() {\n return InteractiveItemContext();\n}\n\nexport type ProductContextEvent<T = Product> = ItemContextEvent<T>;\nexport type InteractiveProductContextEvent = InteractiveItemContextEvent;\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}
|