@coveo/quantic 3.45.6 → 3.45.8

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 (83) hide show
  1. package/docs/out/quantic-docs.json +5 -5
  2. package/force-app/main/default/labels/CustomLabels.labels-meta.xml +12 -5
  3. package/force-app/main/default/lwc/quanticBreadcrumbManager/quanticBreadcrumbManager.html +4 -4
  4. package/force-app/main/default/lwc/quanticCarousel/quanticCarousel.html +2 -2
  5. package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.html +18 -18
  6. package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.js +3 -3
  7. package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.html +45 -45
  8. package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.js +9 -0
  9. package/force-app/main/default/lwc/quanticCategoryFacetValue/quanticCategoryFacetValue.html +11 -11
  10. package/force-app/main/default/lwc/quanticColoredResultBadge/quanticColoredResultBadge.html +5 -5
  11. package/force-app/main/default/lwc/quanticDateFacet/quanticDateFacet.html +4 -4
  12. package/force-app/main/default/lwc/quanticDateFacet/quanticDateFacet.js +4 -0
  13. package/force-app/main/default/lwc/quanticDidYouMean/templates/didYouMean.html +2 -2
  14. package/force-app/main/default/lwc/quanticDocumentSuggestion/quanticDocumentSuggestion.html +4 -4
  15. package/force-app/main/default/lwc/quanticFacet/quanticFacet.html +43 -43
  16. package/force-app/main/default/lwc/quanticFacet/quanticFacet.js +8 -0
  17. package/force-app/main/default/lwc/quanticFacetValue/quanticFacetValue.html +5 -5
  18. package/force-app/main/default/lwc/quanticFacetValue/quanticFacetValue.js +4 -0
  19. package/force-app/main/default/lwc/quanticFeedbackModal/feedbackForm.html +2 -2
  20. package/force-app/main/default/lwc/quanticFoldedResultList/quanticFoldedResultList.html +1 -1
  21. package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js +3 -5
  22. package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/conversation.html +2 -2
  23. package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +8 -10
  24. package/force-app/main/default/lwc/quanticInsightSummary/quanticInsightSummary.html +5 -5
  25. package/force-app/main/default/lwc/quanticInsightSummary/quanticInsightSummary.js +4 -0
  26. package/force-app/main/default/lwc/quanticModal/quanticModal.html +2 -2
  27. package/force-app/main/default/lwc/quanticNoResults/quanticNoResults.html +4 -4
  28. package/force-app/main/default/lwc/quanticNumericFacet/quanticNumericFacet.html +6 -6
  29. package/force-app/main/default/lwc/quanticNumericFacet/quanticNumericFacet.js +4 -0
  30. package/force-app/main/default/lwc/quanticPlaceholder/quanticPlaceholder.html +3 -3
  31. package/force-app/main/default/lwc/quanticQueryError/quanticQueryError.html +6 -6
  32. package/force-app/main/default/lwc/quanticQueryError/quanticQueryError.js +4 -0
  33. package/force-app/main/default/lwc/quanticQuickviewContent/quanticQuickviewDefault.html +1 -1
  34. package/force-app/main/default/lwc/quanticQuickviewContent/quanticQuickviewYoutube.html +1 -1
  35. package/force-app/main/default/lwc/quanticRecentQueriesList/quanticRecentQueriesList.html +4 -4
  36. package/force-app/main/default/lwc/quanticRecentQueriesList/quanticRecentQueriesList.js +8 -0
  37. package/force-app/main/default/lwc/quanticRecentResultsList/quanticRecentResultsList.html +4 -4
  38. package/force-app/main/default/lwc/quanticRecentResultsList/quanticRecentResultsList.js +8 -0
  39. package/force-app/main/default/lwc/quanticRefineModalContent/quanticRefineModalContent.js +4 -0
  40. package/force-app/main/default/lwc/quanticRefineModalContent/templates/disabledDynamicNavigation.html +9 -9
  41. package/force-app/main/default/lwc/quanticRefineModalContent/templates/dynamicNavigation.html +9 -9
  42. package/force-app/main/default/lwc/quanticRefineToggle/quanticRefineToggle.html +2 -2
  43. package/force-app/main/default/lwc/quanticResult/quanticResult.html +1 -1
  44. package/force-app/main/default/lwc/quanticResultAction/quanticResultAction.html +3 -3
  45. package/force-app/main/default/lwc/quanticResultChildren/quanticResultChildren.html +3 -3
  46. package/force-app/main/default/lwc/quanticResultDate/quanticResultDate.html +2 -2
  47. package/force-app/main/default/lwc/quanticResultDate/quanticResultDate.js +1 -1
  48. package/force-app/main/default/lwc/quanticResultField/quanticResultField.js +1 -1
  49. package/force-app/main/default/lwc/quanticResultHighlightedTextField/quanticResultHighlightedTextField.html +3 -3
  50. package/force-app/main/default/lwc/quanticResultLabel/quanticResultLabel.html +3 -3
  51. package/force-app/main/default/lwc/quanticResultLabel/quanticResultLabel.js +4 -0
  52. package/force-app/main/default/lwc/quanticResultList/quanticResultList.html +1 -1
  53. package/force-app/main/default/lwc/quanticResultMultiValueText/quanticResultMultiValueText.html +3 -3
  54. package/force-app/main/default/lwc/quanticResultMultiValueText/quanticResultMultiValueText.js +1 -1
  55. package/force-app/main/default/lwc/quanticResultNumber/quanticResultNumber.html +2 -2
  56. package/force-app/main/default/lwc/quanticResultNumber/quanticResultNumber.js +1 -1
  57. package/force-app/main/default/lwc/quanticResultPrintableUri/quanticResultPrintableUri.html +4 -4
  58. package/force-app/main/default/lwc/quanticResultQuickview/quanticResultQuickview.html +5 -5
  59. package/force-app/main/default/lwc/quanticResultQuickview/quanticResultQuickview.js +2 -2
  60. package/force-app/main/default/lwc/quanticResultTag/quanticResultTag.html +2 -2
  61. package/force-app/main/default/lwc/quanticResultText/quanticResultText.html +3 -3
  62. package/force-app/main/default/lwc/quanticResultText/quanticResultText.js +1 -1
  63. package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.html +1 -1
  64. package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.js +1 -1
  65. package/force-app/main/default/lwc/quanticSearchBoxInput/quanticSearchBoxInput.js +6 -2
  66. package/force-app/main/default/lwc/quanticSearchBoxInput/templates/defaultSearchBoxInput.html +4 -4
  67. package/force-app/main/default/lwc/quanticSearchBoxInput/templates/expandableSearchBoxInput.html +4 -4
  68. package/force-app/main/default/lwc/quanticSmartSnippet/quanticSmartSnippet.html +2 -2
  69. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/quanticSmartSnippetSuggestions.html +1 -1
  70. package/force-app/main/default/lwc/quanticSourceCitations/quanticSourceCitations.html +1 -1
  71. package/force-app/main/default/lwc/quanticStandaloneSearchBox/templates/standaloneSearchBox.html +2 -2
  72. package/force-app/main/default/lwc/quanticSummary/quanticSummary.html +1 -1
  73. package/force-app/main/default/lwc/quanticTimeframeFacet/quanticTimeframeFacet.html +7 -7
  74. package/force-app/main/default/lwc/quanticTimeframeFacet/quanticTimeframeFacet.js +5 -0
  75. package/force-app/main/default/lwc/quanticViewedByCustomerBadge/quanticViewedByCustomerBadge.html +2 -2
  76. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +17 -17
  77. package/force-app/main/default/staticresources/coveoheadless/definitions/app/logger.d.ts +2 -2
  78. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/build-factory.d.ts +1 -1
  79. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/build.d.ts +2 -2
  80. package/force-app/main/default/staticresources/coveoheadless/headless.js +21 -21
  81. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +18 -18
  82. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +16 -16
  83. package/package.json +10 -10
