@coveo/atomic 3.34.0-pre.b099da8035 → 3.34.0-pre.b429ebe8aa
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 +0 -4
- package/dist/atomic/components/_index.js +0 -2
- 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-history-toggle.js +2 -2
- package/dist/atomic/components/atomic-insight-history-toggle.js.map +1 -1
- package/dist/atomic/components/atomic-insight-result-children-template.js +1 -1
- package/dist/atomic/components/atomic-insight-result-children-template.js.map +1 -1
- package/dist/atomic/components/atomic-insight-result-template.js +1 -1
- package/dist/atomic/components/atomic-insight-result-template.js.map +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-toggle.js +2 -2
- package/dist/atomic/components/atomic-insight-user-actions-toggle.js.map +1 -1
- package/dist/atomic/components/atomic-numeric-facet.js +1 -1
- package/dist/atomic/components/atomic-quickview-modal2.js +23 -23
- package/dist/atomic/components/atomic-quickview-modal2.js.map +1 -1
- package/dist/atomic/components/atomic-quickview.js +1 -1
- package/dist/atomic/components/atomic-recs-result-template.js +1 -1
- package/dist/atomic/components/atomic-recs-result-template.js.map +1 -1
- package/dist/atomic/components/atomic-result-children-template.js +1 -1
- package/dist/atomic/components/atomic-result-children-template.js.map +1 -1
- package/dist/atomic/components/atomic-result-children.js +1 -1
- package/dist/atomic/components/atomic-result-fields-list.js +1 -1
- package/dist/atomic/components/atomic-result-link.js +1 -1
- package/dist/atomic/components/atomic-result-list.js +1 -1
- package/dist/atomic/components/atomic-result-list.js.map +1 -1
- package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
- package/dist/atomic/components/atomic-result-template.js +1 -1
- package/dist/atomic/components/atomic-result-template.js.map +1 -1
- package/dist/atomic/components/atomic-search-box-query-suggestions2.js +1 -1
- package/dist/atomic/components/atomic-search-box.js +5 -11
- package/dist/atomic/components/atomic-search-box.js.map +1 -1
- package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
- 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/clock.js +2 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +17 -32
- package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +4 -3
- package/dist/atomic/components/components/commerce/atomic-product-template/atomic-product-template.js +3 -2
- package/dist/atomic/components/components/common/item-list/table-layout.js +1 -1
- package/dist/atomic/components/components/common/product-template/product-template-controller.js +16 -81
- package/dist/atomic/components/components/common/template-controller/base-template-controller.js +89 -0
- package/dist/atomic/components/components/common/{product-template/product-template-common.js → template-controller/template-utils.js} +11 -12
- package/dist/atomic/components/components/common/validate-props-controller/validate-props-controller.js +50 -0
- package/dist/atomic/components/components/search/atomic-relevance-inspector/atomic-relevance-inspector.js +100 -0
- package/dist/atomic/components/components/search/atomic-search-box-recent-queries/atomic-search-box-recent-queries.js +137 -0
- package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +11 -24
- package/dist/atomic/components/components/search/index.js +2 -0
- package/dist/atomic/components/components/search/lazy-index.js +2 -0
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/index.js.map +1 -1
- package/dist/atomic/components/{result-template-common.js → stencil-result-template-common.js} +1 -1
- package/dist/atomic/components/stencil-result-template-common.js.map +1 -0
- package/dist/atomic/components/table-element-utils.js.map +1 -1
- package/dist/atomic/components/utils/compare-utils.js +49 -0
- package/dist/atomic/{p-475124d2.entry.js → p-01511388.entry.js} +2 -2
- package/dist/atomic/{p-60800b2f.entry.js → p-0ed76e65.entry.js} +2 -2
- package/dist/atomic/{p-7fd5b6ac.entry.js → p-2213060b.entry.js} +2 -2
- package/dist/atomic/p-2213060b.entry.js.map +1 -0
- package/dist/atomic/{p-e7a25b00.entry.js → p-2895c42c.entry.js} +2 -2
- package/dist/atomic/p-2895c42c.entry.js.map +1 -0
- package/dist/atomic/{p-16f6c1f3.entry.js → p-2fb49fe8.entry.js} +2 -2
- package/dist/atomic/{p-13391e75.entry.js → p-3549a469.entry.js} +2 -2
- package/dist/atomic/{p-88af4470.entry.js → p-40c1dfcb.entry.js} +2 -2
- package/dist/atomic/{p-2250f505.js → p-4da8f827.js} +2 -2
- package/dist/atomic/p-4da8f827.js.map +1 -0
- package/dist/atomic/{p-1e59ce29.entry.js → p-4f34763d.entry.js} +2 -2
- package/dist/atomic/{p-7c3c5f07.entry.js → p-4f4c9a03.entry.js} +2 -2
- package/dist/atomic/p-4f4c9a03.entry.js.map +1 -0
- package/dist/atomic/{p-20764605.entry.js → p-52d5461a.entry.js} +2 -2
- package/dist/atomic/{p-406a288c.entry.js → p-6078667f.entry.js} +2 -2
- package/dist/atomic/{p-992bc2dc.js → p-60be00ad.js} +2 -2
- package/dist/atomic/{p-62e85c20.entry.js → p-6694e114.entry.js} +2 -2
- package/dist/atomic/p-6694e114.entry.js.map +1 -0
- package/dist/atomic/p-6f1bffa2.entry.js +2 -0
- package/dist/atomic/p-6f1bffa2.entry.js.map +1 -0
- package/dist/atomic/{p-3cbab25b.entry.js → p-7e971d15.entry.js} +2 -2
- package/dist/atomic/{p-4601eb93.entry.js → p-83d3857f.entry.js} +2 -2
- package/dist/atomic/{p-a1e5f767.entry.js → p-86f950a5.entry.js} +2 -2
- package/dist/atomic/p-86f950a5.entry.js.map +1 -0
- package/dist/atomic/{p-dbcef3a9.entry.js → p-87f69e53.entry.js} +2 -2
- package/dist/atomic/{p-6289adc7.entry.js → p-9239be63.entry.js} +2 -2
- package/dist/atomic/{p-aaea2ca1.entry.js → p-9a6ec803.entry.js} +2 -2
- package/dist/atomic/{p-aac849b0.entry.js → p-a3fac2ec.entry.js} +2 -2
- package/dist/atomic/{p-373448df.entry.js → p-a46d36dd.entry.js} +2 -2
- package/dist/atomic/p-a46d36dd.entry.js.map +1 -0
- package/dist/atomic/{p-e398835b.entry.js → p-b2b9e83f.entry.js} +2 -2
- package/dist/atomic/{p-8fdef8a3.entry.js → p-b313058c.entry.js} +2 -2
- package/dist/atomic/{p-0bdd730f.entry.js → p-b6ae0244.entry.js} +2 -2
- package/dist/atomic/{p-3a7a1a00.entry.js → p-bbfe727a.entry.js} +2 -2
- package/dist/atomic/{p-acd1a1d3.js → p-be0518ae.js} +1 -1
- package/dist/atomic/p-be0518ae.js.map +1 -0
- package/dist/atomic/{p-97ce3384.entry.js → p-be2a43f4.entry.js} +2 -2
- package/dist/atomic/{p-a5714bc4.entry.js → p-d211a422.entry.js} +2 -2
- package/dist/atomic/{p-c280cd05.js → p-e1cc5150.js} +1 -1
- package/dist/atomic/{p-9260dd7d.entry.js → p-ebd00891.entry.js} +2 -2
- package/dist/atomic/p-ebd00891.entry.js.map +1 -0
- package/dist/atomic/{p-5678a2ce.entry.js → p-f676b5ba.entry.js} +2 -2
- package/dist/atomic/p-f676b5ba.entry.js.map +1 -0
- package/dist/cjs/_loader.cjs.js +1 -1
- package/dist/cjs/{analytics-config-f75fd435.js → analytics-config-7fafe2ee.js} +2 -2
- package/dist/cjs/{analytics-config-f75fd435.js.map → analytics-config-7fafe2ee.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 +3 -3
- 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-history-toggle.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js +5 -5
- package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-result-template.cjs.entry.js +5 -5
- package/dist/cjs/atomic-insight-result-template.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-user-actions-toggle.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 +23 -23
- package/dist/cjs/atomic-quickview-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-result-template.cjs.entry.js +5 -5
- package/dist/cjs/atomic-recs-result-template.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-children-template.cjs.entry.js +4 -4
- package/dist/cjs/atomic-result-children-template.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-children.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-list.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-list.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-template.cjs.entry.js +4 -4
- package/dist/cjs/atomic-result-template.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js +76 -0
- package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js.map +1 -0
- package/dist/cjs/atomic-search-box.cjs.entry.js +3 -3
- package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-sort-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
- package/dist/cjs/atomic.cjs.js +1 -1
- package/dist/cjs/clock-7aeb19d0.js +7 -0
- package/dist/cjs/clock-7aeb19d0.js.map +1 -0
- package/dist/cjs/index-757bc886.js +2 -6
- package/dist/cjs/{result-template-common-84bd4057.js → stencil-result-template-common-bb38948f.js} +2 -2
- package/dist/cjs/stencil-result-template-common-bb38948f.js.map +1 -0
- package/dist/cjs/{table-element-utils-4865b735.js → table-element-utils-2cc6dc82.js} +1 -1
- package/dist/cjs/table-element-utils-2cc6dc82.js.map +1 -0
- package/dist/cjs/version.cjs.js +1 -1
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-870dc878.js → analytics-config-a8c239d1.js} +2 -2
- package/dist/esm/{analytics-config-870dc878.js.map → analytics-config-a8c239d1.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 +2 -2
- 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-history-toggle.entry.js +2 -2
- package/dist/esm/atomic-insight-history-toggle.entry.js.map +1 -1
- package/dist/esm/atomic-insight-interface.entry.js +1 -1
- package/dist/esm/atomic-insight-result-children-template.entry.js +2 -2
- package/dist/esm/atomic-insight-result-children-template.entry.js.map +1 -1
- package/dist/esm/atomic-insight-result-template.entry.js +2 -2
- package/dist/esm/atomic-insight-result-template.entry.js.map +1 -1
- package/dist/esm/atomic-insight-user-actions-toggle.entry.js +2 -2
- package/dist/esm/atomic-insight-user-actions-toggle.entry.js.map +1 -1
- package/dist/esm/atomic-numeric-facet.entry.js +1 -1
- package/dist/esm/atomic-quickview-modal.entry.js +23 -23
- package/dist/esm/atomic-quickview-modal.entry.js.map +1 -1
- package/dist/esm/atomic-quickview.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +1 -1
- package/dist/esm/atomic-recs-result-template.entry.js +2 -2
- package/dist/esm/atomic-recs-result-template.entry.js.map +1 -1
- package/dist/esm/atomic-result-children-template.entry.js +2 -2
- package/dist/esm/atomic-result-children-template.entry.js.map +1 -1
- package/dist/esm/atomic-result-children.entry.js +1 -1
- package/dist/esm/atomic-result-fields-list.entry.js +1 -1
- package/dist/esm/atomic-result-link.entry.js +1 -1
- package/dist/esm/atomic-result-list.entry.js +2 -2
- package/dist/esm/atomic-result-list.entry.js.map +1 -1
- package/dist/esm/atomic-result-placeholder_8.entry.js +1 -1
- package/dist/esm/atomic-result-template.entry.js +2 -2
- package/dist/esm/atomic-result-template.entry.js.map +1 -1
- package/dist/esm/atomic-search-box-query-suggestions.entry.js +72 -0
- package/dist/esm/atomic-search-box-query-suggestions.entry.js.map +1 -0
- package/dist/esm/atomic-search-box.entry.js +3 -3
- package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
- package/dist/esm/atomic-sort-dropdown.entry.js +2 -2
- package/dist/esm/atomic-sort-expression.entry.js +1 -1
- package/dist/esm/atomic-tab-manager.entry.js +1 -1
- package/dist/esm/atomic.js +1 -1
- package/dist/esm/clock-b1f5d7f7.js +5 -0
- package/dist/esm/clock-b1f5d7f7.js.map +1 -0
- package/dist/esm/index-3f35faca.js +2 -6
- package/dist/esm/{result-template-common-995b94f8.js → stencil-result-template-common-19af5cfb.js} +2 -2
- package/dist/esm/stencil-result-template-common-19af5cfb.js.map +1 -0
- package/dist/esm/{table-element-utils-49d22ec6.js → table-element-utils-1dbc5ef6.js} +1 -1
- package/dist/esm/table-element-utils-1dbc5ef6.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.d.ts +2 -3
- package/dist/types/components/common/facets/facet-search/facet-search-input-guard.d.ts +1 -1
- package/dist/types/components/common/no-items/guard.d.ts +1 -1
- package/dist/types/components/common/product-template/product-template-controller.d.ts +9 -19
- package/dist/types/components/common/product-template/stencil-product-template-common.d.ts +1 -1
- package/dist/types/components/common/refine-modal/guard.d.ts +1 -1
- package/dist/types/components/common/result-templates/result-template-controller.d.ts +16 -0
- package/dist/types/components/common/sort/sort-guard.d.ts +1 -1
- package/dist/types/components/common/template-controller/base-template-controller.d.ts +36 -0
- package/dist/types/components/common/template-controller/template-utils.d.ts +11 -0
- package/dist/types/components/common/validate-props-controller/validate-props-controller.d.ts +32 -0
- package/dist/types/components/insight/result-templates/atomic-insight-result-children-template/atomic-insight-result-children-template.d.ts +1 -1
- package/dist/types/components/search/atomic-relevance-inspector/atomic-relevance-inspector.d.ts +18 -8
- package/dist/types/components/search/atomic-search-box-recent-queries/atomic-search-box-recent-queries.d.ts +45 -0
- package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +5 -3
- package/dist/types/components/search/index.d.ts +2 -0
- package/dist/types/components/search/result-templates/atomic-result-children-template/atomic-result-children-template.d.ts +1 -1
- package/dist/types/components.d.ts +0 -102
- package/dist/types/directives/hierarchical-path.d.ts +1 -1
- package/dist/types/utils/compare-utils.d.ts +9 -0
- package/docs/atomic-docs.json +1 -185
- package/package.json +1 -1
- package/dist/atomic/components/atomic-relevance-inspector.d.ts +0 -11
- package/dist/atomic/components/atomic-relevance-inspector.js +0 -53
- package/dist/atomic/components/atomic-relevance-inspector.js.map +0 -1
- package/dist/atomic/components/atomic-search-box-recent-queries.d.ts +0 -11
- package/dist/atomic/components/atomic-search-box-recent-queries.js +0 -8
- package/dist/atomic/components/atomic-search-box-recent-queries.js.map +0 -1
- package/dist/atomic/components/atomic-search-box-recent-queries2.js +0 -183
- package/dist/atomic/components/atomic-search-box-recent-queries2.js.map +0 -1
- package/dist/atomic/components/result-template-common.js.map +0 -1
- package/dist/atomic/p-2250f505.js.map +0 -1
- package/dist/atomic/p-373448df.entry.js.map +0 -1
- package/dist/atomic/p-5678a2ce.entry.js.map +0 -1
- package/dist/atomic/p-62e85c20.entry.js.map +0 -1
- package/dist/atomic/p-7c3c5f07.entry.js.map +0 -1
- package/dist/atomic/p-7fd5b6ac.entry.js.map +0 -1
- package/dist/atomic/p-9260dd7d.entry.js.map +0 -1
- package/dist/atomic/p-a1e5f767.entry.js.map +0 -1
- package/dist/atomic/p-acd1a1d3.js.map +0 -1
- package/dist/atomic/p-de687bed.entry.js +0 -2
- package/dist/atomic/p-de687bed.entry.js.map +0 -1
- package/dist/atomic/p-df4397ab.entry.js +0 -2
- package/dist/atomic/p-df4397ab.entry.js.map +0 -1
- package/dist/atomic/p-e7a25b00.entry.js.map +0 -1
- package/dist/cjs/atomic-relevance-inspector.cjs.entry.js +0 -38
- package/dist/cjs/atomic-relevance-inspector.cjs.entry.js.map +0 -1
- package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +0 -234
- package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js.map +0 -1
- package/dist/cjs/clock-f03ff827.js +0 -7
- package/dist/cjs/clock-f03ff827.js.map +0 -1
- package/dist/cjs/result-template-common-84bd4057.js.map +0 -1
- package/dist/cjs/table-element-utils-4865b735.js.map +0 -1
- package/dist/esm/atomic-relevance-inspector.entry.js +0 -34
- package/dist/esm/atomic-relevance-inspector.entry.js.map +0 -1
- package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +0 -229
- package/dist/esm/atomic-search-box-query-suggestions_2.entry.js.map +0 -1
- package/dist/esm/clock-add3e9a5.js +0 -5
- package/dist/esm/clock-add3e9a5.js.map +0 -1
- package/dist/esm/result-template-common-995b94f8.js.map +0 -1
- package/dist/esm/table-element-utils-49d22ec6.js.map +0 -1
- package/dist/types/components/common/product-template/product-template-common.d.ts +0 -6
- package/dist/types/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.d.ts +0 -37
- /package/dist/atomic/components/components/{search/atomic-table-result → common}/table-element-utils.js +0 -0
- /package/dist/atomic/{p-475124d2.entry.js.map → p-01511388.entry.js.map} +0 -0
- /package/dist/atomic/{p-60800b2f.entry.js.map → p-0ed76e65.entry.js.map} +0 -0
- /package/dist/atomic/{p-16f6c1f3.entry.js.map → p-2fb49fe8.entry.js.map} +0 -0
- /package/dist/atomic/{p-13391e75.entry.js.map → p-3549a469.entry.js.map} +0 -0
- /package/dist/atomic/{p-88af4470.entry.js.map → p-40c1dfcb.entry.js.map} +0 -0
- /package/dist/atomic/{p-1e59ce29.entry.js.map → p-4f34763d.entry.js.map} +0 -0
- /package/dist/atomic/{p-20764605.entry.js.map → p-52d5461a.entry.js.map} +0 -0
- /package/dist/atomic/{p-406a288c.entry.js.map → p-6078667f.entry.js.map} +0 -0
- /package/dist/atomic/{p-992bc2dc.js.map → p-60be00ad.js.map} +0 -0
- /package/dist/atomic/{p-3cbab25b.entry.js.map → p-7e971d15.entry.js.map} +0 -0
- /package/dist/atomic/{p-4601eb93.entry.js.map → p-83d3857f.entry.js.map} +0 -0
- /package/dist/atomic/{p-dbcef3a9.entry.js.map → p-87f69e53.entry.js.map} +0 -0
- /package/dist/atomic/{p-6289adc7.entry.js.map → p-9239be63.entry.js.map} +0 -0
- /package/dist/atomic/{p-aaea2ca1.entry.js.map → p-9a6ec803.entry.js.map} +0 -0
- /package/dist/atomic/{p-aac849b0.entry.js.map → p-a3fac2ec.entry.js.map} +0 -0
- /package/dist/atomic/{p-e398835b.entry.js.map → p-b2b9e83f.entry.js.map} +0 -0
- /package/dist/atomic/{p-8fdef8a3.entry.js.map → p-b313058c.entry.js.map} +0 -0
- /package/dist/atomic/{p-0bdd730f.entry.js.map → p-b6ae0244.entry.js.map} +0 -0
- /package/dist/atomic/{p-3a7a1a00.entry.js.map → p-bbfe727a.entry.js.map} +0 -0
- /package/dist/atomic/{p-97ce3384.entry.js.map → p-be2a43f4.entry.js.map} +0 -0
- /package/dist/atomic/{p-a5714bc4.entry.js.map → p-d211a422.entry.js.map} +0 -0
- /package/dist/atomic/{p-c280cd05.js.map → p-e1cc5150.js.map} +0 -0
- /package/dist/types/components/common/result-templates/{result-template-common.d.ts → stencil-result-template-common.d.ts} +0 -0
- /package/dist/types/components/{search/atomic-table-result → common}/table-element-utils.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-insight-result-children-template.js","mappings":";;;;;;;;;;;;;;MAgBaA,qCAAmC;IAkD9C;;;;;;;;;;;QAtCe,eAAU,GAA8B,EAAE,CAAC;;;;;;QAqBb,cAAS,GAGlD,EAAE,CAAC;;;;;;QAOsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlCgD,EAAE;;;yBAwBrD,EAAE;4BAUF,EAAE;KAIU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE,CAAC,gCAAgC,CAAC;SACjD,CAAC,CAAC;KACJ;IAEM,iBAAiB;QACtB,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;AA/C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;wEAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;2EAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicInsightResultChildrenTemplate"],"sources":["src/components/insight/result-templates/atomic-insight-result-children-template/atomic-insight-result-children-template.tsx"],"sourcesContent":["import {ResultTemplate, ResultTemplateCondition} from '@coveo/headless';\nimport {Component, Element, Prop, State, Method} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/result-template-common';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-children-template',\n shadow: true,\n})\nexport class AtomicInsightResultChildrenTemplate {\n @Element() public host!: HTMLDivElement;\n\n @State() public error!: Error;\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: ResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n public resultTemplateCommon!: ResultTemplateCommon;\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-insight-result-children'],\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<ResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
1
|
+
{"file":"atomic-insight-result-children-template.js","mappings":";;;;;;;;;;;;;;MAgBaA,qCAAmC;IAkD9C;;;;;;;;;;;QAtCe,eAAU,GAA8B,EAAE,CAAC;;;;;;QAqBb,cAAS,GAGlD,EAAE,CAAC;;;;;;QAOsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlCgD,EAAE;;;yBAwBrD,EAAE;4BAUF,EAAE;KAIU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE,CAAC,gCAAgC,CAAC;SACjD,CAAC,CAAC;KACJ;IAEM,iBAAiB;QACtB,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;AA/C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;wEAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;2EAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicInsightResultChildrenTemplate"],"sources":["src/components/insight/result-templates/atomic-insight-result-children-template/atomic-insight-result-children-template.tsx"],"sourcesContent":["import {ResultTemplate, ResultTemplateCondition} from '@coveo/headless';\nimport {Component, Element, Prop, State, Method} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/stencil-result-template-common';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-children-template',\n shadow: true,\n})\nexport class AtomicInsightResultChildrenTemplate {\n @Element() public host!: HTMLDivElement;\n\n @State() public error!: Error;\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: ResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n public resultTemplateCommon!: ResultTemplateCommon;\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-insight-result-children'],\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<ResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
2
2
|
import { M as MapProp } from './props-utils.js';
|
3
|
-
import { R as ResultTemplateCommon, a as makeDefinedConditions, m as makeMatchConditions } from './result-template-common.js';
|
3
|
+
import { R as ResultTemplateCommon, a as makeDefinedConditions, m as makeMatchConditions } from './stencil-result-template-common.js';
|
4
4
|
|
5
5
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-insight-result-template.js","mappings":";;;;;;;;;;;;;;MAmBaA,6BAA2B;IAmDtC;;;;QA7CO,oBAAe,GAAqC,EAAE,CAAC;;;;;;;;QAS/C,eAAU,GAAqC,EAAE,CAAC;;;;;;QAqBpB,cAAS,GAGlD,EAAE,CAAC;;;;;;QAOsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlCuD,EAAE;;;yBAwB5D,EAAE;4BAUF,EAAE;KAEU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE;gBACZ,4BAA4B;gBAC5B,mCAAmC;aACpC;YACD,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;KACJ;IAEM,iBAAiB;QACtB,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;AAjD4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;gEAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;mEAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicInsightResultTemplate"],"sources":["src/components/insight/result-templates/atomic-insight-result-template/atomic-insight-result-template.tsx"],"sourcesContent":["import {\n ResultTemplate as InsightResultTemplate,\n ResultTemplateCondition as InsightResultTemplateCondition,\n} from '@coveo/headless/insight';\nimport {Component, Element, Prop, Method, State} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/result-template-common';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-template',\n shadow: true,\n})\nexport class AtomicInsightResultTemplate {\n private resultTemplateCommon!: ResultTemplateCommon;\n\n @State() public error!: Error;\n\n @Element() public host!: HTMLDivElement;\n public matchConditions: InsightResultTemplateCondition[] = [];\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: InsightResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: [\n 'atomic-insight-result-list',\n 'atomic-insight-folded-result-list',\n ],\n allowEmpty: true,\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<InsightResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
1
|
+
{"file":"atomic-insight-result-template.js","mappings":";;;;;;;;;;;;;;MAmBaA,6BAA2B;IAmDtC;;;;QA7CO,oBAAe,GAAqC,EAAE,CAAC;;;;;;;;QAS/C,eAAU,GAAqC,EAAE,CAAC;;;;;;QAqBpB,cAAS,GAGlD,EAAE,CAAC;;;;;;QAOsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlCuD,EAAE;;;yBAwB5D,EAAE;4BAUF,EAAE;KAEU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE;gBACZ,4BAA4B;gBAC5B,mCAAmC;aACpC;YACD,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;KACJ;IAEM,iBAAiB;QACtB,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;AAjD4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;gEAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;mEAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicInsightResultTemplate"],"sources":["src/components/insight/result-templates/atomic-insight-result-template/atomic-insight-result-template.tsx"],"sourcesContent":["import {\n ResultTemplate as InsightResultTemplate,\n ResultTemplateCondition as InsightResultTemplateCondition,\n} from '@coveo/headless/insight';\nimport {Component, Element, Prop, Method, State} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/stencil-result-template-common';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-template',\n shadow: true,\n})\nexport class AtomicInsightResultTemplate {\n private resultTemplateCommon!: ResultTemplateCommon;\n\n @State() public error!: Error;\n\n @Element() public host!: HTMLDivElement;\n public matchConditions: InsightResultTemplateCondition[] = [];\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: InsightResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: [\n 'atomic-insight-result-list',\n 'atomic-insight-folded-result-list',\n ],\n allowEmpty: true,\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<InsightResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
2
2
|
import { buildUserActions } from '@coveo/headless/insight';
|
3
|
-
import { C as
|
3
|
+
import { C as Clockicon } from './clock.js';
|
4
4
|
import { I as InitializeBindings, B as BindStateToController } from './initialization-utils.js';
|
5
5
|
import { I as IconButton } from './stencil-iconButton.js';
|
6
6
|
import { d as defineCustomElement$4 } from './atomic-insight-user-actions-modal2.js';
|
@@ -59,7 +59,7 @@ const AtomicInsightUserActionsToggle$1 = /*@__PURE__*/ proxyCustomElement(class
|
|
59
59
|
this.modalRef.excludedCustomActions = this.excludedCustomActions;
|
60
60
|
}
|
61
61
|
render() {
|
62
|
-
return (h(IconButton, { key: '944b266236746e954178687006e56395f3e24868', partPrefix: "insight-user-actions-toggle", style: "outline-neutral", icon:
|
62
|
+
return (h(IconButton, { key: '944b266236746e954178687006e56395f3e24868', partPrefix: "insight-user-actions-toggle", style: "outline-neutral", icon: Clockicon, ariaLabel: this.bindings.i18n.t('user-actions'), onClick: () => {
|
63
63
|
this.enableModal();
|
64
64
|
}, title: this.bindings.i18n.t('user-actions'), buttonRef: (button) => {
|
65
65
|
if (!button) {
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-insight-user-actions-toggle.js","mappings":";;;;;;;;;AAAA,MAAM,iCAAiC,GAAG,0ljEAA0ljE,CAAC;AACrojE,6CAAe,iCAAiC;;;;;;;;;;;;MCuBnCA,gCAA8B;;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,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,EAC3C,SAAS,EAAE,CAAC,MAA0B;gBACpC,IAAI,CAAC,MAAM,EAAE;oBACX,OAAO;iBACR;gBACD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC;gBACxB,IAAI,CAAC,SAAS,EAAE,CAAC;aAClB,GACD,EACF;KACH;;;;;;;;;;AAvE4B;IAA5B,kBAAkB,EAAE;kEAAmC;AAIjD;IAFN,qBAAqB,CAAC,aAAa,CAAC;0EAEa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["AtomicInsightUserActionsToggle","buildInsightUserActions"],"sources":["src/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.pcss?tag=atomic-insight-user-actions-toggle&encapsulation=shadow","src/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n","import {\n buildUserActions as buildInsightUserActions,\n UserActions as InsightUserActions,\n UserActionsState as InsightUserActionsState,\n} from '@coveo/headless/insight';\nimport {Component, h, Prop, Element, State} from '@stencil/core';\nimport Clockicon from '../../../../images/clock.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {IconButton} from '../../../common/stencil-iconButton';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * Internal component of the atomic-insight-interface\n * The `atomic-insight-user-actions-toggle` component displays a button that opens a modal containing the user actions timeline component.\n */\n@Component({\n tag: 'atomic-insight-user-actions-toggle',\n styleUrl: 'atomic-insight-user-actions-toggle.pcss',\n shadow: true,\n})\nexport class AtomicInsightUserActionsToggle\n implements InitializableComponent<InsightBindings>\n{\n @Element() public host!: HTMLElement;\n @InitializeBindings() public bindings!: InsightBindings;\n public userActions!: InsightUserActions;\n @BindStateToController('userActions')\n @State()\n public userActionsState!: InsightUserActionsState;\n @State() public error!: Error;\n\n /**\n * The ID of the user whose actions are being displayed.\n */\n @Prop() public userId!: string;\n /**\n * The date and time when the case was created. For example \"2024-01-01T00:00:00Z\"\n */\n @Prop() public ticketCreationDateTime!: string;\n /**\n * The names of custom events to exclude.\n */\n @Prop() public excludedCustomActions: string[] = [];\n\n public initialize() {\n this.userActions = buildInsightUserActions(this.bindings.engine, {\n options: {\n ticketCreationDate: this.ticketCreationDateTime,\n excludedCustomActions: this.excludedCustomActions,\n },\n });\n }\n\n private buttonRef?: HTMLButtonElement;\n private modalRef?: HTMLAtomicInsightUserActionsModalElement;\n\n private enableModal() {\n this.modalRef && (this.modalRef.isOpen = true);\n this.userActions.logOpenUserActions();\n }\n\n private loadModal() {\n if (this.modalRef) {\n return;\n }\n\n this.modalRef = document.createElement('atomic-insight-user-actions-modal');\n\n this.host.insertAdjacentElement('beforebegin', this.modalRef);\n this.modalRef.openButton = this.buttonRef;\n this.modalRef.userId = this.userId;\n this.modalRef.ticketCreationDateTime = this.ticketCreationDateTime;\n this.modalRef.excludedCustomActions = this.excludedCustomActions;\n }\n\n public render() {\n return (\n <IconButton\n partPrefix=\"insight-user-actions-toggle\"\n style=\"outline-neutral\"\n icon={Clockicon}\n ariaLabel={this.bindings.i18n.t('user-actions')}\n onClick={() => {\n this.enableModal();\n }}\n title={this.bindings.i18n.t('user-actions')}\n buttonRef={(button?: HTMLButtonElement) => {\n if (!button) {\n return;\n }\n this.buttonRef = button;\n this.loadModal();\n }}\n />\n );\n }\n}\n"],"version":3}
|
@@ -289,7 +289,7 @@ const AtomicNumericFacet$1 = /*@__PURE__*/ proxyCustomElement(class AtomicNumeri
|
|
289
289
|
}
|
290
290
|
render() {
|
291
291
|
const { searchStatusState: { firstSearchExecuted, hasError }, bindings: { i18n }, } = this;
|
292
|
-
return (h(FacetGuard, { key: '
|
292
|
+
return (h(FacetGuard, { key: '333e7325e16ce23a1d39baad905ea96f649ff007', enabled: this.enabled, firstSearchExecuted: firstSearchExecuted, hasError: hasError, hasResults: this.shouldRenderFacet }, firstSearchExecuted ? (h(FacetContainer, null, h(FacetHeader, { i18n: i18n, label: this.label, onClearFilters: () => {
|
293
293
|
this.focusTarget.focusAfterSearch();
|
294
294
|
if (this.filterState?.range) {
|
295
295
|
this.filter?.clear();
|
@@ -135,6 +135,28 @@ const QuickviewIframe = ({ title, onSetIframeRef, uniqueIdentifier, content, san
|
|
135
135
|
} }));
|
136
136
|
};
|
137
137
|
|
138
|
+
const buildQuickviewPreviewBar = (words, highlightKeywords, iframe) => {
|
139
|
+
if (!iframe) {
|
140
|
+
return;
|
141
|
+
}
|
142
|
+
const documentWriter = iframe.contentDocument;
|
143
|
+
if (!documentWriter) {
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
const bar = buildPreviewBar(documentWriter);
|
147
|
+
if (highlightKeywords.highlightNone) {
|
148
|
+
bar.remove();
|
149
|
+
return;
|
150
|
+
}
|
151
|
+
const docHeight = documentWriter.body.scrollHeight;
|
152
|
+
Object.values(words).forEach((word) => {
|
153
|
+
word.elements.forEach((wordElement) => {
|
154
|
+
const previewUnit = buildPreviewUnit(documentWriter, word, wordElement, docHeight, highlightKeywords);
|
155
|
+
bar.appendChild(previewUnit);
|
156
|
+
});
|
157
|
+
});
|
158
|
+
documentWriter.body.appendChild(bar);
|
159
|
+
};
|
138
160
|
const buildPreviewBar = (documentWriter) => {
|
139
161
|
const previewBarId = 'CoveoPreviewBar';
|
140
162
|
const bar = documentWriter.getElementById(previewBarId) ||
|
@@ -164,28 +186,6 @@ const buildPreviewUnit = (documentWriter, word, wordElement, docHeight, highligh
|
|
164
186
|
previewUnit.style.backgroundColor = word.color;
|
165
187
|
return previewUnit;
|
166
188
|
};
|
167
|
-
const buildQuickviewPreviewBar = (words, highlightKeywords, iframe) => {
|
168
|
-
if (!iframe) {
|
169
|
-
return;
|
170
|
-
}
|
171
|
-
const documentWriter = iframe.contentDocument;
|
172
|
-
if (!documentWriter) {
|
173
|
-
return;
|
174
|
-
}
|
175
|
-
const bar = buildPreviewBar(documentWriter);
|
176
|
-
if (highlightKeywords.highlightNone) {
|
177
|
-
bar.remove();
|
178
|
-
return;
|
179
|
-
}
|
180
|
-
const docHeight = documentWriter.body.scrollHeight;
|
181
|
-
Object.values(words).forEach((word) => {
|
182
|
-
word.elements.forEach((wordElement) => {
|
183
|
-
const previewUnit = buildPreviewUnit(documentWriter, word, wordElement, docHeight, highlightKeywords);
|
184
|
-
bar.appendChild(previewUnit);
|
185
|
-
});
|
186
|
-
});
|
187
|
-
documentWriter.body.appendChild(bar);
|
188
|
-
};
|
189
189
|
|
190
190
|
const rgbToHsv = (r, g, b) => {
|
191
191
|
const max = Math.max(r, g, b);
|
@@ -582,7 +582,7 @@ const AtomicQuickviewModal = /*@__PURE__*/ proxyCustomElement(class AtomicQuickv
|
|
582
582
|
});
|
583
583
|
}
|
584
584
|
render() {
|
585
|
-
return (h("atomic-modal", { key: '
|
585
|
+
return (h("atomic-modal", { key: '8ff1438b0d7ff43933a1fc0800891a7cb7065043', fullscreen: this.bindings.store.isMobile(), class: 'atomic-quickview-modal', isOpen: this.isOpen, close: () => this.onClose(), exportparts: ATOMIC_MODAL_EXPORT_PARTS }, this.renderHeader(), this.renderBody(), this.renderFooter()));
|
586
586
|
}
|
587
587
|
static get watchers() { return {
|
588
588
|
"highlightKeywords": ["watchHighlightKeywords"]
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-quickview-modal2.js","mappings":";;;;;;;;;;;;;;;;;;;AAaA,MAAM,yBAAyB,GAAG,kCAAkC,CAAC;AAW9D,MAAM,gBAAgB,GAA+C,CAC1E,KAAK;IAEL,MAAM,EAAC,KAAK,EAAE,SAAS,EAAC,GAAG,KAAK,CAAC;IACjC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAElD,IAAI,aAAa,KAAK,CAAC,EAAE;QACvB,OAAO;KACR;IAED,MAAM,cAAc,IAClB,EAAC,cAAc,OAAK,KAAK,EAAE,WAAW,EA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,EAAE,CAAC;SACzB;aAAM;YACL,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI;YAC1D,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aAC5D;iBAAM;gBACL,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aAC7D;SACF,CAAC,CAAC;KACJ;IAEM,MAAM;QACX,QACE,qEACE,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,EAC1C,KAAK,EAAE,wBAAwB,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,EAC3B,WAAW,EAAE,yBAAyB,IAErC,IAAI,CAAC,YAAY,EAAE,EACnB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,YAAY,EAAE,CACP,EACf;KACH;;;;;;;;;;;;;;;;;;;;AAjS4B;IAA5B,kBAAkB,EAAE;sDAA4B;;;;;;;;;;;;;;;;;","names":["ArrowDown"],"sources":["src/components/search/result-template-components/atomic-quickview-sidebar/atomic-quickview-sidebar.tsx","src/components/search/result-template-components/quickview-iframe/quickview-iframe.tsx","src/components/search/result-template-components/quickview-preview-bar/quickview-preview-bar.ts","src/utils/color-utils.ts","src/components/search/result-template-components/quickview-word-highlight/quickview-word-highlight.tsx","src/components/search/result-template-components/atomic-quickview-modal/atomic-quickview-modal.pcss?tag=atomic-quickview-modal&encapsulation=shadow","src/components/search/result-template-components/atomic-quickview-modal/atomic-quickview-modal.tsx"],"sourcesContent":["import {Fragment, FunctionalComponent, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport Add from '../../../../images/add.svg';\nimport ArrowDown from '../../../../images/arrow-bottom-rounded.svg';\nimport ArrowUp from '../../../../images/arrow-top-rounded.svg';\nimport MinimizeIcon from '../../../../images/menu.svg';\nimport Remove from '../../../../images/remove.svg';\nimport {IconButton} from '../../../common/stencil-iconButton';\nimport {StencilCheckbox} from '../../../common/stencil-checkbox';\nimport {FieldsetGroup} from '../../../common/stencil-fieldset-group';\nimport type {HighlightKeywords} from '../atomic-quickview-modal/atomic-quickview-modal';\nimport {QuickviewWordHighlight} from '../quickview-word-highlight/quickview-word-highlight';\n\nconst identifierKeywordsSection = 'coveo-quickview-sidebar-keywords';\n\nexport interface QuickviewSidebarProps {\n words: Record<string, QuickviewWordHighlight>;\n i18n: i18n;\n highlightKeywords: HighlightKeywords;\n onHighlightKeywords: (highlight: HighlightKeywords) => void;\n minimized: boolean;\n onMinimize: (minimize: boolean) => void;\n}\n\nexport const QuickviewSidebar: FunctionalComponent<QuickviewSidebarProps> = (\n props\n) => {\n const {words, minimized} = props;\n const numberOfWords = Object.values(words).length;\n\n if (numberOfWords === 0) {\n return;\n }\n\n const minimizeButton = (\n <MinimizeButton {...props} wordsLength={numberOfWords} />\n );\n\n return (\n <div class=\"border-neutral h-full border-r p-4\">\n {minimized && minimizeButton}\n <div class=\"flex items-center justify-between\">\n <div class=\"flex items-center\">\n <HighlightKeywordsCheckbox {...props} />\n </div>\n {!minimized && <div>{minimizeButton}</div>}\n </div>\n\n {!minimized && <Keywords {...props} words={words} />}\n </div>\n );\n};\n\nconst MinimizeButton: FunctionalComponent<\n Pick<\n QuickviewSidebarProps,\n 'i18n' | 'minimized' | 'onMinimize' | 'highlightKeywords'\n > & {wordsLength: number}\n> = ({i18n, minimized, onMinimize, highlightKeywords, wordsLength}) => (\n <IconButton\n partPrefix=\"sidebar-minimize\"\n icon={MinimizeIcon}\n style=\"text-transparent\"\n title={i18n.t('quickview-toggle-navigation')}\n ariaLabel={i18n.t('quickview-toggle-navigation')}\n onClick={() => onMinimize(!minimized)}\n badge={\n highlightKeywords && minimized ? <slot>{wordsLength}</slot> : undefined\n }\n class={`w-fit ${minimized ? '' : 'ml-auto'}`}\n ariaExpanded={(!minimized).toString()}\n ariaControls={identifierKeywordsSection}\n />\n);\n\nconst HighlightKeywordsCheckbox: FunctionalComponent<\n Pick<\n QuickviewSidebarProps,\n 'i18n' | 'highlightKeywords' | 'onHighlightKeywords' | 'minimized'\n >\n> = ({i18n, highlightKeywords, onHighlightKeywords, minimized}) => (\n <Fragment>\n <StencilCheckbox\n text={i18n.t('keywords-highlight')}\n class=\"mr-2\"\n id=\"atomic-quickview-sidebar-highlight-keywords\"\n checked={!highlightKeywords.highlightNone}\n onToggle={(checked) =>\n onHighlightKeywords({\n ...highlightKeywords,\n highlightNone: !checked,\n })\n }\n ></StencilCheckbox>\n {!minimized && (\n <label\n class=\"cursor-pointer font-bold whitespace-nowrap\"\n htmlFor=\"atomic-quickview-sidebar-highlight-keywords\"\n >\n {i18n.t('keywords-highlight')}\n </label>\n )}\n </Fragment>\n);\n\nconst Keywords: FunctionalComponent<\n Pick<\n QuickviewSidebarProps,\n 'i18n' | 'onHighlightKeywords' | 'highlightKeywords'\n > & {\n words: Record<string, QuickviewWordHighlight>;\n }\n> = ({words, i18n, highlightKeywords, onHighlightKeywords}) => {\n return (\n <div id={identifierKeywordsSection}>\n {Object.values(words).map((keyword) => {\n const wordIsEnabled =\n !highlightKeywords.highlightNone &&\n (highlightKeywords.keywords[keyword.text] === undefined ||\n highlightKeywords.keywords[keyword.text].enabled === true);\n\n return (\n <div\n key={keyword.text}\n class=\"my-4 flex w-100 items-center justify-between gap-x-2\"\n >\n <div\n class={`bg-background border-neutral flex grow items-center overflow-x-auto rounded-lg border ${\n !wordIsEnabled ? 'pointer-events-none opacity-50' : ''\n }`}\n >\n <div\n class=\"flex grow items-center border-r p-4\"\n aria-hidden=\"true\"\n >\n <div\n class=\"mr-2 h-5 w-5 flex-none\"\n style={{backgroundColor: keyword.color}}\n ></div>\n <div class=\"mr-2 grow whitespace-nowrap\">{keyword.text}</div>\n <div class=\"flex-none\">\n (\n {new Intl.NumberFormat(i18n.language, {\n notation: 'compact',\n }).format(keyword.occurrences)}\n )\n </div>\n </div>\n <FieldsetGroup\n label={i18n.t('quickview-navigate-keywords', {\n occurrences: keyword.occurrences,\n keyword: keyword.text,\n })}\n >\n <div class=\"flex px-2\">\n <IconButton\n partPrefix=\"sidebar-next\"\n icon={ArrowDown}\n disabled={!wordIsEnabled}\n style=\"text-transparent\"\n class=\"border-0\"\n ariaLabel={i18n.t('next')}\n title={i18n.t('next')}\n onClick={() => keyword.navigateForward()}\n />\n <IconButton\n partPrefix=\"sidebar-previous\"\n icon={ArrowUp}\n disabled={!wordIsEnabled}\n style=\"text-transparent\"\n class=\"border-0\"\n ariaLabel={i18n.t('previous')}\n title={i18n.t('previous')}\n onClick={() => keyword.navigateBackward()}\n />\n </div>\n </FieldsetGroup>\n </div>\n <IconButton\n partPrefix=\"sidebar-remove-word\"\n class={`${\n highlightKeywords.highlightNone\n ? 'pointer-events-none opacity-50'\n : ''\n }`}\n tabIndex={highlightKeywords.highlightNone ? '-1' : '0'}\n ariaPressed={(!wordIsEnabled).toString()}\n style=\"text-transparent\"\n icon={wordIsEnabled ? Remove : Add}\n ariaLabel={i18n.t('quickview-remove-word')}\n onClick={() => {\n onHighlightKeywords({\n ...highlightKeywords,\n keywords: {\n ...highlightKeywords.keywords,\n [keyword.text]: {\n enabled: !wordIsEnabled,\n indexIdentifier: keyword.indexIdentifier,\n },\n },\n });\n }}\n />\n </div>\n );\n })}\n </div>\n );\n};\n","import {SearchEngine} from '@coveo/headless';\nimport {FunctionalComponent, h} from '@stencil/core';\n\nconst documentIdentifierInIframe = 'CoveoDocIdentifier';\n\nconst writeDocument = (documentWriter: Document, content: string) => {\n documentWriter.open();\n documentWriter.write(content);\n documentWriter.close();\n if (documentWriter.scrollingElement) {\n documentWriter.scrollingElement.scrollTop = 0;\n }\n};\n\nconst currentResultAlreadyWrittenToDocument = (\n documentWriter: Document,\n uniqueIdentifier: string\n) => {\n const currentDocIdentifier = documentWriter.getElementById(\n documentIdentifierInIframe\n );\n\n return (\n currentDocIdentifier &&\n currentDocIdentifier.textContent === uniqueIdentifier\n );\n};\n\nconst ensureSameResultIsNotOverwritten = (\n documentWriter: Document,\n uniqueIdentifier: string\n) => {\n const docIdentifier = documentWriter.createElement('div');\n docIdentifier.style.display = 'none';\n docIdentifier.setAttribute('aria-hidden', 'true');\n docIdentifier.id = documentIdentifierInIframe;\n docIdentifier.textContent = uniqueIdentifier;\n documentWriter.body.appendChild(docIdentifier);\n};\n\nconst warnAboutLimitedUsageQuickview = (logger?: SearchEngine['logger']) => {\n logger?.warn(\n 'Quickview initialized in restricted mode due to incompatible sandboxing environment. Keywords hit navigation will be disabled.'\n );\n};\n\nexport const QuickviewIframe: FunctionalComponent<{\n title: string;\n content?: string;\n onSetIframeRef: (ref: HTMLIFrameElement) => void;\n uniqueIdentifier?: string;\n sandbox?: string;\n src?: string;\n logger?: SearchEngine['logger'];\n}> = ({title, onSetIframeRef, uniqueIdentifier, content, sandbox, src, logger}) => {\n // When a document is written with document.open/document.write/document.close\n // it is not synchronous and the content of the iframe is only available to be queried at the end of the current call stack.\n // This add a \"wait\" (setTimeout 0) before calling the `onSetIframeRef` from the parent modal quickview\n const waitForIframeContentToBeWritten = () => {\n return new Promise((resolve) => setTimeout(resolve));\n };\n\n return (\n <iframe\n title={title}\n src=\"about:blank\"\n class=\"h-full w-full\"\n sandbox={sandbox}\n ref={async (el) => {\n const iframeRef = el as HTMLIFrameElement;\n\n if (!uniqueIdentifier || !content) {\n return;\n }\n\n const documentWriter = iframeRef.contentDocument;\n if (!documentWriter) {\n if (src) {\n warnAboutLimitedUsageQuickview(logger);\n iframeRef.src = src;\n }\n\n return;\n }\n if (\n currentResultAlreadyWrittenToDocument(\n documentWriter,\n uniqueIdentifier\n )\n ) {\n return;\n }\n\n writeDocument(documentWriter, content);\n ensureSameResultIsNotOverwritten(documentWriter, uniqueIdentifier);\n\n await waitForIframeContentToBeWritten();\n onSetIframeRef(iframeRef);\n }}\n ></iframe>\n );\n};\n","import type {HighlightKeywords} from '../atomic-quickview-modal/atomic-quickview-modal';\nimport type {QuickviewWordHighlight} from '../quickview-word-highlight/quickview-word-highlight';\n\nconst buildPreviewBar = (documentWriter: Document) => {\n const previewBarId = 'CoveoPreviewBar';\n const bar =\n documentWriter.getElementById(previewBarId) ||\n documentWriter.createElement('div');\n\n bar.id = previewBarId;\n bar.innerHTML = '';\n bar.style.position = 'fixed';\n bar.style.top = '0';\n bar.style.right = '0';\n bar.style.width = '15px';\n bar.style.height = '100%';\n bar.setAttribute('aria-hidden', 'true');\n return bar;\n};\n\nconst buildPreviewUnit = (\n documentWriter: Document,\n word: QuickviewWordHighlight,\n wordElement: HTMLElement,\n docHeight: number,\n highlightKeywords: HighlightKeywords\n) => {\n const previewUnit = documentWriter.createElement('div');\n if (highlightKeywords.keywords[word.text]?.enabled === false) {\n previewUnit.style.display = 'none';\n return previewUnit;\n }\n\n const elementPosition = wordElement.getBoundingClientRect().top;\n\n previewUnit.style.position = 'absolute';\n previewUnit.style.top = `${(elementPosition / docHeight) * 100}%`;\n previewUnit.style.width = '100%';\n previewUnit.style.height = '1px';\n previewUnit.style.border = `1px solid ${word.previewBorderColor}`;\n previewUnit.style.backgroundColor = word.color;\n return previewUnit;\n};\n\nexport const buildQuickviewPreviewBar = (\n words: Record<string, QuickviewWordHighlight>,\n highlightKeywords: HighlightKeywords,\n iframe?: HTMLIFrameElement\n) => {\n if (!iframe) {\n return;\n }\n const documentWriter = iframe.contentDocument;\n if (!documentWriter) {\n return;\n }\n const bar = buildPreviewBar(documentWriter);\n if (highlightKeywords.highlightNone) {\n bar.remove();\n return;\n }\n const docHeight = documentWriter.body.scrollHeight;\n\n Object.values(words).forEach((word) => {\n word.elements.forEach((wordElement) => {\n const previewUnit = buildPreviewUnit(\n documentWriter,\n word,\n wordElement,\n docHeight,\n highlightKeywords\n );\n\n bar.appendChild(previewUnit);\n });\n });\n documentWriter.body.appendChild(bar);\n};\n","export const rgbToHsv = (r: number, g: number, b: number) => {\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n\n let h: number;\n const v = max;\n\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n\n if (max === min) {\n h = 0;\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n default:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {h, s, v};\n};\n\nexport const hsvToRgb = (h: number, s: number, v: number) => {\n let r: number, g: number, b: number;\n\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n default:\n r = v;\n g = p;\n b = q;\n break;\n }\n\n return {\n r: Math.round(r),\n g: Math.round(g),\n b: Math.round(b),\n };\n};\n","import {TermsToHighlight} from '@coveo/headless';\nimport {hsvToRgb, rgbToHsv} from '../../../../utils/color-utils';\n\nexport const HIGHLIGHT_PREFIX = 'CoveoHighlight';\nexport class QuickviewWordHighlight {\n public text: string;\n public indexIdentifier: string;\n public occurrences = 0;\n public color: string;\n public focusedColor: string;\n public previewBorderColor: string;\n public elements: HTMLElement[] = [];\n\n private currentNavigationPosition = -1;\n\n constructor(\n private stemmingInfoFromIndex: TermsToHighlight,\n keywordElementInIframe: HTMLElement\n ) {\n const parsed = this.parseKeywordIdentifier(keywordElementInIframe);\n if (!parsed) {\n throw 'Invalid keyword identifier for quickview';\n }\n\n this.text = this.getText(keywordElementInIframe);\n this.indexIdentifier = `${parsed.keywordIdentifier}`;\n this.color = keywordElementInIframe.style.backgroundColor;\n this.focusedColor = this.computeInvertedColor();\n this.previewBorderColor = this.computeSaturatedColor();\n\n this.addElement(keywordElementInIframe);\n }\n\n public addElement(keywordElementInIframe: HTMLElement) {\n this.occurrences++;\n this.elements.push(keywordElementInIframe);\n }\n\n public navigateForward() {\n this.currentNavigationPosition++;\n if (this.currentNavigationPosition >= this.elements.length) {\n this.currentNavigationPosition = 0;\n }\n this.highlightNavigation();\n this.putElementIntoView();\n return this.elements[this.currentNavigationPosition];\n }\n\n public navigateBackward() {\n this.currentNavigationPosition--;\n if (this.currentNavigationPosition < 0) {\n this.currentNavigationPosition = this.elements.length - 1;\n }\n this.highlightNavigation();\n this.putElementIntoView();\n return this.elements[this.currentNavigationPosition];\n }\n\n private isTaggedWord(element: HTMLElement) {\n return element.nodeName.toLowerCase() === 'coveotaggedword';\n }\n\n private highlightNavigation() {\n const currentElement = this.elements[this.currentNavigationPosition];\n const otherElements = this.elements.filter((el) => el !== currentElement);\n currentElement.style.color = this.color;\n currentElement.style.backgroundColor = this.focusedColor;\n otherElements.forEach((element) => {\n element.style.color = '';\n element.style.backgroundColor = this.color;\n });\n }\n\n private putElementIntoView() {\n const element = this.elements[this.currentNavigationPosition];\n element.scrollIntoView();\n }\n\n private getText(element: HTMLElement) {\n const innerTextOfHTMLElement = this.getHighlightedInnerText(element);\n return this.resolveOriginalTerm(innerTextOfHTMLElement).trim();\n }\n\n private resolveOriginalTerm(highlight: string): string {\n // First try to find either an exact match between the highlight and the original non-stemmed keyword.\n // Otherwise try to find a match between the highlight and the stemming keyword expansions\n // If nothing is found (which should not normally happen...), simply return the highlight keyword as is.\n\n const found = Object.keys(this.stemmingInfoFromIndex).find(\n (originalTerm) => {\n const originalTermMatch =\n originalTerm.toLowerCase() === highlight.toLowerCase();\n if (originalTermMatch) {\n return true;\n }\n const stemmingExpansions = this.stemmingInfoFromIndex[originalTerm];\n if (!stemmingExpansions) {\n return false;\n }\n\n const stemmingExpansionMatch = stemmingExpansions.find(\n (stemmingExpansion) =>\n stemmingExpansion.toLowerCase() === highlight.toLowerCase()\n );\n return stemmingExpansionMatch;\n }\n );\n return found || highlight;\n }\n\n private getHighlightedInnerText(element: HTMLElement): string {\n if (!this.isTaggedWord(element)) {\n return this.getTextOfHTMLElement(element);\n }\n\n const children = Array.from(element.children) as HTMLElement[];\n if (children.length >= 1) {\n return this.getTextOfHTMLElement(children[0]);\n }\n\n return '';\n }\n\n private parseKeywordIdentifier(element: HTMLElement) {\n const parts = element.id\n .substring(HIGHLIGHT_PREFIX.length + 1)\n .match(/^([0-9]+)\\.([0-9]+)\\.([0-9]+)$/);\n\n if (!parts || parts.length <= 3) {\n return null;\n }\n\n return {\n keywordIdentifier: parts[1],\n keywordTermPart: parseInt(parts[3], 10),\n };\n }\n\n private getTextOfHTMLElement(el: HTMLElement) {\n return el.innerText || el.textContent || '';\n }\n\n private computeInvertedColor() {\n const {r, g, b} = this.extractRgb();\n return `rgb(${255 - r}, ${255 - g}, ${255 - b})`;\n }\n\n private computeSaturatedColor() {\n const {r, g, b} = this.extractRgb();\n const {h, s, v} = rgbToHsv(r, g, b);\n let newSaturation = s * 2;\n if (newSaturation > 1) {\n newSaturation = 1;\n }\n const {\n r: rSaturated,\n g: gSaturated,\n b: bSaturated,\n } = hsvToRgb(h, newSaturation, v);\n return `rgb(${rSaturated}, ${gSaturated}, ${bSaturated})`;\n }\n\n private extractRgb() {\n const rgbExtracted = this.color.match(/\\d+/g);\n if (!rgbExtracted) {\n return {r: 255, g: 255, b: 255};\n }\n\n return {\n r: parseInt(rgbExtracted[0], 10),\n g: parseInt(rgbExtracted[1], 10),\n b: parseInt(rgbExtracted[2], 10),\n };\n }\n}\n\nexport const getWordsHighlights = (\n stemmingInfoFromIndex: TermsToHighlight,\n iframe?: HTMLIFrameElement\n) => {\n const wordsHighlights: Record<string, QuickviewWordHighlight> = {};\n if (!iframe) {\n return wordsHighlights;\n }\n\n iframe.contentDocument?.body\n .querySelectorAll(`[id^=\"${HIGHLIGHT_PREFIX}\"]`)\n .forEach((el) => {\n const wordHTMLElementToHighlight = el as HTMLElement;\n\n const wordHighlight = new QuickviewWordHighlight(\n stemmingInfoFromIndex,\n wordHTMLElementToHighlight\n );\n\n if (!wordHighlight.text) {\n return;\n }\n\n const alreadyScannedKeyword =\n wordsHighlights[wordHighlight.indexIdentifier];\n\n if (alreadyScannedKeyword) {\n alreadyScannedKeyword.addElement(wordHTMLElementToHighlight);\n } else {\n wordsHighlights[wordHighlight.indexIdentifier] = wordHighlight;\n }\n });\n\n return wordsHighlights;\n};\n","@import '../../../../global/global.pcss';\n@reference '../../../../utils/tailwind-utilities/link-style.css';\n\n.atomic-quickview-modal {\n &::part(backdrop) {\n grid-template-columns: 1fr max(80vw, 30rem) 1fr;\n }\n &::part(body),\n &::part(header),\n &::part(footer) {\n @apply max-w-full;\n }\n\n &::part(footer) {\n @apply flex justify-center;\n }\n\n &::part(body-wrapper) {\n @apply h-full overflow-hidden p-0;\n }\n\n &::part(body) {\n @apply h-full;\n }\n\n &::part(backdrop) {\n grid-template-rows: 1fr 100% 3fr;\n }\n\n &::part(header-wrapper) {\n @apply bg-neutral-light;\n }\n\n a {\n @apply link-style;\n }\n}\n","import {\n buildInteractiveResult,\n Result,\n InteractiveResult,\n TermsToHighlight,\n} from '@coveo/headless';\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Watch,\n Method,\n VNode,\n Fragment,\n} from '@stencil/core';\nimport CloseIcon from '../../../../images/close.svg';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {ATOMIC_MODAL_EXPORT_PARTS} from '../../../common/atomic-modal/export-parts';\nimport {IconButton} from '../../../common/stencil-iconButton';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Button} from '../../../common/stencil-button';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {QuickviewSidebar} from '../atomic-quickview-sidebar/atomic-quickview-sidebar';\nimport {QuickviewIframe} from '../quickview-iframe/quickview-iframe';\nimport {buildQuickviewPreviewBar} from '../quickview-preview-bar/quickview-preview-bar';\nimport {\n getWordsHighlights,\n HIGHLIGHT_PREFIX,\n QuickviewWordHighlight,\n} from '../quickview-word-highlight/quickview-word-highlight';\n\nexport interface HighlightKeywords {\n highlightNone: boolean;\n keywords: {\n [text: string]: {\n indexIdentifier: string;\n enabled: boolean;\n };\n };\n}\n\n/**\n * The modal opened when clicking on a quickview button.\n * Do not use this component directly; use `atomic-quickview` instead.\n *\n * @part backdrop - The transparent backdrop hiding the content behind the modal.\n * @part container - The modal's outermost container with the outline and background.\n * @part header-wrapper - The wrapper around the header.\n * @part header - The header at the top of the modal.\n * @part header-ruler - The horizontal ruler underneath the header.\n * @part body-wrapper - The wrapper around the body.\n * @part body - The body of the modal, between the header and the footer.\n * @part footer-wrapper - The wrapper with a shadow or background color around the footer.\n * @part footer - The footer at the bottom of the modal.\n * @part quickview-modal-header-icon - The close icon of the modal.\n * @part quickview-modal-header-title - The title of the modal.\n */\n@Component({\n tag: 'atomic-quickview-modal',\n styleUrl: 'atomic-quickview-modal.pcss',\n shadow: true,\n})\nexport class AtomicQuickviewModal implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @State() public error!: Error;\n\n @State() private highlightKeywords: HighlightKeywords = {\n highlightNone: false,\n keywords: {},\n };\n @Watch('highlightKeywords')\n watchHighlightKeywords() {\n this.handleHighlightsScripts();\n }\n\n @Event({eventName: 'atomic/quickview/next'}) nextQuickview?: EventEmitter;\n @Event({eventName: 'atomic/quickview/previous'})\n previousQuickview?: EventEmitter;\n\n @State() private minimizeSidebar = false;\n @State() private words: Record<string, QuickviewWordHighlight> = {};\n private iframeRef?: HTMLIFrameElement;\n\n @Prop({mutable: true, reflect: false}) content?: string;\n @Prop({mutable: true, reflect: false}) result?: Result;\n @Prop() current?: number;\n @Prop() total?: number;\n @Prop() sandbox?: string;\n @Prop() modalCloseCallback?: () => void;\n\n private interactiveResult?: InteractiveResult;\n\n public componentWillLoad(): void {\n this.minimizeSidebar = this.bindings.store.isMobile();\n }\n\n @Method()\n public async reset() {\n this.highlightKeywords = {\n highlightNone: false,\n keywords: {},\n };\n this.minimizeSidebar = false;\n this.iframeRef = undefined;\n this.content = undefined;\n this.result = undefined;\n this.interactiveResult = undefined;\n }\n\n private renderHeader() {\n let headerContent: VNode | null = null;\n if (this.result) {\n this.interactiveResult = buildInteractiveResult(this.bindings.engine, {\n options: {result: this.result},\n });\n headerContent = (\n <Fragment>\n <LinkWithItemAnalytics\n href={this.result?.clickUri}\n onSelect={() => this.interactiveResult?.select()}\n onBeginDelayedSelect={() =>\n this.interactiveResult?.beginDelayedSelect()\n }\n onCancelPendingSelect={() =>\n this.interactiveResult?.cancelPendingSelect()\n }\n className=\"truncate\"\n part=\"quickview-modal-header-title\"\n >\n {this.result.title}\n </LinkWithItemAnalytics>\n <IconButton\n partPrefix=\"quickview-modal-header\"\n icon={CloseIcon}\n onClick={() => this.onClose()}\n ariaLabel={this.bindings.i18n.t('close')}\n style=\"text-transparent\"\n title={this.bindings.i18n.t('close')}\n />\n </Fragment>\n );\n }\n return (\n <div slot=\"header\" class=\"flex w-full items-center justify-between\">\n {headerContent}\n </div>\n );\n }\n\n private renderBody() {\n return (\n <div slot=\"body\" class=\"grid h-full grid-cols-[min-content_auto]\">\n <div\n class=\"h-full overflow-y-auto\"\n style={{backgroundColor: 'var(--atomic-neutral-light)'}}\n >\n <QuickviewSidebar\n words={this.words}\n i18n={this.bindings.i18n}\n highlightKeywords={this.highlightKeywords}\n onHighlightKeywords={(highlight) =>\n (this.highlightKeywords = highlight)\n }\n minimized={this.minimizeSidebar}\n onMinimize={(minimize) => (this.minimizeSidebar = minimize)}\n />\n </div>\n <div class=\"relative overflow-auto\">\n <QuickviewIframe\n title={this.result?.title ?? this.bindings.i18n.t('preview-modal-title')} \n logger={this.logger}\n src={this.quickviewSrc}\n sandbox={this.sandbox}\n uniqueIdentifier={this.quickviewUniqueIdentifier}\n content={this.content}\n onSetIframeRef={async (ref) => {\n this.iframeRef = ref;\n this.words = getWordsHighlights(\n this.termsToHighlight,\n this.iframeRef\n );\n this.handleHighlightsScripts();\n }}\n />\n {buildQuickviewPreviewBar(\n this.words,\n this.highlightKeywords,\n this.iframeRef\n )}\n </div>\n </div>\n );\n }\n\n private renderFooter() {\n return (\n <div slot=\"footer\" class=\"flex items-center gap-2\">\n <Button\n class=\"p-2\"\n style=\"square-neutral\"\n onClick={() => this.previousQuickview?.emit()}\n disabled={this.current === 1}\n text={this.bindings.i18n.t('quickview-previous')}\n ></Button>\n <p class=\"text-center\">\n {this.bindings.i18n.t('showing-results-of', {\n first: this.current,\n total: this.total,\n })}\n </p>\n <Button\n class=\"p-2\"\n style=\"square-neutral\"\n onClick={() => this.nextQuickview?.emit()}\n disabled={this.current === this.total}\n text={this.bindings.i18n.t('quickview-next')}\n ></Button>\n </div>\n );\n }\n\n private onClose() {\n this.content = undefined;\n this.result = undefined;\n this.modalCloseCallback && this.modalCloseCallback();\n }\n\n private get isOpen() {\n return !!this.content && !!this.result;\n }\n\n private get highlightScriptId() {\n return 'CoveoDisableHighlightStyle';\n }\n\n private get logger() {\n return this.bindings.engine.logger;\n }\n\n private get quickviewSrc() {\n return this.bindings.engine.state.resultPreview?.contentURL;\n }\n\n private enableHighlights() {\n this.removeDisableHighlightScript();\n }\n\n private enableHighlightsSpecificKeyword(identifier: string) {\n this.removeDisableHighlightScript(identifier);\n }\n\n private disableHighlights() {\n this.createDisableHighlightScript();\n }\n\n private disableHighlightsSpecificKeyword(identifier: string) {\n this.createDisableHighlightScript(identifier);\n }\n\n private removeDisableHighlightScript(identifier?: string) {\n const doc = this.iframeRef?.contentWindow?.document;\n if (!doc) {\n return;\n }\n doc\n .getElementById(\n `${this.highlightScriptId}${identifier ? `:${identifier}` : ''}`\n )\n ?.remove();\n }\n\n private createDisableHighlightScript(identifier?: string) {\n const doc = this.iframeRef?.contentWindow?.document;\n if (!doc) {\n return;\n }\n\n const head = doc.head;\n const scriptId = `${this.highlightScriptId}${\n identifier ? `:${identifier}` : ''\n }`;\n const style =\n doc.getElementById(scriptId) || this.bindings.createStyleElement();\n style.setAttribute('id', scriptId);\n head.appendChild(style);\n style.appendChild(\n doc.createTextNode(`[id^=\"${HIGHLIGHT_PREFIX}${\n identifier ? `:${identifier}` : ''\n }\"] {\n background-color: inherit !important;\n color: inherit !important;\n }`)\n );\n }\n\n private get termsToHighlight() {\n const flatPhrasesToHighlight: TermsToHighlight = {};\n\n const phrasesToHighlight =\n this.bindings.engine.state.search.response.phrasesToHighlight;\n\n Object.entries(phrasesToHighlight).forEach(([phrase, keywords]) => {\n flatPhrasesToHighlight[phrase] = Object.entries(keywords).flatMap(\n ([keywordEntry, keywordStemming]) => {\n return [keywordEntry, ...keywordStemming];\n }\n );\n });\n\n return {\n ...this.bindings.engine.state.search.response.termsToHighlight,\n ...flatPhrasesToHighlight,\n };\n }\n\n private get requestId() {\n return this.bindings.engine.state.search.requestId;\n }\n\n private get quickviewUniqueIdentifier() {\n return this.result?.uniqueId + this.requestId;\n }\n\n private handleHighlightsScripts() {\n if (!this.highlightKeywords.highlightNone) {\n this.enableHighlights();\n } else {\n this.disableHighlights();\n }\n Object.values(this.highlightKeywords.keywords).forEach((word) => {\n if (word.enabled) {\n this.enableHighlightsSpecificKeyword(word.indexIdentifier);\n } else {\n this.disableHighlightsSpecificKeyword(word.indexIdentifier);\n }\n });\n }\n\n public render() {\n return (\n <atomic-modal\n fullscreen={this.bindings.store.isMobile()}\n class={'atomic-quickview-modal'}\n isOpen={this.isOpen}\n close={() => this.onClose()}\n exportparts={ATOMIC_MODAL_EXPORT_PARTS}\n >\n {this.renderHeader()}\n {this.renderBody()}\n {this.renderFooter()}\n </atomic-modal>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"atomic-quickview-modal2.js","mappings":";;;;;;;;;;;;;;;;;;;AAaA,MAAM,yBAAyB,GAAG,kCAAkC,CAAC;AAW9D,MAAM,gBAAgB,GAA+C,CAC1E,KAAK;IA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AM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;KACpD;IAED,IAAY,yBAAyB;QACnC,OAAO,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;KAC/C;IAEO,uBAAuB;QAC7B,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE;YACzC,IAAI,CAAC,gBAAgB,EAAE,CAAC;SACzB;aAAM;YACL,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI;YAC1D,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aAC5D;iBAAM;gBACL,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aAC7D;SACF,CAAC,CAAC;KACJ;IAEM,MAAM;QACX,QACE,qEACE,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,EAC1C,KAAK,EAAE,wBAAwB,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,EAC3B,WAAW,EAAE,yBAAyB,IAErC,IAAI,CAAC,YAAY,EAAE,EACnB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,YAAY,EAAE,CACP,EACf;KACH;;;;;;;;;;;;;;;;;;;;AAjS4B;IAA5B,kBAAkB,EAAE;sDAA4B;;;;;;;;;;;;;;;;;","names":["ArrowDown"],"sources":["src/components/search/result-template-components/atomic-quickview-sidebar/atomic-quickview-sidebar.tsx","src/components/search/result-template-components/quickview-iframe/quickview-iframe.tsx","src/components/search/result-template-components/quickview-preview-bar/quickview-preview-bar.ts","src/utils/color-utils.ts","src/components/search/result-template-components/quickview-word-highlight/quickview-word-highlight.tsx","src/components/search/result-template-components/atomic-quickview-modal/atomic-quickview-modal.pcss?tag=atomic-quickview-modal&encapsulation=shadow","src/components/search/result-template-components/atomic-quickview-modal/atomic-quickview-modal.tsx"],"sourcesContent":["import {Fragment, FunctionalComponent, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport Add from '../../../../images/add.svg';\nimport ArrowDown from '../../../../images/arrow-bottom-rounded.svg';\nimport ArrowUp from '../../../../images/arrow-top-rounded.svg';\nimport MinimizeIcon from '../../../../images/menu.svg';\nimport Remove from '../../../../images/remove.svg';\nimport {IconButton} from '../../../common/stencil-iconButton';\nimport {StencilCheckbox} from '../../../common/stencil-checkbox';\nimport {FieldsetGroup} from '../../../common/stencil-fieldset-group';\nimport type {HighlightKeywords} from '../atomic-quickview-modal/atomic-quickview-modal';\nimport {QuickviewWordHighlight} from '../quickview-word-highlight/quickview-word-highlight';\n\nconst identifierKeywordsSection = 'coveo-quickview-sidebar-keywords';\n\nexport interface QuickviewSidebarProps {\n words: Record<string, QuickviewWordHighlight>;\n i18n: i18n;\n highlightKeywords: HighlightKeywords;\n onHighlightKeywords: (highlight: HighlightKeywords) => void;\n minimized: boolean;\n onMinimize: (minimize: boolean) => void;\n}\n\nexport const QuickviewSidebar: FunctionalComponent<QuickviewSidebarProps> = (\n props\n) => {\n const {words, minimized} = props;\n const numberOfWords = Object.values(words).length;\n\n if (numberOfWords === 0) {\n return;\n }\n\n const minimizeButton = (\n <MinimizeButton {...props} wordsLength={numberOfWords} />\n );\n\n return (\n <div class=\"border-neutral h-full border-r p-4\">\n {minimized && minimizeButton}\n <div class=\"flex items-center justify-between\">\n <div class=\"flex items-center\">\n <HighlightKeywordsCheckbox {...props} />\n </div>\n {!minimized && <div>{minimizeButton}</div>}\n </div>\n\n {!minimized && <Keywords {...props} words={words} />}\n </div>\n );\n};\n\nconst MinimizeButton: FunctionalComponent<\n Pick<\n QuickviewSidebarProps,\n 'i18n' | 'minimized' | 'onMinimize' | 'highlightKeywords'\n > & {wordsLength: number}\n> = ({i18n, minimized, onMinimize, highlightKeywords, wordsLength}) => (\n <IconButton\n partPrefix=\"sidebar-minimize\"\n icon={MinimizeIcon}\n style=\"text-transparent\"\n title={i18n.t('quickview-toggle-navigation')}\n ariaLabel={i18n.t('quickview-toggle-navigation')}\n onClick={() => onMinimize(!minimized)}\n badge={\n highlightKeywords && minimized ? <slot>{wordsLength}</slot> : undefined\n }\n class={`w-fit ${minimized ? '' : 'ml-auto'}`}\n ariaExpanded={(!minimized).toString()}\n ariaControls={identifierKeywordsSection}\n />\n);\n\nconst HighlightKeywordsCheckbox: FunctionalComponent<\n Pick<\n QuickviewSidebarProps,\n 'i18n' | 'highlightKeywords' | 'onHighlightKeywords' | 'minimized'\n >\n> = ({i18n, highlightKeywords, onHighlightKeywords, minimized}) => (\n <Fragment>\n <StencilCheckbox\n text={i18n.t('keywords-highlight')}\n class=\"mr-2\"\n id=\"atomic-quickview-sidebar-highlight-keywords\"\n checked={!highlightKeywords.highlightNone}\n onToggle={(checked) =>\n onHighlightKeywords({\n ...highlightKeywords,\n highlightNone: !checked,\n })\n }\n ></StencilCheckbox>\n {!minimized && (\n <label\n class=\"cursor-pointer font-bold whitespace-nowrap\"\n htmlFor=\"atomic-quickview-sidebar-highlight-keywords\"\n >\n {i18n.t('keywords-highlight')}\n </label>\n )}\n </Fragment>\n);\n\nconst Keywords: FunctionalComponent<\n Pick<\n QuickviewSidebarProps,\n 'i18n' | 'onHighlightKeywords' | 'highlightKeywords'\n > & {\n words: Record<string, QuickviewWordHighlight>;\n }\n> = ({words, i18n, highlightKeywords, onHighlightKeywords}) => {\n return (\n <div id={identifierKeywordsSection}>\n {Object.values(words).map((keyword) => {\n const wordIsEnabled =\n !highlightKeywords.highlightNone &&\n (highlightKeywords.keywords[keyword.text] === undefined ||\n highlightKeywords.keywords[keyword.text].enabled === true);\n\n return (\n <div\n key={keyword.text}\n class=\"my-4 flex w-100 items-center justify-between gap-x-2\"\n >\n <div\n class={`bg-background border-neutral flex grow items-center overflow-x-auto rounded-lg border ${\n !wordIsEnabled ? 'pointer-events-none opacity-50' : ''\n }`}\n >\n <div\n class=\"flex grow items-center border-r p-4\"\n aria-hidden=\"true\"\n >\n <div\n class=\"mr-2 h-5 w-5 flex-none\"\n style={{backgroundColor: keyword.color}}\n ></div>\n <div class=\"mr-2 grow whitespace-nowrap\">{keyword.text}</div>\n <div class=\"flex-none\">\n (\n {new Intl.NumberFormat(i18n.language, {\n notation: 'compact',\n }).format(keyword.occurrences)}\n )\n </div>\n </div>\n <FieldsetGroup\n label={i18n.t('quickview-navigate-keywords', {\n occurrences: keyword.occurrences,\n keyword: keyword.text,\n })}\n >\n <div class=\"flex px-2\">\n <IconButton\n partPrefix=\"sidebar-next\"\n icon={ArrowDown}\n disabled={!wordIsEnabled}\n style=\"text-transparent\"\n class=\"border-0\"\n ariaLabel={i18n.t('next')}\n title={i18n.t('next')}\n onClick={() => keyword.navigateForward()}\n />\n <IconButton\n partPrefix=\"sidebar-previous\"\n icon={ArrowUp}\n disabled={!wordIsEnabled}\n style=\"text-transparent\"\n class=\"border-0\"\n ariaLabel={i18n.t('previous')}\n title={i18n.t('previous')}\n onClick={() => keyword.navigateBackward()}\n />\n </div>\n </FieldsetGroup>\n </div>\n <IconButton\n partPrefix=\"sidebar-remove-word\"\n class={`${\n highlightKeywords.highlightNone\n ? 'pointer-events-none opacity-50'\n : ''\n }`}\n tabIndex={highlightKeywords.highlightNone ? '-1' : '0'}\n ariaPressed={(!wordIsEnabled).toString()}\n style=\"text-transparent\"\n icon={wordIsEnabled ? Remove : Add}\n ariaLabel={i18n.t('quickview-remove-word')}\n onClick={() => {\n onHighlightKeywords({\n ...highlightKeywords,\n keywords: {\n ...highlightKeywords.keywords,\n [keyword.text]: {\n enabled: !wordIsEnabled,\n indexIdentifier: keyword.indexIdentifier,\n },\n },\n });\n }}\n />\n </div>\n );\n })}\n </div>\n );\n};\n","import {SearchEngine} from '@coveo/headless';\nimport {FunctionalComponent, h} from '@stencil/core';\n\nconst documentIdentifierInIframe = 'CoveoDocIdentifier';\n\nconst writeDocument = (documentWriter: Document, content: string) => {\n documentWriter.open();\n documentWriter.write(content);\n documentWriter.close();\n if (documentWriter.scrollingElement) {\n documentWriter.scrollingElement.scrollTop = 0;\n }\n};\n\nconst currentResultAlreadyWrittenToDocument = (\n documentWriter: Document,\n uniqueIdentifier: string\n) => {\n const currentDocIdentifier = documentWriter.getElementById(\n documentIdentifierInIframe\n );\n\n return (\n currentDocIdentifier &&\n currentDocIdentifier.textContent === uniqueIdentifier\n );\n};\n\nconst ensureSameResultIsNotOverwritten = (\n documentWriter: Document,\n uniqueIdentifier: string\n) => {\n const docIdentifier = documentWriter.createElement('div');\n docIdentifier.style.display = 'none';\n docIdentifier.setAttribute('aria-hidden', 'true');\n docIdentifier.id = documentIdentifierInIframe;\n docIdentifier.textContent = uniqueIdentifier;\n documentWriter.body.appendChild(docIdentifier);\n};\n\nconst warnAboutLimitedUsageQuickview = (logger?: SearchEngine['logger']) => {\n logger?.warn(\n 'Quickview initialized in restricted mode due to incompatible sandboxing environment. Keywords hit navigation will be disabled.'\n );\n};\n\nexport const QuickviewIframe: FunctionalComponent<{\n title: string;\n content?: string;\n onSetIframeRef: (ref: HTMLIFrameElement) => void;\n uniqueIdentifier?: string;\n sandbox?: string;\n src?: string;\n logger?: SearchEngine['logger'];\n}> = ({title, onSetIframeRef, uniqueIdentifier, content, sandbox, src, logger}) => {\n // When a document is written with document.open/document.write/document.close\n // it is not synchronous and the content of the iframe is only available to be queried at the end of the current call stack.\n // This add a \"wait\" (setTimeout 0) before calling the `onSetIframeRef` from the parent modal quickview\n const waitForIframeContentToBeWritten = () => {\n return new Promise((resolve) => setTimeout(resolve));\n };\n\n return (\n <iframe\n title={title}\n src=\"about:blank\"\n class=\"h-full w-full\"\n sandbox={sandbox}\n ref={async (el) => {\n const iframeRef = el as HTMLIFrameElement;\n\n if (!uniqueIdentifier || !content) {\n return;\n }\n\n const documentWriter = iframeRef.contentDocument;\n if (!documentWriter) {\n if (src) {\n warnAboutLimitedUsageQuickview(logger);\n iframeRef.src = src;\n }\n\n return;\n }\n if (\n currentResultAlreadyWrittenToDocument(\n documentWriter,\n uniqueIdentifier\n )\n ) {\n return;\n }\n\n writeDocument(documentWriter, content);\n ensureSameResultIsNotOverwritten(documentWriter, uniqueIdentifier);\n\n await waitForIframeContentToBeWritten();\n onSetIframeRef(iframeRef);\n }}\n ></iframe>\n );\n};\n","import type {HighlightKeywords} from '../atomic-quickview-modal/atomic-quickview-modal';\nimport type {QuickviewWordHighlight} from '../quickview-word-highlight/quickview-word-highlight';\n\nexport const buildQuickviewPreviewBar = (\n words: Record<string, QuickviewWordHighlight>,\n highlightKeywords: HighlightKeywords,\n iframe?: HTMLIFrameElement\n) => {\n if (!iframe) {\n return;\n }\n\n const documentWriter = iframe.contentDocument;\n if (!documentWriter) {\n return;\n }\n\n const bar = buildPreviewBar(documentWriter);\n if (highlightKeywords.highlightNone) {\n bar.remove();\n return;\n }\n\n const docHeight = documentWriter.body.scrollHeight;\n Object.values(words).forEach((word) => {\n word.elements.forEach((wordElement) => {\n const previewUnit = buildPreviewUnit(\n documentWriter,\n word,\n wordElement,\n docHeight,\n highlightKeywords\n );\n\n bar.appendChild(previewUnit);\n });\n });\n\n documentWriter.body.appendChild(bar);\n};\n\nconst buildPreviewBar = (documentWriter: Document) => {\n const previewBarId = 'CoveoPreviewBar';\n const bar =\n documentWriter.getElementById(previewBarId) ||\n documentWriter.createElement('div');\n\n bar.id = previewBarId;\n bar.innerHTML = '';\n bar.style.position = 'fixed';\n bar.style.top = '0';\n bar.style.right = '0';\n bar.style.width = '15px';\n bar.style.height = '100%';\n bar.setAttribute('aria-hidden', 'true');\n return bar;\n};\n\nconst buildPreviewUnit = (\n documentWriter: Document,\n word: QuickviewWordHighlight,\n wordElement: HTMLElement,\n docHeight: number,\n highlightKeywords: HighlightKeywords\n) => {\n const previewUnit = documentWriter.createElement('div');\n if (highlightKeywords.keywords[word.text]?.enabled === false) {\n previewUnit.style.display = 'none';\n return previewUnit;\n }\n\n const elementPosition = wordElement.getBoundingClientRect().top;\n\n previewUnit.style.position = 'absolute';\n previewUnit.style.top = `${(elementPosition / docHeight) * 100}%`;\n previewUnit.style.width = '100%';\n previewUnit.style.height = '1px';\n previewUnit.style.border = `1px solid ${word.previewBorderColor}`;\n previewUnit.style.backgroundColor = word.color;\n return previewUnit;\n};\n","export const rgbToHsv = (r: number, g: number, b: number) => {\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n\n let h: number;\n const v = max;\n\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n\n if (max === min) {\n h = 0;\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n default:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {h, s, v};\n};\n\nexport const hsvToRgb = (h: number, s: number, v: number) => {\n let r: number, g: number, b: number;\n\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n default:\n r = v;\n g = p;\n b = q;\n break;\n }\n\n return {\n r: Math.round(r),\n g: Math.round(g),\n b: Math.round(b),\n };\n};\n","import {TermsToHighlight} from '@coveo/headless';\nimport {hsvToRgb, rgbToHsv} from '../../../../utils/color-utils';\n\nexport const HIGHLIGHT_PREFIX = 'CoveoHighlight';\nexport class QuickviewWordHighlight {\n public text: string;\n public indexIdentifier: string;\n public occurrences = 0;\n public color: string;\n public focusedColor: string;\n public previewBorderColor: string;\n public elements: HTMLElement[] = [];\n\n private currentNavigationPosition = -1;\n\n constructor(\n private stemmingInfoFromIndex: TermsToHighlight,\n keywordElementInIframe: HTMLElement\n ) {\n const parsed = this.parseKeywordIdentifier(keywordElementInIframe);\n if (!parsed) {\n throw 'Invalid keyword identifier for quickview';\n }\n\n this.text = this.getText(keywordElementInIframe);\n this.indexIdentifier = `${parsed.keywordIdentifier}`;\n this.color = keywordElementInIframe.style.backgroundColor;\n this.focusedColor = this.computeInvertedColor();\n this.previewBorderColor = this.computeSaturatedColor();\n\n this.addElement(keywordElementInIframe);\n }\n\n public addElement(keywordElementInIframe: HTMLElement) {\n this.occurrences++;\n this.elements.push(keywordElementInIframe);\n }\n\n public navigateForward() {\n this.currentNavigationPosition++;\n if (this.currentNavigationPosition >= this.elements.length) {\n this.currentNavigationPosition = 0;\n }\n this.highlightNavigation();\n this.putElementIntoView();\n return this.elements[this.currentNavigationPosition];\n }\n\n public navigateBackward() {\n this.currentNavigationPosition--;\n if (this.currentNavigationPosition < 0) {\n this.currentNavigationPosition = this.elements.length - 1;\n }\n this.highlightNavigation();\n this.putElementIntoView();\n return this.elements[this.currentNavigationPosition];\n }\n\n private isTaggedWord(element: HTMLElement) {\n return element.nodeName.toLowerCase() === 'coveotaggedword';\n }\n\n private highlightNavigation() {\n const currentElement = this.elements[this.currentNavigationPosition];\n const otherElements = this.elements.filter((el) => el !== currentElement);\n currentElement.style.color = this.color;\n currentElement.style.backgroundColor = this.focusedColor;\n otherElements.forEach((element) => {\n element.style.color = '';\n element.style.backgroundColor = this.color;\n });\n }\n\n private putElementIntoView() {\n const element = this.elements[this.currentNavigationPosition];\n element.scrollIntoView();\n }\n\n private getText(element: HTMLElement) {\n const innerTextOfHTMLElement = this.getHighlightedInnerText(element);\n return this.resolveOriginalTerm(innerTextOfHTMLElement).trim();\n }\n\n private resolveOriginalTerm(highlight: string): string {\n // First try to find either an exact match between the highlight and the original non-stemmed keyword.\n // Otherwise try to find a match between the highlight and the stemming keyword expansions\n // If nothing is found (which should not normally happen...), simply return the highlight keyword as is.\n\n const found = Object.keys(this.stemmingInfoFromIndex).find(\n (originalTerm) => {\n const originalTermMatch =\n originalTerm.toLowerCase() === highlight.toLowerCase();\n if (originalTermMatch) {\n return true;\n }\n const stemmingExpansions = this.stemmingInfoFromIndex[originalTerm];\n if (!stemmingExpansions) {\n return false;\n }\n\n const stemmingExpansionMatch = stemmingExpansions.find(\n (stemmingExpansion) =>\n stemmingExpansion.toLowerCase() === highlight.toLowerCase()\n );\n return stemmingExpansionMatch;\n }\n );\n return found || highlight;\n }\n\n private getHighlightedInnerText(element: HTMLElement): string {\n if (!this.isTaggedWord(element)) {\n return this.getTextOfHTMLElement(element);\n }\n\n const children = Array.from(element.children) as HTMLElement[];\n if (children.length >= 1) {\n return this.getTextOfHTMLElement(children[0]);\n }\n\n return '';\n }\n\n private parseKeywordIdentifier(element: HTMLElement) {\n const parts = element.id\n .substring(HIGHLIGHT_PREFIX.length + 1)\n .match(/^([0-9]+)\\.([0-9]+)\\.([0-9]+)$/);\n\n if (!parts || parts.length <= 3) {\n return null;\n }\n\n return {\n keywordIdentifier: parts[1],\n keywordTermPart: parseInt(parts[3], 10),\n };\n }\n\n private getTextOfHTMLElement(el: HTMLElement) {\n return el.innerText || el.textContent || '';\n }\n\n private computeInvertedColor() {\n const {r, g, b} = this.extractRgb();\n return `rgb(${255 - r}, ${255 - g}, ${255 - b})`;\n }\n\n private computeSaturatedColor() {\n const {r, g, b} = this.extractRgb();\n const {h, s, v} = rgbToHsv(r, g, b);\n let newSaturation = s * 2;\n if (newSaturation > 1) {\n newSaturation = 1;\n }\n const {\n r: rSaturated,\n g: gSaturated,\n b: bSaturated,\n } = hsvToRgb(h, newSaturation, v);\n return `rgb(${rSaturated}, ${gSaturated}, ${bSaturated})`;\n }\n\n private extractRgb() {\n const rgbExtracted = this.color.match(/\\d+/g);\n if (!rgbExtracted) {\n return {r: 255, g: 255, b: 255};\n }\n\n return {\n r: parseInt(rgbExtracted[0], 10),\n g: parseInt(rgbExtracted[1], 10),\n b: parseInt(rgbExtracted[2], 10),\n };\n }\n}\n\nexport const getWordsHighlights = (\n stemmingInfoFromIndex: TermsToHighlight,\n iframe?: HTMLIFrameElement\n) => {\n const wordsHighlights: Record<string, QuickviewWordHighlight> = {};\n if (!iframe) {\n return wordsHighlights;\n }\n\n iframe.contentDocument?.body\n .querySelectorAll(`[id^=\"${HIGHLIGHT_PREFIX}\"]`)\n .forEach((el) => {\n const wordHTMLElementToHighlight = el as HTMLElement;\n\n const wordHighlight = new QuickviewWordHighlight(\n stemmingInfoFromIndex,\n wordHTMLElementToHighlight\n );\n\n if (!wordHighlight.text) {\n return;\n }\n\n const alreadyScannedKeyword =\n wordsHighlights[wordHighlight.indexIdentifier];\n\n if (alreadyScannedKeyword) {\n alreadyScannedKeyword.addElement(wordHTMLElementToHighlight);\n } else {\n wordsHighlights[wordHighlight.indexIdentifier] = wordHighlight;\n }\n });\n\n return wordsHighlights;\n};\n","@import '../../../../global/global.pcss';\n@reference '../../../../utils/tailwind-utilities/link-style.css';\n\n.atomic-quickview-modal {\n &::part(backdrop) {\n grid-template-columns: 1fr max(80vw, 30rem) 1fr;\n }\n &::part(body),\n &::part(header),\n &::part(footer) {\n @apply max-w-full;\n }\n\n &::part(footer) {\n @apply flex justify-center;\n }\n\n &::part(body-wrapper) {\n @apply h-full overflow-hidden p-0;\n }\n\n &::part(body) {\n @apply h-full;\n }\n\n &::part(backdrop) {\n grid-template-rows: 1fr 100% 3fr;\n }\n\n &::part(header-wrapper) {\n @apply bg-neutral-light;\n }\n\n a {\n @apply link-style;\n }\n}\n","import {\n buildInteractiveResult,\n Result,\n InteractiveResult,\n TermsToHighlight,\n} from '@coveo/headless';\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Watch,\n Method,\n VNode,\n Fragment,\n} from '@stencil/core';\nimport CloseIcon from '../../../../images/close.svg';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {ATOMIC_MODAL_EXPORT_PARTS} from '../../../common/atomic-modal/export-parts';\nimport {IconButton} from '../../../common/stencil-iconButton';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Button} from '../../../common/stencil-button';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {QuickviewSidebar} from '../atomic-quickview-sidebar/atomic-quickview-sidebar';\nimport {QuickviewIframe} from '../quickview-iframe/quickview-iframe';\nimport {buildQuickviewPreviewBar} from '../quickview-preview-bar/quickview-preview-bar';\nimport {\n getWordsHighlights,\n HIGHLIGHT_PREFIX,\n QuickviewWordHighlight,\n} from '../quickview-word-highlight/quickview-word-highlight';\n\nexport interface HighlightKeywords {\n highlightNone: boolean;\n keywords: {\n [text: string]: {\n indexIdentifier: string;\n enabled: boolean;\n };\n };\n}\n\n/**\n * The modal opened when clicking on a quickview button.\n * Do not use this component directly; use `atomic-quickview` instead.\n *\n * @part backdrop - The transparent backdrop hiding the content behind the modal.\n * @part container - The modal's outermost container with the outline and background.\n * @part header-wrapper - The wrapper around the header.\n * @part header - The header at the top of the modal.\n * @part header-ruler - The horizontal ruler underneath the header.\n * @part body-wrapper - The wrapper around the body.\n * @part body - The body of the modal, between the header and the footer.\n * @part footer-wrapper - The wrapper with a shadow or background color around the footer.\n * @part footer - The footer at the bottom of the modal.\n * @part quickview-modal-header-icon - The close icon of the modal.\n * @part quickview-modal-header-title - The title of the modal.\n */\n@Component({\n tag: 'atomic-quickview-modal',\n styleUrl: 'atomic-quickview-modal.pcss',\n shadow: true,\n})\nexport class AtomicQuickviewModal implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @State() public error!: Error;\n\n @State() private highlightKeywords: HighlightKeywords = {\n highlightNone: false,\n keywords: {},\n };\n @Watch('highlightKeywords')\n watchHighlightKeywords() {\n this.handleHighlightsScripts();\n }\n\n @Event({eventName: 'atomic/quickview/next'}) nextQuickview?: EventEmitter;\n @Event({eventName: 'atomic/quickview/previous'})\n previousQuickview?: EventEmitter;\n\n @State() private minimizeSidebar = false;\n @State() private words: Record<string, QuickviewWordHighlight> = {};\n private iframeRef?: HTMLIFrameElement;\n\n @Prop({mutable: true, reflect: false}) content?: string;\n @Prop({mutable: true, reflect: false}) result?: Result;\n @Prop() current?: number;\n @Prop() total?: number;\n @Prop() sandbox?: string;\n @Prop() modalCloseCallback?: () => void;\n\n private interactiveResult?: InteractiveResult;\n\n public componentWillLoad(): void {\n this.minimizeSidebar = this.bindings.store.isMobile();\n }\n\n @Method()\n public async reset() {\n this.highlightKeywords = {\n highlightNone: false,\n keywords: {},\n };\n this.minimizeSidebar = false;\n this.iframeRef = undefined;\n this.content = undefined;\n this.result = undefined;\n this.interactiveResult = undefined;\n }\n\n private renderHeader() {\n let headerContent: VNode | null = null;\n if (this.result) {\n this.interactiveResult = buildInteractiveResult(this.bindings.engine, {\n options: {result: this.result},\n });\n headerContent = (\n <Fragment>\n <LinkWithItemAnalytics\n href={this.result?.clickUri}\n onSelect={() => this.interactiveResult?.select()}\n onBeginDelayedSelect={() =>\n this.interactiveResult?.beginDelayedSelect()\n }\n onCancelPendingSelect={() =>\n this.interactiveResult?.cancelPendingSelect()\n }\n className=\"truncate\"\n part=\"quickview-modal-header-title\"\n >\n {this.result.title}\n </LinkWithItemAnalytics>\n <IconButton\n partPrefix=\"quickview-modal-header\"\n icon={CloseIcon}\n onClick={() => this.onClose()}\n ariaLabel={this.bindings.i18n.t('close')}\n style=\"text-transparent\"\n title={this.bindings.i18n.t('close')}\n />\n </Fragment>\n );\n }\n return (\n <div slot=\"header\" class=\"flex w-full items-center justify-between\">\n {headerContent}\n </div>\n );\n }\n\n private renderBody() {\n return (\n <div slot=\"body\" class=\"grid h-full grid-cols-[min-content_auto]\">\n <div\n class=\"h-full overflow-y-auto\"\n style={{backgroundColor: 'var(--atomic-neutral-light)'}}\n >\n <QuickviewSidebar\n words={this.words}\n i18n={this.bindings.i18n}\n highlightKeywords={this.highlightKeywords}\n onHighlightKeywords={(highlight) =>\n (this.highlightKeywords = highlight)\n }\n minimized={this.minimizeSidebar}\n onMinimize={(minimize) => (this.minimizeSidebar = minimize)}\n />\n </div>\n <div class=\"relative overflow-auto\">\n <QuickviewIframe\n title={this.result?.title ?? this.bindings.i18n.t('preview-modal-title')} \n logger={this.logger}\n src={this.quickviewSrc}\n sandbox={this.sandbox}\n uniqueIdentifier={this.quickviewUniqueIdentifier}\n content={this.content}\n onSetIframeRef={async (ref) => {\n this.iframeRef = ref;\n this.words = getWordsHighlights(\n this.termsToHighlight,\n this.iframeRef\n );\n this.handleHighlightsScripts();\n }}\n />\n {buildQuickviewPreviewBar(\n this.words,\n this.highlightKeywords,\n this.iframeRef\n )}\n </div>\n </div>\n );\n }\n\n private renderFooter() {\n return (\n <div slot=\"footer\" class=\"flex items-center gap-2\">\n <Button\n class=\"p-2\"\n style=\"square-neutral\"\n onClick={() => this.previousQuickview?.emit()}\n disabled={this.current === 1}\n text={this.bindings.i18n.t('quickview-previous')}\n ></Button>\n <p class=\"text-center\">\n {this.bindings.i18n.t('showing-results-of', {\n first: this.current,\n total: this.total,\n })}\n </p>\n <Button\n class=\"p-2\"\n style=\"square-neutral\"\n onClick={() => this.nextQuickview?.emit()}\n disabled={this.current === this.total}\n text={this.bindings.i18n.t('quickview-next')}\n ></Button>\n </div>\n );\n }\n\n private onClose() {\n this.content = undefined;\n this.result = undefined;\n this.modalCloseCallback && this.modalCloseCallback();\n }\n\n private get isOpen() {\n return !!this.content && !!this.result;\n }\n\n private get highlightScriptId() {\n return 'CoveoDisableHighlightStyle';\n }\n\n private get logger() {\n return this.bindings.engine.logger;\n }\n\n private get quickviewSrc() {\n return this.bindings.engine.state.resultPreview?.contentURL;\n }\n\n private enableHighlights() {\n this.removeDisableHighlightScript();\n }\n\n private enableHighlightsSpecificKeyword(identifier: string) {\n this.removeDisableHighlightScript(identifier);\n }\n\n private disableHighlights() {\n this.createDisableHighlightScript();\n }\n\n private disableHighlightsSpecificKeyword(identifier: string) {\n this.createDisableHighlightScript(identifier);\n }\n\n private removeDisableHighlightScript(identifier?: string) {\n const doc = this.iframeRef?.contentWindow?.document;\n if (!doc) {\n return;\n }\n doc\n .getElementById(\n `${this.highlightScriptId}${identifier ? `:${identifier}` : ''}`\n )\n ?.remove();\n }\n\n private createDisableHighlightScript(identifier?: string) {\n const doc = this.iframeRef?.contentWindow?.document;\n if (!doc) {\n return;\n }\n\n const head = doc.head;\n const scriptId = `${this.highlightScriptId}${\n identifier ? `:${identifier}` : ''\n }`;\n const style =\n doc.getElementById(scriptId) || this.bindings.createStyleElement();\n style.setAttribute('id', scriptId);\n head.appendChild(style);\n style.appendChild(\n doc.createTextNode(`[id^=\"${HIGHLIGHT_PREFIX}${\n identifier ? `:${identifier}` : ''\n }\"] {\n background-color: inherit !important;\n color: inherit !important;\n }`)\n );\n }\n\n private get termsToHighlight() {\n const flatPhrasesToHighlight: TermsToHighlight = {};\n\n const phrasesToHighlight =\n this.bindings.engine.state.search.response.phrasesToHighlight;\n\n Object.entries(phrasesToHighlight).forEach(([phrase, keywords]) => {\n flatPhrasesToHighlight[phrase] = Object.entries(keywords).flatMap(\n ([keywordEntry, keywordStemming]) => {\n return [keywordEntry, ...keywordStemming];\n }\n );\n });\n\n return {\n ...this.bindings.engine.state.search.response.termsToHighlight,\n ...flatPhrasesToHighlight,\n };\n }\n\n private get requestId() {\n return this.bindings.engine.state.search.requestId;\n }\n\n private get quickviewUniqueIdentifier() {\n return this.result?.uniqueId + this.requestId;\n }\n\n private handleHighlightsScripts() {\n if (!this.highlightKeywords.highlightNone) {\n this.enableHighlights();\n } else {\n this.disableHighlights();\n }\n Object.values(this.highlightKeywords.keywords).forEach((word) => {\n if (word.enabled) {\n this.enableHighlightsSpecificKeyword(word.indexIdentifier);\n } else {\n this.disableHighlightsSpecificKeyword(word.indexIdentifier);\n }\n });\n }\n\n public render() {\n return (\n <atomic-modal\n fullscreen={this.bindings.store.isMobile()}\n class={'atomic-quickview-modal'}\n isOpen={this.isOpen}\n close={() => this.onClose()}\n exportparts={ATOMIC_MODAL_EXPORT_PARTS}\n >\n {this.renderHeader()}\n {this.renderBody()}\n {this.renderFooter()}\n </atomic-modal>\n );\n }\n}\n"],"version":3}
|
@@ -106,7 +106,7 @@ const AtomicQuickview$1 = /*@__PURE__*/ proxyCustomElement(class AtomicQuickview
|
|
106
106
|
}
|
107
107
|
render() {
|
108
108
|
if (this.quickviewState.resultHasPreview) {
|
109
|
-
return (h(Button, { key: '
|
109
|
+
return (h(Button, { key: 'ec6c644d9d557133df40428ccacddcb3d035c9fd', part: "button", title: this.bindings.i18n.t('quickview'), style: "outline-primary", class: "p-2", onClick: (event) => this.onClick(event), ref: this.focusTarget.setTarget }, h("atomic-icon", { key: 'fa4444026db63add82d7906e9fc0636c3a94e0d8', part: "icon", class: "flex w-5 justify-center", icon: QuickviewIcon })));
|
110
110
|
}
|
111
111
|
}
|
112
112
|
static get style() { return AtomicQuickviewStyle0; }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
2
2
|
import { M as MapProp } from './props-utils.js';
|
3
|
-
import { R as ResultTemplateCommon, a as makeDefinedConditions, m as makeMatchConditions } from './result-template-common.js';
|
3
|
+
import { R as ResultTemplateCommon, a as makeDefinedConditions, m as makeMatchConditions } from './stencil-result-template-common.js';
|
4
4
|
|
5
5
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-recs-result-template.js","mappings":";;;;;;;;;;;;;;MAyBaA,0BAAwB;IAmDnC;;;;QA7CO,oBAAe,GAAkC,EAAE,CAAC;;;;;;;;QAS5C,eAAU,GAAkC,EAAE,CAAC;;;;;;QAqBjB,cAAS,GAGlD,EAAE,CAAC;;;;;;QAOsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlCoD,EAAE;;;yBAwBzD,EAAE;4BAUF,EAAE;KAEU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;YAC1D,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;KACJ;IAEM,iBAAiB;QACtB,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;AA9C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;6DAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;gEAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicRecsResultTemplate"],"sources":["src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.tsx"],"sourcesContent":["import {\n ResultTemplateCondition as RecsResultTemplateCondition,\n ResultTemplate as RecsResultTemplate,\n} from '@coveo/headless/recommendation';\nimport {Component, Element, Prop, Method, State} from '@stencil/core';\nimport {MapProp} from '../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../common/result-templates/result-template-common';\n\n/**\n * A [result template](https://docs.coveo.com/en/atomic/latest/usage/displaying-results#defining-a-result-template) determines the format of the query results, depending on the conditions that are defined for each template.\n *\n * A `template` element must be the child of an `atomic-recs-result-template`, and an `atomic-recs-list` must be the parent of each `atomic-recs-result-template`.\n *\n * **Note:** Any `<script>` tags that are defined inside a `<template>` element will not be executed when the results are being rendered.\n * @MapProp name: mustMatch;attr: must-match;docs: The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`;type: Record<string, string[]> ;default: {}\n * @MapProp name: mustNotMatch;attr: must-not-match;docs: The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\";type: Record<string, string[]> ;default: {}\n */\n@Component({\n tag: 'atomic-recs-result-template',\n shadow: true,\n})\nexport class AtomicRecsResultTemplate {\n private resultTemplateCommon!: ResultTemplateCommon;\n\n @State() public error!: Error;\n\n @Element() public host!: HTMLDivElement;\n public matchConditions: RecsResultTemplateCondition[] = [];\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: RecsResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-recs-list', 'atomic-ipx-recs-list'],\n allowEmpty: true,\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on the conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<RecsResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
1
|
+
{"file":"atomic-recs-result-template.js","mappings":";;;;;;;;;;;;;;MAyBaA,0BAAwB;IAmDnC;;;;QA7CO,oBAAe,GAAkC,EAAE,CAAC;;;;;;;;QAS5C,eAAU,GAAkC,EAAE,CAAC;;;;;;QAqBjB,cAAS,GAGlD,EAAE,CAAC;;;;;;QAOsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlCoD,EAAE;;;yBAwBzD,EAAE;4BAUF,EAAE;KAEU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;YAC1D,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;KACJ;IAEM,iBAAiB;QACtB,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;AA9C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;6DAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;gEAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicRecsResultTemplate"],"sources":["src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.tsx"],"sourcesContent":["import {\n ResultTemplateCondition as RecsResultTemplateCondition,\n ResultTemplate as RecsResultTemplate,\n} from '@coveo/headless/recommendation';\nimport {Component, Element, Prop, Method, State} from '@stencil/core';\nimport {MapProp} from '../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../common/result-templates/stencil-result-template-common';\n\n/**\n * A [result template](https://docs.coveo.com/en/atomic/latest/usage/displaying-results#defining-a-result-template) determines the format of the query results, depending on the conditions that are defined for each template.\n *\n * A `template` element must be the child of an `atomic-recs-result-template`, and an `atomic-recs-list` must be the parent of each `atomic-recs-result-template`.\n *\n * **Note:** Any `<script>` tags that are defined inside a `<template>` element will not be executed when the results are being rendered.\n * @MapProp name: mustMatch;attr: must-match;docs: The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`;type: Record<string, string[]> ;default: {}\n * @MapProp name: mustNotMatch;attr: must-not-match;docs: The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\";type: Record<string, string[]> ;default: {}\n */\n@Component({\n tag: 'atomic-recs-result-template',\n shadow: true,\n})\nexport class AtomicRecsResultTemplate {\n private resultTemplateCommon!: ResultTemplateCommon;\n\n @State() public error!: Error;\n\n @Element() public host!: HTMLDivElement;\n public matchConditions: RecsResultTemplateCondition[] = [];\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: RecsResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-recs-list', 'atomic-ipx-recs-list'],\n allowEmpty: true,\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on the conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<RecsResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
2
2
|
import { M as MapProp } from './props-utils.js';
|
3
|
-
import { R as ResultTemplateCommon, m as makeMatchConditions } from './result-template-common.js';
|
3
|
+
import { R as ResultTemplateCommon, m as makeMatchConditions } from './stencil-result-template-common.js';
|
4
4
|
|
5
5
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-result-children-template.js","mappings":";;;;;;;;;;;;;;MAmBaA,8BAA4B;IAkCvC;;;;;;;;;;;QAtBe,eAAU,GAA8B,EAAE,CAAC;;;;;QAMb,cAAS,GAGlD,EAAE,CAAC;;;;;QAMsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlBgD,EAAE;yBASrD,EAAE;4BASF,EAAE;KAIU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE,CAAC,wBAAwB,CAAC;SACzC,CAAC,CAAC;KACJ;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,iBAAiB;QACtB,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;AA7C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;iEAG9B;AAMsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;oEAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicResultChildrenTemplate"],"sources":["src/components/search/result-templates/atomic-result-children-template/atomic-result-children-template.tsx"],"sourcesContent":["import {ResultTemplate, ResultTemplateCondition} from '@coveo/headless';\nimport {Component, Element, Prop, State, Method} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/result-template-common';\n\n/**\n * The `atomic-result-children-template` component determines the format of the child results, depending on the conditions that are defined for each template. A `template` element must be the child of an `atomic-result-children-template`, and an `atomic-result-children` must be the parent of each `atomic-result-children-template`.\n *\n * Note: Any `<script>` tags defined inside of a `<template>` element will not be executed when results are being rendered.\n * @MapProp name: mustMatch;attr: must-match;docs: The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`;type: Record<string, string[]> ;default: {}\n * @MapProp name: mustNotMatch;attr: must-not-match;docs: The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\";type: Record<string, string[]> ;default: {}\n */\n@Component({\n tag: 'atomic-result-children-template',\n shadow: true,\n})\nexport class AtomicResultChildrenTemplate {\n @Element() public host!: HTMLDivElement;\n\n @State() public error!: Error;\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: ResultTemplateCondition[] = [];\n\n /**\n * Verifies whether the specified fields match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * Verifies whether the specified fields do not match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n public resultTemplateCommon!: ResultTemplateCommon;\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-result-children'],\n });\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<ResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public componentWillLoad() {\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
1
|
+
{"file":"atomic-result-children-template.js","mappings":";;;;;;;;;;;;;;MAmBaA,8BAA4B;IAkCvC;;;;;;;;;;;QAtBe,eAAU,GAA8B,EAAE,CAAC;;;;;QAMb,cAAS,GAGlD,EAAE,CAAC;;;;;QAMsC,iBAAY,GAGrD,EAAE,CAAC;;0BAlBgD,EAAE;yBASrD,EAAE;4BASF,EAAE;KAIU;IAEhB,iBAAiB;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,CAAC,GAAG;gBACZ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;aAClB;YACD,YAAY,EAAE,CAAC,wBAAwB,CAAC;SACzC,CAAC,CAAC;KACJ;;;;IAMM,MAAM,WAAW;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3E;IAEM,iBAAiB;QACtB,IAAI,CAAC,oBAAoB,CAAC,eAAe,GAAG,mBAAmB,CAC7D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;KACH;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;AA7C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;iEAG9B;AAMsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;oEAG9B;;;;;;;;;;;;;;;;;;;;","names":["AtomicResultChildrenTemplate"],"sources":["src/components/search/result-templates/atomic-result-children-template/atomic-result-children-template.tsx"],"sourcesContent":["import {ResultTemplate, ResultTemplateCondition} from '@coveo/headless';\nimport {Component, Element, Prop, State, Method} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/stencil-result-template-common';\n\n/**\n * The `atomic-result-children-template` component determines the format of the child results, depending on the conditions that are defined for each template. A `template` element must be the child of an `atomic-result-children-template`, and an `atomic-result-children` must be the parent of each `atomic-result-children-template`.\n *\n * Note: Any `<script>` tags defined inside of a `<template>` element will not be executed when results are being rendered.\n * @MapProp name: mustMatch;attr: must-match;docs: The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`;type: Record<string, string[]> ;default: {}\n * @MapProp name: mustNotMatch;attr: must-not-match;docs: The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\";type: Record<string, string[]> ;default: {}\n */\n@Component({\n tag: 'atomic-result-children-template',\n shadow: true,\n})\nexport class AtomicResultChildrenTemplate {\n @Element() public host!: HTMLDivElement;\n\n @State() public error!: Error;\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: ResultTemplateCondition[] = [];\n\n /**\n * Verifies whether the specified fields match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * Verifies whether the specified fields do not match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n public resultTemplateCommon!: ResultTemplateCommon;\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-result-children'],\n });\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<ResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public componentWillLoad() {\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}
|
@@ -138,7 +138,7 @@ const AtomicResultChildren$1 = /*@__PURE__*/ proxyCustomElement(class AtomicResu
|
|
138
138
|
return (h(ChildrenWrapper, { hasChildren: children.length > 0 }, children.map((child, i) => this.renderChild(child, i === children.length - 1))));
|
139
139
|
}
|
140
140
|
render() {
|
141
|
-
return (h(ResultChildrenGuard, { key: '
|
141
|
+
return (h(ResultChildrenGuard, { key: 'eb224dfff016980d3d7aa281e6a87c3172286c78', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
|
142
142
|
}
|
143
143
|
get host() { return this; }
|
144
144
|
static get style() { return AtomicResultChildrenStyle0; }
|
@@ -98,7 +98,7 @@ const AtomicResultFieldsList$1 = /*@__PURE__*/ proxyCustomElement(class AtomicRe
|
|
98
98
|
}
|
99
99
|
}
|
100
100
|
render() {
|
101
|
-
return h(Host, { key: '
|
101
|
+
return h(Host, { key: '936654b1f7aa4fd793eecd6fb508e14b8c764bb0' });
|
102
102
|
}
|
103
103
|
get host() { return this; }
|
104
104
|
static get style() { return AtomicResultFieldsListStyle0; }
|
@@ -43,7 +43,7 @@ const AtomicResultLink$1 = /*@__PURE__*/ proxyCustomElement(class AtomicResultLi
|
|
43
43
|
const href = isUndefined(this.hrefTemplate)
|
44
44
|
? this.result.clickUri
|
45
45
|
: buildStringTemplateFromResult(this.hrefTemplate, this.result, this.bindings);
|
46
|
-
return (h(LinkWithItemAnalytics, { key: '
|
46
|
+
return (h(LinkWithItemAnalytics, { key: '822263a18da861e80557adf11226427663627b8f', href: href, onSelect: () => this.interactiveResult.select(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
|
47
47
|
}
|
48
48
|
get host() { return this; }
|
49
49
|
static get style() { return AtomicResultLinkStyle0; }
|
@@ -194,7 +194,7 @@ const AtomicResultList$1 = /*@__PURE__*/ proxyCustomElement(class AtomicResultLi
|
|
194
194
|
render() {
|
195
195
|
this.resultListCommon.updateBreakpoints();
|
196
196
|
const listClasses = this.computeListDisplayClasses();
|
197
|
-
return (h(TabGuard, { key: '
|
197
|
+
return (h(TabGuard, { key: 'c8b1ca9302ce0e9cfd5114067cb686fa27b6206f', tabsIncluded: this.tabsIncluded, tabsExcluded: this.tabsExcluded, activeTab: this.tabManagerState.activeTab }, h(ItemListGuard, { key: 'b6db922875d6156b42e0060ad2218bb82f9ed196', hasError: this.resultListState.hasError, hasTemplate: this.resultTemplateRegistered, templateHasError: this.itemTemplateProvider.hasError, firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, h(DisplayWrapper, { key: '03ee6cd85a8bc9e94005082b24b42fb5ca893907', display: this.display, listClasses: listClasses }, h(ResultsPlaceholdersGuard, { key: 'b6a6020f7e40bddb2365c6ca6ef3ee67c5598758', density: this.density, display: this.display, imageSize: this.imageSize, displayPlaceholders: !this.isAppLoaded, numberOfPlaceholders: this.resultsPerPageState.numberOfResults }), h(ItemDisplayGuard, { key: 'dea4c3d009fb28a556b81ba8d2fba8be5e02ed49', firstRequestExecuted: this.resultListState.firstSearchExecuted, hasItems: this.resultListState.hasResults }, this.display === 'table'
|
198
198
|
? this.renderAsTable()
|
199
199
|
: this.display === 'grid'
|
200
200
|
? this.renderAsGrid()
|