@coveo/quantic 3.44.1 → 3.44.2

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 (203) hide show
  1. package/force-app/main/default/classes/OrganizationEndpointsTest.cls +71 -15
  2. package/force-app/main/default/classes/RecommendationsControllerTest.cls +1 -1
  3. package/force-app/main/default/lwc/quanticTabBar/quanticTabBar.js +148 -125
  4. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +16 -16
  5. package/force-app/main/default/staticresources/coveoheadless/headless.js +17 -17
  6. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +16 -16
  7. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +16 -16
  8. package/package.json +33 -31
  9. package/force-app/main/default/lwc/quanticAriaLive/__tests__/quanticAriaLive.test.js +0 -106
  10. package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +0 -752
  11. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/data.ts +0 -130
  12. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +0 -87
  13. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/pageObject.ts +0 -282
  14. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +0 -208
  15. package/force-app/main/default/lwc/quanticCarousel/__tests__/quanticCarousel.test.js +0 -262
  16. package/force-app/main/default/lwc/quanticCaseClassification/__tests__/quanticCaseClassification.test.js +0 -819
  17. package/force-app/main/default/lwc/quanticCaseClassification/e2e/data.ts +0 -23
  18. package/force-app/main/default/lwc/quanticCaseClassification/e2e/fixture.ts +0 -51
  19. package/force-app/main/default/lwc/quanticCaseClassification/e2e/pageObject.ts +0 -152
  20. package/force-app/main/default/lwc/quanticCaseClassification/e2e/quanticCaseClassification.e2e.ts +0 -269
  21. package/force-app/main/default/lwc/quanticCategoryFacet/__tests__/quanticCategoryFacet.test.js +0 -1183
  22. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/data.ts +0 -91
  23. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/fixture.ts +0 -79
  24. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/pageObject.ts +0 -55
  25. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/quanticCategoryFacet.e2e.ts +0 -219
  26. package/force-app/main/default/lwc/quanticCitation/__tests__/quanticCitation.test.js +0 -581
  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 -688
  29. package/force-app/main/default/lwc/quanticDateFacet/e2e/data.ts +0 -44
  30. package/force-app/main/default/lwc/quanticDateFacet/e2e/fixture.ts +0 -72
  31. package/force-app/main/default/lwc/quanticDateFacet/e2e/pageObject.ts +0 -27
  32. package/force-app/main/default/lwc/quanticDateFacet/e2e/quanticDateFacet.e2e.ts +0 -167
  33. package/force-app/main/default/lwc/quanticDidYouMean/__tests__/quanticDidYouMean.test.js +0 -348
  34. package/force-app/main/default/lwc/quanticDidYouMean/e2e/data.ts +0 -48
  35. package/force-app/main/default/lwc/quanticDidYouMean/e2e/fixture.ts +0 -84
  36. package/force-app/main/default/lwc/quanticDidYouMean/e2e/pageObject.ts +0 -173
  37. package/force-app/main/default/lwc/quanticDidYouMean/e2e/quanticDidYouMean.e2e.ts +0 -219
  38. package/force-app/main/default/lwc/quanticDocumentSuggestion/__tests__/quanticDocumentSuggestion.test.js +0 -404
  39. package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/fixture.ts +0 -38
  40. package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/pageObject.ts +0 -52
  41. package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/quanticDocumentSuggestion.e2e.ts +0 -102
  42. package/force-app/main/default/lwc/quanticFacet/__tests__/quanticFacet.test.js +0 -1105
  43. package/force-app/main/default/lwc/quanticFacet/e2e/data.ts +0 -62
  44. package/force-app/main/default/lwc/quanticFacet/e2e/fixture.ts +0 -78
  45. package/force-app/main/default/lwc/quanticFacet/e2e/pageObject.ts +0 -67
  46. package/force-app/main/default/lwc/quanticFacet/e2e/quanticFacet.e2e.ts +0 -242
  47. package/force-app/main/default/lwc/quanticFacetCaption/__tests__/quanticFacetCaption.test.js +0 -28
  48. package/force-app/main/default/lwc/quanticFacetManager/__tests__/quanticFacetManager.test.js +0 -178
  49. package/force-app/main/default/lwc/quanticFacetManager/e2e/data.ts +0 -59
  50. package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +0 -75
  51. package/force-app/main/default/lwc/quanticFacetManager/e2e/pageObject.ts +0 -23
  52. package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +0 -82
  53. package/force-app/main/default/lwc/quanticFeedback/__tests__/quanticFeedback.test.js +0 -403
  54. package/force-app/main/default/lwc/quanticFeedbackModal/__tests__/quanticFeedbackModal.test.js +0 -448
  55. package/force-app/main/default/lwc/quanticFeedbackModalQna/__tests__/quanticFeedbackModalQna.test.js +0 -298
  56. package/force-app/main/default/lwc/quanticFoldedResultList/__tests__/quanticFoldedResultList.test.js +0 -323
  57. package/force-app/main/default/lwc/quanticFoldedResultList/e2e/fixture.ts +0 -74
  58. package/force-app/main/default/lwc/quanticFoldedResultList/e2e/pageObject.ts +0 -81
  59. package/force-app/main/default/lwc/quanticFoldedResultList/e2e/quanticFoldedResultList.e2e.ts +0 -69
  60. package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +0 -1575
  61. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/agentData.ts +0 -279
  62. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/data.ts +0 -56
  63. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture-agent.ts +0 -77
  64. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture.ts +0 -194
  65. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +0 -599
  66. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswer.e2e.ts +0 -333
  67. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswerAgent.e2e.ts +0 -298
  68. package/force-app/main/default/lwc/quanticGeneratedAnswerBody/__tests__/quanticGeneratedAnswerBody.test.js +0 -418
  69. package/force-app/main/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js +0 -447
  70. package/force-app/main/default/lwc/quanticGeneratedAnswerCopyToClipboard/__tests__/quanticGeneratedAnswerCopyToClipboard.test.js +0 -129
  71. package/force-app/main/default/lwc/quanticGeneratedAnswerFollowUpInput/__tests__/quanticGeneratedAnswerFollowUpInput.test.js +0 -466
  72. package/force-app/main/default/lwc/quanticGeneratedAnswerStreamOfThought/__tests__/quanticGeneratedAnswerStreamOfThought.test.js +0 -402
  73. package/force-app/main/default/lwc/quanticGeneratedAnswerStreamOfThought/__tests__/stepsUtils.test.js +0 -118
  74. package/force-app/main/default/lwc/quanticGeneratedAnswerThread/__tests__/quanticGeneratedAnswerThread.test.js +0 -285
  75. package/force-app/main/default/lwc/quanticHeading/__tests__/quanticHeading.test.js +0 -71
  76. package/force-app/main/default/lwc/quanticHeadlessLoader/__tests__/quanticHeadlessLoader.test.js +0 -651
  77. package/force-app/main/default/lwc/quanticInsightInterface/__tests__/quanticInsightInterface.test.js +0 -194
  78. package/force-app/main/default/lwc/quanticInsightSummary/__tests__/quanticInsightSummary.test.js +0 -230
  79. package/force-app/main/default/lwc/quanticModal/__tests__/quanticModal.test.js +0 -205
  80. package/force-app/main/default/lwc/quanticNotifications/__tests__/quanticNotifications.test.js +0 -309
  81. package/force-app/main/default/lwc/quanticNotifications/e2e/fixture.ts +0 -62
  82. package/force-app/main/default/lwc/quanticNotifications/e2e/pageObject.ts +0 -55
  83. package/force-app/main/default/lwc/quanticNotifications/e2e/quanticNotifications.e2e.ts +0 -47
  84. package/force-app/main/default/lwc/quanticNumericFacet/__tests__/quanticNumericFacet.test.js +0 -953
  85. package/force-app/main/default/lwc/quanticNumericFacet/e2e/data.ts +0 -48
  86. package/force-app/main/default/lwc/quanticNumericFacet/e2e/fixture.ts +0 -75
  87. package/force-app/main/default/lwc/quanticNumericFacet/e2e/pageObject.ts +0 -59
  88. package/force-app/main/default/lwc/quanticNumericFacet/e2e/quanticNumericFacet.e2e.ts +0 -186
  89. package/force-app/main/default/lwc/quanticPager/__tests__/quanticPager.test.js +0 -430
  90. package/force-app/main/default/lwc/quanticPager/e2e/fixture.ts +0 -65
  91. package/force-app/main/default/lwc/quanticPager/e2e/pageObject.ts +0 -69
  92. package/force-app/main/default/lwc/quanticPager/e2e/quanticPager.e2e.ts +0 -106
  93. package/force-app/main/default/lwc/quanticPlaceholder/__tests__/quanticPlaceholder.test.js +0 -47
  94. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/defaultTestCase.json +0 -13
  95. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/youtubeTestCase.json +0 -14
  96. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/quanticQuickviewContent.test.js +0 -82
  97. package/force-app/main/default/lwc/quanticRadioButtonsGroup/__tests__/quanticRadioButtonsGroup.test.js +0 -273
  98. package/force-app/main/default/lwc/quanticRecentQueriesList/__tests__/quanticRecentQueriesList.test.js +0 -448
  99. package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/fixture.ts +0 -43
  100. package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/pageObject.ts +0 -55
  101. package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/quanticRecentQueriesList.e2e.ts +0 -93
  102. package/force-app/main/default/lwc/quanticRecentResultsList/__tests__/quanticRecentResultsList.test.js +0 -516
  103. package/force-app/main/default/lwc/quanticRecentResultsList/e2e/fixture.ts +0 -43
  104. package/force-app/main/default/lwc/quanticRecentResultsList/e2e/pageObject.ts +0 -61
  105. package/force-app/main/default/lwc/quanticRecentResultsList/e2e/quanticRecentResultsList.e2e.ts +0 -48
  106. package/force-app/main/default/lwc/quanticRecommendationList/__tests__/quanticRecommendationList.test.js +0 -491
  107. package/force-app/main/default/lwc/quanticRecommendationList/e2e/fixture.ts +0 -36
  108. package/force-app/main/default/lwc/quanticRecommendationList/e2e/pageObject.ts +0 -52
  109. package/force-app/main/default/lwc/quanticRecommendationList/e2e/quanticRecommendationList.e2e.ts +0 -53
  110. package/force-app/main/default/lwc/quanticRefineModalContent/__tests__/quanticRefineModalContent.test.js +0 -747
  111. package/force-app/main/default/lwc/quanticRefineToggle/__tests__/quanticRefineToggle.test.js +0 -544
  112. package/force-app/main/default/lwc/quanticResultAction/__tests__/quanticResultAction.test.js +0 -262
  113. package/force-app/main/default/lwc/quanticResultActionBar/__tests__/quanticResultActionBar.test.js +0 -141
  114. package/force-app/main/default/lwc/quanticResultChildren/__tests__/quanticResultChildren.test.js +0 -340
  115. package/force-app/main/default/lwc/quanticResultCopyToClipboard/__tests__/quanticResultCopyToClipboard.test.js +0 -300
  116. package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/fixture.ts +0 -49
  117. package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/pageObject.ts +0 -49
  118. package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/quanticResultCopyToClipboard.e2e.ts +0 -40
  119. package/force-app/main/default/lwc/quanticResultDate/__tests__/quanticResultDate.test.js +0 -144
  120. package/force-app/main/default/lwc/quanticResultField/__tests__/quanticResultField.test.js +0 -120
  121. package/force-app/main/default/lwc/quanticResultHighlightedTextField/__tests__/quanticResultHighlightedTextField.test.js +0 -209
  122. package/force-app/main/default/lwc/quanticResultLink/__tests__/quanticResultLink.test.js +0 -302
  123. package/force-app/main/default/lwc/quanticResultList/__tests__/quanticResultList.test.js +0 -342
  124. package/force-app/main/default/lwc/quanticResultList/e2e/fixture.ts +0 -70
  125. package/force-app/main/default/lwc/quanticResultList/e2e/pageObject.ts +0 -81
  126. package/force-app/main/default/lwc/quanticResultList/e2e/quanticResultList.e2e.ts +0 -69
  127. package/force-app/main/default/lwc/quanticResultMultiValueText/__tests__/quanticResultMultiValueText.test.js +0 -235
  128. package/force-app/main/default/lwc/quanticResultNumber/__tests__/quanticResultNumber.test.js +0 -144
  129. package/force-app/main/default/lwc/quanticResultPrintableUri/__tests__/quanticResultPrintableUri.test.js +0 -324
  130. package/force-app/main/default/lwc/quanticResultQuickview/__tests__/quanticResultQuickview.test.js +0 -308
  131. package/force-app/main/default/lwc/quanticResultQuickview/e2e/fixture.ts +0 -85
  132. package/force-app/main/default/lwc/quanticResultQuickview/e2e/pageObject.ts +0 -38
  133. package/force-app/main/default/lwc/quanticResultQuickview/e2e/quanticResultQuickView.e2e.ts +0 -66
  134. package/force-app/main/default/lwc/quanticResultTemplate/__tests__/quanticResultTemplate.test.js +0 -90
  135. package/force-app/main/default/lwc/quanticResultText/__tests__/quanticResultText.test.js +0 -155
  136. package/force-app/main/default/lwc/quanticResultsPerPage/__tests__/quanticResultsPerPage.test.js +0 -464
  137. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +0 -78
  138. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/pageObject.ts +0 -85
  139. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/quanticResultsPerPage.e2e.ts +0 -97
  140. package/force-app/main/default/lwc/quanticSearchBox/__tests__/quanticSearchBox.test.js +0 -487
  141. package/force-app/main/default/lwc/quanticSearchBox/e2e/fixture.ts +0 -86
  142. package/force-app/main/default/lwc/quanticSearchBox/e2e/pageObject.ts +0 -45
  143. package/force-app/main/default/lwc/quanticSearchBox/e2e/quanticSearchBox.e2e.ts +0 -159
  144. package/force-app/main/default/lwc/quanticSearchBoxInput/__tests__/quanticSearchBoxInput.test.js +0 -743
  145. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/__tests__/quanticSearchBoxSuggestionsList.test.js +0 -571
  146. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/fixture.ts +0 -113
  147. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/pageObject.ts +0 -113
  148. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/quanticSearchBoxSuggestionsList.e2e.ts +0 -282
  149. package/force-app/main/default/lwc/quanticSmartSnippet/__tests__/quanticSmartSnippet.test.js +0 -341
  150. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/data.ts +0 -21
  151. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +0 -93
  152. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/pageObject.ts +0 -196
  153. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/quanticSmartSnippet.e2e.ts +0 -168
  154. package/force-app/main/default/lwc/quanticSmartSnippetAnswer/__tests__/quanticSmartSnippetAnswer.test.js +0 -126
  155. package/force-app/main/default/lwc/quanticSmartSnippetSource/__tests__/quanticSmartSnippetSource.test.js +0 -290
  156. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/__tests__/quanticSmartSnippetSuggestions.test.js +0 -329
  157. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/data.ts +0 -31
  158. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +0 -95
  159. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/pageObject.ts +0 -160
  160. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/quanticSmartSnippetSuggestions.e2e.ts +0 -127
  161. package/force-app/main/default/lwc/quanticSort/__tests__/quanticSort.test.js +0 -416
  162. package/force-app/main/default/lwc/quanticSort/e2e/fixture.ts +0 -62
  163. package/force-app/main/default/lwc/quanticSort/e2e/pageObject.ts +0 -100
  164. package/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts +0 -86
  165. package/force-app/main/default/lwc/quanticSourceCitations/__tests__/quanticSourceCitations.test.js +0 -156
  166. package/force-app/main/default/lwc/quanticStandaloneSearchBox/__tests__/quanticStandaloneSearchBox.test.js +0 -387
  167. package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/fixture.ts +0 -54
  168. package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/pageObject.ts +0 -54
  169. package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/quanticStandaloneSearchBox.e2e.ts +0 -72
  170. package/force-app/main/default/lwc/quanticStatefulButton/__tests__/quanticStatefulButton.test.js +0 -222
  171. package/force-app/main/default/lwc/quanticSummary/__tests__/quanticSummary.test.js +0 -244
  172. package/force-app/main/default/lwc/quanticTab/__tests__/quanticTab.test.js +0 -333
  173. package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +0 -60
  174. package/force-app/main/default/lwc/quanticTab/e2e/pageObject.ts +0 -68
  175. package/force-app/main/default/lwc/quanticTab/e2e/quanticTab.e2e.ts +0 -72
  176. package/force-app/main/default/lwc/quanticTabBar/__tests__/quanticTabBar.test.js +0 -331
  177. package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +0 -65
  178. package/force-app/main/default/lwc/quanticTabBar/e2e/pageObject.ts +0 -80
  179. package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +0 -172
  180. package/force-app/main/default/lwc/quanticThreadItem/__tests__/quanticThreadItem.test.js +0 -314
  181. package/force-app/main/default/lwc/quanticTimeframeFacet/__tests__/quanticTimeframeFacet.test.js +0 -1059
  182. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/data.ts +0 -66
  183. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/fixture.ts +0 -74
  184. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/pageObject.ts +0 -43
  185. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/quanticTimeframeFacet.e2e.ts +0 -184
  186. package/force-app/main/default/lwc/quanticTooltip/__tests__/quanticTooltip.test.js +0 -107
  187. package/force-app/main/default/lwc/quanticUserAction/__tests__/quanticUserAction.test.js +0 -427
  188. package/force-app/main/default/lwc/quanticUserActionsSession/__tests__/quanticUserActionsSession.test.js +0 -269
  189. package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/data/userActionsState.json +0 -89
  190. package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/quanticUserActionsTimeline.test.js +0 -511
  191. package/force-app/main/default/lwc/quanticUserActionsToggle/__tests__/quanticUserActionsToggle.test.js +0 -229
  192. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/data.ts +0 -32
  193. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/fixture.ts +0 -32
  194. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +0 -71
  195. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/quanticUserActionsToggle.e2e.ts +0 -39
  196. package/force-app/main/default/lwc/quanticUtils/__tests__/accessibilityUtils.test.js +0 -214
  197. package/force-app/main/default/lwc/quanticUtils/__tests__/citationAnchoringUtils.test.js +0 -84
  198. package/force-app/main/default/lwc/quanticUtils/__tests__/facetDependenciesUtils.test.js +0 -92
  199. package/force-app/main/default/lwc/quanticUtils/__tests__/facetStoreUtils.test.js +0 -86
  200. package/force-app/main/default/lwc/quanticUtils/__tests__/markdownUtils.test.js +0 -109
  201. package/force-app/main/default/lwc/quanticUtils/__tests__/quanticUtils.test.js +0 -233
  202. package/force-app/main/default/lwc/quanticUtils/__tests__/timeAndDateUtils.test.js +0 -22
  203. package/force-app/main/default/lwc/quanticViewedByCustomerBadge/__tests__/quanticViewedByCustomerBadge.test.js +0 -131
