@coveo/atomic 3.60.1 → 3.60.3
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/custom-elements.json +1812 -1733
- package/dist/cjs/components/commerce/atomic-commerce-facet-number-input/atomic-commerce-facet-number-input.cjs +2 -6
- package/dist/cjs/components/commerce/atomic-commerce-facets/atomic-commerce-facets.cjs +1 -3
- package/dist/cjs/components/commerce/atomic-commerce-layout/atomic-commerce-layout.tw.css.cjs +3 -11
- package/dist/cjs/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.cjs +1 -2
- package/dist/cjs/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.cjs +3 -12
- package/dist/cjs/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.cjs +10 -10
- package/dist/cjs/components/commerce/atomic-commerce-timeframe-facet/atomic-commerce-timeframe-facet.cjs +4 -4
- package/dist/cjs/components/commerce/atomic-product-children/atomic-product-children.cjs +1 -3
- package/dist/cjs/components/commerce/atomic-product-description/atomic-product-description.cjs +1 -3
- package/dist/cjs/components/commerce/atomic-product-link/atomic-product-link.cjs +1 -4
- package/dist/cjs/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.cjs +2 -7
- package/dist/cjs/components/commerce/atomic-product-rating/atomic-product-rating.cjs +1 -3
- package/dist/cjs/components/common/atomic-agent-stream-of-thought/atomic-agent-stream-of-thought.cjs +2 -6
- package/dist/cjs/components/common/atomic-aria-live/atomic-aria-live.cjs +35 -5
- package/dist/cjs/components/common/atomic-ask-follow-up-input/atomic-ask-follow-up-input.cjs +1 -6
- package/dist/cjs/components/common/atomic-citation/atomic-citation.cjs +4 -6
- package/dist/cjs/components/common/atomic-facet-date-input/atomic-facet-date-input.cjs +2 -10
- package/dist/cjs/components/common/atomic-facet-number-input/atomic-facet-number-input.cjs +2 -10
- package/dist/cjs/components/common/atomic-facet-placeholder/atomic-facet-placeholder.cjs +1 -5
- package/dist/cjs/components/common/atomic-generated-answer-feedback-modal/atomic-generated-answer-feedback-modal.cjs +23 -35
- package/dist/cjs/components/common/atomic-generated-answer-thread/atomic-generated-answer-thread.cjs +17 -17
- package/dist/cjs/components/common/atomic-generated-answer-thread-item/atomic-generated-answer-thread-item.cjs +49 -45
- package/dist/cjs/components/common/atomic-rating/rating.cjs +2 -5
- package/dist/cjs/components/common/atomic-result-placeholder/atomic-result-placeholder.cjs +2 -9
- package/dist/cjs/components/common/atomic-smart-snippet-collapse-wrapper/atomic-smart-snippet-collapse-wrapper.cjs +2 -11
- package/dist/cjs/components/common/atomic-smart-snippet-expandable-answer/atomic-smart-snippet-expandable-answer.cjs +1 -4
- package/dist/cjs/components/common/atomic-smart-snippet-expandable-answer/atomic-smart-snippet-expandable-answer.tw.css.cjs +2 -11
- package/dist/cjs/components/common/atomic-smart-snippet-source/atomic-smart-snippet-source.cjs +1 -4
- package/dist/cjs/components/common/atomic-tab-button/atomic-tab-button.cjs +1 -4
- package/dist/cjs/components/common/atomic-tab-popover/atomic-tab-popover.cjs +1 -3
- package/dist/cjs/components/common/breadbox/breadcrumb-content.cjs +1 -5
- package/dist/cjs/components/common/button.cjs +1 -2
- package/dist/cjs/components/common/carousel.cjs +1 -3
- package/dist/cjs/components/common/expandable-text/expandable-text.cjs +2 -9
- package/dist/cjs/components/common/facets/category-facet/all-categories-button.cjs +1 -5
- package/dist/cjs/components/common/facets/category-facet/parent-button.cjs +1 -5
- package/dist/cjs/components/common/facets/category-facet/search-value.cjs +1 -3
- package/dist/cjs/components/common/facets/facet-container/facet-container.cjs +2 -7
- package/dist/cjs/components/common/facets/facet-placeholder/facet-placeholder.cjs +1 -4
- package/dist/cjs/components/common/facets/facet-search/facet-search-input.cjs +1 -4
- package/dist/cjs/components/common/facets/facet-value-box/facet-value-box.tw.css.cjs +1 -4
- package/dist/cjs/components/common/generated-answer/generated-answer-controller.cjs +12 -2
- package/dist/cjs/components/common/generated-answer/generated-content/generated-markdown-content.cjs +1 -4
- package/dist/cjs/components/common/generated-answer/generated-content/generated-markdown-content.tw.css.cjs +4 -16
- package/dist/cjs/components/common/generated-answer/generated-content/markdown-utils.cjs +80 -3
- package/dist/cjs/components/common/generated-answer/render-conversation-debug-header.cjs +3 -8
- package/dist/cjs/components/common/generated-answer/render-generating-answer-label.cjs +1 -4
- package/dist/cjs/components/common/generated-answer/source-citations.cjs +2 -6
- package/dist/cjs/components/common/image-carousel/image-carousel.cjs +2 -8
- package/dist/cjs/components/common/item-list/display-wrapper.cjs +1 -3
- package/dist/cjs/components/common/item-list/table-layout.cjs +2 -8
- package/dist/cjs/components/common/items-per-page/choices.cjs +1 -6
- package/dist/cjs/components/common/items-per-page/label.cjs +8 -8
- package/dist/cjs/components/common/load-more/container.cjs +1 -3
- package/dist/cjs/components/common/load-more/summary.cjs +1 -3
- package/dist/cjs/components/common/no-items/container.cjs +3 -5
- package/dist/cjs/components/common/no-items/no-items.cjs +1 -6
- package/dist/cjs/components/common/query-error/link.cjs +1 -5
- package/dist/cjs/components/common/query-summary/container.cjs +1 -3
- package/dist/cjs/components/common/refine-modal/filters.cjs +1 -4
- package/dist/cjs/components/common/refine-modal/modal.cjs +1 -5
- package/dist/cjs/components/common/refine-modal/sort.cjs +2 -9
- package/dist/cjs/components/common/result-children/children-wrapper.cjs +3 -4
- package/dist/cjs/components/common/result-children/collection-guard.cjs +1 -3
- package/dist/cjs/components/common/search-box/search-box-wrapper.cjs +1 -5
- package/dist/cjs/components/common/search-box/submit-button.cjs +2 -9
- package/dist/cjs/components/common/search-box/text-area-clear-button.cjs +1 -5
- package/dist/cjs/components/common/smart-snippets/atomic-smart-snippet/snippet-footer.cjs +1 -4
- package/dist/cjs/components/common/smart-snippets/atomic-smart-snippet-feedback-modal/modal-body.cjs +1 -7
- package/dist/cjs/components/common/smart-snippets/atomic-smart-snippet-feedback-modal/modal-details.cjs +1 -4
- package/dist/cjs/components/common/smart-snippets/atomic-smart-snippet-suggestions/answer-and-source-wrapper.cjs +1 -5
- package/dist/cjs/components/common/smart-snippets/atomic-smart-snippet-suggestions/footer.cjs +1 -4
- package/dist/cjs/components/common/smart-snippets/smart-snippet-feedback-banner.cjs +1 -4
- package/dist/cjs/components/common/sort/label.cjs +1 -5
- package/dist/cjs/components/common/sort/option.cjs +1 -3
- package/dist/cjs/components/common/suggestions/query-suggestions.cjs +1 -4
- package/dist/cjs/components/common/suggestions/recent-queries.cjs +3 -11
- package/dist/cjs/components/insight/atomic-insight-facet/atomic-insight-facet.cjs +2 -7
- package/dist/cjs/components/insight/atomic-insight-folded-result-list/atomic-insight-folded-result-list.cjs +11 -11
- package/dist/cjs/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.cjs +9 -2
- package/dist/cjs/components/insight/atomic-insight-no-results/atomic-insight-no-results.cjs +1 -2
- package/dist/cjs/components/insight/atomic-insight-result/atomic-insight-result.cjs +1 -3
- package/dist/cjs/components/insight/atomic-insight-user-actions-modal/atomic-insight-user-actions-modal.cjs +2 -8
- package/dist/cjs/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.cjs +2 -8
- package/dist/cjs/components/insight/atomic-insight-user-actions-session/user-action.cjs +2 -6
- package/dist/cjs/components/insight/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.cjs +1 -3
- package/dist/cjs/components/ipx/atomic-ipx-body/ipx-body.cjs +2 -7
- package/dist/cjs/components/ipx/atomic-ipx-button/atomic-ipx-button.cjs +3 -11
- package/dist/cjs/components/ipx/atomic-ipx-recs-list/atomic-ipx-recs-list.cjs +2 -8
- package/dist/cjs/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.cjs +1 -4
- package/dist/cjs/components/recommendations/atomic-recs-list/atomic-recs-list.cjs +1 -4
- package/dist/cjs/components/search/atomic-automatic-facet/atomic-automatic-facet.cjs +1 -2
- package/dist/cjs/components/search/atomic-automatic-facet-generator/atomic-automatic-facet-generator.cjs +8 -8
- package/dist/cjs/components/search/atomic-category-facet/atomic-category-facet.cjs +2 -4
- package/dist/cjs/components/search/atomic-color-facet/atomic-color-facet.cjs +2 -7
- package/dist/cjs/components/search/atomic-facet/atomic-facet.cjs +1 -3
- package/dist/cjs/components/search/atomic-folded-result-list/atomic-folded-result-list.cjs +12 -12
- package/dist/cjs/components/search/atomic-generated-answer/atomic-generated-answer.cjs +9 -2
- package/dist/cjs/components/search/atomic-no-results/atomic-no-results.cjs +2 -2
- package/dist/cjs/components/search/atomic-notifications/atomic-notifications.cjs +1 -3
- package/dist/cjs/components/search/atomic-popover/atomic-popover.cjs +1 -7
- package/dist/cjs/components/search/atomic-quickview-modal/atomic-quickview-modal.cjs +1 -4
- package/dist/cjs/components/search/atomic-rating-facet/atomic-rating-facet.cjs +1 -2
- package/dist/cjs/components/search/atomic-rating-range-facet/atomic-rating-range-facet.cjs +1 -1
- package/dist/cjs/components/search/atomic-relevance-inspector/atomic-relevance-inspector.cjs +1 -3
- package/dist/cjs/components/search/atomic-result/atomic-result.cjs +1 -3
- package/dist/cjs/components/search/atomic-result-badge/atomic-result-badge.cjs +2 -6
- package/dist/cjs/components/search/atomic-result-html/atomic-result-html.cjs +1 -6
- package/dist/cjs/components/search/atomic-result-link/atomic-result-link.cjs +1 -4
- package/dist/cjs/components/search/atomic-result-multi-value-text/atomic-result-multi-value-text.cjs +3 -7
- package/dist/cjs/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.cjs +8 -32
- package/dist/cjs/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.cjs +9 -9
- package/dist/cjs/components/search/atomic-search-layout/atomic-search-layout.tw.css.cjs +3 -11
- package/dist/cjs/components/search/atomic-segmented-facet/atomic-segmented-facet.cjs +1 -4
- package/dist/cjs/components/search/atomic-segmented-facet-scrollable/atomic-segmented-facet-scrollable.cjs +1 -4
- package/dist/cjs/components/search/facets/facet-segmented-value/facet-segmented-value.cjs +1 -5
- package/dist/cjs/components/search/result-template-components/atomic-quickview-sidebar/atomic-quickview-sidebar.cjs +2 -4
- package/dist/cjs/components/search/result-template-components/atomic-quickview-sidebar/highlight-keywords-checkbox.cjs +1 -3
- package/dist/cjs/components/search/result-template-components/atomic-quickview-sidebar/keywords.cjs +1 -4
- package/dist/cjs/directives/hierarchical-path.cjs +1 -3
- package/dist/cjs/global/environment.cjs +1 -1
- package/dist/cjs/utils/accessibility-utils.cjs +5 -2
- package/dist/cjs/utils/debounce-utils.cjs +15 -4
- package/dist/cjs/utils/tailwind.global.tw.css.cjs +1 -1
- package/dist/cjs/versions.cjs +1 -1
- package/dist/esm/components/commerce/atomic-commerce-facet-number-input/atomic-commerce-facet-number-input.js +2 -6
- package/dist/esm/components/commerce/atomic-commerce-facets/atomic-commerce-facets.js +1 -3
- package/dist/esm/components/commerce/atomic-commerce-layout/atomic-commerce-layout.tw.css.js +1 -5
- package/dist/esm/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.js +1 -2
- package/dist/esm/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.js +1 -4
- package/dist/esm/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +1 -1
- package/dist/esm/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.js +10 -10
- package/dist/esm/components/commerce/atomic-commerce-timeframe-facet/atomic-commerce-timeframe-facet.js +4 -4
- package/dist/esm/components/commerce/atomic-product-children/atomic-product-children.js +1 -3
- package/dist/esm/components/commerce/atomic-product-description/atomic-product-description.js +1 -3
- package/dist/esm/components/commerce/atomic-product-link/atomic-product-link.js +1 -4
- package/dist/esm/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.js +2 -7
- package/dist/esm/components/commerce/atomic-product-rating/atomic-product-rating.js +1 -3
- package/dist/esm/components/common/atomic-agent-stream-of-thought/atomic-agent-stream-of-thought.js +2 -6
- package/dist/esm/components/common/atomic-aria-live/atomic-aria-live.js +35 -5
- package/dist/esm/components/common/atomic-ask-follow-up-input/atomic-ask-follow-up-input.js +1 -6
- package/dist/esm/components/common/atomic-citation/atomic-citation.js +4 -6
- package/dist/esm/components/common/atomic-facet-date-input/atomic-facet-date-input.js +2 -10
- package/dist/esm/components/common/atomic-facet-number-input/atomic-facet-number-input.js +2 -10
- package/dist/esm/components/common/atomic-facet-placeholder/atomic-facet-placeholder.js +1 -5
- package/dist/esm/components/common/atomic-generated-answer-feedback-modal/atomic-generated-answer-feedback-modal.js +23 -35
- package/dist/esm/components/common/atomic-generated-answer-thread/atomic-generated-answer-thread.js +17 -17
- package/dist/esm/components/common/atomic-generated-answer-thread-item/atomic-generated-answer-thread-item.js +50 -46
- package/dist/esm/components/common/atomic-rating/rating.js +2 -5
- package/dist/esm/components/common/atomic-result-placeholder/atomic-result-placeholder.js +2 -9
- package/dist/esm/components/common/atomic-smart-snippet-collapse-wrapper/atomic-smart-snippet-collapse-wrapper.js +1 -2
- package/dist/esm/components/common/atomic-smart-snippet-expandable-answer/atomic-smart-snippet-expandable-answer.js +1 -4
- package/dist/esm/components/common/atomic-smart-snippet-source/atomic-smart-snippet-source.js +1 -4
- package/dist/esm/components/common/atomic-tab-button/atomic-tab-button.js +1 -4
- package/dist/esm/components/common/atomic-tab-popover/atomic-tab-popover.js +1 -3
- package/dist/esm/components/common/breadbox/breadcrumb-content.js +1 -5
- package/dist/esm/components/common/button.js +1 -2
- package/dist/esm/components/common/carousel.js +1 -3
- package/dist/esm/components/common/expandable-text/expandable-text.js +2 -9
- package/dist/esm/components/common/facets/category-facet/all-categories-button.js +1 -5
- package/dist/esm/components/common/facets/category-facet/parent-button.js +1 -5
- package/dist/esm/components/common/facets/category-facet/search-value.js +1 -3
- package/dist/esm/components/common/facets/facet-container/facet-container.js +2 -7
- package/dist/esm/components/common/facets/facet-placeholder/facet-placeholder.js +1 -4
- package/dist/esm/components/common/facets/facet-search/facet-search-input.js +1 -4
- package/dist/esm/components/common/generated-answer/generated-answer-controller.js +12 -2
- package/dist/esm/components/common/generated-answer/generated-content/generated-markdown-content.js +1 -4
- package/dist/esm/components/common/generated-answer/generated-content/markdown-utils.js +79 -5
- package/dist/esm/components/common/generated-answer/render-conversation-debug-header.js +3 -8
- package/dist/esm/components/common/generated-answer/render-generating-answer-label.js +1 -4
- package/dist/esm/components/common/generated-answer/source-citations.js +2 -6
- package/dist/esm/components/common/image-carousel/image-carousel.js +2 -8
- package/dist/esm/components/common/item-list/display-wrapper.js +1 -3
- package/dist/esm/components/common/item-list/table-layout.js +2 -8
- package/dist/esm/components/common/items-per-page/choices.js +1 -6
- package/dist/esm/components/common/items-per-page/label.js +8 -8
- package/dist/esm/components/common/load-more/container.js +1 -3
- package/dist/esm/components/common/load-more/summary.js +1 -3
- package/dist/esm/components/common/no-items/container.js +3 -5
- package/dist/esm/components/common/no-items/no-items.js +1 -6
- package/dist/esm/components/common/query-error/link.js +1 -5
- package/dist/esm/components/common/query-summary/container.js +1 -3
- package/dist/esm/components/common/refine-modal/filters.js +1 -4
- package/dist/esm/components/common/refine-modal/modal.js +1 -5
- package/dist/esm/components/common/refine-modal/sort.js +2 -9
- package/dist/esm/components/common/result-children/children-wrapper.js +3 -4
- package/dist/esm/components/common/result-children/collection-guard.js +1 -3
- package/dist/esm/components/common/search-box/search-box-wrapper.js +1 -5
- package/dist/esm/components/common/search-box/submit-button.js +2 -9
- package/dist/esm/components/common/search-box/text-area-clear-button.js +1 -5
- package/dist/esm/components/common/smart-snippets/atomic-smart-snippet/snippet-footer.js +1 -4
- package/dist/esm/components/common/smart-snippets/atomic-smart-snippet-feedback-modal/modal-body.js +1 -7
- package/dist/esm/components/common/smart-snippets/atomic-smart-snippet-feedback-modal/modal-details.js +1 -4
- package/dist/esm/components/common/smart-snippets/atomic-smart-snippet-suggestions/answer-and-source-wrapper.js +1 -5
- package/dist/esm/components/common/smart-snippets/atomic-smart-snippet-suggestions/footer.js +1 -4
- package/dist/esm/components/common/smart-snippets/smart-snippet-feedback-banner.js +1 -4
- package/dist/esm/components/common/sort/label.js +1 -5
- package/dist/esm/components/common/sort/option.js +1 -3
- package/dist/esm/components/common/suggestions/query-suggestions.js +1 -4
- package/dist/esm/components/common/suggestions/recent-queries.js +3 -11
- package/dist/esm/components/insight/atomic-insight-facet/atomic-insight-facet.js +2 -7
- package/dist/esm/components/insight/atomic-insight-folded-result-list/atomic-insight-folded-result-list.js +11 -11
- package/dist/esm/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.js +9 -2
- package/dist/esm/components/insight/atomic-insight-no-results/atomic-insight-no-results.js +1 -2
- package/dist/esm/components/insight/atomic-insight-result/atomic-insight-result.js +1 -3
- package/dist/esm/components/insight/atomic-insight-result-children/atomic-insight-result-children.js +1 -1
- package/dist/esm/components/insight/atomic-insight-user-actions-modal/atomic-insight-user-actions-modal.js +2 -8
- package/dist/esm/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.js +2 -8
- package/dist/esm/components/insight/atomic-insight-user-actions-session/user-action.js +2 -6
- package/dist/esm/components/ipx/atomic-ipx-body/ipx-body.js +2 -7
- package/dist/esm/components/ipx/atomic-ipx-button/atomic-ipx-button.js +3 -11
- package/dist/esm/components/ipx/atomic-ipx-recs-list/atomic-ipx-recs-list.js +1 -4
- package/dist/esm/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.js +1 -4
- package/dist/esm/components/search/atomic-automatic-facet/atomic-automatic-facet.js +1 -2
- package/dist/esm/components/search/atomic-automatic-facet-generator/atomic-automatic-facet-generator.js +8 -8
- package/dist/esm/components/search/atomic-category-facet/atomic-category-facet.js +2 -4
- package/dist/esm/components/search/atomic-color-facet/atomic-color-facet.js +1 -3
- package/dist/esm/components/search/atomic-facet/atomic-facet.js +1 -3
- package/dist/esm/components/search/atomic-folded-result-list/atomic-folded-result-list.js +12 -12
- package/dist/esm/components/search/atomic-generated-answer/atomic-generated-answer.js +9 -2
- package/dist/esm/components/search/atomic-no-results/atomic-no-results.js +2 -2
- package/dist/esm/components/search/atomic-notifications/atomic-notifications.js +1 -3
- package/dist/esm/components/search/atomic-popover/atomic-popover.js +1 -7
- package/dist/esm/components/search/atomic-quickview-modal/atomic-quickview-modal.js +1 -4
- package/dist/esm/components/search/atomic-rating-facet/atomic-rating-facet.js +1 -2
- package/dist/esm/components/search/atomic-rating-range-facet/atomic-rating-range-facet.js +1 -1
- package/dist/esm/components/search/atomic-relevance-inspector/atomic-relevance-inspector.js +1 -3
- package/dist/esm/components/search/atomic-result/atomic-result.js +1 -3
- package/dist/esm/components/search/atomic-result-badge/atomic-result-badge.js +2 -6
- package/dist/esm/components/search/atomic-result-html/atomic-result-html.js +1 -6
- package/dist/esm/components/search/atomic-result-link/atomic-result-link.js +1 -4
- package/dist/esm/components/search/atomic-result-multi-value-text/atomic-result-multi-value-text.js +3 -7
- package/dist/esm/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.js +8 -32
- package/dist/esm/components/search/atomic-search-box/atomic-search-box.js +1 -1
- package/dist/esm/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.js +9 -9
- package/dist/esm/components/search/atomic-search-layout/atomic-search-layout.tw.css.js +1 -5
- package/dist/esm/components/search/atomic-segmented-facet/atomic-segmented-facet.js +1 -4
- package/dist/esm/components/search/atomic-segmented-facet-scrollable/atomic-segmented-facet-scrollable.js +1 -4
- package/dist/esm/components/search/facets/facet-segmented-value/facet-segmented-value.js +1 -5
- package/dist/esm/components/search/result-template-components/atomic-quickview-sidebar/atomic-quickview-sidebar.js +2 -4
- package/dist/esm/components/search/result-template-components/atomic-quickview-sidebar/highlight-keywords-checkbox.js +1 -3
- package/dist/esm/components/search/result-template-components/atomic-quickview-sidebar/keywords.js +1 -4
- package/dist/esm/directives/hierarchical-path.js +1 -3
- package/dist/esm/global/environment.js +1 -1
- package/dist/esm/utils/accessibility-utils.js +5 -2
- package/dist/esm/utils/debounce-utils.js +15 -4
- package/dist/esm/utils/tailwind.global.tw.css.js +1 -1
- package/dist/esm/versions.js +1 -1
- package/dist/themes/accessible.css +3 -4
- package/dist/themes/coveo.css +3 -4
- package/dist/types/components/common/atomic-aria-live/atomic-aria-live.d.ts +5 -1
- package/dist/types/components/common/atomic-generated-answer-thread-item/atomic-generated-answer-thread-item.d.ts +3 -0
- package/dist/types/components/common/facets/facet-search/facet-search-input-guard.d.ts +1 -1
- package/dist/types/components/common/generated-answer/generated-answer-controller.d.ts +5 -0
- package/dist/types/components/common/generated-answer/generated-content/markdown-utils.d.ts +1 -0
- package/dist/types/components/common/query-error/description.d.ts +1 -1
- package/dist/types/components/common/query-error/title.d.ts +1 -1
- package/dist/types/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.d.ts +1 -0
- package/dist/types/components/search/atomic-generated-answer/atomic-generated-answer.d.ts +1 -0
- package/dist/types/components/search/atomic-result-link/atomic-result-link.d.ts +1 -1
- package/dist/types/utils/accessibility-utils.d.ts +2 -1
- package/dist/types/utils/functional-component-utils.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Marked, Renderer } from "marked";
|
|
2
|
+
import { parseHTML } from "../../../../utils/utils.js";
|
|
2
3
|
const toInlinePlainText = (textWithHtml)=>{
|
|
3
4
|
const withoutHtmlTags = textWithHtml.replace(/<[^>]*>/g, ' ');
|
|
4
5
|
const withCollapsedWhitespaces = withoutHtmlTags.replace(/\s{2,}/g, ' ');
|
|
@@ -19,6 +20,7 @@ const completeUnclosedElement = (text)=>{
|
|
|
19
20
|
}
|
|
20
21
|
return text;
|
|
21
22
|
};
|
|
23
|
+
const decodeHtmlEntities = (text)=>parseHTML(text).body.textContent ?? '';
|
|
22
24
|
const escapeHtml = (text)=>text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
23
25
|
const customRenderer = {
|
|
24
26
|
blockquote (quote) {
|
|
@@ -76,7 +78,79 @@ const customRenderer = {
|
|
|
76
78
|
return completeUnclosedElement(text);
|
|
77
79
|
}
|
|
78
80
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
class PlainTextRenderer extends Renderer {
|
|
82
|
+
blockquote(quote) {
|
|
83
|
+
return ` ${quote} `;
|
|
84
|
+
}
|
|
85
|
+
br() {
|
|
86
|
+
return ' ';
|
|
87
|
+
}
|
|
88
|
+
checkbox() {
|
|
89
|
+
return '';
|
|
90
|
+
}
|
|
91
|
+
code(code) {
|
|
92
|
+
return ` ${code} `;
|
|
93
|
+
}
|
|
94
|
+
codespan(text) {
|
|
95
|
+
return text;
|
|
96
|
+
}
|
|
97
|
+
del(text) {
|
|
98
|
+
return text;
|
|
99
|
+
}
|
|
100
|
+
em(text) {
|
|
101
|
+
return text;
|
|
102
|
+
}
|
|
103
|
+
heading(text) {
|
|
104
|
+
return ` ${text} `;
|
|
105
|
+
}
|
|
106
|
+
hr() {
|
|
107
|
+
return ' ';
|
|
108
|
+
}
|
|
109
|
+
html(text) {
|
|
110
|
+
return toInlinePlainText(text);
|
|
111
|
+
}
|
|
112
|
+
image(_href, _title, text) {
|
|
113
|
+
return text;
|
|
114
|
+
}
|
|
115
|
+
link(_href, _title, text) {
|
|
116
|
+
return text;
|
|
117
|
+
}
|
|
118
|
+
list(body) {
|
|
119
|
+
return ` ${body} `;
|
|
120
|
+
}
|
|
121
|
+
listitem(text) {
|
|
122
|
+
return ` ${text} `;
|
|
123
|
+
}
|
|
124
|
+
paragraph(text) {
|
|
125
|
+
return ` ${text} `;
|
|
126
|
+
}
|
|
127
|
+
strong(text) {
|
|
128
|
+
return text;
|
|
129
|
+
}
|
|
130
|
+
table(header, body) {
|
|
131
|
+
return ` ${header} ${body} `;
|
|
132
|
+
}
|
|
133
|
+
tablecell(content) {
|
|
134
|
+
return `${content} `;
|
|
135
|
+
}
|
|
136
|
+
tablerow(content) {
|
|
137
|
+
return ` ${content} `;
|
|
138
|
+
}
|
|
139
|
+
text(text) {
|
|
140
|
+
return text.replace(unclosedElement, '$2');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const markdownParser = new Marked();
|
|
144
|
+
const plainTextMarkdownParser = new Marked();
|
|
145
|
+
const htmlRenderer = Object.assign(new Renderer(), customRenderer);
|
|
146
|
+
const plainTextRenderer = new PlainTextRenderer();
|
|
147
|
+
const transformMarkdownToHtml = (text)=>markdownParser.parse(text, {
|
|
148
|
+
renderer: htmlRenderer
|
|
149
|
+
});
|
|
150
|
+
const markdownToPlainText = (text)=>{
|
|
151
|
+
const plain = plainTextMarkdownParser.parse(text, {
|
|
152
|
+
renderer: plainTextRenderer
|
|
153
|
+
});
|
|
154
|
+
return decodeHtmlEntities(plain).replace(/\s+/g, ' ').trim();
|
|
155
|
+
};
|
|
156
|
+
export { markdownToPlainText, transformMarkdownToHtml };
|
|
@@ -5,13 +5,11 @@ import { hasClipboardSupport } from "./generated-answer-utils.js";
|
|
|
5
5
|
import copy from "../../../images/copy.js";
|
|
6
6
|
const renderConversationDebugHeader = ({ props })=>{
|
|
7
7
|
const { i18n, conversationId } = props;
|
|
8
|
-
return html`<div
|
|
9
|
-
class="flex flex-wrap gap-1.5 items-center text-neutral-dark"
|
|
10
|
-
>
|
|
8
|
+
return html`<div class="flex flex-wrap gap-1.5 items-center text-neutral-dark">
|
|
11
9
|
${i18n.t('generated-answer-debug-mode-on')}
|
|
12
10
|
<div class="bg-success h-2 w-2 rounded-full shrink-0"></div>
|
|
13
11
|
|
|
14
|
-
<div class="flex items-center text-neutral-dark
|
|
12
|
+
<div class="flex items-center text-neutral-dark break-all">
|
|
15
13
|
${i18n.t('generated-answer-conversation-id', {
|
|
16
14
|
conversationId
|
|
17
15
|
})}
|
|
@@ -24,10 +22,7 @@ const renderConversationDebugHeader = ({ props })=>{
|
|
|
24
22
|
navigator.clipboard.writeText(conversationId).catch(()=>{});
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
|
-
})(html`<atomic-icon
|
|
28
|
-
class="w-4 text-neutral-dark"
|
|
29
|
-
.icon=${copy}
|
|
30
|
-
></atomic-icon>`) : nothing}
|
|
25
|
+
})(html`<atomic-icon class="w-4 text-neutral-dark" .icon=${copy}></atomic-icon>`) : nothing}
|
|
31
26
|
</div>
|
|
32
27
|
</div>`;
|
|
33
28
|
};
|
|
@@ -4,10 +4,7 @@ const renderGeneratingAnswerLabel = ({ props })=>{
|
|
|
4
4
|
const { i18n, isStreaming, collapsible } = props;
|
|
5
5
|
const canRender = collapsible && isStreaming;
|
|
6
6
|
return html`${when(canRender, ()=>html`
|
|
7
|
-
<div
|
|
8
|
-
part="is-generating"
|
|
9
|
-
class="text-primary hidden text-base font-light"
|
|
10
|
-
>
|
|
7
|
+
<div part="is-generating" class="text-primary hidden text-base font-light">
|
|
11
8
|
${i18n.t('generating-answer')}...
|
|
12
9
|
</div>
|
|
13
10
|
`)}`;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { html, nothing } from "lit";
|
|
2
2
|
const renderSourceCitations = ({ props })=>(children)=>props.isVisible ? html`
|
|
3
3
|
<div class="source-citations">
|
|
4
|
-
<p part="citations-label" class="text-neutral-dark mb-2 shrink-0">
|
|
5
|
-
|
|
6
|
-
</p>
|
|
7
|
-
<ol
|
|
8
|
-
class="citations-container flex list-none flex-wrap items-center gap-2"
|
|
9
|
-
>
|
|
4
|
+
<p part="citations-label" class="text-neutral-dark mb-2 shrink-0">${props.label}</p>
|
|
5
|
+
<ol class="citations-container flex list-none flex-wrap items-center gap-2">
|
|
10
6
|
${children}
|
|
11
7
|
</ol>
|
|
12
8
|
</div>
|
|
@@ -36,11 +36,7 @@ const renderImageCarousel = ({ props })=>{
|
|
|
36
36
|
class: `${commonPaginationClasses} right-0 mr-1`
|
|
37
37
|
}
|
|
38
38
|
})(html`
|
|
39
|
-
<atomic-icon
|
|
40
|
-
part="next-icon"
|
|
41
|
-
icon=${arrow_right}
|
|
42
|
-
class=${commonArrowClasses}
|
|
43
|
-
></atomic-icon>
|
|
39
|
+
<atomic-icon part="next-icon" icon=${arrow_right} class=${commonArrowClasses}></atomic-icon>
|
|
44
40
|
`);
|
|
45
41
|
const renderIndicators = ()=>renderCarouselIndicator({
|
|
46
42
|
props: {
|
|
@@ -58,9 +54,7 @@ const renderImageCarousel = ({ props })=>{
|
|
|
58
54
|
aria-label=${props.label}
|
|
59
55
|
>
|
|
60
56
|
${renderPreviousButton()}
|
|
61
|
-
<div class="w-full h-full" aria-live="polite" aria-atomic="false">
|
|
62
|
-
${children}
|
|
63
|
-
</div>
|
|
57
|
+
<div class="w-full h-full" aria-live="polite" aria-atomic="false">${children}</div>
|
|
64
58
|
${renderNextButton()} ${renderIndicators()}
|
|
65
59
|
</div>`;
|
|
66
60
|
};
|
|
@@ -20,8 +20,6 @@ const renderListWrapper = ({ props })=>{
|
|
|
20
20
|
};
|
|
21
21
|
const renderListRoot = ({ props })=>{
|
|
22
22
|
const { listClasses } = props;
|
|
23
|
-
return (children)=>html`<div class="list-root ${listClasses}" part="result-list"
|
|
24
|
-
${children}
|
|
25
|
-
</div>`;
|
|
23
|
+
return (children)=>html`<div class="list-root ${listClasses}" part="result-list">${children}</div>`;
|
|
26
24
|
};
|
|
27
25
|
export { renderDisplayWrapper };
|
|
@@ -8,17 +8,11 @@ const renderTableLayout = ({ props })=>{
|
|
|
8
8
|
const { host, listClasses, logger, label } = props;
|
|
9
9
|
const fieldColumns = getFieldTableColumns(props);
|
|
10
10
|
if (!fieldColumns.length) logger.error('atomic-table-element elements missing in the template to display columns.', host);
|
|
11
|
-
return (children)=>html`<table
|
|
12
|
-
class="list-root ${listClasses}"
|
|
13
|
-
part="result-table"
|
|
14
|
-
aria-label=${label}
|
|
15
|
-
>
|
|
11
|
+
return (children)=>html`<table class="list-root ${listClasses}" part="result-table" aria-label=${label}>
|
|
16
12
|
<thead part="result-table-heading">
|
|
17
13
|
<tr part="result-table-heading-row">
|
|
18
14
|
${map(fieldColumns, (column)=>html`<th part="result-table-heading-cell">
|
|
19
|
-
<atomic-text
|
|
20
|
-
.value=${column.getAttribute('label')}
|
|
21
|
-
></atomic-text>
|
|
15
|
+
<atomic-text .value=${column.getAttribute('label')}></atomic-text>
|
|
22
16
|
</th>`)}
|
|
23
17
|
</tr>
|
|
24
18
|
</thead>
|
|
@@ -7,12 +7,7 @@ const renderChoices = ({ props })=>{
|
|
|
7
7
|
else if (choice > pageSize) focusOnNextNewResult();
|
|
8
8
|
};
|
|
9
9
|
return html`
|
|
10
|
-
<div
|
|
11
|
-
part="buttons"
|
|
12
|
-
role="radiogroup"
|
|
13
|
-
aria-label=${label}
|
|
14
|
-
class="flex flex-wrap gap-2"
|
|
15
|
-
>
|
|
10
|
+
<div part="buttons" role="radiogroup" aria-label=${label} class="flex flex-wrap gap-2">
|
|
16
11
|
${choices.map((choice)=>{
|
|
17
12
|
const isSelected = pageSize === choice;
|
|
18
13
|
const parts = [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
const renderLabel = ()=>(children)=>html`
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
<span
|
|
4
|
+
part="label"
|
|
5
|
+
class="text-on-background mr-3 self-start text-lg leading-10"
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
>
|
|
8
|
+
${children}
|
|
9
|
+
</span>
|
|
10
|
+
`;
|
|
11
11
|
export { renderLabel };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderLoadMoreContainer = ()=>(children)=>html`
|
|
3
|
-
<div class="flex flex-col items-center" part="container">${children}</div>
|
|
4
|
-
`;
|
|
2
|
+
const renderLoadMoreContainer = ()=>(children)=>html` <div class="flex flex-col items-center" part="container">${children}</div> `;
|
|
5
3
|
export { renderLoadMoreContainer };
|
|
@@ -12,9 +12,7 @@ const renderLoadMoreSummary = ({ props })=>{
|
|
|
12
12
|
total: wrapHighlight(to.toLocaleString(locale))
|
|
13
13
|
});
|
|
14
14
|
return html`
|
|
15
|
-
<div class="text-neutral-dark my-2 text-lg" part="showing-results">
|
|
16
|
-
${unsafeHTML(content)}
|
|
17
|
-
</div>
|
|
15
|
+
<div class="text-neutral-dark my-2 text-lg" part="showing-results">${unsafeHTML(content)}</div>
|
|
18
16
|
`;
|
|
19
17
|
};
|
|
20
18
|
export { renderLoadMoreSummary };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
const renderNoItemsContainer = ()=>(children)=>html`
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<slot></slot>
|
|
7
|
-
`;
|
|
3
|
+
<div class="text-on-background flex h-full w-full flex-col items-center">${children}</div>
|
|
4
|
+
<slot></slot>
|
|
5
|
+
`;
|
|
8
6
|
export { renderNoItemsContainer };
|
|
@@ -20,12 +20,7 @@ const renderNoItems = ({ props })=>{
|
|
|
20
20
|
}
|
|
21
21
|
}) : props.i18n.t(props.i18nKey);
|
|
22
22
|
return html`
|
|
23
|
-
<div
|
|
24
|
-
class="my-2 max-w-full text-center text-2xl font-medium"
|
|
25
|
-
part="no-results"
|
|
26
|
-
>
|
|
27
|
-
${content}
|
|
28
|
-
</div>
|
|
23
|
+
<div class="my-2 max-w-full text-center text-2xl font-medium" part="no-results">${content}</div>
|
|
29
24
|
`;
|
|
30
25
|
};
|
|
31
26
|
export { renderNoItems };
|
|
@@ -13,11 +13,7 @@ const renderQueryErrorLink = ({ props })=>{
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
const link = getErrorLink();
|
|
16
|
-
return link ? html`<a
|
|
17
|
-
href=${link}
|
|
18
|
-
part="doc-link"
|
|
19
|
-
class="btn-primary mt-10 inline-block p-3"
|
|
20
|
-
>
|
|
16
|
+
return link ? html`<a href=${link} part="doc-link" class="btn-primary mt-10 inline-block p-3">
|
|
21
17
|
${props.i18n.t('coveo-online-help')}
|
|
22
18
|
</a>` : nothing;
|
|
23
19
|
};
|
|
@@ -5,8 +5,6 @@ const renderQuerySummaryContainer = ({ props })=>(children)=>{
|
|
|
5
5
|
'text-on-background': true,
|
|
6
6
|
[props.additionalClasses ?? '']: Boolean(props.additionalClasses)
|
|
7
7
|
};
|
|
8
|
-
return html`
|
|
9
|
-
<div class=${multiClassMap(classNames)} part="container">${children}</div>
|
|
10
|
-
`;
|
|
8
|
+
return html` <div class=${multiClassMap(classNames)} part="container">${children}</div> `;
|
|
11
9
|
};
|
|
12
10
|
export { renderQuerySummaryContainer };
|
|
@@ -3,10 +3,7 @@ import { when } from "lit/directives/when.js";
|
|
|
3
3
|
import { renderButton } from "../button.js";
|
|
4
4
|
const renderRefineModalFiltersSection = ({ props })=>(children)=>html`
|
|
5
5
|
<div part="filter-section" class="mt-8 mb-3 flex w-full justify-between">
|
|
6
|
-
<h2
|
|
7
|
-
part="section-title section-filters-title"
|
|
8
|
-
class="truncate text-2xl font-bold"
|
|
9
|
-
>
|
|
6
|
+
<h2 part="section-title section-filters-title" class="truncate text-2xl font-bold">
|
|
10
7
|
${props.i18n.t('filters')}
|
|
11
8
|
</h2>
|
|
12
9
|
${children}
|
|
@@ -20,11 +20,7 @@ const renderRefineModal = ({ props })=>(children)=>{
|
|
|
20
20
|
onClick: props.onClose,
|
|
21
21
|
ariaLabel: props.i18n.t('close')
|
|
22
22
|
}
|
|
23
|
-
})(html`<atomic-icon
|
|
24
|
-
part="close-icon"
|
|
25
|
-
class="h-5 w-5"
|
|
26
|
-
icon=${images_close}
|
|
27
|
-
></atomic-icon>`)}
|
|
23
|
+
})(html`<atomic-icon part="close-icon" class="h-5 w-5" icon=${images_close}></atomic-icon>`)}
|
|
28
24
|
</div>
|
|
29
25
|
`;
|
|
30
26
|
const renderFooter = ()=>html`
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
import sort from "../../../images/sort.js";
|
|
3
3
|
const renderRefineModalSortSection = ({ props })=>(children)=>html`
|
|
4
|
-
<h2
|
|
5
|
-
part="section-title section-sort-title"
|
|
6
|
-
class="mb-3 truncate text-2xl font-bold"
|
|
7
|
-
>
|
|
4
|
+
<h2 part="section-title section-sort-title" class="mb-3 truncate text-2xl font-bold">
|
|
8
5
|
${props.i18n.t('sort')}
|
|
9
6
|
</h2>
|
|
10
7
|
<div part="select-wrapper" class="relative">
|
|
@@ -20,11 +17,7 @@ const renderRefineModalSortSection = ({ props })=>(children)=>html`
|
|
|
20
17
|
part="select-icon-wrapper"
|
|
21
18
|
class="peer-hover:text-primary-light peer-focus-within:text-primary-light pointer-events-none absolute top-0 right-0 bottom-0 flex items-center justify-center pr-6"
|
|
22
19
|
>
|
|
23
|
-
<atomic-icon
|
|
24
|
-
part="select-icon"
|
|
25
|
-
icon=${sort}
|
|
26
|
-
class="h-6 w-6"
|
|
27
|
-
></atomic-icon>
|
|
20
|
+
<atomic-icon part="select-icon" icon=${sort} class="h-6 w-6"></atomic-icon>
|
|
28
21
|
</div>
|
|
29
22
|
</div>
|
|
30
23
|
`;
|
|
@@ -3,9 +3,8 @@ import { when } from "lit/directives/when.js";
|
|
|
3
3
|
const renderChildrenWrapper = ()=>(children)=>{
|
|
4
4
|
const hasChildren = children !== nothing;
|
|
5
5
|
return html`<div part="children-root">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</div>`;
|
|
6
|
+
${when(hasChildren, ()=>html`<slot name="before-children"></slot>`)} ${children}
|
|
7
|
+
${when(hasChildren, ()=>html`<slot name="after-children"></slot>`)}
|
|
8
|
+
</div>`;
|
|
10
9
|
};
|
|
11
10
|
export { renderChildrenWrapper };
|
|
@@ -16,9 +16,7 @@ const renderCollectionGuard = ({ props })=>(children)=>{
|
|
|
16
16
|
});
|
|
17
17
|
return hasChildren ? renderChildrenWrapper()(placeholders) : html`<div part="children-root">${placeholders}</div>`;
|
|
18
18
|
}
|
|
19
|
-
if (!moreResultsAvailable && !hasChildren) return when(noResultText.trim().length > 0, ()=>html`<p part="no-result-root" class="no-result-root my-3"
|
|
20
|
-
${noResultText}
|
|
21
|
-
</p>`);
|
|
19
|
+
if (!moreResultsAvailable && !hasChildren) return when(noResultText.trim().length > 0, ()=>html`<p part="no-result-root" class="no-result-root my-3">${noResultText}</p>`);
|
|
22
20
|
if (!hasChildren) return nothing;
|
|
23
21
|
return children;
|
|
24
22
|
};
|
|
@@ -6,11 +6,7 @@ const renderSearchBoxWrapper = ({ props })=>(children)=>{
|
|
|
6
6
|
'focus-within:border-disabled focus-within:ring-neutral': props.disabled,
|
|
7
7
|
'focus-within:border-primary focus-within:ring-ring-primary': !props.disabled
|
|
8
8
|
});
|
|
9
|
-
return html`<div
|
|
10
|
-
part="wrapper"
|
|
11
|
-
class=${multiClassMap(classes)}
|
|
12
|
-
@focusout=${props.onFocusout}
|
|
13
|
-
>
|
|
9
|
+
return html`<div part="wrapper" class=${multiClassMap(classes)} @focusout=${props.onFocusout}>
|
|
14
10
|
${children}
|
|
15
11
|
</div>`;
|
|
16
12
|
};
|
|
@@ -4,10 +4,7 @@ import search_slim from "../../../images/search-slim.js";
|
|
|
4
4
|
import { renderButton } from "../button.js";
|
|
5
5
|
const renderSubmitButton = ({ props })=>{
|
|
6
6
|
const { i18n, disabled, onClick } = props;
|
|
7
|
-
return html`<div
|
|
8
|
-
part="submit-button-wrapper"
|
|
9
|
-
class="mr-2 flex items-center justify-center py-2"
|
|
10
|
-
>
|
|
7
|
+
return html`<div part="submit-button-wrapper" class="mr-2 flex items-center justify-center py-2">
|
|
11
8
|
${renderButton({
|
|
12
9
|
props: {
|
|
13
10
|
style: 'text-primary',
|
|
@@ -19,11 +16,7 @@ const renderSubmitButton = ({ props })=>{
|
|
|
19
16
|
},
|
|
20
17
|
disabled
|
|
21
18
|
}
|
|
22
|
-
})(html`<atomic-icon
|
|
23
|
-
part="submit-icon"
|
|
24
|
-
icon=${search_slim}
|
|
25
|
-
class="h-4 w-4"
|
|
26
|
-
></atomic-icon>`)}
|
|
19
|
+
})(html`<atomic-icon part="submit-icon" icon=${search_slim} class="h-4 w-4"></atomic-icon>`)}
|
|
27
20
|
</div>`;
|
|
28
21
|
};
|
|
29
22
|
export { renderSubmitButton };
|
|
@@ -18,10 +18,6 @@ const renderTextAreaClearButton = ({ props: { textAreaRef, i18n, onClick } })=>h
|
|
|
18
18
|
},
|
|
19
19
|
ariaLabel: i18n.t('clear-searchbox')
|
|
20
20
|
}
|
|
21
|
-
})(html`<atomic-icon
|
|
22
|
-
part="clear-icon"
|
|
23
|
-
icon=${clear_slim}
|
|
24
|
-
class="h-4 w-4"
|
|
25
|
-
></atomic-icon>`)}
|
|
21
|
+
})(html`<atomic-icon part="clear-icon" icon=${clear_slim} class="h-4 w-4"></atomic-icon>`)}
|
|
26
22
|
</div>`;
|
|
27
23
|
export { renderTextAreaClearButton };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderSnippetFooter = ({ props })=>(children)=>html`<footer
|
|
3
|
-
part="footer"
|
|
4
|
-
aria-label=${props.i18n.t('smart-snippet-source')}
|
|
5
|
-
>
|
|
2
|
+
const renderSnippetFooter = ({ props })=>(children)=>html`<footer part="footer" aria-label=${props.i18n.t('smart-snippet-source')}>
|
|
6
3
|
${children}
|
|
7
4
|
</footer>`;
|
|
8
5
|
export { renderSnippetFooter };
|
package/dist/esm/components/common/smart-snippets/atomic-smart-snippet-feedback-modal/modal-body.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderModalBody = ({ props: { formId, onSubmit } })=>(children)=>html`<form
|
|
3
|
-
part="form"
|
|
4
|
-
id=${formId}
|
|
5
|
-
slot="body"
|
|
6
|
-
@submit=${onSubmit}
|
|
7
|
-
class="flex flex-col gap-8"
|
|
8
|
-
>
|
|
2
|
+
const renderModalBody = ({ props: { formId, onSubmit } })=>(children)=>html`<form part="form" id=${formId} slot="body" @submit=${onSubmit} class="flex flex-col gap-8">
|
|
9
3
|
${children}
|
|
10
4
|
</form>`;
|
|
11
5
|
export { renderModalBody };
|
|
@@ -2,10 +2,7 @@ import { html } from "lit";
|
|
|
2
2
|
import { ref } from "lit/directives/ref.js";
|
|
3
3
|
import { when } from "lit/directives/when.js";
|
|
4
4
|
const renderModalDetails = ({ props: { currentAnswer, i18n, detailsInputRef } })=>when('other' === currentAnswer, ()=>html`<fieldset>
|
|
5
|
-
<legend
|
|
6
|
-
part="details-title"
|
|
7
|
-
class="text-on-background text-lg font-bold"
|
|
8
|
-
>
|
|
5
|
+
<legend part="details-title" class="text-on-background text-lg font-bold">
|
|
9
6
|
${i18n.t('details')}
|
|
10
7
|
</legend>
|
|
11
8
|
<textarea
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderAnswerAndSourceWrapper = ({ props })=>(children)=>html`<div
|
|
3
|
-
part="answer-and-source"
|
|
4
|
-
class="pr-6 pb-6 pl-10"
|
|
5
|
-
id=${props.id}
|
|
6
|
-
>
|
|
2
|
+
const renderAnswerAndSourceWrapper = ({ props })=>(children)=>html`<div part="answer-and-source" class="pr-6 pb-6 pl-10" id=${props.id}>
|
|
7
3
|
${children}
|
|
8
4
|
</div>`;
|
|
9
5
|
export { renderAnswerAndSourceWrapper };
|
package/dist/esm/components/common/smart-snippets/atomic-smart-snippet-suggestions/footer.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderFooter = ({ props })=>(children)=>html`<footer
|
|
3
|
-
part="footer"
|
|
4
|
-
aria-label=${props.i18n.t('smart-snippet-source')}
|
|
5
|
-
>
|
|
2
|
+
const renderFooter = ({ props })=>(children)=>html`<footer part="footer" aria-label=${props.i18n.t('smart-snippet-source')}>
|
|
6
3
|
${children}
|
|
7
4
|
</footer>`;
|
|
8
5
|
export { renderFooter };
|
|
@@ -70,10 +70,7 @@ const renderSmartSnippetFeedbackBanner = ({ props })=>{
|
|
|
70
70
|
ref: props.explainWhyRef
|
|
71
71
|
}
|
|
72
72
|
})(html`${props.i18n.t('smart-snippet-feedback-explain-why')}`);
|
|
73
|
-
const renderThankYouContainer = (visible)=>when(visible, ()=>html`<div
|
|
74
|
-
part="feedback-thank-you-wrapper"
|
|
75
|
-
class="flex flex-wrap gap-1"
|
|
76
|
-
>
|
|
73
|
+
const renderThankYouContainer = (visible)=>when(visible, ()=>html`<div part="feedback-thank-you-wrapper" class="flex flex-wrap gap-1">
|
|
77
74
|
${renderThankYouMessage()}
|
|
78
75
|
${when(props.disliked && !props.feedbackSent, ()=>renderExplainWhyButton())}
|
|
79
76
|
</div>`);
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderSortLabel = ({ props: { i18n, id } })=>html`<label
|
|
3
|
-
class="m-2 cursor-pointer text-sm font-bold"
|
|
4
|
-
part="label"
|
|
5
|
-
for=${id}
|
|
6
|
-
>
|
|
2
|
+
const renderSortLabel = ({ props: { i18n, id } })=>html`<label class="m-2 cursor-pointer text-sm font-bold" part="label" for=${id}>
|
|
7
3
|
${i18n.t('with-colon', {
|
|
8
4
|
text: i18n.t('sort-by')
|
|
9
5
|
})}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
const renderSortOption = ({ props: { value, selected, i18n, label } })=>html`
|
|
3
|
-
<option value=${value} ?selected=${selected}>${i18n.t(label)}</option>
|
|
4
|
-
`;
|
|
2
|
+
const renderSortOption = ({ props: { value, selected, i18n, label } })=>html` <option value=${value} ?selected=${selected}>${i18n.t(label)}</option> `;
|
|
5
3
|
export { renderSortOption };
|
|
@@ -15,10 +15,7 @@ const getPartialSearchBoxSuggestionElement = (suggestion, i18n)=>({
|
|
|
15
15
|
const renderQuerySuggestion = ({ icon, hasQuery, suggestion, hasMultipleKindOfSuggestions, alwaysShowIcon = false })=>{
|
|
16
16
|
const shouldShowIcon = alwaysShowIcon || hasMultipleKindOfSuggestions;
|
|
17
17
|
const template = html`
|
|
18
|
-
<div
|
|
19
|
-
part="query-suggestion-content"
|
|
20
|
-
class="pointer-events-none flex items-center"
|
|
21
|
-
>
|
|
18
|
+
<div part="query-suggestion-content" class="pointer-events-none flex items-center">
|
|
22
19
|
${shouldShowIcon ? html`<atomic-icon
|
|
23
20
|
part="query-suggestion-icon"
|
|
24
21
|
icon=${icon}
|
|
@@ -30,11 +30,7 @@ const renderRecentQuery = ({ icon, query, value })=>{
|
|
|
30
30
|
part="recent-query-content"
|
|
31
31
|
class="pointer-events-none flex items-center text-left break-all"
|
|
32
32
|
>
|
|
33
|
-
<atomic-icon
|
|
34
|
-
part="recent-query-icon"
|
|
35
|
-
icon=${icon}
|
|
36
|
-
class="mr-2 h-4 w-4 shrink-0"
|
|
37
|
-
></atomic-icon>
|
|
33
|
+
<atomic-icon part="recent-query-icon" icon=${icon} class="mr-2 h-4 w-4 shrink-0"></atomic-icon>
|
|
38
34
|
|
|
39
35
|
${when(hasQuery, ()=>html`<span
|
|
40
36
|
part="recent-query-text"
|
|
@@ -50,9 +46,7 @@ const renderRecentQuery = ({ icon, query, value })=>{
|
|
|
50
46
|
}
|
|
51
47
|
]
|
|
52
48
|
})}
|
|
53
|
-
></span>`, ()=>html`<span part="recent-query-text" class="line-clamp-2 break-all">
|
|
54
|
-
${value}
|
|
55
|
-
</span>`)}
|
|
49
|
+
></span>`, ()=>html`<span part="recent-query-text" class="line-clamp-2 break-all"> ${value} </span>`)}
|
|
56
50
|
</div>`;
|
|
57
51
|
const container = document.createElement('div');
|
|
58
52
|
render(template, container);
|
|
@@ -63,9 +57,7 @@ const renderRecentQueryClear = ({ i18n })=>{
|
|
|
63
57
|
part="recent-query-title-content"
|
|
64
58
|
class="pointer-events-none flex w-full justify-between"
|
|
65
59
|
>
|
|
66
|
-
<span class="font-bold" part="recent-query-title">
|
|
67
|
-
${i18n.t('recent-searches')}
|
|
68
|
-
</span>
|
|
60
|
+
<span class="font-bold" part="recent-query-title"> ${i18n.t('recent-searches')} </span>
|
|
69
61
|
<span part="recent-query-clear">${i18n.t('clear')}</span>
|
|
70
62
|
</div>`;
|
|
71
63
|
const container = document.createElement('div');
|
|
@@ -73,9 +73,7 @@ class AtomicInsightFacet extends LitElement {
|
|
|
73
73
|
return this.facetState.enabled && !this.searchStatusState.hasError && (!this.searchStatusState.firstSearchExecuted || this.facetState.values.length > 0);
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
return html`${when(this.shouldRenderFacet(), ()=>this.searchStatusState.firstSearchExecuted ? renderFacetContainer()(html`
|
|
77
|
-
${this.renderFacetHeader()} ${this.renderBody()}
|
|
78
|
-
`) : html`<atomic-facet-placeholder
|
|
76
|
+
return html`${when(this.shouldRenderFacet(), ()=>this.searchStatusState.firstSearchExecuted ? renderFacetContainer()(html` ${this.renderFacetHeader()} ${this.renderBody()} `) : html`<atomic-facet-placeholder
|
|
79
77
|
value-count="${this.numberOfValues}"
|
|
80
78
|
?is-collapsed="${this.isCollapsed}"
|
|
81
79
|
></atomic-facet-placeholder>`)}`;
|
|
@@ -109,10 +107,7 @@ class AtomicInsightFacet extends LitElement {
|
|
|
109
107
|
i18n: this.bindings.i18n,
|
|
110
108
|
label: this.label
|
|
111
109
|
}
|
|
112
|
-
})(html`<ul
|
|
113
|
-
class="mt-3 ${'box' === this.displayValuesAs ? 'box-container' : ''}"
|
|
114
|
-
part="values"
|
|
115
|
-
>
|
|
110
|
+
})(html`<ul class="mt-3 ${'box' === this.displayValuesAs ? 'box-container' : ''}" part="values">
|
|
116
111
|
${children}
|
|
117
112
|
</ul>`);
|
|
118
113
|
}
|