folder-pane 4.0.1-0 → 4.0.1-1

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.
@@ -1,41 +1,42 @@
1
1
  import { getContainerMemberCountLabel as e, getResourceAccessState as t, getResourcesForContainer as n } from "../../helpers.esm.js";
2
+ import { createRequestQueue as r } from "../../requestQueue.esm.js";
2
3
  import "../../_virtual/~icons/lucide/file.esm.js";
3
4
  import "../../_virtual/~icons/lucide/file-box.esm.js";
4
5
  import "../../_virtual/~icons/lucide/folder.esm.js";
5
- import r from "./FolderPaneContainer.styles.esm.js";
6
+ import i from "./FolderPaneContainer.styles.esm.js";
6
7
  import "../../_virtual/~icons/lucide/globe.esm.js";
7
8
  import "../../_virtual/~icons/lucide/lock-keyhole.esm.js";
8
- import { FILE_EXPLORER_MANAGE_ACCESS_EVENT as i, WebComponent as a, customElement as o, getRelevantPanes as s, utils as c } from "solid-ui";
9
- import { html as l, nothing as u } from "lit";
10
- import { property as d, state as f } from "lit/decorators.js";
9
+ import { FILE_EXPLORER_MANAGE_ACCESS_EVENT as a, WebComponent as o, customElement as s, getRelevantPanes as c, utils as l } from "solid-ui";
10
+ import { html as u, nothing as d } from "lit";
11
+ import { property as f, state as p } from "lit/decorators.js";
11
12
  import "solid-ui/components/resource-actions-menu";
12
13
  // src/components/folder-pane-container/FolderPaneContainer.ts