@@ -5,17 +5,36 @@ public class OrganizationEndpointsTest {
5
5
  String orgId = 'testOrgId';
6
6
  String env = 'prod';
7
7
 
8
- Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(orgId, env);
8
+ Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(
9
+ orgId,
10
+ env
11
+ );
9
12
 
10
13
  String expectedPlatform = 'https://testOrgId.org.coveo.com';
11
14
  String expectedAnalytics = 'https://testOrgIdanalytics.org.coveo.com';
12
15
  String expectedSearch = expectedPlatform + '/rest/search/v2';
13
16
  String expectedAdmin = 'https://testOrgIdadmin.org.coveo.com';
14
17
 
15
- System.assertEquals(expectedPlatform, endpoints.get('platform'), 'Platform URL mismatch for prod');
16
- System.assertEquals(expectedAnalytics, endpoints.get('analytics'), 'Analytics URL mismatch for prod');
17
- System.assertEquals(expectedSearch, endpoints.get('search'), 'Search URL mismatch for prod');
18
- System.assertEquals(expectedAdmin, endpoints.get('admin'), 'Admin URL mismatch for prod');
18
+ System.assertEquals(
19
+ expectedPlatform,
20
+ endpoints.get('platform'),
21
+ 'Platform URL mismatch for prod'
22
+ );
23
+ System.assertEquals(
24
+ expectedAnalytics,
25
+ endpoints.get('analytics'),
26
+ 'Analytics URL mismatch for prod'
27
+ );
28
+ System.assertEquals(
29
+ expectedSearch,
30
+ endpoints.get('search'),
31
+ 'Search URL mismatch for prod'
32
+ );
33
+ System.assertEquals(
34
+ expectedAdmin,
35
+ endpoints.get('admin'),
36
+ 'Admin URL mismatch for prod'
37
+ );
19
38
  }
