@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
@@ -6,13 +6,13 @@
6
6
  <template lwc:else>
7
7
  <template lwc:if={isFacetEnabled}>
8
8
  <div data-test="facet-content">
9
- <template if:true={showPlaceholder}>
9
+ <template lwc:if={showPlaceholder}>
10
10
  <c-quantic-placeholder
11
11
  variant="card"
12
12
  number-of-rows={numberOfValues}
13
13
  ></c-quantic-placeholder>
14
14
  </template>
15
- <template if:true={hasValues}>
15
+ <template lwc:if={hasValues}>
16
16
  <div class="slds-size_1-of-1 slds-var-m-bottom_large">
17
17
  <c-quantic-card-container
18
18
  title={label}
@@ -30,7 +30,7 @@
30
30
  aria-hidden="true"
31
31
  >
32
32
  </lightning-button-icon>
33
- <template if:true={hasActiveValues}>
33
+ <template lwc:if={hasActiveValues}>
34
34
  <button
35
35
  data-testid="clear-selection-button"
36
36
  class="facet__clear-filter slds-button slds-grid slds-grid_vertical-align-center slds-p-horizontal_x-small slds-m-top_small"
@@ -49,9 +49,9 @@
49
49
  >
50
50
  </button>
51
51
  </template>
52
- <template if:false={isCollapsed}>
52
+ <template lwc:if={isExpanded}>
53
53
  <div data-testid="facet__body" class="slds-has-dividers_around-space slds-m-top_medium">
54
- <template if:true={displaySearch}>
54
+ <template lwc:if={displaySearch}>
55
55
  <div onchange={handleKeyUp} class="slds-size_1-of-1">
56
56
  <lightning-input
57
57
  data-testid="facet__searchbox-input"
@@ -65,7 +65,42 @@
65
65
  </div>
66
66
  </template>
67
67
 
68
- <template if:false={isFacetSearchActive}>
68
+ <template lwc:if={isFacetSearchActive}>
69
+ <template lwc:if={hasSearchResults}>
70
+ <template for:each={facetSearchResults} for:item="result">
71
+ <c-quantic-facet-value
72
+ onquantic__selectvalue={onSelectValue}
73
+ key={result.value}
74
+ item={result}
75
+ is-checked={result.checked}
76
+ display-as-link={isDisplayAsLink}
77
+ formatting-function={remoteGetValueCaption}
78
+ >
79
+ </c-quantic-facet-value>
80
+ </template>
81
+ </template>
82
+ <div class="slds-p-horizontal_x-small">
83
+ <template lwc:if={hasNoSearchResults}>
84
+ <li data-testid="facet-search__no-match" class="slds-grid slds-m-top_x-small">
85
+ <span
86
+ class="slds-truncate slds-p-around_small slds-size_1-of-1 facet__search-results_no-match"
87
+ >
88
+ {noMatchesForLabel}
89
+ </span>
90
+ </li>
91
+ </template>
92
+ <template lwc:if={canShowMoreSearchResults}>
93
+ <li data-testid="facet-search__more-match" class="slds-grid">
94
+ <span
95
+ class="slds-truncate facet__search-results_more-matches"
96
+ >{moreMatchesForLabel}</span
97
+ >
98
+ </li>
99
+ </template>
100
+ </div>
101
+ </template>
102
+
103
+ <template lwc:else>
69
104
  <fieldset>
70
105
  <legend class="slds-assistive-text">{field}</legend>
71
106
  <ul>
@@ -87,7 +122,7 @@
87
122
  <div
88
123
  class="facet__show slds-m-top_x-small slds-p-horizontal_x-small"
89
124
  >
90
- <template if:true={canShowLess}>
125
+ <template lwc:if={canShowLess}>
91
126
  <button
92
127
  variant="base"
93
128
  class="facet__show-less slds-p-around_none"
@@ -100,7 +135,7 @@
100
135
  >
101
136
  </button>
102
137
  </template>
103
- <template if:true={canShowMore}>
138
+ <template lwc:if={canShowMore}>
104
139
  <button
105
140
  variant="base"
106
141
  class="facet__show-more slds-p-around_none"
@@ -115,41 +150,6 @@
115
150
  </template>
116
151
  </div>
117
152
  </template>
