@coveo/atomic 3.61.1 → 3.61.3

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 (137) hide show
  1. package/custom-elements.json +1226 -1103
  2. package/dist/cjs/components/common/atomic-result-placeholder/atomic-result-placeholder.cjs +23 -8
  3. package/dist/cjs/components/common/facets/facet-common.tw.css.cjs +4 -0
  4. package/dist/cjs/components/common/facets/facet-visibility-controller.cjs +50 -0
  5. package/dist/cjs/components/common/facets/timeframe-facet-common.cjs +15 -8
  6. package/dist/cjs/components/common/layout/item-layout-controller.cjs +7 -2
  7. package/dist/cjs/components/insight/atomic-insight-facet/atomic-insight-facet.cjs +2 -0
  8. package/dist/cjs/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.cjs +12 -8
  9. package/dist/cjs/components/insight/atomic-insight-result/atomic-insight-result.cjs +75 -4
  10. package/dist/cjs/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.cjs +6 -0
  11. package/dist/cjs/components/recommendations/atomic-recs-result/atomic-recs-result.cjs +1 -1
  12. package/dist/cjs/components/search/atomic-category-facet/atomic-category-facet.cjs +12 -8
  13. package/dist/cjs/components/search/atomic-color-facet/atomic-color-facet.cjs +2 -0
  14. package/dist/cjs/components/search/atomic-facet/atomic-facet.cjs +2 -0
  15. package/dist/cjs/components/search/atomic-numeric-facet/atomic-numeric-facet.cjs +12 -8
  16. package/dist/cjs/components/search/atomic-rating-facet/atomic-rating-facet.cjs +12 -8
  17. package/dist/cjs/components/search/atomic-rating-range-facet/atomic-rating-range-facet.cjs +12 -8
  18. package/dist/cjs/components/search/atomic-refine-modal/atomic-refine-modal.cjs +4 -2
  19. package/dist/cjs/components/search/atomic-timeframe-facet/atomic-timeframe-facet.cjs +6 -0
  20. package/dist/cjs/global/environment.cjs +1 -1
  21. package/dist/cjs/utils/coveo.tw.css.cjs +1 -1
  22. package/dist/cjs/utils/tailwind.global.tw.css.cjs +1 -1
  23. package/dist/cjs/versions.cjs +1 -1
  24. package/dist/esm/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +1 -1
  25. package/dist/esm/components/commerce/atomic-commerce-layout/atomic-commerce-layout.tw.css.js +2 -2
  26. package/dist/esm/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.js +1 -1
  27. package/dist/esm/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.js +1 -1
  28. package/dist/esm/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +1 -1
  29. package/dist/esm/components/commerce/atomic-product/atomic-product.tw.css.js +1 -1
  30. package/dist/esm/components/commerce/atomic-product-section-actions/atomic-product-section-actions.js +1 -1
  31. package/dist/esm/components/commerce/atomic-product-section-badges/atomic-product-section-badges.js +1 -1
  32. package/dist/esm/components/commerce/atomic-product-section-bottom-metadata/atomic-product-section-bottom-metadata.js +1 -1
  33. package/dist/esm/components/commerce/atomic-product-section-children/atomic-product-section-children.js +1 -1
  34. package/dist/esm/components/commerce/atomic-product-section-description/atomic-product-section-description.js +1 -1
  35. package/dist/esm/components/commerce/atomic-product-section-emphasized/atomic-product-section-emphasized.js +1 -1
  36. package/dist/esm/components/commerce/atomic-product-section-metadata/atomic-product-section-metadata.js +1 -1
  37. package/dist/esm/components/commerce/atomic-product-section-name/atomic-product-section-name.js +1 -1
  38. package/dist/esm/components/commerce/atomic-product-section-visual/atomic-product-section-visual.js +1 -1
  39. package/dist/esm/components/common/atomic-agent-stream-of-thought/atomic-agent-stream-of-thought.tw.css.js +1 -1
  40. package/dist/esm/components/common/atomic-ask-follow-up-input/atomic-ask-follow-up-input.tw.css.js +1 -1
  41. package/dist/esm/components/common/atomic-citation/atomic-citation.tw.css.js +1 -1
  42. package/dist/esm/components/common/atomic-generated-answer-feedback-modal/atomic-generated-answer-feedback-modal.js +1 -1
  43. package/dist/esm/components/common/atomic-generated-answer-inline-link/atomic-generated-answer-inline-link.tw.css.js +1 -1
  44. package/dist/esm/components/common/atomic-icon/atomic-icon.js +1 -1
  45. package/dist/esm/components/common/atomic-result-placeholder/atomic-result-placeholder.js +13 -8
  46. package/dist/esm/components/common/atomic-smart-snippet-answer/atomic-smart-snippet-answer.tw.css.js +1 -1
  47. package/dist/esm/components/common/atomic-smart-snippet-collapse-wrapper/atomic-smart-snippet-collapse-wrapper.js +3 -2
  48. package/dist/esm/components/common/atomic-smart-snippet-expandable-answer/atomic-smart-snippet-expandable-answer.tw.css.js +1 -1
  49. package/dist/esm/components/common/atomic-tab-bar/atomic-tab-bar.js +1 -1
  50. package/dist/esm/components/common/facets/facet-common.tw.css.js +1 -1
  51. package/dist/esm/components/common/facets/facet-search/facet-search.tw.css.js +1 -1
  52. package/dist/esm/components/common/facets/facet-value-box/facet-value-box.tw.css.js +1 -1
  53. package/dist/esm/components/common/facets/facet-value-checkbox/facet-value-checkbox.tw.css.js +1 -1
  54. package/dist/esm/components/common/facets/facet-visibility-controller.js +12 -0
  55. package/dist/esm/components/common/facets/timeframe-facet-common.js +15 -8
  56. package/dist/esm/components/common/generated-answer/generated-content/generated-markdown-content.tw.css.js +1 -1
  57. package/dist/esm/components/common/generated-answer/styles/feedback-buttons.tw.css.js +1 -1
  58. package/dist/esm/components/common/generated-answer/styles/generated-answer.tw.css.js +1 -1
  59. package/dist/esm/components/common/generated-answer/styles/generated-text.tw.css.js +1 -1
  60. package/dist/esm/components/common/item-list/styles/grid-display.tw.css.js +1 -1
  61. package/dist/esm/components/common/item-list/styles/list-display.tw.css.js +1 -1
  62. package/dist/esm/components/common/item-list/styles/table-display.tw.css.js +1 -1
  63. package/dist/esm/components/common/layout/item-layout-controller.js +7 -2
  64. package/dist/esm/components/insight/atomic-insight-facet/atomic-insight-facet.js +2 -0
  65. package/dist/esm/components/insight/atomic-insight-full-search-button/atomic-insight-full-search-button.js +1 -1
  66. package/dist/esm/components/insight/atomic-insight-interface/atomic-insight-interface.js +1 -1
  67. package/dist/esm/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.js +12 -8
  68. package/dist/esm/components/insight/atomic-insight-pager/atomic-insight-pager.js +1 -1
  69. package/dist/esm/components/insight/atomic-insight-result/atomic-insight-result.js +1 -1
  70. package/dist/esm/components/insight/atomic-insight-result-action/atomic-insight-result-action.js +1 -1
  71. package/dist/esm/components/insight/atomic-insight-result-action-bar/atomic-insight-result-action-bar.js +1 -1
  72. package/dist/esm/components/insight/atomic-insight-result-children/atomic-insight-result-children.js +1 -1
  73. package/dist/esm/components/insight/atomic-insight-result-list/insight-list-display.tw.css.js +1 -1
  74. package/dist/esm/components/insight/atomic-insight-search-box/atomic-insight-search-box.tw.css.js +1 -1
  75. package/dist/esm/components/insight/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tw.css.js +1 -1
  76. package/dist/esm/components/insight/atomic-insight-smart-snippet-feedback-modal/atomic-insight-smart-snippet-feedback-modal.tw.css.js +1 -1
  77. package/dist/esm/components/insight/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tw.css.js +1 -1
  78. package/dist/esm/components/insight/atomic-insight-tab/atomic-insight-tab.js +1 -1
  79. package/dist/esm/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.js +6 -0
  80. package/dist/esm/components/ipx/atomic-ipx-button/atomic-ipx-button.js +1 -1
  81. package/dist/esm/components/ipx/atomic-ipx-embedded/atomic-ipx-embedded.js +1 -1
  82. package/dist/esm/components/ipx/atomic-ipx-modal/atomic-ipx-modal.js +1 -1
  83. package/dist/esm/components/ipx/atomic-ipx-recs-list/atomic-ipx-recs-list.js +1 -1
  84. package/dist/esm/components/ipx/atomic-ipx-refine-toggle/atomic-ipx-refine-toggle.js +1 -1
  85. package/dist/esm/components/ipx/atomic-ipx-tab/atomic-ipx-tab.js +1 -1
  86. package/dist/esm/components/recommendations/atomic-recs-list/atomic-recs-list.js +1 -1
  87. package/dist/esm/components/recommendations/atomic-recs-result/atomic-recs-result.js +1 -1
  88. package/dist/esm/components/search/atomic-category-facet/atomic-category-facet.js +13 -9
  89. package/dist/esm/components/search/atomic-color-facet/atomic-color-facet.js +3 -1
  90. package/dist/esm/components/search/atomic-facet/atomic-facet.js +2 -0
  91. package/dist/esm/components/search/atomic-numeric-facet/atomic-numeric-facet.js +12 -8
  92. package/dist/esm/components/search/atomic-quickview-modal/atomic-quickview-modal.js +1 -1
  93. package/dist/esm/components/search/atomic-rating-facet/atomic-rating-facet.js +12 -8
  94. package/dist/esm/components/search/atomic-rating-range-facet/atomic-rating-range-facet.js +12 -8
  95. package/dist/esm/components/search/atomic-refine-modal/atomic-refine-modal.js +4 -2
  96. package/dist/esm/components/search/atomic-result/atomic-result.js +1 -1
  97. package/dist/esm/components/search/atomic-result-badge/atomic-result-badge.js +1 -1
  98. package/dist/esm/components/search/atomic-result-fields-list/atomic-result-fields-list.js +1 -1
  99. package/dist/esm/components/search/atomic-result-icon/atomic-result-icon.js +1 -1
  100. package/dist/esm/components/search/atomic-result-image/atomic-result-image.js +1 -1
  101. package/dist/esm/components/search/atomic-result-printable-uri/atomic-result-printable-uri.tw.css.js +1 -1
  102. package/dist/esm/components/search/atomic-result-section-actions/atomic-result-section-actions.js +1 -1
  103. package/dist/esm/components/search/atomic-result-section-badges/atomic-result-section-badges.js +1 -1
  104. package/dist/esm/components/search/atomic-result-section-bottom-metadata/atomic-result-section-bottom-metadata.js +1 -1
  105. package/dist/esm/components/search/atomic-result-section-children/atomic-result-section-children.js +1 -1
  106. package/dist/esm/components/search/atomic-result-section-emphasized/atomic-result-section-emphasized.js +1 -1
  107. package/dist/esm/components/search/atomic-result-section-excerpt/atomic-result-section-excerpt.js +1 -1
  108. package/dist/esm/components/search/atomic-result-section-title/atomic-result-section-title.js +1 -1
  109. package/dist/esm/components/search/atomic-result-section-title-metadata/atomic-result-section-title-metadata.js +1 -1
  110. package/dist/esm/components/search/atomic-result-section-visual/atomic-result-section-visual.js +1 -1
  111. package/dist/esm/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.js +1 -1
  112. package/dist/esm/components/search/atomic-search-box/atomic-search-box.js +1 -1
  113. package/dist/esm/components/search/atomic-search-layout/atomic-search-layout.tw.css.js +2 -2
  114. package/dist/esm/components/search/atomic-smart-snippet/atomic-smart-snippet.tw.css.js +1 -1
  115. package/dist/esm/components/search/atomic-smart-snippet-feedback-modal/atomic-smart-snippet-feedback-modal.tw.css.js +1 -1
  116. package/dist/esm/components/search/atomic-smart-snippet-suggestions/atomic-smart-snippet-suggestions.tw.css.js +1 -1
  117. package/dist/esm/components/search/atomic-tab-manager/atomic-tab-manager.tw.css.js +1 -1
  118. package/dist/esm/components/search/atomic-timeframe-facet/atomic-timeframe-facet.js +6 -0
  119. package/dist/esm/components/search/facets/facet-segmented-value/facet-segmented-value.tw.css.js +1 -1
  120. package/dist/esm/global/environment.js +1 -1
  121. package/dist/esm/utils/coveo.tw.css.js +1 -1
  122. package/dist/esm/utils/tailwind.global.tw.css.js +1 -1
  123. package/dist/esm/versions.js +1 -1
  124. package/dist/types/components/common/facets/facet-visibility-controller.d.ts +7 -0
  125. package/dist/types/components/common/facets/timeframe-facet-common.d.ts +2 -0
  126. package/dist/types/components/common/layout/item-layout-controller.d.ts +6 -3
  127. package/dist/types/components/insight/atomic-insight-facet/atomic-insight-facet.d.ts +2 -0
  128. package/dist/types/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.d.ts +3 -0
  129. package/dist/types/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.d.ts +3 -0
  130. package/dist/types/components/search/atomic-category-facet/atomic-category-facet.d.ts +3 -0
  131. package/dist/types/components/search/atomic-color-facet/atomic-color-facet.d.ts +2 -0
  132. package/dist/types/components/search/atomic-facet/atomic-facet.d.ts +2 -0
  133. package/dist/types/components/search/atomic-numeric-facet/atomic-numeric-facet.d.ts +3 -0
  134. package/dist/types/components/search/atomic-rating-facet/atomic-rating-facet.d.ts +3 -0
  135. package/dist/types/components/search/atomic-rating-range-facet/atomic-rating-range-facet.d.ts +3 -0
  136. package/dist/types/components/search/atomic-timeframe-facet/atomic-timeframe-facet.d.ts +3 -0
  137. package/package.json +18 -18
