@coveo/quantic 3.10.0-pre.faaf12d7a7 → 3.11.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/README.md +52 -12
- package/force-app/main/default/labels/CustomLabels.labels-meta.xml +7 -0
- package/force-app/main/default/lwc/quanticCaseAssistInterface/quanticCaseAssistInterface.js +8 -0
- package/force-app/main/default/lwc/quanticCategoryFacet/__tests__/quanticCategoryFacet.test.js +108 -1
- package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.js +22 -0
- package/force-app/main/default/lwc/quanticDateFacet/__tests__/quanticDateFacet.test.js +107 -1
- package/force-app/main/default/lwc/quanticDateFacet/quanticDateFacet.js +22 -0
- package/force-app/main/default/lwc/quanticFacet/__tests__/quanticFacet.test.js +106 -1
- package/force-app/main/default/lwc/quanticFacet/quanticFacet.js +21 -1
- package/force-app/main/default/lwc/quanticFeedbackModalQna/__tests__/quanticFeedbackModalQna.test.js +1 -1
- package/force-app/main/default/lwc/quanticFeedbackModalQna/quanticFeedbackModalQna.js +1 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.css +0 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswerContent/templates/generatedMarkdownContent.css +1 -0
- package/force-app/main/default/lwc/quanticInsightInterface/quanticInsightInterface.js +8 -0
- package/force-app/main/default/lwc/quanticNotifications/__tests__/quanticNotifications.test.js +112 -4
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.css +8 -0
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.html +20 -7
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.js +57 -18
- package/force-app/main/default/lwc/quanticNumericFacet/__tests__/quanticNumericFacet.test.js +107 -1
- package/force-app/main/default/lwc/quanticNumericFacet/quanticNumericFacet.js +22 -0
- package/force-app/main/default/lwc/quanticRecommendationInterface/quanticRecommendationInterface.js +8 -0
- package/force-app/main/default/lwc/quanticSearchInterface/quanticSearchInterface.js +8 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/__tests__/quanticTimeframeFacet.test.js +107 -1
- package/force-app/main/default/lwc/quanticTimeframeFacet/quanticTimeframeFacet.js +22 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/__tests__/quanticUserActionsToggle.test.js +18 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/data.ts +32 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/fixture.ts +32 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +71 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/quanticUserActionsToggle.e2e.ts +39 -0
- package/force-app/main/default/staticresources/coveobueno/browser/bueno.js +3 -18
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +9 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/query/query-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/user-actions/user-actions-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-engine/commerce-engine.ssr.d.ts +4 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/common.d.ts +8 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/build-factory.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/hydrated-state-factory.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/recommendation-hydrated-state-factory.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/recommendation-static-state-factory.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/static-state-factory.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/build.d.ts +13 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/common.d.ts +180 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/core-engine.d.ts +29 -10
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/fetch-static-state.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/from-build-result.d.ts +20 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/hydrate-static-state.d.ts +18 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/logger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/navigatorContextProvider.d.ts +17 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +6 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/from-build-result.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/instant-products/headless-instant-products.ssr.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-view/headless-product-view.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.ssr.d.ts +10 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/search-action-cause.d.ts +0 -82
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-analytics-actions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/history/history-analytics-actions.d.ts +0 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/static-filter-set/static-filter-set-actions.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-engine-v2.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/facet-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/utils.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/headless.js +11 -8
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +10 -7
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +9 -6
- package/force-app/main/default/staticresources/dompurify/purify.min.js +1339 -2
- package/package.json +23 -19
|
@@ -1,7 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `NavigatorContext` interface represents the context of the browser client.
|
|
3
|
+
*/
|
|
1
4
|
export interface NavigatorContext {
|
|
5
|
+
/**
|
|
6
|
+
* The URL of the page that referred the user to the current page.
|
|
7
|
+
* See [Referer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer)
|
|
8
|
+
*/
|
|
2
9
|
referrer: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* The user agent string of the browser that made the request.
|
|
12
|
+
* See [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)
|
|
13
|
+
*/
|
|
3
14
|
userAgent: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The URL of the current page.
|
|
17
|
+
*/
|
|
4
18
|
location: string | null;
|
|
19
|
+
/** The unique identifier of the browser client in a Coveo-powered page.
|
|
20
|
+
* See [clientId](https://docs.coveo.com/en/masb0234).
|
|
21
|
+
*/
|
|
5
22
|
clientId: string;
|
|
6
23
|
}
|
|
7
24
|
export type NavigatorContextProvider = () => NavigatorContext;
|
|
@@ -3,6 +3,12 @@ import type { Controller } from '../../../controllers/controller/headless-contro
|
|
|
3
3
|
import { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
4
4
|
export type HasKey<T, K extends PropertyKey> = T extends unknown ? K extends keyof T ? T[K] extends never ? never : true : never : never;
|
|
5
5
|
export type HasKeys<TObject> = TObject extends {} ? keyof TObject extends never ? false : true : boolean;
|
|
6
|
+
export type HasRequiredKeys<TObject> = TObject extends {} ? {
|
|
7
|
+
[K in keyof TObject]-?: {} extends Pick<TObject, K> ? never : K;
|
|
8
|
+
}[keyof TObject] extends never ? false : true : boolean;
|
|
9
|
+
export type HasOptionalKeys<TObject> = TObject extends {} ? {
|
|
10
|
+
[K in keyof TObject]-?: {} extends Pick<TObject, K> ? K : never;
|
|
11
|
+
}[keyof TObject] extends never ? false : true : boolean;
|
|
6
12
|
export type ExtractRequiredOptions<TOptions> = {
|
|
7
13
|
[TKey in keyof TOptions as Pick<TOptions, TKey> extends Required<Pick<TOptions, TKey>> ? TKey : never]: TOptions[TKey];
|
|
8
14
|
};
|
|
@@ -2,6 +2,7 @@ import { CoreEngine, CoreEngineNext } from '../../engine.js';
|
|
|
2
2
|
import { ControllersMap, EngineDefinitionBuildResult } from './common.js';
|
|
3
3
|
export interface FromBuildResultOptions<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
|
|
4
4
|
buildResult: EngineDefinitionBuildResult<TEngine, TControllers>;
|
|
5
|
+
allowedRecommendationKeys?: (keyof TControllers)[];
|
|
5
6
|
}
|
|
6
7
|
export interface FromBuildResult<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap, TOptions, TReturn> {
|
|
7
8
|
(options: FromBuildResultOptions<TEngine, TControllers> & TOptions): Promise<TReturn>;
|
|
@@ -9,7 +9,7 @@ export interface ParameterManagerProps<T extends Parameters> {
|
|
|
9
9
|
/**
|
|
10
10
|
* The initial state that should be applied to the `ParameterManager` sub-controller.
|
|
11
11
|
*/
|
|
12
|
-
initialState
|
|
12
|
+
initialState?: ParameterManagerInitialState<T>;
|
|
13
13
|
}
|
|
14
14
|
export interface CoreParameterManagerProps<T extends Parameters> extends ParameterManagerProps<T> {
|
|
15
15
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { FieldSuggestionsGenerator } from './headless-field-suggestions-generator.js';
|
|
3
3
|
export type { FieldSuggestions, FieldSuggestionsState, } from '../field-suggestions/headless-field-suggestions.js';
|
|
4
4
|
export type { CategoryFieldSuggestions, CategoryFieldSuggestionsState, } from '../field-suggestions/headless-category-field-suggestions.js';
|
|
5
5
|
export type { FieldSuggestionsFacet } from '../../../features/commerce/facets/field-suggestions-order/field-suggestions-order-state.js';
|
|
6
6
|
export type { GeneratedFieldSuggestionsControllers } from './headless-field-suggestions-generator.js';
|
|
7
7
|
export type { FieldSuggestionsGenerator };
|
|
8
|
-
export interface FieldSuggestionsGeneratorDefinition extends
|
|
8
|
+
export interface FieldSuggestionsGeneratorDefinition extends NonRecommendationControllerDefinitionWithoutProps<FieldSuggestionsGenerator> {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Defines the `FieldSuggestionsGenerator` controller for the purpose of server-side rendering.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { InstantProducts, InstantProductsProps } from './headless-instant-products.js';
|
|
3
3
|
export type { InstantProductsOptions, InstantProductsState, } from './headless-instant-products.js';
|
|
4
4
|
export type { InstantProducts, InstantProductsProps };
|
|
5
|
-
export interface InstantProductsDefinition extends
|
|
5
|
+
export interface InstantProductsDefinition extends NonRecommendationControllerDefinitionWithoutProps<InstantProducts> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Defines the `InstantProducts` controller for the purpose of server-side rendering.
|
|
@@ -12,4 +12,4 @@ export interface InstantProductsDefinition extends SearchAndListingControllerDef
|
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
export declare function defineInstantProducts(props
|
|
15
|
+
export declare function defineInstantProducts(props?: InstantProductsProps): InstantProductsDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { Controller } from '../../controller/headless-controller.js';
|
|
3
3
|
import { ProductView as BaseProductView } from './headless-product-view.js';
|
|
4
|
-
export interface ProductViewDefinition extends
|
|
4
|
+
export interface ProductViewDefinition extends NonRecommendationControllerDefinitionWithoutProps<ProductView> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Defines a `ProductView` controller instance.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonRecommendationControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { RecentQueriesList, RecentQueriesListProps } from './headless-recent-queries-list.js';
|
|
3
3
|
export type { RecentQueriesState, RecentQueriesListInitialState, RecentQueriesListOptions, } from './headless-recent-queries-list.js';
|
|
4
4
|
export type { RecentQueriesList, RecentQueriesListProps };
|
|
5
|
-
export interface RecentQueriesListDefinition extends
|
|
5
|
+
export interface RecentQueriesListDefinition extends NonRecommendationControllerDefinitionWithoutProps<RecentQueriesList> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Defines the `RecentQueriesList` controller for the purpose of server-side rendering.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RecommendationsState } from '../recommendations/headless-recommendations.js';
|
|
1
|
+
import { recommendationInternalOptionKey, RecommendationOnlyControllerDefinitionWithProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
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
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* */
|
|
8
|
+
export type RecommendationsDefinitionMeta = {
|
|
9
|
+
[recommendationInternalOptionKey]: {} & RecommendationsProps['options'];
|
|
10
|
+
};
|
|
11
|
+
export interface RecommendationsDefinition extends RecommendationOnlyControllerDefinitionWithProps<Recommendations, Partial<RecommendationsOptions>> {
|
|
6
12
|
}
|
|
7
13
|
/**
|
|
8
14
|
* @internal
|
|
@@ -12,4 +18,4 @@ export interface RecommendationsDefinition extends UniversalControllerDefinition
|
|
|
12
18
|
* @param props - The configurable `Recommendations` properties.
|
|
13
19
|
* @returns The `Recommendations` controller definition.
|
|
14
20
|
* */
|
|
15
|
-
export declare function defineRecommendations(props: RecommendationsProps): RecommendationsDefinition;
|
|
21
|
+
export declare function defineRecommendations(props: RecommendationsProps): RecommendationsDefinition & RecommendationsDefinitionMeta;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListingAndStandaloneControllerWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
|
|
2
2
|
import { StandaloneSearchBoxProps } from '../../standalone-search-box/headless-standalone-search-box.js';
|
|
3
3
|
import { StandaloneSearchBox } from './headless-standalone-search-box.js';
|
|
4
4
|
export type { StandaloneSearchBoxOptions } from './headless-standalone-search-box-options.js';
|
|
5
5
|
export type { StandaloneSearchBoxState } from './headless-standalone-search-box.js';
|
|
6
6
|
export type { StandaloneSearchBox, StandaloneSearchBoxProps };
|
|
7
|
-
export interface StandaloneSearchBoxDefinition extends
|
|
7
|
+
export interface StandaloneSearchBoxDefinition extends ListingAndStandaloneControllerWithoutProps<StandaloneSearchBox> {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Defines the `StandaloneSearchBox` controller for the purpose of server-side rendering.
|
|
@@ -23,10 +23,6 @@ export declare enum SearchPageEvents {
|
|
|
23
23
|
* Identifies the search event that gets logged when a submit button is selected on a search box.
|
|
24
24
|
*/
|
|
25
25
|
searchboxSubmit = "searchboxSubmit",
|
|
26
|
-
/**
|
|
27
|
-
* Identifies the search event that gets logged when a clear button is selected on a search box.
|
|
28
|
-
*/
|
|
29
|
-
searchboxClear = "searchboxClear",
|
|
30
26
|
/**
|
|
31
27
|
* The search-as-you-type event that gets logged when a query is automatically generated, and results are displayed while a user is entering text in the search box before they voluntarily submit the query.
|
|
32
28
|
*/
|
|
@@ -39,10 +35,6 @@ export declare enum SearchPageEvents {
|
|
|
39
35
|
* Identifies the search event that gets logged when the event to clear the current breadcrumbs is triggered.
|
|
40
36
|
*/
|
|
41
37
|
breadcrumbResetAll = "breadcrumbResetAll",
|
|
42
|
-
/**
|
|
43
|
-
* Identifies the click event that gets logged when the Quick View element is selected and a Quick View modal of the document is displayed.
|
|
44
|
-
*/
|
|
45
|
-
documentQuickview = "documentQuickview",
|
|
46
38
|
/**
|
|
47
39
|
* Identifies the click event that gets logged when a user clicks on a search result to open an item.
|
|
48
40
|
*/
|
|
@@ -59,34 +51,14 @@ export declare enum SearchPageEvents {
|
|
|
59
51
|
* Identifies the search event that gets logged when the search page loads with a query, such as when a user clicks a link pointing to a search results page with a query or enters a query in a standalone search box that points to a search page.
|
|
60
52
|
*/
|
|
61
53
|
searchFromLink = "searchFromLink",
|
|
62
|
-
/**
|
|
63
|
-
* Identifies the custom event that gets logged when a user action triggers a notification set in the effective query pipeline on the search page.
|
|
64
|
-
*/
|
|
65
|
-
triggerNotify = "notify",
|
|
66
|
-
/**
|
|
67
|
-
* Identifies the custom event that gets logged when a user action executes a JavaScript function set in the effective query pipeline on the search page.
|
|
68
|
-
*/
|
|
69
|
-
triggerExecute = "execute",
|
|
70
54
|
/**
|
|
71
55
|
* Identifies the custom event that gets logged when a user action triggers a new query set in the effective query pipeline on the search page.
|
|
72
56
|
*/
|
|
73
57
|
triggerQuery = "query",
|
|
74
|
-
/**
|
|
75
|
-
* Identifies the custom event that gets logged when a user action redirects them to a URL set in the effective query pipeline on the search page.
|
|
76
|
-
*/
|
|
77
|
-
triggerRedirect = "redirect",
|
|
78
58
|
/**
|
|
79
59
|
* Identifies the search cause that gets logged for pagination and other user navigation that do not express a new search intent.
|
|
80
60
|
*/
|
|
81
61
|
browseResults = "browseResults",
|
|
82
|
-
/**
|
|
83
|
-
* Identifies the search event that gets logged when the clearing all selected values of a static filter.
|
|
84
|
-
*/
|
|
85
|
-
staticFilterClearAll = "staticFilterClearAll",
|
|
86
|
-
/**
|
|
87
|
-
* Identifies the search event that gets logged when a static filter check box is selected and the query is updated.
|
|
88
|
-
*/
|
|
89
|
-
staticFilterSelect = "staticFilterSelect",
|
|
90
62
|
/**
|
|
91
63
|
* Identifies the search event that gets logged when a static filter check box is deselected and the query is updated.
|
|
92
64
|
*/
|
|
@@ -95,18 +67,10 @@ export declare enum SearchPageEvents {
|
|
|
95
67
|
* Identifies the search event that gets logged when the Clear Facet button is selected.
|
|
96
68
|
*/
|
|
97
69
|
facetClearAll = "facetClearAll",
|
|
98
|
-
/**
|
|
99
|
-
* Identifies the custom event that gets logged when a query is being typed into the facet search box.
|
|
100
|
-
*/
|
|
101
|
-
facetSearch = "facetSearch",
|
|
102
70
|
/**
|
|
103
71
|
* Identifies the search event that gets logged when a facet check box is selected and the query is updated.
|
|
104
72
|
*/
|
|
105
73
|
facetSelect = "facetSelect",
|
|
106
|
-
/**
|
|
107
|
-
* Identifies the search event that gets logged when all filters on a facet are selected.
|
|
108
|
-
*/
|
|
109
|
-
facetSelectAll = "facetSelectAll",
|
|
110
74
|
/**
|
|
111
75
|
* Identifies the search event that gets logged when a facet check box is deselected and the query is updated.
|
|
112
76
|
*/
|
|
@@ -135,30 +99,10 @@ export declare enum SearchPageEvents {
|
|
|
135
99
|
* Identifies the custom event that gets logged when a user query encounters an error during execution.
|
|
136
100
|
*/
|
|
137
101
|
queryError = "query",
|
|
138
|
-
/**
|
|
139
|
-
* Identifies the search and custom event that gets logged when a user clicks the Go Back link after an error page.
|
|
140
|
-
*/
|
|
141
|
-
queryErrorBack = "errorBack",
|
|
142
|
-
/**
|
|
143
|
-
* Identifies the search and custom event that gets logged when a user clears the query box after an error page.
|
|
144
|
-
*/
|
|
145
|
-
queryErrorClear = "errorClearQuery",
|
|
146
|
-
/**
|
|
147
|
-
* Identifies the search and custom event that gets logged when a user clicks the Retry link after an error page.
|
|
148
|
-
*/
|
|
149
|
-
queryErrorRetry = "errorRetry",
|
|
150
|
-
/**
|
|
151
|
-
* Identifies the custom event that gets logged when a user performs a query that returns recommendations in the Recommendations panel.
|
|
152
|
-
*/
|
|
153
|
-
recommendation = "recommendation",
|
|
154
102
|
/**
|
|
155
103
|
* Identifies the search event that gets logged when a user action (that is not a query) reloads the Recommendations panel with new recommendations.
|
|
156
104
|
*/
|
|
157
105
|
recommendationInterfaceLoad = "recommendationInterfaceLoad",
|
|
158
|
-
/**
|
|
159
|
-
* Identifies the click event that gets logged when a user clicks a recommendation in the Recommendations panel.
|
|
160
|
-
*/
|
|
161
|
-
recommendationOpen = "recommendationOpen",
|
|
162
106
|
/**
|
|
163
107
|
* Identifies the custom event that gets logged when a user identifies a smart snippet answer as relevant.
|
|
164
108
|
*/
|
|
@@ -203,30 +147,6 @@ export declare enum SearchPageEvents {
|
|
|
203
147
|
* Identifies the custom event that gets logged when a user clicks on the source of a snippet suggestion for a related question.
|
|
204
148
|
*/
|
|
205
149
|
openSmartSnippetSuggestionSource = "openSmartSnippetSuggestionSource",
|
|
206
|
-
/**
|
|
207
|
-
* Identifies the custom event that gets logged when a user clicks on a link in the answer of a smart snippet.
|
|
208
|
-
*/
|
|
209
|
-
openSmartSnippetInlineLink = "openSmartSnippetInlineLink",
|
|
210
|
-
/**
|
|
211
|
-
* Identifies the custom event that gets logged when a user clicks on a link in the snippet suggestion for a related question.
|
|
212
|
-
*/
|
|
213
|
-
openSmartSnippetSuggestionInlineLink = "openSmartSnippetSuggestionInlineLink",
|
|
214
|
-
/**
|
|
215
|
-
* Identifies the search event that gets logged when a recent queries list item gets clicked.
|
|
216
|
-
*/
|
|
217
|
-
recentQueryClick = "recentQueriesClick",
|
|
218
|
-
/**
|
|
219
|
-
* Identifies the custom event that gets logged when a recent queries list gets cleared.
|
|
220
|
-
*/
|
|
221
|
-
clearRecentQueries = "clearRecentQueries",
|
|
222
|
-
/**
|
|
223
|
-
* Identifies the custom event that gets logged when a recently clicked results list item gets clicked.
|
|
224
|
-
*/
|
|
225
|
-
recentResultClick = "recentResultClick",
|
|
226
|
-
/**
|
|
227
|
-
* Identifies the custom event that gets logged when a recently clicked results list gets cleared.
|
|
228
|
-
*/
|
|
229
|
-
clearRecentResults = "clearRecentResults",
|
|
230
150
|
/**
|
|
231
151
|
* Identifies the click event that gets logged when a user clicks the Show More link under a search result that support the folding component.
|
|
232
152
|
*/
|
|
@@ -275,8 +195,6 @@ export declare enum SearchPageEvents {
|
|
|
275
195
|
* Identified the custom event that gets logged when a generated answer stream is completed.
|
|
276
196
|
*/
|
|
277
197
|
generatedAnswerStreamEnd = "generatedAnswerStreamEnd",
|
|
278
|
-
historyForward = "historyForward",
|
|
279
|
-
historyBackward = "historyBackward",
|
|
280
198
|
/**
|
|
281
199
|
* Identifies the search event that gets logged when the query context is updated as a result of updating one of the case context fields.
|
|
282
200
|
*/
|
|
@@ -71,7 +71,6 @@ export interface LogFacetBreadcrumbActionCreatorPayload {
|
|
|
71
71
|
facetValue: string;
|
|
72
72
|
}
|
|
73
73
|
export declare const logFacetBreadcrumb: (payload: LogFacetBreadcrumbActionCreatorPayload) => LegacySearchAction;
|
|
74
|
-
export declare const facetUpdateSort: () => SearchAction;
|
|
75
74
|
export declare const facetClearAll: () => SearchAction;
|
|
76
75
|
export declare const facetSelect: () => SearchAction;
|
|
77
76
|
export declare const facetExclude: () => SearchAction;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { LegacySearchAction } from '../analytics/analytics-utils.js';
|
|
2
|
-
import { SearchAction } from '../search/search-actions.js';
|
|
3
2
|
export declare const logNavigateForward: () => LegacySearchAction;
|
|
4
3
|
export declare const logNavigateBackward: () => LegacySearchAction;
|
|
5
4
|
export declare const logNoResultsBack: () => LegacySearchAction;
|
|
6
|
-
export declare const historyForward: () => SearchAction;
|
|
7
|
-
export declare const historyBackward: () => SearchAction;
|
|
@@ -17,7 +17,7 @@ export declare const buildSearchRequest: (state: StateNeededBySearchRequest, eve
|
|
|
17
17
|
facetOptions?: import("../../facet-options/facet-options.js").FacetOptions | undefined;
|
|
18
18
|
numberOfResults?: number | undefined;
|
|
19
19
|
firstResult?: number | undefined;
|
|
20
|
-
facets?:
|
|
20
|
+
facets?: import("../../facets/generic/interfaces/generic-facet-request.js").AnyFacetRequest[] | undefined;
|
|
21
21
|
cq?: string | undefined;
|
|
22
22
|
queryCorrection?: {
|
|
23
23
|
enabled?: boolean | undefined;
|
|
@@ -10,7 +10,6 @@ import { MappedSearchRequest } from './search-mappings.js';
|
|
|
10
10
|
export interface SearchAction {
|
|
11
11
|
actionCause: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const nullActionCause: () => SearchAction;
|
|
14
13
|
export type { StateNeededByExecuteSearch } from './search-actions-thunk-processor.js';
|
|
15
14
|
export interface ExecuteSearchThunkReturn {
|
|
16
15
|
/** The successful search response. */
|
|
@@ -130,6 +129,7 @@ export declare const buildInstantResultSearchRequest: (state: StateNeededByExecu
|
|
|
130
129
|
filterFieldRange?: number | undefined;
|
|
131
130
|
tab: string;
|
|
132
131
|
referrer: string | null;
|
|
132
|
+
/** The query that was executed. */
|
|
133
133
|
timezone: string;
|
|
134
134
|
analytics?: {
|
|
135
135
|
actionCause?: string | undefined;
|
|
@@ -138,7 +138,7 @@ export declare const buildInstantResultSearchRequest: (state: StateNeededByExecu
|
|
|
138
138
|
deviceId?: string | undefined;
|
|
139
139
|
pageId?: string | undefined;
|
|
140
140
|
clientTimestamp: string;
|
|
141
|
-
documentReferrer: string | null;
|
|
141
|
+
documentReferrer: string | null;
|
|
142
142
|
originContext: string;
|
|
143
143
|
userDisplayName?: string | undefined;
|
|
144
144
|
documentLocation?: string | null | undefined;
|
|
@@ -18,7 +18,7 @@ export declare const buildSearchRequest: (state: StateNeededBySearchRequest, nav
|
|
|
18
18
|
facetOptions?: import("../facet-options/facet-options.js").FacetOptions | undefined;
|
|
19
19
|
numberOfResults?: number | undefined;
|
|
20
20
|
firstResult?: number | undefined;
|
|
21
|
-
facets?:
|
|
21
|
+
facets?: import("../facets/generic/interfaces/generic-facet-request.js").AnyFacetRequest[] | undefined;
|
|
22
22
|
cq?: string | undefined;
|
|
23
23
|
queryCorrection?: {
|
|
24
24
|
enabled?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LegacySearchAction } from '../analytics/analytics-utils.js';
|
|
2
|
-
import { SearchAction } from '../search/search-actions.js';
|
|
3
2
|
import { StaticFilterValue } from './static-filter-set-state.js';
|
|
4
3
|
export interface RegisterStaticFilterActionCreatorPayload {
|
|
5
4
|
/**
|
|
@@ -54,6 +53,3 @@ export interface LogStaticFilterClearAllActionCreatorPayload {
|
|
|
54
53
|
staticFilterId: string;
|
|
55
54
|
}
|
|
56
55
|
export declare const logStaticFilterClearAll: (metadata: LogStaticFilterClearAllActionCreatorPayload) => LegacySearchAction;
|
|
57
|
-
export declare const staticFilterSelect: () => SearchAction;
|
|
58
|
-
export declare const staticFilterDeselect: () => SearchAction;
|
|
59
|
-
export declare const staticFilterClearAll: () => SearchAction;
|
package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts
CHANGED
|
@@ -66,19 +66,19 @@
|
|
|
66
66
|
* ```
|
|
67
67
|
* @module SSR Commerce
|
|
68
68
|
*/
|
|
69
|
+
export type { CommerceEngineDefinitionOptions, SSRCommerceEngine as CommerceEngine, } from './app/commerce-ssr-engine/factories/build-factory.js';
|
|
69
70
|
export type { Unsubscribe, Middleware } from '@reduxjs/toolkit';
|
|
70
71
|
export type { Relay } from '@coveo/relay';
|
|
71
72
|
export type { CommerceEngineOptions } from './app/commerce-engine/commerce-engine.js';
|
|
72
73
|
export type { CommerceEngineConfiguration } from './app/commerce-engine/commerce-engine-configuration.js';
|
|
73
|
-
export type {
|
|
74
|
+
export type { CommerceEngineDefinition } from './app/commerce-engine/commerce-engine.ssr.js';
|
|
74
75
|
export { defineCommerceEngine } from './app/commerce-engine/commerce-engine.ssr.js';
|
|
75
76
|
export { getSampleCommerceEngineConfiguration } from './app/commerce-engine/commerce-engine-configuration.js';
|
|
76
77
|
export type { CoreEngineNext, ExternalEngineOptions } from './app/engine.js';
|
|
77
78
|
export type { EngineConfiguration, AnalyticsConfiguration, AnalyticsRuntimeEnvironment, } from './app/engine-configuration.js';
|
|
78
79
|
export { SolutionType } from './app/commerce-ssr-engine/types/common.js';
|
|
79
|
-
export type { ControllerDefinitionsMap, InferControllerFromDefinition, InferControllersMapFromDefinition, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllerPropsMapFromDefinitions, } from './app/commerce-ssr-engine/types/common.js';
|
|
80
|
-
export type { Build } from './app/ssr-engine/types/
|
|
81
|
-
export type { EngineDefinition, InferStaticState, InferHydratedState, InferBuildResult, HydrateStaticState, FetchStaticState, } from './app/commerce-ssr-engine/types/core-engine.js';
|
|
80
|
+
export type { ControllerDefinitionsMap, InferControllerFromDefinition, InferControllersMapFromDefinition, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllerPropsMapFromDefinitions, EngineStaticState, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption, HydratedState, OptionsTuple, } from './app/commerce-ssr-engine/types/common.js';
|
|
81
|
+
export type { EngineDefinition, InferStaticState, InferHydratedState, InferBuildResult, HydrateStaticState, FetchStaticState, FetchStaticStateOptions, HydrateStaticStateOptions, Build, BuildOptions, FromBuildResult, FromBuildResultOptions, } from './app/commerce-ssr-engine/types/core-engine.js';
|
|
82
82
|
export type { LoggerOptions } from './app/logger.js';
|
|
83
83
|
export type { NavigatorContext, BrowserNavigatorContextProvider, NavigatorContextProvider, } from './app/navigatorContextProvider.js';
|
|
84
84
|
export type { LogLevel } from './app/logger.js';
|
package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-engine-v2.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Logger } from 'pino';
|
|
|
3
3
|
import { Mock } from 'vitest';
|
|
4
4
|
import { CaseAssistEngine } from '../app/case-assist-engine/case-assist-engine.js';
|
|
5
5
|
import { CommerceEngine } from '../app/commerce-engine/commerce-engine.js';
|
|
6
|
-
import { SSRCommerceEngine } from '../app/commerce-engine/
|
|
6
|
+
import { SSRCommerceEngine } from '../app/commerce-ssr-engine/factories/build-factory.js';
|
|
7
7
|
import type { CoreEngine, CoreEngineNext } from '../app/engine.js';
|
|
8
8
|
import { InsightEngine } from '../app/insight-engine/insight-engine.js';
|
|
9
9
|
import { RecommendationEngine } from '../app/recommendation-engine/recommendation-engine.js';
|
package/force-app/main/default/staticresources/coveoheadless/definitions/utils/facet-utils.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export declare function sortFacets<T extends {
|
|
|
9
9
|
facetId: string;
|
|
10
10
|
}>(facets: T[], sortOrder: string[]): T[];
|
|
11
11
|
export declare const sortCriteriaMap: Record<string, SortCriteria>;
|
|
12
|
-
export declare function getFacets(state: StateNeededBySearchRequest): (import("../features/facets/facet-set/interfaces/request.js").FacetRequest | import("../features/facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../features/facets/range-facets/
|
|
12
|
+
export declare function getFacets(state: StateNeededBySearchRequest): (import("../features/facets/facet-set/interfaces/request.js").FacetRequest | import("../features/facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../features/facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest | import("../features/facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest)[];
|
|
13
13
|
export {};
|
|
@@ -25,3 +25,7 @@ export declare function createWaitForActionMiddleware<TAction extends Action>(is
|
|
|
25
25
|
promise: Promise<TAction>;
|
|
26
26
|
middleware: Middleware;
|
|
27
27
|
};
|
|
28
|
+
export declare function createWaitForActionMiddlewareForRecommendation<TAction extends Action>(isDesiredAction: (action: unknown) => action is TAction, memo: Set<string>): {
|
|
29
|
+
promise: Promise<TAction>;
|
|
30
|
+
middleware: Middleware;
|
|
31
|
+
};
|