@@ -261,6 +261,10 @@ export default class QuanticRefineModalContent extends LightningElement {
261
261
  'c-quantic-facet': this.toDefaultFacet,
262
262
  };
263
263
 
264
+ get showSort() {
265
+ return !this.hideSort;
266
+ }
267
+
264
268
  /**
265
269
  * Returns facet data.
266
270
  * @returns {Array<object>}
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:false={hideSort}>
7
+ <template lwc:if={showSort}>
8
8
  <div class="slds-var-m-bottom_large slds-clearfix">
9
9
  <template lwc:if={isSortComponentReady}>
10
10
  <c-quantic-sort engine-id={engineId} variant="wide">
@@ -21,16 +21,16 @@
21
21
  </template>
22
22
  </div>
23
23
  </template>
24
- <template if:true={hasFacets}>
24
+ <template lwc:if={hasFacets}>
25
25
  <div
26
26
  class="slds-align_absolute-center filters-header slds-var-m-bottom_small"
27
27
  >
28
- <template if:true={shouldDisplayFiltersTitle}>
28
+ <template lwc:if={shouldDisplayFiltersTitle}>
29
29
  <div data-testid="filters-title" class="slds-text-heading_small">
30
30
  {labels.filters}
31
31
  </div>
32
32
  </template>
33
- <template if:true={hasActiveFilters}>
33
+ <template lwc:if={hasActiveFilters}>
34
34
  <lightning-button
35
35
  data-testid="clear-active-filters-button"
36
36
  variant="base"
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
  </div>
43
43
  <template for:each={facets} for:item="facet">
44
- <template if:true={facet.isNumeric}>
44
+ <template lwc:if={facet.isNumeric}>
45
45
  <c-quantic-numeric-facet
46
46
  engine-id={engineId}
47
47
  facet-id={facet.facetId}
@@ -57,7 +57,7 @@
57
57
  is-collapsed
58
58
  ></c-quantic-numeric-facet>
59
59
  </template>
60
- <template if:true={facet.isCategory}>
60
+ <template lwc:if={facet.isCategory}>
61
61
  <c-quantic-category-facet
62
62
  engine-id={engineId}
63
63
  facet-id={facet.facetId}
@@ -84,7 +84,7 @@
84
84
  </template>
85
85
  </c-quantic-category-facet>
86
86
  </template>
87
- <template if:true={facet.isTimeframe}>
87
+ <template lwc:if={facet.isTimeframe}>
88
88
  <c-quantic-timeframe-facet
89
89
  engine-id={engineId}
90
90
  facet-id={facet.facetId}
@@ -108,7 +108,7 @@
108
108
  </template>
109
109
  </c-quantic-timeframe-facet>
110
110
  </template>
111
- <template if:true={facet.isDate}>
111
+ <template lwc:if={facet.isDate}>
112
112
  <c-quantic-date-facet
113
113
  engine-id={engineId}
114
114
  facet-id={facet.facetId}
@@ -121,7 +121,7 @@
121
121
  is-collapsed
122
122
  ></c-quantic-date-facet>
123
123
  </template>
124
- <template if:true={facet.isDefault}>
124
+ <template lwc:if={facet.isDefault}>
125
125
  <c-quantic-facet
126
126
  engine-id={engineId}
127
127
  facet-id={facet.facetId}
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:false={hideSort}>
7
+ <template lwc:if={showSort}>
8
8
  <div class="slds-var-m-bottom_large slds-clearfix">
9
9
  <template lwc:if={isSortComponentReady}>
10
10
  <c-quantic-sort engine-id={engineId} variant="wide">
@@ -21,16 +21,16 @@
21
21
  </template>
22
22
  </div>
23
23
  </template>
24
- <template if:true={hasFacets}>
24
+ <template lwc:if={hasFacets}>
25
25
  <div
26
26
  class="slds-align_absolute-center filters-header slds-var-m-bottom_small"
27
27
  >
28
- <template if:true={shouldDisplayFiltersTitle}>
28
+ <template lwc:if={shouldDisplayFiltersTitle}>
29
29
  <div data-testid="filters-title" class="slds-text-heading_small">
30
30
  {labels.filters}
31
31
  </div>
32
32
  </template>
33
- <template if:true={hasActiveFilters}>
33
+ <template lwc:if={hasActiveFilters}>
34
34
  <lightning-button
35
35
  data-testid="clear-active-filters-button"
36
36
  variant="base"
@@ -42,7 +42,7 @@
42
42
  </div>
43
43
  <c-quantic-facet-manager engine-id={engineId}>
44
44
  <template for:each={facets} for:item="facet">
45
- <template if:true={facet.isNumeric}>
45
+ <template lwc:if={facet.isNumeric}>
46
46
  <c-quantic-numeric-facet
47
47
  engine-id={engineId}
48
48
  facet-id={facet.facetId}
@@ -58,7 +58,7 @@
58
58
  is-collapsed
59
59
  ></c-quantic-numeric-facet>
60
60
  </template>
61
- <template if:true={facet.isCategory}>
61
+ <template lwc:if={facet.isCategory}>
62
62
  <c-quantic-category-facet
63
63
  engine-id={engineId}
64
64
  facet-id={facet.facetId}
@@ -85,7 +85,7 @@
85
85
  </template>
86
86
  </c-quantic-category-facet>
87
87
  </template>
88
- <template if:true={facet.isTimeframe}>
88
+ <template lwc:if={facet.isTimeframe}>
89
89
  <c-quantic-timeframe-facet
90
90
  engine-id={engineId}
91
91
  facet-id={facet.facetId}
@@ -109,7 +109,7 @@
109
109
  </template>
110
110
  </c-quantic-timeframe-facet>
111
111
  </template>
112
- <template if:true={facet.isDate}>
112
+ <template lwc:if={facet.isDate}>
113
113
  <c-quantic-date-facet
114
114
  engine-id={engineId}
115
115
  facet-id={facet.facetId}
@@ -122,7 +122,7 @@
122
122
  is-collapsed
123
123
  ></c-quantic-date-facet>
124
124
  </template>
125
- <template if:true={facet.isDefault}>
125
+ <template lwc:if={facet.isDefault}>
126
126
  <c-quantic-facet
127
127
  engine-id={engineId}
128
128
  facet-id={facet.facetId}
@@ -22,7 +22,7 @@
22
22
  >
23
23
  </lightning-icon>
24
24
  </slot>
25
- <template if:true={activeFiltersCount}>
25
+ <template lwc:if={activeFiltersCount}>
26
26
  <div
27
27
  data-testid="refine-toggle__active-filters-badge"
28
28
  class="refine-button_filters-badge slds-is-absolute slds-align_absolute-center slds-text-title slds-var-p-around_xxx-small"
@@ -55,7 +55,7 @@
55
55
  </div>
56
56
  <div class="slds-align_absolute-center" slot="content">
57
57
  <div class="refine-modal__content">
58
- <template if:true={refineButtonDisabled}>
58
+ <template lwc:if={refineButtonDisabled}>
59
59
  <div
60
60
  class="slds-align_absolute-center slds-text-color_weak refine-modal__empty-message"
61
61
  >
@@ -7,7 +7,7 @@
7
7
  </div>
8
8
  <c-quantic-result-tag variant="featured" result={result}></c-quantic-result-tag>
9
9
  </div>
10
- <template if:true={resultHasPreview}>
10
+ <template lwc:if={resultHasPreview}>
11
11
  <c-quantic-result-quickview slot="actions" engine-id={engineId} result={result}></c-quantic-result-quickview>
12
12
  </template>
13
13
  <p slot="date" class="slds-size_xx-small">
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="slds-is-relative slds-show_inline result-action_container result-action_white-container" onmouseenter={showTooltip} onmouseleave={hideTooltip}>
3
- <template if:true={loading}>
3
+ <template lwc:if={loading}>
4
4
  <button class={loadingClasses} aria-label={displayedLabel}>
5
5
  <div class="slds-spinner_container slds-var-m-around_xx-small">
6
6
  <div role="status" class="slds-spinner slds-spinner_xx-small">
@@ -10,12 +10,12 @@
10
10
  </div>
11
11
  </button>
12
12
  </template>
13
- <template if:false={loading}>
13
+ <template lwc:else>
14
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>
18
- <template if:true={displayedLabel}>
18
+ <template lwc:if={displayedLabel}>
19
19
  <c-quantic-tooltip>
20
20
  <div slot="content">{displayedLabel}</div>
21
21
  </c-quantic-tooltip>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="slds-var-m-left_medium">
3
- <template if:true={shouldDisplayChildren}>
3
+ <template lwc:if={shouldDisplayChildren}>
4
4
  <div class="slds-var-m-top_medium">
5
5
  <slot name="before-children"></slot>
6
6
  <div class="slds-var-p-left_medium slds-border_left">
@@ -19,7 +19,7 @@
19
19
  <slot name="after-children"></slot>
20
20
  </div>
21
21
  </template>
22
- <template if:true={shouldDisplayChildResultsToggle}>
22
+ <template lwc:if={shouldDisplayChildResultsToggle}>
23
23
  <div class="slds-grid slds-grid_align-end result-children__toggle-button">
24
24
  <lightning-button
25
25
  variant="base"
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  </template>
33
33
 
34
- <template if:true={shouldDisplayNoChildrenMessage}>
34
+ <template lwc:if={shouldDisplayNoChildrenMessage}>
35
35
  <div
36
36
  class="result-children__no-more-children-message slds-grid slds-grid_align-end slds-var-p-vertical_x-small slds-text-color_weak"
37
37
  >
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <template if:true={error}>
2
+ <template lwc:if={error}>
3
3
  <div class="error-message slds-text-color_destructive">{error}</div>
4
4
  </template>
5
- <template if:true={isValid}>
5
+ <template lwc:if={isValid}>
6
6
  <c-quantic-result-text result={result} field={field} label={label} formatting-function={formattingFunction}></c-quantic-result-text>
7
7
  </template>
8
8
  </template>
@@ -9,7 +9,7 @@ import {LightningElement, api} from 'lwc';
9
9
  * Make sure the field specified in this component is also included in the field array for the relevant template. See the this example: [Quantic usage](https://docs.coveo.com/en/quantic/latest/usage/#javascript).
10
10
  * @category Result Template
11
11
  * @example
12
- * <template if:true={result.raw.date}>
12
+ * <template lwc:if={result.raw.date}>
13
13
  * <c-quantic-result-date result={result} label="Date" field="date"></c-quantic-result-date>
14
14
  * </template>
15
15
  */
