@coveo/quantic 3.11.0 → 3.12.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.
Files changed (103) hide show
  1. package/README.md +1 -1
  2. package/docs/out/quantic-docs.json +27 -0
  3. package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +610 -0
  4. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +76 -0
  5. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/pageObject.ts +282 -0
  6. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +167 -0
  7. package/force-app/main/default/lwc/quanticBreadcrumbManager/quanticBreadcrumbManager.html +10 -10
  8. package/force-app/main/default/lwc/quanticBreadcrumbManager/quanticBreadcrumbManager.js +8 -8
  9. package/force-app/main/default/lwc/quanticFeedbackModalQna/templates/quanticFeedbackModalQna.html +1 -0
  10. package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +538 -21
  11. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/data.ts +56 -0
  12. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture.ts +87 -0
  13. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +279 -0
  14. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswer.e2e.ts +178 -0
  15. package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +24 -10
  16. package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/retryPrompt.html +2 -2
  17. package/force-app/main/default/lwc/quanticGeneratedAnswerToggle/quanticGeneratedAnswerToggle.html +1 -1
  18. package/force-app/main/default/lwc/quanticPager/e2e/fixture.ts +4 -4
  19. package/force-app/main/default/lwc/quanticPager/e2e/{pagerObject.ts → pageObject.ts} +1 -1
  20. package/force-app/main/default/lwc/quanticTab/__tests__/quanticTab.test.js +287 -0
  21. package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +62 -0
  22. package/force-app/main/default/lwc/quanticTab/e2e/pageObject.ts +67 -0
  23. package/force-app/main/default/lwc/quanticTab/e2e/quanticTab.e2e.ts +77 -0
  24. package/force-app/main/default/lwc/quanticTab/quanticTab.html +1 -1
  25. package/force-app/main/default/lwc/quanticTabBar/__tests__/quanticTabBar.test.js +331 -0
  26. package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +61 -0
  27. package/force-app/main/default/lwc/quanticTabBar/e2e/pageObject.ts +80 -0
  28. package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +173 -0
  29. package/force-app/main/default/lwc/quanticTabBar/quanticTabBar.html +30 -8
  30. package/force-app/main/default/lwc/quanticTabBar/quanticTabBar.js +5 -4
  31. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +1 -1
  32. package/force-app/main/default/lwc/quanticUserActionsToggle/quanticUserActionsToggle.js +4 -0
  33. package/force-app/main/default/lwc/quanticUtils/__tests__/markdownUtils.test.js +1 -1
  34. package/force-app/main/default/staticresources/coveobueno/browser/bueno.js +4 -4
  35. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -10
  36. package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/instant-result-analytics.d.ts +1 -1
  37. package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/search-analytics.d.ts +1 -1
  38. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +1 -1
  39. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +4 -2
  40. package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/search-api-params.d.ts +1 -1
  41. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/case-assist-params.d.ts +1 -1
  42. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/insight-params.d.ts +2 -2
  43. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-engine/commerce-engine.ssr.d.ts +2 -0
  44. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/build-factory.d.ts +2 -0
  45. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/factories/utils/recommendation-filter.d.ts +11 -0
  46. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/common.d.ts +12 -2
  47. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/kind.d.ts +9 -0
  48. package/force-app/main/default/staticresources/coveoheadless/definitions/app/undoable.d.ts +0 -3
  49. package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts +1 -1
  50. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +1 -0
  51. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.d.ts +3 -0
  52. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.d.ts +7 -6
  53. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.d.ts +3 -1
  54. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sub-controller/headless-sub-controller.d.ts +1 -2
  55. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sub-controller/headless-sub-controller.ssr.d.ts +2 -1
  56. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/url-manager/headless-core-url-manager.d.ts +11 -2
  57. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +1 -1
  58. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-view/headless-product-view.ssr.d.ts +1 -0
  59. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.d.ts +1 -0
  60. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/example-deleteme-headless-case-context.d.ts +1 -1
  61. package/force-app/main/default/staticresources/coveoheadless/definitions/features/actions-history/ipx-actions-history-actions.d.ts +1 -1
  62. package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-utils.d.ts +3 -3
  63. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-actions.d.ts +22 -6
  64. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-schema.d.ts +4 -0
  65. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-selectors.d.ts +0 -11
  66. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-serializer.d.ts +8 -2
  67. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-serializer.ssr.d.ts +44 -0
  68. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-slice.d.ts +4 -0
  69. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-state.d.ts +4 -0
  70. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +1 -0
  71. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-state.d.ts +1 -0
  72. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +0 -12
  73. package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/debug-selectors.d.ts +1 -1
  74. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-analytics-actions.d.ts +1 -1
  75. package/force-app/main/default/staticresources/coveoheadless/definitions/features/history/history-actions.d.ts +3 -3
  76. package/force-app/main/default/staticresources/coveoheadless/definitions/features/pipeline/select-pipeline.d.ts +1 -1
  77. package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-selectors.d.ts +1 -1
  78. package/force-app/main/default/staticresources/coveoheadless/definitions/features/question-answering/question-answering-document-id.d.ts +1 -1
  79. package/force-app/main/default/staticresources/coveoheadless/definitions/features/question-answering/question-answering-selectors.d.ts +1 -1
  80. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions.d.ts +42 -42
  81. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +44 -44
  82. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +42 -43
  83. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-mappings.d.ts +1 -1
  84. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +44 -44
  85. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-selectors.d.ts +1 -1
  86. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-hub/search-hub-selectors.d.ts +1 -1
  87. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-serializer.d.ts +5 -2
  88. package/force-app/main/default/staticresources/coveoheadless/definitions/selectors/commerce-selectors.index.d.ts +2 -2
  89. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +4 -3
  90. package/force-app/main/default/staticresources/coveoheadless/definitions/state/commerce-app-state.d.ts +2 -2
  91. package/force-app/main/default/staticresources/coveoheadless/definitions/state/state-sections.d.ts +4 -0
  92. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-search-request.d.ts +44 -44
  93. package/force-app/main/default/staticresources/coveoheadless/definitions/tsdoc-metadata.json +1 -1
  94. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/compare-utils.d.ts +2 -1
  95. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/errors.d.ts +3 -0
  96. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/utils.d.ts +0 -1
  97. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/validate-payload.d.ts +1 -1
  98. package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -12
  99. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -11
  100. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +8 -10
  101. package/force-app/main/default/staticresources/dompurify/purify.min.js +2 -1339
  102. package/force-app/main/default/staticresources/marked/marked.min.js +3 -3
  103. package/package.json +12 -16
