@orangelogic/design-system 2.112.0 → 2.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/library/chunks/{asset.Ci6rP56l.js → asset.Drl4D1c7.js} +1 -1
  2. package/library/chunks/{button.BvBgxmvw.js → button.DwJEeW2t.js} +1 -1
  3. package/library/chunks/{color-swatch-group.D8KPblw2.js → color-swatch-group.5Mqr0rNP.js} +7 -7
  4. package/library/chunks/{color-swatch.DQxReKYX.js → color-swatch.DVzEaNeL.js} +1 -1
  5. package/library/chunks/{confirm-popover.dyPIFLWa.js → confirm-popover.BifwpSuf.js} +3 -3
  6. package/library/chunks/{dialog.BoCFGpPO.js → dialog.BYCWepBc.js} +2 -2
  7. package/library/chunks/{document-viewer.B90s20gM.js → document-viewer.Cui5mV3v.js} +5 -5
  8. package/library/chunks/{dot-pagination.uz9GFrMP.js → dot-pagination.C4l5vKor.js} +1 -1
  9. package/library/chunks/{file-on-demand.DLVH0DID.js → file-on-demand.AwMj4AfO.js} +246 -227
  10. package/library/chunks/{folder-select.C2ruplAB.js → folder-select.Bc9x2hMO.js} +4 -4
  11. package/library/chunks/{header.By_Mfx47.js → header.Cf9ujCpg.js} +3 -3
  12. package/library/chunks/{i18n.BcD4Ohsq.js → i18n.CH-wak_P.js} +6 -1
  13. package/library/chunks/{icon-button.DO6DHXwo.js → icon-button.CQiBjznj.js} +1 -1
  14. package/library/chunks/{iframe.C4jZSmOr.js → iframe.BQPVygBJ.js} +1 -1
  15. package/library/chunks/{image.Cx4hbc4L.js → image.cT-FziNS.js} +1 -1
  16. package/library/chunks/{input.B7SaYNrr.js → input.CH4lKxPM.js} +1 -1
  17. package/library/chunks/{list-editor.Hag-nXN-.js → list-editor.BBgFSBlF.js} +74 -74
  18. package/library/chunks/{option.CA-HtVdP.js → option.Bvh35v8S.js} +10 -10
  19. package/library/chunks/{pagination.jgAGwDyt.js → pagination.zQ2FFtxB.js} +5 -5
  20. package/library/chunks/{tab-group.DyxpVNOn.js → tab-group.DvMX02hY.js} +3 -3
  21. package/library/chunks/{table.Crb35At8.js → table.DLrle5SR.js} +5 -5
  22. package/library/chunks/{tree.jg0MjIB8.js → tree.Btf2Q4YZ.js} +10 -7
  23. package/library/components/alert.js +2 -2
  24. package/library/components/asset-link-format.js +6 -6
  25. package/library/components/atoms.js +129 -131
  26. package/library/components/audio.js +2 -2
  27. package/library/components/border-input-group.js +2 -2
  28. package/library/components/breadcrumb.js +1 -1
  29. package/library/components/button.js +2 -2
  30. package/library/components/color-picker.js +3 -3
  31. package/library/components/color-swatch-group.js +4 -4
  32. package/library/components/color-swatch.js +2 -2
  33. package/library/components/confirm-popover.js +4 -4
  34. package/library/components/copy-button.js +1 -1
  35. package/library/components/corner-position-input-group.js +3 -3
  36. package/library/components/date-calendar.js +1 -1
  37. package/library/components/details.js +1 -1
  38. package/library/components/dialog.js +3 -3
  39. package/library/components/divider.js +15 -15
  40. package/library/components/document-viewer.js +3 -3
  41. package/library/components/dot-pagination.js +2 -2
  42. package/library/components/drawer.js +2 -2
  43. package/library/components/dropdown.js +2 -2
  44. package/library/components/dynamic-select.js +4 -4
  45. package/library/components/e-chart.js +1 -1
  46. package/library/components/element-clamp.js +2 -2
  47. package/library/components/file-on-demand.js +10 -10
  48. package/library/components/folder-select.js +4 -4
  49. package/library/components/format-bytes.js +1 -1
  50. package/library/components/format-date.js +1 -1
  51. package/library/components/format-number.js +1 -1
  52. package/library/components/format-time.js +1 -1
  53. package/library/components/header.js +2 -2
  54. package/library/components/icon-button.js +2 -2
  55. package/library/components/iframe.js +2 -2
  56. package/library/components/image-comparer.js +1 -1
  57. package/library/components/image.js +2 -2
  58. package/library/components/input.js +2 -2
  59. package/library/components/line-clamp.js +1 -1
  60. package/library/components/list-editor.js +7 -7
  61. package/library/components/masonry.js +2 -2
  62. package/library/components/menu-item.js +1 -1
  63. package/library/components/menu.js +3 -3
  64. package/library/components/molecules.js +4 -4
  65. package/library/components/option.js +2 -2
  66. package/library/components/organisms.js +2 -2
  67. package/library/components/padding-input-group.js +1 -1
  68. package/library/components/pagination.js +6 -6
  69. package/library/components/popup.js +1 -1
  70. package/library/components/position-picker.js +1 -1
  71. package/library/components/progress-bar.js +1 -1
  72. package/library/components/progress-ring.js +1 -1
  73. package/library/components/radio-button.js +10 -10
  74. package/library/components/radio-card.js +6 -6
  75. package/library/components/radio.js +2 -2
  76. package/library/components/range.js +1 -1
  77. package/library/components/rating.js +1 -1
  78. package/library/components/relative-time.js +1 -1
  79. package/library/components/resize-observer.js +3 -3
  80. package/library/components/select.js +7 -7
  81. package/library/components/shadow-input-group.js +1 -1
  82. package/library/components/share-option-list.js +10 -10
  83. package/library/components/sidebar.js +1 -1
  84. package/library/components/size-input-group.js +3 -3
  85. package/library/components/spinner.js +1 -1
  86. package/library/components/split-panel.js +1 -1
  87. package/library/components/tab-group.js +4 -4
  88. package/library/components/tab.js +2 -2
  89. package/library/components/table.js +5 -5
  90. package/library/components/tag.js +2 -2
  91. package/library/components/tooltip.js +1 -1
  92. package/library/components/tree-item.js +2 -2
  93. package/library/components/tree.js +2 -2
  94. package/library/components/typeface.js +2 -2
  95. package/library/components/types.js +29688 -29415
  96. package/library/components/video.js +2 -2
  97. package/library/package.json +1 -1
  98. package/library/packages/atoms/src/components/divider/divider.d.ts +1 -1
  99. package/library/packages/atoms/src/components/option/option.d.ts +1 -1
  100. package/library/packages/atoms/src/components/radio/radio.d.ts +1 -1
  101. package/library/packages/atoms/src/components/radio-button/radio-button.d.ts +1 -1
  102. package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -1
  103. package/library/packages/atoms/src/components/tree/tree.d.ts +1 -0
  104. package/library/packages/atoms/src/index.d.ts +0 -1
  105. package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/components/facet/facet.d.ts +9 -9
  106. package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/faceted-filter.d.ts +12 -12
  107. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +6 -3
  108. package/library/packages/molecules/src/index.d.ts +1 -0
  109. package/library/packages/molecules/src/share-option-list/share-option-list.d.ts +1 -1
  110. package/library/packages/organisms/src/carousel/carousel.d.ts +1 -0
  111. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +2 -0
  112. package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +1 -0
  113. package/library/packages/types/src/icon-picker.d.ts +2 -2
  114. package/library/packages/utils/src/custom-element/i18n.d.ts +6 -1
  115. package/library/react-web-component.d.ts +51 -52
  116. package/library/utils.js +1 -1
  117. package/package.json +1 -1
  118. package/library/components/faceted-filter.d.ts +0 -3
  119. package/library/components/faceted-filter.js +0 -295
  120. /package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/components/facet/facet.styles.d.ts +0 -0
  121. /package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/faceted-filter.styles.d.ts +0 -0