13
- var p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, ee, te, ne, re, ie, N, P, F, I, L, R, z, B, V, H, U, W, G, K, q, J, ae, oe, se, ce, le;
14
- function Y(e, t, n) {
15
- ue(e, t), t.set(e, n);
14
+ var m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, ee, te, ne, re, ie, ae, oe, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K, q, se, ce, le, ue, de;
15
+ function J(e, t, n) {
16
+ fe(e, t), t.set(e, n);
16
17
  }
17
- function ue(e, t) {
18
+ function fe(e, t) {
18
19
  if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
19
20
  }
20
- function X(e, t, n) {
21
- return e.set(de(e, t), n), n;
21
+ function Y(e, t, n) {
22
+ return e.set(pe(e, t), n), n;
22
23
  }
23
- function Z(e, t) {
24
- return e.get(de(e, t));
24
+ function X(e, t) {
25
+ return e.get(pe(e, t));
25
26
  }
26
- function de(e, t, n) {
27
+ function pe(e, t, n) {
27
28
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
28
29
  throw TypeError("Private element is not present on this object");
29
30
  }
30
- function Q(e, t, n) {
31
- return (t = pe(t)) in e ? Object.defineProperty(e, t, {
31
+ function Z(e, t, n) {
32
+ return (t = Q(t)) in e ? Object.defineProperty(e, t, {
32
33
  value: n,
33
34
  enumerable: !0,
34
35
  configurable: !0,
35
36
  writable: !0
36
37
  }) : e[t] = n, e;
37
38
  }
38
- function fe(e, t, n, r, i, a) {
39
+ function me(e, t, n, r, i, a) {
39
40
  function o(e, t, n) {
40
41
  return function(r, i) {
41
42
  return n && n(r), e[t].call(r, i);
@@ -58,13 +59,13 @@ function fe(e, t, n, r, i, a) {
58
59
  n || Array.isArray(_) || (_ = [_]);
59
60
  var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
60
61
  d ? (f || p ? b = {
61
- get: he(function() {
62
+ get: ge(function() {
62
63
  return v(this);
63
64
  }, r, "get"),
64
65
  set: function(e) {
65
66
  t[4](this, e);
66
67
  }
67
- } : b[S] = v, f || he(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
68
+ } : b[S] = v, f || ge(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
68
69
  }
69
70
  for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
70
71
  var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
@@ -124,7 +125,7 @@ function fe(e, t, n, r, i, a) {
124
125
  if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
125
126
  var f = Object.create(d ?? null), p = function(e, t, n, r) {
126
127
  var i, a, o = [], c = function(t) {
127
- return ge(t) === e;
128
+ return _e(t) === e;
128
129
  }, u = /* @__PURE__ */ new Map();
129
130
  function d(e) {
130
131
  e && o.push(s.bind(null, e));
@@ -138,7 +139,7 @@ function fe(e, t, n, r, i, a) {
138
139
  if (!0 === x || x === 3 && m !== 4 || x === 4 && m !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
139
140
  u.set(b, !(m > 2) || m);
140
141
  }
141
- l(v ? e : e.prototype, p, _, g ? "#" + h : pe(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
142
+ l(v ? e : e.prototype, p, _, g ? "#" + h : Q(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
142
143
  }
143
144
  }
144
145
  return d(i), d(a), o;
@@ -151,11 +152,11 @@ function fe(e, t, n, r, i, a) {
151
152
  }
152
153
  };
153
154
  }
154
- function pe(e) {
155
- var t = me(e, "string");
155
+ function Q(e) {
156
+ var t = he(e, "string");
156
157
  return typeof t == "symbol" ? t : t + "";
157
158
  }
158
- function me(e, t) {
159
+ function he(e, t) {
159
160
  if (typeof e != "object" || !e) return e;
160
161
  var n;
161
162
  if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
@@ -165,7 +166,7 @@ function me(e, t) {
165
166
  }
166
167
  return (t === "string" ? String : Number)(e);
167
168
  }
168
- function he(e, t, n) {
169
+ function ge(e, t, n) {
169
170
  typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
170
171
  try {
171
172
  Object.defineProperty(e, "name", {
@@ -175,99 +176,99 @@ function he(e, t, n) {
175
176
  } catch {}
176
177
  return e;
177
178
  }
178
- function ge(e) {
179
+ function _e(e) {
179
180
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
180
181
  return e;
181
182
  }
182
- function _e(e) {
183
+ function ve(e) {
183
184
  return e;
184
185
  }
185
- A = [o("folder-pane-container")];
186
+ j = [s("folder-pane-container")];
186
187
  var $;
187
- new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), w = /*#__PURE__*/ new WeakMap(), T = /*#__PURE__*/ new WeakMap(), E = /*#__PURE__*/ new WeakMap(), D = /*#__PURE__*/ new WeakMap(), le = (j = d({ attribute: !1 }), ee = d({ attribute: !1 }), ne = d({ attribute: !1 }), ie = d(), P = d(), I = d({
188
+ new (ue = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), w = /*#__PURE__*/ new WeakMap(), T = /*#__PURE__*/ new WeakMap(), E = /*#__PURE__*/ new WeakMap(), D = /*#__PURE__*/ new WeakMap(), O = /*#__PURE__*/ new WeakMap(), de = (ee = f({ attribute: !1 }), ne = f({ attribute: !1 }), ie = f({ attribute: !1 }), oe = f(), N = f(), F = f({
188
189
  type: Boolean,
189
190
  attribute: "hide-root-special-folders"
190
- }), R = f(), B = f(), H = f(), W = f(), K = f(), J = f(), oe = f(), "subject"), m = class extends a {
191
+ }), L = p(), z = p(), V = p(), U = p(), G = p(), q = p(), ce = p(), "subject"), h = class extends o {
191
192
  constructor(...e) {
192
- super(...e), Y(this, h, (O(this), M(this, void 0))), Y(this, g, te(this, null)), Y(this, _, re(this, void 0)), Y(this, v, N(this, "grid")), Y(this, y, F(this, "")), Y(this, b, L(this, !1)), Y(this, x, z(this, /* @__PURE__ */ new Map())), Y(this, S, V(this, [])), Y(this, C, U(this, [])), Y(this, w, G(this, /* @__PURE__ */ new Map())), Y(this, T, q(this, /* @__PURE__ */ new Map())), Y(this, E, ae(this, !0)), Y(this, D, se(this, void 0)), Q(this, "actionMenuGeneration", 0), Q(this, "resourceGeneration", 0);
193
+ super(...e), J(this, g, (k(this), te(this, void 0))), J(this, _, re(this, null)), J(this, v, ae(this, void 0)), J(this, y, M(this, "grid")), J(this, b, P(this, "")), J(this, x, I(this, !1)), J(this, S, R(this, /* @__PURE__ */ new Map())), J(this, C, B(this, [])), J(this, w, H(this, [])), J(this, T, W(this, /* @__PURE__ */ new Map())), J(this, E, K(this, /* @__PURE__ */ new Map())), J(this, D, se(this, !0)), J(this, O, le(this, void 0)), Z(this, "actionMenuGeneration", 0), Z(this, "resourceGeneration", 0), Z(this, "detailsQueue", r()), Z(this, "detailsObserver", void 0);
193
194
  }
194
- get [le]() {
195
- return Z(h, this);
195
+ get [de]() {
196
+ return X(g, this);
196
197
  }
197
198
  set subject(e) {
198
- X(h, this, e);
199
+ Y(g, this, e);
199
200
  }
200
201
  get resourceLogic() {
201
- return Z(g, this);
202
+ return X(_, this);
202
203
  }
203
204
  set resourceLogic(e) {
204
- X(g, this, e);
205
+ Y(_, this, e);
205
206
  }
206
207
  get browserContext() {
207
- return Z(_, this);
208
+ return X(v, this);
208
209
  }
209
210
  set browserContext(e) {
210
- X(_, this, e);
211
+ Y(v, this, e);
211
212
  }
212
213
  get view() {
213
- return Z(v, this);
214
+ return X(y, this);
214
215
  }
215
216
  set view(e) {
216
- X(v, this, e);
217
+ Y(y, this, e);
217
218
  }
218
219
  get searchQuery() {
219
- return Z(y, this);
220
+ return X(b, this);
220
221
  }
221
222
  set searchQuery(e) {
222
- X(y, this, e);
223
+ Y(b, this, e);
223
224
  }
224
225
  get hideRootSpecialFolders() {
225
- return Z(b, this);
226
+ return X(x, this);
226
227
  }
227
228
  set hideRootSpecialFolders(e) {
228
- X(b, this, e);
229
+ Y(x, this, e);
229
230
  }
230
231
  get resourceActionMenuItems() {
231
- return Z(x, this);
232
+ return X(S, this);
232
233
  }
233
234
  set resourceActionMenuItems(e) {
234
- X(x, this, e);
235
+ Y(S, this, e);
235
236
  }
236
237
  get resources() {
237
- return Z(S, this);
238
+ return X(C, this);
238
239
  }
239
240
  set resources(e) {
240
- X(S, this, e);
241
+ Y(C, this, e);
241
242
  }
242
243
  get optimisticResources() {
243
- return Z(C, this);
244
+ return X(w, this);
244
245
  }
245
246
  set optimisticResources(e) {
246
- X(C, this, e);
247
+ Y(w, this, e);
247
248
  }
248
249
  get resourceAccess() {
249
- return Z(w, this);
250
+ return X(T, this);
250
251
  }
251
252
  set resourceAccess(e) {
252
- X(w, this, e);
253
+ Y(T, this, e);
253
254
  }
254
255
  get memberLoad() {
255
- return Z(T, this);
256
+ return X(E, this);
256
257
  }
257
258
  set memberLoad(e) {
258
- X(T, this, e);
259
+ Y(E, this, e);
259
260
  }
260
261
  get loading() {
261
- return Z(E, this);
262
+ return X(D, this);
262
263
  }
263
264
  set loading(e) {
264
- X(E, this, e);
265
+ Y(D, this, e);
265
266
  }
266
267
  get loadError() {
267
- return Z(D, this);
268
+ return X(O, this);
268
269
  }
269
270
  set loadError(e) {
270
- X(D, this, e);
271
+ Y(O, this, e);
271
272
  }
272
273
  selectResource(e) {
273
274
  this.dispatchEvent(new CustomEvent("resource-selected", {
@@ -286,7 +287,7 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
286
287
  }
287
288
  isRootSpecialFolder(e) {
288
289
  if (!e.isContainer) return !1;
289
- let t = c.label(e.subject).toLowerCase();
290
+ let t = l.label(e.subject).toLowerCase();
290
291
  return t === "public" || t === "trash";
291
292
  }
292
293
  getResourcesFromStore() {
@@ -305,32 +306,41 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
305
306
  }
306
307
  get visibleResources() {
307
308
  let e = this.searchQuery.trim().toLowerCase();
308
- return e ? this.resources.filter((t) => c.label(t.subject).toLowerCase().includes(e)) : this.resources;
309
+ return e ? this.resources.filter((t) => l.label(t.subject).toLowerCase().includes(e)) : this.resources;
309
310
  }
310
311
  async loadResources() {
311
312
  let e = ++this.resourceGeneration, t = this.getResourcesFromStore();
312
- if (this.resources = t, this.loading = !1, this.loadError = void 0, this.memberLoad = new Map(t.filter((e) => e.isContainer).map((e) => [e.id, "loading"])), this.browserContext && Promise.all(t.filter((e) => e.isContainer).map(async (t) => {
313
- try {
314
- if (await this.browserContext?.session.store.fetcher.load(t.subject), e !== this.resourceGeneration) return;
315
- this.memberLoad = new Map(this.memberLoad).set(t.id, "loaded");
316
- } catch (n) {
317
- if (console.warn("Unable to load folder-pane container member count", n), e !== this.resourceGeneration) return;
318
- this.memberLoad = new Map(this.memberLoad).set(t.id, "error");
319
- }
320
- })), e === this.resourceGeneration) {
321
- this.resources = this.getResourcesFromStore();
322
- for (let t of this.resources) this.loadResourceAccess(t, e);
323
- this.loadResourceActionMenuItems(e);
313
+ this.resources = t, this.loading = !1, this.loadError = void 0, e === this.resourceGeneration && this.loadResourceActionMenuItems(e);
314
+ }
315
+ loadResourceDetails(e) {
316
+ this.loadMemberCount(e), this.loadResourceAccess(e);
317
+ }
318
+ async loadMemberCount(e, t = this.resourceGeneration) {
319
+ if (!e.isContainer || this.memberLoad.has(e.id) || !this.browserContext) return;
320
+ let n = this.browserContext.session.store.fetcher;
321
+ this.memberLoad = new Map(this.memberLoad).set(e.id, "loading");
322
+ try {
323
+ if (await this.detailsQueue.run(() => n.load(e.subject)), t !== this.resourceGeneration) return;
324
+ this.memberLoad = new Map(this.memberLoad).set(e.id, "loaded");
325
+ } catch (n) {
326
+ if (t !== this.resourceGeneration) return;
327
+ console.warn("Unable to load folder-pane container member count", n), this.memberLoad = new Map(this.memberLoad).set(e.id, "error");
324
328
  }
325
329
  }
326
330
  async loadResourceAccess(e, n = this.resourceGeneration) {
327
- if (!this.resourceAccess.has(e.id) && this.browserContext) try {
328
- let r = await this.browserContext.session.logic.resource.fetchMetadata(e.subject);
331
+ if (this.resourceAccess.has(e.id) || !this.browserContext) return;
332
+ let r = this.browserContext.session.logic.resource;
333
+ this.resourceAccess = new Map(this.resourceAccess).set(e.id, {
334
+ state: "unknown",
335
+ canManageAccess: !1
336
+ });
337
+ try {
338
+ let i = await this.detailsQueue.run(() => r.fetchMetadata(e.subject));
329
339
  if (n !== this.resourceGeneration) return;
330
- let i = t(r.access);
340
+ let a = t(i.access);
331
341
  this.resourceAccess = new Map(this.resourceAccess).set(e.id, {
332
- state: i,
333
- canManageAccess: r.access.canManageAccess
342
+ state: a,
343
+ canManageAccess: i.access.canManageAccess
334
344
  });
335
345
  } catch {
336
346
  n === this.resourceGeneration && (this.resourceAccess = new Map(this.resourceAccess).set(e.id, {
@@ -341,10 +351,40 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
341
351
  }
342
352
  renderAccessIndicator(e) {
343
353
  let t = this.resourceAccess.get(e.id);
344
- return t ? t.state === "public" ? l`<icon-lucide-globe class="resource-access-indicator resource-access-indicator--public" role="img" aria-label="Public" title="Public"></icon-lucide-globe>` : t.state === "private" ? l`<icon-lucide-lock-keyhole class="resource-access-indicator resource-access-indicator--private" role="img" aria-label="Private" title="Private"></icon-lucide-lock-keyhole>` : u : u;
354
+ return t ? t.state === "public" ? u`<icon-lucide-globe class="resource-access-indicator resource-access-indicator--public" role="img" aria-label="Public" title="Public"></icon-lucide-globe>` : t.state === "private" ? u`<icon-lucide-lock-keyhole class="resource-access-indicator resource-access-indicator--private" role="img" aria-label="Private" title="Private"></icon-lucide-lock-keyhole>` : d : d;
355
+ }
356
+ resetResourceDetails() {
357
+ this.detailsQueue.clear(), this.detailsObserver?.disconnect(), this.resourceAccess = /* @__PURE__ */ new Map(), this.memberLoad = /* @__PURE__ */ new Map();
358
+ }
359
+ observeResourceItems() {
360
+ let e = Array.from(this.renderRoot.querySelectorAll("[data-resource-id]")), t = new Map(this.resources.map((e) => [e.id, e])), n = e.filter((e) => {
361
+ let n = t.get(e.dataset.resourceId);
362
+ return n && (n.isContainer && !this.memberLoad.has(n.id) || !this.resourceAccess.has(n.id));
363
+ });
364
+ if (n.length !== 0) {
365
+ if (typeof IntersectionObserver > "u") for (let e of n) this.loadResourceDetails(t.get(e.dataset.resourceId));
366
+ else {
367
+ this.detailsObserver ??= new IntersectionObserver((e) => {
368
+ for (let t of e) {
369
+ if (!t.isIntersecting) continue;
370
+ let e = t.target;
371
+ this.detailsObserver?.unobserve(e);
372
+ let n = this.resources.find((t) => t.id === e.dataset.resourceId);
373
+ n && this.loadResourceDetails(n);
374
+ }
375
+ }, { rootMargin: "200px" });
376
+ for (let e of n) this.detailsObserver.observe(e);
377
+ }
378
+ }
379
+ }
380
+ connectedCallback() {
381
+ super.connectedCallback(), this.hasUpdated && this.requestUpdate();
382
+ }
383
+ disconnectedCallback() {
384
+ super.disconnectedCallback(), this.resourceGeneration++, this.resetResourceDetails();
345
385
  }
346
386
  async refresh(e = !0) {
347
- if (this.resourceGeneration++, this.resourceAccess = /* @__PURE__ */ new Map(), this.memberLoad = /* @__PURE__ */ new Map(), this.resourceActionMenuItems = /* @__PURE__ */ new Map(), this.optimisticResources = [], e && this.subject && this.browserContext) try {
387
+ if (this.resourceGeneration++, this.resetResourceDetails(), this.resourceActionMenuItems = /* @__PURE__ */ new Map(), this.optimisticResources = [], e && this.subject && this.browserContext) try {
348
388
  await this.browserContext.session.store.fetcher.load(this.subject, {
349
389
  force: !0,
350
390
  clearPreviousData: !0
@@ -362,7 +402,7 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
362
402
  return;
363
403
  }
364
404
  let n = await Promise.all(this.resources.map(async (e) => {
365
- let t = await s(e.subject, this.browserContext, {
405
+ let t = await c(e.subject, this.browserContext, {
366
406
  excludedPaneNames: ["sharing"],
367
407
  fallbackPaneName: "internal"
368
408
  }), n = await Promise.all(t.map(async (t) => {
@@ -387,17 +427,17 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
387
427
  e === this.resourceGeneration && t === this.actionMenuGeneration && (this.resourceActionMenuItems = new Map(n));
388
428
  }
389
429
  updated(e) {
390
- (e.has("subject") || e.has("resourceLogic") || e.has("browserContext") || e.has("hideRootSpecialFolders")) && (this.resourceAccess = /* @__PURE__ */ new Map(), this.memberLoad = /* @__PURE__ */ new Map(), this.resourceActionMenuItems = /* @__PURE__ */ new Map(), this.loadResources());
430
+ (e.has("subject") || e.has("resourceLogic") || e.has("browserContext") || e.has("hideRootSpecialFolders")) && (this.resourceGeneration++, this.resetResourceDetails(), this.resourceActionMenuItems = /* @__PURE__ */ new Map(), this.loadResources()), this.observeResourceItems();
391
431
  }
392
432
  openAccessControls(e) {
393
- this.dispatchEvent(new CustomEvent(i, {
433
+ this.dispatchEvent(new CustomEvent(a, {
394
434
  detail: { subjectUri: e.subject.uri },
395
435
  bubbles: !0,
396
436
  composed: !0
397
437
  }));
398
438
  }
399
439
  renderResourceActionsMenu(e, t) {
400
- return l`
440
+ return u`
401
441
  <div
402
442
  class="resource-actions-menu resource-actions-menu--${t}"
403
443
  @click=${(e) => e.stopPropagation()}
@@ -414,10 +454,11 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
414
454
  `;
415
455
  }
416
456
  renderResourceItem(t) {
417
- let n = c.label(t.subject), r = t.isContainer && this.memberLoad.get(t.id) === "loaded" ? this.getVisibleMemberCount(t) : -1;
418
- return l`
457
+ let n = l.label(t.subject), r = t.isContainer && this.memberLoad.get(t.id) === "loaded" ? this.getVisibleMemberCount(t) : -1;
458
+ return u`
419
459
  <li
420
460
  class="resource-list-item"
461
+ data-resource-id=${t.id}
421
462
  notSelectable="false"
422
463
  aria-selected="false"
423
464
  aria-label=${n}
@@ -430,10 +471,10 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
430
471
  >
431
472
  <span class="resource-list-main">
432
473
  <span class=${t.isContainer ? "resource-list-icon resource-list-icon--container" : "resource-list-icon"} aria-hidden="true">
433
- ${t.isContainer ? l`<icon-lucide-folder></icon-lucide-folder>` : l`<icon-lucide-file></icon-lucide-file>`}
474
+ ${t.isContainer ? u`<icon-lucide-folder></icon-lucide-folder>` : u`<icon-lucide-file></icon-lucide-file>`}
434
475
  </span>
435
476
  <span class="resource-list-label">${n}</span>
436
- ${r >= 0 ? l`<span class="container-member-count">${e(r)}</span>` : u}
477
+ ${r >= 0 ? u`<span class="container-member-count">${e(r)}</span>` : d}
437
478
  ${this.renderAccessIndicator(t)}
438
479
  </span>
439
480
  ${this.renderResourceActionsMenu(t, "list")}
@@ -441,7 +482,7 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
441
482
  `;
442
483
  }
443
484
  renderListView(e) {
444
- return l`
485
+ return u`
445
486
  <ul class="resource-list" role="listbox" aria-label="Container resources">
446
487
  <li class="resource-list-header" role="presentation" aria-hidden="true">
447
488
  <span>Name</span>
@@ -452,10 +493,11 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
452
493
  `;
453
494
  }
454
495
  renderGridItem(t) {
455
- let n = c.label(t.subject), r = t.isContainer && this.memberLoad.get(t.id) === "loaded" ? this.getVisibleMemberCount(t) : -1;
456
- return l`
496
+ let n = l.label(t.subject), r = t.isContainer && this.memberLoad.get(t.id) === "loaded" ? this.getVisibleMemberCount(t) : -1;
497
+ return u`
457
498
  <li
458
499
  class="resource-grid-item"
500
+ data-resource-id=${t.id}
459
501
  notSelectable="false"
460
502
  aria-selected="false"
461
503
  aria-label=${n}
@@ -467,11 +509,11 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
467
509
  @keydown=${(e) => this.handleResourceKeyDown(e, t)}
468
510
  >
469
511
  <span class=${t.isContainer ? "resource-grid-icon resource-grid-icon--container" : "resource-grid-icon"} aria-hidden="true">
470
- ${t.isContainer ? l`<icon-lucide-folder></icon-lucide-folder>` : l`<icon-lucide-file></icon-lucide-file>`}
512
+ ${t.isContainer ? u`<icon-lucide-folder></icon-lucide-folder>` : u`<icon-lucide-file></icon-lucide-file>`}
471
513
  </span>
472
- ${t.isContainer ? l`<span class="resource-grid-label resource-grid-label--container">${n}</span>` : u}
514
+ ${t.isContainer ? u`<span class="resource-grid-label resource-grid-label--container">${n}</span>` : d}
473
515
  <div class="resource-grid-item-footer">
474
- ${t.isContainer && r >= 0 ? l`<span class="container-member-count">${e(r)}</span>` : t.isContainer ? u : l`<span class="resource-grid-label">${n}</span>`}
516
+ ${t.isContainer && r >= 0 ? u`<span class="container-member-count">${e(r)}</span>` : t.isContainer ? d : u`<span class="resource-grid-label">${n}</span>`}
475
517
  ${this.renderAccessIndicator(t)}
476
518
  </div>
477
519
  ${this.renderResourceActionsMenu(t, "grid")}
@@ -479,18 +521,18 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
479
521
  `;
480
522
  }
481
523
  renderGridView(e) {
482
- return l`
524
+ return u`
483
525
  <ul class="resource-grid" role="listbox" aria-label="Container resources">
484
526
  ${e.map((e) => this.renderGridItem(e))}
485
527
  </ul>
486
528
  `;
487
529
  }
488
530
  renderEmptyContainer() {
489
- return this.searchQuery.trim() ? l`
531
+ return this.searchQuery.trim() ? u`
490
532
  <div class="folder-pane-container-empty-message" role="status">
491
533
  <h2 class="folder-pane-container-empty-message-title">No resources match this search.</h2>
492
534
  </div>
493
- ` : l`
535
+ ` : u`
494
536
  <div class="folder-pane-container-empty-message" role="status">
495
537
  <div class="folder-pane-container-empty-message-icon" aria-hidden="true">
496
538
  <icon-lucide-file-box></icon-lucide-file-box>
@@ -502,84 +544,84 @@ new (ce = (h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ =
502
544
  }
503
545
  render() {
504
546
  let e = this.visibleResources;
505
- return l`
547
+ return u`
506
548
  <div class="folder-pane-container-content">
507
- ${this.loadError ? l`<div class="folder-pane-container-error" role="alert">${this.loadError}</div>` : u}
508
- ${this.loading ? l`<div class="folder-pane-container-loading" role="status">Loading resources…</div>` : e.length > 0 ? this.view === "grid" ? this.renderGridView(e) : this.renderListView(e) : this.renderEmptyContainer()}
549
+ ${this.loadError ? u`<div class="folder-pane-container-error" role="alert">${this.loadError}</div>` : d}
550
+ ${this.loading ? u`<div class="folder-pane-container-loading" role="status">Loading resources…</div>` : e.length > 0 ? this.view === "grid" ? this.renderGridView(e) : this.renderListView(e) : this.renderEmptyContainer()}
509
551
  </div>
510
552
  `;
511
553
  }
512
- }, {e: [M, te, re, N, F, L, z, V, U, G, q, ae, se, O], c: [$, k]} = fe(m, [
554
+ }, {e: [te, re, ae, M, P, I, R, B, H, W, K, se, le, k], c: [$, A]} = me(h, [
513
555
  [
514
- j,
556
+ ee,
515
557
  1,
516
558
  "subject"
517
559
  ],
518
560
  [
519
- ee,
561
+ ne,
520
562
  1,
521
563
  "resourceLogic"
522
564
  ],
523
565
  [
524
- ne,
566
+ ie,
525
567
  1,
526
568
  "browserContext"
527
569
  ],
528
570
  [
529
- ie,
571
+ oe,
530
572
  1,
531
573
  "view"
532
574
  ],
533
575
  [
534
- P,
576
+ N,
535
577
  1,
536
578
  "searchQuery"
537
579
  ],
538
580
  [
539
- I,
581
+ F,
540
582
  1,
541
583
  "hideRootSpecialFolders"
542
584
  ],
543
585
  [
544
- R,
586
+ L,
545
587
  1,
546
588
  "resourceActionMenuItems"
547
589
  ],
548
590
  [
549
- B,
591
+ z,
550
592
  1,
551
593
  "resources"
552
594
  ],
553
595
  [
554
- H,
596
+ V,
555
597
  1,
556
598
  "optimisticResources"
557
599
  ],
558
600
  [
559
- W,
601
+ U,
560
602
  1,
561
603
  "resourceAccess"
562
604
  ],
563
605
  [
564
- K,
606
+ G,
565
607
  1,
566
608
  "memberLoad"
567
609
  ],
568
610
  [
569
- J,
611
+ q,
570
612
  1,
571
613
  "loading"
572
614
  ],
573
615
  [
574
- oe,
616
+ ce,
575
617
  1,
576
618
  "loadError"
577
619
  ]
578
- ], A, 0, void 0, a), m), p = class extends _e {
620
+ ], j, 0, void 0, o), h), m = class extends ve {
579
621
  constructor() {
580
- super($), Q(this, "styles", r), k();
622
+ super($), Z(this, "styles", i), A();
581
623
  }
582
- }, Q(p, ce, void 0), p)();
624
+ }, Z(m, ue, void 0), m)();
583
625
  export { $ as default };
584
626
 
585
627
  //# sourceMappingURL=FolderPaneContainer.esm.js.map