@coveo/quantic 3.16.0 → 3.16.1-pre.1a6fc4649f

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.
Files changed (116) hide show
  1. package/docs/out/quantic-docs.json +2 -2
  2. package/force-app/main/default/lwc/quanticNumberButton/quanticNumberButton.html +1 -1
  3. package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.js +27 -17
  4. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +6 -6
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recent-queries-list/headless-recent-queries-list.d.ts +5 -0
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-parameter-manager/headless-core-search-parameter-manager.d.ts +0 -1
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-queries-list/headless-recent-queries-list.d.ts +5 -0
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/features/parameter-manager/parameter-manager-selectors.d.ts +5 -0
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-actions-loader.d.ts +36 -0
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-actions.d.ts +6 -0
  11. package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -10
  12. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -9
  13. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +5 -5
  14. package/package.json +6 -4
  15. package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +0 -604
  16. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +0 -76
  17. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/pageObject.ts +0 -282
  18. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +0 -167
  19. package/force-app/main/default/lwc/quanticCarousel/__tests__/quanticCarousel.test.js +0 -262
  20. package/force-app/main/default/lwc/quanticCaseClassification/__tests__/quanticCaseClassification.test.js +0 -819
  21. package/force-app/main/default/lwc/quanticCaseClassification/e2e/data.ts +0 -23
  22. package/force-app/main/default/lwc/quanticCaseClassification/e2e/fixture.ts +0 -51
  23. package/force-app/main/default/lwc/quanticCaseClassification/e2e/pageObject.ts +0 -152
  24. package/force-app/main/default/lwc/quanticCaseClassification/e2e/quanticCaseClassification.e2e.ts +0 -269
  25. package/force-app/main/default/lwc/quanticCategoryFacet/__tests__/quanticCategoryFacet.test.js +0 -327
  26. package/force-app/main/default/lwc/quanticCitation/__tests__/quanticCitation.test.js +0 -269
  27. package/force-app/main/default/lwc/quanticColoredResultBadge/__tests__/quanticColoredResultBadge.test.js +0 -212
  28. package/force-app/main/default/lwc/quanticDateFacet/__tests__/quanticDateFacet.test.js +0 -321
  29. package/force-app/main/default/lwc/quanticDidYouMean/__tests__/quanticDidYouMean.test.js +0 -199
  30. package/force-app/main/default/lwc/quanticFacet/__tests__/quanticFacet.test.js +0 -341
  31. package/force-app/main/default/lwc/quanticFacetCaption/__tests__/quanticFacetCaption.test.js +0 -28
  32. package/force-app/main/default/lwc/quanticFacetManager/__tests__/quanticFacetManager.test.js +0 -178
  33. package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +0 -63
  34. package/force-app/main/default/lwc/quanticFacetManager/e2e/pageObject.ts +0 -23
  35. package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +0 -82
  36. package/force-app/main/default/lwc/quanticFeedback/__tests__/quanticFeedback.test.js +0 -392
  37. package/force-app/main/default/lwc/quanticFeedbackModal/__tests__/quanticFeedbackModal.test.js +0 -448
  38. package/force-app/main/default/lwc/quanticFeedbackModalQna/__tests__/quanticFeedbackModalQna.test.js +0 -298
  39. package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +0 -814
  40. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/data.ts +0 -56
  41. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture.ts +0 -87
  42. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +0 -283
  43. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswer.e2e.ts +0 -199
  44. package/force-app/main/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js +0 -151
  45. package/force-app/main/default/lwc/quanticHeading/__tests__/quanticHeading.test.js +0 -71
  46. package/force-app/main/default/lwc/quanticHeadlessLoader/__tests__/quanticHeadlessLoader.test.js +0 -651
  47. package/force-app/main/default/lwc/quanticNotifications/__tests__/quanticNotifications.test.js +0 -335
  48. package/force-app/main/default/lwc/quanticNumericFacet/__tests__/quanticNumericFacet.test.js +0 -343
  49. package/force-app/main/default/lwc/quanticPager/e2e/fixture.ts +0 -63
  50. package/force-app/main/default/lwc/quanticPager/e2e/pageObject.ts +0 -69
  51. package/force-app/main/default/lwc/quanticPager/e2e/quanticPager.e2e.ts +0 -101
  52. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/defaultTestCase.json +0 -13
  53. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/youtubeTestCase.json +0 -14
  54. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/quanticQuickviewContent.test.js +0 -82
  55. package/force-app/main/default/lwc/quanticRadioButtonsGroup/__tests__/quanticRadioButtonsGroup.test.js +0 -273
  56. package/force-app/main/default/lwc/quanticRefineModalContent/__tests__/quanticRefineModalContent.test.js +0 -501
  57. package/force-app/main/default/lwc/quanticResultAction/__tests__/quanticResultAction.test.js +0 -262
  58. package/force-app/main/default/lwc/quanticResultActionBar/__tests__/quanticResultActionBar.test.js +0 -141
  59. package/force-app/main/default/lwc/quanticResultChildren/__tests__/quanticResultChildren.test.js +0 -340
  60. package/force-app/main/default/lwc/quanticResultDate/__tests__/quanticResultDate.test.js +0 -144
  61. package/force-app/main/default/lwc/quanticResultField/__tests__/quanticResultField.test.js +0 -120
  62. package/force-app/main/default/lwc/quanticResultHighlightedTextField/__tests__/quanticResultHighlightedTextField.test.js +0 -209
  63. package/force-app/main/default/lwc/quanticResultLink/__tests__/quanticResultLink.test.js +0 -261
  64. package/force-app/main/default/lwc/quanticResultMultiValueText/__tests__/quanticResultMultiValueText.test.js +0 -235
  65. package/force-app/main/default/lwc/quanticResultNumber/__tests__/quanticResultNumber.test.js +0 -144
  66. package/force-app/main/default/lwc/quanticResultPrintableUri/__tests__/quanticResultPrintableUri.test.js +0 -324
  67. package/force-app/main/default/lwc/quanticResultQuickview/__tests__/quanticResultQuickview.test.js +0 -171
  68. package/force-app/main/default/lwc/quanticResultText/__tests__/quanticResultText.test.js +0 -155
  69. package/force-app/main/default/lwc/quanticResultsPerPage/__tests__/quanticResultsPerPage.test.js +0 -404
  70. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +0 -74
  71. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/pageObject.ts +0 -85
  72. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/quanticResultsPerPage.e2e.ts +0 -97
  73. package/force-app/main/default/lwc/quanticSearchBox/__tests__/quanticSearchBox.test.js +0 -168
  74. package/force-app/main/default/lwc/quanticSearchBoxInput/__tests__/quanticSearchBoxInput.test.js +0 -823
  75. package/force-app/main/default/lwc/quanticSmartSnippet/__tests__/quanticSmartSnippet.test.js +0 -341
  76. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/data.ts +0 -21
  77. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +0 -91
  78. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/pageObject.ts +0 -196
  79. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/quanticSmartSnippet.e2e.ts +0 -168
  80. package/force-app/main/default/lwc/quanticSmartSnippetAnswer/__tests__/quanticSmartSnippetAnswer.test.js +0 -126
  81. package/force-app/main/default/lwc/quanticSmartSnippetSource/__tests__/quanticSmartSnippetSource.test.js +0 -290
  82. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/__tests__/quanticSmartSnippetSuggestions.test.js +0 -329
  83. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/data.ts +0 -31
  84. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +0 -93
  85. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/pageObject.ts +0 -160
  86. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/quanticSmartSnippetSuggestions.e2e.ts +0 -127
  87. package/force-app/main/default/lwc/quanticSort/__tests__/quanticSort.test.js +0 -416
  88. package/force-app/main/default/lwc/quanticSort/e2e/fixture.ts +0 -61
  89. package/force-app/main/default/lwc/quanticSort/e2e/pageObject.ts +0 -89
  90. package/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts +0 -91
  91. package/force-app/main/default/lwc/quanticSourceCitations/__tests__/quanticSourceCitations.test.js +0 -123
  92. package/force-app/main/default/lwc/quanticStandaloneSearchBox/__tests__/quanticStandaloneSearchBox.test.js +0 -186
  93. package/force-app/main/default/lwc/quanticStatefulButton/__tests__/quanticStatefulButton.test.js +0 -222
  94. package/force-app/main/default/lwc/quanticTab/__tests__/quanticTab.test.js +0 -287
  95. package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +0 -62
  96. package/force-app/main/default/lwc/quanticTab/e2e/pageObject.ts +0 -67
  97. package/force-app/main/default/lwc/quanticTab/e2e/quanticTab.e2e.ts +0 -77
  98. package/force-app/main/default/lwc/quanticTabBar/__tests__/quanticTabBar.test.js +0 -331
  99. package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +0 -61
  100. package/force-app/main/default/lwc/quanticTabBar/e2e/pageObject.ts +0 -80
  101. package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +0 -173
  102. package/force-app/main/default/lwc/quanticTimeframeFacet/__tests__/quanticTimeframeFacet.test.js +0 -339
  103. package/force-app/main/default/lwc/quanticTooltip/__tests__/quanticTooltip.test.js +0 -107
  104. package/force-app/main/default/lwc/quanticUserAction/__tests__/quanticUserAction.test.js +0 -427
  105. package/force-app/main/default/lwc/quanticUserActionsSession/__tests__/quanticUserActionsSession.test.js +0 -269
  106. package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/data/userActionsState.json +0 -89
  107. package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/quanticUserActionsTimeline.test.js +0 -511
  108. package/force-app/main/default/lwc/quanticUserActionsToggle/__tests__/quanticUserActionsToggle.test.js +0 -229
  109. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/data.ts +0 -32
  110. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/fixture.ts +0 -32
  111. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +0 -71
  112. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/quanticUserActionsToggle.e2e.ts +0 -39
  113. package/force-app/main/default/lwc/quanticUtils/__tests__/facetDependenciesUtils.test.js +0 -92
  114. package/force-app/main/default/lwc/quanticUtils/__tests__/markdownUtils.test.js +0 -71
  115. package/force-app/main/default/lwc/quanticUtils/__tests__/quanticUtils.test.js +0 -223
  116. package/force-app/main/default/lwc/quanticViewedByCustomerBadge/__tests__/quanticViewedByCustomerBadge.test.js +0 -131
