@coveo/quantic 3.23.0 → 3.23.1-pre.5ea78fdb09

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.
@@ -93,6 +93,9 @@
93
93
  "quanticGeneratedAnswer/quanticGeneratedAnswer.js"
94
94
  ],
95
95
  "c/quanticAriaLive": ["quanticAriaLive/quanticAriaLive.js"],
96
+ "c/quanticRefineModalContent": [
97
+ "quanticRefineModalContent/quanticRefineModalContent.js"
98
+ ],
96
99
  "c/*": ["*"]
97
100
  }
98
101
  },
@@ -11,7 +11,7 @@
11
11
  <template lwc:if={shouldDisplayRecentResultsCard}>
12
12
  <c-quantic-card-container data-cy="recent-results-card" title={label} onquantic__headerclick={toggleVisibility} onquantic__headerkeydown={toggleVisibility}>
13
13
  <lightning-button-icon class="slds-p-bottom_small" slot="actions" icon-name={actionButtonIcon}
14
- alternative-text={actionButtonLabel} variant="bare" tabindex="-1" aria-hidden="true">
14
+ alternative-text={actionButtonLabel} variant="bare" tabindex="-1" aria-hidden="true" data-testid="action-button">
15
15
  </lightning-button-icon>
16
16
  <template if:false={isCollapsed}>
17
17
  <div class="slds-m-top_medium">
@@ -21,7 +21,7 @@
21
21
  </template>
22
22
  <ul>
23
23
  <template for:each={results} for:item="result">
24
- <li class="slds-grid" key={result.uniqueId}>
24
+ <li class="slds-grid" key={result.uniqueId} data-testid="recent-result-item">
25
25
  <div
26
26
  class="recent-result__container slds-grid_vertical-align-center slds-size_1-of-1 slds-p-around_x-small">
27
27
  <lightning-icon class="recent-result__icon slds-current-color" icon-name="utility:page"
@@ -5,6 +5,7 @@ import recentResultsLabel from '@salesforce/label/c.quantic_RecentResults';
5
5
  import {
6
6
  registerComponentForInit,
7
7
  initializeWithHeadless,
8
+ getHeadlessBundle,
8
9
  } from 'c/quanticHeadlessLoader';
