@coveo/quantic 3.14.3 → 3.15.0
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 +2 -2
- package/force-app/main/default/lwc/quanticCaseClassification/__tests__/quanticCaseClassification.test.js +819 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/data.ts +23 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/fixture.ts +51 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/pageObject.ts +152 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/quanticCaseClassification.e2e.ts +269 -0
- package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.html +6 -6
- package/force-app/main/default/lwc/quanticFacetManager/__tests__/quanticFacetManager.test.js +178 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +63 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/pageObject.ts +23 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +82 -0
- package/force-app/main/default/lwc/quanticFacetManager/quanticFacetManager.js +1 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +54 -10
- package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js +19 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.css +4 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +17 -0
- package/force-app/main/default/lwc/quanticTooltip/__tests__/quanticTooltip.test.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +2 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts +6 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-category-field-suggestions.d.ts +5 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-field-suggestions-generator.d.ts +9 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-category-filter-suggestions.d.ts +87 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.d.ts +38 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +16 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions.d.ts +88 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/headless.js +3 -5
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +3 -5
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -4
- package/package.json +2 -2
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { FieldSuggestionsFacet } from '../../../api/commerce/search/query-suggest/query-suggest-response.js';
|
|
2
|
+
import { SpecificFacetSearchResult } from '../../../api/search/facet-search/specific-facet-search/specific-facet-search-response.js';
|
|
3
|
+
import { CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js';
|
|
4
|
+
import { Controller } from '../../controller/headless-controller.js';
|
|
5
|
+
import { FacetControllerType } from '../core/facets/headless-core-commerce-facet.js';
|
|
6
|
+
import { RegularFacetSearchState } from '../core/facets/regular/headless-commerce-regular-facet-search.js';
|
|
7
|
+
import { RegularFacetOptions } from '../core/facets/regular/headless-commerce-regular-facet.js';
|
|
8
|
+
export type { SpecificFacetSearchResult };
|
|
9
|
+
/**
|
|
10
|
+
* The state of the `FilterSuggestions` controller.
|
|
11
|
+
*
|
|
12
|
+
* @group Buildable controllers
|
|
13
|
+
* @category FilterSuggestions
|
|
14
|
+
*/
|
|
15
|
+
export type FilterSuggestionsState = RegularFacetSearchState & Pick<FieldSuggestionsFacet, 'facetId' | 'displayName' | 'field'>;
|
|
16
|
+
/**
|
|
17
|
+
* The `FilterSuggestions` controller provides methods to request and interact with facet suggestions based on a
|
|
18
|
+
* specific field for a given search query.
|
|
19
|
+
*
|
|
20
|
+
* @alpha This controller relies on a Commerce API functionality that is not yet generally available. If you wish to
|
|
21
|
+
* use this feature in an implementation, please contact your Coveo representative.
|
|
22
|
+
*
|
|
23
|
+
* @group Buildable controllers
|
|
24
|
+
* @category FilterSuggestions
|
|
25
|
+
*/
|
|
26
|
+
export interface FilterSuggestions extends Controller, FacetControllerType<'regular'> {
|
|
27
|
+
/**
|
|
28
|
+
* Resets the query in the controller state and clears the filter suggestions.
|
|
29
|
+
*/
|
|
30
|
+
clear(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the serialized search parameters for the current search query and specified filter suggestion.
|
|
33
|
+
*
|
|
34
|
+
* For example, `q=jeans&f-cat_color=Blue`.
|
|
35
|
+
*
|
|
36
|
+
* In a typical scenario, this method should be called when the user selects a filter suggestion from a standalone
|
|
37
|
+
* search box. The returned string is then used to pass the correct URL query parametes or fragment when redirecting
|
|
38
|
+
* the browser to the search page.
|
|
39
|
+
*
|
|
40
|
+
* When the user selects a filter suggestion from the main search box on the search page, use the `select` method
|
|
41
|
+
* instead.
|
|
42
|
+
*
|
|
43
|
+
* @param value - The filter suggestion to serialize.
|
|
44
|
+
* @returns The serialized search parameters for the current search query and specified filter suggestion.
|
|
45
|
+
*/
|
|
46
|
+
getSearchParameters(value: SpecificFacetSearchResult): string;
|
|
47
|
+
/**
|
|
48
|
+
* Clears all facet values, selects the specified filter suggestion, updates the query, and executes a new search
|
|
49
|
+
* request.
|
|
50
|
+
*
|
|
51
|
+
* In a typical scenario, this method should be called when the user selects a filter suggestion from the main search
|
|
52
|
+
* box on the search page.
|
|
53
|
+
*
|
|
54
|
+
* When the user selects a filter suggestion from a standalone search box, use the `getSearchParameters` method
|
|
55
|
+
* instead.
|
|
56
|
+
*
|
|
57
|
+
* @param value - The filter suggestion to select.
|
|
58
|
+
*/
|
|
59
|
+
select(value: SpecificFacetSearchResult): void;
|
|
60
|
+
/**
|
|
61
|
+
* Sets the query in the controller state to the specified value and requests filter suggestions based on the updated
|
|
62
|
+
* query.
|
|
63
|
+
*
|
|
64
|
+
* For example, if this method is called with `jeans` as an argument, it will request values from the controller's
|
|
65
|
+
* field (e.g., `ec_brand`) that would return results if selected when the search query is `jeans` (such as
|
|
66
|
+
* `Calvin Klein`, `Columbia`, and `Nautica`).
|
|
67
|
+
*
|
|
68
|
+
* @param query - The search query to use as context to request the category filter suggestions. In a typical
|
|
69
|
+
* scenario, this should set to the current value of the search box input.
|
|
70
|
+
*/
|
|
71
|
+
updateQuery(query: string): void;
|
|
72
|
+
state: FilterSuggestionsState;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The `FilterSuggestions` controller provides methods to request and interact with facet suggestions based on a
|
|
76
|
+
* specific field for a given search query.
|
|
77
|
+
*
|
|
78
|
+
* @alpha This controller relies on a Commerce API functionality that is not yet generally available. If you wish to use this
|
|
79
|
+
* feature in an implementation, please contact your Coveo representative.
|
|
80
|
+
*
|
|
81
|
+
* @param engine - The headless commerce engine.
|
|
82
|
+
* @param options - The options for the `FilterSuggestions` controller.
|
|
83
|
+
* @returns A `FilterSuggestions` controller instance.
|
|
84
|
+
*
|
|
85
|
+
* @group Buildable controllers
|
|
86
|
+
* @category FilterSuggestions
|
|
87
|
+
*/
|
|
88
|
+
export declare function buildFilterSuggestions(engine: CommerceEngine, options: RegularFacetOptions): FilterSuggestions;
|
package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts
CHANGED
|
@@ -113,8 +113,8 @@ export type { Summary, ProductListingSummaryState, RecommendationsSummaryState,
|
|
|
113
113
|
export { defineSummary } from './controllers/commerce/core/summary/headless-core-summary.ssr.js';
|
|
114
114
|
export type { RecentQueriesList, RecentQueriesListOptions, RecentQueriesListProps, RecentQueriesListInitialState, RecentQueriesState, RecentQueriesListDefinition, } from './controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.js';
|
|
115
115
|
export { defineRecentQueriesList } from './controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.js';
|
|
116
|
-
export type {
|
|
117
|
-
export {
|
|
116
|
+
export type { FilterSuggestions, FilterSuggestionsState, CategoryFilterSuggestions, CategoryFilterSuggestionsState, FieldSuggestionsFacet, GeneratedFilterSuggestionsControllers, FilterSuggestionsGenerator, FilterSuggestionsGeneratorDefinition, } from './controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.ssr.js';
|
|
117
|
+
export { defineFilterSuggestionsGenerator } from './controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.ssr.js';
|
|
118
118
|
export type { NotifyTrigger, NotifyTriggerState, NotifyTriggerDefinition, } from './controllers/commerce/triggers/headless-notify-trigger.ssr.js';
|
|
119
119
|
export { defineNotifyTrigger } from './controllers/commerce/triggers/headless-notify-trigger.ssr.js';
|
|
120
120
|
export type { QueryTrigger, QueryTriggerState, QueryTriggerDefinition, } from './controllers/commerce/triggers/headless-query-trigger.ssr.js';
|