@@ -22,6 +22,11 @@ export interface RecentQueriesList extends Controller {
22
22
  * @param index - The index of the recent query to execute.
23
23
  */
24
24
  executeRecentQuery(index: number): void;
25
+ /**
26
+ * Sets the recent queries list to the specified array of queries.
27
+ * @param queries - The array of queries to set.
28
+ */
29
+ updateRecentQueries(queries: string[]): void;
25
30
  }
26
31
  /**
27
32
  * A scoped and simplified part of the headless state that is relevant to the `RecentQueriesList` controller.
@@ -55,7 +55,6 @@ export interface SearchParameterManagerState {
55
55
  */
56
56
  export declare function buildCoreSearchParameterManager(engine: CoreEngine, props: SearchParameterManagerProps): SearchParameterManager;
57
57
  export declare function enrichParameters(engine: CoreEngine, parameters: SearchParameters): Required<SearchParameters>;
58
- export declare function validateParams(engine: CoreEngine, parameters: Required<SearchParameters>): boolean;
59
58
  export declare function getCoreActiveSearchParameters(engine: CoreEngine): SearchParameters;
60
59
  export declare function getSelectedValues(request: FacetRequest): string[];
61
60
  export declare function getSelectedRangeValues(request: CurrentValues<BaseFacetValueRequest>): BaseFacetValueRequest[];