20
39
 
21
40
  @isTest
@@ -23,33 +42,70 @@ public class OrganizationEndpointsTest {
23
42
  String orgId = 'testOrgId';
24
43
  String env = 'dev';
25
44
 
26
- Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(orgId, env);
45
+ Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(
46
+ orgId,
47
+ env
48
+ );
27
49
 
28
50
  String expectedPlatform = 'https://testOrgId.orgdev.coveo.com';
29
51
  String expectedAnalytics = 'https://testOrgIdanalytics.orgdev.coveo.com';
30
52
  String expectedSearch = expectedPlatform + '/rest/search/v2';
31
53
  String expectedAdmin = 'https://testOrgIdadmin.orgdev.coveo.com';
32
54
 
33
- System.assertEquals(expectedPlatform, endpoints.get('platform'), 'Platform URL mismatch for dev');
34
- System.assertEquals(expectedAnalytics, endpoints.get('analytics'), 'Analytics URL mismatch for dev');
35
- System.assertEquals(expectedSearch, endpoints.get('search'), 'Search URL mismatch for dev');
36
- System.assertEquals(expectedAdmin, endpoints.get('admin'), 'Admin URL mismatch for dev');
55
+ System.assertEquals(
56
+ expectedPlatform,
57
+ endpoints.get('platform'),
58
+ 'Platform URL mismatch for dev'
59
+ );
60
+ System.assertEquals(
61
+ expectedAnalytics,
62
+ endpoints.get('analytics'),
63
+ 'Analytics URL mismatch for dev'
64
+ );
65
+ System.assertEquals(
66
+ expectedSearch,
67
+ endpoints.get('search'),
68
+ 'Search URL mismatch for dev'
69
+ );
70
+ System.assertEquals(
71
+ expectedAdmin,
72
+ endpoints.get('admin'),
73
+ 'Admin URL mismatch for dev'
74
+ );
37
75
  }
