folder-pane 4.0.0 → 4.0.1-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.
- package/declarations.d.ts +4 -4
- package/dist/_virtual/~icons/lucide/chevron-down.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/chevron-down.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/chevron-down.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/chevron-down.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/chevron-right.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/chevron-right.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/chevron-right.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/chevron-right.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/circle-small.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/circle-small.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/circle-small.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/circle-small.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file-box.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/file-box.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file-box.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/file-box.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/file.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/file.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/file.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/layout-grid.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/layout-grid.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/layout-grid.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/layout-grid.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/list.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/list.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/list.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/list.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/plus.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/plus.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/plus.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/plus.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/search.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/search.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/search.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/search.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/trash-2.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/upload.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/upload.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/upload.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/upload.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/x.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/x.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/x.esm.js +10 -0
- package/dist/_virtual/~icons/lucide/x.esm.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +91 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +44 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +585 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js +2 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js +6 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-container/index.cjs.js +1 -0
- package/dist/components/folder-pane-container/index.d.ts +2 -0
- package/dist/components/folder-pane-container/index.d.ts.map +1 -0
- package/dist/components/folder-pane-container/index.esm.js +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.cjs.js +4 -0
- package/dist/components/folder-pane-content/FolderPaneContent.cjs.js.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.d.ts +6 -0
- package/dist/components/folder-pane-content/FolderPaneContent.d.ts.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.esm.js +176 -0
- package/dist/components/folder-pane-content/FolderPaneContent.esm.js.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js +2 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js +6 -0
- package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-content/index.cjs.js +1 -0
- package/dist/components/folder-pane-content/index.d.ts +2 -0
- package/dist/components/folder-pane-content/index.d.ts.map +1 -0
- package/dist/components/folder-pane-content/index.esm.js +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js +53 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts +33 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js +429 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js +2 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js +6 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-sidebar/index.cjs.js +1 -0
- package/dist/components/folder-pane-sidebar/index.d.ts +2 -0
- package/dist/components/folder-pane-sidebar/index.d.ts.map +1 -0
- package/dist/components/folder-pane-sidebar/index.esm.js +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js +32 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.d.ts +15 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.d.ts.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js +290 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js +2 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js +6 -0
- package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js +79 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts +27 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js +437 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js +2 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js +6 -0
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-storage-header/index.cjs.js +1 -0
- package/dist/components/folder-pane-storage-header/index.d.ts +2 -0
- package/dist/components/folder-pane-storage-header/index.d.ts.map +1 -0
- package/dist/components/folder-pane-storage-header/index.esm.js +1 -0
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js +51 -0
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -0
- package/dist/components/folder-pane-view/FolderPaneView.d.ts +82 -0
- package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -0
- package/dist/components/folder-pane-view/FolderPaneView.esm.js +728 -0
- package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -0
- package/dist/components/folder-pane-view/index.cjs.js +1 -0
- package/dist/components/folder-pane-view/index.d.ts +2 -0
- package/dist/components/folder-pane-view/index.d.ts.map +1 -0
- package/dist/components/folder-pane-view/index.esm.js +1 -0
- package/dist/components/folder-pane-view/renderRequest.cjs.js +2 -0
- package/dist/components/folder-pane-view/renderRequest.cjs.js.map +1 -0
- package/dist/components/folder-pane-view/renderRequest.d.ts +8 -0
- package/dist/components/folder-pane-view/renderRequest.d.ts.map +1 -0
- package/dist/components/folder-pane-view/renderRequest.esm.js +10 -0
- package/dist/components/folder-pane-view/renderRequest.esm.js.map +1 -0
- package/dist/creationSafety.cjs.js +2 -0
- package/dist/creationSafety.cjs.js.map +1 -0
- package/dist/creationSafety.d.ts +9 -0
- package/dist/creationSafety.d.ts.map +1 -0
- package/dist/creationSafety.esm.js +17 -0
- package/dist/creationSafety.esm.js.map +1 -0
- package/dist/folderPane.cjs.js +2 -2
- package/dist/folderPane.cjs.js.map +1 -1
- package/dist/folderPane.d.ts +2 -1
- package/dist/folderPane.d.ts.map +1 -1
- package/dist/folderPane.esm.js +23 -60
- package/dist/folderPane.esm.js.map +1 -1
- package/dist/helpers.cjs.js +2 -0
- package/dist/helpers.cjs.js.map +1 -0
- package/dist/helpers.d.ts +30 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.esm.js +59 -0
- package/dist/helpers.esm.js.map +1 -0
- package/dist/index.esm.js +1 -2
- package/dist/mintPaneInstance.cjs.js +2 -0
- package/dist/mintPaneInstance.cjs.js.map +1 -0
- package/dist/mintPaneInstance.d.ts +43 -0
- package/dist/mintPaneInstance.d.ts.map +1 -0
- package/dist/mintPaneInstance.esm.js +104 -0
- package/dist/mintPaneInstance.esm.js.map +1 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +8 -5
- package/dist/_virtual/_rolldown/runtime.cjs.js +0 -1
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
import { getContainerMemberCountLabel as e, getResourceAccessState as t, getResourcesForContainer as n } from "../../helpers.esm.js";
|
|
2
|
+
import "../../_virtual/~icons/lucide/file.esm.js";
|
|
3
|
+
import "../../_virtual/~icons/lucide/file-box.esm.js";
|
|
4
|
+
import "../../_virtual/~icons/lucide/folder.esm.js";
|
|
5
|
+
import r from "./FolderPaneContainer.styles.esm.js";
|
|
6
|
+
import "../../_virtual/~icons/lucide/globe.esm.js";
|
|
7
|
+
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";
|
|
11
|
+
import "solid-ui/components/resource-actions-menu";
|
|
12
|
+
// 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);
|
|
16
|
+
}
|
|
17
|
+
function ue(e, t) {
|
|
18
|
+
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
19
|
+
}
|
|
20
|
+
function X(e, t, n) {
|
|
21
|
+
return e.set(de(e, t), n), n;
|
|
22
|
+
}
|
|
23
|
+
function Z(e, t) {
|
|
24
|
+
return e.get(de(e, t));
|
|
25
|
+
}
|
|
26
|
+
function de(e, t, n) {
|
|
27
|
+
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
28
|
+
throw TypeError("Private element is not present on this object");
|
|
29
|
+
}
|
|
30
|
+
function Q(e, t, n) {
|
|
31
|
+
return (t = pe(t)) in e ? Object.defineProperty(e, t, {
|
|
32
|
+
value: n,
|
|
33
|
+
enumerable: !0,
|
|
34
|
+
configurable: !0,
|
|
35
|
+
writable: !0
|
|
36
|
+
}) : e[t] = n, e;
|
|
37
|
+
}
|
|
38
|
+
function fe(e, t, n, r, i, a) {
|
|
39
|
+
function o(e, t, n) {
|
|
40
|
+
return function(r, i) {
|
|
41
|
+
return n && n(r), e[t].call(r, i);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function s(e, t) {
|
|
45
|
+
for (var n = 0; n < e.length; n++) e[n].call(t);
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
function c(e, t, n, r) {
|
|
49
|
+
if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
|
|
50
|
+
return e;
|
|
51
|
+
}
|
|
52
|
+
function l(e, t, n, r, i, a, s, l, u, d, f, p, m) {
|
|
53
|
+
function h(e) {
|
|
54
|
+
if (!m(e)) throw TypeError("Attempted to access private element on non-instance");
|
|
55
|
+
}
|
|
56
|
+
var g, _ = t[0], v = t[3], y = !l;
|
|
57
|
+
if (!y) {
|
|
58
|
+
n || Array.isArray(_) || (_ = [_]);
|
|
59
|
+
var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
|
|
60
|
+
d ? (f || p ? b = {
|
|
61
|
+
get: he(function() {
|
|
62
|
+
return v(this);
|
|
63
|
+
}, r, "get"),
|
|
64
|
+
set: function(e) {
|
|
65
|
+
t[4](this, e);
|
|
66
|
+
}
|
|
67
|
+
} : b[S] = v, f || he(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
|
|
68
|
+
}
|
|
69
|
+
for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
|
|
70
|
+
var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
|
|
71
|
+
kind: [
|
|
72
|
+
"field",
|
|
73
|
+
"accessor",
|
|
74
|
+
"method",
|
|
75
|
+
"getter",
|
|
76
|
+
"setter",
|
|
77
|
+
"class"
|
|
78
|
+
][i],
|
|
79
|
+
name: r,
|
|
80
|
+
metadata: a,
|
|
81
|
+
addInitializer: function(e, t) {
|
|
82
|
+
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
83
|
+
c(t, "An initializer", "be", !0), s.push(t);
|
|
84
|
+
}.bind(null, D)
|
|
85
|
+
};
|
|
86
|
+
try {
|
|
87
|
+
if (y) (g = c(T.call(E, C, O), "class decorators", "return")) && (C = g);
|
|
88
|
+
else {
|
|
89
|
+
var k, A;
|
|
90
|
+
O.static = u, O.private = d, d ? i === 2 ? k = function(e) {
|
|
91
|
+
return h(e), b.value;
|
|
92
|
+
} : (i < 4 && (k = o(b, "get", h)), i !== 3 && (A = o(b, "set", h))) : (k = function(e) {
|
|
93
|
+
return e[r];
|
|
94
|
+
}, (i < 2 || i === 4) && (A = function(e, t) {
|
|
95
|
+
e[r] = t;
|
|
96
|
+
}));
|
|
97
|
+
var j = O.access = { has: d ? m.bind() : function(e) {
|
|
98
|
+
return r in e;
|
|
99
|
+
} };
|
|
100
|
+
if (k && (j.get = k), A && (j.set = A), C = T.call(E, p ? {
|
|
101
|
+
get: b.get,
|
|
102
|
+
set: b.set
|
|
103
|
+
} : b[S], O), p) {
|
|
104
|
+
if (typeof C == "object" && C) (g = c(C.get, "accessor.get")) && (b.get = g), (g = c(C.set, "accessor.set")) && (b.set = g), (g = c(C.init, "accessor.init")) && x.push(g);
|
|
105
|
+
else if (C !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
106
|
+
} else c(C, (f ? "field" : "method") + " decorators", "return") && (f ? x.push(C) : b[S] = C);
|
|
107
|
+
}
|
|
108
|
+
} finally {
|
|
109
|
+
D.v = !0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return (f || p) && l.push(function(e, t) {
|
|
113
|
+
for (var n = x.length - 1; n >= 0; n--) t = x[n].call(e, t);
|
|
114
|
+
return t;
|
|
115
|
+
}), f || y || (d ? p ? l.push(o(b, "get"), o(b, "set")) : l.push(i === 2 ? b[S] : o.call.bind(b[S])) : Object.defineProperty(e, r, b)), C;
|
|
116
|
+
}
|
|
117
|
+
function u(e, t) {
|
|
118
|
+
return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), {
|
|
119
|
+
configurable: !0,
|
|
120
|
+
enumerable: !0,
|
|
121
|
+
value: t
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
125
|
+
var f = Object.create(d ?? null), p = function(e, t, n, r) {
|
|
126
|
+
var i, a, o = [], c = function(t) {
|
|
127
|
+
return ge(t) === e;
|
|
128
|
+
}, u = /* @__PURE__ */ new Map();
|
|
129
|
+
function d(e) {
|
|
130
|
+
e && o.push(s.bind(null, e));
|
|
131
|
+
}
|
|
132
|
+
for (var f = 0; f < t.length; f++) {
|
|
133
|
+
var p = t[f];
|
|
134
|
+
if (Array.isArray(p)) {
|
|
135
|
+
var m = p[1], h = p[2], g = p.length > 3, _ = 16 & m, v = !!(8 & m), y = (m &= 7) == 0, b = h + "/" + v;
|
|
136
|
+
if (!y && !g) {
|
|
137
|
+
var x = u.get(b);
|
|
138
|
+
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
|
+
u.set(b, !(m > 2) || m);
|
|
140
|
+
}
|
|
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
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return d(i), d(a), o;
|
|
145
|
+
}(e, t, i, f);
|
|
146
|
+
return n.length || u(e, f), {
|
|
147
|
+
e: p,
|
|
148
|
+
get c() {
|
|
149
|
+
var t = [];
|
|
150
|
+
return n.length && [u(l(e, [n], r, e.name, 5, f, t), f), s.bind(null, t, e)];
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function pe(e) {
|
|
155
|
+
var t = me(e, "string");
|
|
156
|
+
return typeof t == "symbol" ? t : t + "";
|
|
157
|
+
}
|
|
158
|
+
function me(e, t) {
|
|
159
|
+
if (typeof e != "object" || !e) return e;
|
|
160
|
+
var n;
|
|
161
|
+
if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
|
|
162
|
+
var r = n.call(e, t || "default");
|
|
163
|
+
if (typeof r != "object") return r;
|
|
164
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
165
|
+
}
|
|
166
|
+
return (t === "string" ? String : Number)(e);
|
|
167
|
+
}
|
|
168
|
+
function he(e, t, n) {
|
|
169
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
170
|
+
try {
|
|
171
|
+
Object.defineProperty(e, "name", {
|
|
172
|
+
configurable: !0,
|
|
173
|
+
value: n ? n + " " + t : t
|
|
174
|
+
});
|
|
175
|
+
} catch {}
|
|
176
|
+
return e;
|
|
177
|
+
}
|
|
178
|
+
function ge(e) {
|
|
179
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
180
|
+
return e;
|
|
181
|
+
}
|
|
182
|
+
function _e(e) {
|
|
183
|
+
return e;
|
|
184
|
+
}
|
|
185
|
+
A = [o("folder-pane-container")];
|
|
186
|
+
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
|
+
type: Boolean,
|
|
189
|
+
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
|
+
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
|
+
}
|
|
194
|
+
get [le]() {
|
|
195
|
+
return Z(h, this);
|
|
196
|
+
}
|
|
197
|
+
set subject(e) {
|
|
198
|
+
X(h, this, e);
|
|
199
|
+
}
|
|
200
|
+
get resourceLogic() {
|
|
201
|
+
return Z(g, this);
|
|
202
|
+
}
|
|
203
|
+
set resourceLogic(e) {
|
|
204
|
+
X(g, this, e);
|
|
205
|
+
}
|
|
206
|
+
get browserContext() {
|
|
207
|
+
return Z(_, this);
|
|
208
|
+
}
|
|
209
|
+
set browserContext(e) {
|
|
210
|
+
X(_, this, e);
|
|
211
|
+
}
|
|
212
|
+
get view() {
|
|
213
|
+
return Z(v, this);
|
|
214
|
+
}
|
|
215
|
+
set view(e) {
|
|
216
|
+
X(v, this, e);
|
|
217
|
+
}
|
|
218
|
+
get searchQuery() {
|
|
219
|
+
return Z(y, this);
|
|
220
|
+
}
|
|
221
|
+
set searchQuery(e) {
|
|
222
|
+
X(y, this, e);
|
|
223
|
+
}
|
|
224
|
+
get hideRootSpecialFolders() {
|
|
225
|
+
return Z(b, this);
|
|
226
|
+
}
|
|
227
|
+
set hideRootSpecialFolders(e) {
|
|
228
|
+
X(b, this, e);
|
|
229
|
+
}
|
|
230
|
+
get resourceActionMenuItems() {
|
|
231
|
+
return Z(x, this);
|
|
232
|
+
}
|
|
233
|
+
set resourceActionMenuItems(e) {
|
|
234
|
+
X(x, this, e);
|
|
235
|
+
}
|
|
236
|
+
get resources() {
|
|
237
|
+
return Z(S, this);
|
|
238
|
+
}
|
|
239
|
+
set resources(e) {
|
|
240
|
+
X(S, this, e);
|
|
241
|
+
}
|
|
242
|
+
get optimisticResources() {
|
|
243
|
+
return Z(C, this);
|
|
244
|
+
}
|
|
245
|
+
set optimisticResources(e) {
|
|
246
|
+
X(C, this, e);
|
|
247
|
+
}
|
|
248
|
+
get resourceAccess() {
|
|
249
|
+
return Z(w, this);
|
|
250
|
+
}
|
|
251
|
+
set resourceAccess(e) {
|
|
252
|
+
X(w, this, e);
|
|
253
|
+
}
|
|
254
|
+
get memberLoad() {
|
|
255
|
+
return Z(T, this);
|
|
256
|
+
}
|
|
257
|
+
set memberLoad(e) {
|
|
258
|
+
X(T, this, e);
|
|
259
|
+
}
|
|
260
|
+
get loading() {
|
|
261
|
+
return Z(E, this);
|
|
262
|
+
}
|
|
263
|
+
set loading(e) {
|
|
264
|
+
X(E, this, e);
|
|
265
|
+
}
|
|
266
|
+
get loadError() {
|
|
267
|
+
return Z(D, this);
|
|
268
|
+
}
|
|
269
|
+
set loadError(e) {
|
|
270
|
+
X(D, this, e);
|
|
271
|
+
}
|
|
272
|
+
selectResource(e) {
|
|
273
|
+
this.dispatchEvent(new CustomEvent("resource-selected", {
|
|
274
|
+
detail: { resource: e.subject },
|
|
275
|
+
bubbles: !0,
|
|
276
|
+
composed: !0
|
|
277
|
+
}));
|
|
278
|
+
}
|
|
279
|
+
handleResourceKeyDown(e, t) {
|
|
280
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.selectResource(t));
|
|
281
|
+
}
|
|
282
|
+
getVisibleMemberCount(e) {
|
|
283
|
+
if (!e.isContainer || !this.resourceLogic) return 0;
|
|
284
|
+
let t = this.resourceLogic;
|
|
285
|
+
return t.getContainerMembers(e.subject).filter((e) => !t.isHiddenFile(e)).length;
|
|
286
|
+
}
|
|
287
|
+
isRootSpecialFolder(e) {
|
|
288
|
+
if (!e.isContainer) return !1;
|
|
289
|
+
let t = c.label(e.subject).toLowerCase();
|
|
290
|
+
return t === "public" || t === "trash";
|
|
291
|
+
}
|
|
292
|
+
getResourcesFromStore() {
|
|
293
|
+
let e = this.subject ? [...n(this.subject, this.resourceLogic).values()] : [], t = this.optimisticResources.filter((t) => !e.some((e) => e.id === t.id)), r = [...e, ...t];
|
|
294
|
+
return this.hideRootSpecialFolders ? r.filter((e) => !this.isRootSpecialFolder(e)) : r;
|
|
295
|
+
}
|
|
296
|
+
addOptimisticResource(e) {
|
|
297
|
+
if (!this.resourceLogic || this.optimisticResources.some((t) => t.id === e.value)) return;
|
|
298
|
+
let t = {
|
|
299
|
+
id: e.value,
|
|
300
|
+
subject: e,
|
|
301
|
+
parentId: this.subject?.value ?? null,
|
|
302
|
+
isContainer: e.uri.endsWith("/") || this.resourceLogic.isContainer(e)
|
|
303
|
+
};
|
|
304
|
+
this.optimisticResources = [...this.optimisticResources, t], this.loadResources();
|
|
305
|
+
}
|
|
306
|
+
get visibleResources() {
|
|
307
|
+
let e = this.searchQuery.trim().toLowerCase();
|
|
308
|
+
return e ? this.resources.filter((t) => c.label(t.subject).toLowerCase().includes(e)) : this.resources;
|
|
309
|
+
}
|
|
310
|
+
async loadResources() {
|
|
311
|
+
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);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
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);
|
|
329
|
+
if (n !== this.resourceGeneration) return;
|
|
330
|
+
let i = t(r.access);
|
|
331
|
+
this.resourceAccess = new Map(this.resourceAccess).set(e.id, {
|
|
332
|
+
state: i,
|
|
333
|
+
canManageAccess: r.access.canManageAccess
|
|
334
|
+
});
|
|
335
|
+
} catch {
|
|
336
|
+
n === this.resourceGeneration && (this.resourceAccess = new Map(this.resourceAccess).set(e.id, {
|
|
337
|
+
state: "error",
|
|
338
|
+
canManageAccess: !1
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
renderAccessIndicator(e) {
|
|
343
|
+
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;
|
|
345
|
+
}
|
|
346
|
+
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 {
|
|
348
|
+
await this.browserContext.session.store.fetcher.load(this.subject, {
|
|
349
|
+
force: !0,
|
|
350
|
+
clearPreviousData: !0
|
|
351
|
+
});
|
|
352
|
+
} catch (e) {
|
|
353
|
+
await this.loadResources(), this.loadError = "The folder could not be refreshed. Showing the last known listing.", console.warn("Unable to refresh folder-pane container", e);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
await this.loadResources();
|
|
357
|
+
}
|
|
358
|
+
async loadResourceActionMenuItems(e = this.resourceGeneration) {
|
|
359
|
+
let t = ++this.actionMenuGeneration;
|
|
360
|
+
if (!this.browserContext) {
|
|
361
|
+
this.resourceActionMenuItems = /* @__PURE__ */ new Map();
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
let n = await Promise.all(this.resources.map(async (e) => {
|
|
365
|
+
let t = await s(e.subject, this.browserContext, {
|
|
366
|
+
excludedPaneNames: ["sharing"],
|
|
367
|
+
fallbackPaneName: "internal"
|
|
368
|
+
}), n = await Promise.all(t.map(async (t) => {
|
|
369
|
+
let n = t.label(e.subject, this.browserContext) || t.name, r = t.icon;
|
|
370
|
+
return {
|
|
371
|
+
label: n,
|
|
372
|
+
icon: typeof r == "function" ? await r(e.subject, this.browserContext) : r,
|
|
373
|
+
action: () => {
|
|
374
|
+
this.dispatchEvent(new CustomEvent("resource-open-pane", {
|
|
375
|
+
detail: {
|
|
376
|
+
resource: e.subject,
|
|
377
|
+
paneName: t.name
|
|
378
|
+
},
|
|
379
|
+
bubbles: !0,
|
|
380
|
+
composed: !0
|
|
381
|
+
}));
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
}));
|
|
385
|
+
return [e.id, n];
|
|
386
|
+
}));
|
|
387
|
+
e === this.resourceGeneration && t === this.actionMenuGeneration && (this.resourceActionMenuItems = new Map(n));
|
|
388
|
+
}
|
|
389
|
+
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());
|
|
391
|
+
}
|
|
392
|
+
openAccessControls(e) {
|
|
393
|
+
this.dispatchEvent(new CustomEvent(i, {
|
|
394
|
+
detail: { subjectUri: e.subject.uri },
|
|
395
|
+
bubbles: !0,
|
|
396
|
+
composed: !0
|
|
397
|
+
}));
|
|
398
|
+
}
|
|
399
|
+
renderResourceActionsMenu(e, t) {
|
|
400
|
+
return l`
|
|
401
|
+
<div
|
|
402
|
+
class="resource-actions-menu resource-actions-menu--${t}"
|
|
403
|
+
@click=${(e) => e.stopPropagation()}
|
|
404
|
+
>
|
|
405
|
+
<solid-ui-resource-actions-menu
|
|
406
|
+
.store=${this.browserContext?.session.store}
|
|
407
|
+
.subjectUri=${e.subject.uri}
|
|
408
|
+
.handleAccessClick=${() => this.openAccessControls(e)}
|
|
409
|
+
.showAccessInMenu=${!0}
|
|
410
|
+
.canManageAccess=${this.resourceAccess.get(e.id)?.canManageAccess === !0}
|
|
411
|
+
.menuItems=${this.resourceActionMenuItems.get(e.id) || []}
|
|
412
|
+
></solid-ui-resource-actions-menu>
|
|
413
|
+
</div>
|
|
414
|
+
`;
|
|
415
|
+
}
|
|
416
|
+
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`
|
|
419
|
+
<li
|
|
420
|
+
class="resource-list-item"
|
|
421
|
+
notSelectable="false"
|
|
422
|
+
aria-selected="false"
|
|
423
|
+
aria-label=${n}
|
|
424
|
+
about=${t.subject.toNT()}
|
|
425
|
+
role="option"
|
|
426
|
+
tabindex="0"
|
|
427
|
+
.subject=${t.subject}
|
|
428
|
+
@click=${() => this.selectResource(t)}
|
|
429
|
+
@keydown=${(e) => this.handleResourceKeyDown(e, t)}
|
|
430
|
+
>
|
|
431
|
+
<span class="resource-list-main">
|
|
432
|
+
<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>`}
|
|
434
|
+
</span>
|
|
435
|
+
<span class="resource-list-label">${n}</span>
|
|
436
|
+
${r >= 0 ? l`<span class="container-member-count">${e(r)}</span>` : u}
|
|
437
|
+
${this.renderAccessIndicator(t)}
|
|
438
|
+
</span>
|
|
439
|
+
${this.renderResourceActionsMenu(t, "list")}
|
|
440
|
+
</li>
|
|
441
|
+
`;
|
|
442
|
+
}
|
|
443
|
+
renderListView(e) {
|
|
444
|
+
return l`
|
|
445
|
+
<ul class="resource-list" role="listbox" aria-label="Container resources">
|
|
446
|
+
<li class="resource-list-header" role="presentation" aria-hidden="true">
|
|
447
|
+
<span>Name</span>
|
|
448
|
+
<span>Actions</span>
|
|
449
|
+
</li>
|
|
450
|
+
${e.map((e) => this.renderResourceItem(e))}
|
|
451
|
+
</ul>
|
|
452
|
+
`;
|
|
453
|
+
}
|
|
454
|
+
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`
|
|
457
|
+
<li
|
|
458
|
+
class="resource-grid-item"
|
|
459
|
+
notSelectable="false"
|
|
460
|
+
aria-selected="false"
|
|
461
|
+
aria-label=${n}
|
|
462
|
+
about=${t.subject.toNT()}
|
|
463
|
+
role="option"
|
|
464
|
+
tabindex="0"
|
|
465
|
+
.subject=${t.subject}
|
|
466
|
+
@click=${() => this.selectResource(t)}
|
|
467
|
+
@keydown=${(e) => this.handleResourceKeyDown(e, t)}
|
|
468
|
+
>
|
|
469
|
+
<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>`}
|
|
471
|
+
</span>
|
|
472
|
+
${t.isContainer ? l`<span class="resource-grid-label resource-grid-label--container">${n}</span>` : u}
|
|
473
|
+
<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>`}
|
|
475
|
+
${this.renderAccessIndicator(t)}
|
|
476
|
+
</div>
|
|
477
|
+
${this.renderResourceActionsMenu(t, "grid")}
|
|
478
|
+
</li>
|
|
479
|
+
`;
|
|
480
|
+
}
|
|
481
|
+
renderGridView(e) {
|
|
482
|
+
return l`
|
|
483
|
+
<ul class="resource-grid" role="listbox" aria-label="Container resources">
|
|
484
|
+
${e.map((e) => this.renderGridItem(e))}
|
|
485
|
+
</ul>
|
|
486
|
+
`;
|
|
487
|
+
}
|
|
488
|
+
renderEmptyContainer() {
|
|
489
|
+
return this.searchQuery.trim() ? l`
|
|
490
|
+
<div class="folder-pane-container-empty-message" role="status">
|
|
491
|
+
<h2 class="folder-pane-container-empty-message-title">No resources match this search.</h2>
|
|
492
|
+
</div>
|
|
493
|
+
` : l`
|
|
494
|
+
<div class="folder-pane-container-empty-message" role="status">
|
|
495
|
+
<div class="folder-pane-container-empty-message-icon" aria-hidden="true">
|
|
496
|
+
<icon-lucide-file-box></icon-lucide-file-box>
|
|
497
|
+
</div>
|
|
498
|
+
<h2 class="folder-pane-container-empty-message-title">This folder is empty</h2>
|
|
499
|
+
<p class="folder-pane-container-empty-message-body">Resources added to this folder will appear here.</p>
|
|
500
|
+
</div>
|
|
501
|
+
`;
|
|
502
|
+
}
|
|
503
|
+
render() {
|
|
504
|
+
let e = this.visibleResources;
|
|
505
|
+
return l`
|
|
506
|
+
<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()}
|
|
509
|
+
</div>
|
|
510
|
+
`;
|
|
511
|
+
}
|
|
512
|
+
}, {e: [M, te, re, N, F, L, z, V, U, G, q, ae, se, O], c: [$, k]} = fe(m, [
|
|
513
|
+
[
|
|
514
|
+
j,
|
|
515
|
+
1,
|
|
516
|
+
"subject"
|
|
517
|
+
],
|
|
518
|
+
[
|
|
519
|
+
ee,
|
|
520
|
+
1,
|
|
521
|
+
"resourceLogic"
|
|
522
|
+
],
|
|
523
|
+
[
|
|
524
|
+
ne,
|
|
525
|
+
1,
|
|
526
|
+
"browserContext"
|
|
527
|
+
],
|
|
528
|
+
[
|
|
529
|
+
ie,
|
|
530
|
+
1,
|
|
531
|
+
"view"
|
|
532
|
+
],
|
|
533
|
+
[
|
|
534
|
+
P,
|
|
535
|
+
1,
|
|
536
|
+
"searchQuery"
|
|
537
|
+
],
|
|
538
|
+
[
|
|
539
|
+
I,
|
|
540
|
+
1,
|
|
541
|
+
"hideRootSpecialFolders"
|
|
542
|
+
],
|
|
543
|
+
[
|
|
544
|
+
R,
|
|
545
|
+
1,
|
|
546
|
+
"resourceActionMenuItems"
|
|
547
|
+
],
|
|
548
|
+
[
|
|
549
|
+
B,
|
|
550
|
+
1,
|
|
551
|
+
"resources"
|
|
552
|
+
],
|
|
553
|
+
[
|
|
554
|
+
H,
|
|
555
|
+
1,
|
|
556
|
+
"optimisticResources"
|
|
557
|
+
],
|
|
558
|
+
[
|
|
559
|
+
W,
|
|
560
|
+
1,
|
|
561
|
+
"resourceAccess"
|
|
562
|
+
],
|
|
563
|
+
[
|
|
564
|
+
K,
|
|
565
|
+
1,
|
|
566
|
+
"memberLoad"
|
|
567
|
+
],
|
|
568
|
+
[
|
|
569
|
+
J,
|
|
570
|
+
1,
|
|
571
|
+
"loading"
|
|
572
|
+
],
|
|
573
|
+
[
|
|
574
|
+
oe,
|
|
575
|
+
1,
|
|
576
|
+
"loadError"
|
|
577
|
+
]
|
|
578
|
+
], A, 0, void 0, a), m), p = class extends _e {
|
|
579
|
+
constructor() {
|
|
580
|
+
super($), Q(this, "styles", r), k();
|
|
581
|
+
}
|
|
582
|
+
}, Q(p, ce, void 0), p)();
|
|
583
|
+
export { $ as default };
|
|
584
|
+
|
|
585
|
+
//# sourceMappingURL=FolderPaneContainer.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderPaneContainer.esm.js","names":["html","nothing","property","state","customElement","FILE_EXPLORER_MANAGE_ACCESS_EVENT","getRelevantPanes","utils","WebComponent","getContainerMemberCountLabel","getResourceAccessState","getResourcesForContainer","styles","_classDecs","_FolderPaneContainer","_FolderPaneContainer2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_ref","_subjectDecs","attribute","_resourceLogicDecs","_browserContextDecs","_viewDecs","_searchQueryDecs","_hideRootSpecialFoldersDecs","type","Boolean","_resourceActionMenuItemsDecs","_resourcesDecs","_optimisticResourcesDecs","_resourceAccessDecs","_memberLoadDecs","_loadingDecs","_loadErrorDecs","_FolderPaneContainer3","FolderPaneContainer","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_subject","undefined","_init_resourceLogic","_init_browserContext","_init_view","_init_searchQuery","_init_hideRootSpecialFolders","_init_resourceActionMenuItems","Map","_init_resources","_init_optimisticResources","_init_resourceAccess","_init_memberLoad","_init_loading","_init_loadError","_defineProperty","_classPrivateFieldGet","subject","v","_classPrivateFieldSet","resourceLogic","browserContext","view","searchQuery","hideRootSpecialFolders","resourceActionMenuItems","resources","optimisticResources","resourceAccess","memberLoad","loading","loadError","selectResource","resource","dispatchEvent","CustomEvent","detail","bubbles","composed","handleResourceKeyDown","event","target","currentTarget","key","preventDefault","getVisibleMemberCount","isContainer","getContainerMembers","filter","member","isHiddenFile","length","isRootSpecialFolder","label","toLowerCase","getResourcesFromStore","values","optimistic","some","confirmed","id","combined","addOptimisticResource","value","next","parentId","uri","endsWith","loadResources","visibleResources","query","trim","includes","generation","resourceGeneration","map","Promise","all","session","store","fetcher","load","set","error","console","warn","loadResourceAccess","loadResourceActionMenuItems","has","metadata","logic","fetchMetadata","access","canManageAccess","renderAccessIndicator","get","refresh","reloadFromServer","force","clearPreviousData","actionGeneration","actionMenuGeneration","menuItems","panes","excludedPaneNames","fallbackPaneName","items","pane","name","paneWithIcon","iconValue","icon","iconSource","action","paneName","updated","changedProperties","openAccessControls","subjectUri","renderResourceActionsMenu","placement","stopPropagation","renderResourceItem","memberCount","toNT","renderListView","renderGridItem","renderGridView","renderEmptyContainer","render","e","c","_initClass","_applyDecs","_Class","_identity","default","paneWithIcon","styles","FolderPaneContainer_styles_default","_Class","_FolderPaneContainer3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_initProto","_initClass","_classDecs","_subjectDecs","_init_subject","_resourceLogicDecs","_init_resourceLogic","_browserContextDecs","_init_browserContext","_viewDecs","_init_view","_searchQueryDecs","_init_searchQuery","_hideRootSpecialFoldersDecs","_init_hideRootSpecialFolders","_resourceActionMenuItemsDecs","_init_resourceActionMenuItems","_resourcesDecs","_init_resources","_optimisticResourcesDecs","_init_optimisticResources","_resourceAccessDecs","_init_resourceAccess","_memberLoadDecs","_init_memberLoad","_loadingDecs","_init_loading","_loadErrorDecs","_init_loadError","_FolderPaneContainer2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","customElement","_FolderPaneContainer","property","state","WebComponent","args","resource","event","resourceLogic","member","label","utils","resources","getResourcesForContainer","optimistic","confirmed","combined","subject","next","query","generation","error","metadata","getResourceAccessState","access","nothing","reloadFromServer","actionGeneration","menuItems","panes","getRelevantPanes","items","pane","iconValue","resourceGeneration","changedProperties","FILE_EXPLORER_MANAGE_ACCESS_EVENT","placement","memberCount","getContainerMemberCountLabel"],"sources":["../../../src/components/folder-pane-container/FolderPaneContainer.ts"],"sourcesContent":["import { html, nothing } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { state } from 'lit/decorators.js'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode } from 'rdflib'\nimport { customElement, FILE_EXPLORER_MANAGE_ACCESS_EVENT, getRelevantPanes, utils, WebComponent } from 'solid-ui'\nimport type { Resource } from '../../types'\nimport { getContainerMemberCountLabel, getResourceAccessState, getResourcesForContainer, type FolderPaneResourceLogic } from '../../helpers'\nimport 'solid-ui/components/resource-actions-menu'\nimport '~icons/lucide/file'\nimport '~icons/lucide/file-box'\nimport '~icons/lucide/folder'\nimport styles from './FolderPaneContainer.styles.css'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/lock-keyhole'\n\ntype ResourceActionMenuItem = {\n label: string\n icon?: string\n action: (event: Event) => void\n}\n\n@customElement('folder-pane-container')\nexport default class FolderPaneContainer extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor resourceLogic: FolderPaneResourceLogic | null = null\n\n @property({ attribute: false })\n accessor browserContext: DataBrowserContext | undefined = undefined\n\n @property()\n accessor view: 'grid' | 'list' = 'grid'\n\n @property()\n accessor searchQuery = ''\n\n @property({ type: Boolean, attribute: 'hide-root-special-folders' })\n accessor hideRootSpecialFolders = false\n\n @state()\n private accessor resourceActionMenuItems = new Map<string, ResourceActionMenuItem[]>()\n\n @state()\n private accessor resources: Resource[] = []\n @state()\n private accessor optimisticResources: Resource[] = []\n\n @state()\n private accessor resourceAccess = new Map<string, {\n state: 'public' | 'private' | 'unknown' | 'error'\n canManageAccess: boolean\n }>()\n @state()\n private accessor memberLoad = new Map<string, 'loading' | 'loaded' | 'error'>()\n\n @state()\n private accessor loading = true\n @state()\n private accessor loadError: string | undefined = undefined\n\n private actionMenuGeneration = 0\n private resourceGeneration = 0\n\n private selectResource (resource: Resource) {\n this.dispatchEvent(new CustomEvent('resource-selected', {\n detail: { resource: resource.subject },\n bubbles: true,\n composed: true,\n }))\n }\n\n private handleResourceKeyDown (event: KeyboardEvent, resource: Resource) {\n if (event.target !== event.currentTarget) return\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n this.selectResource(resource)\n }\n }\n\n private getVisibleMemberCount (resource: Resource) {\n if (!resource.isContainer || !this.resourceLogic) return 0\n const resourceLogic = this.resourceLogic\n return resourceLogic.getContainerMembers(resource.subject)\n .filter(member => !resourceLogic.isHiddenFile(member))\n .length\n }\n\n private isRootSpecialFolder (resource: Resource) {\n if (!resource.isContainer) return false\n const label = utils.label(resource.subject).toLowerCase()\n return label === 'public' || label === 'trash'\n }\n\n private getResourcesFromStore () {\n const resources = this.subject\n ? [...getResourcesForContainer(this.subject, this.resourceLogic).values()]\n : []\n\n const optimistic = this.optimisticResources.filter(resource =>\n !resources.some(confirmed => confirmed.id === resource.id))\n const combined = [...resources, ...optimistic]\n return this.hideRootSpecialFolders\n ? combined.filter(resource => !this.isRootSpecialFolder(resource))\n : combined\n }\n\n addOptimisticResource (subject: NamedNode) {\n if (!this.resourceLogic || this.optimisticResources.some(resource => resource.id === subject.value)) return\n const next: Resource = {\n id: subject.value,\n subject,\n parentId: this.subject?.value ?? null,\n isContainer: subject.uri.endsWith('/') || this.resourceLogic.isContainer(subject)\n }\n this.optimisticResources = [...this.optimisticResources, next]\n void this.loadResources()\n }\n\n private get visibleResources () {\n const query = this.searchQuery.trim().toLowerCase()\n if (!query) return this.resources\n return this.resources.filter(resource => utils.label(resource.subject).toLowerCase().includes(query))\n }\n\n private async loadResources () {\n const generation = ++this.resourceGeneration\n const resources = this.getResourcesFromStore()\n this.resources = resources\n this.loading = false\n this.loadError = undefined\n this.memberLoad = new Map(resources.filter(resource => resource.isContainer).map(resource => [resource.id, 'loading']))\n\n if (this.browserContext) {\n void Promise.all(resources\n .filter(resource => resource.isContainer)\n .map(async resource => {\n try {\n await this.browserContext?.session.store.fetcher.load(resource.subject)\n if (generation !== this.resourceGeneration) return\n this.memberLoad = new Map(this.memberLoad).set(resource.id, 'loaded')\n } catch (error) {\n console.warn('Unable to load folder-pane container member count', error)\n if (generation !== this.resourceGeneration) return\n this.memberLoad = new Map(this.memberLoad).set(resource.id, 'error')\n }\n }))\n }\n\n if (generation !== this.resourceGeneration) return\n this.resources = this.getResourcesFromStore()\n // These are advisory and must not delay the server listing.\n for (const resource of this.resources) void this.loadResourceAccess(resource, generation)\n void this.loadResourceActionMenuItems(generation)\n }\n\n private async loadResourceAccess (resource: Resource, generation = this.resourceGeneration) {\n if (this.resourceAccess.has(resource.id) || !this.browserContext) return\n try {\n const metadata = await this.browserContext.session.logic.resource.fetchMetadata(resource.subject)\n if (generation !== this.resourceGeneration) return\n const state = getResourceAccessState(metadata.access)\n this.resourceAccess = new Map(this.resourceAccess).set(resource.id, {\n state,\n canManageAccess: metadata.access.canManageAccess\n })\n } catch {\n if (generation === this.resourceGeneration) {\n this.resourceAccess = new Map(this.resourceAccess).set(resource.id, { state: 'error', canManageAccess: false })\n }\n }\n }\n\n private renderAccessIndicator (resource: Resource) {\n const access = this.resourceAccess.get(resource.id)\n if (!access) return nothing\n // The icon element has no ARIA role of its own, so `title` alone is not\n // exposed to assistive technology (WCAG 1.1.1 Non-text Content). Giving it\n // an explicit img role and label ensures the public/private state is\n // announced, not just shown as a mouse-hover tooltip.\n return access.state === 'public'\n ? html`<icon-lucide-globe class=\"resource-access-indicator resource-access-indicator--public\" role=\"img\" aria-label=\"Public\" title=\"Public\"></icon-lucide-globe>`\n : access.state === 'private'\n ? html`<icon-lucide-lock-keyhole class=\"resource-access-indicator resource-access-indicator--private\" role=\"img\" aria-label=\"Private\" title=\"Private\"></icon-lucide-lock-keyhole>`\n : nothing\n }\n\n async refresh (reloadFromServer = true) {\n this.resourceGeneration++\n this.resourceAccess = new Map()\n this.memberLoad = new Map()\n this.resourceActionMenuItems = new Map()\n this.optimisticResources = []\n if (reloadFromServer && this.subject && this.browserContext) {\n try {\n await this.browserContext.session.store.fetcher.load(this.subject, {\n force: true,\n clearPreviousData: true\n })\n } catch (error) {\n await this.loadResources()\n this.loadError = 'The folder could not be refreshed. Showing the last known listing.'\n console.warn('Unable to refresh folder-pane container', error)\n return\n }\n }\n await this.loadResources()\n }\n\n private async loadResourceActionMenuItems (resourceGeneration = this.resourceGeneration) {\n const actionGeneration = ++this.actionMenuGeneration\n if (!this.browserContext) {\n this.resourceActionMenuItems = new Map()\n return\n }\n\n const menuItems = await Promise.all(this.resources.map(async resource => {\n const panes = await getRelevantPanes(resource.subject, this.browserContext!, {\n excludedPaneNames: ['sharing'],\n fallbackPaneName: 'internal'\n })\n const items = await Promise.all(panes.map(async pane => {\n const label = pane.label(resource.subject, this.browserContext!) || pane.name\n const paneWithIcon = pane as Omit<typeof pane, 'icon'> & {\n icon?: string | ((subject: NamedNode, context: DataBrowserContext) => string | undefined | Promise<string | undefined>)\n }\n const iconValue = paneWithIcon.icon\n const iconSource = typeof iconValue === 'function'\n ? await iconValue(resource.subject, this.browserContext!)\n : iconValue\n return {\n label,\n icon: iconSource,\n action: () => {\n this.dispatchEvent(new CustomEvent('resource-open-pane', {\n detail: { resource: resource.subject, paneName: pane.name },\n bubbles: true,\n composed: true\n }))\n }\n }\n }))\n return [resource.id, items] as const\n }))\n\n if (resourceGeneration === this.resourceGeneration && actionGeneration === this.actionMenuGeneration) {\n this.resourceActionMenuItems = new Map(menuItems)\n }\n }\n\n protected updated (changedProperties: Map<string, unknown>) {\n if (\n changedProperties.has('subject') ||\n changedProperties.has('resourceLogic') ||\n changedProperties.has('browserContext') ||\n changedProperties.has('hideRootSpecialFolders')\n ) {\n this.resourceAccess = new Map()\n this.memberLoad = new Map()\n this.resourceActionMenuItems = new Map()\n void this.loadResources()\n }\n }\n\n private openAccessControls (resource: Resource) {\n this.dispatchEvent(new CustomEvent(FILE_EXPLORER_MANAGE_ACCESS_EVENT, {\n detail: { subjectUri: resource.subject.uri },\n bubbles: true,\n composed: true\n }))\n }\n\n private renderResourceActionsMenu (resource: Resource, placement: 'grid' | 'list') {\n return html`\n <div\n class=\"resource-actions-menu resource-actions-menu--${placement}\"\n @click=${(event: MouseEvent) => event.stopPropagation()}\n >\n <solid-ui-resource-actions-menu\n .store=${this.browserContext?.session.store}\n .subjectUri=${resource.subject.uri}\n .handleAccessClick=${() => this.openAccessControls(resource)}\n .showAccessInMenu=${true}\n .canManageAccess=${this.resourceAccess.get(resource.id)?.canManageAccess === true}\n .menuItems=${this.resourceActionMenuItems.get(resource.id) || []}\n ></solid-ui-resource-actions-menu>\n </div>\n `\n }\n\n private renderResourceItem (resource: Resource) {\n const label = utils.label(resource.subject)\n const memberCount = resource.isContainer && this.memberLoad.get(resource.id) === 'loaded'\n ? this.getVisibleMemberCount(resource)\n : -1\n\n return html`\n <li\n class=\"resource-list-item\"\n notSelectable=\"false\"\n aria-selected=\"false\"\n aria-label=${label}\n about=${resource.subject.toNT()}\n role=\"option\"\n tabindex=\"0\"\n .subject=${resource.subject}\n @click=${() => this.selectResource(resource)}\n @keydown=${(event: KeyboardEvent) => this.handleResourceKeyDown(event, resource)}\n >\n <span class=\"resource-list-main\">\n <span class=${resource.isContainer ? 'resource-list-icon resource-list-icon--container' : 'resource-list-icon'} aria-hidden=\"true\">\n ${resource.isContainer\n ? html`<icon-lucide-folder></icon-lucide-folder>`\n : html`<icon-lucide-file></icon-lucide-file>`}\n </span>\n <span class=\"resource-list-label\">${label}</span>\n ${memberCount >= 0\n ? html`<span class=\"container-member-count\">${getContainerMemberCountLabel(memberCount)}</span>`\n : nothing}\n ${this.renderAccessIndicator(resource)}\n </span>\n ${this.renderResourceActionsMenu(resource, 'list')}\n </li>\n `\n }\n\n private renderListView (resources: Resource[]) {\n return html`\n <ul class=\"resource-list\" role=\"listbox\" aria-label=\"Container resources\">\n <li class=\"resource-list-header\" role=\"presentation\" aria-hidden=\"true\">\n <span>Name</span>\n <span>Actions</span>\n </li>\n ${resources.map((resource) => this.renderResourceItem(resource))}\n </ul>\n `\n }\n\n private renderGridItem (resource: Resource) {\n const label = utils.label(resource.subject)\n const memberCount = resource.isContainer && this.memberLoad.get(resource.id) === 'loaded'\n ? this.getVisibleMemberCount(resource)\n : -1\n\n return html`\n <li\n class=\"resource-grid-item\"\n notSelectable=\"false\"\n aria-selected=\"false\"\n aria-label=${label}\n about=${resource.subject.toNT()}\n role=\"option\"\n tabindex=\"0\"\n .subject=${resource.subject}\n @click=${() => this.selectResource(resource)}\n @keydown=${(event: KeyboardEvent) => this.handleResourceKeyDown(event, resource)}\n >\n <span class=${resource.isContainer ? 'resource-grid-icon resource-grid-icon--container' : 'resource-grid-icon'} aria-hidden=\"true\">\n ${resource.isContainer\n ? html`<icon-lucide-folder></icon-lucide-folder>`\n : html`<icon-lucide-file></icon-lucide-file>`}\n </span>\n ${resource.isContainer\n ? html`<span class=\"resource-grid-label resource-grid-label--container\">${label}</span>`\n : nothing}\n <div class=\"resource-grid-item-footer\">\n ${resource.isContainer && memberCount >= 0\n ? html`<span class=\"container-member-count\">${getContainerMemberCountLabel(memberCount)}</span>`\n : !resource.isContainer\n ? html`<span class=\"resource-grid-label\">${label}</span>`\n : nothing}\n ${this.renderAccessIndicator(resource)}\n </div>\n ${this.renderResourceActionsMenu(resource, 'grid')}\n </li>\n `\n }\n\n private renderGridView (resources: Resource[]) {\n return html`\n <ul class=\"resource-grid\" role=\"listbox\" aria-label=\"Container resources\">\n ${resources.map(resource => this.renderGridItem(resource))}\n </ul>\n `\n }\n\n private renderEmptyContainer () {\n if (this.searchQuery.trim()) {\n return html`\n <div class=\"folder-pane-container-empty-message\" role=\"status\">\n <h2 class=\"folder-pane-container-empty-message-title\">No resources match this search.</h2>\n </div>\n `\n }\n return html`\n <div class=\"folder-pane-container-empty-message\" role=\"status\">\n <div class=\"folder-pane-container-empty-message-icon\" aria-hidden=\"true\">\n <icon-lucide-file-box></icon-lucide-file-box>\n </div>\n <h2 class=\"folder-pane-container-empty-message-title\">This folder is empty</h2>\n <p class=\"folder-pane-container-empty-message-body\">Resources added to this folder will appear here.</p>\n </div>\n `\n }\n\n render () {\n const resources = this.visibleResources\n return html`\n <div class=\"folder-pane-container-content\">\n ${this.loadError ? html`<div class=\"folder-pane-container-error\" role=\"alert\">${this.loadError}</div>` : nothing}\n ${this.loading\n ? html`<div class=\"folder-pane-container-loading\" role=\"status\">Loading resources…</div>`\n : resources.length > 0\n ? this.view === 'grid' ? this.renderGridView(resources) : this.renderListView(resources)\n : this.renderEmptyContainer()}\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcmCa,IAAA,CAQlCT,EAAc,uBAAuB,CAAC;AAAA,IAAAU;AAAA,KAAAC,MAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,IAAAJ,QAAA,GAAAK,kBAAA,IAAAL,QAAA,GAAAM,kBAAA,IAAAN,QAAA,GAAAO,kBAAA,IAAAP,QAAA,GAAAQ,kBAAA,IAAAR,QAAA,GAAAS,kBAAA,IAAAT,QAAA,GAAAU,kBAAA,IAAAV,QAAA,GAAAW,kBAAA,IAAAX,QAAA,GAAAY,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