@@ -1,21 +1,41 @@
1
1
  <template>
2
2
  <div class={tabBarContainerClasses}>
3
- <div class="tab-bar_list-container slds-tabs_default slds-tabs_default__nav slds-is-relative">
3
+ <div
4
+ class="tab-bar_list-container slds-tabs_default slds-tabs_default__nav slds-is-relative"
5
+ >
4
6
  <slot></slot>
5
7
  <div
6
- class="tab-bar_more-button slds-tabs_default__item slds-tabs_default__overflow-button slds-is-absolute slds-p-right_none slds-p-left_none"
8
+ class="tab-bar_more-section slds-tabs_default__item slds-tabs_default__overflow-button slds-is-absolute slds-p-right_none slds-p-left_none"
7
9
  title={labels.moreTabs}
8
10
  role="presentation"
11
+ data-testid="tab-bar_more-section"
9
12
  >
10
- <div class={dropdownClasses}>
11
- <button class="slds-button slds-var-p-horizontal_small" aria-haspopup="true" onclick={toggleDropdown}>
13
+ <div class={dropdownClasses} data-testid="tab-bar_dropdown-container">
14
+ <button
15
+ data-testid="tab-bar_more-button"
16
+ class="slds-button slds-var-p-horizontal_small"
17
+ aria-haspopup="true"
18
+ onclick={toggleDropdown}
19
+ name={labels.more}
20
+ >
12
21
  {moreButtonLabel}
13
- <lightning-icon class={moreButtonIconClasses} icon-name={arrowIconName} size="xx-small" aria-hidden="true"> </lightning-icon>
22
+ <lightning-icon
23
+ class={moreButtonIconClasses}
24
+ icon-name={arrowIconName}
25
+ size="xx-small"
26
+ aria-hidden="true"
27
+ >
28
+ </lightning-icon>
14
29
  </button>
15
30
  <div class="tab-bar_dropdown slds-dropdown slds-dropdown_right">
16
31
  <ul class="slds-dropdown__list" role="menu">
17
32
  <template for:each={tabsInDropdown} for:item="tab">