38
76
 
39
77
  @isTest
40
78
  static void testGetOrganizationEndpointsWithoutEnv() {
41
79
  String orgId = 'testOrgId';
42
80
 
43
- Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(orgId);
81
+ Map<String, String> endpoints = OrganizationEndpoints.getOrganizationEndpoints(
82
+ orgId
83
+ );
44
84
 
45
85
  String expectedPlatform = 'https://testOrgId.org.coveo.com';
46
86
  String expectedAnalytics = 'https://testOrgIdanalytics.org.coveo.com';
47
87
  String expectedSearch = expectedPlatform + '/rest/search/v2';
48
88
  String expectedAdmin = 'https://testOrgIdadmin.org.coveo.com';
49
89
 
50
- System.assertEquals(expectedPlatform, endpoints.get('platform'), 'Platform URL mismatch');
51
- System.assertEquals(expectedAnalytics, endpoints.get('analytics'), 'Analytics URL mismatch');
52
- System.assertEquals(expectedSearch, endpoints.get('search'), 'Search URL mismatch');
53
- System.assertEquals(expectedAdmin, endpoints.get('admin'), 'Admin URL mismatch');
90
+ System.assertEquals(
91
+ expectedPlatform,
92
+ endpoints.get('platform'),
93
+ 'Platform URL mismatch'
94
+ );
95
+ System.assertEquals(
96
+ expectedAnalytics,
97
+ endpoints.get('analytics'),
98
+ 'Analytics URL mismatch'
99
+ );
100
+ System.assertEquals(
101
+ expectedSearch,
102
+ endpoints.get('search'),
103
+ 'Search URL mismatch'
104
+ );
105
+ System.assertEquals(
106
+ expectedAdmin,
107
+ endpoints.get('admin'),
108
+ 'Admin URL mismatch'
109
+ );
54
110
  }