9
10
  import {
10
11
  I18nUtils,
@@ -106,7 +107,8 @@ export default class QuanticRecentResultsList extends LightningElement {
106
107
  * @param {SearchEngine} engine
107
108
  */
108
109
  initialize = (engine) => {
109
- this.recentResultsList = CoveoHeadless.buildRecentResultsList(engine, {
110
+ this.headless = getHeadlessBundle(this.engineId);
111
+ this.recentResultsList = this.headless.buildRecentResultsList(engine, {
110
112
  initialState: {
111
113
  results: getItemFromLocalStorage(this.localStorageKey) ?? [],
112
114
  },
@@ -26,12 +26,13 @@
26
26
  class="slds-align_absolute-center filters-header slds-var-m-bottom_small"
27
27
  >
28
28
  <template if:true={shouldDisplayFiltersTitle}>
29
- <div data-cy="filters-title" class="slds-text-heading_small">
29
+ <div data-testid="filters-title" class="slds-text-heading_small">
30
30
  {labels.filters}
31
31
  </div>
32
32
  </template>
33
33
  <template if:true={hasActiveFilters}>
34
34
  <lightning-button
35
+ data-testid="clear-active-filters-button"
35
36
  variant="base"
36
37
  label={labels.clearAllFilters}
37
38
  title={labels.clearAllFilters}
@@ -26,12 +26,13 @@
26
26
  class="slds-align_absolute-center filters-header slds-var-m-bottom_small"
27
27
  >
28
28
  <template if:true={shouldDisplayFiltersTitle}>
29
- <div data-cy="filters-title" class="slds-text-heading_small">
29
+ <div data-testid="filters-title" class="slds-text-heading_small">
30
30
  {labels.filters}
31
31
  </div>
32
32
  </template>
33
33
  <template if:true={hasActiveFilters}>
34
34
  <lightning-button
35
+ data-testid="clear-active-filters-button"
35
36
  variant="base"
36
37
  label={labels.clearAllFilters}
37
38
  title={labels.clearAllFilters}
@@ -4,49 +4,85 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <button aria-hidden={modalIsOpen} class="slds-button slds-button_neutral refine-button slds-is-relative"
8
- onclick={openModal} title={buttonTitle} disabled={refineButtonDisabled}>
9
- <slot name="button-content">
10
- {labels.sortAndFilters}
11
- <lightning-icon size="x-small" icon-name="utility:filterList" alternative-text={buttonTitle}
12
- class="slds-current-color slds-var-p-vertical_x-small slds-button__icon_right">
13
- </lightning-icon>
14
- </slot>
15
- <template if:true={activeFiltersCount}>
7
+ <button
8
+ data-testid="refine-toggle__button"
9
+ aria-hidden={modalIsOpen}
10
+ class="slds-button slds-button_neutral refine-button slds-is-relative"
11
+ onclick={openModal}
12
+ title={buttonTitle}
13
+ disabled={refineButtonDisabled}
14
+ >
15
+ <slot name="button-content">
16
+ {labels.sortAndFilters}
17
+ <lightning-icon
18
+ size="x-small"
19
+ icon-name="utility:filterList"
20
+ alternative-text={buttonTitle}
21
+ class="slds-current-color slds-var-p-vertical_x-small slds-button__icon_right"
22
+ >
23
+ </lightning-icon>
24
+ </slot>
25
+ <template if:true={activeFiltersCount}>
26
+ <div
27
+ data-testid="refine-toggle__active-filters-badge"
28
+ class="refine-button_filters-badge slds-is-absolute slds-align_absolute-center slds-text-title slds-var-p-around_xxx-small"
29
+ >
30
+ <span class="slds-truncate">{activeFiltersCount}</span>
31
+ </div>
32
+ </template>
33
+ </button>
34
+ <c-quantic-modal
35
+ data-testid="refine-toggle__modal"
36
+ data-id={modalId}
37
+ full-screen={fullScreen}
38
+ >
16
39
  <div
17
- class="refine-button_filters-badge slds-is-absolute slds-align_absolute-center slds-text-title slds-var-p-around_xxx-small">
18
- <span class="slds-truncate">{activeFiltersCount}</span>
40
+ class="slds-var-p-vertical_medium slds-is-relative slds-align_absolute-center slds-border_bottom refine-modal__header"
41
+ slot="header"
42
+ >
43
+ <slot name="refine-title">
44
+ <div class="slds-text-title_bold">{labels.sortAndFilters}</div>
45
+ </slot>
46
+ <lightning-button-icon
47
+ data-focusable="true"
48
+ data-testid="refine-toggle__modal-close-button"
49
+ class="slds-is-absolute slds-align_absolute-center slds-var-m-right_large refine-modal__action"
50
+ onclick={closeModal}
51
+ variant="bare"
52
+ title="Close"
53
+ icon-name="utility:close"
54
+ ></lightning-button-icon>
19
55
  </div>
20
- </template>
21
- </button>
22
- <c-quantic-modal data-id={modalId}>
23
- <div
24
- class="slds-var-p-vertical_medium slds-is-relative slds-align_absolute-center slds-border_bottom refine-modal__header"
25
- slot="header">
26
- <slot name="refine-title">
27
- <div class="slds-text-title_bold">{labels.sortAndFilters}</div>
28
- </slot>
29
- <lightning-button-icon data-focusable="true"
30
- class="slds-is-absolute slds-align_absolute-center slds-var-m-right_large refine-modal__action"
31
- onclick={closeModal} variant="bare" title="Close" icon-name="utility:close"></lightning-button-icon>
32
- </div>
33
- <div class="slds-align_absolute-center" slot="content">
34
- <div class="refine-modal__content">
35
- <template if:true={refineButtonDisabled}>
36
- <div class="slds-align_absolute-center slds-text-color_weak refine-modal__empty-message">
37
- {labels.noFilterForCurrentTab}
38
- </div>
39
- </template>
40
- <c-quantic-refine-modal-content engine-id={engineId} disable-dynamic-navigation={disableDynamicNavigation}></c-quantic-refine-modal-content>
56
+ <div class="slds-align_absolute-center" slot="content">
57
+ <div class="refine-modal__content">
58
+ <template if:true={refineButtonDisabled}>
59
+ <div
60
+ class="slds-align_absolute-center slds-text-color_weak refine-modal__empty-message"
61
+ >
62
+ {labels.noFilterForCurrentTab}
63
+ </div>
64
+ </template>
65
+ <c-quantic-refine-modal-content
66
+ data-testid="refine-toggle__modal-content"
67
+ engine-id={engineId}
68
+ hide-sort={hideSort}
69
+ disable-dynamic-navigation={disableDynamicNavigation}
70
+ ></c-quantic-refine-modal-content>
71
+ </div>
72
+ </div>
73
+ <div
74
+ class="slds-align_absolute-center slds-var-p-vertical_medium slds-border_top refine-modal__footer"
75
+ slot="footer"
76
+ >
77
+ <button
78
+ onclick={closeModal}
79
+ title={viewResultsLabel}
80
+ data-testid="refine-toggle__modal-view-results-button"
81
+ class="slds-button slds-button_brand slds-var-p-vertical_xxx-small refine-modal__footer-button"
82
+ >
83
+ {viewResultsLabel}
84
+ </button>
41
85
  </div>
42
- </div>
43
- <div class="slds-align_absolute-center slds-var-p-vertical_medium slds-border_top refine-modal__footer"
44
- slot="footer">
45
- <button onclick={closeModal} title={viewResultsLabel}
46
- class="slds-button slds-button_brand slds-var-p-vertical_xxx-small refine-modal__footer-button">
47
- {viewResultsLabel}
48
- </button>
49
- </div>
50
- </c-quantic-modal>
86
+ </c-quantic-modal>
51
87
  </template>
52
- </template>
88
+ </template>
@@ -143,9 +143,6 @@ export default class QuanticRefineToggle extends LightningElement {
143
143
  Object.keys(registeredFacets).forEach((facetId) => {
144
144
  this.renderedFacets[facetId] = true;
145
145
  });
146
-
147
- this.modal.fullScreen = this.fullScreen;
148
- this.modalContent.hideSort = this.hideSort;
149
146
  };
150
147
 
151
148
  get refineButtonDisabled() {
@@ -49,4 +49,4 @@ For more information, refer to the documentation: https://docs.coveo.com/en/o3r9
49
49
  * limitations under the License.
50
50
  */if(__exports!=exports)module.exports=exports;return module.exports});
51
51
 
52
- window.coveoQuanticVersion = '3.23.0';
52
+ window.coveoQuanticVersion = '3.23.1-pre.5ea78fdb09';
@@ -53,4 +53,4 @@ For more information, refer to the documentation: https://docs.coveo.com/en/o3r9
53
53
  * limitations under the License.
54
54
  */if(__exports!=exports)module.exports=exports;return module.exports});
55
55
 
56
- window.coveoQuanticVersion = '3.23.0';
56
+ window.coveoQuanticVersion = '3.23.1-pre.5ea78fdb09';
@@ -50,4 +50,4 @@ For more information, refer to the documentation: https://docs.coveo.com/en/o3r9
50
50
  * limitations under the License.
51
51
  */if(__exports!=exports)module.exports=exports;return module.exports});
52
52
 
53
- window.coveoQuanticVersion = '3.23.0';
53
+ window.coveoQuanticVersion = '3.23.1-pre.5ea78fdb09';
@@ -46,4 +46,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
46
46
  * limitations under the License.
47
47
  */if(__exports!=exports)module.exports=exports;return module.exports});
48
48
 
49
- window.coveoQuanticVersion = '3.23.0';
49
+ window.coveoQuanticVersion = '3.23.1-pre.5ea78fdb09';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/quantic",
3
- "version": "3.23.0",
3
+ "version": "3.23.1-pre.5ea78fdb09",
4
4
  "description": "A Salesforce Lightning Web Component (LWC) library for building modern UIs interfacing with the Coveo platform",
5
5
  "author": "coveo.com",
6
6
  "homepage": "https://coveo.com",