118
-
119
- <template if:true={isFacetSearchActive}>
120
- <template if:true={hasSearchResults}>
121
- <template for:each={facetSearchResults} for:item="result">
122
- <c-quantic-facet-value
123
- onquantic__selectvalue={onSelectValue}
124
- key={result.value}
125
- item={result}
126
- is-checked={result.checked}
127
- display-as-link={isDisplayAsLink}
128
- formatting-function={remoteGetValueCaption}
129
- >
130
- </c-quantic-facet-value>
131
- </template>
132
- </template>
133
- <div class="slds-p-horizontal_x-small">
134
- <template if:false={hasSearchResults}>
135
- <li data-testid="facet-search__no-match" class="slds-grid slds-m-top_x-small">
136
- <span
137
- class="slds-truncate slds-p-around_small slds-size_1-of-1 facet__search-results_no-match"
138
- >
139
- {noMatchesForLabel}
140
- </span>
141
- </li>
142
- </template>
143
- <template if:true={canShowMoreSearchResults}>
144
- <li data-testid="facet-search__more-match" class="slds-grid">
145
- <span
146
- class="slds-truncate facet__search-results_more-matches"
147
- >{moreMatchesForLabel}</span
148
- >
149
- </li>
150
- </template>
151
- </div>
152
- </template>
153
153
  </div>
154
154
  </template>
155
155
  </c-quantic-card-container>
