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.
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +21 -19
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +8 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +157 -115
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -1
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js +17 -15
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -1
- package/dist/components/folder-pane-view/FolderPaneView.d.ts +3 -0
- package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -1
- package/dist/components/folder-pane-view/FolderPaneView.esm.js +99 -80
- package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -1
- package/dist/folderPane.cjs.js +1 -1
- package/dist/folderPane.cjs.js.map +1 -1
- package/dist/folderPane.d.ts +13 -0
- package/dist/folderPane.d.ts.map +1 -1
- package/dist/folderPane.esm.js +16 -6
- package/dist/folderPane.esm.js.map +1 -1
- package/dist/requestQueue.cjs.js +2 -0
- package/dist/requestQueue.cjs.js.map +1 -0
- package/dist/requestQueue.d.ts +30 -0
- package/dist/requestQueue.d.ts.map +1 -0
- package/dist/requestQueue.esm.js +67 -0
- package/dist/requestQueue.esm.js.map +1 -0
- package/package.json +1 -1
|
@@ -15,32 +15,32 @@ import "solid-ui/components/file-explorer-provider";
|
|
|
15
15
|
import "solid-ui/components/error-state";
|
|
16
16
|
import "solid-ui/components/file-explorer-header";
|
|
17
17
|
// src/components/folder-pane-view/FolderPaneView.ts
|
|
18
|
-
var ee, te, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he, ge, N, P, F, I,
|
|
19
|
-
function
|
|
20
|
-
return (t =
|
|
18
|
+
var ee, te, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he, ge, _e, N, P, F, I, ve, ye, be, xe, Se, Ce, L;
|
|
19
|
+
function R(e, t, n) {
|
|
20
|
+
return (t = De(t)) in e ? Object.defineProperty(e, t, {
|
|
21
21
|
value: n,
|
|
22
22
|
enumerable: !0,
|
|
23
23
|
configurable: !0,
|
|
24
24
|
writable: !0
|
|
25
25
|
}) : e[t] = n, e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
27
|
+
function z(e, t, n) {
|
|
28
|
+
we(e, t), t.set(e, n);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function we(e, t) {
|
|
31
31
|
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return e.set(
|
|
33
|
+
function B(e, t, n) {
|
|
34
|
+
return e.set(Te(e, t), n), n;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return e.get(
|
|
36
|
+
function V(e, t) {
|
|
37
|
+
return e.get(Te(e, t));
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Te(e, t, n) {
|
|
40
40
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
41
41
|
throw TypeError("Private element is not present on this object");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Ee(e, t, n, r, i, a) {
|
|
44
44
|
function o(e, t, n) {
|
|
45
45
|
return function(r, i) {
|
|
46
46
|
return n && n(r), e[t].call(r, i);
|
|
@@ -63,13 +63,13 @@ function Ce(e, t, n, r, i, a) {
|
|
|
63
63
|
n || Array.isArray(_) || (_ = [_]);
|
|
64
64
|
var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
|
|
65
65
|
d ? (f || p ? b = {
|
|
66
|
-
get:
|
|
66
|
+
get: ke(function() {
|
|
67
67
|
return v(this);
|
|
68
68
|
}, r, "get"),
|
|
69
69
|
set: function(e) {
|
|
70
70
|
t[4](this, e);
|
|
71
71
|
}
|
|
72
|
-
} : b[S] = v, f ||
|
|
72
|
+
} : b[S] = v, f || ke(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
|
|
73
73
|
}
|
|
74
74
|
for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
|
|
75
75
|
var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
|
|
@@ -129,7 +129,7 @@ function Ce(e, t, n, r, i, a) {
|
|
|
129
129
|
if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
130
130
|
var f = Object.create(d ?? null), p = function(e, t, n, r) {
|
|
131
131
|
var i, a, o = [], c = function(t) {
|
|
132
|
-
return
|
|
132
|
+
return Ae(t) === e;
|
|
133
133
|
}, u = /* @__PURE__ */ new Map();
|
|
134
134
|
function d(e) {
|
|
135
135
|
e && o.push(s.bind(null, e));
|
|
@@ -143,7 +143,7 @@ function Ce(e, t, n, r, i, a) {
|
|
|
143
143
|
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);
|
|
144
144
|
u.set(b, !(m > 2) || m);
|
|
145
145
|
}
|
|
146
|
-
l(v ? e : e.prototype, p, _, g ? "#" + h :
|
|
146
|
+
l(v ? e : e.prototype, p, _, g ? "#" + h : De(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
return d(i), d(a), o;
|
|
@@ -156,11 +156,11 @@ function Ce(e, t, n, r, i, a) {
|
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
var t =
|
|
159
|
+
function De(e) {
|
|
160
|
+
var t = Oe(e, "string");
|
|
161
161
|
return typeof t == "symbol" ? t : t + "";
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Oe(e, t) {
|
|
164
164
|
if (typeof e != "object" || !e) return e;
|
|
165
165
|
var n;
|
|
166
166
|
if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
|
|
@@ -170,7 +170,7 @@ function Te(e, t) {
|
|
|
170
170
|
}
|
|
171
171
|
return (t === "string" ? String : Number)(e);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function ke(e, t, n) {
|
|
174
174
|
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
175
175
|
try {
|
|
176
176
|
Object.defineProperty(e, "name", {
|
|
@@ -180,20 +180,23 @@ function Ee(e, t, n) {
|
|
|
180
180
|
} catch {}
|
|
181
181
|
return e;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Ae(e) {
|
|
184
184
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
185
185
|
return e;
|
|
186
186
|
}
|
|
187
187
|
re = [y("folder-pane-view")];
|
|
188
|
-
var
|
|
189
|
-
|
|
188
|
+
var je, H = /*#__PURE__*/ new WeakMap(), U = /*#__PURE__*/ new WeakMap(), W = /*#__PURE__*/ new WeakMap(), G = /*#__PURE__*/ new WeakMap(), K = /*#__PURE__*/ new WeakMap(), q = /*#__PURE__*/ new WeakMap(), J = /*#__PURE__*/ new WeakMap(), Y = /*#__PURE__*/ new WeakMap(), X = /*#__PURE__*/ new WeakMap(), Z = /*#__PURE__*/ new WeakMap(), Q = /*#__PURE__*/ new WeakMap(), $ = /*#__PURE__*/ new WeakMap();
|
|
189
|
+
L = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
190
190
|
type: Boolean,
|
|
191
191
|
attribute: "full-view"
|
|
192
|
-
}), ue =
|
|
192
|
+
}), ue = A({
|
|
193
|
+
type: Boolean,
|
|
194
|
+
attribute: "hide-storage-header"
|
|
195
|
+
}), fe = M(), me = M(), ge = M(), N = M(), F = j("folder-pane-content"), ve = j(".folder-pane-full-view"), be = j("folder-pane-sidebar"), Se = j(".folder-pane-status"), "browserContext"), ee = class extends g {
|
|
193
196
|
constructor(...e) {
|
|
194
|
-
super(...e),
|
|
197
|
+
super(...e), z(this, H, (te(this), ae(this, void 0))), z(this, U, se(this, void 0)), z(this, W, le(this, !1)), z(this, G, de(this, !1)), z(this, K, pe(this, void 0)), z(this, q, he(this, "grid")), z(this, J, _e(this, "")), z(this, Y, P(this, void 0)), R(this, "initialLoadGeneration", 0), R(this, "renderGeneration", 0), R(this, "creationInFlight", !1), R(this, "authListenersAttached", !1), R(this, "dropProtectionAttached", !1), z(this, X, I(this, null)), z(this, Z, ye(this, null)), z(this, Q, xe(this, null)), z(this, $, Ce(this, null)), R(this, "handleAuthChange", () => {
|
|
195
198
|
this.requestUpdate();
|
|
196
|
-
}),
|
|
199
|
+
}), R(this, "handleCreatePane", async (e) => {
|
|
197
200
|
if (e.stopPropagation(), this.creationInFlight || !D.currentUser()) return;
|
|
198
201
|
let t = e.detail?.pane;
|
|
199
202
|
if (!t?.mintNew) return;
|
|
@@ -235,7 +238,7 @@ be = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
|
235
238
|
} finally {
|
|
236
239
|
this.creationInFlight = !1;
|
|
237
240
|
}
|
|
238
|
-
}),
|
|
241
|
+
}), R(this, "handleUpload", (e) => {
|
|
239
242
|
if (e.stopPropagation(), this.creationInFlight || !D.currentUser()) return;
|
|
240
243
|
let t = this.getActiveContainer(), n = this.statusArea;
|
|
241
244
|
if (!t || !n || !this.store) return;
|
|
@@ -258,102 +261,108 @@ be = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
|
258
261
|
p(n, "error", t), s();
|
|
259
262
|
});
|
|
260
263
|
}), r.click();
|
|
261
|
-
}),
|
|
264
|
+
}), R(this, "clearContentError", () => {
|
|
262
265
|
this.contentError = void 0;
|
|
263
|
-
}),
|
|
266
|
+
}), R(this, "retryContent", () => {
|
|
264
267
|
let e = this.selectedResource, t = this.subject;
|
|
265
268
|
(e || t) && (this.clearContentError(), e ? this.showResourceInContentView(e) : t && this.showInitialContainer(t));
|
|
266
|
-
}),
|
|
269
|
+
}), R(this, "handleResourceSelected", (e) => {
|
|
267
270
|
let t = e.detail?.resource;
|
|
268
271
|
t && (e.stopPropagation(), this.searchQuery = "", this.showSubject(t));
|
|
269
|
-
}),
|
|
272
|
+
}), R(this, "handleResourceOpenPane", (e) => {
|
|
270
273
|
let t = e.detail?.resource, n = e.detail?.paneName, r = n ? this.browserContext?.session.paneRegistry.byName(n) : void 0;
|
|
271
274
|
t && r && (e.stopPropagation(), this.searchQuery = "", this.showSubject(t, typeof r?.render == "function" ? r : void 0));
|
|
272
|
-
}),
|
|
275
|
+
}), R(this, "handleSelectHome", () => {
|
|
273
276
|
this.searchQuery = "", this.subject && this.showSubject(this.subject);
|
|
274
|
-
}),
|
|
277
|
+
}), R(this, "handleSearch", (e) => {
|
|
275
278
|
e.stopPropagation(), this.searchQuery = e.detail?.query || "";
|
|
276
279
|
let t = this.resourceTarget?.querySelector("folder-pane-container");
|
|
277
280
|
t && (t.searchQuery = this.searchQuery);
|
|
278
|
-
}),
|
|
281
|
+
}), R(this, "handleSelectBreadcrumbResource", (e) => {
|
|
279
282
|
let t = e.detail?.resource;
|
|
280
283
|
t && (e.stopPropagation(), this.showSubject(t));
|
|
281
|
-
}),
|
|
284
|
+
}), R(this, "handleContainerViewChange", (e) => {
|
|
282
285
|
let t = e.detail?.view;
|
|
283
286
|
t && (e.stopPropagation(), this.setContainerView(t));
|
|
284
287
|
});
|
|
285
288
|
}
|
|
286
|
-
get [
|
|
287
|
-
return H
|
|
289
|
+
get [L]() {
|
|
290
|
+
return V(H, this);
|
|
288
291
|
}
|
|
289
292
|
set browserContext(e) {
|
|
290
|
-
|
|
293
|
+
B(H, this, e);
|
|
291
294
|
}
|
|
292
295
|
get store() {
|
|
293
296
|
return this.browserContext?.session.store;
|
|
294
297
|
}
|
|
295
298
|
get subject() {
|
|
296
|
-
return
|
|
299
|
+
return V(U, this);
|
|
297
300
|
}
|
|
298
301
|
set subject(e) {
|
|
299
|
-
|
|
302
|
+
B(U, this, e);
|
|
300
303
|
}
|
|
301
304
|
get resourceLogic() {
|
|
302
305
|
return this.browserContext?.session.logic.resource;
|
|
303
306
|
}
|
|
304
307
|
get fullView() {
|
|
305
|
-
return
|
|
308
|
+
return V(W, this);
|
|
306
309
|
}
|
|
307
310
|
set fullView(e) {
|
|
308
|
-
|
|
311
|
+
B(W, this, e);
|
|
312
|
+
}
|
|
313
|
+
get hideStorageHeader() {
|
|
314
|
+
return V(G, this);
|
|
315
|
+
}
|
|
316
|
+
set hideStorageHeader(e) {
|
|
317
|
+
B(G, this, e);
|
|
309
318
|
}
|
|
310
319
|
get selectedResource() {
|
|
311
|
-
return
|
|
320
|
+
return V(K, this);
|
|
312
321
|
}
|
|
313
322
|
set selectedResource(e) {
|
|
314
|
-
|
|
323
|
+
B(K, this, e);
|
|
315
324
|
}
|
|
316
325
|
get containerView() {
|
|
317
|
-
return
|
|
326
|
+
return V(q, this);
|
|
318
327
|
}
|
|
319
328
|
set containerView(e) {
|
|
320
|
-
|
|
329
|
+
B(q, this, e);
|
|
321
330
|
}
|
|
322
331
|
get searchQuery() {
|
|
323
|
-
return
|
|
332
|
+
return V(J, this);
|
|
324
333
|
}
|
|
325
334
|
set searchQuery(e) {
|
|
326
|
-
|
|
335
|
+
B(J, this, e);
|
|
327
336
|
}
|
|
328
337
|
get contentError() {
|
|
329
|
-
return
|
|
338
|
+
return V(Y, this);
|
|
330
339
|
}
|
|
331
340
|
set contentError(e) {
|
|
332
|
-
|
|
341
|
+
B(Y, this, e);
|
|
333
342
|
}
|
|
334
343
|
get contentView() {
|
|
335
|
-
return
|
|
344
|
+
return V(X, this);
|
|
336
345
|
}
|
|
337
346
|
set contentView(e) {
|
|
338
|
-
|
|
347
|
+
B(X, this, e);
|
|
339
348
|
}
|
|
340
349
|
get fullViewTarget() {
|
|
341
|
-
return
|
|
350
|
+
return V(Z, this);
|
|
342
351
|
}
|
|
343
352
|
set fullViewTarget(e) {
|
|
344
|
-
|
|
353
|
+
B(Z, this, e);
|
|
345
354
|
}
|
|
346
355
|
get sidebar() {
|
|
347
|
-
return
|
|
356
|
+
return V(Q, this);
|
|
348
357
|
}
|
|
349
358
|
set sidebar(e) {
|
|
350
|
-
|
|
359
|
+
B(Q, this, e);
|
|
351
360
|
}
|
|
352
361
|
get statusArea() {
|
|
353
|
-
return
|
|
362
|
+
return V($, this);
|
|
354
363
|
}
|
|
355
364
|
set statusArea(e) {
|
|
356
|
-
|
|
365
|
+
B($, this, e);
|
|
357
366
|
}
|
|
358
367
|
createRenderRoot() {
|
|
359
368
|
return this;
|
|
@@ -621,19 +630,7 @@ be = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
|
621
630
|
@resource-open-pane=${this.handleResourceOpenPane}
|
|
622
631
|
></div>
|
|
623
632
|
` : O`
|
|
624
|
-
|
|
625
|
-
.subject=${this.subject}
|
|
626
|
-
.selectedResource=${this.selectedResource ?? this.subject}
|
|
627
|
-
.browserContext=${this.browserContext}
|
|
628
|
-
.paneList=${this.browserContext?.session.paneRegistry.list ?? []}
|
|
629
|
-
.view=${this.containerView}
|
|
630
|
-
.searchQuery=${this.searchQuery}
|
|
631
|
-
.canCreate=${!!D.currentUser()}
|
|
632
|
-
@folder-pane-select-home=${this.handleSelectHome}
|
|
633
|
-
@folder-pane-select-resource=${this.handleSelectBreadcrumbResource}
|
|
634
|
-
@folder-pane-change-view=${this.handleContainerViewChange}
|
|
635
|
-
@folder-pane-search=${this.handleSearch}
|
|
636
|
-
></folder-pane-storage-header>
|
|
633
|
+
${this.hideStorageHeader ? k : this.renderStorageHeader()}
|
|
637
634
|
<div
|
|
638
635
|
class="folder-pane-main-content"
|
|
639
636
|
@resource-selected=${this.handleResourceSelected}
|
|
@@ -651,6 +648,23 @@ be = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
|
651
648
|
<folder-pane-content ?hidden=${!!this.contentError}></folder-pane-content>
|
|
652
649
|
</div>
|
|
653
650
|
</div>
|
|
651
|
+
`;
|
|
652
|
+
}
|
|
653
|
+
renderStorageHeader() {
|
|
654
|
+
return O`
|
|
655
|
+
<folder-pane-storage-header
|
|
656
|
+
.subject=${this.subject}
|
|
657
|
+
.selectedResource=${this.selectedResource ?? this.subject}
|
|
658
|
+
.browserContext=${this.browserContext}
|
|
659
|
+
.paneList=${this.browserContext?.session.paneRegistry.list ?? []}
|
|
660
|
+
.view=${this.containerView}
|
|
661
|
+
.searchQuery=${this.searchQuery}
|
|
662
|
+
.canCreate=${!!D.currentUser()}
|
|
663
|
+
@folder-pane-select-home=${this.handleSelectHome}
|
|
664
|
+
@folder-pane-select-resource=${this.handleSelectBreadcrumbResource}
|
|
665
|
+
@folder-pane-change-view=${this.handleContainerViewChange}
|
|
666
|
+
@folder-pane-search=${this.handleSearch}
|
|
667
|
+
></folder-pane-storage-header>
|
|
654
668
|
`;
|
|
655
669
|
}
|
|
656
670
|
renderContentError() {
|
|
@@ -666,7 +680,7 @@ be = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
|
666
680
|
</div>
|
|
667
681
|
` : k;
|
|
668
682
|
}
|
|
669
|
-
}, {e: [ae, se, le, de, pe, he,
|
|
683
|
+
}, {e: [ae, se, le, de, pe, he, _e, P, I, ye, xe, Ce, te], c: [je, ne]} = Ee(ee, [
|
|
670
684
|
[
|
|
671
685
|
ie,
|
|
672
686
|
1,
|
|
@@ -685,44 +699,49 @@ be = (ie = A({ attribute: !1 }), oe = A({ attribute: !1 }), ce = A({
|
|
|
685
699
|
[
|
|
686
700
|
ue,
|
|
687
701
|
1,
|
|
688
|
-
"
|
|
702
|
+
"hideStorageHeader"
|
|
689
703
|
],
|
|
690
704
|
[
|
|
691
705
|
fe,
|
|
692
706
|
1,
|
|
693
|
-
"
|
|
707
|
+
"selectedResource"
|
|
694
708
|
],
|
|
695
709
|
[
|
|
696
710
|
me,
|
|
697
711
|
1,
|
|
698
|
-
"
|
|
712
|
+
"containerView"
|
|
699
713
|
],
|
|
700
714
|
[
|
|
701
715
|
ge,
|
|
702
716
|
1,
|
|
717
|
+
"searchQuery"
|
|
718
|
+
],
|
|
719
|
+
[
|
|
720
|
+
N,
|
|
721
|
+
1,
|
|
703
722
|
"contentError"
|
|
704
723
|
],
|
|
705
724
|
[
|
|
706
|
-
|
|
725
|
+
F,
|
|
707
726
|
1,
|
|
708
727
|
"contentView"
|
|
709
728
|
],
|
|
710
729
|
[
|
|
711
|
-
|
|
730
|
+
ve,
|
|
712
731
|
1,
|
|
713
732
|
"fullViewTarget"
|
|
714
733
|
],
|
|
715
734
|
[
|
|
716
|
-
|
|
735
|
+
be,
|
|
717
736
|
1,
|
|
718
737
|
"sidebar"
|
|
719
738
|
],
|
|
720
739
|
[
|
|
721
|
-
|
|
740
|
+
Se,
|
|
722
741
|
1,
|
|
723
742
|
"statusArea"
|
|
724
743
|
]
|
|
725
744
|
], re, 0, void 0, g), ne();
|
|
726
|
-
export {
|
|
745
|
+
export { je as default };
|
|
727
746
|
|
|
728
747
|
//# sourceMappingURL=FolderPaneView.esm.js.map
|