@orangelogic/design-system 2.172.0 → 2.174.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 (47) hide show
  1. package/library/chunks/{asset-link-format.BATKDRgD.js → asset-link-format.NhSLWk_Y.js} +8 -6
  2. package/library/chunks/{color-swatch-group.CQlgq_I5.js → color-swatch-group.C01UAz1A.js} +530 -512
  3. package/library/chunks/{confirm-popover.hHcCIzpX.js → confirm-popover.Cn1BaP0W.js} +1 -1
  4. package/library/chunks/{dialog.BaHYOyYO.js → dialog.clJBka-1.js} +1 -1
  5. package/library/chunks/{document-viewer.B89YB5oo.js → document-viewer.DxPw7xHV.js} +1 -1
  6. package/library/chunks/{folder-select.C6Sv4jtu.js → folder-select.BgWvY0t0.js} +346 -320
  7. package/library/chunks/{icon-button.DJvfUmOl.js → icon-button.BWToMtdK.js} +3 -3
  8. package/library/chunks/{markdown.qQGMz1OY.js → markdown.CESgIEEE.js} +1 -1
  9. package/library/chunks/{pagination.CwKlKOek.js → pagination.Do36kaZK.js} +1 -1
  10. package/library/chunks/{tab-group.C_n0GEc_.js → tab-group.DYywhd3A.js} +1 -1
  11. package/library/components/alert.js +1 -1
  12. package/library/components/asset-link-format.js +1 -1
  13. package/library/components/atoms.js +6 -6
  14. package/library/components/audio.js +1 -1
  15. package/library/components/badge.js +1 -1
  16. package/library/components/color-swatch-group.js +1 -1
  17. package/library/components/confirm-popover.js +2 -2
  18. package/library/components/date-calendar.js +1 -1
  19. package/library/components/dialog.js +2 -2
  20. package/library/components/document-viewer.js +1 -1
  21. package/library/components/drawer.js +1 -1
  22. package/library/components/dynamic-select.js +144 -128
  23. package/library/components/file-on-demand.js +4 -4
  24. package/library/components/folder-select.js +1 -1
  25. package/library/components/icon-button.js +1 -1
  26. package/library/components/markdown.js +2 -2
  27. package/library/components/masonry.js +1 -1
  28. package/library/components/molecules.js +2 -2
  29. package/library/components/organisms.js +2 -2
  30. package/library/components/pagination.js +2 -2
  31. package/library/components/sidebar.js +1 -1
  32. package/library/components/size-input-group.js +1 -1
  33. package/library/components/tab-group.js +2 -2
  34. package/library/components/tab.js +1 -1
  35. package/library/components/tag.js +1 -1
  36. package/library/components/typeface.js +1 -1
  37. package/library/components/types.js +15 -15
  38. package/library/package.json +1 -1
  39. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
  40. package/library/packages/hybrid/table-core/src/table/components/table-toolbar/table-dropdown-filter.d.ts +13 -1
  41. package/library/packages/hybrid/table-core/src/table/components/table-toolbar/table-toolbar.d.ts +3 -0
  42. package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +14 -0
  43. package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +1 -0
  44. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +16 -0
  45. package/library/packages/molecules/src/folder-select/folder-select.d.ts +18 -5
  46. package/library/react-web-component.d.ts +6 -1
  47. package/package.json +1 -1
@@ -1,102 +1,102 @@
1
- import { C as te } from "./icon.D5iM9wXS.js";
1
+ import { C as re } from "./icon.D5iM9wXS.js";
2
2
  import { C as me } from "./input.B-c9KEAH.js";
3
- import re from "../components/line-clamp.js";
3
+ import se from "../components/line-clamp.js";
4
4
  import ye from "../components/select.js";
5
5
  import ge from "../components/tag.js";
6
6
  import { C as S, a as xe } from "./tree.B0-6Ny9b.js";
7
- import { n as s, C as B } from "./lib-cortex-element.CVMmyPMC.js";
8
- import { h as z, F as be, A as $e } from "./endpoints.CwgTrs4A.js";
7
+ import { n as s, C as N } from "./lib-cortex-element.CVMmyPMC.js";
8
+ import { h as A, F as be, A as $e } from "./endpoints.CwgTrs4A.js";
9
9
  import { M as P } from "./asset-link-format.ClaYu_v8.js";
10
- import { c as se } from "./component.styles.CRO4Odto.js";
11
- import { c as N } from "./custom-element.L4WJXn1j.js";
12
- import { L as W } from "./i18n.DbXTTLXx.js";
13
- import { w as m } from "./watch.DJF5K-8U.js";
14
- import { g as R, p as K, e as q } from "./string.BhJ0Zogu.js";
15
- import { x as y, i as ve } from "./lit-element.jLBm65_O.js";
16
- import { r as g } from "./state.CSDxrqLd.js";
17
- import { e as ie } from "./query.BBf1UFkC.js";
18
- import { r as Se } from "./choose.BTbF6BAn.js";
19
- import { C as le } from "./button.zWaIO1sl.js";
20
- import { d as Ie } from "./debounce.DaHuiSGU.js";
21
- import { o as p } from "./if-defined.BRoBj_Rp.js";
10
+ import { c as ie } from "./component.styles.CRO4Odto.js";
11
+ import { c as W } from "./custom-element.L4WJXn1j.js";
12
+ import { L as H } from "./i18n.DbXTTLXx.js";
13
+ import { w as y } from "./watch.DJF5K-8U.js";
14
+ import { g as V, p as X, e as R } from "./string.BhJ0Zogu.js";
15
+ import { x as g, i as ve } from "./lit-element.jLBm65_O.js";
16
+ import { r as x } from "./state.CSDxrqLd.js";
17
+ import { e as q } from "./query.BBf1UFkC.js";
18
+ import { r as Ie } from "./choose.BTbF6BAn.js";
19
+ import { C as ae } from "./button.zWaIO1sl.js";
20
+ import { d as Fe } from "./debounce.DaHuiSGU.js";
21
+ import { o as u } from "./if-defined.BRoBj_Rp.js";
22
22
  import { c as G } from "./repeat.CFjcER6_.js";
23
- import { o as ae } from "./style-map.llVFPd__.js";
23
+ import { o as le } from "./style-map.llVFPd__.js";
24
24
  import { n as k } from "./when.Dr1es41R.js";
25
- import Fe from "../components/space.js";
25
+ import Se from "../components/space.js";
26
26
  import { g as Te } from "./template.ClovJacp.js";
27
27
  import { e as Ce } from "./class-map.BiVq-cVR.js";
28
- var b = /* @__PURE__ */ ((e) => (e.CortexPath = "Document.CortexPath", e.DocSubTypeIconColor = "DocSubTypeIconColor", e.DocSubTypeIconImageUrl = "DocSubTypeIconImageUrl", e.DocSubTypeIconName = "DocSubTypeIconName", e.DocSubTypeIsFontIcon = "DocSubTypeIsFontIcon", e.DocType = "CoreField.DocType", e.HasBrowserChildren = "Document.HasBrowserChildren", e.RepresentativeAssetId = "Document.DocumentDirectRepresentativeRID", e.TitleWithFallback = "CoreField.TitleWithFallback", e))(b || {});
28
+ var v = /* @__PURE__ */ ((e) => (e.CortexPath = "Document.CortexPath", e.DocSubTypeIconColor = "DocSubTypeIconColor", e.DocSubTypeIconImageUrl = "DocSubTypeIconImageUrl", e.DocSubTypeIconName = "DocSubTypeIconName", e.DocSubTypeIsFontIcon = "DocSubTypeIsFontIcon", e.DocType = "CoreField.DocType", e.HasBrowserChildren = "Document.HasBrowserChildren", e.RepresentativeAssetId = "Document.DocumentDirectRepresentativeRID", e.TitleWithFallback = "CoreField.TitleWithFallback", e))(v || {});
29
29
  const De = 50;