@@ -59,32 +59,37 @@ class AtomicResultPlaceholder extends external_lit_namespaceObject.LitElement {
59
59
  `;
60
60
  }
61
61
  render() {
62
+ const displayClasses = (0, item_layout_utils_cjs_namespaceObject.getItemDisplayClasses)(this.display, this.density, this.imageSize);
62
63
  const classes = [
63
64
  'result-root',
64
65
  'placeholder',
65
66
  'with-sections',
66
67
  'animate-pulse',
67
- ...(0, item_layout_utils_cjs_namespaceObject.getItemDisplayClasses)(this.display, this.density, this.imageSize)
68
+ ...displayClasses
69
+ ].join(' ').trim();
70
+ const sectionClasses = [
71
+ 'with-sections',
72
+ ...displayClasses
68
73
  ].join(' ').trim();
69
74
  return (0, external_lit_namespaceObject.html)`
70
75
  <div class=${classes}>
71
- <atomic-result-section-visual>
76
+ <atomic-result-section-visual class=${sectionClasses}>
72
77
  <div class=${placeholderClasses}></div>
73
78
  </atomic-result-section-visual>
74
- <atomic-result-section-badges>
79
+ <atomic-result-section-badges class=${sectionClasses}>
75
80
  <div class="badge ${placeholderClasses}"></div>
76
81
  </atomic-result-section-badges>
77
- <atomic-result-section-actions>
82
+ <atomic-result-section-actions class=${sectionClasses}>
78
83
  <div class="action ${placeholderClasses}"></div>
79
84
  </atomic-result-section-actions>
80
- <atomic-result-section-title>
85
+ <atomic-result-section-title class=${sectionClasses}>
81
86
  <div class="title ${placeholderClasses}"></div>
82
87
  </atomic-result-section-title>
83
- <atomic-result-section-excerpt>
88
+ <atomic-result-section-excerpt class=${sectionClasses}>
84
89
  ${this.renderExcerptLine('100%')} ${this.renderExcerptLine('95%')}
85
90
  ${this.renderExcerptLine('98%')}
86
91
  </atomic-result-section-excerpt>
87
- <atomic-result-section-bottom-metadata>
92
+ <atomic-result-section-bottom-metadata class=${sectionClasses}>
88
93
  <div class="fields-placeholder">
89
94
  ${Array.from({
90
95
  length: 4
@@ -96,7 +101,7 @@ class AtomicResultPlaceholder extends external_lit_namespaceObject.LitElement {
96
101
  }
97
102
  }
98
103
  AtomicResultPlaceholder.styles = (0, external_lit_namespaceObject.css)`
99
- @reference '../../common/template-system/legacy-template-system.css';
104
+ @reference '../../common/template-system/template-system.css';
100
105
 
101
106
  :host {
102
107
  @apply atomic-template-system;
@@ -108,6 +113,16 @@ AtomicResultPlaceholder.styles = (0, external_lit_namespaceObject.css)`
108
113
  }
109
114
  }
110
115
 
116
+ > atomic-result-section-excerpt {
117
+ @apply set-font-size-base;
118
+
119
+ @media (width >= theme(--breakpoint-desktop)) {
120
+ &.density-comfortable {
121
+ @apply set-font-size-lg;
122
+ }
123
+ }
124
+ }
125
+
111
126
  .badge {
112
127
  width: 14rem;
113
128
  }
@@ -42,6 +42,10 @@ const styles = (0, external_lit_namespaceObject.css)`
42
42
  }
43
43
  }
44
44
 
45
+ :host(:state(hidden)) {
46
+ display: none;
47
+ }
48
+
45
49
  :host(.popover-nested) {
46
50
  @apply min-w-2xs;
47
51
 
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ class FacetVisibilityController {
31
+ hostUpdate() {
32
+ if (this.isHidden()) this.internals.states.add('hidden');
33
+ else this.internals.states.delete('hidden');
34
+ }
35
+ constructor(host, isHidden){
36
+ this.isHidden = isHidden;
37
+ this.internals = host.attachInternals();
38
+ host.addController(this);
39
+ }
40
+ }
41
+ __webpack_require__.d(__webpack_exports__, {
42
+ FacetVisibilityController: ()=>FacetVisibilityController
43
+ });
44
+ exports.FacetVisibilityController = __webpack_exports__.FacetVisibilityController;
45
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
46
+ "FacetVisibilityController"
47
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
48
+ Object.defineProperty(exports, '__esModule', {
49
+ value: true
50
+ });
@@ -108,22 +108,27 @@ class TimeframeFacetCommon {
108
108
  this.facetForDatePickerDependenciesManager?.stopWatching();
109
109
  this.filterDependenciesManager?.stopWatching();
110
110
  }
111
- get isHidden() {
112
- return !this.shouldRenderFacet || !this.enabled;
111
+ isHostHidden({ hasError, firstSearchExecuted }) {
112
+ return hasError || !this.enabled || firstSearchExecuted && this.facetInfo.isHidden();
113
113
  }
114
- registerFacetToStore() {
115
- const facetInfo = {
114
+ get facetInfo() {
115
+ return {
116
116
  label: ()=>this.props.bindings.i18n.t(this.props.label),
117
117
  facetId: this.facetId,
118
118
  element: this.props.host,
119
119
  isHidden: ()=>this.isHidden
120
120
  };
121
+ }
122
+ get isHidden() {
123
+ return !this.shouldRenderFacet || !this.enabled;
124
+ }
125
+ registerFacetToStore() {
121
126
  this.props.bindings.store.registerFacet('dateFacets', {
122
- ...facetInfo,
127
+ ...this.facetInfo,
123
128
  format: (value)=>this.formatFacetValue(value)
124
129
  });
125
130
  (0, popover_type_cjs_namespaceObject.initializePopover)(this.props.host, {
126
- ...facetInfo,
131
+ ...this.facetInfo,
127
132
  hasValues: ()=>this.hasValues,
128
133
  numberOfActiveValues: ()=>this.numberOfSelectedValues
129
134
  });
@@ -220,14 +225,16 @@ class TimeframeFacetCommon {
220
225
  ></atomic-facet-date-input>`;
221
226
  }
