@coveo/atomic 3.33.9-pre.8ebfb6d667 → 3.33.9-pre.99566f9dae
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 +20 -19
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/atomic-category-facet.js +1 -1
- package/dist/atomic/components/atomic-facet.js +1 -1
- 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-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-quickview-action.js +2 -2
- package/dist/atomic/components/atomic-insight-result-quickview-action.js.map +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-numeric-facet.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-relevance-inspector.d.ts +11 -0
- package/dist/atomic/components/atomic-relevance-inspector.js +53 -0
- package/dist/atomic/components/atomic-relevance-inspector.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-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-query-suggestions2.js +1 -1
- package/dist/atomic/components/atomic-search-box-recent-queries2.js +1 -1
- package/dist/atomic/components/atomic-search-box.js +3 -3
- package/dist/atomic/components/atomic-smart-snippet-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-tab-manager.js +1 -1
- 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/search/atomic-search-interface/atomic-search-interface.js +23 -1
- package/dist/atomic/components/components/search/index.js +0 -1
- package/dist/atomic/components/components/search/lazy-index.js +0 -1
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/index.js.map +1 -1
- 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/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-a4d277c7.entry.js → p-037de646.entry.js} +2 -2
- package/dist/atomic/p-037de646.entry.js.map +1 -0
- package/dist/atomic/{p-4069d801.entry.js → p-268ce7ca.entry.js} +2 -2
- package/dist/atomic/p-268ce7ca.entry.js.map +1 -0
- package/dist/atomic/{p-b05d54e3.entry.js → p-30411cd4.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-18684d4c.js → p-4080f740.js} +1 -1
- package/dist/atomic/p-4080f740.js.map +1 -0
- package/dist/atomic/{p-dcba2119.entry.js → p-42617c90.entry.js} +2 -2
- package/dist/atomic/p-42617c90.entry.js.map +1 -0
- package/dist/atomic/{p-aa911e35.entry.js → p-48d78fc6.entry.js} +2 -2
- package/dist/atomic/{p-80fc1821.entry.js → p-4ae14373.entry.js} +2 -2
- package/dist/atomic/{p-5a710350.entry.js → p-4b9a166f.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-78bb2db9.entry.js → p-516b8165.entry.js} +2 -2
- package/dist/atomic/{p-2e4628bb.entry.js → p-5894d6f6.entry.js} +2 -2
- package/dist/atomic/p-5894d6f6.entry.js.map +1 -0
- 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-fafd5042.entry.js → p-5f2abcb4.entry.js} +2 -2
- package/dist/atomic/p-5f2abcb4.entry.js.map +1 -0
- package/dist/atomic/{p-b1ee255c.js → p-68896e7d.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-ef5ba5ae.entry.js → p-74822069.entry.js} +2 -2
- package/dist/atomic/{p-ab44a3c9.entry.js → p-8103bad3.entry.js} +2 -2
- package/dist/atomic/{p-f2467a39.entry.js → p-8acb1466.entry.js} +2 -2
- package/dist/atomic/{p-ee957926.entry.js → p-8ce6badd.entry.js} +2 -2
- package/dist/atomic/p-8ce6badd.entry.js.map +1 -0
- 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-93da1f4e.entry.js.map +1 -1
- 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-e1d6f5e9.entry.js → p-9c3cabca.entry.js} +2 -2
- package/dist/atomic/p-9c3cabca.entry.js.map +1 -0
- package/dist/atomic/{p-aabc4174.entry.js → p-a5355f5d.entry.js} +2 -2
- package/dist/atomic/{p-c865f044.entry.js → p-aa616502.entry.js} +2 -2
- 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-2c221588.entry.js → p-b4ad3036.entry.js} +2 -2
- package/dist/atomic/{p-2caf7109.entry.js → p-b7cd0342.entry.js} +2 -2
- package/dist/atomic/{p-e296615c.entry.js → p-bc94258c.entry.js} +2 -2
- package/dist/atomic/p-bc94258c.entry.js.map +1 -0
- package/dist/atomic/{p-47d35e28.entry.js → p-beee63e4.entry.js} +2 -2
- package/dist/atomic/p-beee63e4.entry.js.map +1 -0
- package/dist/atomic/{p-0f39889d.entry.js → p-c34f8190.entry.js} +2 -2
- package/dist/atomic/p-c34f8190.entry.js.map +1 -0
- package/dist/atomic/{p-c25f1437.entry.js → p-c41ab197.entry.js} +2 -2
- package/dist/atomic/p-c41ab197.entry.js.map +1 -0
- package/dist/atomic/{p-93f1d551.entry.js → p-c6e2939f.entry.js} +2 -2
- package/dist/atomic/p-c6e2939f.entry.js.map +1 -0
- package/dist/atomic/{p-723f76a1.entry.js → p-ca8c87ce.entry.js} +2 -2
- package/dist/atomic/{p-723f76a1.entry.js.map → p-ca8c87ce.entry.js.map} +1 -1
- package/dist/atomic/{p-852cc16d.entry.js → p-cacb7fd8.entry.js} +2 -2
- package/dist/atomic/p-cacb7fd8.entry.js.map +1 -0
- package/dist/atomic/{p-5f2d62d9.entry.js → p-d2d22ab2.entry.js} +2 -2
- package/dist/atomic/p-d8028950.entry.js +2 -0
- package/dist/atomic/p-d8028950.entry.js.map +1 -0
- package/dist/atomic/{p-bc8e7f18.entry.js → p-dfc385b7.entry.js} +2 -2
- package/dist/atomic/{p-ccdb72d7.entry.js → p-e1ab844f.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-ca3dc59b.entry.js → p-e3edbf14.entry.js} +2 -2
- package/dist/atomic/{p-fa11d674.entry.js → p-f073a78d.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-4d3c3ea6.js → analytics-config-0af59f0d.js} +2 -2
- package/dist/cjs/{analytics-config-4d3c3ea6.js.map → analytics-config-0af59f0d.js.map} +1 -1
- package/dist/cjs/atomic-category-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
- 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-insight-interface.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-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-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-numeric-facet.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-recs-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-relevance-inspector.cjs.entry.js +38 -0
- package/dist/cjs/atomic-relevance-inspector.cjs.entry.js.map +1 -0
- 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 +1 -1
- 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-query-suggestions_2.cjs.entry.js +2 -2
- package/dist/cjs/atomic-search-box.cjs.entry.js +3 -3
- package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +1 -1
- package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js.map +1 -1
- 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-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/index.cjs.js.map +1 -1
- 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 +1 -1
- package/dist/esm/_index.js +19 -19
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-81997230.js → analytics-config-67197f4c.js} +2 -2
- package/dist/esm/{analytics-config-81997230.js.map → analytics-config-67197f4c.js.map} +1 -1
- package/dist/esm/atomic-category-facet.entry.js +1 -1
- package/dist/esm/atomic-facet.entry.js +1 -1
- 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-insight-interface.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-quickview-action.entry.js +2 -2
- package/dist/esm/atomic-insight-result-quickview-action.entry.js.map +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-numeric-facet.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-recs-interface.entry.js +1 -1
- package/dist/esm/atomic-relevance-inspector.entry.js +34 -0
- package/dist/esm/atomic-relevance-inspector.entry.js.map +1 -0
- 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 +1 -1
- 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-query-suggestions_2.entry.js +2 -2
- package/dist/esm/atomic-search-box.entry.js +3 -3
- package/dist/esm/atomic-smart-snippet-answer_2.entry.js +1 -1
- package/dist/esm/atomic-smart-snippet-answer_2.entry.js.map +1 -1
- 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-tab-manager.entry.js +1 -1
- package/dist/esm/atomic.js +1 -1
- package/dist/esm/index-3f35faca.js +4 -0
- package/dist/esm/index.js.map +1 -1
- 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 +1 -1
- 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-relevance-inspector/atomic-relevance-inspector.d.ts +8 -18
- 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 +4 -1
- package/dist/types/components/search/index.d.ts +0 -1
- 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 +53 -0
- package/dist/types/index.d.ts +3 -3
- package/docs/atomic-docs.json +88 -1
- package/package.json +1 -1
- package/dist/atomic/components/components/common/item-list/fetch-item-context.js +0 -15
- package/dist/atomic/components/components/search/atomic-relevance-inspector/atomic-relevance-inspector.js +0 -101
- 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/p-0c8e7d5f.entry.js.map +0 -1
- package/dist/atomic/p-0f39889d.entry.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-2e4628bb.entry.js.map +0 -1
- package/dist/atomic/p-4069d801.entry.js.map +0 -1
- package/dist/atomic/p-47d35e28.entry.js.map +0 -1
- package/dist/atomic/p-78427c6a.entry.js.map +0 -1
- package/dist/atomic/p-852cc16d.entry.js.map +0 -1
- package/dist/atomic/p-93f1d551.entry.js.map +0 -1
- package/dist/atomic/p-945ddd53.entry.js.map +0 -1
- package/dist/atomic/p-a4d277c7.entry.js.map +0 -1
- package/dist/atomic/p-b3f6561d.entry.js.map +0 -1
- package/dist/atomic/p-c25f1437.entry.js.map +0 -1
- package/dist/atomic/p-c9f1790d.entry.js.map +0 -1
- package/dist/atomic/p-dcba2119.entry.js.map +0 -1
- package/dist/atomic/p-e1d6f5e9.entry.js.map +0 -1
- package/dist/atomic/p-e296615c.entry.js.map +0 -1
- package/dist/atomic/p-e9dc8e90.entry.js.map +0 -1
- package/dist/atomic/p-ee957926.entry.js.map +0 -1
- package/dist/atomic/p-fafd5042.entry.js.map +0 -1
- package/dist/cjs/result-template-decorators-432d11a9.js.map +0 -1
- package/dist/esm/result-template-decorators-2ed76ea9.js.map +0 -1
- package/dist/types/decorators/commerce/product-template-decorators.d.ts +0 -68
- /package/dist/atomic/{p-b05d54e3.entry.js.map → p-30411cd4.entry.js.map} +0 -0
- /package/dist/atomic/{p-aa911e35.entry.js.map → p-48d78fc6.entry.js.map} +0 -0
- /package/dist/atomic/{p-80fc1821.entry.js.map → p-4ae14373.entry.js.map} +0 -0
- /package/dist/atomic/{p-5a710350.entry.js.map → p-4b9a166f.entry.js.map} +0 -0
- /package/dist/atomic/{p-78bb2db9.entry.js.map → p-516b8165.entry.js.map} +0 -0
- /package/dist/atomic/{p-b1ee255c.js.map → p-68896e7d.js.map} +0 -0
- /package/dist/atomic/{p-ef5ba5ae.entry.js.map → p-74822069.entry.js.map} +0 -0
- /package/dist/atomic/{p-ab44a3c9.entry.js.map → p-8103bad3.entry.js.map} +0 -0
- /package/dist/atomic/{p-f2467a39.entry.js.map → p-8acb1466.entry.js.map} +0 -0
- /package/dist/atomic/{p-aabc4174.entry.js.map → p-a5355f5d.entry.js.map} +0 -0
- /package/dist/atomic/{p-c865f044.entry.js.map → p-aa616502.entry.js.map} +0 -0
- /package/dist/atomic/{p-2c221588.entry.js.map → p-b4ad3036.entry.js.map} +0 -0
- /package/dist/atomic/{p-2caf7109.entry.js.map → p-b7cd0342.entry.js.map} +0 -0
- /package/dist/atomic/{p-5f2d62d9.entry.js.map → p-d2d22ab2.entry.js.map} +0 -0
- /package/dist/atomic/{p-bc8e7f18.entry.js.map → p-dfc385b7.entry.js.map} +0 -0
- /package/dist/atomic/{p-ccdb72d7.entry.js.map → p-e1ab844f.entry.js.map} +0 -0
- /package/dist/atomic/{p-ca3dc59b.entry.js.map → p-e3edbf14.entry.js.map} +0 -0
- /package/dist/atomic/{p-fa11d674.entry.js.map → p-f073a78d.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FoldedResult, Result } from '@coveo/headless';
|
2
|
-
import { InteractiveItemContextEvent, ItemContextEvent } from
|
2
|
+
import { InteractiveItemContextEvent, ItemContextEvent } from "../../../common/item-list/stencil-item-decorators";
|
3
3
|
/**
|
4
4
|
* A [StencilJS property decorator](https://stenciljs.com/) to be used for result template components.
|
5
5
|
* This allows the Stencil component to fetch the current result from its rendered parent, the `atomic-result` component.
|
@@ -8,6 +8,8 @@ import { InteractiveItemContextEvent, ItemContextEvent } from '../../common/item
|
|
8
8
|
* @ResultContext() private result!: Result;
|
9
9
|
*
|
10
10
|
* For more information and examples, view the "Utilities" section of the readme.
|
11
|
+
*
|
12
|
+
* @deprecated should only be used for Stencil components. For Lit components, use `createResultContextController` from \@/src/components/search/result-template-component-utils/context/result-context-controller.ts
|
11
13
|
*/
|
12
14
|
export declare function ResultContext(opts?: {
|
13
15
|
folded: boolean;
|
@@ -22,7 +24,9 @@ export type InteractiveResultContextEvent = InteractiveItemContextEvent;
|
|
22
24
|
*
|
23
25
|
* 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).
|
24
26
|
*
|
25
|
-
* @param element The element that the event is dispatched to, which must be the child of a rendered "atomic-result".
|
27
|
+
* @param element The element that the event is dispatched to, which must be the child of a rendered "atomic-result" element.
|
26
28
|
* @returns A promise that resolves on initialization of the parent "atomic-result" element, or rejects when there is no parent "atomic-result" element.
|
29
|
+
*
|
30
|
+
* @deprecated should only be used for Stencil components. For Lit components, use `fetchResultContext` from \@/src/components/search/result-template-component-utils/context/fetch-result-context.ts
|
27
31
|
*/
|
28
32
|
export declare function resultContext<T extends Result | FoldedResult = Result>(element: Element): Promise<T>;
|
@@ -20,6 +20,7 @@ import { InsightResultAttachToCaseEvent } from "./components/insight/atomic-insi
|
|
20
20
|
import { RecommendationEngine, InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "@coveo/headless/recommendation";
|
21
21
|
import { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface";
|
22
22
|
import { RecsStore } from "./components/recommendations/atomic-recs-interface/store";
|
23
|
+
import { Bindings } from "./components/search/atomic-search-interface/atomic-search-interface";
|
23
24
|
import { SearchStore } from "./components/search/atomic-search-interface/store";
|
24
25
|
import { RedirectionPayload } from "./components/common/search-box/redirection-payload";
|
25
26
|
import { AriaLabelGenerator } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results";
|
@@ -39,6 +40,7 @@ export { InsightResultAttachToCaseEvent } from "./components/insight/atomic-insi
|
|
39
40
|
export { RecommendationEngine, InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "@coveo/headless/recommendation";
|
40
41
|
export { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface";
|
41
42
|
export { RecsStore } from "./components/recommendations/atomic-recs-interface/store";
|
43
|
+
export { Bindings } from "./components/search/atomic-search-interface/atomic-search-interface";
|
42
44
|
export { SearchStore } from "./components/search/atomic-search-interface/store";
|
43
45
|
export { RedirectionPayload } from "./components/common/search-box/redirection-payload";
|
44
46
|
export { AriaLabelGenerator } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results";
|
@@ -1836,6 +1838,16 @@ export namespace Components {
|
|
1836
1838
|
*/
|
1837
1839
|
"collapseFacetsAfter": number;
|
1838
1840
|
}
|
1841
|
+
/**
|
1842
|
+
* The `atomic-relevance-inspector` component is used internally to offer insight on search page relevance, as well as information to help troubleshoot issues during development.
|
1843
|
+
*/
|
1844
|
+
interface AtomicRelevanceInspector {
|
1845
|
+
/**
|
1846
|
+
* The Atomic interface bindings, namely the headless search engine and i18n instances.
|
1847
|
+
*/
|
1848
|
+
"bindings": Bindings;
|
1849
|
+
"open": boolean;
|
1850
|
+
}
|
1839
1851
|
/**
|
1840
1852
|
* The `atomic-result` component is used internally by the `atomic-result-list` component.
|
1841
1853
|
*/
|
@@ -2853,6 +2865,10 @@ export interface AtomicQuickviewModalCustomEvent<T> extends CustomEvent<T> {
|
|
2853
2865
|
detail: T;
|
2854
2866
|
target: HTMLAtomicQuickviewModalElement;
|
2855
2867
|
}
|
2868
|
+
export interface AtomicRelevanceInspectorCustomEvent<T> extends CustomEvent<T> {
|
2869
|
+
detail: T;
|
2870
|
+
target: HTMLAtomicRelevanceInspectorElement;
|
2871
|
+
}
|
2856
2872
|
export interface AtomicSearchBoxCustomEvent<T> extends CustomEvent<T> {
|
2857
2873
|
detail: T;
|
2858
2874
|
target: HTMLAtomicSearchBoxElement;
|
@@ -3684,6 +3700,26 @@ declare global {
|
|
3684
3700
|
prototype: HTMLAtomicRefineToggleElement;
|
3685
3701
|
new (): HTMLAtomicRefineToggleElement;
|
3686
3702
|
};
|
3703
|
+
interface HTMLAtomicRelevanceInspectorElementEventMap {
|
3704
|
+
"atomic/relevanceInspector/close": any;
|
3705
|
+
}
|
3706
|
+
/**
|
3707
|
+
* The `atomic-relevance-inspector` component is used internally to offer insight on search page relevance, as well as information to help troubleshoot issues during development.
|
3708
|
+
*/
|
3709
|
+
interface HTMLAtomicRelevanceInspectorElement extends Components.AtomicRelevanceInspector, HTMLStencilElement {
|
3710
|
+
addEventListener<K extends keyof HTMLAtomicRelevanceInspectorElementEventMap>(type: K, listener: (this: HTMLAtomicRelevanceInspectorElement, ev: AtomicRelevanceInspectorCustomEvent<HTMLAtomicRelevanceInspectorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
3711
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
3712
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
3713
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
3714
|
+
removeEventListener<K extends keyof HTMLAtomicRelevanceInspectorElementEventMap>(type: K, listener: (this: HTMLAtomicRelevanceInspectorElement, ev: AtomicRelevanceInspectorCustomEvent<HTMLAtomicRelevanceInspectorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
3715
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
3716
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
3717
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
3718
|
+
}
|
3719
|
+
var HTMLAtomicRelevanceInspectorElement: {
|
3720
|
+
prototype: HTMLAtomicRelevanceInspectorElement;
|
3721
|
+
new (): HTMLAtomicRelevanceInspectorElement;
|
3722
|
+
};
|
3687
3723
|
/**
|
3688
3724
|
* The `atomic-result` component is used internally by the `atomic-result-list` component.
|
3689
3725
|
*/
|
@@ -4455,6 +4491,7 @@ declare global {
|
|
4455
4491
|
"atomic-recs-result-template": HTMLAtomicRecsResultTemplateElement;
|
4456
4492
|
"atomic-refine-modal": HTMLAtomicRefineModalElement;
|
4457
4493
|
"atomic-refine-toggle": HTMLAtomicRefineToggleElement;
|
4494
|
+
"atomic-relevance-inspector": HTMLAtomicRelevanceInspectorElement;
|
4458
4495
|
"atomic-result": HTMLAtomicResultElement;
|
4459
4496
|
"atomic-result-badge": HTMLAtomicResultBadgeElement;
|
4460
4497
|
"atomic-result-children": HTMLAtomicResultChildrenElement;
|
@@ -6206,6 +6243,17 @@ declare namespace LocalJSX {
|
|
6206
6243
|
*/
|
6207
6244
|
"collapseFacetsAfter"?: number;
|
6208
6245
|
}
|
6246
|
+
/**
|
6247
|
+
* The `atomic-relevance-inspector` component is used internally to offer insight on search page relevance, as well as information to help troubleshoot issues during development.
|
6248
|
+
*/
|
6249
|
+
interface AtomicRelevanceInspector {
|
6250
|
+
/**
|
6251
|
+
* The Atomic interface bindings, namely the headless search engine and i18n instances.
|
6252
|
+
*/
|
6253
|
+
"bindings": Bindings;
|
6254
|
+
"onAtomic/relevanceInspector/close"?: (event: AtomicRelevanceInspectorCustomEvent<any>) => void;
|
6255
|
+
"open"?: boolean;
|
6256
|
+
}
|
6209
6257
|
/**
|
6210
6258
|
* The `atomic-result` component is used internally by the `atomic-result-list` component.
|
6211
6259
|
*/
|
@@ -7248,6 +7296,7 @@ declare namespace LocalJSX {
|
|
7248
7296
|
"atomic-recs-result-template": AtomicRecsResultTemplate;
|
7249
7297
|
"atomic-refine-modal": AtomicRefineModal;
|
7250
7298
|
"atomic-refine-toggle": AtomicRefineToggle;
|
7299
|
+
"atomic-relevance-inspector": AtomicRelevanceInspector;
|
7251
7300
|
"atomic-result": AtomicResult;
|
7252
7301
|
"atomic-result-badge": AtomicResultBadge;
|
7253
7302
|
"atomic-result-children": AtomicResultChildren;
|
@@ -7568,6 +7617,10 @@ declare module "@stencil/core" {
|
|
7568
7617
|
* When this component is added to the `atomic-search-interface`, an `atomic-refine-modal` component is automatically created.
|
7569
7618
|
*/
|
7570
7619
|
"atomic-refine-toggle": LocalJSX.AtomicRefineToggle & JSXBase.HTMLAttributes<HTMLAtomicRefineToggleElement>;
|
7620
|
+
/**
|
7621
|
+
* The `atomic-relevance-inspector` component is used internally to offer insight on search page relevance, as well as information to help troubleshoot issues during development.
|
7622
|
+
*/
|
7623
|
+
"atomic-relevance-inspector": LocalJSX.AtomicRelevanceInspector & JSXBase.HTMLAttributes<HTMLAtomicRelevanceInspectorElement>;
|
7571
7624
|
/**
|
7572
7625
|
* The `atomic-result` component is used internally by the `atomic-result-list` component.
|
7573
7626
|
*/
|
package/dist/types/index.d.ts
CHANGED
@@ -2,7 +2,8 @@ export type { i18n } from 'i18next';
|
|
2
2
|
export { Components, JSX } from './components';
|
3
3
|
export { CommerceBindings } from './components/commerce/atomic-commerce-interface/atomic-commerce-interface';
|
4
4
|
export { SelectChildProductEventArgs } from './components/commerce/atomic-product-children/select-child-product-event';
|
5
|
-
export {
|
5
|
+
export { fetchProductContext } from './components/commerce/product-template-component-utils/context/fetch-product-context';
|
6
|
+
export { productContext } from './components/commerce/product-template-component-utils/context/stencil-product-template-decorators';
|
6
7
|
export { PopoverChildFacet } from './components/common/facets/popover/popover-type';
|
7
8
|
export { RedirectionPayload } from './components/common/search-box/redirection-payload';
|
8
9
|
export { dispatchSearchBoxSuggestionsEvent } from './components/common/suggestions/suggestions-events';
|
@@ -10,7 +11,6 @@ export type { SearchBoxSuggestionElement, SearchBoxSuggestions, SearchBoxSuggest
|
|
10
11
|
export { elementHasNoQuery, elementHasQuery, } from './components/common/suggestions/suggestions-utils';
|
11
12
|
export { RecsBindings } from './components/recommendations/atomic-recs-interface/atomic-recs-interface';
|
12
13
|
export { Bindings } from './components/search/atomic-search-interface/atomic-search-interface';
|
13
|
-
export { resultContext } from './components/search/result-template-
|
14
|
-
export { fetchProductContext } from './decorators/commerce/product-template-decorators';
|
14
|
+
export { resultContext } from './components/search/result-template-component-utils/context/stencil-result-template-decorators';
|
15
15
|
export { initializeBindings, MissingInterfaceParentError, } from './utils/initialization-utils';
|
16
16
|
export { bindLogDocumentOpenOnResult } from './utils/result-utils';
|
package/docs/atomic-docs.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"timestamp": "2025-10-
|
2
|
+
"timestamp": "2025-10-01T20:06:32",
|
3
3
|
"compiler": {
|
4
4
|
"name": "@stencil/core",
|
5
5
|
"version": "4.20.0",
|
@@ -9341,6 +9341,88 @@
|
|
9341
9341
|
]
|
9342
9342
|
}
|
9343
9343
|
},
|
9344
|
+
{
|
9345
|
+
"filePath": "src/components/search/atomic-relevance-inspector/atomic-relevance-inspector.tsx",
|
9346
|
+
"encapsulation": "shadow",
|
9347
|
+
"tag": "atomic-relevance-inspector",
|
9348
|
+
"docs": "The `atomic-relevance-inspector` component is used internally to offer insight on search page relevance, as well as information to help troubleshoot issues during development.",
|
9349
|
+
"docsTags": [],
|
9350
|
+
"usage": {},
|
9351
|
+
"props": [
|
9352
|
+
{
|
9353
|
+
"name": "bindings",
|
9354
|
+
"type": "CommonBindings<SearchEngine<{}>, SearchStore, AtomicSearchInterface> & NonceBindings",
|
9355
|
+
"complexType": {
|
9356
|
+
"original": "Bindings",
|
9357
|
+
"resolved": "CommonBindings<SearchEngine<{}>, SearchStore, AtomicSearchInterface> & NonceBindings",
|
9358
|
+
"references": {
|
9359
|
+
"Bindings": {
|
9360
|
+
"location": "import",
|
9361
|
+
"path": "../atomic-search-interface/atomic-search-interface",
|
9362
|
+
"id": "src/components/search/atomic-search-interface/atomic-search-interface.ts::Bindings"
|
9363
|
+
}
|
9364
|
+
}
|
9365
|
+
},
|
9366
|
+
"mutable": false,
|
9367
|
+
"reflectToAttr": false,
|
9368
|
+
"docs": "The Atomic interface bindings, namely the headless search engine and i18n instances.",
|
9369
|
+
"docsTags": [],
|
9370
|
+
"values": [
|
9371
|
+
{
|
9372
|
+
"type": "CommonBindings<SearchEngine<{}>, SearchStore, AtomicSearchInterface> & NonceBindings"
|
9373
|
+
}
|
9374
|
+
],
|
9375
|
+
"optional": false,
|
9376
|
+
"required": true
|
9377
|
+
},
|
9378
|
+
{
|
9379
|
+
"name": "open",
|
9380
|
+
"type": "boolean",
|
9381
|
+
"complexType": {
|
9382
|
+
"original": "boolean",
|
9383
|
+
"resolved": "boolean",
|
9384
|
+
"references": {}
|
9385
|
+
},
|
9386
|
+
"mutable": false,
|
9387
|
+
"attr": "open",
|
9388
|
+
"reflectToAttr": true,
|
9389
|
+
"docs": "",
|
9390
|
+
"docsTags": [],
|
9391
|
+
"default": "false",
|
9392
|
+
"values": [
|
9393
|
+
{
|
9394
|
+
"type": "boolean"
|
9395
|
+
}
|
9396
|
+
],
|
9397
|
+
"optional": false,
|
9398
|
+
"required": false
|
9399
|
+
}
|
9400
|
+
],
|
9401
|
+
"methods": [],
|
9402
|
+
"events": [
|
9403
|
+
{
|
9404
|
+
"event": "atomic/relevanceInspector/close",
|
9405
|
+
"detail": "any",
|
9406
|
+
"bubbles": true,
|
9407
|
+
"complexType": {
|
9408
|
+
"original": "any",
|
9409
|
+
"resolved": "any",
|
9410
|
+
"references": {}
|
9411
|
+
},
|
9412
|
+
"cancelable": true,
|
9413
|
+
"composed": true,
|
9414
|
+
"docs": "",
|
9415
|
+
"docsTags": []
|
9416
|
+
}
|
9417
|
+
],
|
9418
|
+
"listeners": [],
|
9419
|
+
"styles": [],
|
9420
|
+
"slots": [],
|
9421
|
+
"parts": [],
|
9422
|
+
"dependents": [],
|
9423
|
+
"dependencies": [],
|
9424
|
+
"dependencyGraph": {}
|
9425
|
+
},
|
9344
9426
|
{
|
9345
9427
|
"filePath": "src/components/search/atomic-result/atomic-result.tsx",
|
9346
9428
|
"encapsulation": "shadow",
|
@@ -15609,6 +15691,11 @@
|
|
15609
15691
|
"docstring": "",
|
15610
15692
|
"path": "src/utils/initialization-utils.tsx"
|
15611
15693
|
},
|
15694
|
+
"src/components/search/atomic-search-interface/atomic-search-interface.ts::Bindings": {
|
15695
|
+
"declaration": "export type Bindings = CommonBindings<\n SearchEngine,\n SearchStore,\n AtomicSearchInterface\n> &\n //TODO: KIT-4893 - Remove once atomic-quickview-modal migration is complete.\n NonceBindings;",
|
15696
|
+
"docstring": "",
|
15697
|
+
"path": "src/components/search/atomic-search-interface/atomic-search-interface.ts"
|
15698
|
+
},
|
15612
15699
|
"../headless/dist/definitions/index.d.ts::FoldedResult": {
|
15613
15700
|
"declaration": "any",
|
15614
15701
|
"docstring": "",
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@coveo/atomic",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.33.9-pre.
|
4
|
+
"version": "3.33.9-pre.99566f9dae",
|
5
5
|
"description": "A web-component library for building modern UIs interfacing with the Coveo platform",
|
6
6
|
"homepage": "https://docs.coveo.com/en/atomic/latest/",
|
7
7
|
"repository": {
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { closest } from '../../../utils/dom-utils.js';
|
2
|
-
import { buildCustomEvent } from '../../../utils/event-utils.js';
|
3
|
-
import { MissingParentError } from './context/item-context-controller.js';
|
4
|
-
const itemContextEventName = 'atomic/resolveResult';
|
5
|
-
export function fetchItemContext(element, parentName) {
|
6
|
-
return new Promise((resolve, reject) => {
|
7
|
-
const event = buildCustomEvent(itemContextEventName, (item) => {
|
8
|
-
return resolve(item);
|
9
|
-
});
|
10
|
-
element.dispatchEvent(event);
|
11
|
-
if (!closest(element, parentName)) {
|
12
|
-
reject(new MissingParentError(element.nodeName.toLowerCase(), parentName));
|
13
|
-
}
|
14
|
-
});
|
15
|
-
}
|
@@ -1,101 +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 { getOrganizationEndpoint } from '@coveo/headless';
|
8
|
-
import { html, LitElement, nothing } from 'lit';
|
9
|
-
import { customElement, state } from 'lit/decorators.js';
|
10
|
-
import { renderButton } from "../../common/button";
|
11
|
-
import { withTailwindStyles } from "../../../decorators/with-tailwind-styles.js";
|
12
|
-
import "../../common/atomic-modal/atomic-modal";
|
13
|
-
import { bindingGuard } from "../../../decorators/binding-guard";
|
14
|
-
import { bindings } from "../../../decorators/bindings";
|
15
|
-
import { errorGuard } from "../../../decorators/error-guard";
|
16
|
-
/**
|
17
|
-
* The `atomic-relevance-inspector` component is used internally to offer insight on search page relevance, as well as information to help troubleshoot issues during development.
|
18
|
-
*
|
19
|
-
* @internal
|
20
|
-
*/
|
21
|
-
let AtomicRelevanceInspector = class AtomicRelevanceInspector extends LitElement {
|
22
|
-
constructor() {
|
23
|
-
super(...arguments);
|
24
|
-
this.open = false;
|
25
|
-
this.initialize = () => {
|
26
|
-
this.bindings.interfaceElement.addEventListener('dblclick', this.handleRelevanceInspectorDoubleClick);
|
27
|
-
console.log(this.bindings);
|
28
|
-
};
|
29
|
-
this.handleRelevanceInspectorDoubleClick = (e) => {
|
30
|
-
if (e.altKey) {
|
31
|
-
this.open = !this.open;
|
32
|
-
}
|
33
|
-
};
|
34
|
-
}
|
35
|
-
disconnectedCallback() {
|
36
|
-
this.removeEventListener('dblclick', this.handleRelevanceInspectorDoubleClick);
|
37
|
-
}
|
38
|
-
render() {
|
39
|
-
return html `
|
40
|
-
<atomic-modal
|
41
|
-
.isOpen=${this.open}
|
42
|
-
@close=${() => this.handleCloseRelevanceInspector()}
|
43
|
-
exportparts="footer"
|
44
|
-
>
|
45
|
-
<p slot="header">Open the relevance inspector</p>
|
46
|
-
<p slot="body">
|
47
|
-
The Relevance Inspector will open in the Coveo Administration Console.
|
48
|
-
</p>
|
49
|
-
<div slot="footer" class="flex w-full items-center justify-end">
|
50
|
-
${renderButton({
|
51
|
-
props: {
|
52
|
-
style: 'outline-primary',
|
53
|
-
class: 'mr-2 p-2',
|
54
|
-
onClick: () => this.handleCloseRelevanceInspector(),
|
55
|
-
text: 'Ignore',
|
56
|
-
},
|
57
|
-
})(nothing)}
|
58
|
-
${renderButton({
|
59
|
-
props: {
|
60
|
-
style: 'primary',
|
61
|
-
class: 'p-2',
|
62
|
-
onClick: () => {
|
63
|
-
window.open(this.adminHref, '_blank');
|
64
|
-
this.handleCloseRelevanceInspector();
|
65
|
-
},
|
66
|
-
text: 'Open',
|
67
|
-
},
|
68
|
-
})(nothing)}
|
69
|
-
</div>
|
70
|
-
</atomic-modal>
|
71
|
-
`;
|
72
|
-
}
|
73
|
-
handleCloseRelevanceInspector() {
|
74
|
-
this.open = false;
|
75
|
-
}
|
76
|
-
get adminHref() {
|
77
|
-
const { organizationId, environment } = this.bindings.engine.state.configuration;
|
78
|
-
const admin = getOrganizationEndpoint(organizationId, environment, 'admin');
|
79
|
-
const { searchResponseId } = this.bindings.engine.state.search;
|
80
|
-
return `${admin}/admin/#/${organizationId}/search/relevanceInspector/${searchResponseId}`;
|
81
|
-
}
|
82
|
-
};
|
83
|
-
__decorate([
|
84
|
-
state()
|
85
|
-
], AtomicRelevanceInspector.prototype, "bindings", void 0);
|
86
|
-
__decorate([
|
87
|
-
state()
|
88
|
-
], AtomicRelevanceInspector.prototype, "error", void 0);
|
89
|
-
__decorate([
|
90
|
-
state()
|
91
|
-
], AtomicRelevanceInspector.prototype, "open", void 0);
|
92
|
-
__decorate([
|
93
|
-
bindingGuard(),
|
94
|
-
errorGuard()
|
95
|
-
], AtomicRelevanceInspector.prototype, "render", null);
|
96
|
-
AtomicRelevanceInspector = __decorate([
|
97
|
-
customElement('atomic-relevance-inspector'),
|
98
|
-
bindings(),
|
99
|
-
withTailwindStyles
|
100
|
-
], AtomicRelevanceInspector);
|
101
|
-
export { AtomicRelevanceInspector };
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import { InteractiveItemContextController, } from "../../components/common/item-list/context/interactive-item-context-controller";
|
2
|
-
import { ItemContextController, } from "../../components/common/item-list/context/item-context-controller";
|
3
|
-
import { fetchItemContext } from "../../components/common/item-list/fetch-item-context";
|
4
|
-
/**
|
5
|
-
* Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing product context in product template components.
|
6
|
-
*
|
7
|
-
* @param host - The Lit component instance
|
8
|
-
* @param options - Configuration options
|
9
|
-
* @returns ItemContextController instance configured for atomic-product
|
10
|
-
*
|
11
|
-
* @example
|
12
|
-
* ```typescript
|
13
|
-
* @customElement('my-product-component')
|
14
|
-
* export class MyProductComponent extends LitElement {
|
15
|
-
* private productController = createProductContextController(this);
|
16
|
-
*
|
17
|
-
* @state() product!: Product;
|
18
|
-
*
|
19
|
-
* render() {
|
20
|
-
* this.product = this.productController.item;
|
21
|
-
* return html`<div>${this.product?.ec_name}</div>`;
|
22
|
-
* }
|
23
|
-
* }
|
24
|
-
* ```
|
25
|
-
*/
|
26
|
-
export function createProductContextController(host, options = {}) {
|
27
|
-
return new ItemContextController(host, {
|
28
|
-
parentName: 'atomic-product',
|
29
|
-
folded: options.folded ?? false,
|
30
|
-
});
|
31
|
-
}
|
32
|
-
/**
|
33
|
-
* Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing interactive product context in product template components.
|
34
|
-
*
|
35
|
-
* @param host - The Lit component instance
|
36
|
-
* @returns InteractiveItemContextController instance
|
37
|
-
*
|
38
|
-
* @example
|
39
|
-
* ```typescript
|
40
|
-
* @customElement('my-interactive-product-component')
|
41
|
-
* export class MyInteractiveProductComponent extends LitElement {
|
42
|
-
* private interactiveProductController = createInteractiveProductContextController(this);
|
43
|
-
*
|
44
|
-
* @state() product!: Product;
|
45
|
-
*
|
46
|
-
* render() {
|
47
|
-
* this.product = this.interactiveProductController.interactiveItem;
|
48
|
-
* return html`<div>${this.product?.ec_name}</div>`;
|
49
|
-
* }
|
50
|
-
* }
|
51
|
-
* ```
|
52
|
-
*/
|
53
|
-
export function createInteractiveProductContextController(host) {
|
54
|
-
return new InteractiveItemContextController(host);
|
55
|
-
}
|
56
|
-
/**
|
57
|
-
* Retrieves `Product` on a rendered `atomic-product`.
|
58
|
-
*
|
59
|
-
* 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.
|
60
|
-
*
|
61
|
-
* 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).
|
62
|
-
*
|
63
|
-
* @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.
|
64
|
-
* @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.
|
65
|
-
*/
|
66
|
-
export function fetchProductContext(element) {
|
67
|
-
return fetchItemContext(element, 'atomic-product');
|
68
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"result-template-decorators.js","mappings":";;AASA;;;;;;;;;SASgB,aAAa,CAAC,OAA0B,EAAC,MAAM,EAAE,KAAK,EAAC;IACrE,OAAO,WAAW,CAAC,EAAC,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;AACzE,CAAC;SAEe,wBAAwB;IACtC,OAAO,sBAAsB,EAAE,CAAC;AAClC,CAAC;AAKD;;;;;;;;;;SAUgB,aAAa,CAC3B,OAAgB;IAEhB,OAAO,WAAW,CAAI,OAAO,EAAE,eAAe,CAAC,CAAC;AAClD;;;;","names":[],"sources":["src/components/search/result-template-components/result-template-decorators.tsx"],"sourcesContent":["import {FoldedResult, Result} from '@coveo/headless';\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 result template components.\n * This allows the Stencil component to fetch the current result from its rendered parent, the `atomic-result` component.\n *\n * Example:\n * @ResultContext() private result!: Result;\n *\n * For more information and examples, view the \"Utilities\" section of the readme.\n */\nexport function ResultContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-result', folded: opts.folded});\n}\n\nexport function InteractiveResultContext() {\n return InteractiveItemContext();\n}\n\nexport type ResultContextEvent<T = Result> = ItemContextEvent<T>;\nexport type InteractiveResultContextEvent = InteractiveItemContextEvent;\n\n/**\n * Retrieves `Result` on a rendered `atomic-result`.\n *\n * This method is useful for building custom result template elements, see [Create a Result List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-result-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-result\".\n * @returns A promise that resolves on initialization of the parent \"atomic-result\" element, or rejects when there is no parent \"atomic-result\" element.\n */\nexport function resultContext<T extends Result | FoldedResult = Result>(\n element: Element\n) {\n return itemContext<T>(element, 'atomic-result');\n}\n"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["atomicResultMultiValueTextCss","AtomicResultMultiValueTextStyle0","AtomicResultMultiValueText","this","maxValuesToDisplay","delimiter","sortedValues","initialize","breadcrumbManager","buildBreadcrumbManager","bindings","engine","resultValues","value","ResultTemplatesHelpers","getResultProperty","result","field","Array","isArray","map","v","trim","error","Error","split","facetSelectedValues","state","facetBreadcrumbs","filter","facet","reduce","values","updateSortedValues","allValues","allValuesSet","Set","firstValues","has","from","set","add","getShouldDisplayLabel","length","getNumberOfValuesToDisplay","Math","min","renderValue","label","getFieldValueCaption","i18n","kebabValue","titleToKebab","h","key","part","name","renderSeparator","beforeValue","afterValue","class","renderMoreLabel","t","renderListItems","numberOfValuesToDisplay","nodes","i","push","componentWillRender","render","host","remove","__decorate","InitializeBindings","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-multi-value-text/atomic-result-multi-value-text.pcss?tag=atomic-result-multi-value-text&encapsulation=shadow","src/components/search/result-template-components/atomic-result-multi-value-text/atomic-result-multi-value-text.tsx"],"sourcesContent":[":host {\n > ul {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n\n li {\n display: inline-block;\n }\n }\n}\n\n.separator {\n &::before {\n display: inline;\n content: ',\\00a0';\n }\n}\n","import {\n BreadcrumbManager,\n buildBreadcrumbManager,\n Result,\n ResultTemplatesHelpers,\n} from '@coveo/headless';\nimport {Component, Element, Prop, h, State, VNode} from '@stencil/core';\nimport {getFieldValueCaption} from '../../../../utils/field-utils';\nimport {InitializeBindings} from '../../../../utils/initialization-utils';\nimport {titleToKebab} from '../../../../utils/utils';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-multi-value-text` component renders the values of a multi-value string field.\n * @part result-multi-value-text-list - The list of field values.\n * @part result-multi-value-text-separator - The separator to display between each of the field values.\n * @part result-multi-value-text-value - A field value.\n * @part result-multi-value-text-value-more - A label indicating some values were omitted.\n * @slot result-multi-value-text-value-* - A custom caption value that's specified for a given part of a multi-text field value. For example, if you want to use `Off-Campus Resident` as a caption value for `Off-campus apartment` in `Off-campus apartment;On-campus apartment`, you'd use `<span slot=\"result-multi-value-text-value-off-campus-apartment\">Off-Campus Resident</span>`). The suffix of this slot corresponds with the field value, written in kebab case.\n */\n@Component({\n tag: 'atomic-result-multi-value-text',\n styleUrl: 'atomic-result-multi-value-text.pcss',\n shadow: true,\n})\nexport class AtomicResultMultiValueText {\n public breadcrumbManager!: BreadcrumbManager;\n\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The field that the component should use.\n * The component will try to find this field in the `Result.raw` object unless it finds it in the `Result` object first.\n * Make sure this field is present in the `fieldsToInclude` property of the `atomic-search-interface` component.\n */\n @Prop({reflect: true}) public field!: string;\n\n /**\n * The maximum number of field values to display.\n * If there are _n_ more values than the specified maximum, the last displayed value will be \"_n_ more...\".\n */\n @Prop({reflect: true}) public maxValuesToDisplay = 3;\n\n /**\n * The delimiter used to separate values when the field isn't indexed as a multi value field.\n */\n @Prop({reflect: true}) public delimiter: string | null = null;\n\n private sortedValues: string[] | null = null;\n\n public initialize() {\n this.breadcrumbManager = buildBreadcrumbManager(this.bindings.engine);\n }\n\n private get resultValues() {\n const value = ResultTemplatesHelpers.getResultProperty(\n this.result,\n this.field\n );\n\n if (value === null) {\n return null;\n }\n\n if (Array.isArray(value)) {\n return value.map((v) => `${v}`.trim());\n }\n\n if (typeof value !== 'string' || value.trim() === '') {\n this.error = new Error(\n `Could not parse \"${value}\" from field \"${this.field}\" as a string array.`\n );\n return null;\n }\n\n return this.delimiter\n ? value.split(this.delimiter).map((value) => value.trim())\n : [value];\n }\n\n private get facetSelectedValues() {\n return this.breadcrumbManager.state.facetBreadcrumbs\n .filter((facet) => facet.field === this.field)\n .reduce(\n (values, facet) => [\n ...values,\n ...facet.values.map(({value}) => value.value),\n ],\n [] as string[]\n );\n }\n\n private updateSortedValues() {\n const allValues = this.resultValues;\n if (allValues === null) {\n this.sortedValues = null;\n return;\n }\n const allValuesSet = new Set(allValues);\n const firstValues = this.facetSelectedValues.filter((value) =>\n allValuesSet.has(value)\n );\n this.sortedValues = Array.from(\n allValues.reduce((set, value) => set.add(value), new Set(firstValues))\n );\n }\n\n private getShouldDisplayLabel(values: string[]) {\n return (\n this.maxValuesToDisplay > 0 && values.length > this.maxValuesToDisplay\n );\n }\n\n private getNumberOfValuesToDisplay(values: string[]) {\n return Math.min(values.length, this.maxValuesToDisplay);\n }\n\n private renderValue(value: string) {\n const label = getFieldValueCaption(this.field, value, this.bindings.i18n);\n const kebabValue = titleToKebab(value);\n return (\n <li key={value} part=\"result-multi-value-text-value\">\n <slot name={`result-multi-value-text-value-${kebabValue}`}>\n {label}\n </slot>\n </li>\n );\n }\n\n private renderSeparator(beforeValue: string, afterValue: string) {\n return (\n <li\n aria-hidden=\"true\"\n part=\"result-multi-value-text-separator\"\n key={`${beforeValue}~${afterValue}`}\n class=\"separator\"\n ></li>\n );\n }\n\n private renderMoreLabel(value: number) {\n return (\n <li key=\"more-field-values\" part=\"result-multi-value-text-value-more\">\n {this.bindings.i18n.t('n-more', {value})}\n </li>\n );\n }\n\n private renderListItems(values: string[]) {\n const numberOfValuesToDisplay = this.getNumberOfValuesToDisplay(values);\n\n const nodes: VNode[] = [];\n for (let i = 0; i < numberOfValuesToDisplay; i++) {\n if (i > 0) {\n nodes.push(this.renderSeparator(values[i - 1], values[i]));\n }\n nodes.push(this.renderValue(values[i]));\n }\n if (this.getShouldDisplayLabel(values)) {\n nodes.push(\n this.renderSeparator(\n values[numberOfValuesToDisplay - 1],\n 'more-field-values'\n )\n );\n nodes.push(this.renderMoreLabel(values.length - numberOfValuesToDisplay));\n }\n return nodes;\n }\n\n public componentWillRender() {\n this.updateSortedValues();\n }\n\n public render() {\n if (this.sortedValues === null) {\n this.host.remove();\n return;\n }\n return (\n <ul part=\"result-multi-value-text-list\">\n {...this.renderListItems(this.sortedValues)}\n </ul>\n );\n }\n}\n"],"mappings":"+bAAA,MAAMA,EAAgC,iJACtC,MAAAC,EAAeD,E,iXCyBFE,EAA0B,M,yBAqBPC,KAAAC,mBAAqB,EAKrBD,KAAAE,UAA2B,KAEjDF,KAAAG,aAAgC,K,kEAPW,E,eAKM,I,CAIlD,UAAAC,GACLJ,KAAKK,kBAAoBC,EAAuBN,KAAKO,SAASC,O,CAGhE,gBAAYC,GACV,MAAMC,EAAQC,EAAuBC,kBACnCZ,KAAKa,OACLb,KAAKc,OAGP,GAAIJ,IAAU,KAAM,CAClB,OAAO,I,CAGT,GAAIK,MAAMC,QAAQN,GAAQ,CACxB,OAAOA,EAAMO,KAAKC,GAAM,GAAGA,IAAIC,Q,CAGjC,UAAWT,IAAU,UAAYA,EAAMS,SAAW,GAAI,CACpDnB,KAAKoB,MAAQ,IAAIC,MACf,oBAAoBX,kBAAsBV,KAAKc,6BAEjD,OAAO,I,CAGT,OAAOd,KAAKE,UACRQ,EAAMY,MAAMtB,KAAKE,WAAWe,KAAKP,GAAUA,EAAMS,SACjD,CAACT,E,CAGP,uBAAYa,GACV,OAAOvB,KAAKK,kBAAkBmB,MAAMC,iBACjCC,QAAQC,GAAUA,EAAMb,QAAUd,KAAKc,QACvCc,QACC,CAACC,EAAQF,IAAU,IACdE,KACAF,EAAME,OAAOZ,KAAI,EAAEP,WAAWA,EAAMA,UAEzC,G,CAIE,kBAAAoB,GACN,MAAMC,EAAY/B,KAAKS,aACvB,GAAIsB,IAAc,KAAM,CACtB/B,KAAKG,aAAe,KACpB,M,CAEF,MAAM6B,EAAe,IAAIC,IAAIF,GAC7B,MAAMG,EAAclC,KAAKuB,oBAAoBG,QAAQhB,GACnDsB,EAAaG,IAAIzB,KAEnBV,KAAKG,aAAeY,MAAMqB,KACxBL,EAAUH,QAAO,CAACS,EAAK3B,IAAU2B,EAAIC,IAAI5B,IAAQ,IAAIuB,IAAIC,I,CAIrD,qBAAAK,CAAsBV,GAC5B,OACE7B,KAAKC,mBAAqB,GAAK4B,EAAOW,OAASxC,KAAKC,kB,CAIhD,0BAAAwC,CAA2BZ,GACjC,OAAOa,KAAKC,IAAId,EAAOW,OAAQxC,KAAKC,mB,CAG9B,WAAA2C,CAAYlC,GAClB,MAAMmC,EAAQC,EAAqB9C,KAAKc,MAAOJ,EAAOV,KAAKO,SAASwC,MACpE,MAAMC,EAAaC,EAAavC,GAChC,OACEwC,EAAA,MAAIC,IAAKzC,EAAO0C,KAAK,iCACnBF,EAAA,QAAMG,KAAM,iCAAiCL,KAC1CH,G,CAMD,eAAAS,CAAgBC,EAAqBC,GAC3C,OACEN,EAAA,oBACc,OACZE,KAAK,oCACLD,IAAK,GAAGI,KAAeC,IACvBC,MAAM,a,CAKJ,eAAAC,CAAgBhD,GACtB,OACEwC,EAAA,MAAIC,IAAI,oBAAoBC,KAAK,sCAC9BpD,KAAKO,SAASwC,KAAKY,EAAE,SAAU,CAACjD,U,CAK/B,eAAAkD,CAAgB/B,GACtB,MAAMgC,EAA0B7D,KAAKyC,2BAA2BZ,GAEhE,MAAMiC,EAAiB,GACvB,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAyBE,IAAK,CAChD,GAAIA,EAAI,EAAG,CACTD,EAAME,KAAKhE,KAAKsD,gBAAgBzB,EAAOkC,EAAI,GAAIlC,EAAOkC,I,CAExDD,EAAME,KAAKhE,KAAK4C,YAAYf,EAAOkC,I,CAErC,GAAI/D,KAAKuC,sBAAsBV,GAAS,CACtCiC,EAAME,KACJhE,KAAKsD,gBACHzB,EAAOgC,EAA0B,GACjC,sBAGJC,EAAME,KAAKhE,KAAK0D,gBAAgB7B,EAAOW,OAASqB,G,CAElD,OAAOC,C,CAGF,mBAAAG,GACLjE,KAAK8B,oB,CAGA,MAAAoC,GACL,GAAIlE,KAAKG,eAAiB,KAAM,CAC9BH,KAAKmE,KAAKC,SACV,M,CAEF,OACElB,EAAA,MAAIE,KAAK,mCACHpD,KAAK4D,gBAAgB5D,KAAKG,c,6BA9JPkE,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["atomicInsightResultActionCss","AtomicInsightResultActionStyle0","Actions","AtomicInsightResultAction","this","icon","tooltip","tooltipOnClick","action","initialize","actions","loadInsightAnalyticsActions","bindings","engine","onClick","originalTooltip","setTimeout","CopyToClipboard","dispatch","logCopyToClipboard","result","navigator","clipboard","writeText","clickUri","PostToFeed","logFeedItemTextPost","SendAsEmail","logCaseSendEmail","actionClicked","emit","getIcon","CopyIcon","AttachToCase","AttachIcon","Quickview","QuickviewIcon","FeedIcon","EmailIcon","render","h","IconButton","key","partPrefix","style","title","__decorate","InitializeBindings","ResultContext"],"sources":["src/components/insight/atomic-insight-result-action/atomic-insight-result-action.pcss?tag=atomic-insight-result-action","src/components/insight/atomic-insight-result-action/atomic-insight-result-action.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n\n:host {\n &::part(result-action-button) {\n @apply flex items-center justify-center;\n @apply h-8 w-8;\n }\n}\n","import {Result} from '@coveo/headless';\nimport {\n InsightAnalyticsActionCreators,\n loadInsightAnalyticsActions,\n} from '@coveo/headless/insight';\nimport {Component, Event, EventEmitter, Prop, State, h} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport CopyIcon from '../../../images/copy-dark.svg';\nimport EmailIcon from '../../../images/email.svg';\nimport QuickviewIcon from '../../../images/preview.svg';\nimport FeedIcon from '../../../images/share-post.svg';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {IconButton} from '../../common/stencil-iconButton';\nimport {ResultContext} from '../../search/result-template-components/result-template-decorators';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\nexport interface InsightResultActionClickedEvent {\n action: string;\n result: Result;\n}\n\nexport enum Actions {\n CopyToClipboard = 'copyToClipboard',\n AttachToCase = 'attachToCase',\n Quickview = 'quickview',\n PostToFeed = 'postToFeed',\n SendAsEmail = 'sendAsEmail',\n}\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-action',\n styleUrl: 'atomic-insight-result-action.pcss',\n})\nexport class AtomicInsightResultAction\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n @State() public error!: Error;\n\n @Event({\n eventName: 'atomicInsightResultActionClicked',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private actionClicked!: EventEmitter<InsightResultActionClickedEvent>;\n\n /**\n * Specify the result action icon to display.\n */\n @Prop({mutable: true}) public icon = '';\n\n /**\n * The text tooltip to show on the result action icon.\n */\n @Prop({mutable: true}) public tooltip = '';\n\n /**\n * The text tooltip to show on the result action icon for some time after clicking the button.\n */\n @Prop({mutable: true}) public tooltipOnClick = '';\n\n /**\n * The type of action to perform when the result action is clicked. This will be sent along the event fired when the button is clicked.\n */\n @Prop({mutable: true}) public action: Actions | string = '';\n\n private actions!: InsightAnalyticsActionCreators;\n\n public initialize() {\n this.actions = loadInsightAnalyticsActions(this.bindings.engine);\n }\n\n private onClick() {\n if (this.tooltipOnClick) {\n const originalTooltip = this.tooltip;\n this.tooltip = this.tooltipOnClick;\n setTimeout(() => {\n this.tooltip = originalTooltip;\n }, 1000);\n }\n\n switch (this.action) {\n case Actions.CopyToClipboard:\n this.bindings.engine.dispatch(\n this.actions.logCopyToClipboard(this.result)\n );\n navigator.clipboard.writeText(this.result?.clickUri);\n break;\n case Actions.PostToFeed:\n this.bindings.engine.dispatch(\n this.actions.logFeedItemTextPost(this.result)\n );\n break;\n case Actions.SendAsEmail:\n this.bindings.engine.dispatch(\n this.actions.logCaseSendEmail(this.result)\n );\n break;\n }\n\n this.actionClicked.emit({action: this.action, result: this.result});\n }\n\n private getIcon() {\n if (this.icon) {\n return this.icon;\n }\n\n switch (this.action) {\n case Actions.CopyToClipboard:\n return CopyIcon;\n case Actions.AttachToCase:\n return AttachIcon;\n case Actions.Quickview:\n return QuickviewIcon;\n case Actions.PostToFeed:\n return FeedIcon;\n case Actions.SendAsEmail:\n return EmailIcon;\n default:\n return QuickviewIcon;\n }\n }\n\n public render() {\n return (\n <IconButton\n partPrefix=\"result-action\"\n style=\"outline-neutral\"\n icon={this.getIcon()}\n title={this.tooltip}\n onClick={() => this.onClick()}\n />\n );\n }\n}\n"],"mappings":"+qEAAA,MAAMA,EAA+B,wnjEACrC,MAAAC,EAAeD,E,2WCuBf,IAAYE,GAAZ,SAAYA,GACVA,EAAA,qCACAA,EAAA,+BACAA,EAAA,yBACAA,EAAA,2BACAA,EAAA,4BACD,EAND,CAAYA,MAAO,K,MAeNC,EAAyB,M,yFAkBNC,KAAAC,KAAO,GAKPD,KAAAE,QAAU,GAKVF,KAAAG,eAAiB,GAKjBH,KAAAI,OAA2B,G,+BAfpB,G,aAKG,G,oBAKO,G,YAKU,E,CAIlD,UAAAC,GACLL,KAAKM,QAAUC,EAA4BP,KAAKQ,SAASC,O,CAGnD,OAAAC,GACN,GAAIV,KAAKG,eAAgB,CACvB,MAAMQ,EAAkBX,KAAKE,QAC7BF,KAAKE,QAAUF,KAAKG,eACpBS,YAAW,KACTZ,KAAKE,QAAUS,CAAe,GAC7B,I,CAGL,OAAQX,KAAKI,QACX,KAAKN,EAAQe,gBACXb,KAAKQ,SAASC,OAAOK,SACnBd,KAAKM,QAAQS,mBAAmBf,KAAKgB,SAEvCC,UAAUC,UAAUC,UAAUnB,KAAKgB,QAAQI,UAC3C,MACF,KAAKtB,EAAQuB,WACXrB,KAAKQ,SAASC,OAAOK,SACnBd,KAAKM,QAAQgB,oBAAoBtB,KAAKgB,SAExC,MACF,KAAKlB,EAAQyB,YACXvB,KAAKQ,SAASC,OAAOK,SACnBd,KAAKM,QAAQkB,iBAAiBxB,KAAKgB,SAErC,MAGJhB,KAAKyB,cAAcC,KAAK,CAACtB,OAAQJ,KAAKI,OAAQY,OAAQhB,KAAKgB,Q,CAGrD,OAAAW,GACN,GAAI3B,KAAKC,KAAM,CACb,OAAOD,KAAKC,I,CAGd,OAAQD,KAAKI,QACX,KAAKN,EAAQe,gBACX,OAAOe,EACT,KAAK9B,EAAQ+B,aACX,OAAOC,EACT,KAAKhC,EAAQiC,UACX,OAAOC,EACT,KAAKlC,EAAQuB,WACX,OAAOY,EACT,KAAKnC,EAAQyB,YACX,OAAOW,EACT,QACE,OAAOF,E,CAIN,MAAAG,GACL,OACEC,EAACC,EAAU,CAAAC,IAAA,2CACTC,WAAW,gBACXC,MAAM,kBACNvC,KAAMD,KAAK2B,UACXc,MAAOzC,KAAKE,QACZQ,QAAS,IAAMV,KAAKU,W,GAjGGgC,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["ResultContext","opts","folded","ItemContext","parentName","InteractiveResultContext","InteractiveItemContext","resultContext","element","itemContext"],"sources":["src/components/search/result-template-components/result-template-decorators.tsx"],"sourcesContent":["import {FoldedResult, Result} from '@coveo/headless';\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 result template components.\n * This allows the Stencil component to fetch the current result from its rendered parent, the `atomic-result` component.\n *\n * Example:\n * @ResultContext() private result!: Result;\n *\n * For more information and examples, view the \"Utilities\" section of the readme.\n */\nexport function ResultContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-result', folded: opts.folded});\n}\n\nexport function InteractiveResultContext() {\n return InteractiveItemContext();\n}\n\nexport type ResultContextEvent<T = Result> = ItemContextEvent<T>;\nexport type InteractiveResultContextEvent = InteractiveItemContextEvent;\n\n/**\n * Retrieves `Result` on a rendered `atomic-result`.\n *\n * This method is useful for building custom result template elements, see [Create a Result List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-result-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-result\".\n * @returns A promise that resolves on initialization of the parent \"atomic-result\" element, or rejects when there is no parent \"atomic-result\" element.\n */\nexport function resultContext<T extends Result | FoldedResult = Result>(\n element: Element\n) {\n return itemContext<T>(element, 'atomic-result');\n}\n"],"mappings":"2DAkBgBA,EAAcC,EAA0B,CAACC,OAAQ,QAC/D,OAAOC,EAAY,CAACC,WAAY,gBAAiBF,OAAQD,EAAKC,QAChE,C,SAEgBG,IACd,OAAOC,GACT,C,SAegBC,EACdC,GAEA,OAAOC,EAAeD,EAAS,gBACjC,Q","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["possiblyWarnOnBadFieldType","field","itemValueRaw","host","logger","isArray","error","nodeName","toLowerCase","ItemTextFallback","defaultValue","item","getProperty","children","raw","isUndefined","remove","h","Fragment","renderWithHighlights","value","highlights","highlightString","openingDelimiter","closingDelimiter","highlightedValue","content","replace","RegExp","ItemTextHighlighted","highlightKeywords","onError","textValue","Host","innerHTML","AtomicResultText","this","shouldHighlight","render","resultValueAsString","getStringValueFromResultOrNull","result","bindings","engine","default","ResultTemplatesHelpers","getResultProperty","getFieldValueCaption","i18n","HighlightUtils","__decorate","InitializeBindings","ResultContext","AtomicText","strings","t","count","connectedCallback","Error"],"sources":["src/components/common/item-text/field-warning.ts","src/components/common/item-text/stencil-item-text-fallback.tsx","src/components/common/item-text/render-highlights.ts","src/components/common/item-text/stencil-item-text-highlighted.tsx","src/components/search/result-template-components/atomic-result-text/atomic-result-text.tsx","src/components/search/atomic-text/atomic-text.tsx"],"sourcesContent":["import {isArray} from '@coveo/bueno';\n\nexport function possiblyWarnOnBadFieldType(\n field: string,\n itemValueRaw: unknown,\n host: HTMLElement,\n logger: Pick<Console, 'error'>\n) {\n if (isArray(itemValueRaw)) {\n logger.error(\n `${host.nodeName.toLowerCase()} cannot be used with multi value field \"${field}\" with values \"${itemValueRaw}\".`,\n host\n );\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {Fragment, FunctionalComponent, VNode, h} from '@stencil/core';\nimport {possiblyWarnOnBadFieldType} from './field-warning';\n\nexport interface ItemTextProps<T> {\n logger: Pick<Console, 'error'>;\n host: HTMLElement;\n defaultValue: string | undefined;\n field: string;\n item: T;\n getProperty: (result: T, property: string) => unknown;\n}\n\nexport const ItemTextFallback = <T,>(\n {field, host, logger, defaultValue, item, getProperty}: ItemTextProps<T>,\n children: VNode[]\n): FunctionalComponent<ItemTextProps<T>> | null => {\n const raw = getProperty(item, field);\n possiblyWarnOnBadFieldType(field, raw, host, logger);\n\n if (isUndefined(defaultValue)) {\n host.remove();\n return null;\n } else {\n return <Fragment>{children}</Fragment>;\n }\n};\n","export type HighlightKeywords = {\n offset: number;\n length: number;\n};\n\nexport type HighlightString = (params: {\n content: string;\n openingDelimiter: string;\n closingDelimiter: string;\n highlights: HighlightKeywords[];\n}) => string;\n\nexport function renderWithHighlights(\n value: string,\n highlights: HighlightKeywords[],\n highlightString: HighlightString\n) {\n const openingDelimiter = '_openingDelimiter_';\n const closingDelimiter = '_closingDelimiter_';\n const highlightedValue = highlightString({\n content: value,\n openingDelimiter,\n closingDelimiter,\n highlights,\n });\n return highlightedValue\n .replace(new RegExp(openingDelimiter, 'g'), '<b>')\n .replace(new RegExp(closingDelimiter, 'g'), '</b>');\n}\n","import {FunctionalComponent, h, Host} from '@stencil/core';\nimport {\n HighlightKeywords,\n HighlightString,\n renderWithHighlights,\n} from './render-highlights';\n\nexport interface ItemTextHighlightedProps {\n textValue: string;\n highlightKeywords: HighlightKeywords[];\n onError: (error: Error) => void;\n highlightString: HighlightString;\n}\n\nexport const ItemTextHighlighted: FunctionalComponent<\n ItemTextHighlightedProps\n> = ({highlightKeywords, highlightString, onError, textValue}) => {\n try {\n const highlightedValue = renderWithHighlights(\n textValue,\n highlightKeywords,\n highlightString\n );\n\n // deepcode ignore ReactSetInnerHtml: This is not React code\n return <Host innerHTML={highlightedValue}></Host>;\n } catch (error) {\n onError(error as Error);\n }\n};\n","import {HighlightUtils, Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, Prop, h, Element, State} from '@stencil/core';\nimport {getFieldValueCaption} from '../../../../utils/field-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {getStringValueFromResultOrNull} from '../../../../utils/result-utils';\nimport {ItemTextFallback} from '../../../common/item-text/stencil-item-text-fallback';\nimport {ItemTextHighlighted} from '../../../common/item-text/stencil-item-text-highlighted';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-text` component renders the value of a string result field.\n */\n@Component({\n tag: 'atomic-result-text',\n shadow: false,\n})\nexport class AtomicResultText implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The result field which the component should use.\n * This will look in the Result object first, and then in the Result.raw object for the fields.\n * It is important to include the necessary field in the `atomic-search-interface` component.\n */\n @Prop({reflect: true}) public field!: string;\n /**\n * When this is set to `true`, the component attempts to highlight text based on the highlighting properties provided by the search API response.\n */\n @Prop({reflect: true}) public shouldHighlight = true;\n\n /**\n * The locale key for the text to display when the configured field has no value.\n */\n @Prop({reflect: true}) public default?: string;\n\n public render() {\n const resultValueAsString = getStringValueFromResultOrNull(\n this.result,\n this.field\n );\n\n if (resultValueAsString === null) {\n return (\n <ItemTextFallback\n field={this.field}\n host={this.host}\n logger={this.bindings.engine.logger}\n defaultValue={this.default}\n item={this.result}\n getProperty={ResultTemplatesHelpers.getResultProperty}\n >\n <atomic-text\n value={getFieldValueCaption(\n this.field,\n this.default!,\n this.bindings.i18n\n )}\n ></atomic-text>\n </ItemTextFallback>\n );\n }\n\n const textValue = `${resultValueAsString}`;\n const highlightKeywords = ResultTemplatesHelpers.getResultProperty(\n this.result,\n `${this.field}Highlights`\n ) as HighlightUtils.HighlightKeyword[];\n\n return this.shouldHighlight && highlightKeywords ? (\n <ItemTextHighlighted\n textValue={textValue}\n highlightKeywords={highlightKeywords}\n highlightString={HighlightUtils.highlightString}\n onError={(error) => (this.error = error)}\n ></ItemTextHighlighted>\n ) : (\n getFieldValueCaption(this.field, textValue, this.bindings.i18n)\n );\n }\n}\n","import {Component, Prop, State} from '@stencil/core';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {Bindings} from '../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-text` component leverages the I18n translation module through the atomic-search-interface.\n */\n@Component({\n tag: 'atomic-text',\n shadow: true,\n})\nexport class AtomicText implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n\n private strings = {\n value: () =>\n this.bindings.i18n.t(this.value, {\n count: this.count,\n }),\n };\n @State() public error!: Error;\n\n /**\n * The string key value.\n */\n @Prop({reflect: true}) public value!: string;\n /**\n * The count value used for plurals.\n */\n @Prop({reflect: true}) public count?: number;\n\n public connectedCallback() {\n if (!this.value) {\n this.error = new Error('The \"value\" attribute must be defined.');\n }\n }\n\n public render() {\n return this.strings.value();\n }\n}\n"],"mappings":"sdAEgBA,EACdC,EACAC,EACAC,EACAC,GAEA,GAAIC,EAAQH,GAAe,CACzBE,EAAOE,MACL,GAAGH,EAAKI,SAASC,wDAAwDP,mBAAuBC,MAChGC,E,CAGN,CCDO,MAAMM,EAAmB,EAC7BR,QAAOE,OAAMC,SAAQM,eAAcC,OAAMC,eAC1CC,KAEA,MAAMC,EAAMF,EAAYD,EAAMV,GAC9BD,EAA2BC,EAAOa,EAAKX,EAAMC,GAE7C,GAAIW,EAAYL,GAAe,CAC7BP,EAAKa,SACL,OAAO,I,KACF,CACL,OAAOC,EAACC,EAAQ,KAAEL,E,YCZNM,EACdC,EACAC,EACAC,GAEA,MAAMC,EAAmB,qBACzB,MAAMC,EAAmB,qBACzB,MAAMC,EAAmBH,EAAgB,CACvCI,QAASN,EACTG,mBACAC,mBACAH,eAEF,OAAOI,EACJE,QAAQ,IAAIC,OAAOL,EAAkB,KAAM,OAC3CI,QAAQ,IAAIC,OAAOJ,EAAkB,KAAM,OAChD,CCdO,MAAMK,EAET,EAAEC,oBAAmBR,kBAAiBS,UAASC,gBACjD,IACE,MAAMP,EAAmBN,EACvBa,EACAF,EACAR,GAIF,OAAOL,EAACgB,EAAI,CAACC,UAAWT,G,CACxB,MAAOnB,GACPyB,EAAQzB,E,oXCPC6B,EAAgB,M,yBAiBGC,KAAAC,gBAAkB,K,+DAAA,K,uBAOzC,MAAAC,GACL,MAAMC,EAAsBC,EAC1BJ,KAAKK,OACLL,KAAKnC,OAGP,GAAIsC,IAAwB,KAAM,CAChC,OACEtB,EAACR,EAAgB,CACfR,MAAOmC,KAAKnC,MACZE,KAAMiC,KAAKjC,KACXC,OAAQgC,KAAKM,SAASC,OAAOvC,OAC7BM,aAAc0B,KAAKQ,QACnBjC,KAAMyB,KAAKK,OACX7B,YAAaiC,EAAuBC,mBAEpC7B,EAAA,eACEG,MAAO2B,EACLX,KAAKnC,MACLmC,KAAKQ,QACLR,KAAKM,SAASM,Q,CAOxB,MAAMhB,EAAY,GAAGO,IACrB,MAAMT,EAAoBe,EAAuBC,kBAC/CV,KAAKK,OACL,GAAGL,KAAKnC,mBAGV,OAAOmC,KAAKC,iBAAmBP,EAC7Bb,EAACY,EAAmB,CAClBG,UAAWA,EACXF,kBAAmBA,EACnBR,gBAAiB2B,EAAe3B,gBAChCS,QAAUzB,GAAW8B,KAAK9B,MAAQA,IAGpCyC,EAAqBX,KAAKnC,MAAO+B,EAAWI,KAAKM,SAASM,K,6BAhEjCE,GAA5BC,K,+BACwBD,GAAxBE,K,8YCRUC,EAAU,M,yBAGbjB,KAAAkB,QAAU,CAChBlC,MAAO,IACLgB,KAAKM,SAASM,KAAKO,EAAEnB,KAAKhB,MAAO,CAC/BoC,MAAOpB,KAAKoB,S,+DAcX,iBAAAC,GACL,IAAKrB,KAAKhB,MAAO,CACfgB,KAAK9B,MAAQ,IAAIoD,MAAM,yC,EAIpB,MAAApB,GACL,OAAOF,KAAKkB,QAAQlC,O,GA1BO8B,EAAA,CAA5BC,K","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["atomicResultImageCss","AtomicResultImageStyle0","AtomicResultImage","this","useFallback","url","value","ResultTemplatesHelpers","getResultProperty","result","field","Array","isArray","altText","imageAltField","bindings","i18n","t","itemName","title","logWarning","message","engine","logger","warn","host","handleImageError","fallback","handleMissingFallback","remove","validateUrl","render","h","alt","src","filterProtocol","onError","loading","__decorate","InitializeBindings","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-image/atomic-result-image.pcss?tag=atomic-result-image","src/components/search/result-template-components/atomic-result-image/atomic-result-image.tsx"],"sourcesContent":["atomic-result-image {\n display: grid;\n place-items: center;\n grid-template-rows: 100%;\n width: 100%;\n height: 100%;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n}\n","import {Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, h, Prop, Element, State} from '@stencil/core';\nimport {\n InitializeBindings,\n InitializableComponent,\n} from '../../../../utils/initialization-utils';\nimport {filterProtocol} from '../../../../utils/xss-utils';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-image` component renders an image from a result field.\n */\n@Component({\n tag: 'atomic-result-image',\n styleUrl: 'atomic-result-image.pcss',\n shadow: false,\n})\nexport class AtomicResultImage implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n @Element() private host!: HTMLElement;\n @State() private useFallback = false;\n\n /**\n * The result field which the component should use. This will look for the field in the Result object first, then in the Result.raw object. It is important to include the necessary field in the `atomic-search-interface` component.\n */\n @Prop({reflect: true}) field!: string;\n\n /**\n * The result field that contains the alt text for the image. This will look for the field in the Result object first, then in the Result.raw object\n *\n * If the field is not specified, or does not contain a valid value, the alt text will be set to \"Image for {productName}\".\n */\n @Prop({reflect: true}) imageAltField?: string;\n\n /**\n * An optional fallback image URL that will be used in case the specified image field is not available or encounters an error.\n */\n @Prop({reflect: true}) fallback?: string;\n\n public error!: Error;\n\n public get url() {\n const value = ResultTemplatesHelpers.getResultProperty(\n this.result,\n this.field\n );\n return Array.isArray(value) ? value[0] : value;\n }\n\n private get altText(): string {\n if (this.imageAltField) {\n const value = ResultTemplatesHelpers.getResultProperty(\n this.result,\n this.imageAltField\n );\n\n if (Array.isArray(value) && typeof value[0] === 'string') {\n return value[0];\n }\n\n if (typeof value === 'string') {\n return value;\n }\n }\n\n return this.bindings.i18n.t('image-alt-fallback', {\n itemName: this.result.title,\n });\n }\n\n private logWarning(message: string) {\n this.bindings.engine.logger.warn(message, this.host);\n }\n\n private handleImageError() {\n const message = `The image url \"${this.url}\" is not valid or could not be loaded. You might want to add a \"fallback\" property.`;\n\n this.fallback ? (this.useFallback = true) : this.logWarning(message);\n }\n\n private handleMissingFallback(message: string) {\n if (!this.fallback) {\n this.logWarning(message);\n this.host.remove();\n return null;\n }\n return this.fallback;\n }\n\n private validateUrl(url: string) {\n if (!url) {\n const message = `\"${this.field}\" is missing. Please review your indexation. You might want to add a \"fallback\" property.`;\n return this.handleMissingFallback(message);\n }\n\n if (typeof url !== 'string') {\n const message = `Expected \"${this.field}\" to be a text field. Please review your indexation. You might want to add a \"fallback\" property.`;\n return this.handleMissingFallback(message);\n }\n\n return url;\n }\n\n public render() {\n let url = this.useFallback ? this.fallback : this.url;\n\n if (!this.useFallback) {\n url = this.validateUrl(url);\n if (!url) {\n return;\n }\n }\n\n return (\n <img\n alt={this.altText}\n src={filterProtocol(url)}\n onError={() => this.handleImageError()}\n loading=\"lazy\"\n />\n );\n }\n}\n"],"mappings":"+UAAA,MAAMA,EAAuB,wKAC7B,MAAAC,EAAeD,E,iXCiBFE,EAAiB,M,yBAIXC,KAAAC,YAAc,M,iBAAA,M,0EAqB/B,OAAWC,GACT,MAAMC,EAAQC,EAAuBC,kBACnCL,KAAKM,OACLN,KAAKO,OAEP,OAAOC,MAAMC,QAAQN,GAASA,EAAM,GAAKA,C,CAG3C,WAAYO,GACV,GAAIV,KAAKW,cAAe,CACtB,MAAMR,EAAQC,EAAuBC,kBACnCL,KAAKM,OACLN,KAAKW,eAGP,GAAIH,MAAMC,QAAQN,WAAiBA,EAAM,KAAO,SAAU,CACxD,OAAOA,EAAM,E,CAGf,UAAWA,IAAU,SAAU,CAC7B,OAAOA,C,EAIX,OAAOH,KAAKY,SAASC,KAAKC,EAAE,qBAAsB,CAChDC,SAAUf,KAAKM,OAAOU,O,CAIlB,UAAAC,CAAWC,GACjBlB,KAAKY,SAASO,OAAOC,OAAOC,KAAKH,EAASlB,KAAKsB,K,CAGzC,gBAAAC,GACN,MAAML,EAAU,kBAAkBlB,KAAKE,yFAEvCF,KAAKwB,SAAYxB,KAAKC,YAAc,KAAQD,KAAKiB,WAAWC,E,CAGtD,qBAAAO,CAAsBP,GAC5B,IAAKlB,KAAKwB,SAAU,CAClBxB,KAAKiB,WAAWC,GAChBlB,KAAKsB,KAAKI,SACV,OAAO,I,CAET,OAAO1B,KAAKwB,Q,CAGN,WAAAG,CAAYzB,GAClB,IAAKA,EAAK,CACR,MAAMgB,EAAU,IAAIlB,KAAKO,iGACzB,OAAOP,KAAKyB,sBAAsBP,E,CAGpC,UAAWhB,IAAQ,SAAU,CAC3B,MAAMgB,EAAU,aAAalB,KAAKO,yGAClC,OAAOP,KAAKyB,sBAAsBP,E,CAGpC,OAAOhB,C,CAGF,MAAA0B,GACL,IAAI1B,EAAMF,KAAKC,YAAcD,KAAKwB,SAAWxB,KAAKE,IAElD,IAAKF,KAAKC,YAAa,CACrBC,EAAMF,KAAK2B,YAAYzB,GACvB,IAAKA,EAAK,CACR,M,EAIJ,OACE2B,EAAA,OACEC,IAAK9B,KAAKU,QACVqB,IAAKC,EAAe9B,GACpB+B,QAAS,IAAMjC,KAAKuB,mBACpBW,QAAQ,Q,6BArGeC,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["atomicIpxResultLinkCss","AtomicIpxResultLinkStyle0","AtomicIPXResultLink","initialize","this","host","dispatchEvent","buildCustomEvent","stopPropagation","actionsHistoryActions","loadIPXActionsHistoryActions","bindings","engine","connectedCallback","slotName","hasDefaultSlot","getDefaultSlotFromHost","linkAttributes","getAttributesFromLinkSlot","onSelect","resultPermanentId","result","raw","permanentid","action","addPageViewEntryInActionsHistory","dispatch","interactiveResult","select","render","href","isUndefined","hrefTemplate","clickUri","buildStringTemplateFromResult","h","LinkWithItemAnalytics","key","onBeginDelayedSelect","beginDelayedSelect","onCancelPendingSelect","cancelPendingSelect","attributes","field","default","__decorate","InitializeBindings","ResultContext","InteractiveResultContext"],"sources":["src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.pcss?tag=atomic-ipx-result-link","src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@reference '../../../utils/tailwind-utilities/link-style.css';\n\natomic-ipx-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {\n IPXActionsHistoryActionCreators,\n InteractiveResult,\n loadIPXActionsHistoryActions,\n} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlot} from '../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../common/item-link/stencil-item-link';\nimport {RecsBindings} from '../../recommendations/atomic-recs-interface/atomic-recs-interface';\nimport {\n ResultContext,\n InteractiveResultContext,\n} from '../../search/result-template-components/result-template-decorators';\n\n/**\n * The `atomic-ipx-result-link` component automatically transforms a search result title into a clickable link that points to the original item. It is an experimental internal component not intended for general use.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n * @internal\n */\n@Component({\n tag: 'atomic-ipx-result-link',\n styleUrl: 'atomic-ipx-result-link.pcss',\n shadow: false,\n})\nexport class AtomicIPXResultLink\n implements InitializableComponent<RecsBindings>\n{\n @InitializeBindings() public bindings!: RecsBindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-ipx-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-ipx-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n private actionsHistoryActions?: IPXActionsHistoryActionCreators;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n this.actionsHistoryActions = loadIPXActionsHistoryActions(\n this.bindings.engine\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public async onSelect() {\n const resultPermanentId = this.result.raw.permanentid;\n if (resultPermanentId && this.actionsHistoryActions) {\n const action =\n this.actionsHistoryActions.addPageViewEntryInActionsHistory(\n resultPermanentId\n );\n this.bindings.engine.dispatch(action);\n }\n this.interactiveResult.select();\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.onSelect()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"mappings":"uhBAAA,MAAMA,EAAyB,yzkEAC/B,MAAAC,EAAeD,E,iXCiCFE,EAAmB,M,qDA6BvB,UAAAC,GACLC,KAAKC,KAAKC,cACRC,EACE,iCACCC,IACCJ,KAAKI,gBAAkBA,CAAe,KAI5CJ,KAAKK,sBAAwBC,EAC3BN,KAAKO,SAASC,O,CAIX,iBAAAC,GACL,MAAMC,EAAW,aACjBV,KAAKW,iBAAmBC,EAAuBZ,KAAKC,MACpDD,KAAKa,eAAiBC,EAA0Bd,KAAKC,KAAMS,E,CAGtD,cAAMK,GACX,MAAMC,EAAoBhB,KAAKiB,OAAOC,IAAIC,YAC1C,GAAIH,GAAqBhB,KAAKK,sBAAuB,CACnD,MAAMe,EACJpB,KAAKK,sBAAsBgB,iCACzBL,GAEJhB,KAAKO,SAASC,OAAOc,SAASF,E,CAEhCpB,KAAKuB,kBAAkBC,Q,CAGlB,MAAAC,GACL,MAAMC,EAAOC,EAAY3B,KAAK4B,cAC1B5B,KAAKiB,OAAOY,SACZC,EACE9B,KAAK4B,aACL5B,KAAKiB,OACLjB,KAAKO,UAGX,OACEwB,EAACC,EAAqB,CAAAC,IAAA,2CACpBP,KAAMA,EACNX,SAAU,IAAMf,KAAKe,WACrBmB,qBAAsB,IAAMlC,KAAKuB,kBAAkBY,qBACnDC,sBAAuB,IACrBpC,KAAKuB,kBAAkBc,sBAEzBC,WAAYtC,KAAKa,eACjBT,gBAAiBJ,KAAKI,iBAErBJ,KAAKW,eACJoB,EAAA,aAEAA,EAAA,sBACEQ,MAAM,QACNC,QAAQ,a,6BAnFWC,EAAA,CAA5BC,K,+BAGwBD,EAAA,CAAxBE,K,6BACmCF,EAAA,CAAnCG,K","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["atomicResultBadgeCss","AtomicResultBadgeStyle0","AtomicResultBadge","renderIcon","h","part","icon","this","class","getTextContent","field","undefined","label","value","renderText","renderBadge","componentWillRender","hasValue","ResultTemplatesHelpers","getResultProperty","result","host","remove","render","__decorate","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.pcss?tag=atomic-result-badge&encapsulation=shadow","src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n\n:host {\n display: inline-flex;\n place-items: center;\n height: var(--row-height, auto);\n word-break: break-word;\n}\n","import {Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, Element, Prop, h} from '@stencil/core';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-badge` element renders a badge to highlight special features of a result.\n *\n * A badge can either display:\n * * Text:\n * ```html\n * <atomic-result-badge label=\"trending\"></atomic-result-badge>\n * ```\n * * The contents of a single-value field:\n * ```html\n * <atomic-result-badge field=\"objecttype\"></atomic-result-badge>\n * ```\n * * An icon:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/star.svg\"></atomic-result-badge>\n * ```\n * * Slotted elements:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/stopwatch.svg\">\n * Deal ends in <my-dynamic-countdown></my-dynamic-countdown>\n * </atomic-result-badge>\n * ```\n *\n * The contents of a multi-value field can be displayed as in the following example:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/language.svg\">\n * <atomic-result-multi-value-text field=\"language\"></atomic-result-multi-value-text>\n * </atomic-result-badge>\n * ```\n *\n * @part result-badge-element - The decorative outer-most element with the background color and text color.\n * @part result-badge-icon - The icon displayed at the left-end of the badge, if present.\n * @part result-badge-label - The wrapper around the contents at the right-end of the badge. This may be text, a field or slotted elements depending on which was configured.\n * @slot default - The element(s) to display inside the badge, instead of a field or label.\n */\n@Component({\n tag: 'atomic-result-badge',\n styleUrl: 'atomic-result-badge.pcss',\n shadow: true,\n})\nexport class AtomicResultBadge {\n @ResultContext() private result!: Result;\n @Element() host!: HTMLElement;\n /**\n * The field to display in the badge.\n *\n * Not compatible with `label`, slotted elements nor multi-value fields.\n */\n @Prop({reflect: true}) public field?: string;\n\n /**\n * The text to display in the badge.\n *\n * Not compatible with `field` nor slotted elements.\n */\n @Prop({reflect: true}) public label?: string;\n\n /**\n * Specifies an icon to display at the left-end of the badge.\n * This can be used in conjunction with `field`, `label` or slotted elements.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly\n */\n @Prop({reflect: true}) public icon?: string;\n\n private renderIcon() {\n return (\n <atomic-icon\n part=\"result-badge-icon\"\n icon={this.icon!}\n class=\"h-3 w-3 fill-current\"\n ></atomic-icon>\n );\n }\n\n private getTextContent() {\n if (this.field !== undefined) {\n return <atomic-result-text field={this.field}></atomic-result-text>;\n }\n if (this.label !== undefined) {\n return <atomic-text value={this.label}></atomic-text>;\n }\n return <slot></slot>;\n }\n\n private renderText() {\n return <span part=\"result-badge-label\">{this.getTextContent()}</span>;\n }\n\n private renderBadge() {\n return (\n <div\n part=\"result-badge-element\"\n class=\"bg-neutral-light text-neutral-dark inline-flex h-full place-items-center space-x-1.5 rounded-full px-3\"\n >\n {this.icon && this.renderIcon()}\n {this.renderText()}\n </div>\n );\n }\n\n componentWillRender() {\n if (this.field) {\n const hasValue =\n ResultTemplatesHelpers.getResultProperty(this.result, this.field) !==\n null;\n if (!hasValue) {\n this.host.remove();\n }\n }\n }\n\n render() {\n return this.renderBadge();\n }\n}\n"],"mappings":"uNAAA,MAAMA,EAAuB,2kjEAC7B,MAAAC,EAAeD,E,iXC2CFE,EAAiB,M,uFA2BpB,UAAAC,GACN,OACEC,EAAA,eACEC,KAAK,oBACLC,KAAMC,KAAKD,KACXE,MAAM,wB,CAKJ,cAAAC,GACN,GAAIF,KAAKG,QAAUC,UAAW,CAC5B,OAAOP,EAAA,sBAAoBM,MAAOH,KAAKG,O,CAEzC,GAAIH,KAAKK,QAAUD,UAAW,CAC5B,OAAOP,EAAA,eAAaS,MAAON,KAAKK,O,CAElC,OAAOR,EAAA,Y,CAGD,UAAAU,GACN,OAAOV,EAAA,QAAMC,KAAK,sBAAsBE,KAAKE,iB,CAGvC,WAAAM,GACN,OACEX,EAAA,OACEC,KAAK,uBACLG,MAAM,0GAELD,KAAKD,MAAQC,KAAKJ,aAClBI,KAAKO,a,CAKZ,mBAAAE,GACE,GAAIT,KAAKG,MAAO,CACd,MAAMO,EACJC,EAAuBC,kBAAkBZ,KAAKa,OAAQb,KAAKG,SAC3D,KACF,IAAKO,EAAU,CACbV,KAAKc,KAAKC,Q,GAKhB,MAAAC,GACE,OAAOhB,KAAKQ,a,6BA1EWS,EAAA,CAAxBC,K","ignoreList":[]}
|