@@ -51,6 +51,11 @@ export interface RecentQueriesList extends Controller {
51
51
  * @param index - The index of the recent query to execute.
52
52
  */
53
53
  executeRecentQuery(index: number): void;
54
+ /**
55
+ * Sets the recent queries list to the specified array of queries.
56
+ * @param queries - The array of queries to set.
57
+ */
58
+ updateRecentQueries(queries: string[]): void;
54
59
  }
55
60
  /**
56
61
  * A scoped and simplified part of the headless state that is relevant to the `RecentQueriesList` controller.
@@ -15,3 +15,8 @@ export declare function getFacets<Value, Request, Parameters>(section: Record<st
15
15
  [x: string]: Value[];
16
16
  };
17
17
  };
18
+ export declare function getTab<Section>(section: Section | undefined, tabSelector: (tabSet: Section) => string, initialState: string): {
19
+ tab?: undefined;
20
+ } | {
21
+ tab: string;
22
+ };
@@ -0,0 +1,36 @@
1
+ import { PayloadAction } from '@reduxjs/toolkit';
2
+ import { CoreEngine } from '../../app/engine.js';
3
+ import { SearchParameters } from './search-parameter-actions.js';
4
+ export type { SearchParameters } from './search-parameter-actions.js';
5
+ /**
6
+ * The search parameters action creators.
7
+ *
8
+ * @group Actions
9
+ * @category SearchParameters
10
+ */
11
+ export interface SearchParameterActionCreators {
12
+ /**
13
+ * Restores the search parameters.
14
+ *
15
+ * @param payload - The action creator payload.
16
+ * @returns A dispatchable action.
17
+ */
18
+ restoreSearchParameters(payload: SearchParameters): PayloadAction<SearchParameters>;
19
+ /**
20
+ * Restores the tab.
21
+ *
22
+ * @param payload - The action creator payload.
23
+ * @returns A dispatchable action.
24
+ */
25
+ restoreTab(payload: string): PayloadAction<string>;
26
+ }
27
+ /**
28
+ * Loads the facet order, facet set, pagination, query, query set, and sort reducers and returns the available search parameters action creators.
29
+ *
30
+ * @param engine - The headless engine.
31
+ * @returns An object holding the search parameters action creators.
32
+ *
33
+ * @group Actions
34
+ * @category SearchParameters
35
+ */
36
+ export declare function loadSearchParameterActions(engine: CoreEngine): SearchParameterActionCreators;
@@ -66,6 +66,7 @@ export interface SearchParameters {
66
66
  sf?: Record<string, string[]>;
67
67
  /**
68
68
  * The active tab id.
69
+ * @deprecated Restoring the tab with the restoreSearchParameters action can cause components to be visible/hidden on the wrong tab. Instead, first restore the tab using the `restoreTab` action, then the rest of the parameters with the restoreSearchParameters action.
69
70
  */
70
71
  tab?: string;
71
72
  /**
@@ -73,4 +74,9 @@ export interface SearchParameters {
73
74
  */
74
75
  af?: Record<string, string[]>;
75
76
  }
77
+ /**
78
+ * The unique identifier of a tab.
79
+ */
80
+ export type TabId = string;
76
81
  export declare const restoreSearchParameters: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: SearchParameters], SearchParameters, "searchParameters/restore", never, never>;
82
+ export declare const restoreTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: string], string, "searchParameters/restoreTab", never, never>;