@coveo/quantic 3.13.0 → 3.14.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 +11 -2
- package/force-app/main/default/labels/CustomLabels.labels-meta.xml +2 -2
- package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +6 -12
- package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +113 -6
- package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js +32 -5
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +1 -1
- package/force-app/main/default/lwc/quanticResultsPerPage/__tests__/quanticResultsPerPage.test.js +404 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +74 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/pageObject.ts +85 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/quanticResultsPerPage.e2e.ts +97 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.html +1 -1
- package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.js +44 -9
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/data.ts +2 -11
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +9 -5
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/pageObject.ts +1 -1
- package/force-app/main/default/lwc/quanticSmartSnippetAnswer/quanticSmartSnippetAnswer.html +1 -1
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/__tests__/quanticSmartSnippetSuggestions.test.js +329 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/data.ts +31 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +93 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/pageObject.ts +160 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/quanticSmartSnippetSuggestions.e2e.ts +127 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/quanticSmartSnippetSuggestions.html +2 -1
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-response.d.ts +5 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/context/cart/headless-cart.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/context/headless-context.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/summary/headless-core-summary.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/instant-products/headless-instant-products.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +3 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-view/headless-product-view.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.ssr.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search/did-you-mean/headless-did-you-mean.ssr.d.ts +1 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search-box/headless-search-box.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search-box/headless-search-box.ssr.d.ts +1 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/triggers/headless-notify-trigger.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/triggers/headless-query-trigger.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/triggers/headless-redirection-trigger.ssr.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recent-queries/recent-queries-slice.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +4 -3
- package/force-app/main/default/staticresources/coveoheadless/headless.js +8 -8
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +7 -7
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +6 -6
- package/package.json +10 -10
|
@@ -10,6 +10,7 @@ export interface InsightInterface {
|
|
|
10
10
|
facets: Facet[];
|
|
11
11
|
tabs: Tab[];
|
|
12
12
|
settings: SettingsSection;
|
|
13
|
+
answerConfigId?: string;
|
|
13
14
|
}
|
|
14
15
|
interface InsightResultTemplate {
|
|
15
16
|
name: string;
|
|
@@ -59,10 +60,13 @@ interface Tab {
|
|
|
59
60
|
label: string;
|
|
60
61
|
conditions: Condition[];
|
|
61
62
|
}
|
|
63
|
+
interface InsightGenQAOptions extends InsightOption {
|
|
64
|
+
collapsible: boolean;
|
|
65
|
+
}
|
|
62
66
|
interface SettingsSection {
|
|
63
67
|
createArticle: InsightOption;
|
|
64
68
|
fullSearch: InsightOption;
|
|
65
|
-
genQA:
|
|
69
|
+
genQA: InsightGenQAOptions;
|
|
66
70
|
userActions: InsightUserActionOptions;
|
|
67
71
|
}
|
|
68
72
|
interface InsightUserActionOptions {
|
package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts
CHANGED
|
@@ -130,3 +130,4 @@ export type { SearchParameters } from './features/search-parameters/search-param
|
|
|
130
130
|
export type { CommerceSearchParameters } from './features/commerce/search-parameters/search-parameters-actions.js';
|
|
131
131
|
export { HighlightUtils };
|
|
132
132
|
export { deserializeRelativeDate, validateRelativeDate, } from './api/search/date/relative-date.js';
|
|
133
|
+
export { productListingSerializer, searchSerializer, } from './features/commerce/parameters/parameters-serializer.js';
|
|
@@ -6,7 +6,5 @@ export type { BreadcrumbManager, BreadcrumbManagerState };
|
|
|
6
6
|
* @group Definers
|
|
7
7
|
*
|
|
8
8
|
* @returns The `BreadcrumbManager` controller definition.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
9
|
*/
|
|
12
10
|
export declare function defineBreadcrumbManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<BreadcrumbManager, TOptions>;
|
|
@@ -7,7 +7,5 @@ export type { Pagination, PaginationProps, PaginationState };
|
|
|
7
7
|
*
|
|
8
8
|
* @param props - The configurable `Pagination` properties.
|
|
9
9
|
* @returns The `Pagination` controller definition.
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
10
|
*/
|
|
13
11
|
export declare function definePagination<TOptions extends ControllerDefinitionOption | undefined>(props?: PaginationProps & TOptions): SubControllerDefinitionWithoutProps<Pagination, TOptions>;
|
|
@@ -9,8 +9,6 @@ export type { ParameterManager, ParameterManagerProps, ParameterManagerState, Pa
|
|
|
9
9
|
* @group Definers
|
|
10
10
|
*
|
|
11
11
|
* @returns The `ParameterManager` controller definition.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
12
|
*/
|
|
15
13
|
export declare function defineParameterManager<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithProps<ParameterManager<MappedParameterTypes<TOptions>>, TOptions, SSRParameterManagerProps<MappedParameterTypes<TOptions>>>;
|
|
16
14
|
export interface SSRParameterManagerProps<T extends Parameters> extends Omit<ParameterManagerProps<T>, 'excludeDefaultParameters'> {
|
|
@@ -7,7 +7,5 @@ export type { Sort, SortProps, SortState };
|
|
|
7
7
|
*
|
|
8
8
|
* @param props - The configurable `Sort` properties.
|
|
9
9
|
* @returns The `Sort` controller definition.
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
10
|
*/
|
|
13
11
|
export declare function defineSort<TOptions extends ControllerDefinitionOption | undefined>(props?: SortProps & TOptions): SubControllerDefinitionWithoutProps<Sort, TOptions>;
|
|
@@ -9,7 +9,5 @@ export type { Summary, ProductListingSummaryState, RecommendationsSummaryState,
|
|
|
9
9
|
* @group Definers
|
|
10
10
|
*
|
|
11
11
|
* @returns The `Summary` controller definition.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
12
|
*/
|
|
15
13
|
export declare function defineSummary<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<Summary<ProductListingSummaryState | SearchSummaryState | RecommendationsSummaryState>, TOptions>;
|
|
@@ -12,7 +12,5 @@ export interface FieldSuggestionsGeneratorDefinition extends NonRecommendationCo
|
|
|
12
12
|
* @group Definers
|
|
13
13
|
*
|
|
14
14
|
* @returns The `FieldSuggestionsGenerator` controller definition.
|
|
15
|
-
*
|
|
16
|
-
* @internal
|
|
17
15
|
*/
|
|
18
16
|
export declare function defineFieldSuggestionsGenerator(): FieldSuggestionsGeneratorDefinition;
|
|
@@ -9,7 +9,5 @@ export interface InstantProductsDefinition extends NonRecommendationControllerDe
|
|
|
9
9
|
* @group Definers
|
|
10
10
|
*
|
|
11
11
|
* @returns The `InstantProducts` controller definition.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
12
|
*/
|
|
15
13
|
export declare function defineInstantProducts(props?: InstantProductsProps): InstantProductsDefinition;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ControllerDefinitionOption, SubControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { ProductListing } from '../product-listing/headless-product-listing.js';
|
|
3
3
|
import { Search } from '../search/headless-search.js';
|
|
4
|
-
export type { ProductListingState as ProductListState } from '../product-listing/headless-product-listing.js';
|
|
4
|
+
export type { ProductListing, ProductListingState as ProductListState, } from '../product-listing/headless-product-listing.js';
|
|
5
|
+
export type { Search } from '../search/headless-search.js';
|
|
5
6
|
export type ProductList = Pick<ProductListing | Search, 'state' | 'subscribe' | 'interactiveProduct' | 'promoteChildToParent'>;
|
|
6
7
|
/**
|
|
7
8
|
* Defines a `ProductList` controller instance.
|
|
8
9
|
* @group Definers
|
|
9
10
|
*
|
|
10
11
|
* @returns The `ProductList` controller definition.
|
|
11
|
-
|
|
12
|
-
* @internal
|
|
13
|
-
* */
|
|
12
|
+
*/
|
|
14
13
|
export declare function defineProductList<TOptions extends ControllerDefinitionOption | undefined>(options?: TOptions): SubControllerDefinitionWithoutProps<ProductList, TOptions>;
|
|
@@ -10,7 +10,5 @@ export interface RecentQueriesListDefinition extends NonRecommendationController
|
|
|
10
10
|
*
|
|
11
11
|
* @param props - The configuration `RecentQueriesList` properties.
|
|
12
12
|
* @returns The `RecentQueriesList` controller definition.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
13
|
*/
|
|
16
14
|
export declare function defineRecentQueriesList(props?: RecentQueriesListProps): RecentQueriesListDefinition;
|
|
@@ -2,16 +2,12 @@ import { recommendationInternalOptionKey, RecommendationOnlyControllerDefinition
|
|
|
2
2
|
import { RecommendationsOptions, RecommendationsState } from '../recommendations/headless-recommendations.js';
|
|
3
3
|
import { RecommendationsProps, Recommendations } from './headless-recommendations.js';
|
|
4
4
|
export type { Recommendations, RecommendationsState };
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
* */
|
|
8
5
|
export type RecommendationsDefinitionMeta = {
|
|
9
6
|
[recommendationInternalOptionKey]: {} & RecommendationsProps['options'];
|
|
10
7
|
};
|
|
11
8
|
export interface RecommendationsDefinition extends RecommendationOnlyControllerDefinitionWithProps<Recommendations, Partial<RecommendationsOptions>> {
|
|
12
9
|
}
|
|
13
10
|
/**
|
|
14
|
-
* @internal
|
|
15
11
|
* Defines a `Recommendations` controller instance.
|
|
16
12
|
* @group Definers
|
|
17
13
|
*
|
|
@@ -2,7 +2,7 @@ import { CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js'
|
|
|
2
2
|
import { Delimiters, SuggestionHighlightingOptions } from '../../../utils/highlight.js';
|
|
3
3
|
import { SearchBoxState, SearchBox as CoreSearchBox, Suggestion } from '../../core/search-box/headless-core-search-box.js';
|
|
4
4
|
import { SearchBoxOptions } from './headless-search-box-options.js';
|
|
5
|
-
export type { SearchBoxOptions, SearchBoxState, SuggestionHighlightingOptions, Suggestion, Delimiters, };
|
|
5
|
+
export type { SearchBoxOptions, SearchBoxState, SuggestionHighlightingOptions, Suggestion, Delimiters, CoreSearchBox, };
|
|
6
6
|
export interface SearchBoxProps {
|
|
7
7
|
/**
|
|
8
8
|
* The `SearchBox` controller options.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchOnlyControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { SearchBox, SearchBoxProps, SearchBoxOptions, Suggestion } from './headless-search-box.js';
|
|
3
|
-
export type { SearchBoxState, SearchBox, SearchBoxProps, } from './headless-search-box.js';
|
|
3
|
+
export type { SearchBoxState, SearchBox, SearchBoxProps, CoreSearchBox, } from './headless-search-box.js';
|
|
4
4
|
export type { SearchBoxOptions, Suggestion };
|
|
5
5
|
export interface SearchBoxDefinition extends SearchOnlyControllerDefinitionWithoutProps<SearchBox> {
|
|
6
6
|
}
|
|
@@ -9,7 +9,5 @@ export interface SearchBoxDefinition extends SearchOnlyControllerDefinitionWitho
|
|
|
9
9
|
* @group Definers
|
|
10
10
|
*
|
|
11
11
|
* @returns The `SearchBox` controller definition.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
12
|
*/
|
|
15
13
|
export declare function defineSearchBox(props?: SearchBoxProps): SearchBoxDefinition;
|
|
@@ -12,7 +12,5 @@ export interface StandaloneSearchBoxDefinition extends ListingAndStandaloneContr
|
|
|
12
12
|
*
|
|
13
13
|
* @param props - The configurable `StandaloneSearchBox` properties.
|
|
14
14
|
* @returns The `StandaloneSearchBox` controller definition.
|
|
15
|
-
*
|
|
16
|
-
* @internal
|
|
17
15
|
*/
|
|
18
16
|
export declare function defineStandaloneSearchBox(props: StandaloneSearchBoxProps): StandaloneSearchBoxDefinition;
|
|
@@ -9,7 +9,5 @@ export interface RedirectionTriggerDefinition extends SearchOnlyControllerDefini
|
|
|
9
9
|
* @group Definers
|
|
10
10
|
*
|
|
11
11
|
* @returns The `NotifyTrigger` controller definition.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
12
|
*/
|
|
15
13
|
export declare function defineRedirectionTrigger(): RedirectionTriggerDefinition;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type Draft as WritableDraft } from '@reduxjs/toolkit';
|
|
2
|
+
import { registerRecentQueries as registerCommerceRecentQueries } from '../commerce/recent-queries/recent-queries-actions.js';
|
|
3
|
+
import { registerRecentQueries } from './recent-queries-actions.js';
|
|
2
4
|
import { RecentQueriesState } from './recent-queries-state.js';
|
|
3
5
|
export declare const recentQueriesReducer: import("redux").Reducer<RecentQueriesState> & {
|
|
4
6
|
getInitialState: () => RecentQueriesState;
|
|
5
7
|
};
|
|
6
|
-
export declare function handleRegisterQueries(state: WritableDraft<RecentQueriesState>, action:
|
|
8
|
+
export declare function handleRegisterQueries(state: WritableDraft<RecentQueriesState>, action: ReturnType<typeof registerRecentQueries> | ReturnType<typeof registerCommerceRecentQueries>): void;
|
|
7
9
|
export declare function handleClearRecentQueries(state: WritableDraft<RecentQueriesState>): void;
|
|
8
10
|
export declare function handleExecuteSearchFulfilled(query: string, state: WritableDraft<RecentQueriesState>): void;
|
package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts
CHANGED
|
@@ -93,17 +93,17 @@ export type { Pagination, PaginationProps, PaginationState, } from './controller
|
|
|
93
93
|
export { definePagination } from './controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.js';
|
|
94
94
|
export type { ParameterManager, ParameterManagerProps, SSRParameterManagerProps, ParameterManagerState, Parameters, ProductListingParameters, CommerceSearchParameters, } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
95
95
|
export { defineParameterManager } from './controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
96
|
-
export type { ProductList, ProductListState, } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
96
|
+
export type { ProductList, ProductListState, ProductListing, Search, } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
97
97
|
export { defineProductList } from './controllers/commerce/product-list/headless-product-list.ssr.js';
|
|
98
98
|
export type { ProductView } from './controllers/commerce/product-view/headless-product-view.ssr.js';
|
|
99
99
|
export { defineProductView } from './controllers/commerce/product-view/headless-product-view.ssr.js';
|
|
100
|
-
export type { RecommendationsState, Recommendations, } from './controllers/commerce/recommendations/headless-recommendations.ssr.js';
|
|
100
|
+
export type { RecommendationsState, Recommendations, RecommendationsDefinition, } from './controllers/commerce/recommendations/headless-recommendations.ssr.js';
|
|
101
101
|
export { defineRecommendations } from './controllers/commerce/recommendations/headless-recommendations.ssr.js';
|
|
102
102
|
export type { Cart, CartInitialState, CartItem, CartProps, CartState, CartBuildProps, CartDefinition, } from './controllers/commerce/context/cart/headless-cart.ssr.js';
|
|
103
103
|
export { defineCart } from './controllers/commerce/context/cart/headless-cart.ssr.js';
|
|
104
104
|
export type { Context, ContextOptions, ContextProps, ContextState, View, UserLocation, ContextDefinition, } from './controllers/commerce/context/headless-context.ssr.js';
|
|
105
105
|
export { defineContext } from './controllers/commerce/context/headless-context.ssr.js';
|
|
106
|
-
export type { SearchBox, SearchBoxOptions, SearchBoxProps, SearchBoxState, Suggestion, SearchBoxDefinition, } from './controllers/commerce/search-box/headless-search-box.ssr.js';
|
|
106
|
+
export type { SearchBox, SearchBoxOptions, SearchBoxProps, SearchBoxState, Suggestion, SearchBoxDefinition, CoreSearchBox, } from './controllers/commerce/search-box/headless-search-box.ssr.js';
|
|
107
107
|
export { defineSearchBox } from './controllers/commerce/search-box/headless-search-box.ssr.js';
|
|
108
108
|
export type { Sort, SortProps, SortState, } from './controllers/commerce/core/sort/headless-core-commerce-sort.ssr.js';
|
|
109
109
|
export { defineSort } from './controllers/commerce/core/sort/headless-core-commerce-sort.ssr.js';
|
|
@@ -125,6 +125,7 @@ export type { StandaloneSearchBox, StandaloneSearchBoxProps, StandaloneSearchBox
|
|
|
125
125
|
export { defineStandaloneSearchBox } from './controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.js';
|
|
126
126
|
export type { InstantProducts, InstantProductsOptions, InstantProductsState, InstantProductsProps, InstantProductsDefinition, } from './controllers/commerce/instant-products/headless-instant-products.ssr.js';
|
|
127
127
|
export { defineInstantProducts } from './controllers/commerce/instant-products/headless-instant-products.ssr.js';
|
|
128
|
+
export type { InteractiveProduct, InteractiveProductOptions, InteractiveProductProps, } from './controllers/commerce/core/interactive-product/headless-core-interactive-product.js';
|
|
128
129
|
export * from './features/commerce/context/context-actions-loader.js';
|
|
129
130
|
export * from './features/commerce/search/search-actions-loader.js';
|
|
130
131
|
export * from './features/commerce/product-listing/product-listing-actions-loader.js';
|