55
111
  }
@@ -1,7 +1,7 @@
1
1
  @isTest
2
2
  private class RecommendationsControllerTest {
3
3
  // This API key is intentionally public — it belongs to a sample organization used for samples/docs.
4
- static final String sampleHeadlessConfiguration = '{"accessToken":"xx564559b1-0045-48e1-953c-3addd1ee4457","organizationId":"searchuisamples"}';
4
+ static final String sampleHeadlessConfiguration = '{"accessToken":"xxb9c21134-8dad-4d53-8a5e-855bacddba8f","organizationId":"searchuisamples"}';
5
5
  @IsTest
6
6
  static void shouldReturnStringifiedConfiguration() {
7
7
  Test.startTest();
@@ -1,5 +1,4 @@
1
1
  import more from '@salesforce/label/c.quantic_More';
2
- import {getAbsoluteWidth} from 'c/quanticUtils';
3
2
  import {LightningElement, api} from 'lwc';
4
3
 
5
4
  /**
@@ -39,11 +38,25 @@ export default class QuanticTabBar extends LightningElement {
39
38
  maxMoreButtonWidth = 0;
40
39
  /** @type {boolean} */
41
40
  expandedMoreButton = true;
41
+ /** @type {Array<Element>} */
42
+ _overflowingTabs = [];
43
+ /** @type {Array<Element>} */
44
+ _displayedTabs = [];
45
+ /** @type {boolean} */
46
+ _updateDisplayDirty = false;
47
+ /** @type {boolean} */
48
+ _updateScheduled = false;
49
+
50
+ /**
51
+ * Rects captured for the current layout pass.
52
+ * @type {{container: DOMRect, moreButton: DOMRect, tabs: Map<Element, DOMRect>}|null}
53
+ */
54
+ _layoutRects = null;
42
55
 
43
56
  connectedCallback() {
44
57
  window.addEventListener('click', this.closeDropdown);
45
58
  window.addEventListener('resize', this.updateTabsDisplay);
46
- this.addEventListener('quantic__tabrendered', this.updateTabsDisplay);
59
+ this.addEventListener('quantic__tabrendered', this.handleTabRendered);
47
60
  }
48
61
 
49
62
  renderedCallback() {
@@ -53,25 +66,118 @@ export default class QuanticTabBar extends LightningElement {
53
66
  }
54
67
  }
55
68
 
69
+ handleTabRendered = () => {
70
+ this._updateDisplayDirty = true;
71
+
72
+ if (this._updateScheduled) {
73
+ return;
74
+ }
75
+ this._updateScheduled = true;
76
+ // eslint-disable-next-line @lwc/lwc/no-async-operation
77
+ requestAnimationFrame(() => {
78
+ this._updateScheduled = false;
79
+ if (this._updateDisplayDirty) {
80
+ this._updateDisplayDirty = false;
81
+ this.updateTabsDisplay();
82
+ }
83
+ });
84
+ };
85
+
56
86
  /**
57
87
  * Updates the display of the tabs.
88
+ * Computes a single layout snapshot up front to avoid redundant `getBoundingClientRect` reads.
58
89
  * @returns {void}
59
90
  */
60
91
  updateTabsDisplay = () => {
61
- this.updateMoreButtonVisibility(this.isOverflow);
62
- this.updateTabVisibility(this.overflowingTabs, false);
63
- this.updateTabVisibility(this.displayedTabs, true);
64
- this.updateDropdownOptions();
65
- this.updateMoreButtonPosition();
92
+ const tabElements = this.getTabsFromSlot();
93
+ this._layoutRects = {
94
+ container: this.container.getBoundingClientRect(),
95
+ moreButton: this.moreButton?.getBoundingClientRect(),
96
+ tabs: new Map(
97
+ tabElements.map((tab) => [tab, tab.getBoundingClientRect()])
98
+ ),
99
+ };
100
+
101
+ const containerWidth = this._layoutRects.container.width;
102
+ const slotContentWidth = this.computeSlotContentWidth(tabElements);
103
+ const tabsCount = tabElements.length;
104
+ const isOverflow = slotContentWidth > containerWidth;
105
+ // Must run before categorizeTabsVisibility: while display:none, moreButtonWidth reads as 0.
106
+ this.updateMoreButtonVisibility(isOverflow);
107
+ this._layoutRects.moreButton = this.moreButton?.getBoundingClientRect();
108
+ this.updateMoreButtonState();
109
+
110
+ const {overflowingTabs, displayedTabs} = this.categorizeTabsVisibility(
111
+ tabElements,
112
+ isOverflow
113
+ );
114
+ this._overflowingTabs = overflowingTabs;
115
+ this._displayedTabs = displayedTabs;
116
+
117
+ this.updateTabVisibility(overflowingTabs, false, tabsCount);
118
+ this.updateTabVisibility(displayedTabs, true, tabsCount);
119
+ this.updateDropdownOptions(overflowingTabs);
120
+ this.updateMoreButtonPosition(displayedTabs);
66
121
  this.isDropdownOpen = false;
122
+ this._layoutRects = null;
67
123
  };
68
124
 
125
+ /**
126
+ * Computes, in a single pass, all the layout values needed to update the tabs display.
127
+ * @param {Array<Element>} tabElements
128
+ * @param {boolean} isOverflow Whether the tabs overflow the container.
129
+ * @returns {{overflowingTabs: Array<Element>, displayedTabs: Array<Element>}}
130
+ */
131
+ categorizeTabsVisibility(tabElements, isOverflow) {
132
+ // @ts-ignore
133
+ const selectedTab = tabElements.find((el) => el.isActive);
134
+ const selectedTabWidth = Math.ceil(
135
+ this._layoutRects.tabs.get(selectedTab)?.width ?? 0
136
+ );
137
+ const moreButton = this.moreButton?.querySelector('button');
138
+ const moreButtonWidth = Math.max(
139
+ this._layoutRects.moreButton?.width ?? 0,
140
+ moreButton?.offsetWidth ?? 0,
141
+ moreButton?.scrollWidth ?? 0
142
+ );
143
+ const containerWidth = this._layoutRects.container.width;
144
+ const displayedTabs = [];
145
+ const overflowingTabs = [];
146
+ let displayedTabsWidth = 0;
147
+ let selectedTabDisplayed = false;
148
+
149
+ tabElements.forEach((tab) => {
150
+ const tabWidth = Math.ceil(this._layoutRects.tabs.get(tab)?.width ?? 0);
151
+ // @ts-ignore
152
+ if (tab.isActive) {
153
+ displayedTabs.push(tab);
154
+ displayedTabsWidth += tabWidth;
155
+ selectedTabDisplayed = true;
156
+ return;
157
+ }
158
+
159
+ const reservedWidth = isOverflow
160
+ ? moreButtonWidth + (selectedTabDisplayed ? 0 : selectedTabWidth)
161
+ : 0;
162
+ if (displayedTabsWidth + tabWidth + reservedWidth <= containerWidth) {
163
+ displayedTabs.push(tab);
164
+ displayedTabsWidth += tabWidth;
165
+ } else {
166
+ overflowingTabs.push(tab);
167
+ }
168
+ });
169
+
170
+ return {overflowingTabs, displayedTabs};
171
+ }
172
+
69
173
  /**
70
174
  * Updates the dropdown options.
175
+ * @param {Array<Element>} [overflowingTabs]
71
176
  * @returns {void}
72
177
  */
73
- updateDropdownOptions() {
74
- this.tabsInDropdown = this.overflowingTabs.map((el, index) => ({
178
+ updateDropdownOptions(overflowingTabs) {
179
+ // @ts-ignore
180
+ this.tabsInDropdown = overflowingTabs.map((el, index) => ({
75
181
  id: index,
76
182
  // @ts-ignore
77
183
  label: el.label,
@@ -82,14 +188,19 @@ export default class QuanticTabBar extends LightningElement {
82
188
 
83
189
  /**
84
190
  * Updates the position of the "More" button element.
85
- * We need to update the position of the "More" button so that it is always to the right of the last tab displayed, as hidden tabs are just hidden visually but there is always space allocated for them.
191
+ * The displayed tabs are assigned contiguous flex orders below, so their widths determine the
192
+ * position of More even before the browser applies the new order.
193
+ * @param {Array<Element>} [displayedTabs] Optionally pass a pre-computed list of displayed tabs
194
+ * to avoid recomputing it from the live DOM.
86
195
  * @returns {void}
87
196
  */
88
- updateMoreButtonPosition() {
89
- this.moreButton?.style.setProperty(
90
- 'left',
91
- `${this.displayedTabs.length ? this.lastVisibleTabRightPosition : 0}px`
197
+ updateMoreButtonPosition(displayedTabs) {
198
+ const position = displayedTabs.reduce(
199
+ (total, tab) =>
200
+ total + Math.ceil(this._layoutRects.tabs.get(tab)?.width ?? 0),
201
+ 0
92
202
  );
203
+ this.moreButton?.style.setProperty('left', `${position}px`);
93
204
  }
94
205
 
95
206
  /**
@@ -98,12 +209,18 @@ export default class QuanticTabBar extends LightningElement {
98
209
  */
99
210
  updateMoreButtonState() {
100
211
  if (this.hasRendered) {
101
- if (this.maxMoreButtonWidth < this.moreButtonWidth) {
102
- this.maxMoreButtonWidth = this.moreButtonWidth;
212
+ const moreButtonWidth = this._layoutRects.moreButton?.width ?? 0;
213
+ const selectedTabWidth = Math.ceil(
214
+ this._layoutRects.tabs.get(this.selectedTab)?.width ?? 0
215
+ );
216
+
217
+ if (this.maxMoreButtonWidth < moreButtonWidth) {
218
+ this.maxMoreButtonWidth = moreButtonWidth;
103
219
  }
104
220
 
105
221
  this.expandedMoreButton =
106
- this.containerWidth > this.maxMoreButtonWidth + this.selectedTabWidth;
222
+ this._layoutRects.container.width >
223
+ this.maxMoreButtonWidth + selectedTabWidth;
107
224
  }
108
225
  }
109
226
 
@@ -120,28 +237,24 @@ export default class QuanticTabBar extends LightningElement {
120
237
  * Updates the tabs visibility.
121
238
  * @param {Array<Element>} tabElements
122
239
  * @param {boolean} isVisible
240
+ * @param {number} [totalTabsCount] Optionally pass the total tab count to avoid recomputing it from the live DOM.
123
241
  */
124
- updateTabVisibility(tabElements, isVisible) {
242
+ updateTabVisibility(
243
+ tabElements,
244
+ isVisible,
245
+ totalTabsCount = this.getTabsFromSlot().length
246
+ ) {
125
247
  tabElements.forEach((tab, index) => {
126
- const tabsCount = this.getTabsFromSlot().length;
127
248
  // @ts-ignore
128
249
  tab.style.setProperty(
129
250
  'order',
130
- isVisible ? index + 1 : tabsCount - tabElements.length + index + 1
251
+ isVisible ? index + 1 : totalTabsCount - tabElements.length + index + 1
131
252
  );
132
253
  // @ts-ignore
133
254
  tab.style.setProperty('visibility', isVisible ? 'visible' : 'hidden');
134
255
  });
135
256
  }
136
257
 
137
- /**
138
- * Indicates whether the tabs are causing an overflow.
139
- * @returns {boolean}
140
- */
141
- get isOverflow() {
142
- return this.slotContentWidth > this.containerWidth;
143
- }
144
-
145
258
  /**
146
259
  * Returns the tab bar container element.
147
260
  * @returns {Element}
@@ -151,80 +264,18 @@ export default class QuanticTabBar extends LightningElement {
151
264
  }
152
265
 
153
266
  /**
154
- * Returns the container's width.
155
- * @returns {number}
156
- */
157
- get containerWidth() {
158
- return getAbsoluteWidth(this.container);
159
- }
160
-
161
- /**
162
- * returns the width of the content of the slot.
267
+ * Computes the total rendered width of the given tab elements.
268
+ * @param {Array<Element>} tabElements
163
269
  * @returns {number}
164
270
  */
165
- get slotContentWidth() {
166
- return this.getTabsFromSlot().reduce(
167
- (total, el) => total + getAbsoluteWidth(el),
271
+ computeSlotContentWidth(tabElements) {
272
+ return tabElements.reduce(
273
+ (total, el) =>
274
+ total + Math.ceil(this._layoutRects.tabs.get(el)?.width ?? 0),
168
275
  0
169
276
  );
170
277
  }
171
278
 
172
- /**
173
- * returns the width of the more button.
174
- * @returns {number}
175
- */
176
- get moreButtonWidth() {
177
- return this.moreButton ? getAbsoluteWidth(this.moreButton) : 0;
178
- }
179
-
180
- /**
181
- * returns the width of the currently selected tab.
182
- * @returns {number}
183
- */
184
- get selectedTabWidth() {
185
- return getAbsoluteWidth(this.selectedTab);
186
- }
187
-
188
- /**
189
- * Returns the overflowing tabs.
190
- * We compare the right position of each tab to the right position of the tab container to find the tabs that overflow.
191
- * We include in our calculations the minimum width needed to display the elements that should always be displayed, namely the More button and the currently selected tab.
192
- * @returns {Array<Element>}
193
- */
194
- get overflowingTabs() {
195
- const containerRelativeRightPosition =
196
- this.container.getBoundingClientRect().right;
197
- const selectedTabRelativeRightPosition =
198
- this.selectedTab?.getBoundingClientRect().right;
199
-
200
- return this.getTabsFromSlot().filter((element) => {
201
- const tabPositionedBeforeSelectedTab =
202
- selectedTabRelativeRightPosition >
203
- element.getBoundingClientRect().right;
204
- const minimumWidthNeeded = tabPositionedBeforeSelectedTab
205
- ? this.moreButtonWidth + this.selectedTabWidth
206
- : this.moreButtonWidth;
207
- const rightPositionLimit = !this.isOverflow
208
- ? containerRelativeRightPosition
209
- : containerRelativeRightPosition - minimumWidthNeeded;
210
- return (
211
- element.getBoundingClientRect().right > rightPositionLimit &&
212
- // @ts-ignore
213
- !element.isActive
214
- );
215
- });
216
- }
217
-
218
- /**
219
- * Returns the displayed tabs.
220
- * @returns {Array<Element>}
221
- */
222
- get displayedTabs() {
223
- return this.getTabsFromSlot().filter(
224
- (el) => !this.overflowingTabs.includes(el)
225
- );
226
- }
227
-
228
279
  /**
229
280
  * Returns the CSS classes of the dropdown list.
230
281
  * @returns {string}
@@ -266,18 +317,9 @@ export default class QuanticTabBar extends LightningElement {
266
317
  * @returns {string}
267
318
  */
268
319
  get moreButtonLabel() {
269
- this.updateMoreButtonState();
270
320
  return this.expandedMoreButton ? this.labels.more : '';
271
321
  }
272
322
 
273
- /**
274
- * Returns the last visible tab element.
275
- * @returns {Element}
276
- */
277
- get lastVisibleTab() {
278
- return this.displayedTabs[this.displayedTabs.length - 1];
279
- }
280
-
281
323
  /**
282
324
  * Returns the currently selected tab element.
283
325
  * @returns {Element}
@@ -287,25 +329,6 @@ export default class QuanticTabBar extends LightningElement {
287
329
  return this.getTabsFromSlot().find((el) => el.isActive);
288
330
  }
289
331
 
290
- /**
291
- * Returns the tab bar list container element.
292
- * @returns {Element}
293
- */
294
- get tabBarListContainer() {
295
- return this.template.querySelector('.tab-bar_list-container');
296
- }
297
-
298
- /**
299
- * Returns the right position of the last visible tab.
300
- * @returns {number}
301
- */
302
- get lastVisibleTabRightPosition() {
303
- return (
304
- this.lastVisibleTab.getBoundingClientRect().right -
305
- this.tabBarListContainer.getBoundingClientRect().left
306
- );
307
- }
308
-
309
332
  /**
310
333
  * Returns the CSS classes of the tab bar container.
311
334
  * @returns {string}
@@ -343,7 +366,7 @@ export default class QuanticTabBar extends LightningElement {
343
366
  event.stopPropagation();
344
367
  const targetValue = event.currentTarget.getAttribute('data-value');
345
368
  const targetLabel = event.currentTarget.getAttribute('data-label');
346
- const clickedtab = this.overflowingTabs.find(
369
+ const clickedtab = this._overflowingTabs.find(
347
370
  // @ts-ignore
348
371
  (tab) => tab.expression === targetValue && tab.label === targetLabel
349
372
  );