@coveo/quantic 3.18.0-pre.5c00d33d6e → 3.18.0-pre.67ba0ef4e6
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/quanticNumericFacet/quanticNumericFacet.html +4 -1
- package/force-app/main/default/lwc/quanticNumericFacet/quanticNumericFacet.js +15 -23
- package/force-app/main/default/lwc/quanticResultAction/quanticResultAction.html +1 -1
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +1 -1
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +1 -1
- package/package.json +1 -1
|
@@ -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"
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
</lightning-button-icon>
|
|
36
36
|
<template if:true={hasActiveValues}>
|
|
37
37
|
<button
|
|
38
|
+
data-testid="clear-selection-button"
|
|
38
39
|
class="facet__clear-filter slds-button slds-grid slds-grid_vertical-align-center slds-var-p-horizontal_x-small slds-m-top_small"
|
|
39
40
|
onclick={clearSelections}
|
|
40
41
|
title={clearFilterLabel}
|
|
@@ -53,11 +54,13 @@
|
|
|
53
54
|
</template>
|
|
54
55
|
<template if:false={isCollapsed}>
|
|
55
56
|
<div
|
|
57
|
+
data-testid="facet__body"
|
|
56
58
|
class="slds-has-dividers_around-space slds-var-m-top_medium"
|
|
57
59
|
>
|
|
58
60
|
<template if:true={withInput}>
|
|
59
61
|
<div class="slds-p-horizontal_x-small">
|
|
60
62
|
<form
|
|
63
|
+
data-testid="facet__search-form"
|
|
61
64
|
onsubmit={onApply}
|
|
62
65
|
class="facet__search-form slds-grid slds-gutters slds-var-p-bottom_small"
|
|
63
66
|
>
|
|
@@ -15,7 +15,6 @@ import numberInputMinimum from '@salesforce/label/c.quantic_NumberInputMinimum';
|
|
|
15
15
|
import {
|
|
16
16
|
registerComponentForInit,
|
|
17
17
|
initializeWithHeadless,
|
|
18
|
-
getHeadlessBindings,
|
|
19
18
|
registerToStore,
|
|
20
19
|
getHeadlessBundle,
|
|
21
20
|
getBueno,
|
|
@@ -34,6 +33,7 @@ import {LightningElement, track, api} from 'lwc';
|
|
|
34
33
|
/** @typedef {import("coveo").NumericFacetValue} NumericFacetValue */
|
|
35
34
|
/** @typedef {import("coveo").SearchStatus} SearchStatus */
|
|
36
35
|
/** @typedef {import("coveo").SearchEngine} SearchEngine */
|
|
36
|
+
/** @typedef {import("coveo").InsightEngine} InsightEngine */
|
|
37
37
|
/** @typedef {import("coveo").FacetConditionsManager} FacetConditionsManager */
|
|
38
38
|
/** @typedef {import('../quanticUtils/facetDependenciesUtils').DependsOn} DependsOn */
|
|
39
39
|
/**
|
|
@@ -223,6 +223,8 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
223
223
|
numericFacetConditionsManager;
|
|
224
224
|
/** @type {FacetConditionsManager} */
|
|
225
225
|
numericFilterConditionsManager;
|
|
226
|
+
/** @type {SearchEngine | InsightEngine} */
|
|
227
|
+
engine;
|
|
226
228
|
|
|
227
229
|
/** @type {string} */
|
|
228
230
|
start;
|
|
@@ -262,9 +264,10 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
262
264
|
}
|
|
263
265
|
|
|
264
266
|
/**
|
|
265
|
-
* @param {SearchEngine} engine
|
|
267
|
+
* @param {SearchEngine | InsightEngine} engine
|
|
266
268
|
*/
|
|
267
269
|
initialize = (engine) => {
|
|
270
|
+
this.engine = engine;
|
|
268
271
|
this.validateDependsOnProperty();
|
|
269
272
|
this.headless = getHeadlessBundle(this.engineId);
|
|
270
273
|
this.searchStatus = this.headless.buildSearchStatus(engine);
|
|
@@ -273,15 +276,11 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
273
276
|
);
|
|
274
277
|
|
|
275
278
|
if (this.numberOfValues > 0) {
|
|
276
|
-
this.initializeFacet(
|
|
279
|
+
this.initializeFacet();
|
|
277
280
|
}
|
|
278
281
|
if (this.withInput) {
|
|
279
|
-
this.initializeFilter(
|
|
282
|
+
this.initializeFilter();
|
|
280
283
|
}
|
|
281
|
-
this.searchStatus = this.headless.buildSearchStatus(engine);
|
|
282
|
-
this.unsubscribeSearchStatus = this.searchStatus.subscribe(() =>
|
|
283
|
-
this.updateState()
|
|
284
|
-
);
|
|
285
284
|
registerToStore(this.engineId, Store.facetTypes.NUMERICFACETS, {
|
|
286
285
|
label: this.label,
|
|
287
286
|
facetId: this.facet?.state.facetId ?? this.field,
|
|
@@ -310,11 +309,8 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
310
309
|
}
|
|
311
310
|
}
|
|
312
311
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
*/
|
|
316
|
-
initializeFacet(engine) {
|
|
317
|
-
this.facet = this.headless.buildNumericFacet(engine, {
|
|
312
|
+
initializeFacet() {
|
|
313
|
+
this.facet = this.headless.buildNumericFacet(this.engine, {
|
|
318
314
|
options: {
|
|
319
315
|
field: this.field,
|
|
320
316
|
generateAutomaticRanges: true,
|
|
@@ -327,17 +323,14 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
327
323
|
this.unsubscribe = this.facet.subscribe(() => this.updateState());
|
|
328
324
|
if (this.dependsOn) {
|
|
329
325
|
this.numericFacetConditionsManager = this.initFacetConditionManager(
|
|
330
|
-
engine,
|
|
326
|
+
this.engine,
|
|
331
327
|
this.facet.state?.facetId
|
|
332
328
|
);
|
|
333
329
|
}
|
|
334
330
|
}
|
|
335
331
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
*/
|
|
339
|
-
initializeFilter(engine) {
|
|
340
|
-
this.numericFilter = this.headless.buildNumericFilter(engine, {
|
|
332
|
+
initializeFilter() {
|
|
333
|
+
this.numericFilter = this.headless.buildNumericFilter(this.engine, {
|
|
341
334
|
options: {
|
|
342
335
|
field: this.field,
|
|
343
336
|
facetId: this.facet?.state.facetId
|
|
@@ -350,7 +343,7 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
350
343
|
);
|
|
351
344
|
if (this.dependsOn) {
|
|
352
345
|
this.numericFilterConditionsManager = this.initFacetConditionManager(
|
|
353
|
-
engine,
|
|
346
|
+
this.engine,
|
|
354
347
|
this.numericFilter.state?.facetId
|
|
355
348
|
);
|
|
356
349
|
}
|
|
@@ -580,10 +573,9 @@ export default class QuanticNumericFacet extends LightningElement {
|
|
|
580
573
|
}
|
|
581
574
|
|
|
582
575
|
if (this.numberOfValues > 0) {
|
|
583
|
-
|
|
584
|
-
engine.dispatch(
|
|
576
|
+
this.engine.dispatch(
|
|
585
577
|
this.headless
|
|
586
|
-
.loadNumericFacetSetActions(engine)
|
|
578
|
+
.loadNumericFacetSetActions(this.engine)
|
|
587
579
|
.deselectAllNumericFacetValues(this.facet.state.facetId)
|
|
588
580
|
);
|
|
589
581
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</button>
|
|
12
12
|
</template>
|
|
13
13
|
<template if:false={loading}>
|
|
14
|
-
<lightning-button-icon-stateful onclick={handleClick} aria-label={displayedLabel} variant="border-filled"
|
|
14
|
+
<lightning-button-icon-stateful data-testid="result-action-button" onclick={handleClick} aria-label={displayedLabel} variant="border-filled"
|
|
15
15
|
class={resultActionOrderClasses} icon-name={displayedIcon} selected={_selected}>
|
|
16
16
|
</lightning-button-icon-stateful>
|
|
17
17
|
</template>
|
|
@@ -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.18.0-pre.
|
|
52
|
+
window.coveoQuanticVersion = '3.18.0-pre.67ba0ef4e6';
|
|
@@ -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.18.0-pre.
|
|
56
|
+
window.coveoQuanticVersion = '3.18.0-pre.67ba0ef4e6';
|
|
@@ -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.18.0-pre.
|
|
53
|
+
window.coveoQuanticVersion = '3.18.0-pre.67ba0ef4e6';
|
|
@@ -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.18.0-pre.
|
|
49
|
+
window.coveoQuanticVersion = '3.18.0-pre.67ba0ef4e6';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/quantic",
|
|
3
|
-
"version": "3.18.0-pre.
|
|
3
|
+
"version": "3.18.0-pre.67ba0ef4e6",
|
|
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",
|