30
- async function H({
30
+ async function Q({
31
31
  allowedFolders: e,
32
32
  baseUrl: t,
33
33
  bearerToken: r,
34
- excludeVirtualFolders: l,
35
- folderId: i,
36
- includeDirectChild: u,
37
- limit: f = De,
38
- searchTerm: $,
39
- self: D,
40
- start: Q = 0,
41
- token: pe
34
+ excludeVirtualFolders: i,
35
+ folderId: a,
36
+ includeDirectChild: f,
37
+ limit: m = De,
38
+ searchTerm: p,
39
+ self: b,
40
+ start: j = 0,
41
+ token: ue
42
42
  }) {
43
- let U = [], j = u ?? !0;
44
- e && e.length > 0 && !i ? (U = e, D = !0, j = !1) : i && (U = [i]);
43
+ let E = [], Z = f ?? !0;
44
+ e && e.length > 0 && !a ? (E = e, b = !0, Z = !1) : a && (E = [a]);
45
45
  try {
46
- return (await z.request({
46
+ return (await A.request({
47
47
  baseURL: t,
48
48
  headers: {
49
49
  Authorization: `Bearer ${r}`
50
50
  },
51
51
  method: "GET",
52
52
  params: {
53
- IncludeDirectChild: j,
54
- IncludeVirtualFolders: !l,
55
- Limit: f,
56
- ObjectRecordIDs: U,
57
- SeeThru: !!$,
58
- Self: D,
59
- Start: Q,
60
- Text: $ || void 0,
61
- Token: pe || void 0
53
+ IncludeDirectChild: Z,
54
+ IncludeVirtualFolders: !i,
55
+ Limit: m,
56
+ ObjectRecordIDs: E,
57
+ SeeThru: !!p,
58
+ Self: b,
59
+ Start: j,
60
+ Text: p || void 0,
61
+ Token: ue || void 0
62
62
  },
63
63
  paramsSerializer: {
64
64
  indexes: null
65
65
  },
66
66
  responseType: "json",
67
67
  transformResponse: [
68
- ...Array.isArray(z.defaults.transformResponse) ? z.defaults.transformResponse : [],
69
- (I, Le, E) => {
70
- if (E !== void 0 && (E < 200 || E >= 300))
68
+ ...Array.isArray(A.defaults.transformResponse) ? A.defaults.transformResponse : [],
69
+ (F, Le, L) => {
70
+ if (L !== void 0 && (L < 200 || L >= 300))
71
71
  return {
72
72
  data: [],
73
73
  hasMore: !1,
74
74
  totalCount: 0
75
75
  };
76
- if (!I || typeof I != "object")
76
+ if (!F || typeof F != "object")
77
77
  throw new Error("Invalid response format");
78
- const fe = I.contentItems?.length ?? 0;
78
+ const fe = F.contentItems?.length ?? 0;
79
79
  return {
80
- data: I.contentItems?.map((x) => {
81
- const L = x.fields[b.DocType] ?? "", O = x.fields[b.TitleWithFallback] ?? "", w = x.fields[b.CortexPath] ?? "", M = w.endsWith("/") && w.length > 1 ? w.slice(0, -1) : w;
82
- let Z = M;
83
- (L === P.Album || L === P.ProjectDocument) && (Z = M ? `${M}/${O}` : O);
84
- const J = x.fields[b.DocSubTypeIsFontIcon];
80
+ data: F.contentItems?.map(($) => {
81
+ const M = $.fields[v.DocType] ?? "", z = $.fields[v.TitleWithFallback] ?? "", w = $.fields[v.CortexPath] ?? "", O = w.endsWith("/") && w.length > 1 ? w.slice(0, -1) : w;
82
+ let J = O;
83
+ (M === P.Album || M === P.ProjectDocument) && (J = O ? `${O}/${z}` : z);
84
+ const K = $.fields[v.DocSubTypeIsFontIcon];
85
85
  return {
86
- docType: L,
87
- fullPath: Z,
88
- hasChildren: x.fields[b.HasBrowserChildren] === "1",
89
- iconColor: x.fields[b.DocSubTypeIconColor],
90
- iconImageUrl: x.fields[b.DocSubTypeIconImageUrl],
91
- iconName: x.fields[b.DocSubTypeIconName],
92
- id: x.recordID,
93
- isFontIcon: J === void 0 ? void 0 : J === "1",
94
- representativeAssetId: x.fields[b.RepresentativeAssetId] ?? "",
95
- title: O
86
+ docType: M,
87
+ fullPath: J,
88
+ hasChildren: $.fields[v.HasBrowserChildren] === "1",
89
+ iconColor: $.fields[v.DocSubTypeIconColor],
90
+ iconImageUrl: $.fields[v.DocSubTypeIconImageUrl],
91
+ iconName: $.fields[v.DocSubTypeIconName],
92
+ id: $.recordID,
93
+ isFontIcon: K === void 0 ? void 0 : K === "1",
94
+ representativeAssetId: $.fields[v.RepresentativeAssetId] ?? "",
95
+ title: z
96
96
  };
97
97
  }) ?? [],
98
- hasMore: Q + fe < I.totalCount,
99
- totalCount: I.totalCount
98
+ hasMore: j + fe < F.totalCount,
99
+ totalCount: F.totalCount
100
100
  };
101
101
  }
102
102
  ],
@@ -114,14 +114,14 @@ const oe = {
114
114
  fromAttribute: (e) => (e ?? "").split(" ").filter((t) => t !== ""),
115
115
  toAttribute: (e) => e.join(" ")
116
116
  };
117
- var F = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(F || {}), _e = Object.defineProperty, we = Object.getOwnPropertyDescriptor, h = (e, t, r, l) => {
118
- for (var i = l > 1 ? void 0 : l ? we(t, r) : t, u = e.length - 1, f; u >= 0; u--)
119
- (f = e[u]) && (i = (l ? f(t, r, i) : f(i)) || i);
120
- return l && i && _e(t, r, i), i;
117
+ var T = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(T || {}), _e = Object.defineProperty, we = Object.getOwnPropertyDescriptor, h = (e, t, r, i) => {
118
+ for (var a = i > 1 ? void 0 : i ? we(t, r) : t, f = e.length - 1, m; f >= 0; f--)
119
+ (m = e[f]) && (a = (i ? m(t, r, a) : m(a)) || a);
120
+ return i && a && _e(t, r, a), a;
121
121
  };
122
- let a = class extends B {
122
+ let o = class extends N {
123
123
  constructor() {
124
- super(...arguments), this.localize = new W(this), this.role = "treeitem", this.disabledSyncCheckboxes = !0, this.folderId = "", this.hasChildren = !1, this.selectable = !1, this.fullPath = "", this.docType = P.Story, this.name = "", this.representativeAssetId = "", this.selectedValue = "", this.selection = "single", this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.token = "", this.bearerToken = "", this.baseUrl = "", this.searchTerm = "", this.api = H, this.excludeVirtualFolders = !1, this.url = "", this.icon = "", this.iconName = "", this.iconImageUrl = "", this.iconColor = "", this.isFontIcon = !1, this.data = null, this.hasMore = !1, this.loading = !1;
124
+ super(...arguments), this.localize = new H(this), this.role = "treeitem", this.disabledSyncCheckboxes = !0, this.folderId = "", this.hasChildren = !1, this.selectable = !1, this.fullPath = "", this.docType = P.Story, this.name = "", this.representativeAssetId = "", this.selectedValue = "", this.selection = "single", this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.token = "", this.bearerToken = "", this.baseUrl = "", this.searchTerm = "", this.api = Q, this.excludeVirtualFolders = !1, this.url = "", this.icon = "", this.iconName = "", this.iconImageUrl = "", this.iconColor = "", this.isFontIcon = !1, this.data = null, this.hasMore = !1, this.loading = !1;
125
125
  }
126
126
  /**
127
127
  * This is used to render the cx-tree-item inside the cx-folder-item without the shadow root so that the cx-tree can query select the cx-tree-item inside
@@ -140,7 +140,7 @@ let a = class extends B {
140
140
  totalCount: 0
141
141
  };
142
142
  try {
143
- const { data: r, hasMore: l, totalCount: i } = await this.api({
143
+ const { data: r, hasMore: i, totalCount: a } = await this.api({
144
144
  baseUrl: this.baseUrl,
145
145
  bearerToken: this.bearerToken,
146
146
  excludeVirtualFolders: this.excludeVirtualFolders,
@@ -150,8 +150,8 @@ let a = class extends B {
150
150
  });
151
151
  return {
152
152
  data: r,
153
- hasMore: l,
154
- totalCount: i
153
+ hasMore: i,
154
+ totalCount: a
155
155
  };
156
156
  } catch {
157
157
  return {
@@ -166,11 +166,11 @@ let a = class extends B {
166
166
  const t = this.data?.length || 0;
167
167
  this.loading = !0;
168
168
  try {
169
- const { data: r, hasMore: l } = await this.fetchFolders({
169
+ const { data: r, hasMore: i } = await this.fetchFolders({
170
170
  folderId: this.folderId,
171
171
  start: t
172
172
  });
173
- this.data = [...this.data || [], ...r], this.hasMore = l, this.emit("cx-folder-select-children-loaded", { detail: { folders: r } });
173
+ this.data = [...this.data || [], ...r], this.hasMore = i, this.emit("cx-folder-select-children-loaded", { detail: { folders: r } });
174
174
  } catch {
175
175
  } finally {
176
176
  this.loading = !1;
@@ -180,11 +180,11 @@ let a = class extends B {
180
180
  e.stopPropagation(), this.treeItem.expanded = !0;
181
181
  const t = this.data?.length || 0;
182
182
  try {
183
- const { data: r, hasMore: l } = await this.fetchFolders({
183
+ const { data: r, hasMore: i } = await this.fetchFolders({
184
184
  folderId: this.folderId,
185
185
  start: t
186
186
  });
187
- this.data = r, this.hasMore = l, this.emit("cx-folder-select-children-loaded", { detail: { folders: r } });
187
+ this.data = r, this.hasMore = i, this.emit("cx-folder-select-children-loaded", { detail: { folders: r } });
188
188
  } catch {
189
189
  this.treeItem.expanded = !1;
190
190
  }
@@ -192,21 +192,21 @@ let a = class extends B {
192
192
  async syncBoxes() {
193
193
  if (this.selection !== "multiple" || (await this.updateComplete, !this.treeItem))
194
194
  return;
195
- const e = this.fullPath, t = R({ id: this.folderId, path: e }), r = K(e), l = this.currentRootIDsSet.has(t);
196
- let i = !1;
195
+ const e = this.fullPath, t = V({ id: this.folderId, path: e }), r = X(e), i = this.currentRootIDsSet.has(t);
196
+ let a = !1;
197
197
  if (e)
198
- for (const f of this.currentRootIDsSet) {
199
- const $ = q(f);
200
- if (!$.path.trim() || !$.id.trim())
198
+ for (const m of this.currentRootIDsSet) {
199
+ const p = R(m);
200
+ if (!p.path.trim() || !p.id.trim())
201
201
  continue;
202
- const D = K($.path);
203
- if (D.startsWith(r) && D !== r) {
204
- i = !0;
202
+ const b = X(p.path);
203
+ if (b.startsWith(r) && b !== r) {
204
+ a = !0;
205
205
  break;
206
206
  }
207
207
  }
208
- const u = !l && i;
209
- this.treeItem.selected = l, await this.treeItem.updateComplete, this.treeItem.indeterminate = u;
208
+ const f = !i && a;
209
+ this.treeItem.selected = i, await this.treeItem.updateComplete, this.treeItem.indeterminate = f;
210
210
  }
211
211
  /**
212
212
  * Resolves the icon to render, in priority order:
@@ -219,150 +219,150 @@ let a = class extends B {
219
219
  * 4. Default folder icon, keeping the existing docType-driven variant.
220
220
  */
221
221
  renderIcon() {
222
- const e = ae(
222
+ const e = le(
223
223
  this.iconColor ? { color: this.iconColor } : {}
224
224
  );
225
225
  if (!this.icon && this.isFontIcon === !1 && this.iconImageUrl)
226
- return y`<cx-icon class="folder-select-tree__item__icon" src=${this.iconImageUrl} style=${e}></cx-icon>`;
226
+ return g`<cx-icon class="folder-select-tree__item__icon" src=${this.iconImageUrl} style=${e}></cx-icon>`;
227
227
  if (!this.icon && this.isFontIcon !== !1 && this.iconName)
228
- return y`<cx-icon class="folder-select-tree__item__icon" name=${this.iconName} variant="fa" style=${e}></cx-icon>`;
228
+ return g`<cx-icon class="folder-select-tree__item__icon" name=${this.iconName} variant="fa" style=${e}></cx-icon>`;
229
229
  const t = this.docType === P.Album ? "outlined" : "filled";
230
- return y`<cx-icon class="folder-select-tree__item__icon" name=${this.icon || "folder"} variant=${t}></cx-icon>`;
230
+ return g`<cx-icon class="folder-select-tree__item__icon" name=${this.icon || "folder"} variant=${t}></cx-icon>`;
231
231
  }
232
232
  render() {
233
- return y`<cx-tree-item class=${Ce({
233
+ return g`<cx-tree-item class=${Ce({
234
234
  "folder-select-tree-item": !0
235
- })} data-id=${this.folderId} data-url=${p(this.url)} data-name=${p(this.name?.trim() || void 0)} data-representative-asset-id=${p(
235
+ })} data-id=${this.folderId} data-url=${u(this.url)} data-name=${u(this.name?.trim() || void 0)} data-representative-asset-id=${u(
236
236
  this.representativeAssetId || void 0
237
237
  )} role="option" ?lazy=${this.hasChildren && this.data === null} ?selected=${this.selection === "multiple" ? this.currentRootIDsSet.has(
238
- R({ id: this.folderId, path: this.fullPath })
238
+ V({ id: this.folderId, path: this.fullPath })
239
239
  ) : this.selectedValue === this.folderId} ?disabled-sync-checkboxes=${this.selection === "multiple"} .selectable=${this.selectable} @cx-lazy-load=${this.handleLazyLoad}><cx-space class="folder-select-tree-item__label" direction="horizontal" spacing="x-small" align-items="center" wrap="nowrap">${this.renderIcon()}<cx-line-clamp lines="1" class="folder-select-tree-item__title">${Te(this.name, this.searchTerm)}</cx-line-clamp></cx-space>${G(
240
240
  this.data || [],
241
241
  (e) => e.id,
242
- (e) => y`<cx-folder-select-tree-item slot="children" folder-id=${e.id} full-path=${e.fullPath} name=${e.title} doc-type=${e.docType} icon-name=${p(e.iconName || void 0)} icon-image-url=${p(e.iconImageUrl || void 0)} icon-color=${p(e.iconColor || void 0)} representative-asset-id=${e.representativeAssetId} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?has-children=${e.hasChildren} ?is-font-icon=${e.isFontIcon} ?selectable=${this.selectable} base-url=${this.baseUrl} url=${p(e.url ?? void 0)} .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} value=${e.url}></cx-folder-select-tree-item>`
242
+ (e) => g`<cx-folder-select-tree-item slot="children" folder-id=${e.id} full-path=${e.fullPath} name=${e.title} doc-type=${e.docType} icon-name=${u(e.iconName || void 0)} icon-image-url=${u(e.iconImageUrl || void 0)} icon-color=${u(e.iconColor || void 0)} representative-asset-id=${e.representativeAssetId} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?has-children=${e.hasChildren} ?is-font-icon=${e.isFontIcon} ?selectable=${this.selectable} base-url=${this.baseUrl} url=${u(e.url ?? void 0)} .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} value=${e.url}></cx-folder-select-tree-item>`
243
243
  )}
244
244
  ${k(
245
245
  this.hasMore,
246
- () => y`<div slot="children" class="load-more-button"><cx-button variant="text" @click=${this.loadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button></div>`
246
+ () => g`<div slot="children" class="load-more-button"><cx-button variant="text" @click=${this.loadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button></div>`
247
247
  )}</cx-tree-item>`;
248
248
  }
249
249
  };
250
- a.styles = [se];
251
- a.dependencies = {
252
- "cx-button": le,
253
- "cx-icon": te,
254
- "cx-line-clamp": re,
255
- "cx-space": Fe,
250
+ o.styles = [ie];
251
+ o.dependencies = {
252
+ "cx-button": ae,
253
+ "cx-icon": re,
254
+ "cx-line-clamp": se,
255
+ "cx-space": Se,
256
256
  "cx-tree-item": S
257
257
  };
258
258
  h([
259
- ie("cx-tree-item")
260
- ], a.prototype, "treeItem", 2);
259
+ q("cx-tree-item")
260
+ ], o.prototype, "treeItem", 2);
261
261
  h([
262
262
  s({ attribute: "folder-id", reflect: !0, type: String })
263
- ], a.prototype, "folderId", 2);
263
+ ], o.prototype, "folderId", 2);
264
264
  h([
265
265
  s({ attribute: "has-children", reflect: !0, type: Boolean })
266
- ], a.prototype, "hasChildren", 2);
266
+ ], o.prototype, "hasChildren", 2);
267
267
  h([
268
268
  s({ reflect: !0, type: Boolean })
269
- ], a.prototype, "selectable", 2);
269
+ ], o.prototype, "selectable", 2);
270
270
  h([
271
271
  s({ attribute: "full-path", reflect: !0, type: String })
272
- ], a.prototype, "fullPath", 2);
272
+ ], o.prototype, "fullPath", 2);
273
273
  h([
274
274
  s({ attribute: "doc-type", reflect: !0, type: String })
275
- ], a.prototype, "docType", 2);
275
+ ], o.prototype, "docType", 2);
276
276
  h([
277
277
  s({ reflect: !0, type: String })
278
- ], a.prototype, "name", 2);
278
+ ], o.prototype, "name", 2);
279
279
  h([
280
280
  s({
281
281
  attribute: "representative-asset-id",
282
282
  reflect: !0,
283
283
  type: String
284
284
  })
285
- ], a.prototype, "representativeAssetId", 2);
285
+ ], o.prototype, "representativeAssetId", 2);
286
286
  h([
287
287
  s({ attribute: "selected-value", reflect: !0, type: String })
288
- ], a.prototype, "selectedValue", 2);
288
+ ], o.prototype, "selectedValue", 2);
289
289
  h([
290
290
  s({ attribute: "selection", reflect: !0, type: String })
291
- ], a.prototype, "selection", 2);
291
+ ], o.prototype, "selection", 2);
292
292
  h([
293
293
  s({ attribute: !1, type: Object })
294
- ], a.prototype, "currentRootIDsSet", 2);
294
+ ], o.prototype, "currentRootIDsSet", 2);
295
295
  h([
296
296
  s({ attribute: !1, type: Array })
297
- ], a.prototype, "removedIDs", 2);
297
+ ], o.prototype, "removedIDs", 2);
298
298
  h([
299
299
  s({ reflect: !0, type: String })
300
- ], a.prototype, "token", 2);
300
+ ], o.prototype, "token", 2);
301
301
  h([
302
302
  s({ attribute: "bearer-token", reflect: !0, type: String })
303
- ], a.prototype, "bearerToken", 2);
303
+ ], o.prototype, "bearerToken", 2);
304
304
  h([
305
305
  s({ attribute: "base-url", reflect: !0, type: String })
306
- ], a.prototype, "baseUrl", 2);
306
+ ], o.prototype, "baseUrl", 2);
307
307
  h([
308
308
  s({ attribute: "search-term", reflect: !0, type: String })
309
- ], a.prototype, "searchTerm", 2);
309
+ ], o.prototype, "searchTerm", 2);
310
310
  h([
311
311
  s({ type: Function })
312
- ], a.prototype, "api", 2);
312
+ ], o.prototype, "api", 2);
313
313
  h([
314
314
  s({
315
315
  attribute: "exclude-virtual-folders",
316
316
  reflect: !0,
317
317
  type: Boolean
318
318
  })
319
- ], a.prototype, "excludeVirtualFolders", 2);
319
+ ], o.prototype, "excludeVirtualFolders", 2);
320
320
  h([
321
321
  s({ reflect: !0, type: String })
322
- ], a.prototype, "url", 2);
322
+ ], o.prototype, "url", 2);
323
323
  h([
324
324
  s({ reflect: !0, type: String })
325
- ], a.prototype, "icon", 2);
325
+ ], o.prototype, "icon", 2);
326
326
  h([
327
327
  s({ attribute: "icon-name", reflect: !0, type: String })
328
- ], a.prototype, "iconName", 2);
328
+ ], o.prototype, "iconName", 2);
329
329
  h([
330
330
  s({ attribute: "icon-image-url", reflect: !0, type: String })
331
- ], a.prototype, "iconImageUrl", 2);
331
+ ], o.prototype, "iconImageUrl", 2);
332
332
  h([
333
333
  s({ attribute: "icon-color", reflect: !0, type: String })
334
- ], a.prototype, "iconColor", 2);
334
+ ], o.prototype, "iconColor", 2);
335
335
  h([
336
336
  s({ attribute: "is-font-icon", reflect: !0, type: Boolean })
337
- ], a.prototype, "isFontIcon", 2);
337
+ ], o.prototype, "isFontIcon", 2);
338
338
  h([
339
- g()
340
- ], a.prototype, "data", 2);
339
+ x()
340
+ ], o.prototype, "data", 2);
341
341
  h([
342
- g()
343
- ], a.prototype, "hasMore", 2);
342
+ x()
343
+ ], o.prototype, "hasMore", 2);
344
344
  h([
345
- g()
346
- ], a.prototype, "loading", 2);
345
+ x()
346
+ ], o.prototype, "loading", 2);
347
347
  h([
348
- m("currentRootIDsSet"),
349
- m("removedIDs"),
350
- m("fullPath"),
351
- m("folderId")
352
- ], a.prototype, "syncBoxes", 1);
353
- a = h([
354
- N("cx-folder-select-tree-item")
355
- ], a);
356
- var ke = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, ne = (e) => {
348
+ y("currentRootIDsSet", { waitUntilFirstUpdate: !0 }),
349
+ y("removedIDs", { waitUntilFirstUpdate: !0 }),
350
+ y("fullPath", { waitUntilFirstUpdate: !0 }),
351
+ y("folderId", { waitUntilFirstUpdate: !0 })
352
+ ], o.prototype, "syncBoxes", 1);
353
+ o = h([
354
+ W("cx-folder-select-tree-item")
355
+ ], o);
356
+ var ke = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, ne = (e) => {
357
357
  throw TypeError(e);
358
- }, d = (e, t, r, l) => {
359
- for (var i = l > 1 ? void 0 : l ? Ve(t, r) : t, u = e.length - 1, f; u >= 0; u--)
360
- (f = e[u]) && (i = (l ? f(t, r, i) : f(i)) || i);
361
- return l && i && ke(t, r, i), i;
362
- }, ce = (e, t, r) => t.has(e) || ne("Cannot " + r), v = (e, t, r) => (ce(e, t, "read from private field"), t.get(e)), A = (e, t, r) => t.has(e) ? ne("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), X = (e, t, r, l) => (ce(e, t, "write to private field"), t.set(e, r), r), _, V, T;
363
- let n = class extends B {
358
+ }, d = (e, t, r, i) => {
359
+ for (var a = i > 1 ? void 0 : i ? Ue(t, r) : t, f = e.length - 1, m; f >= 0; f--)
360
+ (m = e[f]) && (a = (i ? m(t, r, a) : m(a)) || a);
361
+ return i && a && ke(t, r, a), a;
362
+ }, ce = (e, t, r) => t.has(e) || ne("Cannot " + r), I = (e, t, r) => (ce(e, t, "read from private field"), t.get(e)), B = (e, t, r) => t.has(e) ? ne("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Y = (e, t, r, i) => (ce(e, t, "write to private field"), t.set(e, r), r), _, U, C;
363
+ let n = class extends N {
364
364
  constructor() {
365
- super(...arguments), this.localize = new W(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.allowedFolders = [], this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.seeThru = !1, this.extraFolderData = null, this.api = H, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.autoPageSize = !1, this.data = [], this.hasMore = !1, this.loading = !1, this.preloading = !1, this.preloadedFolders = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], A(this, _, !1), A(this, V, 10), A(this, T, /* @__PURE__ */ new Set());
365
+ super(...arguments), this.localize = new H(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.allowedFolders = [], this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.seeThru = !1, this.extraFolderData = null, this.api = Q, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.autoPageSize = !1, this.data = [], this.hasMore = !1, this.loading = !1, this.preloading = !1, this.preloadedFolders = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], B(this, _, !1), B(this, U, 10), B(this, C, /* @__PURE__ */ new Set());
366
366
  }
367
367
  get empty() {
368
368
  return !this.loading && this.data.length === 0;
@@ -379,13 +379,13 @@ let n = class extends B {
379
379
  for (; r; ) {
380
380
  if (r instanceof HTMLElement && r.offsetHeight > 0)
381
381
  return Math.max(10, Math.ceil(r.offsetHeight / 32) + 2);
382
- const l = r.getRootNode();
383
- r = l instanceof ShadowRoot ? l.host : r.parentElement;
382
+ const i = r.getRootNode();
383
+ r = i instanceof ShadowRoot ? i.host : r.parentElement;
384
384
  }
385
385
  return 10;
386
386
  }
387
387
  runFirstUpdated() {
388
- this.searchTerm = "", this.autoPageSize && X(this, V, this.computeInitialLimit()), this.handleFetchFolders();
388
+ this.searchTerm = "", this.autoPageSize && Y(this, U, this.computeInitialLimit()), this.handleFetchFolders();
389
389
  }
390
390
  handleLoadingStateChange() {
391
391
  this.emit("cx-folder-select-loading-change", {
@@ -427,13 +427,13 @@ let n = class extends B {
427
427
  async handleSelectedChange(e) {
428
428
  if (this.selection !== "multiple")
429
429
  return;
430
- const t = e.target, r = t.dataset.id ?? "", l = t.closest(
430
+ const t = e.target, r = t.dataset.id ?? "", i = t.closest(
431
431
  "cx-folder-select-tree-item"
432
432
  )?.fullPath;
433
- if (await t.updateComplete, !r.trim() || !l?.trim())
433
+ if (await t.updateComplete, !r.trim() || !i?.trim())
434
434
  return;
435
- const i = R({ id: r, path: l });
436
- t.indeterminate && !t.selected || (t.selected ? this.currentRootIDsSet.add(i) : this.currentRootIDsSet.delete(i), this.currentRootIDsSet = new Set(this.currentRootIDsSet));
435
+ const a = V({ id: r, path: i });
436
+ t.indeterminate && !t.selected || (t.selected ? this.currentRootIDsSet.add(a) : this.currentRootIDsSet.delete(a), this.currentRootIDsSet = new Set(this.currentRootIDsSet));
437
437
  }
438
438
  async loadMore(e) {
439
439
  if (!this.api)
@@ -441,7 +441,7 @@ let n = class extends B {
441
441
  e.stopPropagation();
442
442
  const t = this.data.length;
443
443
  this.loading = !0;
444
- const { data: r, hasMore: l } = await this.api({
444
+ const { data: r, hasMore: i } = await this.api({
445
445
  allowedFolders: this.allowedFolders,
446
446
  baseUrl: this.baseUrl,
447
447
  bearerToken: this.bearerToken,
@@ -453,14 +453,18 @@ let n = class extends B {
453
453
  start: t,
454
454
  token: this.token
455
455
  });
456
- this.data = [...this.data, ...r], this.hasMore = l, this.loading = !1, this.seedSelectionFromValue(r), this.removePreloadedFolders(r);
456
+ this.data = [...this.data, ...r], this.hasMore = i, this.loading = !1, this.seedSelectionFromValue(r), this.removePreloadedFolders(r);
457
457
  }
458
458
  async handleFetchFolders() {
459
459
  const { data: e, hasMore: t } = await this.fetchFolders();
460
- v(this, _) || (e.length > 0 && this.firstFetchCallback?.(e), X(this, _, !0)), this.data = e, this.hasMore = t, this.loading = !1, this.seedSelectionFromValue(e), this.removePreloadedFolders(e), await this.preloadSelectedFolders();
460
+ I(this, _) || (e.length > 0 && this.firstFetchCallback?.(e), Y(this, _, !0));
461
+ const r = this.seedSelectionFromValue(e, !0);
462
+ this.removePreloadedFolders(e);
463
+ const i = await this.preloadSelectedFolders();
464
+ r && !i && this.emit("cx-folder-select-selection-seeded"), this.data = e, this.hasMore = t, this.loading = !1;
461
465
  }
462
466
  async handleSelectedValueChange() {
463
- if (!v(this, _))
467
+ if (!I(this, _))
464
468
  return;
465
469
  const e = new Set(
466
470
  this.selectedValue.split(/[\s,]+/).filter(Boolean)
@@ -476,7 +480,7 @@ let n = class extends B {
476
480
  removeDeselectedRootIDs(e) {
477
481
  const t = new Set(
478
482
  [...this.currentRootIDsSet].filter(
479
- (r) => e.has(q(r).id)
483
+ (r) => e.has(R(r).id)
480
484
  )
481
485
  );
482
486
  t.size !== this.currentRootIDsSet.size && (this.currentRootIDsSet = t);
@@ -499,13 +503,13 @@ let n = class extends B {
499
503
  bearerToken: this.bearerToken,
500
504
  excludeVirtualFolders: this.excludeVirtualFolders,
501
505
  folderId: "",
502
- limit: v(this, V),
506
+ limit: I(this, U),
503
507
  searchTerm: this.searchTerm,
504
508
  seeThru: this.seeThru,
505
509
  start: 0,
506
510
  token: this.token
507
511
  });
508
- return this.data = e, this.hasMore = t, this.loading = !1, {
512
+ return {
509
513
  data: e,
510
514
  hasMore: t
511
515
  };
@@ -516,39 +520,41 @@ let n = class extends B {
516
520
  removePreloadedFolders(e) {
517
521
  if (this.preloadedFolders.length === 0)
518
522
  return;
519
- const t = new Set(e.map((l) => l.id)), r = this.preloadedFolders.filter((l) => !t.has(l.id));
523
+ const t = new Set(e.map((i) => i.id)), r = this.preloadedFolders.filter((i) => !t.has(i.id));
520
524
  r.length !== this.preloadedFolders.length && (this.preloadedFolders = r);
521
525
  }
526
+ /**
527
+ * @returns Whether this call added any new key to `currentRootIDsSet`
528
+ * (and therefore already emitted `cx-folder-select-selection-seeded` via
529
+ * `seedSelectionFromValue`). Callers that suppressed an earlier seed's
530
+ * emit (e.g. `handleFetchFolders` seeding root folders first) use this to
531
+ * know whether they still need to emit themselves.
532
+ */
522
533
  async preloadSelectedFolders() {
523
534
  if (this.selection !== "multiple" || !this.selectedValue || !this.api)
524
- return;
535
+ return !1;
525
536
  const e = new Set(
526
537
  this.selectedValue.split(/[\s,]+/).filter(Boolean)
527
- ), t = /* @__PURE__ */ new Set([
528
- ...this.data.map((i) => i.id),
529
- ...this.extraFolderData ? [this.extraFolderData.id] : [],
530
- ...this.preloadedFolders.map((i) => i.id),
531
- ...v(this, T),
532
- ...[
533
- ...this.querySelectorAll(
534
- "cx-folder-select-tree-item"
535
- )
536
- ].map((i) => i.getAttribute("folder-id") ?? "").filter(Boolean)
537
- ]), r = [...e].filter(
538
- (i) => !t.has(i)
538
+ ), t = new Set(
539
+ [...this.currentRootIDsSet].map((p) => R(p).id)
540
+ ), r = /* @__PURE__ */ new Set([
541
+ ...t,
542
+ ...I(this, C)
543
+ ]), i = [...e].filter(
544
+ (p) => !r.has(p)
539
545
  );
540
- if (r.length === 0)
541
- return;
542
- r.forEach((i) => v(this, T).add(i)), this.preloading = !0;
543
- const l = [];
546
+ if (i.length === 0)
547
+ return !1;
548
+ i.forEach((p) => I(this, C).add(p)), this.preloading = !0;
549
+ const a = [];
544
550
  if (await Promise.all(
545
- r.map(async (i) => {
551
+ i.map(async (p) => {
546
552
  try {
547
- const { data: u } = await this.api({
553
+ const { data: b } = await this.api({
548
554
  baseUrl: this.baseUrl,
549
555
  bearerToken: this.bearerToken,
550
556
  excludeVirtualFolders: this.excludeVirtualFolders,
551
- folderId: i,
557
+ folderId: p,
552
558
  includeDirectChild: !1,
553
559
  limit: 1,
554
560
  searchTerm: "",
@@ -557,44 +563,53 @@ let n = class extends B {
557
563
  start: 0,
558
564
  token: this.token
559
565
  });
560
- u[0] && l.push(u[0]);
566
+ b[0] && a.push(b[0]);
561
567
  } catch {
562
568
  }
563
569
  })
564
- ), r.forEach((i) => v(this, T).delete(i)), this.preloading = v(this, T).size > 0, l.length > 0) {
565
- const i = new Set(this.preloadedFolders.map((f) => f.id)), u = l.filter((f) => !i.has(f.id));
566
- u.length > 0 && (this.preloadedFolders = [...this.preloadedFolders, ...u].sort(
567
- (f, $) => f.title.localeCompare($.title)
568
- ), this.seedSelectionFromValue(u));
569
- }
570
+ ), i.forEach((p) => I(this, C).delete(p)), this.preloading = I(this, C).size > 0, a.length === 0)
571
+ return !1;
572
+ const f = new Set(this.preloadedFolders.map((p) => p.id)), m = a.filter((p) => !f.has(p.id));
573
+ return m.length === 0 ? !1 : (this.preloadedFolders = [...this.preloadedFolders, ...m].sort(
574
+ (p, b) => p.title.localeCompare(b.title)
575
+ ), this.seedSelectionFromValue(m));
570
576
  }
571
- seedSelectionFromValue(e) {
577
+ /**
578
+ * @param suppressEmit Skip the `cx-folder-select-selection-seeded` emit
579
+ * even if this call adds keys. Used when the caller is about to seed more
580
+ * (e.g. `handleFetchFolders` seeding root folders right before awaiting
581
+ * `preloadSelectedFolders`) so the host never re-syncs its `value` from a
582
+ * `currentRootIDsSet` that is still missing folders the caller already
583
+ * knows are coming — that partial snapshot would otherwise overwrite
584
+ * `cx-folder-select.value` and permanently drop the not-yet-seeded ids.
585
+ */
586
+ seedSelectionFromValue(e, t = !1) {
572
587
  if (this.selection !== "multiple" || !this.selectedValue)
573
- return;
574
- const t = new Set(
575
- this.selectedValue.split(/[\s,]+/).map((l) => l.trim()).filter(Boolean)
588
+ return !1;
589
+ const r = new Set(
590
+ this.selectedValue.split(/[\s,]+/).map((a) => a.trim()).filter(Boolean)
576
591
  );
577
- let r = !1;
578
- for (const l of e)
579
- if (l.fullPath && t.has(l.id)) {
580
- const i = R({ id: l.id, path: l.fullPath });
581
- this.currentRootIDsSet.has(i) || (this.currentRootIDsSet.add(i), r = !0);
592
+ let i = !1;
593
+ for (const a of e)
594
+ if (a.fullPath && r.has(a.id)) {
595
+ const f = V({ id: a.id, path: a.fullPath });
596
+ this.currentRootIDsSet.has(f) || (this.currentRootIDsSet.add(f), i = !0);
582
597
  }
583
- r && (this.currentRootIDsSet = new Set(this.currentRootIDsSet), this.emit("cx-folder-select-selection-seeded"));
598
+ return i ? (this.currentRootIDsSet = new Set(this.currentRootIDsSet), t || this.emit("cx-folder-select-selection-seeded"), !0) : !1;
584
599
  }
585
600
  renderFolder(e) {
586
- return y`<cx-folder-select-tree-item .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${e.docType} folder-id=${e.id} full-path=${p(e.fullPath ?? void 0)} icon-name=${p(e.iconName || void 0)} icon-image-url=${p(e.iconImageUrl || void 0)} icon-color=${p(e.iconColor || void 0)} name=${e.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${p(e.url ?? void 0)} ?has-children=${e.hasChildren} ?is-font-icon=${e.isFontIcon} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`;
601
+ return g`<cx-folder-select-tree-item .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${e.docType} folder-id=${e.id} full-path=${u(e.fullPath ?? void 0)} icon-name=${u(e.iconName || void 0)} icon-image-url=${u(e.iconImageUrl || void 0)} icon-color=${u(e.iconColor || void 0)} name=${e.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${u(e.url ?? void 0)} ?has-children=${e.hasChildren} ?is-font-icon=${e.isFontIcon} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`;
587
602
  }
588
603
  render() {
589
- return y`<cx-tree class="folder-select-tree" selection=${this.selection} force-on-change disabled-auto-expand disabled-sync-checkboxes @cx-selected-change=${this.handleSelectedChange} @cx-folder-select-children-loaded=${this.handleChildrenLoaded}>${k(
604
+ return g`<cx-tree class="folder-select-tree" selection=${this.selection} force-on-change disabled-auto-expand disabled-sync-checkboxes @cx-selected-change=${this.handleSelectedChange} @cx-folder-select-children-loaded=${this.handleChildrenLoaded}>${k(
590
605
  this.empty,
591
- () => y`<div class="folder-select-tree__empty-message" role="status" aria-live="polite"><cx-typography variant="body3">${this.localize.term("noResults")}</cx-typography></div>`
606
+ () => g`<div class="folder-select-tree__empty-message" role="status" aria-live="polite"><cx-typography variant="body3">${this.localize.term("noResults")}</cx-typography></div>`
592
607
  )}
593
608
  ${k(
594
609
  this.extraFolderData,
595
- () => y`<cx-folder-select-tree-item .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${p(this.extraFolderData?.docType ?? void 0)} folder-id=${p(this.extraFolderData?.id ?? void 0)} full-path=${p(this.extraFolderData?.fullPath ?? void 0)} icon=${this.extraFolderIcon} icon-name=${p(this.extraFolderData?.iconName || void 0)} icon-image-url=${p(
610
+ () => g`<cx-folder-select-tree-item .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${u(this.extraFolderData?.docType ?? void 0)} folder-id=${u(this.extraFolderData?.id ?? void 0)} full-path=${u(this.extraFolderData?.fullPath ?? void 0)} icon=${this.extraFolderIcon} icon-name=${u(this.extraFolderData?.iconName || void 0)} icon-image-url=${u(
596
611
  this.extraFolderData?.iconImageUrl || void 0
597
- )} icon-color=${p(this.extraFolderData?.iconColor || void 0)} name=${this.extraFolderTitle || this.extraFolderData?.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${p(this.extraFolderData?.url ?? void 0)} ?has-children=${this.extraFolderData?.hasChildren} ?is-font-icon=${this.extraFolderData?.isFontIcon} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`
612
+ )} icon-color=${u(this.extraFolderData?.iconColor || void 0)} name=${this.extraFolderTitle || this.extraFolderData?.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${u(this.extraFolderData?.url ?? void 0)} ?has-children=${this.extraFolderData?.hasChildren} ?is-font-icon=${this.extraFolderData?.isFontIcon} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`
598
613
  )}
599
614
  ${G(
600
615
  this.data,
@@ -603,20 +618,21 @@ let n = class extends B {
603
618
  )}
604
619
  ${k(
605
620
  this.hasMore,
606
- () => y`<cx-button class="folder-select-tree__load-more" variant="text" @click=${this.loadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button>`
607
- )}</cx-tree>${G(
621
+ () => g`<cx-button class="folder-select-tree__load-more" variant="text" @click=${this.loadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button>`
622
+ )}
623
+ ${G(
608
624
  this.preloadedFolders,
609
625
  (e) => `preloaded-${e.id}`,
610
- (e) => y`<cx-folder-select-tree-item style=${ae({ display: "none" })} .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${e.docType} folder-id=${e.id} full-path=${p(e.fullPath ?? void 0)} icon-name=${p(e.iconName || void 0)} icon-image-url=${p(e.iconImageUrl || void 0)} icon-color=${p(e.iconColor || void 0)} name=${e.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${p(e.url ?? void 0)} ?has-children=${!1} ?is-font-icon=${e.isFontIcon} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`
611
- )}`;
626
+ (e) => g`<cx-folder-select-tree-item style=${le({ display: "none" })} .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${e.docType} folder-id=${e.id} full-path=${u(e.fullPath ?? void 0)} icon-name=${u(e.iconName || void 0)} icon-image-url=${u(e.iconImageUrl || void 0)} icon-color=${u(e.iconColor || void 0)} name=${e.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${u(e.url ?? void 0)} ?has-children=${!1} ?is-font-icon=${e.isFontIcon} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`
627
+ )}</cx-tree>`;
612
628
  }
613
629
  };
614
630
  _ = /* @__PURE__ */ new WeakMap();
615
- V = /* @__PURE__ */ new WeakMap();
616
- T = /* @__PURE__ */ new WeakMap();
631
+ U = /* @__PURE__ */ new WeakMap();
632
+ C = /* @__PURE__ */ new WeakMap();
617
633
  n.dependencies = {
618
- "cx-button": le,
619
- "cx-folder-select-tree-item": a,
634
+ "cx-button": ae,
635
+ "cx-folder-select-tree-item": o,
620
636
  "cx-tree": xe
621
637
  };
622
638
  d([
@@ -656,7 +672,7 @@ d([
656
672
  s({ attribute: "see-thru", reflect: !0, type: Boolean })
657
673
  ], n.prototype, "seeThru", 2);
658
674
  d([
659
- g()
675
+ x()
660
676
  ], n.prototype, "extraFolderData", 2);
661
677
  d([
662
678
  s({ type: Function })
@@ -675,65 +691,65 @@ d([
675
691
  s({ attribute: "auto-page-size", reflect: !0, type: Boolean })
676
692
  ], n.prototype, "autoPageSize", 2);
677
693
  d([
678
- g()
694
+ x()
679
695
  ], n.prototype, "data", 2);
680
696
  d([
681
- g()
697
+ x()
682
698
  ], n.prototype, "hasMore", 2);
683
699
  d([
684
- g()
700
+ x()
685
701
  ], n.prototype, "loading", 2);
686
702
  d([
687
- g()
703
+ x()
688
704
  ], n.prototype, "preloading", 2);
689
705
  d([
690
- g()
706
+ x()
691
707
  ], n.prototype, "preloadedFolders", 2);
692
708
  d([
693
- g()
709
+ x()
694
710
  ], n.prototype, "currentRootIDsSet", 2);
695
711
  d([
696
- g()
712
+ x()
697
713
  ], n.prototype, "removedIDs", 2);
698
714
  d([
699
- m("loading", { waitUntilFirstUpdate: !0 }),
700
- m("preloading")
715
+ y("loading", { waitUntilFirstUpdate: !0 }),
716
+ y("preloading")
701
717
  ], n.prototype, "handleLoadingStateChange", 1);
702
718
  d([
703
- m("extraFolderId")
719
+ y("extraFolderId")
704
720
  ], n.prototype, "handleExtraFolderIdChange", 1);
705
721
  d([
706
- m("allowedFolders", { waitUntilFirstUpdate: !0 }),
707
- m("baseUrl", { waitUntilFirstUpdate: !0 }),
708
- m("token", { waitUntilFirstUpdate: !0 }),
709
- m("searchTerm", { waitUntilFirstUpdate: !0 }),
710
- m("excludeVirtualFolders", { waitUntilFirstUpdate: !0 }),
711
- Ie(500)
722
+ y("allowedFolders", { waitUntilFirstUpdate: !0 }),
723
+ y("baseUrl", { waitUntilFirstUpdate: !0 }),
724
+ y("token", { waitUntilFirstUpdate: !0 }),
725
+ y("searchTerm", { waitUntilFirstUpdate: !0 }),
726
+ y("excludeVirtualFolders", { waitUntilFirstUpdate: !0 }),
727
+ Fe(500)
712
728
  ], n.prototype, "handleFetchFolders", 1);
713
729
  d([
714
- m("selectedValue", { waitUntilFirstUpdate: !0 })
730
+ y("selectedValue", { waitUntilFirstUpdate: !0 })
715
731
  ], n.prototype, "handleSelectedValueChange", 1);
716
732
  n = d([
717
- N("cx-folder-select-tree")
733
+ W("cx-folder-select-tree")
718
734
  ], n);
719
735
  const Pe = ve`:host{flex-direction:column;width:100%;height:100%;min-height:0;max-height:100%;display:flex}.folder-select{gap:var(--cx-spacing-x-small);flex-direction:column;flex:1;width:100%;min-height:0;display:flex}.folder-select__search{flex-shrink:0}.folder-select__tree{flex-direction:column;flex:1;min-height:0;display:flex}.folder-select-tree{flex:1;min-height:0;overflow:auto}.folder-select-tree__item__icon{color:var(--cx-color-primary)}.folder-select-tree__empty-message{font-size:var(--cx-font-size-small);color:var(--cx-color-neutral-500);padding-block:var(--cx-spacing-2x-small);padding-inline:var(--cx-spacing-small);text-align:center;cursor:default;user-select:none}.folder-select-tree__load-more{margin-inline:var(--cx-spacing-small)}.folder-select-tree-item::part(label),.folder-select-tree-item__label,.folder-select-tree-item__title{overflow:hidden}`;
720
- var Re = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, he = (e) => {
736
+ var Ve = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, he = (e) => {
721
737
  throw TypeError(e);
722
- }, c = (e, t, r, l) => {
723
- for (var i = l > 1 ? void 0 : l ? Ue(t, r) : t, u = e.length - 1, f; u >= 0; u--)
724
- (f = e[u]) && (i = (l ? f(t, r, i) : f(i)) || i);
725
- return l && i && Re(t, r, i), i;
726
- }, de = (e, t, r) => t.has(e) || he("Cannot " + r), Y = (e, t, r) => (de(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ee = (e, t, r) => t.has(e) ? he("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ee = (e, t, r, l) => (de(e, t, "write to private field"), t.set(e, r), r), C;
727
- let o = class extends B {
738
+ }, c = (e, t, r, i) => {
739
+ for (var a = i > 1 ? void 0 : i ? Re(t, r) : t, f = e.length - 1, m; f >= 0; f--)
740
+ (m = e[f]) && (a = (i ? m(t, r, a) : m(a)) || a);
741
+ return i && a && Ve(t, r, a), a;
742
+ }, de = (e, t, r) => t.has(e) || he("Cannot " + r), ee = (e, t, r) => (de(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ee = (e, t, r) => t.has(e) ? he("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), te = (e, t, r, i) => (de(e, t, "write to private field"), t.set(e, r), r), D;
743
+ let l = class extends N {
728
744
  constructor() {
729
- super(), this.localize = new W(this), this.minQueryLength = 1, this.selection = "single", this.variant = F.Input, this.value = "", this.name = "", this.selectedLabel = "", this.baseUrl = "", this.allowedFolders = [], this.open = !1, this.token = "", this.bearerToken = "", this.seeThru = !1, this.api = H, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.autoPageSize = !1, this.firstFetchCallback = null, this.searchTerm = "", this.treeLoading = !1, Ee(this, C), this.selectGetOptionValue = this.selectGetOptionValue.bind(this), this.selectGetOptionLabel = this.selectGetOptionLabel.bind(this), this.selectGetOptionSelected = this.selectGetOptionSelected.bind(this), this.selectFilterCallback = this.selectFilterCallback.bind(this), this.selectSetOptionSelected = this.selectSetOptionSelected.bind(this), this.selectGetTag = this.selectGetTag.bind(this), this.updateWrappedApi();
745
+ super(), this.localize = new H(this), this.minQueryLength = 1, this.selection = "single", this.variant = T.Input, this.value = "", this.name = "", this.selectedLabel = "", this.baseUrl = "", this.allowedFolders = [], this.open = !1, this.token = "", this.bearerToken = "", this.seeThru = !1, this.api = Q, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.autoPageSize = !1, this.firstFetchCallback = null, this.searchTerm = "", this.treeLoading = !1, Ee(this, D), this.selectGetOptionValue = this.selectGetOptionValue.bind(this), this.selectGetOptionLabel = this.selectGetOptionLabel.bind(this), this.selectGetOptionSelected = this.selectGetOptionSelected.bind(this), this.selectFilterCallback = this.selectFilterCallback.bind(this), this.selectGetTag = this.selectGetTag.bind(this), this.updateWrappedApi();
730
746
  }
731
747
  updateWrappedApi() {
732
748
  if (!this.api) {
733
- ee(this, C, void 0);
749
+ te(this, D, void 0);
734
750
  return;
735
751
  }
736
- ee(this, C, async (e) => {
752
+ te(this, D, async (e) => {
737
753
  try {
738
754
  return await this.api(e);
739
755
  } catch (t) {
@@ -771,13 +787,28 @@ let o = class extends B {
771
787
  * (see the same clear in cx-select's filterOptionsByInput()).
772
788
  */
773
789
  async handleTreeChildrenLoaded() {
774
- this.variant !== F.Select || !this.selectEl || (await this.selectEl.updateComplete, this.selectEl.popup.style.removeProperty("--auto-size-available-width"), this.selectEl.popup.style.removeProperty("--auto-size-available-height"), this.selectEl.popup.reposition());
790
+ this.variant !== T.Select || !this.selectEl || (await this.selectEl.updateComplete, this.selectEl.popup.style.removeProperty("--auto-size-available-width"), this.selectEl.popup.style.removeProperty("--auto-size-available-height"), this.selectEl.popup.reposition());
775
791
  }
776
792
  handleSelectClear() {
777
- if (this.searchTerm = "", this.selection !== "multiple")
778
- return;
779
- const e = this.shadowRoot?.querySelector("cx-folder-select-tree");
780
- e && (e.currentRootIDsSet = /* @__PURE__ */ new Set(), e.removedIDs = []), this.value = "";
793
+ this.searchTerm = "", this.selection === "multiple" && (this.treeEl && (this.treeEl.currentRootIDsSet = /* @__PURE__ */ new Set(), this.treeEl.removedIDs = []), this.value = "");
794
+ }
795
+ /**
796
+ * `cx-tree` only emits `cx-selection-change` from its own click-driven
797
+ * `selectItem()` — setting `option.selected` directly (as the tag's X
798
+ * button does in `selectGetTag`) bypasses that method entirely, so
799
+ * `cx-tree` never emits it for a tag removal. Consumers like
800
+ * `cx-folder-picker` listen for `cx-selection-change` (not our internal
801
+ * `cx-selected-change`/`value`) to know when to re-emit their own public
802
+ * change event, so removing a tag would otherwise never reach them.
803
+ * Emit it ourselves here, mirroring `cx-tree`'s own event shape.
804
+ */
805
+ async emitSelectionChangeFromTree() {
806
+ const e = this.treeEl?.querySelector("cx-tree");
807
+ e && (await e.updateComplete, this.emit("cx-selection-change", {
808
+ detail: {
809
+ selection: e.selectedItems
810
+ }
811
+ }));
781
812
  }
782
813
  /**
783
814
  * cx-folder-select-tree owns `currentRootIDsSet` (the real source of
@@ -788,8 +819,7 @@ let o = class extends B {
788
819
  * reports a selection change.
789
820
  */
790
821
  syncValueFromTree() {
791
- const e = this.shadowRoot?.querySelector("cx-folder-select-tree");
792
- e && (this.value = [...e.currentRootIDsSet].map((t) => q(t).id).filter(Boolean).join(" "));
822
+ this.treeEl && (this.value = [...this.treeEl.currentRootIDsSet].map((e) => R(e).id).filter(Boolean).join(" "));
793
823
  }
794
824
  /**
795
825
  * cx-select's own `value` only reflects our `value` correctly the very
@@ -809,8 +839,9 @@ let o = class extends B {
809
839
  /**
810
840
  * cx-select's selectedOptions cache (which drives the tag UI in
811
841
  * `multiple` mode) is only recomputed during its own `selectionChanged`
812
- * flow — that flow doesn't run in our setup because we no-op
813
- * `selectSetOptionSelected` for multi-select (cx-tree owns selection).
842
+ * flow — that flow doesn't run for us because cx-select's default
843
+ * `setOptionSelected` only acts on `CxOption`, not our `CxTreeItem`
844
+ * options (cx-tree owns selection instead).
814
845
  * Re-read options here so the rendered tag list matches, in response to
815
846
  * either signal cx-folder-select-tree can emit:
816
847
  * - `cx-selected-change`, bubbled from a user toggling a tree-item.
@@ -846,30 +877,22 @@ let o = class extends B {
846
877
  * default tag, but the X click goes through cx-tree's selection flow
847
878
  * (`option.selected = false` → `cx-selected-change` →
848
879
  * cx-folder-select-tree.handleSelectedChange) rather than
849
- * cx-select.toggleOptionSelection (which our `selectSetOptionSelected`
850
- * no-ops in multi mode, so the default X click would do nothing).
880
+ * cx-select.toggleOptionSelection (whose `setOptionSelected` only acts on
881
+ * `CxOption`, so the default X click would do nothing for our
882
+ * `CxTreeItem` options).
851
883
  */
852
884
  selectGetTag(e) {
853
- return y`<cx-tag part="tag" exportparts="
885
+ return g`<cx-tag part="tag" exportparts="
854
886
  base:tag__base,
855
887
  content:tag__content,
856
888
  remove-button:tag__remove-button,
857
889
  remove-button__base:tag__remove-button__base
858
890
  " removable @cx-remove=${(r) => {
859
- r.stopPropagation(), e instanceof S && (e.selected = !1);
891
+ r.stopPropagation(), e instanceof S && (e.selected = !1, this.emitSelectionChangeFromTree());
860
892
  }}><cx-line-clamp lines="1">${this.selectGetOptionLabel(e)}</cx-line-clamp></cx-tag>`;
861
893
  }
862
- selectSetOptionSelected(e, t) {
863
- if (!(!e || !(e instanceof S)) && this.selection !== "multiple") {
864
- if (t === void 0) {
865
- e.selected = !e.selected;
866
- return;
867
- }
868
- e.selected = t;
869
- }
870
- }
871
894
  updateFunctionProps() {
872
- this.selectEl && (this.selectEl.getOptionValue = this.selectGetOptionValue, this.selectEl.getOptionLabel = this.selectGetOptionLabel, this.selectEl.getOptionSelected = this.selectGetOptionSelected, this.selectEl.filterCallback = this.selectFilterCallback, this.selectEl.setOptionSelected = this.selectSetOptionSelected, this.selectEl.getTag = this.selectGetTag, this.syncSelectValue(), this.selectEl.handleDefaultSlotChange());
895
+ this.selectEl && (this.selectEl.getOptionValue = this.selectGetOptionValue, this.selectEl.getOptionLabel = this.selectGetOptionLabel, this.selectEl.getOptionSelected = this.selectGetOptionSelected, this.selectEl.filterCallback = this.selectFilterCallback, this.selectEl.getTag = this.selectGetTag, this.syncSelectValue(), this.selectEl.handleDefaultSlotChange());
873
896
  }
874
897
  handleOpenChange() {
875
898
  if (this.selectEl) {
@@ -881,144 +904,147 @@ let o = class extends B {
881
904
  }
882
905
  }
883
906
  async handleVariantChange() {
884
- this.variant === F.Select && (await this.updateComplete, this.updateFunctionProps());
907
+ this.variant === T.Select && (await this.updateComplete, this.updateFunctionProps());
885
908
  }
886
909
  handleValueChange() {
887
- this.selectEl && (this.searchTerm = "", this.selectEl.getOptionValue = this.selectGetOptionValue, this.selectEl.getOptionLabel = this.selectGetOptionLabel, this.selectEl.getOptionSelected = this.selectGetOptionSelected, this.selectEl.filterCallback = this.selectFilterCallback, this.selectEl.setOptionSelected = this.selectSetOptionSelected, this.selectEl.getTag = this.selectGetTag, this.syncSelectValue(), this.selectEl.handleDefaultSlotChange());
910
+ this.selectEl && (this.searchTerm = "", this.updateFunctionProps());
888
911
  }
889
912
  render() {
890
- return y`<div class="folder-select">${Se(this.variant, [
913
+ return g`<div class="folder-select">${Ie(this.variant, [
891
914
  [
892
- F.Input,
893
- () => y`<cx-input class="folder-select__search" aria-label=${this.localize.term("searchFolders")} placeholder=${`${this.localize.term("searchFolders")}...`} value=${this.searchTerm} clearable @cx-input=${this.handleSearchTermInputChange}><cx-icon name="search" slot="prefix"></cx-icon></cx-input><cx-folder-select-tree class="folder-select__tree" base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .allowedFolders=${this.allowedFolders} .api=${Y(this, C)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree>`
915
+ T.Input,
916
+ () => g`<cx-input class="folder-select__search" aria-label=${this.localize.term("searchFolders")} placeholder=${`${this.localize.term("searchFolders")}...`} value=${this.searchTerm} clearable @cx-input=${this.handleSearchTermInputChange}><cx-icon name="search" slot="prefix"></cx-icon></cx-input><cx-folder-select-tree class="folder-select__tree" base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .allowedFolders=${this.allowedFolders} .api=${ee(this, D)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree>`
894
917
  ],
895
918
  [
896
- F.Select,
897
- () => y`<cx-select clearable hoist lazy name=${this.name} value=${this.value} .form=${this.form} ?required=${this.required} ?multiple=${this.selection === "multiple"} ?loading=${this.treeLoading} @input=${this.handleSearchTermSelectChange} @cx-clear=${this.handleSelectClear} @cx-selected-change=${this.handleTreeSelectedChange} @cx-folder-select-selection-seeded=${this.handleTreeSelectedChange} @cx-folder-select-loading-change=${this.handleTreeLoadingChange} @cx-folder-select-children-loaded=${this.handleTreeChildrenLoaded} allow-freetext><cx-folder-select-tree base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .allowedFolders=${this.allowedFolders} .api=${Y(this, C)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree></cx-select>`
919
+ T.Select,
920
+ () => g`<cx-select clearable hoist lazy name=${this.name} value=${this.value} .form=${this.form} ?required=${this.required} ?multiple=${this.selection === "multiple"} ?loading=${this.treeLoading} @input=${this.handleSearchTermSelectChange} @cx-clear=${this.handleSelectClear} @cx-selected-change=${this.handleTreeSelectedChange} @cx-folder-select-selection-seeded=${this.handleTreeSelectedChange} @cx-folder-select-loading-change=${this.handleTreeLoadingChange} @cx-folder-select-children-loaded=${this.handleTreeChildrenLoaded} allow-freetext><cx-folder-select-tree base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .allowedFolders=${this.allowedFolders} .api=${ee(this, D)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree></cx-select>`
898
921
  ]
899
922
  ])}</div>`;
900
923
  }
901
924
  };
902
- C = /* @__PURE__ */ new WeakMap();
903
- o.styles = [se, Pe];
904
- o.dependencies = {
925
+ D = /* @__PURE__ */ new WeakMap();
926
+ l.styles = [ie, Pe];
927
+ l.dependencies = {
905
928
  "cx-folder-select-tree": n,
906
- "cx-icon": te,
929
+ "cx-icon": re,
907
930
  "cx-input": me,
908
- "cx-line-clamp": re,
931
+ "cx-line-clamp": se,
909
932
  "cx-select": ye,
910
933
  "cx-tag": ge
911
934
  };
912
935
  c([
913
- ie("cx-select")
914
- ], o.prototype, "selectEl", 2);
936
+ q("cx-select")
937
+ ], l.prototype, "selectEl", 2);
938
+ c([
939
+ q("cx-folder-select-tree")
940
+ ], l.prototype, "treeEl", 2);
915
941
  c([
916
942
  s({ attribute: "min-query-length", reflect: !0, type: Number })
917
- ], o.prototype, "minQueryLength", 2);
943
+ ], l.prototype, "minQueryLength", 2);
918
944
  c([
919
945
  s({ attribute: "selection", reflect: !0, type: String })
920
- ], o.prototype, "selection", 2);
946
+ ], l.prototype, "selection", 2);
921
947
  c([
922
948
  s({ attribute: "variant", reflect: !0, type: String })
923
- ], o.prototype, "variant", 2);
949
+ ], l.prototype, "variant", 2);
924
950
  c([
925
951
  s({ reflect: !0, type: String })
926
- ], o.prototype, "value", 2);
952
+ ], l.prototype, "value", 2);
927
953
  c([
928
954
  s({ reflect: !0, type: String })
929
- ], o.prototype, "name", 2);
955
+ ], l.prototype, "name", 2);
930
956
  c([
931
957
  s({ attribute: "selected-label", reflect: !0, type: String })
932
- ], o.prototype, "selectedLabel", 2);
958
+ ], l.prototype, "selectedLabel", 2);
933
959
  c([
934
960
  s({ attribute: "base-url", reflect: !0, type: String })
935
- ], o.prototype, "baseUrl", 2);
961
+ ], l.prototype, "baseUrl", 2);
936
962
  c([
937
963
  s({ attribute: "allowed-folders", converter: oe, type: Array })
938
- ], o.prototype, "allowedFolders", 2);
964
+ ], l.prototype, "allowedFolders", 2);
939
965
  c([
940
966
  s({ reflect: !0, type: Boolean })
941
- ], o.prototype, "open", 2);
967
+ ], l.prototype, "open", 2);
942
968
  c([
943
969
  s({ reflect: !1, type: String })
944
- ], o.prototype, "token", 2);
970
+ ], l.prototype, "token", 2);
945
971
  c([
946
972
  s({ attribute: "bearer-token", reflect: !0, type: String })
947
- ], o.prototype, "bearerToken", 2);
973
+ ], l.prototype, "bearerToken", 2);
948
974
  c([
949
975
  s({ attribute: "see-thru", reflect: !0, type: Boolean })
950
- ], o.prototype, "seeThru", 2);
976
+ ], l.prototype, "seeThru", 2);
951
977
  c([
952
978
  s({ type: Function })
953
- ], o.prototype, "api", 2);
979
+ ], l.prototype, "api", 2);
954
980
  c([
955
981
  s({ reflect: !0, type: Boolean })
956
- ], o.prototype, "required", 2);
982
+ ], l.prototype, "required", 2);
957
983
  c([
958
984
  s({ reflect: !1 })
959
- ], o.prototype, "form", 2);
985
+ ], l.prototype, "form", 2);
960
986
  c([
961
987
  s({
962
988
  attribute: "exclude-virtual-folders",
963
989
  reflect: !0,
964
990
  type: Boolean
965
991
  })
966
- ], o.prototype, "excludeVirtualFolders", 2);
992
+ ], l.prototype, "excludeVirtualFolders", 2);
967
993
  c([
968
994
  s({
969
995
  attribute: "extra-folder-id",
970
996
  reflect: !0,
971
997
  type: String
972
998
  })
973
- ], o.prototype, "extraFolderId", 2);
999
+ ], l.prototype, "extraFolderId", 2);
974
1000
  c([
975
1001
  s({
976
1002
  attribute: "extra-folder-title",
977
1003
  reflect: !0,
978
1004
  type: String
979
1005
  })
980
- ], o.prototype, "extraFolderTitle", 2);
1006
+ ], l.prototype, "extraFolderTitle", 2);
981
1007
  c([
982
1008
  s({
983
1009
  attribute: "extra-folder-icon",
984
1010
  reflect: !0,
985
1011
  type: String
986
1012
  })
987
- ], o.prototype, "extraFolderIcon", 2);
1013
+ ], l.prototype, "extraFolderIcon", 2);
988
1014
  c([
989
1015
  s({ attribute: "auto-page-size", reflect: !0, type: Boolean })
990
- ], o.prototype, "autoPageSize", 2);
1016
+ ], l.prototype, "autoPageSize", 2);
991
1017
  c([
992
1018
  s({ attribute: "first-fetch-callback", reflect: !1, type: Function })
993
- ], o.prototype, "firstFetchCallback", 2);
1019
+ ], l.prototype, "firstFetchCallback", 2);
994
1020
  c([
995
- g()
996
- ], o.prototype, "searchTerm", 2);
1021
+ x()
1022
+ ], l.prototype, "searchTerm", 2);
997
1023
  c([
998
- g()
999
- ], o.prototype, "treeLoading", 2);
1024
+ x()
1025
+ ], l.prototype, "treeLoading", 2);
1000
1026
  c([
1001
- m("api")
1002
- ], o.prototype, "updateWrappedApi", 1);
1027
+ y("api")
1028
+ ], l.prototype, "updateWrappedApi", 1);
1003
1029
  c([
1004
- m("searchTerm", { waitUntilFirstUpdate: !0 })
1005
- ], o.prototype, "handleSearchTermChange", 1);
1030
+ y("searchTerm", { waitUntilFirstUpdate: !0 })
1031
+ ], l.prototype, "handleSearchTermChange", 1);
1006
1032
  c([
1007
- m("open")
1008
- ], o.prototype, "handleOpenChange", 1);
1033
+ y("open")
1034
+ ], l.prototype, "handleOpenChange", 1);
1009
1035
  c([
1010
- m("variant")
1011
- ], o.prototype, "handleVariantChange", 1);
1036
+ y("variant")
1037
+ ], l.prototype, "handleVariantChange", 1);
1012
1038
  c([
1013
- m("selectedLabel", { waitUntilFirstUpdate: !0 }),
1014
- m("value", { waitUntilFirstUpdate: !0 })
1015
- ], o.prototype, "handleValueChange", 1);
1016
- o = c([
1017
- N("cx-folder-select")
1018
- ], o);
1039
+ y("selectedLabel", { waitUntilFirstUpdate: !0 }),
1040
+ y("value", { waitUntilFirstUpdate: !0 })
1041
+ ], l.prototype, "handleValueChange", 1);
1042
+ l = c([
1043
+ W("cx-folder-select")
1044
+ ], l);
1019
1045
  export {
1020
- o as C,
1021
- F,
1022
- H as a,
1046
+ l as C,
1047
+ T as F,
1048
+ Q as a,
1023
1049
  oe as s
1024
1050
  };