solid-panes 5.0.0-0 → 5.0.0-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/RDFXMLPane.d.ts.map +1 -1
- package/dist/RDFXMLPane2.cjs.js +1 -2
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/RDFXMLPane2.esm.js +15 -42
- package/dist/RDFXMLPane2.esm.js.map +1 -1
- 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/{trash-2.esm.js → folder.esm.js} +4 -4
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -0
- package/dist/components/editor-card/EditorCard.cjs.js +6 -0
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.d.ts +16 -0
- package/dist/components/editor-card/EditorCard.d.ts.map +1 -0
- package/dist/components/editor-card/EditorCard.esm.js +268 -0
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js +2 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js +7 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -0
- package/dist/components/editor-card/index.cjs.js +1 -0
- package/dist/components/editor-card/index.d.ts +4 -0
- package/dist/components/editor-card/index.d.ts.map +1 -0
- package/dist/components/editor-card/index.esm.js +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +1 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +16 -16
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +24 -14
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +7 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +94 -66
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +22 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +3 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +90 -65
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +4 -4
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +17 -16
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
- package/dist/components/file-explorer-header/index.cjs.js +1 -0
- package/dist/components/file-explorer-header/index.d.ts +3 -0
- package/dist/components/file-explorer-header/index.d.ts.map +1 -0
- package/dist/components/file-explorer-header/index.esm.js +2 -0
- package/dist/components/file-explorer-header/types.d.ts +8 -0
- package/dist/components/file-explorer-header/types.d.ts.map +1 -1
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.esm.js +4 -4
- package/dist/components/header/Header.styles.cjs.js +1 -1
- package/dist/components/header/Header.styles.cjs.js.map +1 -1
- package/dist/components/header/Header.styles.esm.js +1 -1
- package/dist/components/header/Header.styles.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.cjs.js +2 -2
- package/dist/components/navbar/Navbar.esm.js +5 -5
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +23 -9
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +7 -4
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +146 -84
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +2 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +7 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -0
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.esm.js +1 -1
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.cjs.js.map +1 -1
- package/dist/defaultPane2.esm.js +2 -2
- package/dist/defaultPane2.esm.js.map +1 -1
- package/dist/home/homePane.cjs.js +1 -1
- package/dist/home/homePane.cjs.js.map +1 -1
- package/dist/home/homePane.esm.js +1 -1
- package/dist/home/homePane.esm.js.map +1 -1
- package/dist/humanReadablePane.d.ts +1 -1
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +1 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +2 -2
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +1 -1
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/internal/internalPane2.esm.js +2 -2
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/n3Pane.d.ts.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -2
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/n3Pane2.esm.js +10 -34
- package/dist/n3Pane2.esm.js.map +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +8 -11
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/queryByExample.cjs.js +1 -1
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +4 -4
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +1 -1
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +2 -2
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.cjs.js.map +1 -1
- package/dist/pad/padPane2.esm.js +3 -3
- package/dist/pad/padPane2.esm.js.map +1 -1
- package/dist/playlist/playlistPane.cjs.js +1 -1
- package/dist/playlist/playlistPane.cjs.js.map +1 -1
- package/dist/playlist/playlistPane.esm.js +1 -1
- package/dist/playlist/playlistPane.esm.js.map +1 -1
- package/dist/sharing/sharingPane.cjs.js +1 -1
- package/dist/sharing/sharingPane.cjs.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -1
- package/dist/sharing/sharingPane.esm.js.map +1 -1
- package/dist/social/socialPane2.cjs.js +2 -2
- package/dist/social/socialPane2.cjs.js.map +1 -1
- package/dist/social/socialPane2.esm.js +3 -3
- package/dist/social/socialPane2.esm.js.map +1 -1
- package/dist/social/triage.cjs.js +1 -1
- package/dist/social/triage.cjs.js.map +1 -1
- package/dist/social/triage.esm.js +1 -1
- package/dist/social/triage.esm.js.map +1 -1
- package/dist/transaction/period.cjs.js +1 -1
- package/dist/transaction/period.cjs.js.map +1 -1
- package/dist/transaction/period.esm.js +1 -1
- package/dist/transaction/period.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/podUtils.d.ts +6 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +93 -22
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +3 -3
- package/dist/versionInfo.esm.js.map +1 -1
- package/package.json +5 -5
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
- package/dist/components/file-explorer-header/helper.cjs.js +0 -2
- package/dist/components/file-explorer-header/helper.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/helper.d.ts +0 -15
- package/dist/components/file-explorer-header/helper.d.ts.map +0 -1
- package/dist/components/file-explorer-header/helper.esm.js +0 -64
- package/dist/components/file-explorer-header/helper.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +0 -16
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +0 -215
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import "../../_virtual/~icons/lucide/share-2.esm.js";
|
|
1
2
|
import "./FileExplorerHeader.esm.js";
|
|
2
3
|
import e from "./FileExplorerProvider.styles.esm.js";
|
|
3
4
|
import t from "../../icons/person.esm.js";
|
|
4
5
|
import n from "../../icons/friends.esm.js";
|
|
5
6
|
import { WebComponent as r, fileExplorerContext as i, utils as a } from "solid-ui";
|
|
6
|
-
import {
|
|
7
|
-
import { provide as
|
|
8
|
-
import {
|
|
7
|
+
import { customElement as o, property as s, state as c } from "lit/decorators.js";
|
|
8
|
+
import { provide as l } from "@lit/context";
|
|
9
|
+
import { html as u, nothing as d } from "lit";
|
|
9
10
|
//#region src/components/file-explorer-header/FileExplorerProvider.ts
|
|
10
11
|
var f, p, 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, fe, pe, me, he, ge, _e, ve;
|
|
11
12
|
function J(e, t, n) {
|
|
@@ -188,14 +189,14 @@ function Oe(e) {
|
|
|
188
189
|
soloPane: e.soloPane,
|
|
189
190
|
onBack: e.onBack,
|
|
190
191
|
openPane: e.openPane,
|
|
191
|
-
|
|
192
|
+
handleAccessClick: e.handleAccessClick,
|
|
192
193
|
paneSupportsEditing: e.paneSupportsEditing,
|
|
193
194
|
edit: e.edit
|
|
194
195
|
};
|
|
195
196
|
}
|
|
196
|
-
ee = [
|
|
197
|
+
ee = [o("file-explorer-provider")];
|
|
197
198
|
var $;
|
|
198
|
-
new (_e = (m = /*#__PURE__*/ new WeakMap(), 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(), O = /*#__PURE__*/ new WeakMap(), k = /*#__PURE__*/ new WeakMap(), ve = (te =
|
|
199
|
+
new (_e = (m = /*#__PURE__*/ new WeakMap(), 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(), O = /*#__PURE__*/ new WeakMap(), k = /*#__PURE__*/ new WeakMap(), ve = (te = s({ attribute: !1 }), re = s({ attribute: !1 }), ae = s({ attribute: !1 }), M = s({ attribute: !1 }), P = s({ attribute: !1 }), I = s({ attribute: !1 }), R = s({ attribute: !1 }), B = s({ attribute: !1 }), H = s({ attribute: !1 }), W = s({ attribute: !1 }), K = c(), se = c(), le = c(), de = c(), pe = c(), he = l({ context: i }), "context"), p = class extends r {
|
|
199
200
|
constructor(...e) {
|
|
200
201
|
super(...e), J(this, m, (A(this), ne(this, void 0))), J(this, h, ie(this, void 0)), J(this, g, oe(this, void 0)), J(this, _, N(this, [])), J(this, v, F(this, void 0)), J(this, y, L(this, {})), J(this, b, z(this, !0)), J(this, x, V(this, void 0)), J(this, S, U(this, void 0)), J(this, C, G(this, void 0)), J(this, w, q(this, [])), J(this, T, ce(this, !1)), J(this, E, ue(this, !1)), J(this, D, fe(this, !1)), Z(this, "beginEditingInSourcePane", () => {
|
|
201
202
|
this.querySelector("source-pane-source-provider")?.beginEditing?.();
|
|
@@ -215,7 +216,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
215
216
|
soloPane: this.soloPane,
|
|
216
217
|
onBack: this.onBack,
|
|
217
218
|
openPane: this.openPane,
|
|
218
|
-
|
|
219
|
+
handleAccessClick: this.handleAccessClick,
|
|
219
220
|
paneSupportsEditing: !1,
|
|
220
221
|
edit: this.edit
|
|
221
222
|
})));
|
|
@@ -262,10 +263,10 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
262
263
|
set showHeader(e) {
|
|
263
264
|
Y(b, this, e);
|
|
264
265
|
}
|
|
265
|
-
get
|
|
266
|
+
get handleAccessClick() {
|
|
266
267
|
return X(x, this);
|
|
267
268
|
}
|
|
268
|
-
set
|
|
269
|
+
set handleAccessClick(e) {
|
|
269
270
|
Y(x, this, e);
|
|
270
271
|
}
|
|
271
272
|
get soloPane() {
|
|
@@ -317,7 +318,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
317
318
|
Y(k, this, e);
|
|
318
319
|
}
|
|
319
320
|
openSelectedPane(e) {
|
|
320
|
-
|
|
321
|
+
this.context?.session.store && this.subjectUri && (this.paneSupportsEditing = e.name === "source", this.pane = e);
|
|
321
322
|
}
|
|
322
323
|
getPaneIcon(e, t, n) {
|
|
323
324
|
if (e) return typeof e.icon == "function" ? e.icon(t, n) : e.icon;
|
|
@@ -343,7 +344,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
343
344
|
soloPane: this.soloPane,
|
|
344
345
|
onBack: this.onBack,
|
|
345
346
|
openPane: this.openPane,
|
|
346
|
-
|
|
347
|
+
handleAccessClick: this.handleAccessClick,
|
|
347
348
|
paneSupportsEditing: this.paneSupportsEditing,
|
|
348
349
|
edit: this.edit
|
|
349
350
|
});
|
|
@@ -359,19 +360,19 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
359
360
|
if (!this.subjectUri) throw Error("The element is missing the required `subjectUri` property.");
|
|
360
361
|
(e.has("subjectUri") || e.has("relevantPanes") || e.has("context")) && this.refreshMenuItems().catch((e) => {
|
|
361
362
|
console.warn("Failed to refresh menu items", e);
|
|
362
|
-
}), (e.has("pane") || e.has("subjectUri") || e.has("context")) && (this.paneSupportsEditing = this.pane?.name === "source"), (e.has("context") || e.has("subjectUri") || e.has("pane") || e.has("soloPane") || e.has("onBack") || e.has("openPane") || e.has("
|
|
363
|
+
}), (e.has("pane") || e.has("subjectUri") || e.has("context")) && (this.paneSupportsEditing = this.pane?.name === "source"), (e.has("context") || e.has("subjectUri") || e.has("pane") || e.has("soloPane") || e.has("onBack") || e.has("openPane") || e.has("handleAccessClick") || e.has("pane") || e.has("isDirty")) && this.refreshFileExplorerContextValue();
|
|
363
364
|
}
|
|
364
365
|
render() {
|
|
365
366
|
let e = (this.context?.session.store).sym(this.subjectUri);
|
|
366
|
-
return
|
|
367
|
+
return u`
|
|
367
368
|
<div class="file-explorer-provider">
|
|
368
|
-
${this.showHeader ?
|
|
369
|
+
${this.showHeader ? u`
|
|
369
370
|
<file-explorer-header
|
|
370
371
|
.paneIcon=${this.getPaneIcon(this.pane, e, this.context)}
|
|
371
372
|
.menuItems=${this.menuItems}
|
|
372
373
|
.paneSupportsEditing=${this.paneSupportsEditing}
|
|
373
374
|
></file-explorer-header>
|
|
374
|
-
` :
|
|
375
|
+
` : d}
|
|
375
376
|
<slot class="pane"></slot>
|
|
376
377
|
</div>
|
|
377
378
|
`;
|
|
@@ -415,7 +416,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
415
416
|
[
|
|
416
417
|
B,
|
|
417
418
|
1,
|
|
418
|
-
"
|
|
419
|
+
"handleAccessClick"
|
|
419
420
|
],
|
|
420
421
|
[
|
|
421
422
|
H,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerProvider.esm.js","names":["html","nothing","utils","WebComponent","provide","fileExplorerContext","customElement","property","state","styles","personIcon","friendsIcon","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","store","subjectUri","pane","soloPane","onBack","openPane","handleSharingClick","paneSupportsEditing","edit","_classDecs","_FileExplorerProvider","_FileExplorerProvider2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_ref","_contextDecs","attribute","_subjectUriDecs","_onBackDecs","_relevantPanesDecs","_paneDecs","_paneRenderOptionsDecs","_showHeaderDecs","_handleSharingClickDecs","_soloPaneDecs","_openPaneDecs","_menuItemsDecs","_isEditingDecs","_isDirtyDecs","_paneSupportsEditingDecs","_editDecs","_fileExplorerContextValueDecs","context","_FileExplorerProvider3","FileExplorerProvider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_context","undefined","_init_subjectUri","_init_onBack","_init_relevantPanes","_init_pane","_init_paneRenderOptions","_init_showHeader","_init_handleSharingClick","_init_soloPane","_init_openPane","_init_menuItems","_init_isEditing","_init_isDirty","_init_paneSupportsEditing","_defineProperty","sourceProvider","querySelector","beginEditing","_init_edit","onEdit","beginEditingInSourcePane","isDirty","updateDirtyState","dirty","refreshFileExplorerContextValue","_init_fileExplorerContextValue","session","_classPrivateFieldGet","v","_classPrivateFieldSet","relevantPanes","paneRenderOptions","showHeader","menuItems","isEditing","fileExplorerContextValue","openSelectedPane","name","getPaneIcon","subject","icon","getPaneItems","dom","Promise","all","map","label","iconSrc","AJARImage","setAttribute","action","refreshMenuItems","sym","willUpdate","changedProperties","Error","has","catch","error","console","warn","render","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit'\nimport type { NamedNode, LiveStore } from 'rdflib'\nimport { DataBrowserContext, type PaneDefinition } from 'pane-registry'\nimport { utils, WebComponent } from 'solid-ui'\nimport { provide } from '@lit/context'\nimport { fileExplorerContext, type FileExplorerContext, type FileExplorerEdit } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './FileExplorerHeader'\nimport styles from './FileExplorerProvider.styles.css'\nimport personIcon from '../../icons/person.svg'\nimport friendsIcon from '../../icons/friends.svg'\n\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nfunction createFileExplorerContextValue (value: {\n store: LiveStore | undefined\n subjectUri: string | undefined\n pane?: PaneDefinition\n soloPane?: boolean\n onBack?: () => void\n openPane?: (subject: NamedNode, paneName: string) => void\n handleSharingClick?: () => void\n paneSupportsEditing?: boolean\n edit?: {\n onEdit?: () => void\n isDirty?: boolean\n updateDirtyState?: (dirty: boolean) => void\n }\n}): FileExplorerContext {\n return {\n store: value.store as LiveStore,\n subjectUri: value.subjectUri,\n pane: value.pane,\n soloPane: value.soloPane,\n onBack: value.onBack,\n openPane: value.openPane,\n handleSharingClick: value.handleSharingClick,\n paneSupportsEditing: value.paneSupportsEditing,\n edit: value.edit\n }\n}\n@customElement('file-explorer-provider')\nexport default class FileExplorerProvider extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor context: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor subjectUri: string | undefined = undefined\n\n @property({ attribute: false })\n accessor onBack: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor relevantPanes: PaneDefinition[] = []\n\n @property({ attribute: false })\n accessor pane: PaneDefinition | undefined = undefined\n\n @property({ attribute: false })\n accessor paneRenderOptions: Record<string, unknown> = {}\n\n @property({ attribute: false })\n accessor showHeader: boolean = true\n\n @property({ attribute: false })\n accessor handleSharingClick: (() => void) | undefined = undefined\n\n // TODO: Need to research this more, brought it over from manager.\n @property({ attribute: false })\n accessor soloPane: boolean | undefined = undefined\n\n @property({ attribute: false })\n accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined = undefined\n\n @state()\n accessor menuItems: Array<{ label: string, icon?: HTMLElement, action: (event: Event) => void }> = []\n\n @state()\n accessor isEditing: boolean = false\n\n @state()\n accessor isDirty: boolean = false\n\n @state()\n accessor paneSupportsEditing: boolean = false\n\n // TODO: For now this works, but check if there is a better way.\n // because this means file explorer will know about the pane.\n // what if other panes want to use this. If so maybe we should\n // add more to the context to capture the provider for the pane that\n // will be editing... anyway this shouldn't be just for source pane.\n private beginEditingInSourcePane = () => {\n const sourceProvider = this.querySelector('source-pane-source-provider') as {\n beginEditing?: () => void\n } | null\n\n sourceProvider?.beginEditing?.()\n }\n\n // TODO: same as below. on Edit should be something more generic\n @state()\n accessor edit: FileExplorerEdit = {\n onEdit: this.beginEditingInSourcePane,\n isDirty: false,\n updateDirtyState: (dirty: boolean) => {\n if (this.isDirty === dirty) return\n\n this.isDirty = dirty\n this.edit = {\n ...this.edit,\n isDirty: dirty\n }\n this.refreshFileExplorerContextValue()\n }\n }\n\n @provide({ context: fileExplorerContext })\n accessor fileExplorerContextValue: FileExplorerContext = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleSharingClick: this.handleSharingClick,\n paneSupportsEditing: false,\n edit: this.edit\n })\n\n // Change the state for the pane so it can show the new icon.\n openSelectedPane (pane: PaneDefinition) {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n this.paneSupportsEditing = pane.name === 'source'\n this.pane = pane\n }\n\n private getPaneIcon (pane, subject, context) {\n if (!pane) return undefined\n\n const icon = typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n return icon\n }\n\n private async getPaneItems (subject, context, relevantPanes) {\n const dom = context.dom\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n\n let iconSrc = ''\n if (pane.name === 'profile') {\n iconSrc = PERSON_ICON\n } else if (pane.name === 'social') {\n iconSrc = FRIENDS_ICON\n } else {\n iconSrc = await this.getPaneIcon(pane, subject, context)\n }\n\n const icon = utils.AJARImage(iconSrc, label, label, dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => this.openPane?.(subject, pane.name)\n }\n }))\n return menuItems\n }\n\n private refreshFileExplorerContextValue () {\n this.fileExplorerContextValue = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleSharingClick: this.handleSharingClick,\n paneSupportsEditing: this.paneSupportsEditing,\n edit: this.edit\n })\n }\n\n private async refreshMenuItems () {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n\n const subject = store.sym(this.subjectUri)\n const menuItems = await this.getPaneItems(subject, this.context as DataBrowserContext, this.relevantPanes)\n\n this.menuItems = menuItems\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n const store = this.context?.session.store as LiveStore\n if (!store) {\n throw new Error('The element is missing the required `context.session.store` value. Ensure the `context` property is set.')\n }\n if (!this.subjectUri) {\n throw new Error('The element is missing the required `subjectUri` property.')\n }\n\n if (\n changedProperties.has('subjectUri') ||\n changedProperties.has('relevantPanes') ||\n changedProperties.has('context')\n ) {\n this.refreshMenuItems().catch(error => {\n console.warn('Failed to refresh menu items', error)\n })\n }\n\n if (changedProperties.has('pane') || changedProperties.has('subjectUri') || changedProperties.has('context')) {\n this.paneSupportsEditing = this.pane?.name === 'source'\n }\n\n if (\n changedProperties.has('context') ||\n changedProperties.has('subjectUri') ||\n changedProperties.has('pane') ||\n changedProperties.has('soloPane') ||\n changedProperties.has('onBack') ||\n changedProperties.has('openPane') ||\n changedProperties.has('handleSharingClick') ||\n changedProperties.has('pane') ||\n changedProperties.has('isDirty')\n ) {\n this.refreshFileExplorerContextValue()\n }\n }\n\n render () {\n const store = this.context?.session.store as LiveStore\n const subject = store.sym(this.subjectUri as string)\n return html`\n <div class=\"file-explorer-provider\">\n ${this.showHeader\n ? html`\n <file-explorer-header\n .paneIcon=${this.getPaneIcon(this.pane, subject, this.context as DataBrowserContext)}\n .menuItems=${this.menuItems}\n .paneSupportsEditing=${this.paneSupportsEditing}\n ></file-explorer-header>\n `\n : nothing}\n <slot class=\"pane\"></slot>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMY,KAAcF,GACdG,KAAeF;AAErB,SAASG,GAAgCC,GAcjB;CACtB,OAAO;EACLC,OAAOD,EAAMC;EACbC,YAAYF,EAAME;EAClBC,MAAMH,EAAMG;EACZC,UAAUJ,EAAMI;EAChBC,QAAQL,EAAMK;EACdC,UAAUN,EAAMM;EAChBC,oBAAoBP,EAAMO;EAC1BC,qBAAqBR,EAAMQ;EAC3BC,MAAMT,EAAMS;CACd;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AAC,GAAAC,GAAAC,IAAAC,IAAAC,IAAAK,IAAAO,IAAA3B,IAAAiE,GAAA,CAAA5G,GAAA6G,MAAAC,GAAAxE,GAAA;CAAA;EAAAlB;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAArC,IAAA,GAAA,KAAA,GArNiDtB,CAAY,GAAA6D,IAAAyE,IAAA,cAAAC,GAAA;CAAAxE,cAAA;EAAA,MAAAxC,CAAA,GAAA2D,EAAA,MAAA,UAC5C5E,CAAM,GAAA8H,EAAA;CAAA;AAAA,GAAAlD,EAAAoD,GAAA9G,IAAA,KAAA,CAAA,GAAA8G,GAAA"}
|
|
1
|
+
{"version":3,"file":"FileExplorerProvider.esm.js","names":["html","nothing","utils","WebComponent","provide","fileExplorerContext","customElement","property","state","styles","personIcon","friendsIcon","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","store","subjectUri","pane","soloPane","onBack","openPane","handleAccessClick","paneSupportsEditing","edit","_classDecs","_FileExplorerProvider","_FileExplorerProvider2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_ref","_contextDecs","attribute","_subjectUriDecs","_onBackDecs","_relevantPanesDecs","_paneDecs","_paneRenderOptionsDecs","_showHeaderDecs","_handleAccessClickDecs","_soloPaneDecs","_openPaneDecs","_menuItemsDecs","_isEditingDecs","_isDirtyDecs","_paneSupportsEditingDecs","_editDecs","_fileExplorerContextValueDecs","context","_FileExplorerProvider3","FileExplorerProvider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_context","undefined","_init_subjectUri","_init_onBack","_init_relevantPanes","_init_pane","_init_paneRenderOptions","_init_showHeader","_init_handleAccessClick","_init_soloPane","_init_openPane","_init_menuItems","_init_isEditing","_init_isDirty","_init_paneSupportsEditing","_defineProperty","sourceProvider","querySelector","beginEditing","_init_edit","onEdit","beginEditingInSourcePane","isDirty","updateDirtyState","dirty","refreshFileExplorerContextValue","_init_fileExplorerContextValue","session","_classPrivateFieldGet","v","_classPrivateFieldSet","relevantPanes","paneRenderOptions","showHeader","menuItems","isEditing","fileExplorerContextValue","openSelectedPane","name","getPaneIcon","subject","icon","getPaneItems","dom","Promise","all","map","label","iconSrc","AJARImage","setAttribute","action","refreshMenuItems","sym","willUpdate","changedProperties","Error","has","catch","error","console","warn","render","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit'\nimport type { NamedNode, LiveStore } from 'rdflib'\nimport { DataBrowserContext, type PaneDefinition } from 'pane-registry'\nimport { utils, WebComponent } from 'solid-ui'\nimport { provide } from '@lit/context'\nimport { fileExplorerContext, type FileExplorerContext, type FileExplorerEdit } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './FileExplorerHeader'\nimport styles from './FileExplorerProvider.styles.css'\nimport personIcon from '../../icons/person.svg'\nimport friendsIcon from '../../icons/friends.svg'\nimport '~icons/lucide/share-2'\n\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nfunction createFileExplorerContextValue (value: {\n store: LiveStore | undefined\n subjectUri: string | undefined\n pane?: PaneDefinition\n soloPane?: boolean\n onBack?: () => void\n openPane?: (subject: NamedNode, paneName: string) => void\n handleAccessClick?: () => void\n paneSupportsEditing?: boolean\n edit?: {\n onEdit?: () => void\n isDirty?: boolean\n updateDirtyState?: (dirty: boolean) => void\n }\n}): FileExplorerContext {\n return {\n store: value.store as LiveStore,\n subjectUri: value.subjectUri,\n pane: value.pane,\n soloPane: value.soloPane,\n onBack: value.onBack,\n openPane: value.openPane,\n handleAccessClick: value.handleAccessClick,\n paneSupportsEditing: value.paneSupportsEditing,\n edit: value.edit\n }\n}\n@customElement('file-explorer-provider')\nexport default class FileExplorerProvider extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor context: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor subjectUri: string | undefined = undefined\n\n @property({ attribute: false })\n accessor onBack: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor relevantPanes: PaneDefinition[] = []\n\n @property({ attribute: false })\n accessor pane: PaneDefinition | undefined = undefined\n\n @property({ attribute: false })\n accessor paneRenderOptions: Record<string, unknown> = {}\n\n @property({ attribute: false })\n accessor showHeader: boolean = true\n\n @property({ attribute: false })\n accessor handleAccessClick: (() => void) | undefined = undefined\n\n // TODO: Need to research this more, brought it over from manager.\n @property({ attribute: false })\n accessor soloPane: boolean | undefined = undefined\n\n @property({ attribute: false })\n accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined = undefined\n\n @state()\n accessor menuItems: Array<{ label: string, icon?: HTMLElement, action: (event: Event) => void }> = []\n\n @state()\n accessor isEditing: boolean = false\n\n @state()\n accessor isDirty: boolean = false\n\n @state()\n accessor paneSupportsEditing: boolean = false\n\n // TODO: For now this works, but check if there is a better way.\n // because this means file explorer will know about the pane.\n // what if other panes want to use this. If so maybe we should\n // add more to the context to capture the provider for the pane that\n // will be editing... anyway this shouldn't be just for source pane.\n private beginEditingInSourcePane = () => {\n const sourceProvider = this.querySelector('source-pane-source-provider') as {\n beginEditing?: () => void\n } | null\n\n sourceProvider?.beginEditing?.()\n }\n\n // TODO: same as below. on Edit should be something more generic\n @state()\n accessor edit: FileExplorerEdit = {\n onEdit: this.beginEditingInSourcePane,\n isDirty: false,\n updateDirtyState: (dirty: boolean) => {\n if (this.isDirty === dirty) return\n\n this.isDirty = dirty\n this.edit = {\n ...this.edit,\n isDirty: dirty\n }\n this.refreshFileExplorerContextValue()\n }\n }\n\n @provide({ context: fileExplorerContext })\n accessor fileExplorerContextValue: FileExplorerContext = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleAccessClick: this.handleAccessClick,\n paneSupportsEditing: false,\n edit: this.edit\n })\n\n // Change the state for the pane so it can show the new icon.\n openSelectedPane (pane: PaneDefinition) {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n this.paneSupportsEditing = pane.name === 'source'\n this.pane = pane\n }\n\n private getPaneIcon (pane, subject, context) {\n if (!pane) return undefined\n\n const icon = typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n return icon\n }\n\n private async getPaneItems (subject, context, relevantPanes) {\n const dom = context.dom\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n\n let iconSrc = ''\n if (pane.name === 'profile') {\n iconSrc = PERSON_ICON\n } else if (pane.name === 'social') {\n iconSrc = FRIENDS_ICON\n } else {\n iconSrc = await this.getPaneIcon(pane, subject, context)\n }\n\n const icon = utils.AJARImage(iconSrc, label, label, dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => this.openPane?.(subject, pane.name)\n }\n }))\n return menuItems\n }\n\n private refreshFileExplorerContextValue () {\n this.fileExplorerContextValue = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleAccessClick: this.handleAccessClick,\n paneSupportsEditing: this.paneSupportsEditing,\n edit: this.edit\n })\n }\n\n private async refreshMenuItems () {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n\n const subject = store.sym(this.subjectUri)\n const menuItems = await this.getPaneItems(subject, this.context as DataBrowserContext, this.relevantPanes)\n\n this.menuItems = menuItems\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n const store = this.context?.session.store as LiveStore\n if (!store) {\n throw new Error('The element is missing the required `context.session.store` value. Ensure the `context` property is set.')\n }\n if (!this.subjectUri) {\n throw new Error('The element is missing the required `subjectUri` property.')\n }\n\n if (\n changedProperties.has('subjectUri') ||\n changedProperties.has('relevantPanes') ||\n changedProperties.has('context')\n ) {\n this.refreshMenuItems().catch(error => {\n console.warn('Failed to refresh menu items', error)\n })\n }\n\n if (changedProperties.has('pane') || changedProperties.has('subjectUri') || changedProperties.has('context')) {\n this.paneSupportsEditing = this.pane?.name === 'source'\n }\n\n if (\n changedProperties.has('context') ||\n changedProperties.has('subjectUri') ||\n changedProperties.has('pane') ||\n changedProperties.has('soloPane') ||\n changedProperties.has('onBack') ||\n changedProperties.has('openPane') ||\n changedProperties.has('handleAccessClick') ||\n changedProperties.has('pane') ||\n changedProperties.has('isDirty')\n ) {\n this.refreshFileExplorerContextValue()\n }\n }\n\n render () {\n const store = this.context?.session.store as LiveStore\n const subject = store.sym(this.subjectUri as string)\n return html`\n <div class=\"file-explorer-provider\">\n ${this.showHeader\n ? html`\n <file-explorer-header\n .paneIcon=${this.getPaneIcon(this.pane, subject, this.context as DataBrowserContext)}\n .menuItems=${this.menuItems}\n .paneSupportsEditing=${this.paneSupportsEditing}\n ></file-explorer-header>\n `\n : nothing}\n <slot class=\"pane\"></slot>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
|
1
|
+
require("./FileExplorerHeader.cjs.js"),require("./FileExplorerProvider.cjs.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
export type PaneIcon = string | Promise<string> | null | undefined;
|
|
2
|
+
export type FileExplorerResourceMetadata = {
|
|
3
|
+
contentType: string | undefined;
|
|
4
|
+
canEdit: boolean;
|
|
5
|
+
isPublic: boolean;
|
|
6
|
+
aclUri: string | undefined;
|
|
7
|
+
eTag: string | undefined;
|
|
8
|
+
modified: string | undefined;
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;AAElE,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Header.styles.cjs.js");let t=require("solid-ui"),n=require("lit"),r=require("lit
|
|
1
|
+
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Header.styles.cjs.js");let t=require("solid-ui"),n=require("lit/decorators.js"),r=require("lit");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item"),require("solid-ui/components/account"),require("solid-ui/components/solid-emblem");var i,a,o,s,c,l,u,d,f,p;function m(e,t,n){h(e,t),t.set(e,n)}function h(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function g(e,t,n){return e.set(v(e,t),n),n}function _(e,t){return e.get(v(e,t))}function v(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function y(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:C(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||C(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var w=e,T=_.length-1;T>=0;T-=n?2:1){var E=_[T],D=n?_[T-1]:void 0,O={},k={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,O)};try{if(y)(g=c(E.call(D,w,k),`class decorators`,`return`))&&(w=g);else{var A,j;k.static=u,k.private=d,d?i===2?A=function(e){return h(e),b.value}:(i<4&&(A=o(b,`get`,h)),i!==3&&(j=o(b,`set`,h))):(A=function(e){return e[r]},(i<2||i===4)&&(j=function(e,t){e[r]=t}));var M=k.access={has:d?m.bind():function(e){return r in e}};if(A&&(M.get=A),j&&(M.set=j),w=E.call(D,p?{get:b.get,set:b.set}:b[S],k),p){if(typeof w==`object`&&w)(g=c(w.get,`accessor.get`))&&(b.get=g),(g=c(w.set,`accessor.set`))&&(b.set=g),(g=c(w.init,`accessor.init`))&&x.push(g);else if(w!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(w,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(w):b[S]=w)}}finally{O.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),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)),w}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return w(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var S=u.get(b);if(!0===S||S===3&&m!==4||S===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);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:x(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function x(e){var t=S(e,`string`);return typeof t==`symbol`?t:t+``}function S(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function w(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function T(e){return e}l=[(0,t.customElement)(`solid-panes-header`)];var E;new(f=(o=new WeakMap,p=(u=(0,n.property)({type:Array}),`menuItems`),a=class extends t.WebComponent{constructor(...e){super(...e),m(this,o,(s(this),d(this,[])))}get[p](){return _(o,this)}set menuItems(e){g(o,this,e)}render(){return r.html`
|
|
2
2
|
<a href="/" class="logo">
|
|
3
3
|
<span class="sr-only">Home</span>
|
|
4
4
|
<solid-ui-solid-emblem></solid-ui-solid-emblem>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../_virtual/~icons/lucide/help-circle.esm.js";
|
|
2
2
|
import e from "./Header.styles.esm.js";
|
|
3
3
|
import { WebComponent as t, customElement as n } from "solid-ui";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
import { html as i } from "lit";
|
|
6
6
|
import "solid-ui/components/button";
|
|
7
7
|
import "solid-ui/components/menu";
|
|
8
8
|
import "solid-ui/components/menu-item";
|
|
@@ -183,7 +183,7 @@ function E(e) {
|
|
|
183
183
|
}
|
|
184
184
|
u = [n("solid-panes-header")];
|
|
185
185
|
var D;
|
|
186
|
-
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d =
|
|
186
|
+
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = r({ type: Array }), "menuItems"), o = class extends t {
|
|
187
187
|
constructor(...e) {
|
|
188
188
|
super(...e), h(this, s, (c(this), f(this, [])));
|
|
189
189
|
}
|
|
@@ -194,7 +194,7 @@ new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = i({ type: Array }), "menuIte
|
|
|
194
194
|
_(s, this, e);
|
|
195
195
|
}
|
|
196
196
|
render() {
|
|
197
|
-
return
|
|
197
|
+
return i`
|
|
198
198
|
<a href="/" class="logo">
|
|
199
199
|
<span class="sr-only">Home</span>
|
|
200
200
|
<solid-ui-solid-emblem></solid-ui-solid-emblem>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=require("lit").css`:host{background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;exports.default=e;
|
|
1
|
+
var e=require("lit").css`:host{box-sizing:border-box;background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host{padding:0 16px 10px}:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Header.styles.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.styles.cjs.js","names":[],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Header.styles.cjs.js","names":[],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n padding: 0 16px 10px 16px;\n\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css as e } from "lit";
|
|
2
2
|
//#region src/components/header/Header.styles.css
|
|
3
|
-
var t = e`:host{background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;
|
|
3
|
+
var t = e`:host{box-sizing:border-box;background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host{padding:0 16px 10px}:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { t as default };
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.styles.esm.js","names":[],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Header.styles.esm.js","names":[],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n padding: 0 16px 10px 16px;\n\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Navbar.styles.cjs.js");let t=require("solid-ui"),n=require("lit"),r=require("lit
|
|
1
|
+
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Navbar.styles.cjs.js");let t=require("solid-ui"),n=require("lit/decorators.js"),r=require("lit");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item"),require("solid-ui/components/account"),require("solid-ui/components/solid-emblem");var i,a,o,s,c,l,u,d,f,p;function m(e,t,n){h(e,t),t.set(e,n)}function h(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function g(e,t,n){return e.set(v(e,t),n),n}function _(e,t){return e.get(v(e,t))}function v(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function y(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:C(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||C(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var w=e,T=_.length-1;T>=0;T-=n?2:1){var E=_[T],D=n?_[T-1]:void 0,O={},k={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,O)};try{if(y)(g=c(E.call(D,w,k),`class decorators`,`return`))&&(w=g);else{var A,j;k.static=u,k.private=d,d?i===2?A=function(e){return h(e),b.value}:(i<4&&(A=o(b,`get`,h)),i!==3&&(j=o(b,`set`,h))):(A=function(e){return e[r]},(i<2||i===4)&&(j=function(e,t){e[r]=t}));var M=k.access={has:d?m.bind():function(e){return r in e}};if(A&&(M.get=A),j&&(M.set=j),w=E.call(D,p?{get:b.get,set:b.set}:b[S],k),p){if(typeof w==`object`&&w)(g=c(w.get,`accessor.get`))&&(b.get=g),(g=c(w.set,`accessor.set`))&&(b.set=g),(g=c(w.init,`accessor.init`))&&x.push(g);else if(w!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(w,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(w):b[S]=w)}}finally{O.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),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)),w}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return w(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var S=u.get(b);if(!0===S||S===3&&m!==4||S===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);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:x(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function x(e){var t=S(e,`string`);return typeof t==`symbol`?t:t+``}function S(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function w(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function T(e){return e}l=[(0,t.customElement)(`solid-panes-navbar`)];var E;new(f=(o=new WeakMap,p=(u=(0,n.property)({type:Array}),`navbarItems`),a=class extends t.WebComponent{constructor(...e){super(...e),m(this,o,(s(this),d(this,[])))}get[p](){return _(o,this)}set navbarItems(e){g(o,this,e)}selectItem(e){this.dispatchEvent(new CustomEvent(`solid-ui-select`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}))}render(){return r.html`
|
|
2
2
|
<nav class="navbar">
|
|
3
|
-
${this.navbarItems.map(e=>
|
|
3
|
+
${this.navbarItems.map(e=>r.html`
|
|
4
4
|
<button
|
|
5
5
|
type="button"
|
|
6
6
|
class=${e.selected?`selected`:``}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../_virtual/~icons/lucide/help-circle.esm.js";
|
|
2
2
|
import e from "./Navbar.styles.esm.js";
|
|
3
3
|
import { WebComponent as t, customElement as n } from "solid-ui";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
import { html as i } from "lit";
|
|
6
6
|
import "solid-ui/components/button";
|
|
7
7
|
import "solid-ui/components/menu";
|
|
8
8
|
import "solid-ui/components/menu-item";
|
|
@@ -183,7 +183,7 @@ function E(e) {
|
|
|
183
183
|
}
|
|
184
184
|
u = [n("solid-panes-navbar")];
|
|
185
185
|
var D;
|
|
186
|
-
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d =
|
|
186
|
+
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = r({ type: Array }), "navbarItems"), o = class extends t {
|
|
187
187
|
constructor(...e) {
|
|
188
188
|
super(...e), h(this, s, (c(this), f(this, [])));
|
|
189
189
|
}
|
|
@@ -202,9 +202,9 @@ new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = i({ type: Array }), "navbarI
|
|
|
202
202
|
}));
|
|
203
203
|
}
|
|
204
204
|
render() {
|
|
205
|
-
return
|
|
205
|
+
return i`
|
|
206
206
|
<nav class="navbar">
|
|
207
|
-
${this.navbarItems.map((e) =>
|
|
207
|
+
${this.navbarItems.map((e) => i`
|
|
208
208
|
<button
|
|
209
209
|
type="button"
|
|
210
210
|
class=${e.selected ? "selected" : ""}
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
require("../../_virtual/~icons/lucide/
|
|
1
|
+
const e=require("../../utils/podUtils.cjs.js");require("../../_virtual/~icons/lucide/pencil.cjs.js"),require("../../_virtual/~icons/lucide/ellipsis-vertical.cjs.js"),require("../../_virtual/~icons/lucide/user-round-cog.cjs.js");const t=require("./ResourceActionsMenu.styles.cjs.js");let n=require("solid-ui"),r=require("lit/decorators.js"),i=require("lit");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item");var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F;function I(e,t,n){L(e,t),t.set(e,n)}function L(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function R(e,t,n){return e.set(B(e,t),n),n}function z(e,t){return e.get(B(e,t))}function B(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function V(e,t,n){return(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:G(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||G(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){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);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),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}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return K(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);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);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:U(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function U(e){var t=W(e,`string`);return typeof t==`symbol`?t:t+``}function W(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function G(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function K(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function q(e){return e}_=[(0,r.customElement)(`resource-actions-menu`)];var J;new(P=(s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,F=(v=(0,r.property)({attribute:!1}),b=(0,r.property)({type:String}),S=(0,r.property)({attribute:!1}),w=(0,r.property)({attribute:!1}),E=(0,r.property)({type:Boolean}),O=(0,r.property)({type:Boolean}),A=(0,r.property)({type:Boolean}),M=(0,r.property)({attribute:!1}),`store`),o=class extends n.WebComponent{constructor(...e){super(...e),I(this,s,(h(this),y(this))),I(this,c,x(this)),I(this,l,C(this,void 0)),I(this,u,T(this,void 0)),I(this,d,D(this,!1)),I(this,f,k(this,!1)),I(this,p,j(this,!1)),I(this,m,N(this,[]))}get[F](){return z(s,this)}set store(e){R(s,this,e)}get subjectUri(){return z(c,this)}set subjectUri(e){R(c,this,e)}get handleAccessClick(){return z(l,this)}set handleAccessClick(e){R(l,this,e)}get handleEditingClick(){return z(u,this)}set handleEditingClick(e){R(u,this,e)}get paneSupportsEditing(){return z(d,this)}set paneSupportsEditing(e){R(d,this,e)}get canEdit(){return z(f,this)}set canEdit(e){R(f,this,e)}get isMobile(){return z(p,this)}set isMobile(e){R(p,this,e)}get menuItems(){return z(m,this)}set menuItems(e){R(m,this,e)}render(){let t=e.isContainerSubject(this.store,this.subjectUri),n=!t&&this.isMobile&&this.paneSupportsEditing&&this.canEdit&&!!this.handleEditingClick,r=!!this.handleAccessClick;return i.html`
|
|
2
2
|
<solid-ui-menu>
|
|
3
|
-
<solid-ui-button slot="trigger" variant="ghost" title="More options">
|
|
4
|
-
<icon-lucide-ellipsis-vertical slot="icon"></icon-lucide-ellipsis-vertical>
|
|
3
|
+
<solid-ui-button slot="trigger" class="file-explorer-header-more-button" variant="ghost" title="More options">
|
|
4
|
+
<icon-lucide-ellipsis-vertical slot="icon" class="ellipsisIcon"></icon-lucide-ellipsis-vertical>
|
|
5
5
|
</solid-ui-button>
|
|
6
|
-
${this.menuItems.map(e=>
|
|
6
|
+
${this.menuItems.map(e=>i.html`
|
|
7
7
|
<solid-ui-menu-item @solid-ui-select=${t=>e.action(t)}>
|
|
8
8
|
${e.icon}
|
|
9
9
|
${e.label}
|
|
10
10
|
</solid-ui-menu-item>
|
|
11
11
|
`)}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
${n?i.html`
|
|
13
|
+
<solid-ui-menu-item @solid-ui-select=${this.handleEditingClick}>
|
|
14
|
+
<icon-lucide-pencil slot="left-icon"></icon-lucide-pencil>
|
|
15
|
+
Edit
|
|
16
|
+
</solid-ui-menu-item>
|
|
17
|
+
`:i.nothing}
|
|
18
|
+
${!t&&this.isMobile&&r?i.html`
|
|
19
|
+
<solid-ui-menu-item @solid-ui-select=${this.handleAccessClick}>
|
|
20
|
+
<icon-lucide-user-round-cog slot="left-icon"></icon-lucide-user-round-cog>
|
|
21
|
+
Manage Access
|
|
22
|
+
</solid-ui-menu-item>
|
|
23
|
+
`:i.nothing}
|
|
24
|
+
${t&&r?i.html`
|
|
25
|
+
<solid-ui-menu-item @solid-ui-select=${this.handleAccessClick}>
|
|
26
|
+
<icon-lucide-user-round-cog slot="left-icon"></icon-lucide-user-round-cog>
|
|
27
|
+
Manage Access
|
|
28
|
+
</solid-ui-menu-item>
|
|
29
|
+
`:i.nothing}
|
|
16
30
|
</solid-ui-menu>
|
|
17
|
-
`}},{e:[
|
|
31
|
+
`}},{e:[y,x,C,T,D,k,j,N,h],c:[J,g]}=H(o,[[v,1,`store`],[b,1,`subjectUri`],[S,1,`handleAccessClick`],[w,1,`handleEditingClick`],[E,1,`paneSupportsEditing`],[O,1,`canEdit`],[A,1,`isMobile`],[M,1,`menuItems`]],_,0,void 0,n.WebComponent),o),a=class extends q{constructor(){super(J),V(this,`styles`,t.default),g()}},V(a,P,void 0),a),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return J}});
|
|
18
32
|
//# sourceMappingURL=ResourceActionsMenu.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceActionsMenu.cjs.js","names":["
|
|
1
|
+
{"version":3,"file":"ResourceActionsMenu.cjs.js","names":["WebComponent","customElement","property","html","nothing","styles","isContainerSubject","_classDecs","_ResourceActionsMenu","_ResourceActionsMenu2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_storeDecs","attribute","_subjectUriDecs","type","String","_handleAccessClickDecs","_handleEditingClickDecs","_paneSupportsEditingDecs","Boolean","_canEditDecs","_isMobileDecs","_menuItemsDecs","_ResourceActionsMenu3","ResourceActionsMenu","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_store","_init_subjectUri","_init_handleAccessClick","undefined","_init_handleEditingClick","_init_paneSupportsEditing","_init_canEdit","_init_isMobile","_init_menuItems","_classPrivateFieldGet","store","v","_classPrivateFieldSet","subjectUri","handleAccessClick","handleEditingClick","paneSupportsEditing","canEdit","isMobile","menuItems","render","isContainerResource","canManageAccess","map","item","event","action","icon","label","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default"],"sources":["../../../src/components/resource-actions-menu/ResourceActionsMenu.ts"],"sourcesContent":["import { WebComponent } from 'solid-ui'\nimport { customElement, property } from 'lit/decorators.js'\nimport { html, nothing } from 'lit'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/menu-item'\nimport '~icons/lucide/ellipsis-vertical'\nimport '~icons/lucide/user-round-cog'\nimport '~icons/lucide/pencil'\nimport { LiveStore } from 'rdflib'\nimport styles from './ResourceActionsMenu.styles.css'\nimport { isContainerSubject } from '../../utils/podUtils'\n@customElement('resource-actions-menu')\nexport default class ResourceActionsMenu extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor store: LiveStore | undefined\n\n @property({ type: String })\n accessor subjectUri: string | undefined\n\n @property({ attribute: false })\n accessor handleAccessClick: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor handleEditingClick: (() => void) | undefined = undefined\n\n @property({ type: Boolean })\n accessor paneSupportsEditing = false\n\n @property({ type: Boolean })\n accessor canEdit = false\n\n @property({ type: Boolean })\n accessor isMobile = false\n\n @property({ attribute: false })\n accessor menuItems: Array<{ label: string, icon?: unknown, action: (event: Event) => void }> = []\n\n render () {\n const isContainerResource = isContainerSubject(this.store, this.subjectUri)\n const canEdit = !isContainerResource && this.isMobile && this.paneSupportsEditing && this.canEdit && !!this.handleEditingClick\n const canManageAccess = !!this.handleAccessClick\n return html`\n <solid-ui-menu>\n <solid-ui-button slot=\"trigger\" class=\"file-explorer-header-more-button\" variant=\"ghost\" title=\"More options\">\n <icon-lucide-ellipsis-vertical slot=\"icon\" class=\"ellipsisIcon\"></icon-lucide-ellipsis-vertical>\n </solid-ui-button>\n ${this.menuItems.map(item => html`\n <solid-ui-menu-item @solid-ui-select=${(event: Event) => item.action(event)}>\n ${item.icon}\n ${item.label}\n </solid-ui-menu-item>\n `)}\n ${canEdit\n ? html`\n <solid-ui-menu-item @solid-ui-select=${this.handleEditingClick}>\n <icon-lucide-pencil slot=\"left-icon\"></icon-lucide-pencil>\n Edit\n </solid-ui-menu-item>\n `\n : nothing}\n ${!isContainerResource && this.isMobile && canManageAccess\n ? html`\n <solid-ui-menu-item @solid-ui-select=${this.handleAccessClick}>\n <icon-lucide-user-round-cog slot=\"left-icon\"></icon-lucide-user-round-cog>\n Manage Access\n </solid-ui-menu-item>\n `\n : nothing}\n ${isContainerResource && canManageAccess\n ? html`\n <solid-ui-menu-item @solid-ui-select=${this.handleAccessClick}>\n <icon-lucide-user-round-cog slot=\"left-icon\"></icon-lucide-user-round-cog>\n Manage Access\n </solid-ui-menu-item>\n `\n : nothing}\n </solid-ui-menu>\n `\n }\n}\n"],"mappings":"8kJAWyDO,EAAA,EAAA,EACxDN,EAAAA,cAAAA,CAAc,uBAAuB,CAAC,EAAA,IAAAO,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,EAAA,IAAAP,QAAAQ,GAAAC,GAAAA,EAIpClB,EAAAA,SAAAA,CAAS,CAAEmB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BpB,EAAAA,SAAAA,CAAS,CAAEqB,KAAMC,MAAO,CAAC,EAACC,GAAAA,EAG1BvB,EAAAA,SAAAA,CAAS,CAAEmB,UAAW,EAAM,CAAC,EAACK,GAAAA,EAG9BxB,EAAAA,SAAAA,CAAS,CAAEmB,UAAW,EAAM,CAAC,EAACM,GAAAA,EAG9BzB,EAAAA,SAAAA,CAAS,CAAEqB,KAAMK,OAAQ,CAAC,EAACC,GAAAA,EAG3B3B,EAAAA,SAAAA,CAAS,CAAEqB,KAAMK,OAAQ,CAAC,EAACE,GAAAA,EAG3B5B,EAAAA,SAAAA,CAAS,CAAEqB,KAAMK,OAAQ,CAAC,EAACG,GAAAA,EAG3B7B,EAAAA,SAAAA,CAAS,CAAEmB,UAAW,EAAM,CAAC,EAAC,SAAAW,EAzBjC,cACiDhC,EAAAA,YAAa,CAAAkC,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAA1B,GAAA2B,EAAA,IAAA,EAAAC,EAAA,IAAA,EAAA,EAAAF,EAAA,KAAAxB,EAAA2B,EAAA,IAAA,CAAA,EAAAH,EA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EAAAxB,EAAA,EAAA,IAAA,GArEgDP,EAAAA,YAAY,EAAAgC,GAAAuC,EAAA,cAAAC,CAAA,CAAAtC,aAAA,CAAA,MAAA1B,CAAA,EAAAiE,EAAA,KAAA,SAC3CpE,EAAAA,OAAM,EAAAgE,EAAA,CAAA,CAAA,EAAAI,EAAAF,EAAA9D,EAAA,IAAA,EAAA,EAAA8D"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { WebComponent } from 'solid-ui';
|
|
2
2
|
import { LiveStore } from '../../../node_modules/rdflib';
|
|
3
3
|
export default class ResourceActionsMenu extends WebComponent {
|
|
4
|
+
static styles: any;
|
|
4
5
|
accessor store: LiveStore | undefined;
|
|
5
6
|
accessor subjectUri: string | undefined;
|
|
7
|
+
accessor handleAccessClick: (() => void) | undefined;
|
|
8
|
+
accessor handleEditingClick: (() => void) | undefined;
|
|
9
|
+
accessor paneSupportsEditing: boolean;
|
|
10
|
+
accessor canEdit: boolean;
|
|
11
|
+
accessor isMobile: boolean;
|
|
6
12
|
accessor menuItems: Array<{
|
|
7
13
|
label: string;
|
|
8
|
-
icon?:
|
|
14
|
+
icon?: unknown;
|
|
9
15
|
action: (event: Event) => void;
|
|
10
16
|
}>;
|
|
11
|
-
private confirmDelete;
|
|
12
|
-
private deleteResourceIfPresent;
|
|
13
|
-
private handleDelete;
|
|
14
17
|
render(): import('lit-html').TemplateResult<1>;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=ResourceActionsMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/resource-actions-menu/ResourceActionsMenu.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ResourceActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/resource-actions-menu/ResourceActionsMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGvC,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,+BAA+B,CAAA;AACtC,OAAO,iCAAiC,CAAA;AACxC,OAAO,8BAA8B,CAAA;AACrC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAAY;IAC3D,MAAM,CAAC,MAAM,MAAS;IAGtB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAA;IAGrC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAGvC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAY;IAGhE,QAAQ,CAAC,kBAAkB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAY;IAGjE,QAAQ,CAAC,mBAAmB,UAAQ;IAGpC,QAAQ,CAAC,OAAO,UAAQ;IAGxB,QAAQ,CAAC,QAAQ,UAAQ;IAGzB,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,CAAC,CAAK;IAEjG,MAAM;CA0CP"}
|