18
- <li class="slds-dropdown__item" role="presentation" key={tab.id}>
33
+ <li
34
+ data-testid="tab-bar_dropdown-item"
35
+ class="slds-dropdown__item"
36
+ role="presentation"
37
+ key={tab.id}
38
+ >
19
39
  <button
20
40
  class="slds-size_1-of-1 slds-button slds-tabs_default__item"
21
41
  role="menuitem"
@@ -25,8 +45,10 @@
25
45
  data-label={tab.label}
26
46
  onblur={onBlur}
27
47
  >
28
- <span class="slds-tabs_default__link" title={tab.label}>{tab.label}</span>
29
- </button>
48
+ <span class="slds-tabs_default__link" title={tab.label}
49
+ >{tab.label}</span
50
+ >
51
+ </button>
30
52
  </li>
31
53
  </template>
32
54
  </ul>
@@ -258,7 +258,7 @@ export default class QuanticTabBar extends LightningElement {
258
258
  * @returns {HTMLElement}
259
259
  */
260
260
  get moreButton() {
261
- return this.template.querySelector('.tab-bar_more-button');
261
+ return this.template.querySelector('.tab-bar_more-section');
262
262
  }
263
263
 
264
264
  /**
@@ -357,9 +357,10 @@ export default class QuanticTabBar extends LightningElement {
357
357
  * @returns {Array<Element>}
358
358
  */
359
359
  getTabsFromSlot() {
360
- return Array.from(this.querySelectorAll('*')).filter((element) =>
361
- this.isTab(element)
362
- );
360
+ /** @type {HTMLSlotElement} */
361
+ const slot = this.template.querySelector('slot');
362
+
363
+ return slot.assignedElements().filter((element) => this.isTab(element));
363
364
  }
364
365
 
365
366
  isTab = (element) => {
@@ -1,4 +1,4 @@
1
- import {Locator, Page, Request, Response} from '@playwright/test';
1
+ import type {Locator, Page, Request, Response} from '@playwright/test';
2
2
  import {isUaCustomEvent} from '../../../../../../playwright/utils/requests';
3
3
 
4
4
  const userActionsRequestRegex =
@@ -35,17 +35,21 @@ export default class QuanticUserActionsToggle extends LightningElement {
35
35
  @api engineId;
36
36
  /**
37
37
  * The ID of the user whose actions are being displayed. For example in email format "someone@company.com".
38
+ * @api
38
39
  * @type {string}
39
40
  */
40
41
  @api userId;
41
42
  /**
42
43
  * The date and time when the ticket was created. For example "2024-01-01T00:00:00Z"
44
+ * @api
43
45
  * @type {string}
44
46
  */
45
47
  @api ticketCreationDateTime;
46
48
  /**
47
49
  * The names of custom events to exclude.
50
+ * @api
48
51
  * @type {Array<string>}
52
+ * @default []
49
53
  */
50
54
  @api excludedCustomActions = [];
51
55
 
@@ -1,6 +1,6 @@
1
1
  // This is the same js file as what we load inside the LWC via a static resource.
2
2
  import {transformMarkdownToHtml} from 'c/quanticUtils';
3
- import {marked} from '../../../../../../node_modules/marked/lib/marked.cjs';
3
+ import {marked} from '../../../../../../../../node_modules/marked/lib/marked.cjs';
4
4
 
5
5
  const removeLineBreaks = (text) => text.replace(/\n/g, '');
6
6
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  *
4
- * Copyright 2024 Coveo Solutions Inc.
4
+ * Copyright 2025 Coveo Solutions Inc.
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -35,8 +35,8 @@ var __copyProps = (to, from, except, desc) => {
35
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
36
 
37
37
  // src/index.ts
38
- var src_exports = {};
39
- __export(src_exports, {
38
+ var index_exports = {};
39
+ __export(index_exports, {
40
40
  ArrayValue: () => ArrayValue,
41
41
  BooleanValue: () => BooleanValue,
42
42
  EnumValue: () => EnumValue,
@@ -57,7 +57,7 @@ __export(src_exports, {
57
57
  isString: () => isString,
58
58
  isUndefined: () => isUndefined
59
59
  });
60
- module.exports = __toCommonJS(src_exports);
60
+ module.exports = __toCommonJS(index_exports);
61
61
 
62
62
  // src/schema.ts
63
63
  function buildSchemaValidationError(errors, context) {