@@ -17,7 +17,7 @@ import stringTemplate from './stringTemplate.html';
17
17
  * Make sure the field specified in this component is also included in the field array for the relevant template. See the this example: [Quantic usage](https://docs.coveo.com/en/quantic/latest/usage/#javascript).
18
18
  * @category Result Template
19
19
  * @example
20
- * <template if:true={result.raw.source}>
20
+ * <template lwc:if={result.raw.source}>
21
21
  * <c-quantic-result-field result={result} label="Source" field="source" type="string"></c-quantic-result-field>
22
22
  * </template>
23
23
  */
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <template if:true={error}>
2
+ <template lwc:if={error}>
3
3
  <div class="error-message slds-text-color_destructive">{error}</div>
4
4
  </template>
5
- <template if:true={isValid}>
6
- <template if:true={label}>
5
+ <template lwc:if={isValid}>
6
+ <template lwc:if={label}>
7
7
  <span class="result-text__label slds-m-right_xx-small">{label}:</span>
8
8
  </template>
9
9
  <span class="result-text__value" lwc:dom="manual"></span>
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div class="result__label slds-grid slds-grid_vertical-align-center">
3
- <template if:true={error}>
3
+ <template lwc:if={error}>
4
4
  <div class="error-message slds-text-color_destructive">{error}</div>
5
5
  </template>
6
- <template if:false={error}>
6
+ <template lwc:else>
7
7
  <lightning-icon icon-name={iconToDisplay} size={size} alternative-text={labelToDisplay}></lightning-icon>
8
- <template if:false={iconOnly}>
8
+ <template lwc:if={showLabel}>
9
9
  <span class="result-label__label slds-m-left_x-small">{labelToDisplay}</span>
10
10
  </template>
11
11
  </template>
@@ -82,6 +82,10 @@ export default class QuanticResultLabel extends LightningElement {
82
82
  ?.style.setProperty('font-size', this.size);
83
83
  }
84
84
 
85
+ get showLabel() {
86
+ return !this.iconOnly;
87
+ }
88
+
85
89
  get iconToDisplay() {
86
90
  if (this.icon) {
87
91
  return this.icon;
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:true={showPlaceholder}>
7
+ <template lwc:if={showPlaceholder}>
8
8
  <c-quantic-placeholder
9
9
  variant="resultList"
10
10
  number-of-rows={numberOfResults}
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="slds-grid slds-grid_vertical-align-center">
3
- <template if:true={error}>
3
+ <template lwc:if={error}>
4
4
  <div class="error-message slds-text-color_destructive">{error}</div>
5
5
  </template>
6
- <template if:true={isValid}>
7
- <template if:true={label}>
6
+ <template lwc:if={isValid}>
7
+ <template lwc:if={label}>
8
8
  <span class="result-text__label slds-m-right_xx-small">{label}:</span>
9
9
  </template>
10
10
  <span class="result-text__value">{valueToDisplay}</span>
@@ -10,7 +10,7 @@ import {LightningElement, api} from 'lwc';
10
10
  * Make sure the field specified in this component is also included in the field array for the relevant template. See the this example: [Quantic usage](https://docs.coveo.com/en/quantic/latest/usage/#javascript).
11
11
  * @category Result Template
12
12
  * @example
13
- * <template if:true={result.raw.language}>
13
+ * <template lwc:if={result.raw.language}>
14
14
  * <c-quantic-result-multi-value-text result={result} label="Languages" field="language" max-values-to-display="4"></c-quantic-result-multi-value-text>
15
15
  * </template>
16
16
  */
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <template if:true={error}>
2
+ <template lwc:if={error}>
3
3
  <div class="error-message slds-text-color_destructive">{error}</div>
4
4
  </template>
5
- <template if:true={isValid}>
5
+ <template lwc:if={isValid}>
6
6
  <c-quantic-result-text result={result} field={field} label={label} formatting-function={formattingFunction}></c-quantic-result-text>
7
7
  </template>
8
8
  </template>
@@ -9,7 +9,7 @@ import {LightningElement, api} from 'lwc';
9
9
  * Make sure the field specified in this component is also included in the field array for the relevant template. See the this example: [Quantic usage](https://docs.coveo.com/en/quantic/latest/usage/#javascript).
10
10
  * @category Result Template
11
11
  * @example
12
- * <template if:true={result.raw.ytlikecount}>
12
+ * <template lwc:if={result.raw.ytlikecount}>
13
13
  * <c-quantic-result-number result={result} label="Likes" field="ytlikecount"></c-quantic-result-number>
14
14
  * </template>
15
15
  */
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div class="slds-wrap slds-grid_vertical-align-center slds-size_1-of-1 slds-list_horizontal">
3
- <template if:true={error}>
3
+ <template lwc:if={error}>
4
4
  <div data-test="error" class="error-message slds-text-color_destructive">{error}</div>
5
5
  </template>
6
- <template if:false={error}>
6
+ <template lwc:else>
7
7
  <template for:each={foldedParents} for:item="parent">
8
8
  <div class="result-parenturi__container slds-grid slds-grid_vertical-align-center" key={parent.id}>
9
- <template if:true={parent.isFolded}>
9
+ <template lwc:if={parent.isFolded}>
10
10
  <button data-test="path__expand-button" class="slds-button expand-parenturi__container" variant="base" label="..." title="Expand URI" aria-label="Expand URI" onclick={expandParents}>...</button>
11
11
  </template>
12
- <template if:false={parent.isFolded}>
12
+ <template lwc:else>
13
13
  <a data-test="path__item" class={parent.classes} href={parent.uri} target={target}>{parent.name}</a>
14
14
  </template>
15
15
  <lightning-icon class="slds-m-horizontal_xx-small result-parenturi__separator slds-current-color" icon-name="utility:chevronright" size="xx-small"></lightning-icon>
@@ -3,20 +3,20 @@
3
3
  onmouseleave={hideTooltip}>
4
4
  <button data-testid="quick-view-button" aria-hidden={isQuickviewOpen} class={buttonClass} onclick={openQuickview}
5
5
  title={buttonTitle} disabled={hasNoPreview} aria-label={buttonAriaLabelValue}>
6
- <template if:true={hasButtonLabel}> {previewButtonLabel} </template>
7
- <template if:true={hasIcon}>
6
+ <template lwc:if={hasButtonLabel}> {previewButtonLabel} </template>
7
+ <template lwc:if={hasIcon}>
8
8
  <lightning-icon size="x-small" icon-name={previewButtonIcon} alternative-text={buttonLabel}
9
9
  class={buttonIconClass}>
10
10
  </lightning-icon>
11
11
  </template>
12
12
  </button>
13
- <template if:true={tooltip}>
13
+ <template lwc:if={tooltip}>
14
14
  <c-quantic-tooltip>
15
15
  <div slot="content">{tooltip}</div>
16
16
  </c-quantic-tooltip>
17
17
  </template>
18
18
  </div>
19
- <template if:true={isQuickviewOpen}>
19
+ <template lwc:if={isQuickviewOpen}>
20
20
  <section onclick={closeQuickview} role="dialog" tabindex="-1" aria-labelledby="quickview-modal-heading"
21
21
  aria-modal="true" aria-describedby="quickview__content-container"
22
22
  class="slds-modal slds-modal_medium slds-fade-in-open">
@@ -46,7 +46,7 @@
46
46
  <c-quantic-quickview-content id="quickview__content-container" class="quickview__content-container slds-wrap"
47
47
  result={result} content-url={contentURL}
48
48
  onquantic__loadingstatechange={handleLoadingStateChange}></c-quantic-quickview-content>
49
- <template if:false={isLoading}>
49
+ <template lwc:if={showFooter}>
50
50
  <footer onclick={stopPropagation} class="slds-modal__footer quickview-modal__footer slds-p-top_none slds-p-bottom_none">
51
51
  <slot name="footer"></slot>
52
52
  </footer>
@@ -263,8 +263,8 @@ export default class QuanticResultQuickview extends LightningElement {
263
263
  : undefined;
264
264
  }
265
265
 
266
- get isLoading() {
267
- return this._isLoading;
266
+ get showFooter() {
267
+ return !this._isLoading;
268
268
  }
269
269
 
270
270
  get hasNoPreview() {
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <template if:true={error}>
2
+ <template lwc:if={error}>
3
3
  <div class="error-message slds-text-color_destructive">{error}</div>
4
4
  </template>
5
- <template if:true={shouldDisplayBadge}>
5
+ <template lwc:if={shouldDisplayBadge}>
6
6
  <span class="result-tag slds-badge slds-text-color_inverse">
7
7
  <lightning-icon icon-name={icon} size="xx-small" class="slds-current-color slds-m-right_xx-small"></lightning-icon>
8
8
  <span>{label}</span>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="slds-grid slds-grid_vertical-align-center">
3
- <template if:true={error}>
3
+ <template lwc:if={error}>
4
4
  <div class="error-message slds-text-color_destructive">{error}</div>
5
5
  </template>
6
- <template if:true={isValid}>
7
- <template if:true={label}>
6
+ <template lwc:if={isValid}>
7
+ <template lwc:if={label}>
8
8
  <span class="result-text__label slds-m-right_xx-small">{label}:</span>
9
9
  </template>
10
10
  <span class="result-text__value slds-truncate">{valueToDisplay}</span>
@@ -8,7 +8,7 @@ import {LightningElement, api} from 'lwc';
8
8
  * Make sure the field specified in this component is also included in the field array for the relevant template. See the this example: [Quantic usage](https://docs.coveo.com/en/quantic/latest/usage/#javascript).
9
9
  * @category Result Template
10
10
  * @example
11
- * <template if:true={result.raw.source}>
11
+ * <template lwc:if={result.raw.source}>
12
12
  * <c-quantic-result-text result={result} label="Source" field="source"></c-quantic-result-text>
13
13
  * </template>
14
14
  */
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:true={hasResults}>
7
+ <template lwc:if={hasResults}>
8
8
  <div class="slds-float_right" data-testid="results-per-page">
9
9
  <template for:each={choicesObjects} for:item="choice">
10
10
  <c-quantic-number-button
@@ -109,7 +109,7 @@ export default class QuanticResultsPerPage extends LightningElement {
109
109
  this.headless = getHeadlessBundle(this.engineId);
110
110
  this.resultsPerPage = this.headless.buildResultsPerPage(engine, {
111
111
  initialState: {
112
- numberOfResults: Number(this.initialChoice) ?? this.choices[0],
112
+ numberOfResults: Number(this.initialChoice) || this.choices[0],
113
113
  },
114
114
  });
115
115
  this.searchStatus = this.headless.buildSearchStatus(engine);
@@ -120,6 +120,10 @@ export default class QuanticSearchBoxInput extends LightningElement {
120
120
  this.input.value = value;
121
121
  }
122
122
 
123
+ get withSubmitButton() {
124
+ return !this.withoutSubmitButton;
125
+ }
126
+
123
127
  /**
124
128
  * @returns {quanticSearchBoxSuggestionsList}
125
129
  */
@@ -352,8 +356,8 @@ export default class QuanticSearchBoxInput extends LightningElement {
352
356
  }`;
353
357
  }
354
358
 
355
- get isQueryEmpty() {
356
- return !this.input?.value && !this.inputValue;
359
+ get hasQuery() {
360
+ return !!(this.input?.value || this.inputValue);
357
361
  }
358
362
 
359
363
  /**
@@ -7,7 +7,7 @@
7
7
  >
8
8
  <div class="searchbox__container">
9
9
  <div class={searchBoxContainerClass} role="none">
10
- <template if:true={withoutSubmitButton}>
10
+ <template lwc:if={withoutSubmitButton}>
11
11
  <lightning-icon
12
12
  class="slds-icon slds-input__icon slds-input__icon_left searchbox__search-icon"
13
13
  icon-name="utility:search"
@@ -35,7 +35,7 @@
35
35
  data-value={inputValue}
36
36
  />
37
37
 
38
- <template if:false={isQueryEmpty}>
38
+ <template lwc:if={hasQuery}>
39
39
  <lightning-button-icon
40
40
  onclick={clearInput}
41
41
  icon-name="utility:close"
@@ -51,7 +51,7 @@
51
51
  </template>
52
52
  </div>
53
53
 
54
- <template if:false={withoutSubmitButton}>
54
+ <template lwc:if={withSubmitButton}>
55
55
  <button
56
56
  class="searchbox__submit-button slds-button slds-button_icon-inverse slds-button_icon-brand"
57
57
  title={labels.search}
@@ -69,7 +69,7 @@
69
69
  </button>
70
70
  </template>
71
71
  </div>
72
- <template if:true={shouldDisplaySuggestions}>
72
+ <template lwc:if={shouldDisplaySuggestions}>
73
73
  <c-quantic-search-box-suggestions-list
74
74
  onquantic__selection={handleSelection}
75
75
  suggestions={suggestions}
@@ -7,7 +7,7 @@
7
7
  >
8
8
  <div class="searchbox__container">
9
9
  <div class={searchBoxContainerClass} role="none">
10
- <template if:true={withoutSubmitButton}>
10
+ <template lwc:if={withoutSubmitButton}>
11
11
  <div
12
12
  class="slds-grid slds-align_absolute-center searchbox__icon-container slds-m-left_x-small"
13
13
  >
@@ -40,7 +40,7 @@
40
40
  >
41
41
  </textarea>
42
42
 
43
- <template if:false={isQueryEmpty}>
43
+ <template lwc:if={hasQuery}>
44
44
  <div
45
45
  class="slds-grid slds-align_absolute-center searchbox__icon-container slds-m-right_x-small"
46
46
  >
@@ -60,7 +60,7 @@
60
60
  </div>
61
61
  </template>
62
62
 
63
- <template if:false={withoutSubmitButton}>
63
+ <template lwc:if={withSubmitButton}>
64
64
  <button
65
65
  class="searchbox__submit-button slds-button slds-button_neutral"
66
66
  title={labels.search}
@@ -79,7 +79,7 @@
79
79
  </template>
80
80
  </div>
81
81
  </div>
82
- <template if:true={shouldDisplaySuggestions}>
82
+ <template lwc:if={shouldDisplaySuggestions}>
83
83
  <c-quantic-search-box-suggestions-list
84
84
  onquantic__selection={handleSelection}
85
85
  suggestions={suggestions}
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:true={answerFound}>
7
+ <template lwc:if={answerFound}>
8
8
  <div class="smart-snippet slds-var-m-bottom_xx-small">
9
9
  <lightning-card title={question}>
10
10
  <div class="slds-p-horizontal_medium slds-p-top_small slds-border_top">
@@ -14,7 +14,7 @@
14
14
  actions={smartSnippetAnswerActions}></c-quantic-smart-snippet-answer>
15
15
  </div>
16
16
  </div>
17
- <template if:true={snippetHeightExceedsMaxHeight}>
17
+ <template lwc:if={snippetHeightExceedsMaxHeight}>
18
18
  <div class="slds-align_absolute-center slds-var-m-bottom_small">
19
19
  <lightning-button data-testid="smart-snippet__toggle-button" icon-name={toggleSmartSnippetAnswerIcon}
20
20
  variant="base" label={toggleSmartSnippetAnswerLabel} title={toggleSmartSnippetAnswerLabel}
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:true={shouldDisplaySmartSnippetSuggestions}>
7
+ <template lwc:if={shouldDisplaySmartSnippetSuggestions}>
8
8
  <div data-testid="smart-snippet-suggestions-card" class="slds-card">
9
9
  <p
10
10
  class="slds-text-heading_small slds-var-p-around_small slds-border_bottom smart-snippet-suggestions__title"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <template if:true={shouldDisplayCitations}>
2
+ <template lwc:if={shouldDisplayCitations}>
3
3
  <span class="source-citations__label slds-m-top_xx-small"
4
4
  >{labels.citations}</span
5
5
  >