@coveo/quantic 3.21.0-pre.fe37143864 → 3.21.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/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.html +12 -2
- package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.js +3 -1
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -10
- package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -12
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -11
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +7 -9
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
<template lwc:else>
|
|
7
7
|
<template lwc:if={isFacetEnabled}>
|
|
8
|
-
<div data-
|
|
8
|
+
<div data-testid="facet-content">
|
|
9
9
|
<template if:true={showPlaceholder}>
|
|
10
10
|
<c-quantic-placeholder
|
|
11
11
|
variant="card"
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
>
|
|
32
32
|
</lightning-button-icon>
|
|
33
33
|
<template if:false={isCollapsed}>
|
|
34
|
-
<ul class="slds-has-dividers_around-space slds-m-top_medium">
|
|
34
|
+
<ul data-testid="facet__body" class="slds-has-dividers_around-space slds-m-top_medium">
|
|
35
35
|
<template if:true={withSearch}>
|
|
36
36
|
<div onchange={handleKeyUp} class="slds-size_1-of-1">
|
|
37
37
|
<lightning-input
|
|
38
|
+
data-testid="facet__searchbox-input"
|
|
38
39
|
class="facet__searchbox-input slds-p-horizontal_x-small slds-var-p-bottom_x-small"
|
|
39
40
|
name={labels.search}
|
|
40
41
|
type="search"
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
class="facet__value-option slds-size_1-of-1 slds-p-around_x-small"
|
|
51
52
|
>
|
|
52
53
|
<div
|
|
54
|
+
data-testid="facet__all-categories__button"
|
|
53
55
|
role="button"
|
|
54
56
|
class="facet__allCategories slds-grid slds-size_1-of-1 slds-grid_vertical-align-center"
|
|
55
57
|
tabindex="0"
|
|
@@ -75,6 +77,7 @@
|
|
|
75
77
|
key={v.value}
|
|
76
78
|
>
|
|
77
79
|
<c-quantic-category-facet-value
|
|
80
|
+
data-testid="no-active-parent-facet-value"
|
|
78
81
|
onquantic__selectvalue={onSelectValue}
|
|
79
82
|
item={v}
|
|
80
83
|
non-active-parent="true"
|
|
@@ -87,6 +90,7 @@
|
|
|
87
90
|
class="facet__active-parent slds-grid slds-grid_vertical-align-center slds-p-around_x-small slds-m-left_medium"
|
|
88
91
|
>
|
|
89
92
|
<div
|
|
93
|
+
data-testid="facet__active-parent"
|
|
90
94
|
role="button"
|
|
91
95
|
class="slds-size_1-of-1 slds-grid facet__value-container"
|
|
92
96
|
aria-pressed="true"
|
|
@@ -114,6 +118,7 @@
|
|
|
114
118
|
key={v.value}
|
|
115
119
|
>
|
|
116
120
|
<c-quantic-category-facet-value
|
|
121
|
+
data-testid="facet-value"
|
|
117
122
|
item={v}
|
|
118
123
|
active-parent={activeParent}
|
|
119
124
|
formatting-function={remoteGetValueCaption}
|
|
@@ -130,6 +135,7 @@
|
|
|
130
135
|
<template if:true={hasSearchResults}>
|
|
131
136
|
<template for:each={facetSearchResults} for:item="result">
|
|
132
137
|
<c-quantic-category-facet-value
|
|
138
|
+
data-testid="facet-search-value"
|
|
133
139
|
key={result.index}
|
|
134
140
|
item={result}
|
|
135
141
|
is-search-result="true"
|
|
@@ -143,6 +149,7 @@
|
|
|
143
149
|
<template if:false={hasSearchResults}>
|
|
144
150
|
<li class="slds-grid slds-var-m-top_x-small">
|
|
145
151
|
<span
|
|
152
|
+
data-testid="facet-search__no-match"
|
|
146
153
|
class="slds-truncate slds-var-p-around_small slds-size_1-of-1 facet__search-results_no-match"
|
|
147
154
|
>
|
|
148
155
|
{noMatchesForLabel}
|
|
@@ -152,6 +159,7 @@
|
|
|
152
159
|
<template if:true={canShowMoreSearchResults}>
|
|
153
160
|
<li>
|
|
154
161
|
<span
|
|
162
|
+
data-testid="facet-search__more-matches"
|
|
155
163
|
class="slds-truncate facet__search-results_more-matches"
|
|
156
164
|
>{moreMatchesForLabel}</span
|
|
157
165
|
>
|
|
@@ -165,6 +173,7 @@
|
|
|
165
173
|
>
|
|
166
174
|
<template if:true={canShowLess}>
|
|
167
175
|
<button
|
|
176
|
+
data-testid="facet-values__show-less"
|
|
168
177
|
variant="base"
|
|
169
178
|
class="facet__show-less slds-p-around_none"
|
|
170
179
|
onclick={showLess}
|
|
@@ -178,6 +187,7 @@
|
|
|
178
187
|
</template>
|
|
179
188
|
<template if:true={canShowMore}>
|
|
180
189
|
<button
|
|
190
|
+
data-testid="facet-values__show-more"
|
|
181
191
|
variant="base"
|
|
182
192
|
class="facet__show-more slds-p-around_none"
|
|
183
193
|
onclick={showMore}
|
|
@@ -400,7 +400,9 @@ export default class QuanticCategoryFacet extends LightningElement {
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
get canShowLess() {
|
|
403
|
-
return
|
|
403
|
+
return (
|
|
404
|
+
this.facet && this.state?.canShowLessValues && !this.isFacetSearchActive
|
|
405
|
+
);
|
|
404
406
|
}
|
|
405
407
|
|
|
406
408
|
get hasParents() {
|