@coveo/atomic 3.33.8-pre.32aa53b021 → 3.33.8-pre.32dc00f676
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 +4 -0
- package/dist/atomic/components/_index.js +21 -19
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/atomic-category-facet.js +2 -2
- package/dist/atomic/components/atomic-category-facet.js.map +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.d.ts +11 -0
- package/dist/atomic/components/atomic-facet.js +470 -0
- package/dist/atomic/components/atomic-facet.js.map +1 -0
- package/dist/atomic/components/atomic-field-condition.js +1 -1
- package/dist/atomic/components/atomic-field-condition.js.map +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 +4 -37
- package/dist/atomic/components/atomic-insight-facet.js.map +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 +2 -2
- package/dist/atomic/components/atomic-insight-numeric-facet.js.map +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 +2 -2
- package/dist/atomic/components/atomic-insight-result-action.js.map +1 -1
- package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +2 -2
- package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js.map +1 -1
- package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js +2 -2
- package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js.map +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 +2 -2
- package/dist/atomic/components/atomic-insight-result-quickview-action.js.map +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 +2 -2
- package/dist/atomic/components/atomic-ipx-result-link.js.map +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 -3
- package/dist/atomic/components/atomic-numeric-facet.js.map +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-quickview-modal2.js +1 -1
- package/dist/atomic/components/atomic-quickview.js +2 -2
- package/dist/atomic/components/atomic-quickview.js.map +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 +1 -46
- package/dist/atomic/components/atomic-relevance-inspector.js.map +1 -1
- package/dist/atomic/components/atomic-relevance-inspector2.js +50 -0
- package/dist/atomic/components/atomic-relevance-inspector2.js.map +1 -0
- package/dist/atomic/components/atomic-result-badge.js +1 -1
- package/dist/atomic/components/atomic-result-badge.js.map +1 -1
- package/dist/atomic/components/atomic-result-children.js +2 -2
- package/dist/atomic/components/atomic-result-children.js.map +1 -1
- package/dist/atomic/components/atomic-result-date.js +1 -1
- package/dist/atomic/components/atomic-result-date.js.map +1 -1
- package/dist/atomic/components/atomic-result-fields-list.js +2 -2
- package/dist/atomic/components/atomic-result-fields-list.js.map +1 -1
- package/dist/atomic/components/atomic-result-html.js +1 -1
- package/dist/atomic/components/atomic-result-html.js.map +1 -1
- package/dist/atomic/components/atomic-result-icon.js +1 -1
- package/dist/atomic/components/atomic-result-icon.js.map +1 -1
- package/dist/atomic/components/atomic-result-image.js +1 -1
- package/dist/atomic/components/atomic-result-image.js.map +1 -1
- package/dist/atomic/components/atomic-result-link.js +2 -2
- package/dist/atomic/components/atomic-result-link.js.map +1 -1
- package/dist/atomic/components/atomic-result-list.js +1 -1
- package/dist/atomic/components/atomic-result-localized-text.js +1 -1
- package/dist/atomic/components/atomic-result-localized-text.js.map +1 -1
- package/dist/atomic/components/atomic-result-multi-value-text.js +1 -1
- package/dist/atomic/components/atomic-result-multi-value-text.js.map +1 -1
- package/dist/atomic/components/atomic-result-number.js +1 -1
- package/dist/atomic/components/atomic-result-number.js.map +1 -1
- package/dist/atomic/components/atomic-result-placeholder2.js +2 -2
- package/dist/atomic/components/atomic-result-printable-uri.js +1 -1
- package/dist/atomic/components/atomic-result-printable-uri.js.map +1 -1
- package/dist/atomic/components/atomic-result-rating.js +1 -1
- package/dist/atomic/components/atomic-result-rating.js.map +1 -1
- package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
- package/dist/atomic/components/atomic-result-text2.js +1 -1
- package/dist/atomic/components/atomic-result-text2.js.map +1 -1
- package/dist/atomic/components/atomic-result-timespan.js +1 -1
- package/dist/atomic/components/atomic-result-timespan.js.map +1 -1
- package/dist/atomic/components/atomic-result2.js.map +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-search-interface.d.ts +11 -0
- package/dist/atomic/components/atomic-search-interface.js +552 -0
- package/dist/atomic/components/atomic-search-interface.js.map +1 -0
- 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-smart-snippet-source2.js.map +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 +50 -8
- package/dist/atomic/components/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.js +2 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +25 -10
- package/dist/atomic/components/components/commerce/atomic-product-children/atomic-product-children.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-description/atomic-product-description.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-excerpt/atomic-product-excerpt.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-image/atomic-product-image.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.js +2 -1
- package/dist/atomic/components/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-numeric-field-value/atomic-product-numeric-field-value.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-price/atomic-product-price.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-product-text/atomic-product-text.js +1 -1
- package/dist/atomic/components/components/commerce/product-template-component-utils/context/interactive-product-context-controller.js +25 -0
- package/dist/atomic/components/components/commerce/product-template-component-utils/context/product-context-controller.js +29 -0
- package/dist/atomic/components/components/common/formats/format-common.js +1 -1
- package/dist/atomic/components/components/search/atomic-search-layout/atomic-search-layout.js +9 -20
- package/dist/atomic/components/components/search/index.js +0 -2
- package/dist/atomic/components/components/search/lazy-index.js +0 -2
- package/dist/atomic/components/depends-on.js +28 -28
- package/dist/atomic/components/depends-on.js.map +1 -1
- package/dist/atomic/components/{stencil-facet-guard.js → facet-guard.js} +1 -2
- package/dist/atomic/components/facet-guard.js.map +1 -0
- package/dist/atomic/components/facet-number-input.js +2 -2
- package/dist/atomic/components/format-common.js.map +1 -1
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/index.js.map +1 -1
- package/dist/atomic/components/stencil-facet-value.js +39 -0
- package/dist/atomic/components/stencil-facet-value.js.map +1 -0
- package/dist/atomic/components/{result-template-decorators.js → stencil-result-template-decorators.js} +6 -2
- package/dist/atomic/components/stencil-result-template-decorators.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/index.esm.js +1 -1
- package/dist/atomic/index.esm.js.map +1 -1
- package/dist/atomic/{p-0c8e7d5f.entry.js → p-0112f957.entry.js} +2 -2
- package/dist/atomic/p-0112f957.entry.js.map +1 -0
- package/dist/atomic/{p-41c5d5fa.entry.js → p-021f01d6.entry.js} +2 -2
- package/dist/atomic/{p-a3fa6695.entry.js → p-035f8dc8.entry.js} +2 -2
- package/dist/atomic/{p-a4d277c7.entry.js → p-037de646.entry.js} +2 -2
- package/dist/atomic/p-037de646.entry.js.map +1 -0
- package/dist/atomic/{p-2f8de0b9.entry.js → p-07fbb49a.entry.js} +2 -2
- package/dist/atomic/{p-c8d29aa6.entry.js → p-10145d71.entry.js} +2 -2
- package/dist/atomic/p-10145d71.entry.js.map +1 -0
- package/dist/atomic/p-1992b245.entry.js +2 -0
- package/dist/atomic/{p-2ac75719.entry.js → p-1d1f54a5.entry.js} +2 -2
- package/dist/atomic/{p-aa3ac5aa.js → p-1f059522.js} +1 -1
- package/dist/atomic/p-1f059522.js.map +1 -0
- package/dist/atomic/{p-10b5e0f3.entry.js → p-20341936.entry.js} +2 -2
- package/dist/atomic/p-25a96534.js.map +1 -1
- package/dist/atomic/{p-3213225f.entry.js → p-26a51a77.entry.js} +2 -2
- package/dist/atomic/{p-15406648.entry.js → p-2ca352f4.entry.js} +2 -2
- package/dist/atomic/{p-dee60597.entry.js → p-2cad01bf.entry.js} +2 -2
- package/dist/atomic/p-2cad01bf.entry.js.map +1 -0
- package/dist/atomic/{p-926fe2d7.entry.js → p-2ce8220a.entry.js} +2 -2
- package/dist/atomic/{p-7a6468a7.entry.js → p-36fab158.entry.js} +2 -2
- package/dist/atomic/{p-9727f36b.entry.js → p-37374964.entry.js} +2 -2
- package/dist/atomic/{p-5adbf098.entry.js → p-3b023e83.entry.js} +2 -2
- package/dist/atomic/{p-0610b3e7.entry.js → p-3b20b011.entry.js} +2 -2
- package/dist/atomic/{p-e9dc8e90.entry.js → p-3ec45f9c.entry.js} +2 -2
- package/dist/atomic/p-3ec45f9c.entry.js.map +1 -0
- package/dist/atomic/{p-0bc9b088.js → p-3f2a66df.js} +2 -2
- package/dist/atomic/{p-c08f4ee6.entry.js → p-3f912e98.entry.js} +2 -2
- package/dist/atomic/{p-9e771351.entry.js → p-40635c2d.entry.js} +2 -2
- package/dist/atomic/{p-18684d4c.js → p-4080f740.js} +1 -1
- package/dist/atomic/p-4080f740.js.map +1 -0
- package/dist/atomic/{p-c9fe4f77.entry.js → p-43d708cb.entry.js} +2 -2
- package/dist/atomic/{p-b0c50194.entry.js → p-48f57fd8.entry.js} +2 -2
- package/dist/atomic/{p-e514cdb2.entry.js → p-4a74f4a3.entry.js} +2 -2
- package/dist/atomic/{p-24df7251.entry.js → p-4c2f230f.entry.js} +2 -2
- package/dist/atomic/{p-190ddaca.entry.js → p-4cf97b0a.entry.js} +2 -2
- package/dist/atomic/p-4cf97b0a.entry.js.map +1 -0
- package/dist/atomic/p-508b63e7.entry.js.map +1 -1
- package/dist/atomic/{p-1140ac4d.entry.js → p-52976c12.entry.js} +2 -2
- package/dist/atomic/{p-f0012580.entry.js → p-594488f2.entry.js} +2 -2
- package/dist/atomic/{p-78427c6a.entry.js → p-5a9460ab.entry.js} +2 -2
- package/dist/atomic/p-5a9460ab.entry.js.map +1 -0
- package/dist/atomic/p-5ca21deb.js +2 -0
- package/dist/atomic/p-5ca21deb.js.map +1 -0
- package/dist/atomic/{p-8df7270f.entry.js → p-5d19faa4.entry.js} +2 -2
- package/dist/atomic/p-5d19faa4.entry.js.map +1 -0
- package/dist/atomic/{p-b4ad3036.entry.js → p-5f1fa581.entry.js} +2 -2
- package/dist/atomic/{p-d50c96c2.entry.js → p-627e1265.entry.js} +2 -2
- package/dist/atomic/{p-004adbb8.entry.js → p-6329ff94.entry.js} +2 -2
- package/dist/atomic/{p-1ff7a9da.entry.js → p-6a3b139f.entry.js} +2 -2
- package/dist/atomic/p-6a3b139f.entry.js.map +1 -0
- package/dist/atomic/{p-e3af1bb4.entry.js → p-6e6d686e.entry.js} +2 -2
- package/dist/atomic/{p-79a9a372.entry.js → p-744da781.entry.js} +2 -2
- package/dist/atomic/{p-a3f27d57.entry.js → p-7626e460.entry.js} +2 -2
- package/dist/atomic/p-7626e460.entry.js.map +1 -0
- package/dist/atomic/{p-c7800a24.entry.js → p-7a50539b.entry.js} +2 -2
- package/dist/atomic/p-7a50539b.entry.js.map +1 -0
- package/dist/atomic/{p-97e42c43.entry.js → p-7ca7b237.entry.js} +2 -2
- package/dist/atomic/p-7ca7b237.entry.js.map +1 -0
- package/dist/atomic/{p-7fe2dfcd.entry.js → p-7dcf636e.entry.js} +2 -2
- package/dist/atomic/p-7dcf636e.entry.js.map +1 -0
- package/dist/atomic/{p-e6a7e7b2.entry.js → p-7dfcd6af.entry.js} +2 -2
- package/dist/atomic/{p-9147b0db.entry.js → p-8256cd44.entry.js} +2 -2
- package/dist/atomic/{p-0e27d4f2.entry.js → p-83c9244a.entry.js} +2 -2
- package/dist/atomic/{p-454a0328.entry.js → p-87948ac1.entry.js} +2 -2
- package/dist/atomic/p-87948ac1.entry.js.map +1 -0
- package/dist/atomic/{p-828cea10.entry.js → p-89ab44de.entry.js} +2 -2
- package/dist/atomic/{p-b3f6561d.entry.js → p-8e964890.entry.js} +2 -2
- package/dist/atomic/p-8e964890.entry.js.map +1 -0
- package/dist/atomic/{p-4b1bf2fd.entry.js → p-91c0917f.entry.js} +2 -2
- package/dist/atomic/{p-8fb8c4f0.entry.js → p-92548ab6.entry.js} +2 -2
- package/dist/atomic/p-92548ab6.entry.js.map +1 -0
- package/dist/atomic/{p-bd99fcc1.entry.js → p-939eaaac.entry.js} +2 -2
- package/dist/atomic/{p-9b92b4e2.entry.js → p-93e29b24.entry.js} +2 -2
- package/dist/atomic/{p-dbf0c5a3.entry.js → p-9564d67d.entry.js} +2 -2
- package/dist/atomic/{p-dbf0c5a3.entry.js.map → p-9564d67d.entry.js.map} +1 -1
- package/dist/atomic/{p-b6377fb6.entry.js → p-98c5b9b8.entry.js} +2 -2
- package/dist/atomic/{p-bf49fed3.entry.js → p-99b8d52d.entry.js} +2 -2
- package/dist/atomic/{p-98da2a98.entry.js → p-9f5590f6.entry.js} +2 -2
- package/dist/atomic/{p-160553ce.entry.js → p-a3efa89e.entry.js} +2 -2
- package/dist/atomic/{p-8a00adbe.entry.js → p-a425653f.entry.js} +2 -2
- package/dist/atomic/p-a425653f.entry.js.map +1 -0
- package/dist/atomic/{p-c538c8ac.entry.js → p-a53c7821.entry.js} +2 -2
- package/dist/atomic/{p-85f165af.entry.js → p-a8882a2a.entry.js} +2 -2
- package/dist/atomic/p-a9b32844.entry.js +2 -0
- package/dist/atomic/p-a9b32844.entry.js.map +1 -0
- package/dist/atomic/{p-c9f1790d.entry.js → p-acb1704c.entry.js} +2 -2
- package/dist/atomic/p-acb1704c.entry.js.map +1 -0
- package/dist/atomic/{p-e7c6a479.entry.js → p-ada63017.entry.js} +2 -2
- package/dist/atomic/p-ada63017.entry.js.map +1 -0
- package/dist/atomic/{p-ce41c447.entry.js → p-ae060711.entry.js} +2 -2
- package/dist/atomic/{p-b4c34553.entry.js → p-b0b17e21.entry.js} +2 -2
- package/dist/atomic/{p-e1c99e2e.entry.js → p-b2ff1330.entry.js} +2 -2
- package/dist/atomic/{p-618c6967.entry.js → p-b6963bae.entry.js} +2 -2
- package/dist/atomic/{p-08794435.entry.js → p-ba650801.entry.js} +2 -2
- package/dist/atomic/p-bde76abf.entry.js +2 -0
- package/dist/atomic/p-bde76abf.entry.js.map +1 -0
- package/dist/atomic/{p-0e5dc57f.entry.js → p-c126ee6b.entry.js} +2 -2
- package/dist/atomic/{p-754909fe.entry.js → p-c1999888.entry.js} +2 -2
- package/dist/atomic/{p-ca762513.entry.js → p-c889adbd.entry.js} +2 -2
- package/dist/atomic/{p-00a6ab8c.entry.js → p-d0f47b33.entry.js} +2 -2
- package/dist/atomic/{p-8a7a23b7.entry.js → p-d2173f4d.entry.js} +2 -2
- package/dist/atomic/{p-8a7a23b7.entry.js.map → p-d2173f4d.entry.js.map} +1 -1
- package/dist/atomic/p-d24d34a7.entry.js +2 -0
- package/dist/atomic/{p-7f40e57d.entry.js → p-d364064c.entry.js} +2 -2
- package/dist/atomic/p-d716d680.entry.js +2 -0
- package/dist/atomic/p-d716d680.entry.js.map +1 -0
- package/dist/atomic/{p-856e858c.entry.js → p-d785121d.entry.js} +2 -2
- package/dist/atomic/{p-7b1a3cab.entry.js → p-d84c70b4.entry.js} +2 -2
- package/dist/atomic/p-d84c70b4.entry.js.map +1 -0
- package/dist/atomic/{p-7d63bf7b.entry.js → p-d93adf52.entry.js} +2 -2
- package/dist/atomic/p-dafbe2ef.js +2 -0
- package/dist/atomic/p-dafbe2ef.js.map +1 -0
- package/dist/atomic/{p-2a4e9425.entry.js → p-de066001.entry.js} +2 -2
- package/dist/atomic/{p-945ddd53.entry.js → p-e1dbe31d.entry.js} +2 -2
- package/dist/atomic/p-e1dbe31d.entry.js.map +1 -0
- package/dist/atomic/{p-441b1a7b.entry.js → p-e23b3334.entry.js} +2 -2
- package/dist/atomic/p-e2afb475.entry.js +2 -0
- package/dist/atomic/{p-bd32625e.entry.js → p-ea446721.entry.js} +2 -2
- package/dist/atomic/{p-07b6424c.entry.js → p-ee6771f1.entry.js} +2 -2
- package/dist/atomic/{p-abb14108.entry.js → p-f0c2dfe8.entry.js} +2 -2
- package/dist/atomic/{p-9d023f0b.entry.js → p-f1137562.entry.js} +2 -2
- package/dist/atomic/p-f1137562.entry.js.map +1 -0
- package/dist/atomic/{p-cc68642f.entry.js → p-f289269f.entry.js} +2 -2
- package/dist/atomic/{p-3c532cda.entry.js → p-f3777dfa.entry.js} +2 -2
- package/dist/atomic/p-f3777dfa.entry.js.map +1 -0
- package/dist/atomic/{p-fa376d3d.entry.js → p-f5b58a15.entry.js} +2 -2
- package/dist/atomic/p-f5b58a15.entry.js.map +1 -0
- package/dist/atomic/{p-fbe37f4b.entry.js → p-f8d62605.entry.js} +2 -2
- package/dist/atomic/{p-bdbbb47b.entry.js → p-f8ded37c.entry.js} +2 -2
- package/dist/atomic/{p-d4ad7336.entry.js → p-fa8b7c4c.entry.js} +2 -2
- package/dist/atomic/{p-fb1a1e2e.entry.js → p-fbfe913d.entry.js} +2 -2
- package/dist/atomic/p-fcf3f7d7.entry.js +2 -0
- package/dist/atomic/{p-6de44060.entry.js.map → p-fcf3f7d7.entry.js.map} +1 -1
- package/dist/atomic/{p-f936f55e.entry.js → p-fea7bf3b.entry.js} +2 -2
- package/dist/cjs/_index.cjs.js +20 -20
- package/dist/cjs/_loader.cjs.js +1 -1
- package/dist/cjs/{analytics-config-b8cf7dfc.js → analytics-config-fac0aa98.js} +2 -2
- package/dist/cjs/{analytics-config-b8cf7dfc.js.map → analytics-config-fac0aa98.js.map} +1 -1
- package/dist/cjs/atomic-category-facet.cjs.entry.js +3 -3
- package/dist/cjs/atomic-category-facet.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-citation.cjs.entry.js +1 -1
- package/dist/cjs/atomic-color-facet.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 +453 -0
- package/dist/cjs/atomic-facet.cjs.entry.js.map +1 -0
- package/dist/cjs/atomic-field-condition.cjs.entry.js +2 -2
- package/dist/cjs/atomic-field-condition.cjs.entry.js.map +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 +11 -39
- package/dist/cjs/atomic-insight-facet.cjs.entry.js.map +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 +3 -3
- package/dist/cjs/atomic-insight-numeric-facet.cjs.entry.js.map +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 +3 -3
- package/dist/cjs/atomic-insight-result-action.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +3 -3
- package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js +3 -3
- package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js.map +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 +3 -3
- package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js.map +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-timeframe-facet.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 +4 -4
- package/dist/cjs/atomic-ipx-result-link.cjs.entry.js.map +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 +3 -4
- package/dist/cjs/atomic-numeric-facet.cjs.entry.js.map +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-quickview-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-quickview.cjs.entry.js +3 -3
- package/dist/cjs/atomic-quickview.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-rating-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-rating-range-facet.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-badge.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-children.cjs.entry.js +3 -3
- package/dist/cjs/atomic-result-children.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-date.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-date.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-fields-list.cjs.entry.js +3 -3
- package/dist/cjs/atomic-result-fields-list.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-html.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-html.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-icon.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-image.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-image.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-link.cjs.entry.js +4 -4
- package/dist/cjs/atomic-result-link.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-localized-text.cjs.entry.js +3 -3
- package/dist/cjs/atomic-result-localized-text.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-number.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-number.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +3 -3
- package/dist/cjs/atomic-result-printable-uri.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-printable-uri.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-rating.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-rating.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-text_2.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-text_2.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-timespan.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-timespan.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result.cjs.entry.js.map +1 -1
- 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-search-interface.cjs.entry.js +511 -0
- package/dist/cjs/atomic-search-interface.cjs.entry.js.map +1 -0
- package/dist/cjs/atomic-segmented-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +2 -2
- package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js.map +1 -1
- 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-timeframe-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic.cjs.js +1 -1
- package/dist/cjs/depends-on-f0cf3617.js +68 -0
- package/dist/cjs/depends-on-f0cf3617.js.map +1 -0
- package/dist/cjs/{stencil-facet-guard-9573df7f.js → facet-guard-328b588d.js} +1 -2
- package/dist/cjs/facet-guard-328b588d.js.map +1 -0
- package/dist/cjs/format-common-4aa8aa88.js.map +1 -1
- package/dist/cjs/index-757bc886.js +12 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/stencil-facet-value-e67c9332.js +41 -0
- package/dist/cjs/stencil-facet-value-e67c9332.js.map +1 -0
- package/dist/cjs/{result-template-decorators-432d11a9.js → stencil-result-template-decorators-28b05aaf.js} +6 -2
- package/dist/cjs/stencil-result-template-decorators-28b05aaf.js.map +1 -0
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/_index.js +19 -19
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-568c4df9.js → analytics-config-1e38fa5f.js} +2 -2
- package/dist/esm/{analytics-config-568c4df9.js.map → analytics-config-1e38fa5f.js.map} +1 -1
- package/dist/esm/atomic-category-facet.entry.js +3 -3
- package/dist/esm/atomic-category-facet.entry.js.map +1 -1
- package/dist/esm/atomic-citation.entry.js +1 -1
- package/dist/esm/atomic-color-facet.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 +449 -0
- package/dist/esm/atomic-facet.entry.js.map +1 -0
- package/dist/esm/atomic-field-condition.entry.js +1 -1
- package/dist/esm/atomic-field-condition.entry.js.map +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 +11 -39
- package/dist/esm/atomic-insight-facet.entry.js.map +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 +3 -3
- package/dist/esm/atomic-insight-numeric-facet.entry.js.map +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 +2 -2
- package/dist/esm/atomic-insight-result-action.entry.js.map +1 -1
- package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +2 -2
- package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js.map +1 -1
- package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js +2 -2
- package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js.map +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 +2 -2
- package/dist/esm/atomic-insight-result-quickview-action.entry.js.map +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-timeframe-facet.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 +2 -2
- package/dist/esm/atomic-ipx-result-link.entry.js.map +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 +3 -4
- package/dist/esm/atomic-numeric-facet.entry.js.map +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-quickview-modal.entry.js +1 -1
- package/dist/esm/atomic-quickview.entry.js +2 -2
- package/dist/esm/atomic-quickview.entry.js.map +1 -1
- package/dist/esm/atomic-rating-facet.entry.js +1 -1
- package/dist/esm/atomic-rating-range-facet.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-badge.entry.js +1 -1
- package/dist/esm/atomic-result-badge.entry.js.map +1 -1
- package/dist/esm/atomic-result-children.entry.js +2 -2
- package/dist/esm/atomic-result-children.entry.js.map +1 -1
- package/dist/esm/atomic-result-date.entry.js +1 -1
- package/dist/esm/atomic-result-date.entry.js.map +1 -1
- package/dist/esm/atomic-result-fields-list.entry.js +2 -2
- package/dist/esm/atomic-result-fields-list.entry.js.map +1 -1
- package/dist/esm/atomic-result-html.entry.js +1 -1
- package/dist/esm/atomic-result-html.entry.js.map +1 -1
- package/dist/esm/atomic-result-icon.entry.js +1 -1
- package/dist/esm/atomic-result-icon.entry.js.map +1 -1
- package/dist/esm/atomic-result-image.entry.js +1 -1
- package/dist/esm/atomic-result-image.entry.js.map +1 -1
- package/dist/esm/atomic-result-link.entry.js +2 -2
- package/dist/esm/atomic-result-link.entry.js.map +1 -1
- package/dist/esm/atomic-result-list.entry.js +1 -1
- package/dist/esm/atomic-result-localized-text.entry.js +2 -2
- package/dist/esm/atomic-result-localized-text.entry.js.map +1 -1
- package/dist/esm/atomic-result-multi-value-text.entry.js +1 -1
- package/dist/esm/atomic-result-multi-value-text.entry.js.map +1 -1
- package/dist/esm/atomic-result-number.entry.js +1 -1
- package/dist/esm/atomic-result-number.entry.js.map +1 -1
- package/dist/esm/atomic-result-placeholder_8.entry.js +3 -3
- package/dist/esm/atomic-result-printable-uri.entry.js +1 -1
- package/dist/esm/atomic-result-printable-uri.entry.js.map +1 -1
- package/dist/esm/atomic-result-rating.entry.js +1 -1
- package/dist/esm/atomic-result-rating.entry.js.map +1 -1
- package/dist/esm/atomic-result-text_2.entry.js +1 -1
- package/dist/esm/atomic-result-text_2.entry.js.map +1 -1
- package/dist/esm/atomic-result-timespan.entry.js +1 -1
- package/dist/esm/atomic-result-timespan.entry.js.map +1 -1
- package/dist/esm/atomic-result.entry.js.map +1 -1
- 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-search-interface.entry.js +507 -0
- package/dist/esm/atomic-search-interface.entry.js.map +1 -0
- package/dist/esm/atomic-segmented-facet.entry.js +1 -1
- package/dist/esm/atomic-smart-snippet-answer_2.entry.js +2 -2
- package/dist/esm/atomic-smart-snippet-answer_2.entry.js.map +1 -1
- 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-timeframe-facet.entry.js +1 -1
- package/dist/esm/atomic.js +1 -1
- package/dist/esm/depends-on-20dabb86.js +66 -0
- package/dist/esm/depends-on-20dabb86.js.map +1 -0
- package/dist/esm/{stencil-facet-guard-edbfa966.js → facet-guard-4b795e90.js} +1 -2
- package/dist/esm/facet-guard-4b795e90.js.map +1 -0
- package/dist/esm/format-common-274e0f7c.js.map +1 -1
- package/dist/esm/index-3f35faca.js +12 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stencil-facet-value-30dc9b6c.js +39 -0
- package/dist/esm/stencil-facet-value-30dc9b6c.js.map +1 -0
- package/dist/esm/{result-template-decorators-2ed76ea9.js → stencil-result-template-decorators-f989bc6b.js} +6 -2
- package/dist/esm/stencil-result-template-decorators-f989bc6b.js.map +1 -0
- package/dist/esm/version.js +2 -2
- package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +30 -2
- package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +1 -0
- package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +1 -1
- package/dist/types/components/commerce/product-template-component-utils/context/fetch-product-context.d.ts +12 -0
- package/dist/types/components/commerce/product-template-component-utils/context/interactive-product-context-controller.d.ts +27 -0
- package/dist/types/components/commerce/product-template-component-utils/context/product-context-controller.d.ts +33 -0
- package/dist/types/components/commerce/product-template-component-utils/{stencil-product-template-decorators.d.ts → context/stencil-product-template-decorators.d.ts} +1 -1
- package/dist/types/components/common/smart-snippets/atomic-smart-snippet-source.d.ts +1 -1
- package/dist/types/components/search/atomic-result/atomic-result.d.ts +1 -1
- package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +44 -46
- package/dist/types/components/search/atomic-search-interface/interfaces.d.ts +1 -2
- package/dist/types/components/search/atomic-search-layout/atomic-search-layout.d.ts +1 -3
- package/dist/types/components/search/{atomic-facet → facets/atomic-facet}/atomic-facet.d.ts +9 -13
- package/dist/types/components/search/index.d.ts +0 -2
- package/dist/types/components/search/result-template-component-utils/context/fetch-result-context.d.ts +8 -0
- package/dist/types/components/search/result-template-component-utils/context/interactive-result-context-controller.d.ts +12 -0
- package/dist/types/components/search/result-template-component-utils/context/result-context-controller.d.ts +18 -0
- package/dist/types/components/search/{result-template-components/result-template-decorators.d.ts → result-template-component-utils/context/stencil-result-template-decorators.d.ts} +6 -2
- package/dist/types/components.d.ts +338 -2
- package/dist/types/index.d.ts +3 -3
- package/docs/atomic-docs.json +7288 -6008
- package/package.json +4 -4
- package/dist/atomic/components/components/common/facets/depends-on.js +0 -62
- package/dist/atomic/components/components/common/facets/popover/popover-type.js +0 -5
- package/dist/atomic/components/components/common/item-list/fetch-item-context.js +0 -15
- package/dist/atomic/components/components/search/atomic-facet/atomic-facet.js +0 -613
- package/dist/atomic/components/components/search/atomic-search-interface/analytics-config.js +0 -57
- package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +0 -495
- package/dist/atomic/components/decorators/commerce/product-template-decorators.js +0 -68
- package/dist/atomic/components/result-template-decorators.js.map +0 -1
- package/dist/atomic/components/stencil-facet-guard.js.map +0 -1
- package/dist/atomic/p-0c8e7d5f.entry.js.map +0 -1
- package/dist/atomic/p-0edea6f9.entry.js +0 -2
- package/dist/atomic/p-0f13077e.js +0 -2
- package/dist/atomic/p-0f13077e.js.map +0 -1
- package/dist/atomic/p-18684d4c.js.map +0 -1
- package/dist/atomic/p-190ddaca.entry.js.map +0 -1
- package/dist/atomic/p-1ff7a9da.entry.js.map +0 -1
- package/dist/atomic/p-3c532cda.entry.js.map +0 -1
- package/dist/atomic/p-454a0328.entry.js.map +0 -1
- package/dist/atomic/p-4cb7756c.entry.js +0 -2
- package/dist/atomic/p-4cb7756c.entry.js.map +0 -1
- package/dist/atomic/p-6de44060.entry.js +0 -2
- package/dist/atomic/p-78427c6a.entry.js.map +0 -1
- package/dist/atomic/p-7b1a3cab.entry.js.map +0 -1
- package/dist/atomic/p-7fe2dfcd.entry.js.map +0 -1
- package/dist/atomic/p-8a00adbe.entry.js.map +0 -1
- package/dist/atomic/p-8df7270f.entry.js.map +0 -1
- package/dist/atomic/p-8fb8c4f0.entry.js.map +0 -1
- package/dist/atomic/p-945ddd53.entry.js.map +0 -1
- package/dist/atomic/p-97829295.entry.js +0 -2
- package/dist/atomic/p-97e42c43.entry.js.map +0 -1
- package/dist/atomic/p-9d023f0b.entry.js.map +0 -1
- package/dist/atomic/p-a3f27d57.entry.js.map +0 -1
- package/dist/atomic/p-a4d277c7.entry.js.map +0 -1
- package/dist/atomic/p-aa3ac5aa.js.map +0 -1
- package/dist/atomic/p-b3f6561d.entry.js.map +0 -1
- package/dist/atomic/p-c2b4b401.entry.js +0 -2
- package/dist/atomic/p-c7800a24.entry.js.map +0 -1
- package/dist/atomic/p-c8d29aa6.entry.js.map +0 -1
- package/dist/atomic/p-c9f1790d.entry.js.map +0 -1
- package/dist/atomic/p-dee60597.entry.js.map +0 -1
- package/dist/atomic/p-e7c6a479.entry.js.map +0 -1
- package/dist/atomic/p-e9dc8e90.entry.js.map +0 -1
- package/dist/atomic/p-fa376d3d.entry.js.map +0 -1
- package/dist/cjs/depends-on-0d4e4f15.js +0 -68
- package/dist/cjs/depends-on-0d4e4f15.js.map +0 -1
- package/dist/cjs/result-template-decorators-432d11a9.js.map +0 -1
- package/dist/cjs/stencil-facet-guard-9573df7f.js.map +0 -1
- package/dist/esm/depends-on-d73b0ce3.js +0 -66
- package/dist/esm/depends-on-d73b0ce3.js.map +0 -1
- package/dist/esm/result-template-decorators-2ed76ea9.js.map +0 -1
- package/dist/esm/stencil-facet-guard-edbfa966.js.map +0 -1
- package/dist/types/decorators/commerce/product-template-decorators.d.ts +0 -68
- /package/dist/atomic/{p-41c5d5fa.entry.js.map → p-021f01d6.entry.js.map} +0 -0
- /package/dist/atomic/{p-a3fa6695.entry.js.map → p-035f8dc8.entry.js.map} +0 -0
- /package/dist/atomic/{p-2f8de0b9.entry.js.map → p-07fbb49a.entry.js.map} +0 -0
- /package/dist/atomic/{p-0edea6f9.entry.js.map → p-1992b245.entry.js.map} +0 -0
- /package/dist/atomic/{p-2ac75719.entry.js.map → p-1d1f54a5.entry.js.map} +0 -0
- /package/dist/atomic/{p-10b5e0f3.entry.js.map → p-20341936.entry.js.map} +0 -0
- /package/dist/atomic/{p-3213225f.entry.js.map → p-26a51a77.entry.js.map} +0 -0
- /package/dist/atomic/{p-15406648.entry.js.map → p-2ca352f4.entry.js.map} +0 -0
- /package/dist/atomic/{p-926fe2d7.entry.js.map → p-2ce8220a.entry.js.map} +0 -0
- /package/dist/atomic/{p-7a6468a7.entry.js.map → p-36fab158.entry.js.map} +0 -0
- /package/dist/atomic/{p-9727f36b.entry.js.map → p-37374964.entry.js.map} +0 -0
- /package/dist/atomic/{p-5adbf098.entry.js.map → p-3b023e83.entry.js.map} +0 -0
- /package/dist/atomic/{p-0610b3e7.entry.js.map → p-3b20b011.entry.js.map} +0 -0
- /package/dist/atomic/{p-0bc9b088.js.map → p-3f2a66df.js.map} +0 -0
- /package/dist/atomic/{p-c08f4ee6.entry.js.map → p-3f912e98.entry.js.map} +0 -0
- /package/dist/atomic/{p-9e771351.entry.js.map → p-40635c2d.entry.js.map} +0 -0
- /package/dist/atomic/{p-c9fe4f77.entry.js.map → p-43d708cb.entry.js.map} +0 -0
- /package/dist/atomic/{p-b0c50194.entry.js.map → p-48f57fd8.entry.js.map} +0 -0
- /package/dist/atomic/{p-e514cdb2.entry.js.map → p-4a74f4a3.entry.js.map} +0 -0
- /package/dist/atomic/{p-24df7251.entry.js.map → p-4c2f230f.entry.js.map} +0 -0
- /package/dist/atomic/{p-1140ac4d.entry.js.map → p-52976c12.entry.js.map} +0 -0
- /package/dist/atomic/{p-f0012580.entry.js.map → p-594488f2.entry.js.map} +0 -0
- /package/dist/atomic/{p-b4ad3036.entry.js.map → p-5f1fa581.entry.js.map} +0 -0
- /package/dist/atomic/{p-d50c96c2.entry.js.map → p-627e1265.entry.js.map} +0 -0
- /package/dist/atomic/{p-004adbb8.entry.js.map → p-6329ff94.entry.js.map} +0 -0
- /package/dist/atomic/{p-e3af1bb4.entry.js.map → p-6e6d686e.entry.js.map} +0 -0
- /package/dist/atomic/{p-79a9a372.entry.js.map → p-744da781.entry.js.map} +0 -0
- /package/dist/atomic/{p-e6a7e7b2.entry.js.map → p-7dfcd6af.entry.js.map} +0 -0
- /package/dist/atomic/{p-9147b0db.entry.js.map → p-8256cd44.entry.js.map} +0 -0
- /package/dist/atomic/{p-0e27d4f2.entry.js.map → p-83c9244a.entry.js.map} +0 -0
- /package/dist/atomic/{p-828cea10.entry.js.map → p-89ab44de.entry.js.map} +0 -0
- /package/dist/atomic/{p-4b1bf2fd.entry.js.map → p-91c0917f.entry.js.map} +0 -0
- /package/dist/atomic/{p-bd99fcc1.entry.js.map → p-939eaaac.entry.js.map} +0 -0
- /package/dist/atomic/{p-9b92b4e2.entry.js.map → p-93e29b24.entry.js.map} +0 -0
- /package/dist/atomic/{p-b6377fb6.entry.js.map → p-98c5b9b8.entry.js.map} +0 -0
- /package/dist/atomic/{p-bf49fed3.entry.js.map → p-99b8d52d.entry.js.map} +0 -0
- /package/dist/atomic/{p-98da2a98.entry.js.map → p-9f5590f6.entry.js.map} +0 -0
- /package/dist/atomic/{p-160553ce.entry.js.map → p-a3efa89e.entry.js.map} +0 -0
- /package/dist/atomic/{p-c538c8ac.entry.js.map → p-a53c7821.entry.js.map} +0 -0
- /package/dist/atomic/{p-85f165af.entry.js.map → p-a8882a2a.entry.js.map} +0 -0
- /package/dist/atomic/{p-ce41c447.entry.js.map → p-ae060711.entry.js.map} +0 -0
- /package/dist/atomic/{p-b4c34553.entry.js.map → p-b0b17e21.entry.js.map} +0 -0
- /package/dist/atomic/{p-e1c99e2e.entry.js.map → p-b2ff1330.entry.js.map} +0 -0
- /package/dist/atomic/{p-618c6967.entry.js.map → p-b6963bae.entry.js.map} +0 -0
- /package/dist/atomic/{p-08794435.entry.js.map → p-ba650801.entry.js.map} +0 -0
- /package/dist/atomic/{p-0e5dc57f.entry.js.map → p-c126ee6b.entry.js.map} +0 -0
- /package/dist/atomic/{p-754909fe.entry.js.map → p-c1999888.entry.js.map} +0 -0
- /package/dist/atomic/{p-ca762513.entry.js.map → p-c889adbd.entry.js.map} +0 -0
- /package/dist/atomic/{p-00a6ab8c.entry.js.map → p-d0f47b33.entry.js.map} +0 -0
- /package/dist/atomic/{p-97829295.entry.js.map → p-d24d34a7.entry.js.map} +0 -0
- /package/dist/atomic/{p-7f40e57d.entry.js.map → p-d364064c.entry.js.map} +0 -0
- /package/dist/atomic/{p-856e858c.entry.js.map → p-d785121d.entry.js.map} +0 -0
- /package/dist/atomic/{p-7d63bf7b.entry.js.map → p-d93adf52.entry.js.map} +0 -0
- /package/dist/atomic/{p-2a4e9425.entry.js.map → p-de066001.entry.js.map} +0 -0
- /package/dist/atomic/{p-441b1a7b.entry.js.map → p-e23b3334.entry.js.map} +0 -0
- /package/dist/atomic/{p-c2b4b401.entry.js.map → p-e2afb475.entry.js.map} +0 -0
- /package/dist/atomic/{p-bd32625e.entry.js.map → p-ea446721.entry.js.map} +0 -0
- /package/dist/atomic/{p-07b6424c.entry.js.map → p-ee6771f1.entry.js.map} +0 -0
- /package/dist/atomic/{p-abb14108.entry.js.map → p-f0c2dfe8.entry.js.map} +0 -0
- /package/dist/atomic/{p-cc68642f.entry.js.map → p-f289269f.entry.js.map} +0 -0
- /package/dist/atomic/{p-fbe37f4b.entry.js.map → p-f8d62605.entry.js.map} +0 -0
- /package/dist/atomic/{p-bdbbb47b.entry.js.map → p-f8ded37c.entry.js.map} +0 -0
- /package/dist/atomic/{p-d4ad7336.entry.js.map → p-fa8b7c4c.entry.js.map} +0 -0
- /package/dist/atomic/{p-fb1a1e2e.entry.js.map → p-fbfe913d.entry.js.map} +0 -0
- /package/dist/atomic/{p-f936f55e.entry.js.map → p-fea7bf3b.entry.js.map} +0 -0
- /package/dist/types/components/common/facets/{stencil-facet-guard.d.ts → facet-guard.d.ts} +0 -0
|
@@ -1,613 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { buildFacet, buildFacetConditionsManager, buildSearchStatus, buildTabManager, } from '@coveo/headless';
|
|
8
|
-
import { html, LitElement, nothing } from 'lit';
|
|
9
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
|
-
import { when } from 'lit/directives/when.js';
|
|
11
|
-
import { bindStateToController } from "../../../decorators/bind-state";
|
|
12
|
-
import { bindingGuard } from "../../../decorators/binding-guard";
|
|
13
|
-
import { bindings } from "../../../decorators/bindings";
|
|
14
|
-
import { errorGuard } from "../../../decorators/error-guard";
|
|
15
|
-
import { withTailwindStyles } from "../../../decorators/with-tailwind-styles";
|
|
16
|
-
import { mapProperty } from "../../../utils/props-utils";
|
|
17
|
-
import { AriaLiveRegionController, FocusTargetController, } from '../../../utils/accessibility-utils';
|
|
18
|
-
import { getFieldCaptions } from '../../../utils/field-utils';
|
|
19
|
-
import { parseDependsOn } from '../../common/facets/depends-on';
|
|
20
|
-
import { renderFacetContainer } from '../../common/facets/facet-container/facet-container';
|
|
21
|
-
import { renderFacetHeader } from '../../common/facets/facet-header/facet-header';
|
|
22
|
-
import { announceFacetSearchResultsWithAriaLive } from '../../common/facets/facet-search/facet-search-aria-live';
|
|
23
|
-
import { renderFacetSearchInput } from '../../common/facets/facet-search/facet-search-input';
|
|
24
|
-
import { facetSearchInputGuard } from '../../common/facets/facet-search/facet-search-input-guard';
|
|
25
|
-
import { renderFacetSearchMatches } from '../../common/facets/facet-search/facet-search-matches';
|
|
26
|
-
import { shouldDisplaySearchResults, shouldUpdateFacetSearchComponent, } from '../../common/facets/facet-search/facet-search-utils';
|
|
27
|
-
import { renderFacetShowMoreLess } from '../../common/facets/facet-show-more-less/facet-show-more-less';
|
|
28
|
-
import { renderFacetValue, } from '../../common/facets/facet-value/facet-value';
|
|
29
|
-
import { renderFacetValuesGroup } from '../../common/facets/facet-values-group/facet-values-group';
|
|
30
|
-
import { initializePopover } from '../../common/facets/popover/popover-type';
|
|
31
|
-
import '../../common/atomic-facet-placeholder/atomic-facet-placeholder';
|
|
32
|
-
import { booleanConverter } from "../../../converters/boolean-converter";
|
|
33
|
-
import facetCommonStyles from '../../common/facets/facet-common.tw.css';
|
|
34
|
-
import facetSearchStyles from '../../common/facets/facet-search/facet-search.tw.css';
|
|
35
|
-
import facetValueBoxStyles from '../../common/facets/facet-value-box/facet-value-box.tw.css';
|
|
36
|
-
import facetValueCheckboxStyles from '../../common/facets/facet-value-checkbox/facet-value-checkbox.tw.css';
|
|
37
|
-
import facetValueExcludeStyles from '../../common/facets/facet-value-exclude/facet-value-exclude.tw.css';
|
|
38
|
-
/**
|
|
39
|
-
* A facet is a list of values for a certain field occurring in the results, ordered using a configurable criteria (e.g., number of occurrences).
|
|
40
|
-
* An `atomic-facet` displays a facet of the results for the current query.
|
|
41
|
-
*
|
|
42
|
-
* @part facet - The wrapper for the entire facet.
|
|
43
|
-
* @part placeholder - The placeholder shown before the first search is executed.
|
|
44
|
-
*
|
|
45
|
-
* @part label-button - The button that displays the label and allows to expand/collapse the facet.
|
|
46
|
-
* @part label-button-icon - The label button icon.
|
|
47
|
-
* @part clear-button - The button that resets the actively selected facet values.
|
|
48
|
-
* @part clear-button-icon - The clear button icon.
|
|
49
|
-
*
|
|
50
|
-
* @part search-wrapper - The search box wrapper.
|
|
51
|
-
* @part search-input - The search box input.
|
|
52
|
-
* @part search-icon - The search box submit button.
|
|
53
|
-
* @part search-clear-button - The button to clear the search box of input.
|
|
54
|
-
* @part more-matches - The label indicating there are more matches for the current facet search query.
|
|
55
|
-
* @part no-matches - The label indicating there are no matches for the current facet search query.
|
|
56
|
-
* @part matches-query - The highlighted query inside the matches labels.
|
|
57
|
-
* @part search-highlight - The highlighted query inside the facet values.
|
|
58
|
-
*
|
|
59
|
-
* @part values - The facet values container.
|
|
60
|
-
* @part value-label - The facet value label, common for all displays.
|
|
61
|
-
* @part value-count - The facet value count, common for all displays.
|
|
62
|
-
*
|
|
63
|
-
* @part value-checkbox - The facet value checkbox, available when display is 'checkbox'.
|
|
64
|
-
* @part value-checkbox-checked - The checked facet value checkbox, available when display is 'checkbox'.
|
|
65
|
-
* @part value-checkbox-label - The facet value checkbox clickable label, available when display is 'checkbox'.
|
|
66
|
-
* @part value-checkbox-icon - The facet value checkbox icon, available when display is 'checkbox'.
|
|
67
|
-
* @part value-link - The facet value when display is 'link'.
|
|
68
|
-
* @part value-link-selected - The selected facet value when display is 'link'.
|
|
69
|
-
* @part value-box - The facet value when display is 'box'.
|
|
70
|
-
* @part value-box-selected - The selected facet value when display is 'box'.
|
|
71
|
-
* @part value-exclude-button - The button to exclude a facet value, available when display is 'checkbox'.
|
|
72
|
-
*
|
|
73
|
-
* @part show-more - The show more results button.
|
|
74
|
-
* @part show-less - The show less results button.
|
|
75
|
-
* @part show-more-less-icon - The icons of the show more & show less buttons.
|
|
76
|
-
*/
|
|
77
|
-
let AtomicFacet = class AtomicFacet extends LitElement {
|
|
78
|
-
constructor() {
|
|
79
|
-
super(...arguments);
|
|
80
|
-
/**
|
|
81
|
-
* The non-localized label for the facet.
|
|
82
|
-
* Used in the `atomic-breadbox` component through the bindings store.
|
|
83
|
-
*/
|
|
84
|
-
this.label = 'no-label';
|
|
85
|
-
/**
|
|
86
|
-
* The tabs on which the facet can be displayed. This property should not be used at the same time as `tabs-excluded`.
|
|
87
|
-
*
|
|
88
|
-
* Set this property as a stringified JSON array, e.g.,
|
|
89
|
-
* ```html
|
|
90
|
-
* <atomic-facet tabs-included='["tabIDA", "tabIDB"]'></atomic-facet>
|
|
91
|
-
* ```
|
|
92
|
-
* If you don't set this property, the facet can be displayed on any tab. Otherwise, the facet can only be displayed on the specified tabs.
|
|
93
|
-
*/
|
|
94
|
-
this.tabsIncluded = [];
|
|
95
|
-
/**
|
|
96
|
-
* The tabs on which this facet must not be displayed. This property should not be used at the same time as `tabs-included`.
|
|
97
|
-
*
|
|
98
|
-
* Set this property as a stringified JSON array, e.g.,
|
|
99
|
-
* ```html
|
|
100
|
-
* <atomic-facet tabs-excluded='["tabIDA", "tabIDB"]'></atomic-facet>
|
|
101
|
-
* ```
|
|
102
|
-
* If you don't set this property, the facet can be displayed on any tab. Otherwise, the facet won't be displayed on any of the specified tabs.
|
|
103
|
-
*/
|
|
104
|
-
this.tabsExcluded = [];
|
|
105
|
-
/**
|
|
106
|
-
* The number of values to request for this facet.
|
|
107
|
-
* Also determines the number of additional values to request each time more values are shown.
|
|
108
|
-
*/
|
|
109
|
-
this.numberOfValues = 8;
|
|
110
|
-
/**
|
|
111
|
-
* Whether this facet should contain a search box.
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
this.withSearch = true;
|
|
115
|
-
/**
|
|
116
|
-
* The sort criterion to apply to the returned facet values.
|
|
117
|
-
* Possible values are 'score', 'alphanumeric', 'alphanumericDescending', 'occurrences', alphanumericNatural', 'alphanumericNaturalDescending' and 'automatic'.
|
|
118
|
-
*/
|
|
119
|
-
this.sortCriteria = 'automatic';
|
|
120
|
-
/**
|
|
121
|
-
* Specifies how a result must match the selected facet values.
|
|
122
|
-
* Allowed values:
|
|
123
|
-
* - `atLeastOneValue`: A result will match if at least one of the corresponding facet values is selected.
|
|
124
|
-
* - `allValues`: A result will match if all corresponding facet values are selected.
|
|
125
|
-
*/
|
|
126
|
-
this.resultsMustMatch = 'atLeastOneValue';
|
|
127
|
-
/**
|
|
128
|
-
* Whether to display the facet values as checkboxes (multiple selection), links (single selection) or boxes (multiple selection).
|
|
129
|
-
* Possible values are 'checkbox', 'link', and 'box'.
|
|
130
|
-
*/
|
|
131
|
-
this.displayValuesAs = 'checkbox';
|
|
132
|
-
/**
|
|
133
|
-
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
|
|
134
|
-
*/
|
|
135
|
-
this.isCollapsed = false;
|
|
136
|
-
/**
|
|
137
|
-
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
|
|
138
|
-
*/
|
|
139
|
-
this.headingLevel = 0;
|
|
140
|
-
/**
|
|
141
|
-
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* Note: Resulting count is only an estimation, in some cases this value could be incorrect.
|
|
145
|
-
*/
|
|
146
|
-
this.filterFacetCount = true;
|
|
147
|
-
/**
|
|
148
|
-
* Whether to allow excluding values from the facet.
|
|
149
|
-
*/
|
|
150
|
-
this.enableExclusion = false;
|
|
151
|
-
/**
|
|
152
|
-
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values.
|
|
153
|
-
* Note: A high injectionDepth may negatively impact the facet request performance.
|
|
154
|
-
* Minimum: `0`
|
|
155
|
-
* Default: `1000`
|
|
156
|
-
*/
|
|
157
|
-
this.injectionDepth = 1000;
|
|
158
|
-
/**
|
|
159
|
-
* The required facets and values for this facet to be displayed.
|
|
160
|
-
* Examples:
|
|
161
|
-
* ```html
|
|
162
|
-
* <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet>
|
|
163
|
-
*
|
|
164
|
-
* <!-- To show the facet when any value is selected in the facet with id "abc": -->
|
|
165
|
-
* <atomic-facet
|
|
166
|
-
* depends-on-abc
|
|
167
|
-
* ...
|
|
168
|
-
* ></atomic-facet>
|
|
169
|
-
*
|
|
170
|
-
* <!-- To show the facet when value "doc" is selected in the facet with id "abc": -->
|
|
171
|
-
* <atomic-facet
|
|
172
|
-
* depends-on-abc="doc"
|
|
173
|
-
* ...
|
|
174
|
-
* ></atomic-facet>
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
|
-
this.dependsOn = {};
|
|
178
|
-
/**
|
|
179
|
-
* Specifies an explicit list of `allowedValues` in the Search API request, as a JSON string representation.
|
|
180
|
-
*
|
|
181
|
-
* If you specify a list of values for this option, the facet uses only these values (if they are available in
|
|
182
|
-
* the current result set).
|
|
183
|
-
*
|
|
184
|
-
* Example:
|
|
185
|
-
*
|
|
186
|
-
* The following facet only uses the `Contact`, `Account`, and `File` values of the `objecttype` field. Even if the
|
|
187
|
-
* current result set contains other `objecttype` values, such as `Message`, or `Product`, the facet does not use
|
|
188
|
-
* those other values.
|
|
189
|
-
*
|
|
190
|
-
* ```html
|
|
191
|
-
* <atomic-facet field="objecttype" allowed-values='["Contact","Account","File"]'></atomic-facet>
|
|
192
|
-
* ```
|
|
193
|
-
*
|
|
194
|
-
* The maximum amount of allowed values is 25.
|
|
195
|
-
*
|
|
196
|
-
* Default value is `undefined`, and the facet uses all available values for its `field` in the current result set.
|
|
197
|
-
*/
|
|
198
|
-
this.allowedValues = [];
|
|
199
|
-
/**
|
|
200
|
-
* Identifies the facet values that must appear at the top, in this order.
|
|
201
|
-
* This parameter can be used in conjunction with the `sortCriteria` parameter.
|
|
202
|
-
*
|
|
203
|
-
* Facet values not part of the `customSort` list will be sorted according to the `sortCriteria`.
|
|
204
|
-
*
|
|
205
|
-
* Example:
|
|
206
|
-
*
|
|
207
|
-
* The following facet will sort the `Contact`, `Account`, and `File` values at the top of the list for the `objecttype` field.
|
|
208
|
-
*
|
|
209
|
-
* If there are more than these 3 values available, the rest of the list will be sorted using `occurrences`.
|
|
210
|
-
*
|
|
211
|
-
* ```html
|
|
212
|
-
* <atomic-facet field="objecttype" custom-sort='["Contact","Account","File"]' sort-criteria='occurrences'></atomic-facet>
|
|
213
|
-
* ```
|
|
214
|
-
* The maximum amount of custom sort values is 25.
|
|
215
|
-
*
|
|
216
|
-
* The default value is `undefined`, and the facet values will be sorted using only the `sortCriteria`.
|
|
217
|
-
*/
|
|
218
|
-
this.customSort = [];
|
|
219
|
-
}
|
|
220
|
-
initialize() {
|
|
221
|
-
if ([...this.tabsIncluded].length > 0 &&
|
|
222
|
-
[...this.tabsExcluded].length > 0) {
|
|
223
|
-
console.warn('Values for both "tabs-included" and "tabs-excluded" have been provided. This is could lead to unexpected behaviors.');
|
|
224
|
-
}
|
|
225
|
-
if (this.displayValuesAs !== 'checkbox' && this.enableExclusion) {
|
|
226
|
-
console.warn('The "enableExclusion" property is only available when "displayValuesAs" is set to "checkbox".');
|
|
227
|
-
}
|
|
228
|
-
this.facet = buildFacet(this.bindings.engine, { options: this.facetOptions });
|
|
229
|
-
this.facetId = this.facet.state.facetId;
|
|
230
|
-
this.searchStatus = buildSearchStatus(this.bindings.engine);
|
|
231
|
-
this.tabManager = buildTabManager(this.bindings.engine);
|
|
232
|
-
this.initAriaLive();
|
|
233
|
-
this.initConditionManager();
|
|
234
|
-
this.initPopover();
|
|
235
|
-
this.registerFacet();
|
|
236
|
-
}
|
|
237
|
-
disconnectedCallback() {
|
|
238
|
-
super.disconnectedCallback();
|
|
239
|
-
this.facetConditionsManager?.stopWatching();
|
|
240
|
-
}
|
|
241
|
-
shouldUpdate(changedProperties) {
|
|
242
|
-
if (changedProperties.has('facetState')) {
|
|
243
|
-
const currentFacetState = this.facetState;
|
|
244
|
-
const previousFacetState = changedProperties.get('facetState');
|
|
245
|
-
if (previousFacetState && currentFacetState) {
|
|
246
|
-
return shouldUpdateFacetSearchComponent(currentFacetState.facetSearch, previousFacetState.facetSearch);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return super.shouldUpdate(changedProperties);
|
|
250
|
-
}
|
|
251
|
-
shouldRenderFacet() {
|
|
252
|
-
return (!this.searchStatusState.hasError &&
|
|
253
|
-
this.facetState.enabled &&
|
|
254
|
-
(!this.searchStatusState.firstSearchExecuted ||
|
|
255
|
-
this.facetState.values.length > 0));
|
|
256
|
-
}
|
|
257
|
-
render() {
|
|
258
|
-
return html `${when(this.shouldRenderFacet(), () => this.searchStatusState.firstSearchExecuted
|
|
259
|
-
? renderFacetContainer()(html `
|
|
260
|
-
${this.renderFacetHeader()}
|
|
261
|
-
${this.renderBody()}
|
|
262
|
-
`)
|
|
263
|
-
: html `<atomic-facet-placeholder
|
|
264
|
-
value-count="${this.numberOfValues}"
|
|
265
|
-
></atomic-facet-placeholder>`)}`;
|
|
266
|
-
}
|
|
267
|
-
renderFacetHeader() {
|
|
268
|
-
return html `${renderFacetHeader({
|
|
269
|
-
props: {
|
|
270
|
-
i18n: this.bindings.i18n,
|
|
271
|
-
label: this.definedLabel,
|
|
272
|
-
onClearFilters: () => {
|
|
273
|
-
this.focusTargets.header.focusAfterSearch();
|
|
274
|
-
this.facet.deselectAll();
|
|
275
|
-
},
|
|
276
|
-
numberOfActiveValues: this.activeValues.length,
|
|
277
|
-
isCollapsed: this.isCollapsed,
|
|
278
|
-
headingLevel: this.headingLevel,
|
|
279
|
-
onToggleCollapse: () => {
|
|
280
|
-
this.isCollapsed = !this.isCollapsed;
|
|
281
|
-
},
|
|
282
|
-
headerRef: (el) => this.focusTargets.header.setTarget(el),
|
|
283
|
-
},
|
|
284
|
-
})}`;
|
|
285
|
-
}
|
|
286
|
-
renderBody() {
|
|
287
|
-
if (this.isCollapsed) {
|
|
288
|
-
return nothing;
|
|
289
|
-
}
|
|
290
|
-
return html `
|
|
291
|
-
${facetSearchInputGuard({
|
|
292
|
-
canShowMoreValues: this.facetState.canShowMoreValues,
|
|
293
|
-
numberOfDisplayedValues: this.facetState.values.length,
|
|
294
|
-
withSearch: this.withSearch,
|
|
295
|
-
}, () => renderFacetSearchInput({
|
|
296
|
-
props: {
|
|
297
|
-
i18n: this.bindings.i18n,
|
|
298
|
-
label: this.definedLabel,
|
|
299
|
-
onChange: (value) => {
|
|
300
|
-
if (value === '') {
|
|
301
|
-
this.facet.facetSearch.clear();
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
this.facet.facetSearch.updateCaptions(getFieldCaptions(this.field, this.bindings.i18n));
|
|
305
|
-
this.facet.facetSearch.updateText(value);
|
|
306
|
-
this.facet.facetSearch.search();
|
|
307
|
-
},
|
|
308
|
-
onClear: () => this.facet.facetSearch.clear(),
|
|
309
|
-
query: this.facetState.facetSearch.query,
|
|
310
|
-
},
|
|
311
|
-
}))}
|
|
312
|
-
${shouldDisplaySearchResults(this.facetState.facetSearch)
|
|
313
|
-
? html `${this.renderSearchResults()}${this.renderMatches()}`
|
|
314
|
-
: html `${this.renderValues()}${this.renderShowMoreLess()}`}
|
|
315
|
-
`;
|
|
316
|
-
}
|
|
317
|
-
renderValuesContainer(children, query) {
|
|
318
|
-
const classes = `mt-3 ${this.displayValuesAs === 'box' ? 'box-container' : ''}`;
|
|
319
|
-
return renderFacetValuesGroup({
|
|
320
|
-
props: {
|
|
321
|
-
i18n: this.bindings.i18n,
|
|
322
|
-
label: this.label,
|
|
323
|
-
query,
|
|
324
|
-
},
|
|
325
|
-
})(html `<ul class="${classes}" part="values">
|
|
326
|
-
${children}
|
|
327
|
-
</ul>`);
|
|
328
|
-
}
|
|
329
|
-
renderSearchResults() {
|
|
330
|
-
return this.renderValuesContainer(this.facet.state.facetSearch.values.map((value) => renderFacetValue({
|
|
331
|
-
props: {
|
|
332
|
-
...this.facetValueProps,
|
|
333
|
-
facetState: 'idle',
|
|
334
|
-
facetCount: value.count,
|
|
335
|
-
onExclude: () => this.facet.facetSearch.exclude(value),
|
|
336
|
-
onSelect: () => this.displayValuesAs === 'link'
|
|
337
|
-
? this.facet.facetSearch.singleSelect(value)
|
|
338
|
-
: this.facet.facetSearch.select(value),
|
|
339
|
-
facetValue: value.rawValue,
|
|
340
|
-
},
|
|
341
|
-
})));
|
|
342
|
-
}
|
|
343
|
-
renderValues() {
|
|
344
|
-
return this.renderValuesContainer(this.facet.state.values.map((value, i) => {
|
|
345
|
-
const shouldFocusOnShowLessAfterInteraction = i === 0;
|
|
346
|
-
const shouldFocusOnShowMoreAfterInteraction = i ===
|
|
347
|
-
(this.sortCriteria === 'automatic'
|
|
348
|
-
? 0
|
|
349
|
-
: this.facet.state.values.length - this.numberOfValues);
|
|
350
|
-
return renderFacetValue({
|
|
351
|
-
props: {
|
|
352
|
-
...this.facetValueProps,
|
|
353
|
-
facetCount: value.numberOfResults,
|
|
354
|
-
onExclude: () => this.facet.toggleExclude(value),
|
|
355
|
-
onSelect: () => this.displayValuesAs === 'link'
|
|
356
|
-
? this.facet.toggleSingleSelect(value)
|
|
357
|
-
: this.facet.toggleSelect(value),
|
|
358
|
-
facetValue: value.value,
|
|
359
|
-
facetState: value.state,
|
|
360
|
-
setRef: (btn) => {
|
|
361
|
-
if (shouldFocusOnShowLessAfterInteraction) {
|
|
362
|
-
this.showLessFocus?.setTarget(btn);
|
|
363
|
-
}
|
|
364
|
-
if (shouldFocusOnShowMoreAfterInteraction) {
|
|
365
|
-
this.showMoreFocus?.setTarget(btn);
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
});
|
|
370
|
-
}));
|
|
371
|
-
}
|
|
372
|
-
renderShowMoreLess() {
|
|
373
|
-
return renderFacetShowMoreLess({
|
|
374
|
-
props: {
|
|
375
|
-
label: this.label,
|
|
376
|
-
i18n: this.bindings.i18n,
|
|
377
|
-
onShowMore: () => {
|
|
378
|
-
this.focusTargets.showMore.focusAfterSearch();
|
|
379
|
-
this.facet.showMoreValues();
|
|
380
|
-
},
|
|
381
|
-
onShowLess: () => {
|
|
382
|
-
this.focusTargets.showLess.focusAfterSearch();
|
|
383
|
-
this.facet.showLessValues();
|
|
384
|
-
},
|
|
385
|
-
canShowMoreValues: this.facet.state.canShowMoreValues,
|
|
386
|
-
canShowLessValues: this.facet.state.canShowLessValues,
|
|
387
|
-
},
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
renderMatches() {
|
|
391
|
-
return renderFacetSearchMatches({
|
|
392
|
-
props: {
|
|
393
|
-
i18n: this.bindings.i18n,
|
|
394
|
-
query: this.facet.state.facetSearch.query,
|
|
395
|
-
numberOfMatches: this.facet.state.facetSearch.values.length,
|
|
396
|
-
hasMoreMatches: this.facet.state.facetSearch.moreValuesAvailable,
|
|
397
|
-
showMoreMatches: () => this.facet.facetSearch.showMoreResults(),
|
|
398
|
-
},
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
get activeValues() {
|
|
402
|
-
return this.facet.state.values.filter(({ state }) => state !== 'idle');
|
|
403
|
-
}
|
|
404
|
-
get facetOptions() {
|
|
405
|
-
return {
|
|
406
|
-
facetId: this.facetId,
|
|
407
|
-
field: this.field,
|
|
408
|
-
numberOfValues: this.numberOfValues,
|
|
409
|
-
sortCriteria: this.sortCriteria,
|
|
410
|
-
resultsMustMatch: this.resultsMustMatch,
|
|
411
|
-
facetSearch: { numberOfValues: this.numberOfValues },
|
|
412
|
-
filterFacetCount: this.filterFacetCount,
|
|
413
|
-
injectionDepth: this.injectionDepth,
|
|
414
|
-
allowedValues: this.allowedValues.length
|
|
415
|
-
? [...this.allowedValues]
|
|
416
|
-
: undefined,
|
|
417
|
-
customSort: this.customSort.length ? [...this.customSort] : undefined,
|
|
418
|
-
tabs: {
|
|
419
|
-
included: [...this.tabsIncluded],
|
|
420
|
-
excluded: [...this.tabsExcluded],
|
|
421
|
-
},
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
get facetValueProps() {
|
|
425
|
-
return {
|
|
426
|
-
facetSearchQuery: this.facetState.facetSearch.query,
|
|
427
|
-
displayValuesAs: this.displayValuesAs,
|
|
428
|
-
enableExclusion: this.enableExclusion,
|
|
429
|
-
field: this.field,
|
|
430
|
-
i18n: this.bindings.i18n,
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
get isHidden() {
|
|
434
|
-
return !this.facet.state.enabled || !this.facet.state.values.length;
|
|
435
|
-
}
|
|
436
|
-
get host() {
|
|
437
|
-
return this;
|
|
438
|
-
}
|
|
439
|
-
initConditionManager() {
|
|
440
|
-
this.facetConditionsManager = buildFacetConditionsManager(this.bindings.engine, {
|
|
441
|
-
facetId: this.facetId,
|
|
442
|
-
conditions: parseDependsOn(this.dependsOn),
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
registerFacet() {
|
|
446
|
-
this.bindings.store.registerFacet('facets', this.facetInfo);
|
|
447
|
-
}
|
|
448
|
-
initPopover() {
|
|
449
|
-
initializePopover(this.host, {
|
|
450
|
-
...this.facetInfo,
|
|
451
|
-
hasValues: () => !!this.facet.state.values.length,
|
|
452
|
-
numberOfActiveValues: () => this.activeValues.length,
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
initAriaLive() {
|
|
456
|
-
this.facetSearchAriaLive = new AriaLiveRegionController(this, 'facet-search');
|
|
457
|
-
announceFacetSearchResultsWithAriaLive(this.facet, this.label, (msg) => {
|
|
458
|
-
this.facetSearchAriaLive.message = msg;
|
|
459
|
-
}, this.bindings.i18n);
|
|
460
|
-
}
|
|
461
|
-
get facetInfo() {
|
|
462
|
-
return {
|
|
463
|
-
label: () => this.bindings.i18n.t(this.label),
|
|
464
|
-
facetId: this.facetId,
|
|
465
|
-
element: this.host,
|
|
466
|
-
isHidden: () => this.isHidden,
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
get definedLabel() {
|
|
470
|
-
return this.label === 'no-label' && this.facetState?.label
|
|
471
|
-
? this.facetState.label
|
|
472
|
-
: this.label;
|
|
473
|
-
}
|
|
474
|
-
get focusTargets() {
|
|
475
|
-
if (!this.showLessFocus) {
|
|
476
|
-
this.showLessFocus = new FocusTargetController(this, this.bindings);
|
|
477
|
-
}
|
|
478
|
-
if (!this.showMoreFocus) {
|
|
479
|
-
this.showMoreFocus = new FocusTargetController(this, this.bindings);
|
|
480
|
-
}
|
|
481
|
-
if (!this.headerFocus) {
|
|
482
|
-
this.headerFocus = new FocusTargetController(this, this.bindings);
|
|
483
|
-
}
|
|
484
|
-
return {
|
|
485
|
-
showLess: this.showLessFocus,
|
|
486
|
-
showMore: this.showMoreFocus,
|
|
487
|
-
header: this.headerFocus,
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
AtomicFacet.styles = [
|
|
492
|
-
facetCommonStyles,
|
|
493
|
-
facetSearchStyles,
|
|
494
|
-
facetValueCheckboxStyles,
|
|
495
|
-
facetValueExcludeStyles,
|
|
496
|
-
facetValueBoxStyles,
|
|
497
|
-
];
|
|
498
|
-
__decorate([
|
|
499
|
-
state()
|
|
500
|
-
], AtomicFacet.prototype, "bindings", void 0);
|
|
501
|
-
__decorate([
|
|
502
|
-
bindStateToController('facet'),
|
|
503
|
-
state()
|
|
504
|
-
], AtomicFacet.prototype, "facetState", void 0);
|
|
505
|
-
__decorate([
|
|
506
|
-
bindStateToController('searchStatus'),
|
|
507
|
-
state()
|
|
508
|
-
], AtomicFacet.prototype, "searchStatusState", void 0);
|
|
509
|
-
__decorate([
|
|
510
|
-
bindStateToController('tabManager'),
|
|
511
|
-
state()
|
|
512
|
-
], AtomicFacet.prototype, "tabManagerState", void 0);
|
|
513
|
-
__decorate([
|
|
514
|
-
state()
|
|
515
|
-
], AtomicFacet.prototype, "error", void 0);
|
|
516
|
-
__decorate([
|
|
517
|
-
property({ type: String, attribute: 'facet-id', reflect: true })
|
|
518
|
-
], AtomicFacet.prototype, "facetId", void 0);
|
|
519
|
-
__decorate([
|
|
520
|
-
property({ type: String, reflect: true })
|
|
521
|
-
], AtomicFacet.prototype, "label", void 0);
|
|
522
|
-
__decorate([
|
|
523
|
-
property({ type: String, reflect: true })
|
|
524
|
-
], AtomicFacet.prototype, "field", void 0);
|
|
525
|
-
__decorate([
|
|
526
|
-
property({
|
|
527
|
-
type: Array,
|
|
528
|
-
attribute: 'tabs-included',
|
|
529
|
-
reflect: true,
|
|
530
|
-
})
|
|
531
|
-
], AtomicFacet.prototype, "tabsIncluded", void 0);
|
|
532
|
-
__decorate([
|
|
533
|
-
property({
|
|
534
|
-
type: Array,
|
|
535
|
-
attribute: 'tabs-excluded',
|
|
536
|
-
reflect: true,
|
|
537
|
-
})
|
|
538
|
-
], AtomicFacet.prototype, "tabsExcluded", void 0);
|
|
539
|
-
__decorate([
|
|
540
|
-
property({ type: Number, attribute: 'number-of-values', reflect: true })
|
|
541
|
-
], AtomicFacet.prototype, "numberOfValues", void 0);
|
|
542
|
-
__decorate([
|
|
543
|
-
property({
|
|
544
|
-
type: Boolean,
|
|
545
|
-
converter: booleanConverter,
|
|
546
|
-
attribute: 'with-search',
|
|
547
|
-
reflect: true,
|
|
548
|
-
})
|
|
549
|
-
], AtomicFacet.prototype, "withSearch", void 0);
|
|
550
|
-
__decorate([
|
|
551
|
-
property({ type: String, attribute: 'sort-criteria', reflect: true })
|
|
552
|
-
], AtomicFacet.prototype, "sortCriteria", void 0);
|
|
553
|
-
__decorate([
|
|
554
|
-
property({ type: String, attribute: 'results-must-match', reflect: true })
|
|
555
|
-
], AtomicFacet.prototype, "resultsMustMatch", void 0);
|
|
556
|
-
__decorate([
|
|
557
|
-
property({ type: String, attribute: 'display-values-as', reflect: true })
|
|
558
|
-
], AtomicFacet.prototype, "displayValuesAs", void 0);
|
|
559
|
-
__decorate([
|
|
560
|
-
property({
|
|
561
|
-
type: Boolean,
|
|
562
|
-
converter: booleanConverter,
|
|
563
|
-
attribute: 'is-collapsed',
|
|
564
|
-
reflect: true,
|
|
565
|
-
})
|
|
566
|
-
], AtomicFacet.prototype, "isCollapsed", void 0);
|
|
567
|
-
__decorate([
|
|
568
|
-
property({ type: Number, attribute: 'heading-level', reflect: true })
|
|
569
|
-
], AtomicFacet.prototype, "headingLevel", void 0);
|
|
570
|
-
__decorate([
|
|
571
|
-
property({
|
|
572
|
-
type: Boolean,
|
|
573
|
-
converter: booleanConverter,
|
|
574
|
-
attribute: 'filter-facet-count',
|
|
575
|
-
reflect: true,
|
|
576
|
-
})
|
|
577
|
-
], AtomicFacet.prototype, "filterFacetCount", void 0);
|
|
578
|
-
__decorate([
|
|
579
|
-
property({
|
|
580
|
-
type: Boolean,
|
|
581
|
-
converter: booleanConverter,
|
|
582
|
-
attribute: 'enable-exclusion',
|
|
583
|
-
reflect: true,
|
|
584
|
-
})
|
|
585
|
-
], AtomicFacet.prototype, "enableExclusion", void 0);
|
|
586
|
-
__decorate([
|
|
587
|
-
property({ type: Number, attribute: 'injection-depth' })
|
|
588
|
-
], AtomicFacet.prototype, "injectionDepth", void 0);
|
|
589
|
-
__decorate([
|
|
590
|
-
mapProperty({ attributePrefix: 'depends-on' })
|
|
591
|
-
], AtomicFacet.prototype, "dependsOn", void 0);
|
|
592
|
-
__decorate([
|
|
593
|
-
property({
|
|
594
|
-
type: Array,
|
|
595
|
-
attribute: 'allowed-values',
|
|
596
|
-
})
|
|
597
|
-
], AtomicFacet.prototype, "allowedValues", void 0);
|
|
598
|
-
__decorate([
|
|
599
|
-
property({
|
|
600
|
-
type: Array,
|
|
601
|
-
attribute: 'custom-sort',
|
|
602
|
-
})
|
|
603
|
-
], AtomicFacet.prototype, "customSort", void 0);
|
|
604
|
-
__decorate([
|
|
605
|
-
bindingGuard(),
|
|
606
|
-
errorGuard()
|
|
607
|
-
], AtomicFacet.prototype, "render", null);
|
|
608
|
-
AtomicFacet = __decorate([
|
|
609
|
-
customElement('atomic-facet'),
|
|
610
|
-
bindings(),
|
|
611
|
-
withTailwindStyles
|
|
612
|
-
], AtomicFacet);
|
|
613
|
-
export { AtomicFacet };
|
package/dist/atomic/components/components/search/atomic-search-interface/analytics-config.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { augmentAnalyticsConfigWithAtomicVersion, augmentAnalyticsConfigWithDocument, augmentAnalyticsWithAtomicVersion, augmentWithExternalMiddleware, getNextAnalyticsConfig, } from '../../common/interface/analytics-config';
|
|
2
|
-
export function getAnalyticsConfig(searchEngineConfig, enabled, store) {
|
|
3
|
-
switch (searchEngineConfig.analytics?.analyticsMode) {
|
|
4
|
-
case 'next':
|
|
5
|
-
return getNextAnalyticsConfig(searchEngineConfig, enabled);
|
|
6
|
-
default:
|
|
7
|
-
return getLegacyAnalyticsConfig(searchEngineConfig, enabled, store);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
function getLegacyAnalyticsConfig(searchEngineConfig, enabled, store) {
|
|
11
|
-
const analyticsClientMiddleware = (event, payload) => augmentAnalytics(event, payload, store, searchEngineConfig);
|
|
12
|
-
const defaultConfiguration = {
|
|
13
|
-
analyticsClientMiddleware,
|
|
14
|
-
enabled,
|
|
15
|
-
...augmentAnalyticsConfigWithDocument(),
|
|
16
|
-
};
|
|
17
|
-
const immutableConfiguration = {
|
|
18
|
-
...augmentAnalyticsConfigWithAtomicVersion(),
|
|
19
|
-
};
|
|
20
|
-
if (searchEngineConfig.analytics) {
|
|
21
|
-
return {
|
|
22
|
-
...defaultConfiguration,
|
|
23
|
-
...searchEngineConfig.analytics,
|
|
24
|
-
analyticsClientMiddleware,
|
|
25
|
-
...immutableConfiguration,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
...defaultConfiguration,
|
|
30
|
-
...immutableConfiguration,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function augmentAnalytics(event, payload, store, config) {
|
|
34
|
-
let result = augmentWithExternalMiddleware(event, payload, config);
|
|
35
|
-
result = augmentAnalyticsWithAtomicVersion(result);
|
|
36
|
-
result = augmentAnalyticsWithFacetTitles(result, store);
|
|
37
|
-
return result;
|
|
38
|
-
}
|
|
39
|
-
function augmentAnalyticsWithFacetTitles(payload, store) {
|
|
40
|
-
const allFacets = store.getAllFacets();
|
|
41
|
-
const getAtomicFacetLabelOrOriginalTitle = (facetId, originalTitle) => (allFacets[facetId] ? allFacets[facetId].label() : originalTitle);
|
|
42
|
-
if (payload.facetState) {
|
|
43
|
-
payload.facetState = payload.facetState.map((analyticsFacetState) => {
|
|
44
|
-
const { id, title: originalTitle } = analyticsFacetState;
|
|
45
|
-
return {
|
|
46
|
-
...analyticsFacetState,
|
|
47
|
-
title: getAtomicFacetLabelOrOriginalTitle(id, originalTitle),
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (payload.customData?.facetTitle &&
|
|
52
|
-
payload.customData.facetId &&
|
|
53
|
-
payload.customData.facetTitle) {
|
|
54
|
-
payload.customData.facetTitle = getAtomicFacetLabelOrOriginalTitle(payload.customData.facetId, payload.customData.facetTitle);
|
|
55
|
-
}
|
|
56
|
-
return payload;
|
|
57
|
-
}
|