@coveo/quantic 3.33.2 → 3.33.4
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/docs/out/quantic-docs.json +13 -13
- package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.js +1 -1
- package/force-app/main/default/lwc/quanticCitation/__tests__/quanticCitation.test.js +142 -3
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.html +10 -4
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.js +72 -31
- package/force-app/main/default/lwc/quanticFacet/quanticFacet.js +1 -1
- package/force-app/main/default/lwc/quanticHeading/quanticHeading.js +1 -1
- package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.js +1 -1
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/quanticSearchBoxSuggestionsList.e2e.ts +0 -17
- package/force-app/main/default/lwc/quanticSummary/quanticSummary.js +1 -1
- package/force-app/main/default/lwc/quanticTimeframe/quanticTimeframe.js +2 -2
- package/force-app/main/default/lwc/quanticUtils/facetDependenciesUtils.js +2 -2
- package/force-app/main/default/lwc/quanticUtils/quanticUtils.js +4 -4
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/product.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/date/date-format.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/plan/plan-response.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/search/stemming.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/case-assist-engine/case-assist-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-engine/commerce-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/engine-configuration.d.ts +7 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/insight-engine/insight-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/recommendation-engine/recommendation-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-engine/search-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/breadcrumb-manager/headless-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-category-filter-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/instant-products/headless-instant-products.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-listing/headless-product-listing.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recent-queries-list/headless-recent-queries-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search/headless-search.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/breadcrumb-manager/headless-core-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-context.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/did-you-mean/headless-core-did-you-mean.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facet-manager/headless-core-facet-manager.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/category-facet/headless-core-category-facet.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/facet/headless-core-facet.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-core-date-facet.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-core-date-filter.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-facet.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-filter.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/folded-result-list/headless-core-folded-result-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/pager/headless-core-pager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/query-error/headless-core-query-error.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/recent-queries-list/headless-core-recent-queries-list.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/result-list/headless-core-result-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/results-per-page/headless-core-results-per-page.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-box/headless-core-search-box-options.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/smart-snippet-questions-list/headless-core-smart-snippet-questions-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/sort/headless-core-sort.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/status/headless-core-status.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/tab/headless-core-tab.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-notify-trigger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-query-trigger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-redirection-trigger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/dictionary-field-context/headless-dictionary-field-context.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/automatic-facet-generator/headless-automatic-facet-generator.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/category-facet/headless-category-field-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/facet/headless-field-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/history-manager/headless-history-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/instant-results/instant-results.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-summary/headless-query-summary.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/quickview/headless-quickview.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-results-list/headless-recent-results-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recommendation/headless-recommendation.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/relevance-inspector/headless-relevance-inspector.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/result-list/headless-interactive-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/standalone-search-box/headless-standalone-search-box.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/headless-static-filter.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/static-filter-value.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-execute-trigger.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/url-manager/headless-url-manager.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/advanced-search-queries/advanced-search-queries-state.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/search-action-cause.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/search-analytics-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-input/case-input-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/configuration/configuration-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/configuration/configuration-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/core-facet/core-facet-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/location-facet/location-facet-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/manual-numeric-facet-selectors.d.ts +1 -21
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/numeric-facet-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/pagination/pagination-selectors.d.ts +6 -126
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-selectors.d.ts +6 -160
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query/query-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-selectors.d.ts +2 -42
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +7 -181
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-actions.d.ts +13 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-selectors.d.ts +4 -48
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-state.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/context/context-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/context/context-selector.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/ranking-info-parser.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/dictionary-field-context/dictionary-field-context-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-selectors.d.ts +1 -21
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/excerpt-length/excerpt-length-selectors.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facet-options/facet-options-actions-loader.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-set-actions.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-actions.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/date-facet-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/date-facet-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/numeric-facet-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/numeric-facet-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/fields/fields-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-actions.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-analytics-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-insight-analytics-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-mocks.d.ts +11 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/instant-items/instant-items-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/pipeline/select-pipeline.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-selectors.d.ts +4 -48
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-actions.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/question-answering/question-answering-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recommendation/recommendation-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-hub/search-hub-selectors.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort-criteria/criteria-parser.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort-criteria/sort-criteria-selectors.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/static-filter-set/static-filter-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/static-filter-set/static-filter-set-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/tab-set/tab-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/tab-set/tab-set-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/insight.index.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-definitions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controller-utils.d.ts +6 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/engine/search-engine.ssr.d.ts +13 -25
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/factories/build-factory.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/factories/hydrated-state-factory.d.ts +5 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/factories/static-state-factory.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/build.d.ts +16 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/controller-definition.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/engine.d.ts +26 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/fetch-static-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/utils/controller-wiring.d.ts +21 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/utils/engine-wiring.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next.index.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-ssr-controller-definitions.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -10
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -9
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +7 -7
- package/package.json +2 -2
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
{
|
|
70
70
|
"name": "QuanticCategoryFacet",
|
|
71
71
|
"attribute": "quantic-category-facet",
|
|
72
|
-
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (
|
|
72
|
+
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (for example, number of occurrences).\nA <code>QuanticCategoryFacet</code> displays field values in a browsable, hierarchical fashion.\nCustom captions can be provided by adding caption provider components to the <code>captions</code> named slot.\nSee <a href=\"https://docs.coveo.com/en/quantic/latest/usage/create-custom-caption-provider-component/\">Create a custom caption provider component for Quantic facets</a>.</p>",
|
|
73
73
|
"categories": [
|
|
74
74
|
"Search",
|
|
75
75
|
"Insight Panel"
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
{
|
|
423
423
|
"name": "QuanticFacet",
|
|
424
424
|
"attribute": "quantic-facet",
|
|
425
|
-
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (
|
|
425
|
+
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (for example, number of occurrences).\nA <code>QuanticFacet</code> displays a facet of the results for the current query.\nCustom captions can be provided by adding caption provider components to the <code>captions</code> named slot.\nSee <a href=\"https://docs.coveo.com/en/quantic/latest/usage/create-custom-caption-provider-component/\">Create a custom caption provider component for Quantic facets</a>.</p>",
|
|
426
426
|
"categories": [
|
|
427
427
|
"Search",
|
|
428
428
|
"Insight Panel"
|
|
@@ -1919,7 +1919,7 @@
|
|
|
1919
1919
|
"name": "initialChoice",
|
|
1920
1920
|
"attribute": "initial-choice",
|
|
1921
1921
|
"access": "@api",
|
|
1922
|
-
"description": "<p>The initial selection for the number of result per page. It must be a positive number and should be part of the <code>choicesDisplayed</code> option.\nIf
|
|
1922
|
+
"description": "<p>The initial selection for the number of result per page. It must be a positive number and should be part of the <code>choicesDisplayed</code> option.\nIf omitted or not part of the <code>choicesDisplayed</code> option, it will default to the first value in <code>choicesDisplayed</code>.</p>",
|
|
1923
1923
|
"required": false,
|
|
1924
1924
|
"defaultValue": "`the first value in 'choicesDisplayed'`",
|
|
1925
1925
|
"type": "number"
|
|
@@ -2462,7 +2462,7 @@
|
|
|
2462
2462
|
{
|
|
2463
2463
|
"name": "QuanticSummary",
|
|
2464
2464
|
"attribute": "quantic-summary",
|
|
2465
|
-
"description": "<p>The <code>QuanticSummary</code> component displays information about the current range of results (
|
|
2465
|
+
"description": "<p>The <code>QuanticSummary</code> component displays information about the current range of results (for example, "Results 1-10 of 123").</p>",
|
|
2466
2466
|
"categories": [
|
|
2467
2467
|
"Search",
|
|
2468
2468
|
"Insight Panel"
|
|
@@ -2631,7 +2631,7 @@
|
|
|
2631
2631
|
"name": "amount",
|
|
2632
2632
|
"attribute": "amount",
|
|
2633
2633
|
"access": "@api",
|
|
2634
|
-
"description": "<p>The amount of the <code>unit</code> of time (
|
|
2634
|
+
"description": "<p>The amount of the <code>unit</code> of time (for example, <code>10 days</code>, <code>1 year</code>, etc.).</p>",
|
|
2635
2635
|
"required": false,
|
|
2636
2636
|
"defaultValue": "`1`",
|
|
2637
2637
|
"type": "number"
|
|
@@ -2642,7 +2642,7 @@
|
|
|
2642
2642
|
"access": "@api",
|
|
2643
2643
|
"description": "<p>The non-localized label for the timeframe. When defined, it will appear instead of the formatted value.</p>",
|
|
2644
2644
|
"required": false,
|
|
2645
|
-
"defaultValue": "Defaults to the formatted value based on amount, unit
|
|
2645
|
+
"defaultValue": "Defaults to the formatted value based on amount, unit, and period.",
|
|
2646
2646
|
"type": "string"
|
|
2647
2647
|
}
|
|
2648
2648
|
]
|
|
@@ -3909,7 +3909,7 @@
|
|
|
3909
3909
|
"name": "label",
|
|
3910
3910
|
"attribute": "label",
|
|
3911
3911
|
"access": "@api",
|
|
3912
|
-
"description": "<p>The label
|
|
3912
|
+
"description": "<p>The label displayed inside the heading.</p>",
|
|
3913
3913
|
"required": true,
|
|
3914
3914
|
"defaultValue": "",
|
|
3915
3915
|
"type": "string"
|
|
@@ -4156,7 +4156,7 @@
|
|
|
4156
4156
|
{
|
|
4157
4157
|
"name": "QuanticCategoryFacet",
|
|
4158
4158
|
"attribute": "quantic-category-facet",
|
|
4159
|
-
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (
|
|
4159
|
+
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (for example, number of occurrences).\nA <code>QuanticCategoryFacet</code> displays field values in a browsable, hierarchical fashion.\nCustom captions can be provided by adding caption provider components to the <code>captions</code> named slot.\nSee <a href=\"https://docs.coveo.com/en/quantic/latest/usage/create-custom-caption-provider-component/\">Create a custom caption provider component for Quantic facets</a>.</p>",
|
|
4160
4160
|
"categories": [
|
|
4161
4161
|
"Search",
|
|
4162
4162
|
"Insight Panel"
|
|
@@ -4418,7 +4418,7 @@
|
|
|
4418
4418
|
{
|
|
4419
4419
|
"name": "QuanticFacet",
|
|
4420
4420
|
"attribute": "quantic-facet",
|
|
4421
|
-
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (
|
|
4421
|
+
"description": "<p>A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (for example, number of occurrences).\nA <code>QuanticFacet</code> displays a facet of the results for the current query.\nCustom captions can be provided by adding caption provider components to the <code>captions</code> named slot.\nSee <a href=\"https://docs.coveo.com/en/quantic/latest/usage/create-custom-caption-provider-component/\">Create a custom caption provider component for Quantic facets</a>.</p>",
|
|
4422
4422
|
"categories": [
|
|
4423
4423
|
"Search",
|
|
4424
4424
|
"Insight Panel"
|
|
@@ -5715,7 +5715,7 @@
|
|
|
5715
5715
|
"name": "initialChoice",
|
|
5716
5716
|
"attribute": "initial-choice",
|
|
5717
5717
|
"access": "@api",
|
|
5718
|
-
"description": "<p>The initial selection for the number of result per page. It must be a positive number and should be part of the <code>choicesDisplayed</code> option.\nIf
|
|
5718
|
+
"description": "<p>The initial selection for the number of result per page. It must be a positive number and should be part of the <code>choicesDisplayed</code> option.\nIf omitted or not part of the <code>choicesDisplayed</code> option, it will default to the first value in <code>choicesDisplayed</code>.</p>",
|
|
5719
5719
|
"required": false,
|
|
5720
5720
|
"defaultValue": "`the first value in 'choicesDisplayed'`",
|
|
5721
5721
|
"type": "number"
|
|
@@ -5952,7 +5952,7 @@
|
|
|
5952
5952
|
{
|
|
5953
5953
|
"name": "QuanticSummary",
|
|
5954
5954
|
"attribute": "quantic-summary",
|
|
5955
|
-
"description": "<p>The <code>QuanticSummary</code> component displays information about the current range of results (
|
|
5955
|
+
"description": "<p>The <code>QuanticSummary</code> component displays information about the current range of results (for example, "Results 1-10 of 123").</p>",
|
|
5956
5956
|
"categories": [
|
|
5957
5957
|
"Search",
|
|
5958
5958
|
"Insight Panel"
|
|
@@ -6121,7 +6121,7 @@
|
|
|
6121
6121
|
"name": "amount",
|
|
6122
6122
|
"attribute": "amount",
|
|
6123
6123
|
"access": "@api",
|
|
6124
|
-
"description": "<p>The amount of the <code>unit</code> of time (
|
|
6124
|
+
"description": "<p>The amount of the <code>unit</code> of time (for example, <code>10 days</code>, <code>1 year</code>, etc.).</p>",
|
|
6125
6125
|
"required": false,
|
|
6126
6126
|
"defaultValue": "`1`",
|
|
6127
6127
|
"type": "number"
|
|
@@ -6132,7 +6132,7 @@
|
|
|
6132
6132
|
"access": "@api",
|
|
6133
6133
|
"description": "<p>The non-localized label for the timeframe. When defined, it will appear instead of the formatted value.</p>",
|
|
6134
6134
|
"required": false,
|
|
6135
|
-
"defaultValue": "Defaults to the formatted value based on amount, unit
|
|
6135
|
+
"defaultValue": "Defaults to the formatted value based on amount, unit, and period.",
|
|
6136
6136
|
"type": "string"
|
|
6137
6137
|
}
|
|
6138
6138
|
]
|
|
@@ -43,7 +43,7 @@ import {api, LightningElement, track} from 'lwc';
|
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (
|
|
46
|
+
* A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (for example, number of occurrences).
|
|
47
47
|
* A `QuanticCategoryFacet` displays field values in a browsable, hierarchical fashion.
|
|
48
48
|
* Custom captions can be provided by adding caption provider components to the `captions` named slot.
|
|
49
49
|
* See [Create a custom caption provider component for Quantic facets](https://docs.coveo.com/en/quantic/latest/usage/create-custom-caption-provider-component/).
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import {createElement} from 'lwc';
|
|
7
7
|
import QuanticCitation from '../quanticCitation';
|
|
8
|
+
import {debounce} from '../quanticCitation';
|
|
8
9
|
|
|
9
10
|
const functionsMocks = {
|
|
10
11
|
eventHandler: jest.fn((event) => event),
|
|
@@ -112,6 +113,67 @@ describe('c-quantic-citation', () => {
|
|
|
112
113
|
cleanup();
|
|
113
114
|
});
|
|
114
115
|
|
|
116
|
+
describe('debounce function', () => {
|
|
117
|
+
let mockFnToDebounce;
|
|
118
|
+
const DEBOUNCE_DELAY = 200;
|
|
119
|
+
|
|
120
|
+
beforeEach(() => {
|
|
121
|
+
jest.useFakeTimers();
|
|
122
|
+
mockFnToDebounce = jest.fn();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
afterEach(() => {
|
|
126
|
+
jest.useRealTimers();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// Ensures that rapid calls result in only one execution
|
|
130
|
+
test('should execute once after the delay and use the arguments from the last call', () => {
|
|
131
|
+
const debouncedFn = debounce(mockFnToDebounce, DEBOUNCE_DELAY);
|
|
132
|
+
|
|
133
|
+
debouncedFn('first');
|
|
134
|
+
expect(mockFnToDebounce).not.toHaveBeenCalled();
|
|
135
|
+
|
|
136
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY - 100);
|
|
137
|
+
debouncedFn('middle');
|
|
138
|
+
|
|
139
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY - 100);
|
|
140
|
+
debouncedFn('last');
|
|
141
|
+
|
|
142
|
+
expect(mockFnToDebounce).not.toHaveBeenCalled();
|
|
143
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY);
|
|
144
|
+
|
|
145
|
+
expect(mockFnToDebounce).toHaveBeenCalledTimes(1);
|
|
146
|
+
expect(mockFnToDebounce).toHaveBeenCalledWith('last');
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// Ensures calls separated by more than the delay execute independently.
|
|
150
|
+
test('should execute multiple times if calls are spaced outside the delay', () => {
|
|
151
|
+
const debouncedFn = debounce(mockFnToDebounce, DEBOUNCE_DELAY);
|
|
152
|
+
|
|
153
|
+
debouncedFn(100);
|
|
154
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY);
|
|
155
|
+
expect(mockFnToDebounce).toHaveBeenCalledTimes(1);
|
|
156
|
+
expect(mockFnToDebounce).toHaveBeenCalledWith(100);
|
|
157
|
+
|
|
158
|
+
debouncedFn(200, {data: 'second'});
|
|
159
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY);
|
|
160
|
+
expect(mockFnToDebounce).toHaveBeenCalledTimes(2);
|
|
161
|
+
expect(mockFnToDebounce).toHaveBeenCalledWith(200, {data: 'second'});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Ensures that the execution can be canceled before the delay expires.
|
|
165
|
+
test('should not execute the function if cancel is called before the delay', () => {
|
|
166
|
+
const debouncedFn = debounce(mockFnToDebounce, DEBOUNCE_DELAY);
|
|
167
|
+
|
|
168
|
+
debouncedFn('should not run');
|
|
169
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY / 2);
|
|
170
|
+
debouncedFn.cancel();
|
|
171
|
+
|
|
172
|
+
jest.advanceTimersByTime(DEBOUNCE_DELAY * 2);
|
|
173
|
+
expect(mockFnToDebounce).not.toHaveBeenCalled();
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
115
177
|
it('should properly display the citation', async () => {
|
|
116
178
|
const element = createTestComponent();
|
|
117
179
|
await flushPromises();
|
|
@@ -160,6 +222,31 @@ describe('c-quantic-citation', () => {
|
|
|
160
222
|
jest.useRealTimers();
|
|
161
223
|
});
|
|
162
224
|
|
|
225
|
+
it('should display the citation tooltip', async () => {
|
|
226
|
+
const element = createTestComponent();
|
|
227
|
+
await flushPromises();
|
|
228
|
+
|
|
229
|
+
const citationLink = element.shadowRoot.querySelector(
|
|
230
|
+
selectors.citationLink
|
|
231
|
+
);
|
|
232
|
+
const citationTooltip = element.shadowRoot.querySelector(
|
|
233
|
+
selectors.citationTooltip
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
expect(citationLink).not.toBeNull();
|
|
237
|
+
expect(citationTooltip).not.toBeNull();
|
|
238
|
+
|
|
239
|
+
// Spy on the tooltip's showTooltip method to verify it gets called
|
|
240
|
+
const showTooltipSpy = jest.spyOn(citationTooltip, 'showTooltip');
|
|
241
|
+
|
|
242
|
+
await citationLink.dispatchEvent(
|
|
243
|
+
new CustomEvent('mouseenter', {bubbles: true})
|
|
244
|
+
);
|
|
245
|
+
jest.advanceTimersByTime(200);
|
|
246
|
+
|
|
247
|
+
expect(showTooltipSpy).toHaveBeenCalledTimes(1);
|
|
248
|
+
});
|
|
249
|
+
|
|
163
250
|
it('should dispatch a citation hover event after hovering over the the citation for more than 1200ms, 200ms debounce duration before hover + 1000ms minimum hover duration', async () => {
|
|
164
251
|
const element = createTestComponent();
|
|
165
252
|
await flushPromises();
|
|
@@ -173,18 +260,20 @@ describe('c-quantic-citation', () => {
|
|
|
173
260
|
await citationLink.dispatchEvent(
|
|
174
261
|
new CustomEvent('mouseenter', {bubbles: true})
|
|
175
262
|
);
|
|
176
|
-
jest.advanceTimersByTime(
|
|
263
|
+
jest.advanceTimersByTime(1000);
|
|
177
264
|
await citationLink.dispatchEvent(
|
|
178
265
|
new CustomEvent('mouseleave', {bubbles: true})
|
|
179
266
|
);
|
|
267
|
+
// Additional 200ms delay for the new hide tooltip logic
|
|
268
|
+
jest.advanceTimersByTime(200);
|
|
180
269
|
|
|
181
270
|
expect(functionsMocks.eventHandler).toHaveBeenCalledTimes(1);
|
|
182
271
|
expect(functionsMocks.eventHandler).toHaveBeenCalledWith({
|
|
183
|
-
citationHoverTimeMs:
|
|
272
|
+
citationHoverTimeMs: 1200,
|
|
184
273
|
});
|
|
185
274
|
});
|
|
186
275
|
|
|
187
|
-
it('should not dispatch a citation hover event after hovering over the
|
|
276
|
+
it('should not dispatch a citation hover event after hovering over the citation for less than 1200ms', async () => {
|
|
188
277
|
const element = createTestComponent();
|
|
189
278
|
await flushPromises();
|
|
190
279
|
setupEventDispatchTest('quantic__citationhover');
|
|
@@ -201,9 +290,59 @@ describe('c-quantic-citation', () => {
|
|
|
201
290
|
await citationLink.dispatchEvent(
|
|
202
291
|
new CustomEvent('mouseleave', {bubbles: true})
|
|
203
292
|
);
|
|
293
|
+
// Additional 200ms delay for the new hide tooltip logic
|
|
294
|
+
jest.advanceTimersByTime(200);
|
|
204
295
|
|
|
205
296
|
expect(functionsMocks.eventHandler).toHaveBeenCalledTimes(0);
|
|
206
297
|
});
|
|
298
|
+
|
|
299
|
+
describe('when moving the cursor between the citation link and the tooltip', () => {
|
|
300
|
+
it('should keep the tooltip displayed', async () => {
|
|
301
|
+
const element = createTestComponent();
|
|
302
|
+
await flushPromises();
|
|
303
|
+
|
|
304
|
+
const citationLink = element.shadowRoot.querySelector(
|
|
305
|
+
selectors.citationLink
|
|
306
|
+
);
|
|
307
|
+
const citationTooltip = element.shadowRoot.querySelector(
|
|
308
|
+
selectors.citationTooltip
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
expect(citationLink).not.toBeNull();
|
|
312
|
+
expect(citationTooltip).not.toBeNull();
|
|
313
|
+
|
|
314
|
+
const hideTooltipSpy = jest.spyOn(citationTooltip, 'hideTooltip');
|
|
315
|
+
|
|
316
|
+
// Hover over the citation
|
|
317
|
+
await citationLink.dispatchEvent(
|
|
318
|
+
new CustomEvent('mouseenter', {bubbles: true})
|
|
319
|
+
);
|
|
320
|
+
jest.advanceTimersByTime(200);
|
|
321
|
+
|
|
322
|
+
// Move cursor to tooltip in less than 200ms
|
|
323
|
+
await citationLink.dispatchEvent(
|
|
324
|
+
new CustomEvent('mouseleave', {bubbles: true})
|
|
325
|
+
);
|
|
326
|
+
jest.advanceTimersByTime(100);
|
|
327
|
+
await citationTooltip.dispatchEvent(
|
|
328
|
+
new CustomEvent('mouseenter', {bubbles: true})
|
|
329
|
+
);
|
|
330
|
+
|
|
331
|
+
// Move cursor back to citation in less than 200ms
|
|
332
|
+
await citationTooltip.dispatchEvent(
|
|
333
|
+
new CustomEvent('mouseleave', {bubbles: true})
|
|
334
|
+
);
|
|
335
|
+
jest.advanceTimersByTime(100);
|
|
336
|
+
await citationLink.dispatchEvent(
|
|
337
|
+
new CustomEvent('mouseenter', {bubbles: true})
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
// Advance time beyond 200ms to see if tooltip is hidden
|
|
341
|
+
jest.advanceTimersByTime(300);
|
|
342
|
+
|
|
343
|
+
expect(hideTooltipSpy).toHaveBeenCalledTimes(0);
|
|
344
|
+
});
|
|
345
|
+
});
|
|
207
346
|
});
|
|
208
347
|
|
|
209
348
|
describe('when citation anchoring is enabled', () => {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
href={hrefValue}
|
|
9
9
|
target="_blank"
|
|
10
10
|
rel="noopener"
|
|
11
|
-
onmouseenter={
|
|
12
|
-
onmouseleave={
|
|
13
|
-
onclick={handleClick}
|
|
11
|
+
onmouseenter={handleCitationMouseEnter}
|
|
12
|
+
onmouseleave={handleCitationMouseLeave}
|
|
13
|
+
onclick={handleClick}
|
|
14
14
|
>
|
|
15
15
|
<p
|
|
16
16
|
class="citation__title slds-m-left_x-small slds-truncate slds-has-flexi-truncate"
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
{citationTitle}
|
|
19
19
|
</p>
|
|
20
20
|
</a>
|
|
21
|
-
<c-quantic-tooltip
|
|
21
|
+
<c-quantic-tooltip
|
|
22
|
+
light-theme
|
|
23
|
+
class="slds-show_medium"
|
|
24
|
+
target={template.host}
|
|
25
|
+
onmouseenter={handleTooltipMouseEnter}
|
|
26
|
+
onmouseleave={handleTooltipMouseLeave}
|
|
27
|
+
>
|
|
22
28
|
<div class="citation__tooltip" slot="content">
|
|
23
29
|
<div data-testid="citation__tooltip-uri" class="slds-text-body_small slds-text-color_weak slds-truncate slds-var-p-vertical_xxx-small">{hrefValue}</div>
|
|
24
30
|
<div data-testid="citation__tooltip-title" class="slds-text-title_bold slds-var-p-vertical_xx-small">{citationTitle}</div>
|
|
@@ -5,10 +5,28 @@ import {LightningElement, api} from 'lwc';
|
|
|
5
5
|
/** @typedef {import("coveo").InteractiveCitation} InteractiveCitation */
|
|
6
6
|
|
|
7
7
|
const minimumTooltipDisplayDurationMs = 1000;
|
|
8
|
-
const
|
|
9
|
-
|
|
8
|
+
const tooltipHideDelayMs = 200;
|
|
10
9
|
const supportedFileTypesForTextFragment = ['html', 'SalesforceItem'];
|
|
11
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Debounce function that delays invoking func until after wait milliseconds
|
|
13
|
+
* have elapsed since the last time the debounced function was invoked.
|
|
14
|
+
* Includes a cancel method to clear any pending timeout.
|
|
15
|
+
* @param {Function} fn - The function to debounce
|
|
16
|
+
* @param {number} delay - The number of milliseconds to delay
|
|
17
|
+
* @returns {Function} The debounced function with cancel method
|
|
18
|
+
*/
|
|
19
|
+
export function debounce(fn, delay) {
|
|
20
|
+
let timeout;
|
|
21
|
+
const debounced = (...args) => {
|
|
22
|
+
clearTimeout(timeout);
|
|
23
|
+
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
24
|
+
timeout = setTimeout(() => fn(...args), delay);
|
|
25
|
+
};
|
|
26
|
+
debounced.cancel = () => clearTimeout(timeout);
|
|
27
|
+
return debounced;
|
|
28
|
+
}
|
|
29
|
+
|
|
12
30
|
/**
|
|
13
31
|
* The `QuanticCitation` component renders an individual citation.
|
|
14
32
|
* @fires CustomEvent#quantic__citationhover
|
|
@@ -42,8 +60,6 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
42
60
|
/** @type {number} */
|
|
43
61
|
hoverStartTimestamp;
|
|
44
62
|
/** @type {boolean} */
|
|
45
|
-
shouldShowTooltipAfterDelay = false;
|
|
46
|
-
/** @type {boolean} */
|
|
47
63
|
tooltipIsDisplayed = false;
|
|
48
64
|
/** @type {function} */
|
|
49
65
|
removeBindings;
|
|
@@ -53,6 +69,8 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
53
69
|
salesforceRecordUrl;
|
|
54
70
|
/** @type {boolean} */
|
|
55
71
|
isHrefWithTextFragment = false;
|
|
72
|
+
/** @type {Object} */
|
|
73
|
+
hideTooltipDebounced;
|
|
56
74
|
|
|
57
75
|
connectedCallback() {
|
|
58
76
|
const fileType = this.citation?.fields?.filetype;
|
|
@@ -60,6 +78,15 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
60
78
|
!this.disableCitationAnchoring &&
|
|
61
79
|
supportedFileTypesForTextFragment.includes(fileType) &&
|
|
62
80
|
!!this.text;
|
|
81
|
+
|
|
82
|
+
// Initialize the debounced hide tooltip function
|
|
83
|
+
this.hideTooltipDebounced = debounce(() => {
|
|
84
|
+
if (this.tooltipIsDisplayed) {
|
|
85
|
+
this.dispatchCitationHoverEvent();
|
|
86
|
+
}
|
|
87
|
+
this.tooltipIsDisplayed = false;
|
|
88
|
+
this.tooltipComponent?.hideTooltip();
|
|
89
|
+
}, tooltipHideDelayMs);
|
|
63
90
|
}
|
|
64
91
|
|
|
65
92
|
renderedCallback() {
|
|
@@ -83,39 +110,53 @@ export default class QuanticCitation extends NavigationMixin(LightningElement) {
|
|
|
83
110
|
|
|
84
111
|
disconnectedCallback() {
|
|
85
112
|
this.removeBindings?.();
|
|
113
|
+
clearTimeout(this.timeout);
|
|
114
|
+
this.hideTooltipDebounced?.cancel();
|
|
86
115
|
}
|
|
87
116
|
|
|
88
|
-
|
|
89
|
-
this.
|
|
90
|
-
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
91
|
-
this.timeout = setTimeout(() => {
|
|
92
|
-
if (this.shouldShowTooltipAfterDelay) {
|
|
93
|
-
this.hoverStartTimestamp = Date.now();
|
|
94
|
-
this.tooltipIsDisplayed = true;
|
|
95
|
-
this.tooltipComponent.showTooltip();
|
|
96
|
-
}
|
|
97
|
-
}, debounceDurationBeforeHoverMs);
|
|
117
|
+
handleCitationMouseEnter() {
|
|
118
|
+
this.showTooltip();
|
|
98
119
|
}
|
|
99
120
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
121
|
+
handleCitationMouseLeave() {
|
|
122
|
+
this.hideTooltipDebounced();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
handleTooltipMouseEnter() {
|
|
126
|
+
this.hideTooltipDebounced.cancel();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
handleTooltipMouseLeave() {
|
|
130
|
+
this.hideTooltipDebounced();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Shows the tooltip immediately and cancels any pending hide.
|
|
135
|
+
*/
|
|
136
|
+
showTooltip() {
|
|
137
|
+
this.hideTooltipDebounced.cancel();
|
|
138
|
+
if (!this.tooltipIsDisplayed) {
|
|
139
|
+
this.hoverStartTimestamp = Date.now();
|
|
140
|
+
this.tooltipIsDisplayed = true;
|
|
141
|
+
this.tooltipComponent?.showTooltip();
|
|
114
142
|
}
|
|
143
|
+
}
|
|
115
144
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Dispatches the citation hover analytics event if minimum display duration was met.
|
|
147
|
+
*/
|
|
148
|
+
dispatchCitationHoverEvent() {
|
|
149
|
+
const tooltipDisplayDuration = Date.now() - this.hoverStartTimestamp;
|
|
150
|
+
if (tooltipDisplayDuration >= minimumTooltipDisplayDurationMs) {
|
|
151
|
+
this.dispatchEvent(
|
|
152
|
+
new CustomEvent('quantic__citationhover', {
|
|
153
|
+
detail: {
|
|
154
|
+
citationHoverTimeMs: tooltipDisplayDuration,
|
|
155
|
+
},
|
|
156
|
+
bubbles: true,
|
|
157
|
+
})
|
|
158
|
+
);
|
|
159
|
+
}
|
|
119
160
|
}
|
|
120
161
|
|
|
121
162
|
/**
|
|
@@ -46,7 +46,7 @@ import {LightningElement, track, api} from 'lwc';
|
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (
|
|
49
|
+
* A facet is a list of values for a certain field occurring in the results, ordered using a configurable criterion (for example, number of occurrences).
|
|
50
50
|
* A `QuanticFacet` displays a facet of the results for the current query.
|
|
51
51
|
* Custom captions can be provided by adding caption provider components to the `captions` named slot.
|
|
52
52
|
* See [Create a custom caption provider component for Quantic facets](https://docs.coveo.com/en/quantic/latest/usage/create-custom-caption-provider-component/).
|
|
@@ -42,7 +42,7 @@ export default class QuanticResultsPerPage extends LightningElement {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* The initial selection for the number of result per page. It must be a positive number and should be part of the `choicesDisplayed` option.
|
|
45
|
-
* If
|
|
45
|
+
* If omitted or not part of the `choicesDisplayed` option, it will default to the first value in `choicesDisplayed`.
|
|
46
46
|
* @api
|
|
47
47
|
* @type {number}
|
|
48
48
|
* @defaultValue `the first value in 'choicesDisplayed'`
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {testSearch, testInsight} from './fixture';
|
|
2
2
|
import {
|
|
3
3
|
useCaseTestCases,
|
|
4
|
-
useCaseEnum,
|
|
5
4
|
} from '../../../../../../playwright/utils/useCase';
|
|
6
5
|
import {
|
|
7
6
|
AnalyticsModeEnum,
|
|
@@ -117,10 +116,6 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
117
116
|
});
|
|
118
117
|
|
|
119
118
|
test.describe('when clicking on a recent query', () => {
|
|
120
|
-
test.skip(
|
|
121
|
-
useCase.value === useCaseEnum.insight,
|
|
122
|
-
'Recent queries are not available in Insight use case'
|
|
123
|
-
);
|
|
124
119
|
test.use({
|
|
125
120
|
recentQueries: mockRecentQueries,
|
|
126
121
|
});
|
|
@@ -157,10 +152,6 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
157
152
|
});
|
|
158
153
|
|
|
159
154
|
test.describe('when clicking on the clear recent queries button', () => {
|
|
160
|
-
test.skip(
|
|
161
|
-
useCase.value === useCaseEnum.insight,
|
|
162
|
-
'Recent queries are not available in Insight use case'
|
|
163
|
-
);
|
|
164
155
|
test.use({
|
|
165
156
|
recentQueries: mockRecentQueries,
|
|
166
157
|
});
|
|
@@ -224,10 +215,6 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
224
215
|
});
|
|
225
216
|
|
|
226
217
|
test.describe('when selecting a recent query', () => {
|
|
227
|
-
test.skip(
|
|
228
|
-
useCase.value === useCaseEnum.insight,
|
|
229
|
-
'Recent queries are not available in Insight use case'
|
|
230
|
-
);
|
|
231
218
|
test.use({
|
|
232
219
|
recentQueries: mockRecentQueries,
|
|
233
220
|
});
|
|
@@ -265,10 +252,6 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
265
252
|
});
|
|
266
253
|
|
|
267
254
|
test.describe('when selecting the clear recent queries button', () => {
|
|
268
|
-
test.skip(
|
|
269
|
-
useCase.value === useCaseEnum.insight,
|
|
270
|
-
'Recent queries are not available in Insight use case'
|
|
271
|
-
);
|
|
272
255
|
test.use({
|
|
273
256
|
recentQueries: mockRecentQueries,
|
|
274
257
|
});
|
|
@@ -18,7 +18,7 @@ import {LightningElement, track, api} from 'lwc';
|
|
|
18
18
|
/** @typedef {import("coveo").QuerySummaryState} QuerySummaryState */
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* The `QuanticSummary` component displays information about the current range of results (
|
|
21
|
+
* The `QuanticSummary` component displays information about the current range of results (for example, "Results 1-10 of 123").
|
|
22
22
|
* @category Search
|
|
23
23
|
* @category Insight Panel
|
|
24
24
|
* @example
|
|
@@ -29,7 +29,7 @@ export default class QuanticTimeframe extends LightningElement {
|
|
|
29
29
|
@api unit = 'day';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The amount of the `unit` of time (
|
|
32
|
+
* The amount of the `unit` of time (for example, `10 days`, `1 year`, etc.).
|
|
33
33
|
* @api
|
|
34
34
|
* @type {number}
|
|
35
35
|
* @defaultValue `1`
|
|
@@ -40,7 +40,7 @@ export default class QuanticTimeframe extends LightningElement {
|
|
|
40
40
|
* The non-localized label for the timeframe. When defined, it will appear instead of the formatted value.
|
|
41
41
|
* @api
|
|
42
42
|
* @type {string}
|
|
43
|
-
* @defaultValue Defaults to the formatted value based on amount, unit
|
|
43
|
+
* @defaultValue Defaults to the formatted value based on amount, unit, and period.
|
|
44
44
|
*/
|
|
45
45
|
@api label;
|
|
46
46
|
}
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* @typedef {Object} SimpleFacetValue
|
|
9
9
|
* @property {string} value - The value of the facet.
|
|
10
|
-
* @property {string} state - The state of the facet (
|
|
10
|
+
* @property {string} state - The state of the facet (for example, "selected").
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {Object} CategoryFacetValue
|
|
15
15
|
* @property {string} value - The value of the facet.
|
|
16
|
-
* @property {string} state - The state of the facet (
|
|
16
|
+
* @property {string} state - The state of the facet (for example, "selected").
|
|
17
17
|
* @property {SimpleFacetValue[]} children - An array of SimpleFacetValue representing child categories.
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -507,10 +507,10 @@ export class DateUtils {
|
|
|
507
507
|
* Parses a given timestamp into detailed date components.
|
|
508
508
|
* @param {number} timestamp - The timestamp in milliseconds since January 1, 1970 (epoch time).
|
|
509
509
|
* @returns {Object} An object containing the following date details:
|
|
510
|
-
* - {number} year - The four-digit year (
|
|
511
|
-
* - {string} month - The full name of the month (
|
|
512
|
-
* - {string} dayOfWeek - The abbreviated name of the day of the week (
|
|
513
|
-
* - {number} day - The day of the month (
|
|
510
|
+
* - {number} year - The four-digit year (for example, 2024).
|
|
511
|
+
* - {string} month - The full name of the month (for example, "August").
|
|
512
|
+
* - {string} dayOfWeek - The abbreviated name of the day of the week (for example, "Mon").
|
|
513
|
+
* - {number} day - The day of the month (for example, 26).
|
|
514
514
|
* - {number} hours - The hour of the day in 24-hour format (0-23).
|
|
515
515
|
* - {number} minutes - The minutes of the hour (0-59).
|
|
516
516
|
*/
|