@@ -181,6 +181,10 @@ export default class QuanticFacet extends LightningElement {
181
181
  /** @type {boolean} */
182
182
  _isCollapsed = false;
183
183
 
184
+ get isExpanded() {
185
+ return !this.isCollapsed;
186
+ }
187
+
184
188
  static attributes = [
185
189
  'facetId',
186
190
  'field',
@@ -418,6 +422,10 @@ export default class QuanticFacet extends LightningElement {
418
422
  return this.getSearchValues().length > 0;
419
423
  }
420
424
 
425
+ get hasNoSearchResults() {
426
+ return !this.hasSearchResults;
427
+ }
428
+
421
429
  get facetSearchResults() {
422
430
  return this.getSearchValues().map((result) => ({
423
431
  value: result.rawValue,
@@ -10,7 +10,7 @@
10
10
  aria-label={ariaLabelValue}
11
11
  data-testid="facet__value"
12
12
  >
13
- <template if:false={displayAsLink}>
13
+ <template lwc:if={displayAsCheckbox}>
14
14
  <lightning-input
15
15
  tabindex="-1"
16
16
  type="checkbox"
@@ -22,7 +22,7 @@
22
22
  checked={isChecked}
23
23
  ></lightning-input>
24
24
  </template>
25
- <template if:true={isChecked}>
25
+ <template lwc:if={isChecked}>
26
26
  <span
27
27
  class="slds-truncate slds-var-m-right_xx-small slds-var-m-top_xxx-small facet__value-text facet__value_selected"
28
28
  title={formattedFacetValue}
@@ -34,8 +34,8 @@
34
34
  ({numberOfResults})
35
35
  </span>
36
36
  </template>
37
- <template if:false={isChecked}>
38
- <template if:true={isStandardFacet}>
37
+ <template lwc:else>
38
+ <template lwc:if={isStandardFacet}>
39
39
  <span
40
40
  class="slds-truncate slds-var-m-right_xx-small slds-var-m-top_xxx-small facet__value-text facet__value_idle"
41
41
  title={formattedFacetValue}
@@ -43,7 +43,7 @@
43
43
  <lightning-formatted-rich-text value={item.highlightedResult} disable-linkify></lightning-formatted-rich-text>
44
44
  </span>
45
45
  </template>
46
- <template if:false={isStandardFacet}>
46
+ <template lwc:else>
47
47
  <span
48
48
  class="slds-truncate slds-var-m-right_xx-small slds-var-m-top_xxx-small facet__value-text facet__value_idle"
49
49
  title={formattedFacetValue}
@@ -76,6 +76,10 @@ export default class QuanticFacetValue extends LightningElement {
76
76
  inclusionFilter_zero,
77
77
  };
78
78
 
79
+ get displayAsCheckbox() {
80
+ return !this.displayAsLink;
81
+ }
82
+
79
83
  get isStandardFacet() {
80
84
  return !this.isRangeFacet;
81
85
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <template if:true={isValidated}>
2
+ <template lwc:if={isValidated}>
3
3
  <lightning-modal-header label={label}></lightning-modal-header>
4
4
  <lightning-modal-body>
5
5
  <div class="slds-var-p-around_x-large">
@@ -7,7 +7,7 @@
7
7
  options={options} value={feedbackValue} type="radio" onchange={handleFeedbackChange}
8
8
  message-when-value-missing={labels.selectOneOfOptions}></lightning-radio-group>
9
9
  <div class="details-input__container">
10
- <template if:true={shouldDisplayDetailsInput}>
10
+ <template lwc:if={shouldDisplayDetailsInput}>
11
11
  <lightning-textarea required={detailsAreRequired} value={detailsValue} label={labels.provideDetails}
12
12
  message-when-value-missing={labels.fillOutField} onchange={handleDetailsChange}></lightning-textarea>
13
13
  </template>
@@ -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}
@@ -8,6 +8,7 @@ import showMore from '@salesforce/label/c.quantic_GeneratedAnswerShowMore';
8
8
  import generatingAnswer from '@salesforce/label/c.quantic_GeneratingAnswer';
9
9
  import loading from '@salesforce/label/c.quantic_Loading';
10
10
  import rgaDisclaimer from '@salesforce/label/c.quantic_RGADisclaimer';
11
+ import rgaDisclaimerAnnouncement from '@salesforce/label/c.quantic_RGADisclaimerAnnouncement';
11
12
  import tryAgain from '@salesforce/label/c.quantic_TryAgain';
12
13
  import noGeneratedAnswer from '@salesforce/label/c.quantic_NoGeneratedAnswer';
13
14
  import FeedbackModalQna from 'c/quanticFeedbackModalQna';
@@ -135,6 +136,7 @@ export default class QuanticGeneratedAnswer extends LightningElement {
135
136
  generatedAnswerIsHidden,
136
137
  answerGenerated,
137
138
  rgaDisclaimer,
139
+ rgaDisclaimerAnnouncement,
138
140
  showMore,
139
141
  showLess,
140
142
  loading,
@@ -275,7 +277,7 @@ export default class QuanticGeneratedAnswer extends LightningElement {
275
277
 
276
278
  const hasAnswer = !!this.state.answer;
277
279
  return hasAnswer
278
- ? I18nUtils.format(this.labels.answerGenerated, this.answer)
280
+ ? `${I18nUtils.format(this.labels.answerGenerated, this.answer)} ${this.labels.rgaDisclaimerAnnouncement}`
279
281
  : '';
280
282
  }
281
283
 
@@ -522,10 +524,6 @@ export default class QuanticGeneratedAnswer extends LightningElement {
522
524
  return [...new Set(combinedCitationFields)];
523
525
  }
524
526
 
525
- get shouldShowDisclaimer() {
526
- return this.isVisible && !this.isStreaming;
527
- }
528
-
529
527
  get toggleCollapseAnswerIcon() {
530
528
  return this.isAnswerCollapsed ? 'utility:chevrondown' : 'utility:chevronup';
531
529
  }
@@ -52,9 +52,9 @@
52
52
  data-testid="generated-answer__footer"
53
53
  class="generated-answer__disclaimer slds-grid slds-grid_vertical-align-center slds-grid_align-end slds-text-color_weak slds-text-body_small slds-var-m-top_xx-small"
54
54
  >
55
- <div data-testid="generated-answer__disclaimer">
55
+ <small data-testid="generated-answer__disclaimer" class="slds-text-body_small">
56
56
  <slot name="disclaimer">{labels.rgaDisclaimer}</slot>
57
- </div>
57
+ </small>
58
58
  </footer>
59
59
  </div>
60
60
  </template>
@@ -72,16 +72,14 @@
72
72
  </template>
73
73
  </div>
74
74
  </section>
75
- <template lwc:if={shouldShowDisclaimer}>
76
- <footer
77
- data-testid="generated-answer__footer"
78
- class="generated-answer__disclaimer slds-grid slds-grid_vertical-align-center slds-grid_align-end slds-text-color_weak slds-text-body_small slds-p-horizontal_large slds-p-bottom_medium"
79
- >
80
- <div data-testid="generated-answer__disclaimer">
81
- <slot name="disclaimer"> {labels.rgaDisclaimer} </slot>
82
- </div>
83
- </footer>
84
- </template>
75
+ <footer
76
+ data-testid="generated-answer__footer"
77
+ class="generated-answer__disclaimer slds-grid slds-grid_vertical-align-center slds-grid_align-end slds-text-color_weak slds-text-body_small slds-p-horizontal_large slds-p-bottom_medium"
78
+ >
79
+ <small data-testid="generated-answer__disclaimer" class="slds-text-body_small">
80
+ <slot name="disclaimer"> {labels.rgaDisclaimer} </slot>
81
+ </small>
82
+ </footer>
85
83
  </template>
86
84
  </div>
87
85
  </template>
@@ -4,15 +4,15 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:false={hasError}>
8
- <template if:false={showQuerySummary}>
9
- <div data-testid="initial-summary-message" class="slds-text-title_bold initial-summary-message slds-var-p-vertical_small slds-var-p-horizontal_medium">{labels.insightRelatedToThisCase}</div>
10
- </template>
11
- <template if:true={showQuerySummary}>
7
+ <template lwc:if={hasNoError}>
8
+ <template lwc:if={showQuerySummary}>
12
9
  <div class="slds-var-p-vertical_small slds-var-p-horizontal_medium">
13
10
  <c-quantic-summary engine-id={engineId}></c-quantic-summary>
14
11
  </div>
15
12
  </template>
13
+ <template lwc:else>
14
+ <div data-testid="initial-summary-message" class="slds-text-title_bold initial-summary-message slds-var-p-vertical_small slds-var-p-horizontal_medium">{labels.insightRelatedToThisCase}</div>
15
+ </template>
16
16
  </template>
17
17
  </template>
18
18
  </template>
@@ -70,6 +70,10 @@ export default class QuanticInsightPanelSummary extends LightningElement {
70
70
  this.unsubscribeQuerySummary?.();
71
71
  }
72
72
 
73
+ get hasNoError() {
74
+ return !this.hasError;
75
+ }
76
+
73
77
  /**
74
78
  * Updates summary visibility.
75
79
  * @returns {void}
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <template if:true={renderingError}>
2
+ <template lwc:if={renderingError}>
3
3
  <div class="error-message slds-text-color_destructive">
4
4
  {renderingError}
5
5
  </div>
6
6
  </template>
7
- <template if:false={renderingError}>
7
+ <template lwc:else>
8
8
  <div role="dialog" aria-labelledby="modal-heading" aria-modal="true" aria-describedby="modal-content"
9
9
  class={modalCssClass}>
10
10
  <div tabindex="0" onfocus={focusOnLastElement}></div>
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:true={showNoResultsPanel}>
7
+ <template lwc:if={showNoResultsPanel}>
8
8
  <div class="slds-grid slds-grid_vertical">
9
9
  <div
10
10
  class="slds-col slds-size_12-of-12 slds-var-m-vertical_x-large slds-illustration slds-illustration_small"
@@ -21,19 +21,19 @@
21
21
  ></lightning-formatted-rich-text>
22
22
  </div>
23
23
  <p class="slds-text-body_small slds-text-align_center">
24
- <template if:true={hasBreadcrumbs}>
24
+ <template lwc:if={hasBreadcrumbs}>
25
25
  <lightning-formatted-rich-text
26
26
  value={labels.noResultsWithFilters}
27
27
  ></lightning-formatted-rich-text>
28
28
  </template>
29
- <template if:false={hasBreadcrumbs}>
29
+ <template lwc:else>
30
30
  <lightning-formatted-rich-text
31
31
  value={labels.noResultsWithoutFilters}
32
32
  ></lightning-formatted-rich-text>
33
33
  </template>
34
34
  </p>
35
35
  </div>
36
- <template if:true={showUndoButton}>
36
+ <template lwc:if={showUndoButton}>
37
37
  <div class="slds-m-vertical_x-large slds-align_absolute-center">
38
38
  <lightning-button
39
39
  variant="brand"
@@ -6,13 +6,13 @@
6
6
  <template lwc:else>
7
7
  <template lwc:if={isFacetEnabled}>
8
8
  <div data-testid="facet-content">
9
- <template if:true={showPlaceholder}>
9
+ <template lwc:if={showPlaceholder}>
10
10
  <c-quantic-placeholder
11
11
  variant="card"
12
12
  number-of-rows={numberOfValues}
13
13
  ></c-quantic-placeholder>
14
14
  </template>
15
- <template if:true={shouldRenderFacet}>
15
+ <template lwc:if={shouldRenderFacet}>
16
16
  <div
17
17
  class="slds-size_1-of-1 slds-var-m-bottom_large"
18
18
  >
@@ -32,7 +32,7 @@
32
32
  aria-hidden="true"
33
33
  >
34
34
  </lightning-button-icon>
35
- <template if:true={hasActiveValues}>
35
+ <template lwc:if={hasActiveValues}>
36
36
  <button
37
37
  data-testid="clear-selection-button"
38
38
  class="facet__clear-filter slds-button slds-grid slds-grid_vertical-align-center slds-var-p-horizontal_x-small slds-m-top_small"
@@ -51,12 +51,12 @@
51
51
  >
52
52
  </button>
53
53
  </template>
54
- <template if:false={isCollapsed}>
54
+ <template lwc:if={isExpanded}>
55
55
  <div
56
56
  data-testid="facet__body"
57
57
  class="slds-has-dividers_around-space slds-var-m-top_medium"
58
58
  >
59
- <template if:true={withInput}>
59
+ <template lwc:if={withInput}>
60
60
  <div class="slds-p-horizontal_x-small">
61
61
  <form
62
62
  data-testid="facet__search-form"
@@ -109,7 +109,7 @@
109
109
  </form>
110
110
  </div>
111
111
  </template>
112
- <template if:true={showValues}>
112
+ <template lwc:if={showValues}>
113
113
  <fieldset>
114
114
  <legend class="slds-assistive-text">{field}</legend>
115
115
  <ul>
@@ -164,6 +164,10 @@ export default class QuanticNumericFacet extends LightningElement {
164
164
  /** @type {boolean} */
165
165
  _isCollapsed = false;
166
166
 
167
+ get isExpanded() {
168
+ return !this.isCollapsed;
169
+ }
170
+
167
171
  static attributes = [
168
172
  'facetId',
169
173
  'field',
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <template if:true={shouldDisplay}>
2
+ <template lwc:if={shouldDisplay}>
3
3
  <div class="slds-p-horizontal_x-small">
4
- <template if:true={isCardVariant}>
4
+ <template lwc:if={isCardVariant}>
5
5
  <div class="placeholder__card-container slds-p-vertical_medium slds-grid_vertical">
6
6
  <div class="slds-col slds-m-bottom_large">
7
7
  <div class="grey placeholder__card-header placeholder__rounded placeholder__animation"></div>
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
  </div>
16
16
  </template>
17
- <template if:true={isResultListVariant}>
17
+ <template lwc:if={isResultListVariant}>
18
18
  <template for:each={rows} for:item="row">
19
19
  <div key={row.index} class="placeholder__result-container slds-grid slds-gutters slds-grid_vertical-align-start">
20
20
  <div class="slds-col slds-m-bottom_large slds-p-horizontal_none">
@@ -4,7 +4,7 @@
4
4
  </c-quantic-component-error>
5
5
  </template>
6
6
  <template lwc:else>
7
- <template if:true={hasError}>
7
+ <template lwc:if={hasError}>
8
8
  <div
9
9
  class="slds-grid slds-grid_align-center slds-gutters slds-grid_vertical"
10
10
  >
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  <p class="slds-text-align_center">{description}</p>
18
18
  </div>
19
- <template if:true={link}>
19
+ <template lwc:if={link}>
20
20
  <a
21
21
  class="slds-var-m-vertical_x-small slds-align_absolute-center"
22
22
  href={link}
@@ -27,8 +27,8 @@
27
27
  ></lightning-formatted-rich-text>
28
28
  </a>
29
29
  </template>
30
- <template if:false={link}>
31
- <template if:false={showMoreInfo}>
30
+ <template lwc:else>
31
+ <template lwc:if={showMoreInfoButton}>
32
32
  <div class="slds-var-m-vertical_x-large slds-align_absolute-center">
33
33
  <lightning-button
34
34
  variant="brand"
@@ -39,7 +39,7 @@
39
39
  </div>
40
40
  </template>
41
41
  </template>
42
- <template if:true={showMoreInfo}>
42
+ <template lwc:if={showMoreInfo}>
43
43
  <div class="slds-var-m-top_medium">
44
44
  <div
45
45
  class="slds-rich-text-editor slds-grid slds-grid_vertical slds-nowrap"
@@ -92,7 +92,7 @@
92
92
  ></lightning-button>
93
93
  </div>
94
94
  </template>
95
- <template if:false={showMoreInfo}>
95
+ <template lwc:else>
96
96
  <div
97
97
  class="slds-var-m-vertical_xx-large slds-illustration slds-illustration_small"
98
98
  >
@@ -102,6 +102,10 @@ export default class QuanticQueryError extends LightningElement {
102
102
  this.errorAriaMessage.dispatchMessage(this.errorTitle);
103
103
  }
104
104
 
105
+ get showMoreInfoButton() {
106
+ return !this.showMoreInfo;
107
+ }
108
+
105
109
  get errorTitle() {
106
110
  return errorMap[this.type]?.title || genericError.title;
107
111
  }
@@ -5,7 +5,7 @@
5
5
  class="quickview__spinner-container slds-is-relative wrapper"
6
6
  >
7
7
  <lightning-spinner
8
- if:true={isLoading}
8
+ lwc:if={isLoading}
9
9
  alternative-text="Loading"
10
10
  size="large"
11
11
  ></lightning-spinner>
@@ -5,7 +5,7 @@
5
5
  class="quickview__spinner-container slds-is-relative wrapper"
6
6
  >
7
7
  <lightning-spinner
8
- if:true={isLoading}
8
+ lwc:if={isLoading}
9
9
  alternative-text="Loading"
10
10
  size="large"
11
11
  ></lightning-spinner>
@@ -4,18 +4,18 @@
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 variant="card" number-of-rows={maxLength}></c-quantic-placeholder>
9
9
  </template>
10
- <template if:false={showPlaceholder}>
10
+ <template lwc:else>
11
11
  <template lwc:if={shouldDisplayRecentQueriesCard}>
12
12
  <c-quantic-card-container title={label} onquantic__headerclick={toggleVisibility} onquantic__headerkeydown={toggleVisibility}>
13
13
  <lightning-button-icon class="slds-p-bottom_small" slot="actions" icon-name={actionButtonIcon}
14
14
  alternative-text={actionButtonLabel} variant="bare" tabindex="-1" aria-hidden="true" data-testid="action-button">
15
15
  </lightning-button-icon>
16
- <template if:false={isCollapsed}>
16
+ <template lwc:if={isExpanded}>
17
17
  <div class="slds-m-top_medium">
18
- <template if:false={hasQueries}>
18
+ <template lwc:if={hasNoQueries}>
19
19
  <div
20
20
  class="slds-text-body_small empty-list-message slds-var-m-vertical_small slds-p-horizontal_x-small">
21
21
  {labels.emptyListLabel}
@@ -71,6 +71,10 @@ export default class QuanticRecentQueriesList extends LightningElement {
71
71
  /** @type {boolean} */
72
72
  _isCollapsed = false;
73
73
 
74
+ get isExpanded() {
75
+ return !this.isCollapsed;
76
+ }
77
+
74
78
  /** @type {RecentQueriesState} */
75
79
  @track state;
76
80
 
@@ -140,6 +144,10 @@ export default class QuanticRecentQueriesList extends LightningElement {
140
144
  return !!this.queries.length;
141
145
  }
142
146
 
147
+ get hasNoQueries() {
148
+ return !this.hasQueries;
149
+ }
150
+
143
151
  get localStorageKey() {
144
152
  return `${this.engineId}_quantic-recent-queries`;
145
153
  }
@@ -4,18 +4,18 @@
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 variant="card" number-of-rows={maxLength}></c-quantic-placeholder>
9
9
  </template>
10
- <template if:false={showPlaceholder}>
10
+ <template lwc:else>
11
11
  <template lwc:if={shouldDisplayRecentResultsCard}>
12
12
  <c-quantic-card-container title={label} onquantic__headerclick={toggleVisibility} onquantic__headerkeydown={toggleVisibility}>
13
13
  <lightning-button-icon class="slds-p-bottom_small" slot="actions" icon-name={actionButtonIcon}
14
14
  alternative-text={actionButtonLabel} variant="bare" tabindex="-1" aria-hidden="true" data-testid="action-button">
15
15
  </lightning-button-icon>
16
- <template if:false={isCollapsed}>
16
+ <template lwc:if={isExpanded}>
17
17
  <div class="slds-m-top_medium">
18
- <template if:false={hasResults}>
18
+ <template lwc:if={hasNoResults}>
19
19
  <div class="slds-text-body_small empty-list-message slds-var-m-top_small slds-p-horizontal_x-small">
20
20
  {labels.emptyListLabel}</div>
21
21
  </template>
@@ -83,6 +83,10 @@ export default class QuanticRecentResultsList extends LightningElement {
83
83
  /** @type {boolean} */
84
84
  _isCollapsed = false;
85
85
 
86
+ get isExpanded() {
87
+ return !this.isCollapsed;
88
+ }
89
+
86
90
  /** @type {RecentResultsState} */
87
91
  @track state;
88
92
 
@@ -145,6 +149,10 @@ export default class QuanticRecentResultsList extends LightningElement {
145
149
  return !!this.results.length;
146
150
  }
147
151
 
152
+ get hasNoResults() {
153
+ return !this.hasResults;
154
+ }
155
+
148
156
  get localStorageKey() {
149
157
  return `${this.engineId}_quantic-recent-results`;
150
158
  }