222
227
  render({ hasError, firstSearchExecuted, isCollapsed, headerFocus, onToggleCollapse }) {
223
- if (hasError || !this.enabled) return external_lit_namespaceObject.nothing;
228
+ if (this.isHostHidden({
229
+ hasError,
230
+ firstSearchExecuted
231
+ })) return external_lit_namespaceObject.nothing;
224
232
  if (!firstSearchExecuted) return (0, facet_placeholder_cjs_namespaceObject.renderFacetPlaceholder)({
225
233
  props: {
226
234
  numberOfValues: this.currentValues.length,
227
235
  isCollapsed
228
236
  }
229
237
  });
230
- if (!this.shouldRenderFacet) return external_lit_namespaceObject.nothing;
231
238
  return (0, facet_container_cjs_namespaceObject.renderFacetContainer)()((0, external_lit_namespaceObject.html)`${this.renderHeader(isCollapsed, headerFocus, onToggleCollapse)}
232
239
  ${!isCollapsed ? (0, external_lit_namespaceObject.html)`${this.shouldRenderValues ? this.renderValues() : external_lit_namespaceObject.nothing}
233
240
  ${this.shouldRenderInput ? this.renderDateInput() : external_lit_namespaceObject.nothing}` : external_lit_namespaceObject.nothing}`);
@@ -30,13 +30,14 @@ __webpack_require__.r(__webpack_exports__);
30
30
  __webpack_require__.d(__webpack_exports__, {
31
31
  ItemLayoutController: ()=>ItemLayoutController
32
32
  });
33
+ const external_item_layout_sections_cjs_namespaceObject = require("./item-layout-sections.cjs");
33
34
  const external_item_layout_utils_cjs_namespaceObject = require("./item-layout-utils.cjs");
34
35
  class ItemLayoutController {
35
36
  hostConnected() {
36
37
  this.createLayout();
37
38
  }
38
39
  hostUpdated() {
39
- if (!this.options.classesOnly) this.applyLayoutClasses();
40
+ this.applyLayoutClasses();
40
41
  }
41
42
  getLayout() {
42
43
  return this.layout;
@@ -85,10 +86,14 @@ class ItemLayoutController {
85
86
  }
86
87
  addClassesToElements(root, classes) {
87
88
  if (0 === classes.length) return;
89
+ const config = this.getLayout();
90
+ const sectionClasses = config ? (0, external_item_layout_utils_cjs_namespaceObject.getItemLayoutClasses)(config) : [];
88
91
  const elements = root.querySelectorAll('*');
89
92
  elements.forEach((element)=>{
90
93
  const tagName = element.tagName.toLowerCase();
91
- if (tagName.startsWith(`${this.options.elementPrefix}-`)) element.classList.add(...classes);
94
+ const isPrefixedChild = !this.options.classesOnly && tagName.startsWith(`${this.options.elementPrefix}-`);
95
+ if (isPrefixedChild) element.classList.add(...classes);
96
+ else if ((0, external_item_layout_sections_cjs_namespaceObject.isResultSectionNode)(element) && sectionClasses.length > 0) element.classList.add(...sectionClasses);
92
97
  });
93
98
  }
94
99
  observeAndApplyClasses(root, classes) {
@@ -53,6 +53,7 @@ const facet_show_more_less_cjs_namespaceObject = require("../../common/facets/fa
53
53
  const facet_value_cjs_namespaceObject = require("../../common/facets/facet-value/facet-value.cjs");
54
54
  const facet_values_group_cjs_namespaceObject = require("../../common/facets/facet-values-group/facet-values-group.cjs");
55
55
  const popover_type_cjs_namespaceObject = require("../../common/facets/popover/popover-type.cjs");
56
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
56
57
  const bind_state_cjs_namespaceObject = require("../../../decorators/bind-state.cjs");
57
58
  const binding_guard_cjs_namespaceObject = require("../../../decorators/binding-guard.cjs");
58
59
  const bindings_cjs_namespaceObject = require("../../../decorators/bindings.cjs");
@@ -245,6 +246,7 @@ class AtomicInsightFacet extends external_lit_namespaceObject.LitElement {
245
246
  }
246
247
  constructor(){
247
248
  super(), this.label = 'no-label', this.numberOfValues = 8, this.sortCriteria = 'automatic', this.displayValuesAs = 'checkbox', this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.injectionDepth = 1000, this.enableExclusion = false, this.dependsOn = {}, this.valuesBeforeShowMore = new Set();
249
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.facet && this.facetInfo.isHidden());
248
250
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
249
251
  field: this.field,
250
252
  numberOfValues: this.numberOfValues,
@@ -55,6 +55,7 @@ const values_container_cjs_namespaceObject = require("../../common/facets/numeri
55
55
  const numeric_facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/numeric-facet-common.tw.css.cjs");
56
56
  var numeric_facet_common_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(numeric_facet_common_tw_css_cjs_namespaceObject);
57
57
  const popover_type_cjs_namespaceObject = require("../../common/facets/popover/popover-type.cjs");
58
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
58
59
  const format_common_cjs_namespaceObject = require("../../common/formats/format-common.cjs");
59
60
  const validate_props_controller_cjs_namespaceObject = require("../../common/validate-props-controller/validate-props-controller.cjs");
60
61
  const bind_state_cjs_namespaceObject = require("../../../decorators/bind-state.cjs");
@@ -77,6 +78,14 @@ function _ts_metadata(metadataKey, metadataValue) {
77
78
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(metadataKey, metadataValue);
78
79
  }
79
80
  class AtomicInsightNumericFacet extends external_lit_namespaceObject.LitElement {
81
+ get facetInfo() {
82
+ return {
83
+ label: ()=>this.bindings.i18n.t(this.label),
84
+ facetId: this.facetId,
85
+ element: this,
86
+ isHidden: ()=>this.isHidden
87
+ };
88
+ }
80
89
  initialize() {
81
90
  this.computeFacetId();
82
91
  this.initializeFacetForInput();
@@ -217,14 +226,8 @@ class AtomicInsightNumericFacet extends external_lit_namespaceObject.LitElement
217
226
  });
218
227
  }
219
228
  registerFacetToStore() {
220
- const facetInfo = {
221
- label: ()=>this.bindings.i18n.t(this.label),
222
- facetId: this.facetId,
223
- element: this,
224
- isHidden: ()=>this.isHidden
225
- };
226
229
  this.bindings.store.registerFacet('numericFacets', {
227
- ...facetInfo,
230
+ ...this.facetInfo,
228
231
  format: (value)=>(0, formatter_cjs_namespaceObject.formatHumanReadable)({
229
232
  facetValue: value,
230
233
  logger: this.bindings.engine.logger,
@@ -235,7 +238,7 @@ class AtomicInsightNumericFacet extends external_lit_namespaceObject.LitElement
235
238
  })
236
239
  });
237
240
  (0, popover_type_cjs_namespaceObject.initializePopover)(this, {
238
- ...facetInfo,
241
+ ...this.facetInfo,
239
242
  hasValues: ()=>this.hasValues,
240
243
  numberOfActiveValues: ()=>this.numberOfSelectedValues
241
244
  });
@@ -336,6 +339,7 @@ class AtomicInsightNumericFacet extends external_lit_namespaceObject.LitElement
336
339
  }
337
340
  constructor(){
338
341
  super(), this.label = 'no-label', this.numberOfValues = 8, this.sortCriteria = 'ascending', this.rangeAlgorithm = 'equiprobable', this.displayValuesAs = 'checkbox', this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.injectionDepth = 1000, this.manualRanges = [], this.formatter = format_common_cjs_namespaceObject.defaultNumberFormatter;
342
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.searchStatus && this.facetInfo.isHidden());
339
343
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
340
344
  displayValuesAs: this.displayValuesAs,
341
345
  withInput: this.withInput
@@ -152,21 +152,92 @@ AtomicInsightResult.propsSchema = new bueno_namespaceObject.Schema({
152
152
  });
153
153
  AtomicInsightResult.styles = (0, external_lit_namespaceObject.css)`
154
154
  @reference '../../../utils/tailwind.global.tw.css';
155
- @import '../../common/template-system/legacy-template-system.css';
155
+ @import '../../common/template-system/template-system.css';
156
156
 
157
157
  :host {
158
158
  @apply atomic-template-system;
159
159
  @apply relative;
160
160
 
161
- .with-sections:not(.child-result) {
161
+ .result-root.with-sections:not(.child-result) {
162
162
  padding-top: var(--atomic-layout-spacing-y);
163
163
  padding-bottom: var(--atomic-layout-spacing-y);
164
164
  padding-right: var(--atomic-layout-spacing-x);
165
165
  padding-left: var(--atomic-layout-spacing-x);
166
166
  }
167
+
168
+ .result-root.with-sections.display-list {
169
+ &.density-comfortable {
170
+ &.child-result:not(.last-child),
171
+ .placeholder {
172
+ margin-bottom: 1.75rem;
173
+ }
174
+ }
175
+ &.density-normal {
176
+ &.child-result:not(.last-child),
177
+ .placeholder {
178
+ margin-bottom: 1.5rem;
179
+ }
180
+ }
181
+ &.density-compact {
182
+ &.child-result:not(.last-child),
183
+ .placeholder {
184
+ margin-bottom: 1rem;
185
+ }
186
+ }
187
+
188
+ @media (width >= theme(--breakpoint-desktop)) {
189
+ &.density-normal,
190
+ &.density-compact {
191
+ atomic-result-section-children {
192
+ margin-top: 0;
193
+ }
194
+ }
195
+ }
196
+
197
+ @media not all and (width >= theme(--breakpoint-desktop)) {
198
+ atomic-result-section-children atomic-insight-result-children::part(children-root) {
199
+ margin: 1rem -1rem 0;
200
+ padding-right: 1rem;
201
+ padding-left: 1rem;
202
+ }
203
+
204
+ &.density-comfortable {
205
+ atomic-result-section-children atomic-insight-result-children::part(children-root) {
206
+ padding-top: 1.75rem;
207
+ }
208
+ atomic-result-section-children atomic-insight-result-children::part(show-hide-button) {
209
+ margin-top: 1.25rem;
210
+ margin-bottom: 1.25rem;
211
+ }
212
+ }
213
+ &.density-normal {
214
+ atomic-result-section-children atomic-insight-result-children::part(children-root) {
215
+ padding-top: 1.5rem;
216
+ }
217
+ atomic-result-section-children atomic-insight-result-children::part(show-hide-button) {
218
+ margin-top: 0.875rem;
219
+ margin-bottom: 0.875rem;
220
+ }
221
+ }
222
+ &.density-compact {
223
+ > atomic-result-section-excerpt {
224
+ margin-top: 0.75rem;
225
+ max-height: 1.25rem;
226
+ @apply line-clamp-1;
227
+ }
228
+ atomic-result-section-children atomic-insight-result-children::part(children-root) {
229
+ padding-top: 1rem;
230
+ }
231
+ atomic-result-section-children atomic-insight-result-children::part(show-hide-button) {
232
+ margin-top: 0.475rem;
233
+ margin-bottom: 0.475rem;
234
+ }
235
+ }
236
+ }
237
+ }
167
238
  }
168
239
 
169
- :host(:hover) .with-sections {
240
+ :host(:hover) .result-root.with-sections {
170
241
  @apply bg-neutral-lighter;
171
242
  }
172
243
 
@@ -174,7 +245,7 @@ AtomicInsightResult.styles = (0, external_lit_namespaceObject.css)`
174
245
  @apply visible;
175
246
  }
176
247
 
177
- :host(:first-of-type) .with-sections:not(.child-result) {
248
+ :host(:first-of-type) .result-root.with-sections:not(.child-result) {
178
249
  @apply pt-8;
179
250
  }
180
251
 
@@ -47,6 +47,7 @@ const when_js_namespaceObject = require("lit/directives/when.js");
47
47
  const depends_on_cjs_namespaceObject = require("../../common/facets/depends-on.cjs");
48
48
  const facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/facet-common.tw.css.cjs");
49
49
  var facet_common_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(facet_common_tw_css_cjs_namespaceObject);
50
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
50
51
  const facet_placeholder_cjs_namespaceObject = require("../../common/facets/facet-placeholder/facet-placeholder.cjs");
51
52
  const timeframe_facet_common_cjs_namespaceObject = require("../../common/facets/timeframe-facet-common.cjs");
52
53
  const validate_props_controller_cjs_namespaceObject = require("../../common/validate-props-controller/validate-props-controller.cjs");
@@ -68,6 +69,10 @@ function _ts_metadata(metadataKey, metadataValue) {
68
69
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(metadataKey, metadataValue);
69
70
  }
70
71
  class AtomicInsightTimeframeFacet extends external_lit_namespaceObject.LitElement {
72
+ get isHidden() {
73
+ if (!this.timeframeFacetCommon || !this.searchStatusState) return false;
74
+ return this.timeframeFacetCommon.isHostHidden(this.searchStatusState);
75
+ }
71
76
  get focusTarget() {
72
77
  if (!this.headerFocus) this.headerFocus = new accessibility_utils_cjs_namespaceObject.FocusTargetController(this, this.bindings);
73
78
  return this.headerFocus;
@@ -160,6 +165,7 @@ class AtomicInsightTimeframeFacet extends external_lit_namespaceObject.LitElemen
160
165
  super(), this.label = 'no-label', this.field = 'date', this.withDatePicker = false, this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.injectionDepth = 1000, this.sortCriteria = 'descending', this.handleDateInputApply = ()=>{
161
166
  if (this.facetId) this.bindings.engine.dispatch((0, insight_namespaceObject.loadDateFacetSetActions)(this.bindings.engine).deselectAllDateFacetValues(this.facetId));
162
167
  };
168
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>this.isHidden);
163
169
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
164
170
  injectionDepth: this.injectionDepth,
165
171
  headingLevel: this.headingLevel,
@@ -188,7 +188,7 @@ AtomicRecsResult.propsSchema = new bueno_namespaceObject.Schema({
188
188
  })
189
189
  });
190
190
  AtomicRecsResult.styles = (0, external_lit_namespaceObject.css)`
191
- @import '../../common/template-system/legacy-template-system.css';
191
+ @import '../../common/template-system/template-system.css';
192
192
 
193
193
  :host {
194
194
  @apply atomic-template-system;
@@ -57,6 +57,7 @@ const value_link_cjs_namespaceObject = require("../../common/facets/category-fac
57
57
  const depends_on_cjs_namespaceObject = require("../../common/facets/depends-on.cjs");
58
58
  const facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/facet-common.tw.css.cjs");
59
59
  var facet_common_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(facet_common_tw_css_cjs_namespaceObject);
60
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
60
61
  const facet_container_cjs_namespaceObject = require("../../common/facets/facet-container/facet-container.cjs");
61
62
  const facet_header_cjs_namespaceObject = require("../../common/facets/facet-header/facet-header.cjs");
62
63
  const facet_placeholder_cjs_namespaceObject = require("../../common/facets/facet-placeholder/facet-placeholder.cjs");
@@ -90,6 +91,14 @@ function _ts_metadata(metadataKey, metadataValue) {
90
91
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(metadataKey, metadataValue);
91
92
  }
92
93
  class AtomicCategoryFacet extends external_lit_namespaceObject.LitElement {
94
+ get facetInfo() {
95
+ return {
96
+ label: ()=>this.bindings.i18n.t(this.label),
97
+ facetId: this.facetId,
98
+ element: this,
99
+ isHidden: ()=>this.isHidden
100
+ };
101
+ }
93
102
  initialize() {
94
103
  if (this.tabsIncluded.length > 0 && this.tabsExcluded.length > 0) console.warn('Values for both "tabs-included" and "tabs-excluded" have been provided. This could lead to unexpected behaviors.');
95
104
  this.searchStatus = (0, headless_namespaceObject.buildSearchStatus)(this.bindings.engine);
@@ -119,15 +128,9 @@ class AtomicCategoryFacet extends external_lit_namespaceObject.LitElement {
119
128
  (0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.label, (msg)=>{
120
129
  this.facetSearchAriaMessage.message = msg;
121
130
  }, this.bindings.i18n);
122
- const facetInfo = {
123
- label: ()=>this.bindings.i18n.t(this.label),
124
- facetId: this.facetId,
125
- element: this,
126
- isHidden: ()=>this.isHidden
127
- };
128
- this.bindings.store.registerFacet('categoryFacets', facetInfo);
131
+ this.bindings.store.registerFacet('categoryFacets', this.facetInfo);
129
132
  (0, popover_type_cjs_namespaceObject.initializePopover)(this, {
130
- ...facetInfo,
133
+ ...this.facetInfo,
131
134
  hasValues: ()=>!!this.facet.state.valuesAsTrees.length,
132
135
  numberOfActiveValues: ()=>this.facetState.hasActiveValues ? 1 : 0
133
136
  });
@@ -403,6 +406,7 @@ class AtomicCategoryFacet extends external_lit_namespaceObject.LitElement {
403
406
  }
404
407
  constructor(){
405
408
  super(), this.resultIndexToFocusOnShowMore = 0, this.label = 'no-label', this.tabsIncluded = [], this.tabsExcluded = [], this.numberOfValues = 8, this.withSearch = false, this.sortCriteria = 'occurrences', this.delimitingCharacter = ';', this.basePath = [], this.filterByBasePath = true, this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.injectionDepth = 1000, this.facetSearchAriaMessage = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'facet-search');
409
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.facet && this.facetInfo.isHidden());
406
410
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
407
411
  field: this.field,
408
412
  numberOfValues: this.numberOfValues,
@@ -48,6 +48,7 @@ const depends_on_cjs_namespaceObject = require("../../common/facets/depends-on.c
48
48
  const facet_common_cjs_namespaceObject = require("../../common/facets/facet-common.cjs");
49
49
  const facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/facet-common.tw.css.cjs");
50
50
  var facet_common_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(facet_common_tw_css_cjs_namespaceObject);
51
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
51
52
  const facet_container_cjs_namespaceObject = require("../../common/facets/facet-container/facet-container.cjs");
52
53
  const facet_header_cjs_namespaceObject = require("../../common/facets/facet-header/facet-header.cjs");
53
54
  const facet_placeholder_cjs_namespaceObject = require("../../common/facets/facet-placeholder/facet-placeholder.cjs");
@@ -353,6 +354,7 @@ class AtomicColorFacet extends external_lit_namespaceObject.LitElement {
353
354
  }
354
355
  constructor(){
355
356
  super(), this.label = 'no-label', this.tabsIncluded = [], this.tabsExcluded = [], this.numberOfValues = 8, this.withSearch = true, this.sortCriteria = 'automatic', this.resultsMustMatch = 'atLeastOneValue', this.displayValuesAs = 'box', this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.injectionDepth = 1000, this.allowedValues = [], this.customSort = [], this.valuesBeforeShowMore = new Set();
357
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.facet && this.facetInfo.isHidden());
356
358
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
357
359
  field: this.field,
358
360
  numberOfValues: this.numberOfValues,
@@ -70,6 +70,7 @@ const boolean_converter_cjs_namespaceObject = require("../../../converters/boole
70
70
  const bindings_cjs_namespaceObject = require("../../../decorators/bindings.cjs");
71
71
  const facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/facet-common.tw.css.cjs");
72
72
  var facet_common_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(facet_common_tw_css_cjs_namespaceObject);
73
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
73
74
  const facet_search_tw_css_cjs_namespaceObject = require("../../common/facets/facet-search/facet-search.tw.css.cjs");
74
75
  var facet_search_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(facet_search_tw_css_cjs_namespaceObject);
75
76
  const facet_value_box_tw_css_cjs_namespaceObject = require("../../common/facets/facet-value-box/facet-value-box.tw.css.cjs");
@@ -336,6 +337,7 @@ class AtomicFacet extends external_lit_namespaceObject.LitElement {
336
337
  }
337
338
  constructor(){
338
339
  super(), this.label = 'no-label', this.tabsIncluded = [], this.tabsExcluded = [], this.numberOfValues = 8, this.withSearch = true, this.sortCriteria = 'automatic', this.resultsMustMatch = 'atLeastOneValue', this.displayValuesAs = 'checkbox', this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.enableExclusion = false, this.injectionDepth = 1000, this.allowedValues = [], this.customSort = [], this.valuesBeforeShowMore = new Set();
340
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.facet && this.facetInfo.isHidden());
339
341
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
340
342
  field: this.field,
341
343
  numberOfValues: this.numberOfValues,
@@ -46,6 +46,7 @@ const decorators_js_namespaceObject = require("lit/decorators.js");
46
46
  const when_js_namespaceObject = require("lit/directives/when.js");
47
47
  const depends_on_cjs_namespaceObject = require("../../common/facets/depends-on.cjs");
48
48
  const facet_common_cjs_namespaceObject = require("../../common/facets/facet-common.cjs");
49
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
49
50
  const facet_container_cjs_namespaceObject = require("../../common/facets/facet-container/facet-container.cjs");
50
51
  const facet_header_cjs_namespaceObject = require("../../common/facets/facet-header/facet-header.cjs");
51
52
  const facet_placeholder_cjs_namespaceObject = require("../../common/facets/facet-placeholder/facet-placeholder.cjs");
@@ -78,6 +79,14 @@ function _ts_metadata(metadataKey, metadataValue) {
78
79
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(metadataKey, metadataValue);
79
80
  }
80
81
  class AtomicNumericFacet extends external_lit_namespaceObject.LitElement {
82
+ get facetInfo() {
83
+ return {
84
+ label: ()=>this.bindings.i18n.t(this.label),
85
+ facetId: this.facetId,
86
+ element: this,
87
+ isHidden: ()=>this.isHidden
88
+ };
89
+ }
81
90
  initialize() {
82
91
  this.validateTabs();
83
92
  this.initializeTabManager();
@@ -237,14 +246,8 @@ class AtomicNumericFacet extends external_lit_namespaceObject.LitElement {
237
246
  });
238
247
  }
239
248
  registerFacetToStore() {
240
- const facetInfo = {
241
- label: ()=>this.bindings.i18n.t(this.label),
242
- facetId: this.facetId,
243
- element: this,
244
- isHidden: ()=>this.isHidden
245
- };
246
249
  this.bindings.store.registerFacet('numericFacets', {
247
- ...facetInfo,
250
+ ...this.facetInfo,
248
251
  format: (value)=>(0, formatter_cjs_namespaceObject.formatHumanReadable)({
249
252
  facetValue: value,
250
253
  logger: this.bindings.engine.logger,
@@ -255,7 +258,7 @@ class AtomicNumericFacet extends external_lit_namespaceObject.LitElement {
255
258
  })
256
259
  });
257
260
  (0, popover_type_cjs_namespaceObject.initializePopover)(this, {
258
- ...facetInfo,
261
+ ...this.facetInfo,
259
262
  hasValues: ()=>this.hasValues,
260
263
  numberOfActiveValues: ()=>this.numberOfSelectedValues
261
264
  });
@@ -356,6 +359,7 @@ class AtomicNumericFacet extends external_lit_namespaceObject.LitElement {
356
359
  }
357
360
  constructor(){
358
361
  super(), this.label = 'no-label', this.tabsIncluded = [], this.tabsExcluded = [], this.numberOfValues = 8, this.sortCriteria = 'ascending', this.rangeAlgorithm = 'equiprobable', this.displayValuesAs = 'checkbox', this.isCollapsed = false, this.headingLevel = 0, this.filterFacetCount = true, this.injectionDepth = 1000, this.manualRanges = [], this.formatter = format_common_cjs_namespaceObject.defaultNumberFormatter, this.conditionManagers = [];
362
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.searchStatus && this.facetInfo.isHidden());
359
363
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
360
364
  displayValuesAs: this.displayValuesAs,
361
365
  withInput: this.withInput
@@ -50,6 +50,7 @@ const rating_cjs_namespaceObject = require("../../common/atomic-rating/rating.cj
50
50
  const depends_on_cjs_namespaceObject = require("../../common/facets/depends-on.cjs");
51
51
  const facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/facet-common.tw.css.cjs");
52
52
  var facet_common_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(facet_common_tw_css_cjs_namespaceObject);
53
+ const facet_visibility_controller_cjs_namespaceObject = require("../../common/facets/facet-visibility-controller.cjs");
53
54
  const facet_container_cjs_namespaceObject = require("../../common/facets/facet-container/facet-container.cjs");
54
55
  const facet_header_cjs_namespaceObject = require("../../common/facets/facet-header/facet-header.cjs");
55
56
  const facet_placeholder_cjs_namespaceObject = require("../../common/facets/facet-placeholder/facet-placeholder.cjs");
@@ -85,6 +86,14 @@ class AtomicRatingFacet extends external_lit_namespaceObject.LitElement {
85
86
  if (!this.headerFocus) this.headerFocus = new accessibility_utils_cjs_namespaceObject.FocusTargetController(this, this.bindings);
86
87
  return this.headerFocus;
87
88
  }
89
+ get facetInfo() {
90
+ return {
91
+ label: ()=>this.bindings.i18n.t(this.label),
92
+ facetId: this.facetId,
93
+ element: this,
94
+ isHidden: ()=>this.isHidden
95
+ };
96
+ }
88
97
  connectedCallback() {
89
98
  super.connectedCallback();
90
99
  if (void 0 === this.maxValueInIndex) this.maxValueInIndex = this.numberOfIntervals;
@@ -130,19 +139,13 @@ class AtomicRatingFacet extends external_lit_namespaceObject.LitElement {
130
139
  options
131
140
  });
132
141
  this.facetId = this.facet.state.facetId;
133
- const facetInfo = {
134
- label: ()=>this.bindings.i18n.t(this.label),
135
- facetId: this.facetId,
136
- element: this,
137
- isHidden: ()=>this.isHidden
138
- };
139
142
  this.bindings.store.registerFacet('numericFacets', {
140
- ...facetInfo,
143
+ ...this.facetInfo,
141
144
  format: (value)=>this.formatFacetValue(value),
142
145
  content: (value)=>this.ratingContent(value)
143
146
  });
144
147
  (0, popover_type_cjs_namespaceObject.initializePopover)(this, {
145
- ...facetInfo,
148
+ ...this.facetInfo,
146
149
  hasValues: ()=>!!this.valuesToRender.length,
147
150
  numberOfActiveValues: ()=>this.numberOfSelectedValues
148
151
  });
@@ -269,6 +272,7 @@ class AtomicRatingFacet extends external_lit_namespaceObject.LitElement {
269
272
  }
270
273
  constructor(){
271
274
  super(), this.label = 'no-label', this.numberOfIntervals = 5, this.tabsIncluded = [], this.tabsExcluded = [], this.minValueInIndex = 1, this.displayValuesAs = 'checkbox', this.icon = star_cjs_default(), this.isCollapsed = false, this.headingLevel = 0, this.injectionDepth = 1000;
275
+ new facet_visibility_controller_cjs_namespaceObject.FacetVisibilityController(this, ()=>!!this.facet && this.facetInfo.isHidden());
272
276
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
273
277
  field: this.field,
274
278
  numberOfIntervals: this.numberOfIntervals,