package/library/utils.js CHANGED
@@ -11,7 +11,7 @@ import { d as Ce } from "./chunks/default-value.COZopaet.js";
11
11
  import { d as Ee } from "./chunks/drag.DXEXVXPv.js";
12
12
  import { f as O } from "./chunks/form.B-5nQJva.js";
13
13
  import { F as Ie, c as Le, g as Fe, v as Re, a as ve } from "./chunks/form.B-5nQJva.js";
14
- import { L as Ve, r as ke } from "./chunks/i18n.BcD4Ohsq.js";
14
+ import { L as Ve, r as ke } from "./chunks/i18n.CH-wak_P.js";
15
15
  import { c as Ye } from "./chunks/math.DqTA6ya4.js";
16
16
  import { g as He, l as Ne, s as Pe, u as Xe } from "./chunks/scroll.xtO5yojm.js";
17
17
  import { j as C } from "./chunks/dom.0RpWet6y.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.112.0",
4
+ "version": "2.114.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,3 +0,0 @@
1
- export * from '../packages/atoms/src/components/faceted-filter/faceted-filter'
2
- import _default from '../packages/atoms/src/components/faceted-filter/faceted-filter'
3
- export default _default
@@ -1,295 +0,0 @@
1
- import P from "./badge.js";
2
- import { C as $ } from "../chunks/button.BvBgxmvw.js";
3
- import C from "./details.js";
4
- import A from "./dropdown.js";
5
- import { C as w } from "../chunks/icon.DnBh6-56.js";
6
- import { C as E } from "../chunks/icon-button.DO6DHXwo.js";
7
- import F from "./space.js";
8
- import S from "./spinner.js";
9
- import I from "./tag.js";
10
- import V from "./tooltip.js";
11
- import { n as d, C as D } from "../chunks/lib-cortex-element.CVMmyPMC.js";
12
- import { c as N } from "../chunks/component.styles.CRO4Odto.js";
13
- import { c as O } from "../chunks/custom-element.L4WJXn1j.js";
14
- import { L as z } from "../chunks/i18n.BcD4Ohsq.js";
15
- import { w as _ } from "../chunks/watch.CThbualB.js";
16
- import { i as j, E as f, x as c } from "../chunks/lit-element.jLBm65_O.js";
17
- import { r as u } from "../chunks/state.CSDxrqLd.js";
18
- import { e as B } from "../chunks/class-map.BiVq-cVR.js";
19
- import { c as y } from "../chunks/repeat.DbF2p5ae.js";
20
- import { n as h } from "../chunks/when.Dr1es41R.js";
21
- import { C as M, a as T } from "../chunks/tree.jg0MjIB8.js";
22
- var v = /* @__PURE__ */ ((e) => (e.Multiple = "multiple", e.Single = "single", e))(v || {});
23
- const L = j`.facet{--content-padding:var(--cx-spacing-x-small);--expand-icon-size:24px}.facet::part(summary){padding-right:var(--cx-spacing-3x-small);flex:none}.facet::part(base){border-top-width:0;border-left-width:0;border-right-width:0}.facet__title{font-weight:var(--cx-font-weight-medium);color:var(--cx-color-neutral-900)}:host([loading]) cx-tree{pointer-events:none;opacity:.5}cx-tree-item::part(label){flex:1;min-width:0}.facet__item-label{justify-content:space-between;align-items:center;gap:var(--cx-spacing-x-small);width:100%;color:var(--cx-color-neutral-900);font-weight:var(--cx-font-weight-regular);display:flex}.facet__item-label__count{font-size:var(--cx-font-size-x-small);white-space:nowrap;flex-shrink:0}`;
24
- var R = Object.defineProperty, U = Object.getOwnPropertyDescriptor, m = (e, t, i, l) => {
25
- for (var a = l > 1 ? void 0 : l ? U(t, i) : t, s = e.length - 1, n; s >= 0; s--)
26
- (n = e[s]) && (a = (l ? n(t, i, a) : n(a)) || a);
27
- return l && a && R(t, i, a), a;
28
- };
29
- let r = class extends D {
30
- constructor() {
31
- super(...arguments), this.localize = new z(this), this.loading = !1, this.displayName = "", this.type = "", this.values = [], this.collections = [], this.selection = v.Single, this.mappedSubtypes = {}, this.mappedDisplayNames = {}, this.page = 1;
32
- }
33
- static parseFacetValue(e) {
34
- const t = e.indexOf(">>");
35
- return t === -1 ? { parent: e, subtype: "" } : {
36
- parent: e.slice(0, t),
37
- subtype: e.slice(t + 2)
38
- };
39
- }
40
- handleValuesChange() {
41
- this.mappedSubtypes = this.values.reduce(
42
- (t, { count: i, value: l }) => {
43
- const { parent: a, subtype: s } = r.parseFacetValue(l);
44
- return (!t[a] || typeof t[a] != "object") && (t[a] = {}), s && (t[a][s] = i), t[a].all = (t[a].all || 0) + i, t;
45
- },
46
- {}
47
- );
48
- const e = {};
49
- this.values.forEach((t) => {
50
- e[t.value] = t.displayValue;
51
- }), this.values.forEach((t) => {
52
- const { parent: i, subtype: l } = r.parseFacetValue(t.value);
53
- l && !e[i] && (e[i] = i.split(" ").map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" "));
54
- }), this.mappedDisplayNames = e;
55
- }
56
- loadMore() {
57
- this.page++;
58
- }
59
- render() {
60
- return c`<cx-details open class="facet"><cx-space slot="summary" align-items="center" spacing="x-small" wrap="nowrap"><span class="facet__title">${this.displayName}</span>${h(this.loading, () => c`<cx-spinner></cx-spinner>`, () => f)}</cx-space><cx-space direction="vertical"><cx-tree selection="multiple" data-facet=${this.type}>${y(
61
- Object.entries(this.mappedSubtypes).slice(
62
- 0,
63
- this.page * r.itemsPerPage
64
- ),
65
- ([e]) => e,
66
- ([e, t]) => {
67
- const { all: i, ...l } = t, a = Object.values(l).reduce((s, n) => s + n, 0);
68
- return c`<cx-tree-item data-value=${e} data-type=${this.type} ?readonly=${this.loading} ?partial-sync-checkboxes=${a < i} ?selected=${this.collections.includes(e)}><div class="facet__item-label"><span>${this.mappedDisplayNames[e]}</span>${h(!!i, () => c`<span class="facet__item-label__count">${i}</span>`)}</div>${y(
69
- Object.entries(l),
70
- ([s]) => s,
71
- ([s, n]) => c`<cx-tree-item data-value=${`${e}>>${s}`} data-type=${this.type} ?readonly=${this.loading} ?selected=${this.collections.includes(`${e}>>${s}`)}><div class="facet__item-label"><span>${this.mappedDisplayNames[`${e}>>${s}`]}</span><span class="facet__item-label__count">${n}</span></div></cx-tree-item>`
72
- )}</cx-tree-item>`;
73
- }
74
- )}
75
- ${h(
76
- Object.keys(this.mappedSubtypes).length > this.page * r.itemsPerPage,
77
- () => c`<cx-space><cx-button variant="text" @click=${this.loadMore}><cx-icon slot="prefix" name="add"></cx-icon>${this.localize.term("more")}</cx-button></cx-space>`,
78
- () => f
79
- )}</cx-tree></cx-space></cx-details>`;
80
- }
81
- };
82
- r.styles = [N, L];
83
- r.dependencies = {
84
- "cx-button": $,
85
- "cx-details": C,
86
- "cx-icon": w,
87
- "cx-space": F,
88
- "cx-spinner": S,
89
- "cx-tree": T,
90
- "cx-tree-item": M
91
- };
92
- r.itemsPerPage = 10;
93
- m([
94
- d({ reflect: !0, type: Boolean })
95
- ], r.prototype, "loading", 2);
96
- m([
97
- d({ attribute: "display-name", type: String })
98
- ], r.prototype, "displayName", 2);
99
- m([
100
- d({ reflect: !0, type: String })
101
- ], r.prototype, "type", 2);
102
- m([
103
- d({ type: Array })
104
- ], r.prototype, "values", 2);
105
- m([
106
- d({ type: Array })
107
- ], r.prototype, "collections", 2);
108
- m([
109
- d({ reflect: !0, type: String })
110
- ], r.prototype, "selection", 2);
111
- m([
112
- u()
113
- ], r.prototype, "mappedSubtypes", 2);
114
- m([
115
- u()
116
- ], r.prototype, "mappedDisplayNames", 2);
117
- m([
118
- u()
119
- ], r.prototype, "page", 2);
120
- m([
121
- _("values")
122
- ], r.prototype, "handleValuesChange", 1);
123
- r = m([
124
- O("cx-faceted-filter-facet")
125
- ], r);
126
- const q = j`:host{--panel-width:min(280px, 90dvw);display:contents}cx-dropdown{--panel-overflow:hidden}cx-details{--expand-icon-size:24px}.panel{width:var(--panel-width);max-height:480px;position:relative}.panel__content{flex-direction:column;max-height:480px;display:flex}.panel__header{flex-shrink:0}.panel__body{flex:1;min-height:0;overflow-y:auto}.panel__footer{padding:var(--cx-spacing-x-small) var(--cx-spacing-medium);border-top:1px solid var(--cx-color-neutral-200);flex-shrink:0;display:flex}.applied-filters__summary{align-items:center;gap:var(--cx-spacing-2x-small);display:inline-flex}.applied-filters__title{font-weight:var(--cx-font-weight-medium);color:var(--cx-color-neutral-900)}.applied-filters__loading{align-items:center;display:inline-flex}.applied-filters{--content-padding:0 var(--cx-spacing-medium);min-width:100%;width:var(--panel-width)}.applied-filters::part(summary){flex:none}.applied-filters::part(base),cx-faceted-filter-facet::part(base){border-top-width:0;border-left-width:0;border-right-width:0}.applied-filters--empty::part(content){display:none}.faceted-filter__trigger-wrapper{display:inline-block;position:relative}.faceted-filter__trigger::part(base){background-color:var(--cx-color-neutral-100)}.faceted-filter__trigger-badge{position:absolute;top:-15px;right:-15px}.applied-filters__tags{max-width:var(--panel-width);padding-bottom:var(--cx-spacing-x-small)}.panel__clear-all-button{--cx-button-text-transform:none;padding-top:var(--cx-spacing-2x-small);padding-bottom:var(--cx-spacing-2x-small)}.panel__clear-all-button::part(label){text-decoration:underline}.panel__clear-all-button:not([disabled])::part(base):hover{color:var(--cx-color-neutral-800);background-color:#0000;border-color:#0000}cx-tag::part(remove-button){font-size:var(--cx-font-size-x-small)}cx-tag::part(remove-button__base){min-height:unset;min-width:unset;padding:var(--cx-spacing-3x-small)}`;
127
- var G = Object.defineProperty, H = Object.getOwnPropertyDescriptor, p = (e, t, i, l) => {
128
- for (var a = l > 1 ? void 0 : l ? H(t, i) : t, s = e.length - 1, n; s >= 0; s--)
129
- (n = e[s]) && (a = (l ? n(t, i, a) : n(a)) || a);
130
- return l && a && G(t, i, a), a;
131
- };
132
- let o = class extends D {
133
- constructor() {
134
- super(...arguments), this.localize = new z(this), this.facets = [], this.availableFacets = [], this.selectedFacets = {}, this.selection = v.Single, this.loading = !1, this.appliedFiltersCount = 0, this.internalSelection = {}, this.mappedDisplayNames = {};
135
- }
136
- handleFacetsChange() {
137
- this.mappedDisplayNames = this.facets.reduce(
138
- (e, t) => {
139
- const i = t.values.reduce(
140
- (l, { displayValue: a, value: s }) => (l[s] = a, l),
141
- {}
142
- );
143
- return { ...e, [t.facetDetails.facetFieldName]: i };
144
- },
145
- {}
146
- ), this.updateAppliedFiltersCount();
147
- }
148
- handleSelectedFacetsChange() {
149
- this.internalSelection = Object.fromEntries(
150
- Object.entries(this.selectedFacets).map(([e, t]) => [e, [...t]])
151
- );
152
- }
153
- handleInternalSelectionChange() {
154
- this.updateAppliedFiltersCount();
155
- }
156
- updateAppliedFiltersCount() {
157
- this.appliedFiltersCount = Object.entries(this.internalSelection).reduce(
158
- (e, [t, i]) => e + i.filter((l) => this.mappedDisplayNames[t]?.[l]).length,
159
- 0
160
- );
161
- }
162
- getFacetSelectionMode(e) {
163
- return this.facets.find((t) => t.facetDetails.facetFieldName === e)?.facetDetails.selection ?? this.selection;
164
- }
165
- handleSelectionChange(e) {
166
- const i = e.target.type;
167
- if (!i)
168
- return;
169
- const l = this.getFacetSelectionMode(i) === v.Single;
170
- let a = e.detail.selection;
171
- if (l && a.length > 1) {
172
- const n = new Set(this.internalSelection[i] ?? []), g = a.find(
173
- (x) => !n.has(x.dataset.value ?? "")
174
- );
175
- a = g ? [g] : [a[a.length - 1]];
176
- }
177
- const s = a.reduce(
178
- (n, g) => {
179
- const x = g.dataset.type, b = g.dataset.value;
180
- return !b || !x || (n[x] || (n[x] = []), n[x].push(b)), n;
181
- },
182
- {
183
- ...this.internalSelection,
184
- [i]: []
185
- }
186
- );
187
- this.internalSelection = s, this.emit("cx-faceted-filter-change", { detail: { selection: s } });
188
- }
189
- handleRemove(e) {
190
- const t = e.target, i = t.dataset.type, l = t.dataset.value;
191
- if (!l || !i)
192
- return;
193
- const a = { ...this.internalSelection };
194
- a[i] && (a[i] = a[i].filter((s) => s !== l)), this.internalSelection = a, this.emit("cx-faceted-filter-change", { detail: { selection: a } });
195
- }
196
- handleClearAllClick() {
197
- this.internalSelection = {}, this.emit("cx-faceted-filter-change", { detail: { selection: {} } });
198
- }
199
- renderAppliedFilters() {
200
- return c`<cx-details open aria-busy=${this.loading ? "true" : "false"} class=${B({
201
- "applied-filters": !0,
202
- "applied-filters--empty": this.appliedFiltersCount === 0
203
- })}><span slot="summary" class="applied-filters__summary"><span class="applied-filters__title">${this.localize.term("appliedFilters")}${this.appliedFiltersCount > 0 ? ` (${this.appliedFiltersCount})` : f}</span>${h(
204
- this.loading,
205
- () => c`<span class="applied-filters__loading" role="status" aria-label=${this.localize.term("loading")}><cx-spinner></cx-spinner></span>`,
206
- () => f
207
- )}</span><cx-space direction="horizontal" spacing="small" class="applied-filters__tags">${y(
208
- Object.entries(this.internalSelection),
209
- ([e]) => e,
210
- ([e, t]) => t.filter((i) => this.mappedDisplayNames[e]?.[i]).map(
211
- (i) => c`<cx-tag removable data-value=${i} data-type=${e}>${this.mappedDisplayNames[e][i]}</cx-tag>`
212
- )
213
- )}</cx-space></cx-details>`;
214
- }
215
- renderFooter() {
216
- return h(
217
- this.appliedFiltersCount > 0,
218
- () => c`<div class="panel__footer"><cx-button variant="text" @click=${this.handleClearAllClick} size="small" class="panel__clear-all-button">${this.localize.term("clear")}</cx-button></div>`,
219
- () => f
220
- );
221
- }
222
- render() {
223
- return c`<cx-dropdown stay-open-on-select placement="bottom-start" distance="4" hoist @cx-selection-change=${this.handleSelectionChange} @cx-remove=${this.handleRemove}><div slot="trigger" class="faceted-filter__trigger-wrapper"><cx-icon-button name="filter_alt" label=${this.localize.term("filter")} class="faceted-filter__trigger"></cx-icon-button>${h(
224
- this.appliedFiltersCount > 0,
225
- () => c`<cx-badge class="faceted-filter__trigger-badge" pill size="small">${this.appliedFiltersCount}</cx-badge>`,
226
- () => f
227
- )}</div><div class="panel"><div class="panel__content"><div class="panel__header">${this.renderAppliedFilters()}</div><div class="panel__body">${h(
228
- this.availableFacets.length > 0,
229
- () => c`<div>${y(
230
- this.availableFacets,
231
- (e) => e.facetFieldName,
232
- (e) => {
233
- const t = this.facets.find(
234
- (i) => i.facetDetails.facetFieldName === e.facetFieldName
235
- );
236
- return t ? c`<cx-faceted-filter-facet display-name=${t.facetDetails.displayName} type=${t.facetDetails.facetFieldName} selection=${e.selection ?? this.selection} .collections=${this.internalSelection[t.facetDetails.facetFieldName] ?? []} .values=${t.values}></cx-faceted-filter-facet>` : f;
237
- }
238
- )}</div>`,
239
- () => f
240
- )}</div>${this.renderFooter()}</div></div></cx-dropdown>`;
241
- }
242
- };
243
- o.styles = [N, q];
244
- o.dependencies = {
245
- "cx-badge": P,
246
- "cx-button": $,
247
- "cx-details": C,
248
- "cx-dropdown": A,
249
- "cx-faceted-filter-facet": r,
250
- "cx-icon": w,
251
- "cx-icon-button": E,
252
- "cx-space": F,
253
- "cx-spinner": S,
254
- "cx-tag": I,
255
- "cx-tooltip": V
256
- };
257
- p([
258
- d({ type: Array })
259
- ], o.prototype, "facets", 2);
260
- p([
261
- d({ attribute: "available-facets", type: Array })
262
- ], o.prototype, "availableFacets", 2);
263
- p([
264
- d({ attribute: "selected-facets", type: Object })
265
- ], o.prototype, "selectedFacets", 2);
266
- p([
267
- d({ type: String })
268
- ], o.prototype, "selection", 2);
269
- p([
270
- d({ type: Boolean })
271
- ], o.prototype, "loading", 2);
272
- p([
273
- u()
274
- ], o.prototype, "appliedFiltersCount", 2);
275
- p([
276
- u()
277
- ], o.prototype, "internalSelection", 2);
278
- p([
279
- u()
280
- ], o.prototype, "mappedDisplayNames", 2);
281
- p([
282
- _("facets")
283
- ], o.prototype, "handleFacetsChange", 1);
284
- p([
285
- _("selectedFacets")
286
- ], o.prototype, "handleSelectedFacetsChange", 1);
287
- p([
288
- _("internalSelection")
289
- ], o.prototype, "handleInternalSelectionChange", 1);
290
- o = p([
291
- O("cx-faceted-filter")
292
- ], o);
293
- export {
294
- o as default
295
- };