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,46 +1,117 @@
|
|
|
1
1
|
import { isWebIdUri as e } from "./webIdUtils.esm.js";
|
|
2
2
|
import { ns as t } from "solid-ui";
|
|
3
|
-
import {
|
|
4
|
-
import { parse as
|
|
3
|
+
import { ACL_LINK as n, store as r } from "solid-logic";
|
|
4
|
+
import { parse as i } from "rdflib";
|
|
5
5
|
//#region src/utils/podUtils.ts
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function a(e) {
|
|
7
|
+
let t = /* @__PURE__ */ new Map();
|
|
8
|
+
if (!e) return t;
|
|
9
|
+
for (let n of e.split(",")) {
|
|
10
|
+
let e = n.trim().match(/^([A-Za-z]+)\s*=\s*"([^"]*)"$/);
|
|
11
|
+
if (e) {
|
|
12
|
+
let [, n, r] = e, i = r.trim().split(/\s+/).filter(Boolean);
|
|
13
|
+
t.set(n.toLowerCase(), new Set(i.map((e) => e.toLowerCase())));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
function o(e) {
|
|
19
|
+
if (!e) return {
|
|
20
|
+
canEdit: !1,
|
|
21
|
+
isPublic: !1
|
|
22
|
+
};
|
|
23
|
+
let t = a(e), n = t.get("user") ?? /* @__PURE__ */ new Set(), r = t.get("public") ?? /* @__PURE__ */ new Set();
|
|
24
|
+
return {
|
|
25
|
+
canEdit: n.has("write"),
|
|
26
|
+
isPublic: r.has("read") || r.has("write")
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async function s(n) {
|
|
30
|
+
if (e(n)) {
|
|
8
31
|
try {
|
|
9
|
-
await
|
|
32
|
+
await r.fetcher.load(n.doc());
|
|
10
33
|
} catch (e) {
|
|
11
|
-
console.warn("Unable to load profile document for WebID",
|
|
34
|
+
console.warn("Unable to load profile document for WebID", n.doc().uri, e);
|
|
12
35
|
}
|
|
13
|
-
let e =
|
|
14
|
-
return (await Promise.all(e.map(async (e) => await
|
|
36
|
+
let e = r.each(n, t.space("storage"));
|
|
37
|
+
return (await Promise.all(e.map(async (e) => await l(e) ? e : null))).filter((e) => e !== null);
|
|
15
38
|
}
|
|
16
39
|
try {
|
|
17
|
-
let e = await
|
|
40
|
+
let e = await c(n);
|
|
18
41
|
return e ? [e] : [];
|
|
19
42
|
} catch (e) {
|
|
20
43
|
return console.error("cannot load container", e), [];
|
|
21
44
|
}
|
|
22
45
|
}
|
|
23
|
-
async function
|
|
24
|
-
let t = new URL(e.value || e.uri),
|
|
25
|
-
for (;
|
|
26
|
-
|
|
27
|
-
let e =
|
|
28
|
-
if (await
|
|
46
|
+
async function c(e) {
|
|
47
|
+
let t = new URL(e.value || e.uri), n = t.pathname;
|
|
48
|
+
for (; n.length;) {
|
|
49
|
+
n = n.substring(0, n.lastIndexOf("/"));
|
|
50
|
+
let e = r.sym(`${t.origin}${n}/`);
|
|
51
|
+
if (await l(e)) return e;
|
|
29
52
|
}
|
|
30
53
|
return null;
|
|
31
54
|
}
|
|
32
|
-
async function
|
|
33
|
-
return await
|
|
55
|
+
async function l(e) {
|
|
56
|
+
return await u(e), r.holds(e, t.rdf("type"), t.space("Storage"), e.doc());
|
|
34
57
|
}
|
|
35
|
-
async function
|
|
36
|
-
if (!
|
|
37
|
-
let t = (await
|
|
38
|
-
e.uri && t &&
|
|
58
|
+
async function u(e) {
|
|
59
|
+
if (!r.any(e, t.ldp("contains"), void 0, e.doc())) try {
|
|
60
|
+
let t = (await r.fetcher.webOperation("GET", e.uri, r.fetcher.initFetchOptions(e.uri, { headers: { accept: "text/turtle" } }))).responseText;
|
|
61
|
+
e.uri && t && i(t, r, e.uri, "text/turtle");
|
|
39
62
|
} catch (t) {
|
|
40
63
|
console.warn("Unable to load container representation for", e.uri, t);
|
|
41
64
|
}
|
|
42
65
|
}
|
|
66
|
+
function d(e, n) {
|
|
67
|
+
if (!e || !n) return !1;
|
|
68
|
+
let r = e.sym(n), i = e.findTypeURIs(r);
|
|
69
|
+
return !!(i[t.ldp("Container").uri] || i[t.ldp("BasicContainer").uri] || r.uri.endsWith("/"));
|
|
70
|
+
}
|
|
71
|
+
function f(e, n) {
|
|
72
|
+
if (!e || !n) return 0;
|
|
73
|
+
let r = e.sym(n), i = /* @__PURE__ */ new Set();
|
|
74
|
+
for (let n of e.each(r, t.ldp("contains"))) if (n.termType === "NamedNode") {
|
|
75
|
+
let e = n, t = e.dir();
|
|
76
|
+
if (t) {
|
|
77
|
+
let n = e.uri.slice(t.uri.length);
|
|
78
|
+
!n.startsWith(".") && !n.endsWith(".acl") && !n.endsWith("~") && i.add(e.uri);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return i.size;
|
|
82
|
+
}
|
|
83
|
+
function p(e, r, i) {
|
|
84
|
+
let a, s = !1, c = !1, l, u;
|
|
85
|
+
if (i.headers && i.headers.get("content-type")) {
|
|
86
|
+
a = i.headers.get("content-type")?.split(";")[0] ?? void 0;
|
|
87
|
+
let n = o(i.headers.get("wac-allow"));
|
|
88
|
+
s = n.canEdit, c = n.isPublic, l = i.headers.get("etag") ?? void 0, u = e.anyValue(r, t.dct("modified")) || e.anyValue(r, t.dc("modified")) || void 0;
|
|
89
|
+
} else e.each(null, e.sym("http://www.w3.org/2007/ont/link#requestedURI"), r).forEach((n) => {
|
|
90
|
+
let i = e.any(n, e.sym("http://www.w3.org/2007/ont/link#response"));
|
|
91
|
+
if (i && i.termType === "NamedNode") {
|
|
92
|
+
a = e.anyValue(i, t.httph("content-type")) || void 0;
|
|
93
|
+
let n = o(e.anyValue(i, t.httph("wac-allow")) || e.anyValue(i, t.httph("WAC-Allow")));
|
|
94
|
+
s = n.canEdit, c = n.isPublic, l = e.anyValue(i, t.httph("etag")) || void 0, u = e.anyValue(r, t.dct("modified")) || e.anyValue(r, t.dc("modified")) || void 0;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
let d = e.any(r, n)?.value || void 0;
|
|
98
|
+
return {
|
|
99
|
+
contentType: a,
|
|
100
|
+
canEdit: s,
|
|
101
|
+
isPublic: c,
|
|
102
|
+
aclUri: d,
|
|
103
|
+
eTag: l,
|
|
104
|
+
modified: u
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
async function m(e, t) {
|
|
108
|
+
let n = await e.fetcher.webOperation("HEAD", t.uri);
|
|
109
|
+
if (!n.ok) throw Error(`HEAD request failed with status ${n.status}`);
|
|
110
|
+
let r = p(e, t, n);
|
|
111
|
+
if (!r.contentType) throw Error("No content-type available!");
|
|
112
|
+
return r;
|
|
113
|
+
}
|
|
43
114
|
//#endregion
|
|
44
|
-
export {
|
|
115
|
+
export { m as fetchResourceMetadata, f as getContainerItemCount, s as getPodStorages, p as getResponseMetadata, d as isContainerSubject, u as loadContainerRepresentation };
|
|
45
116
|
|
|
46
117
|
//# sourceMappingURL=podUtils.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podUtils.esm.js","names":[],"sources":["../../src/utils/podUtils.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { ns } from 'solid-ui'\nimport { NamedNode, parse } from 'rdflib'\nimport { isWebIdUri } from './webIdUtils'\n\nexport async function getPodStorages (url: NamedNode): Promise<NamedNode[]> {\n if (isWebIdUri(url)) {\n try {\n await store.fetcher.load(url.doc())\n } catch (err) {\n console.warn('Unable to load profile document for WebID', url.doc().uri, err)\n }\n const podStorages = store.each(url, ns.space('storage'))\n const results = await Promise.all(podStorages.map(async pod => await isPodStorage(pod as NamedNode) ? pod as NamedNode : null))\n return results.filter(pod => pod !== null) as NamedNode[]\n }\n try {\n const storage = await findPodStorageFromUrl(url)\n return storage ? [storage] : []\n } catch (err) {\n console.error('cannot load container', err)\n return []\n }\n}\n\nasync function findPodStorageFromUrl (url: NamedNode): Promise<NamedNode | null> {\n const podStorage = new URL(url.value || url.uri)\n let pathStorage = podStorage.pathname\n\n while (pathStorage.length) {\n pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'))\n const candidate = store.sym(`${podStorage.origin}${pathStorage}/`)\n if (await isPodStorage(candidate)) return candidate\n }\n\n // TODO should url.origin be added to pods list when there are no pim:Storage ???\n return null\n}\n\nasync function isPodStorage (pod: NamedNode): Promise<boolean> {\n await loadContainerRepresentation(pod)\n return store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())\n}\n\nexport async function loadContainerRepresentation (subject) {\n // force reload for index.html with RDFa\n if (!store.any(subject, ns.ldp('contains'), undefined, subject.doc())) {\n try {\n const response = await store.fetcher.webOperation('GET', subject.uri, store.fetcher.initFetchOptions(subject.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n if (subject.uri && containerTurtle) {\n parse(containerTurtle, store, subject.uri, 'text/turtle')\n }\n } catch (err) {\n console.warn('Unable to load container representation for', subject.uri, err)\n }\n }\n}\n"],"mappings":";;;;;AAKA,eAAsB,EAAgB,GAAsC;CAC1E,IAAI,EAAW,CAAG,GAAG;EACnB,IAAI;GACF,MAAM,EAAM,QAAQ,KAAK,EAAI,IAAI,CAAC;EACpC,SAAS,GAAK;GACZ,QAAQ,KAAK,6CAA6C,EAAI,IAAI,CAAC,CAAC,KAAK,CAAG;EAC9E;EACA,IAAM,IAAc,EAAM,KAAK,GAAK,EAAG,MAAM,SAAS,CAAC;EA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version":3,"file":"podUtils.esm.js","names":[],"sources":["../../src/utils/podUtils.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { ns } from 'solid-ui'\nimport { LiveStore, NamedNode, parse } from 'rdflib'\nimport { isWebIdUri } from './webIdUtils'\nimport { ACL_LINK } from 'solid-logic'\nimport { FileExplorerResourceMetadata } from 'src/components/file-explorer-header/types'\n\nfunction parseWacAllowHeader (headerValue: string | null | undefined) {\n const permissions = new Map<string, Set<string>>()\n if (!headerValue) return permissions\n\n for (const entry of headerValue.split(',')) {\n const match = entry.trim().match(/^([A-Za-z]+)\\s*=\\s*\"([^\"]*)\"$/)\n if (match) {\n const [, permissionGroup, accessModes] = match\n const modes = accessModes.trim().split(/\\s+/).filter(Boolean)\n permissions.set(permissionGroup.toLowerCase(), new Set(modes.map(mode => mode.toLowerCase())))\n }\n }\n\n return permissions\n}\n\nfunction deriveAccessFlags (wacAllow: string | null | undefined) {\n if (!wacAllow) {\n return { canEdit: false, isPublic: false }\n }\n\n const permissions = parseWacAllowHeader(wacAllow)\n const userModes = permissions.get('user') ?? new Set<string>()\n const publicModes = permissions.get('public') ?? new Set<string>()\n\n return {\n canEdit: userModes.has('write'),\n isPublic: publicModes.has('read') || publicModes.has('write')\n }\n}\n\nexport async function getPodStorages (url: NamedNode): Promise<NamedNode[]> {\n if (isWebIdUri(url)) {\n try {\n await store.fetcher.load(url.doc())\n } catch (err) {\n console.warn('Unable to load profile document for WebID', url.doc().uri, err)\n }\n const podStorages = store.each(url, ns.space('storage'))\n const results = await Promise.all(podStorages.map(async pod => await isPodStorage(pod as NamedNode) ? pod as NamedNode : null))\n return results.filter(pod => pod !== null) as NamedNode[]\n }\n try {\n const storage = await findPodStorageFromUrl(url)\n return storage ? [storage] : []\n } catch (err) {\n console.error('cannot load container', err)\n return []\n }\n}\n\nasync function findPodStorageFromUrl (url: NamedNode): Promise<NamedNode | null> {\n const podStorage = new URL(url.value || url.uri)\n let pathStorage = podStorage.pathname\n\n while (pathStorage.length) {\n pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'))\n const candidate = store.sym(`${podStorage.origin}${pathStorage}/`)\n if (await isPodStorage(candidate)) return candidate\n }\n\n // TODO should url.origin be added to pods list when there are no pim:Storage ???\n return null\n}\n\nasync function isPodStorage (pod: NamedNode): Promise<boolean> {\n await loadContainerRepresentation(pod)\n return store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())\n}\n\nexport async function loadContainerRepresentation (subject) {\n // force reload for index.html with RDFa\n if (!store.any(subject, ns.ldp('contains'), undefined, subject.doc())) {\n try {\n const response = await store.fetcher.webOperation('GET', subject.uri, store.fetcher.initFetchOptions(subject.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n if (subject.uri && containerTurtle) {\n parse(containerTurtle, store, subject.uri, 'text/turtle')\n }\n } catch (err) {\n console.warn('Unable to load container representation for', subject.uri, err)\n }\n }\n}\n\nexport function isContainerSubject (store: LiveStore | undefined, subjectUri: string | undefined): boolean {\n if (!store || !subjectUri) return false\n\n const subject = store.sym(subjectUri)\n const typeUris = store.findTypeURIs(subject)\n return Boolean(\n typeUris[ns.ldp('Container').uri] ||\n typeUris[ns.ldp('BasicContainer').uri] ||\n subject.uri.endsWith('/')\n )\n}\n\n// The shared rdflib store can hold duplicate ldp:contains statements for the\n// same child resource when the container and companion metadata are both loaded.\n// Count unique visible children here so the header summary matches the list UI.\nexport function getContainerItemCount (store: LiveStore | undefined, subjectUri: string | undefined): number {\n if (!store || !subjectUri) return 0\n\n const subject = store.sym(subjectUri)\n const seen = new Set<string>()\n\n for (const item of store.each(subject, ns.ldp('contains'))) {\n if (item.termType === 'NamedNode') {\n const resource = item as NamedNode\n const parent = resource.dir()\n\n if (parent) {\n const pathEnd = resource.uri.slice(parent.uri.length)\n if (\n !pathEnd.startsWith('.') &&\n !pathEnd.endsWith('.acl') &&\n !pathEnd.endsWith('~')\n ) {\n seen.add(resource.uri)\n }\n }\n }\n }\n return seen.size\n}\n\nexport function getResponseMetadata (store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata {\n let contentType: string | undefined\n let canEdit = false\n let isPublic = false\n let eTag: string | undefined\n let modified: string | undefined\n\n if (response.headers && response.headers.get('content-type')) {\n contentType = response.headers.get('content-type')?.split(';')[0] ?? undefined\n const accessFlags = deriveAccessFlags(response.headers.get('wac-allow'))\n\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = response.headers.get('etag') ?? undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n } else {\n const reqs = store.each(\n null,\n store.sym('http://www.w3.org/2007/ont/link#requestedURI'),\n subject\n )\n reqs.forEach((req: any) => {\n const responseNode = store.any(\n req as any,\n store.sym('http://www.w3.org/2007/ont/link#response')\n )\n if (responseNode && responseNode.termType === 'NamedNode') {\n contentType = store.anyValue(responseNode as any, ns.httph('content-type')) || undefined\n const wacAllow = (store.anyValue(responseNode as any, ns.httph('wac-allow')) as string | undefined) ||\n (store.anyValue(responseNode as any, ns.httph('WAC-Allow')) as string | undefined)\n const accessFlags = deriveAccessFlags(wacAllow)\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = store.anyValue(responseNode as any, ns.httph('etag')) || undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n }\n })\n }\n\n const aclUri = store.any(subject, ACL_LINK)?.value || undefined\n return { contentType, canEdit, isPublic, aclUri, eTag, modified }\n}\n\nexport async function fetchResourceMetadata (store: LiveStore, subject: NamedNode): Promise<FileExplorerResourceMetadata> {\n const response = await store.fetcher.webOperation('HEAD', subject.uri)\n\n if (!response.ok) {\n throw new Error(`HEAD request failed with status ${response.status}`)\n }\n\n const metadata = getResponseMetadata(store, subject, response)\n if (!metadata.contentType) {\n throw new Error('No content-type available!')\n }\n\n return metadata\n}\n"],"mappings":";;;;;AAOA,SAAS,EAAqB,GAAwC;CACpE,IAA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a,aAAa;GACzD,IAAc,EAAM,SAAS,GAAqB,EAAG,MAAM,cAAc,CAAC,KAAK,KAAA;GAG/E,IAAM,IAAc,EAFF,EAAM,SAAS,GAAqB,EAAG,MAAM,WAAW,CAAC,KACxE,EAAM,SAAS,GAAqB,EAAG,MAAM,WAAW,CAAC,CACd;GAI9C,AAHA,IAAU,EAAY,SACtB,IAAW,EAAY,UACvB,IAAO,EAAM,SAAS,GAAqB,EAAG,MAAM,MAAM,CAAC,KAAK,KAAA,GAChE,IAAW,EAAM,SAAS,GAAgB,EAAG,IAAI,UAAU,CAAC,KAAK,EAAM,SAAS,GAAgB,EAAG,GAAG,UAAU,CAAC,KAAK,KAAA;EACxH;CACF,CAAC;CAGH,IAAM,IAAS,EAAM,IAAI,GAAS,CAAQ,CAAC,EAAE,SAAS,KAAA;CACtD,OAAO;EAAE;EAAa;EAAS;EAAU;EAAQ;EAAM;CAAS;AAClE;AAEA,eAAsB,EAAuB,GAAkB,GAA2D;CACxH,IAAM,IAAW,MAAM,EAAM,QAAQ,aAAa,QAAQ,EAAQ,GAAG;CAErE,IAAI,CAAC,EAAS,IACZ,MAAU,MAAM,mCAAmC,EAAS,QAAQ;CAGtE,IAAM,IAAW,EAAoB,GAAO,GAAS,CAAQ;CAC7D,IAAI,CAAC,EAAS,aACZ,MAAU,MAAM,4BAA4B;CAG9C,OAAO;AACT"}
|
package/dist/versionInfo.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={buildTime:`2026-
|
|
1
|
+
var e={buildTime:`2026-09-09T22:35:21Z`,commit:`3f1bebeabb6879196b54b1107f22d03084f395b2`,npmInfo:{"solid-panes":`5.0.0-1`,npm:`10.9.8`,node:`22.23.2`,acorn:`8.16.0`,ada:`2.9.2`,amaro:`1.1.8`,ares:`1.34.6`,brotli:`1.1.0`,cjs_module_lexer:`2.2.0`,cldr:`48.0`,icu:`78.2`,llhttp:`9.4.3`,modules:`127`,napi:`10`,nbytes:`0.1.3`,ncrypto:`0.0.1`,nghttp2:`1.69.0`,openssl:`3.5.7`,simdjson:`4.5.0`,simdutf:`6.4.2`,sqlite:`3.51.3`,tz:`2026a`,undici:`6.28.0`,unicode:`17.0`,uv:`1.51.0`,uvwasi:`0.0.23`,v8:`12.4.254.21-node.56`,zlib:`1.3.1-e00f703`,zstd:`1.5.7`}};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=versionInfo.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.cjs.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-
|
|
1
|
+
{"version":3,"file":"versionInfo.cjs.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-09-09T22:35:21Z',\n commit: '3f1bebeabb6879196b54b1107f22d03084f395b2',\n npmInfo: {\n 'solid-panes': '5.0.0-1',\n npm: '10.9.8',\n node: '22.23.2',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.6',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.2',\n llhttp: '9.4.3',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.7',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026a',\n undici: '6.28.0',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.56',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":"AAAA,IAAA,EAAe,CACb,UAAW,uBACX,OAAQ,2CACR,QAAS,CACP,cAAe,UACf,IAAK,SACL,KAAM,UACN,MAAO,SACP,IAAK,QACL,MAAO,QACP,KAAM,SACN,OAAQ,QACR,iBAAkB,QAClB,KAAM,OACN,IAAK,OACL,OAAQ,QACR,QAAS,MACT,KAAM,KACN,OAAQ,QACR,QAAS,QACT,QAAS,SACT,QAAS,QACT,SAAU,QACV,QAAS,QACT,OAAQ,SACR,GAAI,QACJ,OAAQ,SACR,QAAS,OACT,GAAI,SACJ,OAAQ,SACR,GAAI,sBACJ,KAAM,gBACN,KAAM,OACR,CACF"}
|
package/dist/versionInfo.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/versionInfo.ts
|
|
2
2
|
var e = {
|
|
3
|
-
buildTime: "2026-
|
|
4
|
-
commit: "
|
|
3
|
+
buildTime: "2026-09-09T22:35:21Z",
|
|
4
|
+
commit: "3f1bebeabb6879196b54b1107f22d03084f395b2",
|
|
5
5
|
npmInfo: {
|
|
6
|
-
"solid-panes": "5.0.0-
|
|
6
|
+
"solid-panes": "5.0.0-1",
|
|
7
7
|
npm: "10.9.8",
|
|
8
8
|
node: "22.23.2",
|
|
9
9
|
acorn: "8.16.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.esm.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-
|
|
1
|
+
{"version":3,"file":"versionInfo.esm.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-09-09T22:35:21Z',\n commit: '3f1bebeabb6879196b54b1107f22d03084f395b2',\n npmInfo: {\n 'solid-panes': '5.0.0-1',\n npm: '10.9.8',\n node: '22.23.2',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.6',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.2',\n llhttp: '9.4.3',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.7',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026a',\n undici: '6.28.0',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.56',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":";AAAA,IAAA,IAAe;CACb,WAAW;CACX,QAAQ;CACR,SAAS;EACP,eAAe;EACf,KAAK;EACL,MAAM;EACN,OAAO;EACP,KAAK;EACL,OAAO;EACP,MAAM;EACN,QAAQ;EACR,kBAAkB;EAClB,MAAM;EACN,KAAK;EACL,QAAQ;EACR,SAAS;EACT,MAAM;EACN,QAAQ;EACR,SAAS;EACT,SAAS;EACT,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,IAAI;EACJ,QAAQ;EACR,SAAS;EACT,IAAI;EACJ,QAAQ;EACR,IAAI;EACJ,MAAM;EACN,MAAM;CACR;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-1",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
60
60
|
"activitystreams-pane": "2.0.0-0",
|
|
61
61
|
"chat-pane": "4.0.0-0",
|
|
62
|
-
"contacts-pane": "
|
|
62
|
+
"contacts-pane": "4.0.0-0",
|
|
63
63
|
"dompurify": "^3.4.4",
|
|
64
64
|
"folder-pane": "4.0.0-0",
|
|
65
65
|
"issue-pane": "4.0.0-0",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"meeting-pane": "4.0.0-0",
|
|
69
69
|
"mime-types": "^3.0.2",
|
|
70
70
|
"pane-registry": "5.0.0-0",
|
|
71
|
-
"profile-pane": "
|
|
71
|
+
"profile-pane": "4.0.0-0",
|
|
72
72
|
"rdflib": "2.4.0",
|
|
73
73
|
"solid-logic": "6.0.0-0",
|
|
74
74
|
"solid-namespace": "^0.5.4",
|
|
75
|
-
"solid-ui": "5.0.0-
|
|
76
|
-
"source-pane": "
|
|
75
|
+
"solid-ui": "5.0.0-1",
|
|
76
|
+
"source-pane": "4.0.0-0"
|
|
77
77
|
},
|
|
78
78
|
"overrides": {
|
|
79
79
|
"rdflib": "$rdflib"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>`}};customElements.get(`icon-lucide-trash-2`)||customElements.define(`icon-lucide-trash-2`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=trash-2.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trash-2.cjs.js","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trash-2.esm.js","names":[],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e=require("solid-ui"),t=require("solid-logic");function n(e){let t=new Map;if(!e)return t;for(let n of e.split(`,`)){let e=n.trim().match(/^([A-Za-z]+)\s*=\s*"([^"]*)"$/);if(e){let[,n,r]=e,i=r.trim().split(/\s+/).filter(Boolean);t.set(n.toLowerCase(),new Set(i.map(e=>e.toLowerCase())))}}return t}function r(e){if(!e)return{canEdit:!1,isPublic:!1};let t=n(e),r=t.get(`user`)??new Set,i=t.get(`public`)??new Set;return{canEdit:r.has(`write`),isPublic:i.has(`read`)||i.has(`write`)}}function i(n,i,a){let o,s=!1,c=!1,l,u;if(a.headers&&a.headers.get(`content-type`)){o=a.headers.get(`content-type`)?.split(`;`)[0]??void 0;let t=r(a.headers.get(`wac-allow`));s=t.canEdit,c=t.isPublic,l=a.headers.get(`etag`)??void 0,u=n.anyValue(i,e.ns.dct(`modified`))||n.anyValue(i,e.ns.dc(`modified`))||void 0}else n.each(null,n.sym(`http://www.w3.org/2007/ont/link#requestedURI`),i).forEach(t=>{let a=n.any(t,n.sym(`http://www.w3.org/2007/ont/link#response`));if(a&&a.termType===`NamedNode`){o=n.anyValue(a,e.ns.httph(`content-type`))||void 0;let t=r(n.anyValue(a,e.ns.httph(`wac-allow`))||n.anyValue(a,e.ns.httph(`WAC-Allow`)));s=t.canEdit,c=t.isPublic,l=n.anyValue(a,e.ns.httph(`etag`))||void 0,u=n.anyValue(i,e.ns.dct(`modified`))||n.anyValue(i,e.ns.dc(`modified`))||void 0}});let d=n.any(i,t.ACL_LINK)?.value||void 0;return{contentType:o,canEdit:s,isPublic:c,aclUri:d,eTag:l,modified:u}}async function a(e,t){let n=await e.fetcher.webOperation(`GET`,t.uri),r=n.responseText;if(r===void 0)throw Error(`No text in response object!!`);let a=i(e,t,n);if(!a.contentType)throw Error(`No content-type available!`);return{content:r,metadata:a}}exports.fetchContentAndMetadata=a,exports.getResponseMetadata=i;
|
|
2
|
-
//# sourceMappingURL=helper.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.cjs.js","names":["ACL_LINK","ns","parseWacAllowHeader","headerValue","permissions","Map","entry","split","match","trim","permissionGroup","accessModes","modes","filter","Boolean","set","toLowerCase","Set","map","mode","deriveAccessFlags","wacAllow","canEdit","isPublic","userModes","get","publicModes","has","getResponseMetadata","store","subject","response","contentType","eTag","modified","headers","undefined","accessFlags","anyValue","dct","dc","reqs","each","sym","forEach","req","responseNode","any","termType","httph","aclUri","value","fetchContentAndMetadata","fetcher","webOperation","uri","content","responseText","Error","metadata"],"sources":["../../../src/components/file-explorer-header/helper.ts"],"sourcesContent":["// TODO: this code will need to be moved later\nimport { ACL_LINK } from 'solid-logic'\nimport { ns } from 'solid-ui'\nimport type { LiveStore, NamedNode } from 'rdflib'\n\nexport type FileExplorerResourceMetadata = {\n contentType: string | undefined\n canEdit: boolean\n isPublic: boolean\n aclUri: string | undefined\n eTag: string | undefined\n modified: string | undefined\n}\n\nfunction parseWacAllowHeader (headerValue: string | null | undefined) {\n const permissions = new Map<string, Set<string>>()\n if (!headerValue) return permissions\n\n for (const entry of headerValue.split(',')) {\n const match = entry.trim().match(/^([A-Za-z]+)\\s*=\\s*\"([^\"]*)\"$/)\n if (match) {\n const [, permissionGroup, accessModes] = match\n const modes = accessModes.trim().split(/\\s+/).filter(Boolean)\n permissions.set(permissionGroup.toLowerCase(), new Set(modes.map(mode => mode.toLowerCase())))\n }\n }\n\n return permissions\n}\n\nfunction deriveAccessFlags (wacAllow: string | null | undefined) {\n if (!wacAllow) {\n return { canEdit: false, isPublic: false }\n }\n\n const permissions = parseWacAllowHeader(wacAllow)\n const userModes = permissions.get('user') ?? new Set<string>()\n const publicModes = permissions.get('public') ?? new Set<string>()\n\n return {\n canEdit: userModes.has('write'),\n isPublic: publicModes.has('read') || publicModes.has('write')\n }\n}\n\nexport function getResponseMetadata (store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata {\n let contentType: string | undefined\n let canEdit = false\n let isPublic = false\n let eTag: string | undefined\n let modified: string | undefined\n\n if (response.headers && response.headers.get('content-type')) {\n contentType = response.headers.get('content-type')?.split(';')[0] ?? undefined\n const accessFlags = deriveAccessFlags(response.headers.get('wac-allow'))\n\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = response.headers.get('etag') ?? undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n } else {\n const reqs = store.each(\n null,\n store.sym('http://www.w3.org/2007/ont/link#requestedURI'),\n subject\n )\n reqs.forEach((req: any) => {\n const responseNode = store.any(\n req as any,\n store.sym('http://www.w3.org/2007/ont/link#response')\n )\n if (responseNode && responseNode.termType === 'NamedNode') {\n contentType = store.anyValue(responseNode as any, ns.httph('content-type')) || undefined\n const wacAllow = (store.anyValue(responseNode as any, ns.httph('wac-allow')) as string | undefined) ||\n (store.anyValue(responseNode as any, ns.httph('WAC-Allow')) as string | undefined)\n const accessFlags = deriveAccessFlags(wacAllow)\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = store.anyValue(responseNode as any, ns.httph('etag')) || undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n }\n })\n }\n\n const aclUri = store.any(subject, ACL_LINK)?.value || undefined\n return { contentType, canEdit, isPublic, aclUri, eTag, modified }\n}\n\nexport async function fetchContentAndMetadata (store: LiveStore, subject: NamedNode): Promise<{ content: string, metadata: FileExplorerResourceMetadata }> {\n const fetcher = store.fetcher\n\n const response = await fetcher.webOperation('GET', subject.uri)\n const content = (response as Response & { responseText?: string }).responseText\n\n if (content === undefined) {\n throw new Error('No text in response object!!')\n }\n\n const metadata = getResponseMetadata(store, subject, response)\n if (!metadata.contentType) {\n throw new Error('No content-type available!')\n }\n\n return { content, metadata }\n}\n"],"mappings":"mDAcA,SAASE,EAAqBC,EAAwC,CACpE,IAAMC,EAAc,IAAIC,IACxB,GAAI,CAACF,EAAa,OAAOC,EAEzB,IAAK,IAAME,KAASH,EAAYI,MAAM,GAAG,EAAG,CAC1C,IAAMC,EAAQF,EAAMG,KAAK,CAAC,CAACD,MAAM,+BAA+B,EAChE,GAAIA,EAAO,CACT,GAAM,EAAGE,EAAiBC,GAAeH,EACnCI,EAAQD,EAAYF,KAAK,CAAC,CAACF,MAAM,KAAK,CAAC,CAACM,OAAOC,OAAO,EAC5DV,EAAYW,IAAIL,EAAgBM,YAAY,EAAG,IAAIC,IAAIL,EAAMM,IAAIC,GAAQA,EAAKH,YAAY,CAAC,CAAC,CAAC,CAC/F,CACF,CAEA,OAA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cjB,EAFFS,EAAMS,SAASQ,EAAqB7C,EAAAA,GAAGgD,MAAM,WAAW,CAAC,GACxEpB,EAAMS,SAASQ,EAAqB7C,EAAAA,GAAGgD,MAAM,WAAW,CAAC,CACd,EAC9C3B,EAAUe,EAAYf,QACtBC,EAAWc,EAAYd,SACvBU,EAAOJ,EAAMS,SAASQ,EAAqB7C,EAAAA,GAAGgD,MAAM,MAAM,CAAC,GAAKb,IAAAA,GAChEF,EAAWL,EAAMS,SAASR,EAAgB7B,EAAAA,GAAGsC,IAAI,UAAU,CAAC,GAAKV,EAAMS,SAASR,EAAgB7B,EAAAA,GAAGuC,GAAG,UAAU,CAAC,GAAKJ,IAAAA,EACxH,CACF,CAAC,EAGH,IAAMc,EAASrB,EAAMkB,IAAIjB,EAAS9B,EAAAA,QAAQ,CAAC,EAAEmD,OAASf,IAAAA,GACtD,MAAO,CAAEJ,cAAaV,UAASC,WAAU2B,SAAQjB,OAAMC,UAAS,CAClE,CAEA,eAAsBkB,EAAyBvB,EAAkBC,EAA0F,CAGzJ,IAAMC,EAAW,MAFDF,EAAMwB,QAESC,aAAa,MAAOxB,EAAQyB,GAAG,EACxDC,EAAWzB,EAAkD0B,aAEnE,GAAID,IAAYpB,IAAAA,GACd,MAAUsB,MAAM,8BAA8B,EAGhD,IAAMC,EAAW/B,EAAoBC,EAAOC,EAASC,CAAQ,EAC7D,GAAI,CAAC4B,EAAS3B,YACZ,MAAU0B,MAAM,4BAA4B,EAG9C,MAAO,CAAEF,UAASG,UAAS,CAC7B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LiveStore, NamedNode } from '../../../node_modules/rdflib';
|
|
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
|
-
};
|
|
10
|
-
export declare function getResponseMetadata(store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata;
|
|
11
|
-
export declare function fetchContentAndMetadata(store: LiveStore, subject: NamedNode): Promise<{
|
|
12
|
-
content: string;
|
|
13
|
-
metadata: FileExplorerResourceMetadata;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/helper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElD,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;AAiCD,wBAAgB,mBAAmB,CAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,4BAA4B,CAyC3H;AAED,wBAAsB,uBAAuB,CAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,4BAA4B,CAAA;CAAE,CAAC,CAgBzJ"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ns as e } from "solid-ui";
|
|
2
|
-
import { ACL_LINK as t } from "solid-logic";
|
|
3
|
-
//#region src/components/file-explorer-header/helper.ts
|
|
4
|
-
function n(e) {
|
|
5
|
-
let t = /* @__PURE__ */ new Map();
|
|
6
|
-
if (!e) return t;
|
|
7
|
-
for (let n of e.split(",")) {
|
|
8
|
-
let e = n.trim().match(/^([A-Za-z]+)\s*=\s*"([^"]*)"$/);
|
|
9
|
-
if (e) {
|
|
10
|
-
let [, n, r] = e, i = r.trim().split(/\s+/).filter(Boolean);
|
|
11
|
-
t.set(n.toLowerCase(), new Set(i.map((e) => e.toLowerCase())));
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
}
|
|
16
|
-
function r(e) {
|
|
17
|
-
if (!e) return {
|
|
18
|
-
canEdit: !1,
|
|
19
|
-
isPublic: !1
|
|
20
|
-
};
|
|
21
|
-
let t = n(e), r = t.get("user") ?? /* @__PURE__ */ new Set(), i = t.get("public") ?? /* @__PURE__ */ new Set();
|
|
22
|
-
return {
|
|
23
|
-
canEdit: r.has("write"),
|
|
24
|
-
isPublic: i.has("read") || i.has("write")
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function i(n, i, a) {
|
|
28
|
-
let o, s = !1, c = !1, l, u;
|
|
29
|
-
if (a.headers && a.headers.get("content-type")) {
|
|
30
|
-
o = a.headers.get("content-type")?.split(";")[0] ?? void 0;
|
|
31
|
-
let t = r(a.headers.get("wac-allow"));
|
|
32
|
-
s = t.canEdit, c = t.isPublic, l = a.headers.get("etag") ?? void 0, u = n.anyValue(i, e.dct("modified")) || n.anyValue(i, e.dc("modified")) || void 0;
|
|
33
|
-
} else n.each(null, n.sym("http://www.w3.org/2007/ont/link#requestedURI"), i).forEach((t) => {
|
|
34
|
-
let a = n.any(t, n.sym("http://www.w3.org/2007/ont/link#response"));
|
|
35
|
-
if (a && a.termType === "NamedNode") {
|
|
36
|
-
o = n.anyValue(a, e.httph("content-type")) || void 0;
|
|
37
|
-
let t = r(n.anyValue(a, e.httph("wac-allow")) || n.anyValue(a, e.httph("WAC-Allow")));
|
|
38
|
-
s = t.canEdit, c = t.isPublic, l = n.anyValue(a, e.httph("etag")) || void 0, u = n.anyValue(i, e.dct("modified")) || n.anyValue(i, e.dc("modified")) || void 0;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
let d = n.any(i, t)?.value || void 0;
|
|
42
|
-
return {
|
|
43
|
-
contentType: o,
|
|
44
|
-
canEdit: s,
|
|
45
|
-
isPublic: c,
|
|
46
|
-
aclUri: d,
|
|
47
|
-
eTag: l,
|
|
48
|
-
modified: u
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
async function a(e, t) {
|
|
52
|
-
let n = await e.fetcher.webOperation("GET", t.uri), r = n.responseText;
|
|
53
|
-
if (r === void 0) throw Error("No text in response object!!");
|
|
54
|
-
let a = i(e, t, n);
|
|
55
|
-
if (!a.contentType) throw Error("No content-type available!");
|
|
56
|
-
return {
|
|
57
|
-
content: r,
|
|
58
|
-
metadata: a
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { a as fetchContentAndMetadata, i as getResponseMetadata };
|
|
63
|
-
|
|
64
|
-
//# sourceMappingURL=helper.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.esm.js","names":["ACL_LINK","ns","parseWacAllowHeader","headerValue","permissions","Map","entry","split","match","trim","permissionGroup","accessModes","modes","filter","Boolean","set","toLowerCase","Set","map","mode","deriveAccessFlags","wacAllow","canEdit","isPublic","userModes","get","publicModes","has","getResponseMetadata","store","subject","response","contentType","eTag","modified","headers","undefined","accessFlags","anyValue","dct","dc","reqs","each","sym","forEach","req","responseNode","any","termType","httph","aclUri","value","fetchContentAndMetadata","fetcher","webOperation","uri","content","responseText","Error","metadata"],"sources":["../../../src/components/file-explorer-header/helper.ts"],"sourcesContent":["// TODO: this code will need to be moved later\nimport { ACL_LINK } from 'solid-logic'\nimport { ns } from 'solid-ui'\nimport type { LiveStore, NamedNode } from 'rdflib'\n\nexport type FileExplorerResourceMetadata = {\n contentType: string | undefined\n canEdit: boolean\n isPublic: boolean\n aclUri: string | undefined\n eTag: string | undefined\n modified: string | undefined\n}\n\nfunction parseWacAllowHeader (headerValue: string | null | undefined) {\n const permissions = new Map<string, Set<string>>()\n if (!headerValue) return permissions\n\n for (const entry of headerValue.split(',')) {\n const match = entry.trim().match(/^([A-Za-z]+)\\s*=\\s*\"([^\"]*)\"$/)\n if (match) {\n const [, permissionGroup, accessModes] = match\n const modes = accessModes.trim().split(/\\s+/).filter(Boolean)\n permissions.set(permissionGroup.toLowerCase(), new Set(modes.map(mode => mode.toLowerCase())))\n }\n }\n\n return permissions\n}\n\nfunction deriveAccessFlags (wacAllow: string | null | undefined) {\n if (!wacAllow) {\n return { canEdit: false, isPublic: false }\n }\n\n const permissions = parseWacAllowHeader(wacAllow)\n const userModes = permissions.get('user') ?? new Set<string>()\n const publicModes = permissions.get('public') ?? new Set<string>()\n\n return {\n canEdit: userModes.has('write'),\n isPublic: publicModes.has('read') || publicModes.has('write')\n }\n}\n\nexport function getResponseMetadata (store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata {\n let contentType: string | undefined\n let canEdit = false\n let isPublic = false\n let eTag: string | undefined\n let modified: string | undefined\n\n if (response.headers && response.headers.get('content-type')) {\n contentType = response.headers.get('content-type')?.split(';')[0] ?? undefined\n const accessFlags = deriveAccessFlags(response.headers.get('wac-allow'))\n\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = response.headers.get('etag') ?? undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n } else {\n const reqs = store.each(\n null,\n store.sym('http://www.w3.org/2007/ont/link#requestedURI'),\n subject\n )\n reqs.forEach((req: any) => {\n const responseNode = store.any(\n req as any,\n store.sym('http://www.w3.org/2007/ont/link#response')\n )\n if (responseNode && responseNode.termType === 'NamedNode') {\n contentType = store.anyValue(responseNode as any, ns.httph('content-type')) || undefined\n const wacAllow = (store.anyValue(responseNode as any, ns.httph('wac-allow')) as string | undefined) ||\n (store.anyValue(responseNode as any, ns.httph('WAC-Allow')) as string | undefined)\n const accessFlags = deriveAccessFlags(wacAllow)\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = store.anyValue(responseNode as any, ns.httph('etag')) || undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n }\n })\n }\n\n const aclUri = store.any(subject, ACL_LINK)?.value || undefined\n return { contentType, canEdit, isPublic, aclUri, eTag, modified }\n}\n\nexport async function fetchContentAndMetadata (store: LiveStore, subject: NamedNode): Promise<{ content: string, metadata: FileExplorerResourceMetadata }> {\n const fetcher = store.fetcher\n\n const response = await fetcher.webOperation('GET', subject.uri)\n const content = (response as Response & { responseText?: string }).responseText\n\n if (content === undefined) {\n throw new Error('No text in response object!!')\n }\n\n const metadata = getResponseMetadata(store, subject, response)\n if (!metadata.contentType) {\n throw new Error('No content-type available!')\n }\n\n return { content, metadata }\n}\n"],"mappings":";;;AAcA,SAASE,EAAqBC,GAAwC;CACpE,IAAMC,oBAAc,IAAIC,IAAyB;CACjD,IAAI,CAACF,GAAa,OAAOC;CAEzB,KAAK,IAAME,KAASH,EAAYI,MAAM,GAAG,GAAG;EAC1C,IAAMC,IAAQF,EAAMG,KAAK,CAAC,CAACD,MAAM,+BAA+B;EAChE,IAAIA,GAAO;GACT,IAAM,GAAGE,GAAiBC,KAAeH,GACnCI,IAAQD,EAAYF,KAAK,CAAC,CAACF,MAAM,KAAK,CAAC,CAACM,OAAOC,OAAO;GAC5DV,EAAYW,IAAIL,EAAgBM,YAAY,GAAG,IAAIC,IAAIL,EAAMM,KAAIC,MAAQA,EAAKH,YAAY,CAAC,CAAC,CAAC;EAC/F;CACF;CAEA,OAAOZ;AACT;AAEA,SAASgB,EAAmBC,GAAqC;CAC/D,IAAI,CAACA,GACH,OAAO;EAAEC,SAAS;EAAOC,UAAU;CAAM;CAG3C,IAAMnB,IAAcF,EAAoBmB,CAAQ,GAC1CG,IAAYpB,EAAYqB,IAAI,MAAM,qBAAK,IAAIR,IAAY,GACvDS,IAActB,EAAYqB,IAAI,QAAQ,q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MAAM,CAAC,KAAKb,KAAAA,GAChEF,IAAWL,EAAMS,SAASR,GAAgB7B,EAAGsC,IAAI,UAAU,CAAC,KAAKV,EAAMS,SAASR,GAAgB7B,EAAGuC,GAAG,UAAU,CAAC,KAAKJ,KAAAA;EACxH;CACF,CAAC;CAGH,IAAMc,IAASrB,EAAMkB,IAAIjB,GAAS9B,CAAQ,CAAC,EAAEmD,SAASf,KAAAA;CACtD,OAAO;EAAEJ;EAAaV;EAASC;EAAU2B;EAAQjB;EAAMC;CAAS;AAClE;AAEA,eAAsBkB,EAAyBvB,GAAkBC,GAA0F;CAGzJ,IAAMC,IAAW,MAFDF,EAAMwB,QAESC,aAAa,OAAOxB,EAAQyB,GAAG,GACxDC,IAAWzB,EAAkD0B;CAEnE,IAAID,MAAYpB,KAAAA,GACd,MAAUsB,MAAM,8BAA8B;CAGhD,IAAMC,IAAW/B,EAAoBC,GAAOC,GAASC,CAAQ;CAC7D,IAAI,CAAC4B,EAAS3B,aACZ,MAAU0B,MAAM,4BAA4B;CAG9C,OAAO;EAAEF;EAASG;CAAS;AAC7B"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
let e=require("solid-ui"),t=require("lit"),n=require("lit/decorators.js");require("solid-ui/components/button"),require("solid-ui/components/dialog"),require("solid-ui/components/dialog-content"),require("solid-ui/components/dialog-footer");var r,i,a,o,s,c,l;function u(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t,n){f(e,t),t.set(e,n)}function f(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function p(e,t,n){return e.set(h(e,t),n),n}function m(e,t){return e.get(h(e,t))}function h(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 g(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],b=!l;if(!b){n||Array.isArray(_)||(_=[_]);var x={},S=[],C=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?x={get:y(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:x[C]=v,f||y(x[C],r,i===2?``:C)):f||(x=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(b)(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),x.value}:(i<4&&(A=o(x,`get`,h)),i!==3&&(j=o(x,`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:x.get,set:x.set}:x[C],k),p){if(typeof w==`object`&&w)(g=c(w.get,`accessor.get`))&&(x.get=g),(g=c(w.set,`accessor.set`))&&(x.set=g),(g=c(w.init,`accessor.init`))&&S.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?S.push(w):x[C]=w)}}finally{O.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=S.length-1;n>=0;n--)t=S[n].call(e,t);return t}),f||b||(d?p?l.push(o(x,`get`),o(x,`set`)):l.push(i===2?x[C]:o.call.bind(x[C])):Object.defineProperty(e,r,x)),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 b(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,v=16&m,y=!!(8&m),x=(m&=7)==0,S=h+`/`+y;if(!x&&!g){var C=u.get(S);if(!0===C||C===3&&m!==4||C===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(S,!(m>2)||m)}l(y?e:e.prototype,p,v,g?`#`+h:_(h),m,r,y?a||=[]:i||=[],o,y,g,x,m===1,y&&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 _(e){var t=v(e,`string`);return typeof t==`symbol`?t:t+``}function v(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 y(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 b(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}o=[(0,e.customElement)(`resource-delete-dialog`)];var x,S=new WeakMap;l=(s=(0,n.property)({type:String}),`resourceName`),r=class extends e.DialogComponent{constructor(...e){super(...e),d(this,S,(i(this),c(this,`this resource`))),u(this,`cancel`,()=>this.close(!1)),u(this,`confirm`,()=>this.close(!0))}get[l](){return m(S,this)}set resourceName(e){p(S,this,e)}render(){return t.html`
|
|
2
|
-
<solid-ui-dialog title="Delete resource">
|
|
3
|
-
<solid-ui-dialog-content>
|
|
4
|
-
<p>Are you sure you want to permanently delete ${this.resourceName}?</p>
|
|
5
|
-
</solid-ui-dialog-content>
|
|
6
|
-
<solid-ui-dialog-footer>
|
|
7
|
-
<solid-ui-button variant="secondary" @click=${this.cancel}>
|
|
8
|
-
Go back
|
|
9
|
-
</solid-ui-button>
|
|
10
|
-
<solid-ui-button @click=${this.confirm}>
|
|
11
|
-
Yes
|
|
12
|
-
</solid-ui-button>
|
|
13
|
-
</solid-ui-dialog-footer>
|
|
14
|
-
</solid-ui-dialog>
|
|
15
|
-
`}},{e:[c,i],c:[x,a]}=g(r,[[s,1,`resourceName`]],o,0,void 0,e.DialogComponent),a(),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return x}});
|
|
16
|
-
//# sourceMappingURL=DeleteResourceDialog.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteResourceDialog.cjs.js","names":["customElement","DialogComponent","html","property","_classDecs","_DeleteResourceDialog","_A","WeakMap","_ref","_resourceNameDecs","type","String","DeleteResourceDialog","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_resourceName","_defineProperty","close","_classPrivateFieldGet","resourceName","v","_classPrivateFieldSet","render","cancel","confirm","_DeleteResourceDialog2","e","c","_initClass","_applyDecs","default"],"sources":["../../../src/components/resource-actions-menu/DeleteResourceDialog.ts"],"sourcesContent":["import { customElement, DialogComponent } from 'solid-ui'\nimport { html } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/dialog'\nimport 'solid-ui/components/dialog-content'\nimport 'solid-ui/components/dialog-footer'\n\n@customElement('resource-delete-dialog')\nexport default class DeleteResourceDialog extends DialogComponent<boolean> {\n @property({ type: String })\n accessor resourceName = 'this resource'\n\n private cancel = () => this.close(false)\n\n private confirm = () => this.close(true)\n\n protected render () {\n return html`\n <solid-ui-dialog title=\"Delete resource\">\n <solid-ui-dialog-content>\n <p>Are you sure you want to permanently delete ${this.resourceName}?</p>\n </solid-ui-dialog-content>\n <solid-ui-dialog-footer>\n <solid-ui-button variant=\"secondary\" @click=${this.cancel}>\n Go back\n </solid-ui-button>\n <solid-ui-button @click=${this.confirm}>\n Yes\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </solid-ui-dialog>\n `\n }\n}\n"],"mappings":"gyIAO0CI,EAAA,EAAA,EAEzCJ,EAAAA,cAAAA,CAAc,wBAAwB,CAAC,EAAA,IAAAK,EAAAC,EAAA,IAAAC,QAAAC,GAAAC,GAAAA,EAErCN,EAAAA,SAAAA,CAAS,CAAEO,KAAMC,MAAO,CAAC,EAAC,gBAwB5BgB,EAAAf,cAzBiDX,EAAAA,eAAyB,CAAAY,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAT,GAAAU,EAAA,IAAA,EAAAC,EAAA,KAEjD,eAAe,EAAA,EAAAC,EAAA,KAAA,aAEhB,KAAKC,MAAM,EAAK,CAAC,EAAAD,EAAA,KAAA,cAEhB,KAAKC,MAAM,EAAI,CAAC,CAAA,CAAA,IAAAX,IAAA,CAAA,OAAAY,EAAAd,EAAA,IAAA,CAAA,CAAA,IAJ/Be,aAAYC,EAAA,CAAAC,EAAAjB,EAAA,KAAAgB,CAAA,CAAA,CAMXE,QAAU,CAClB,MAAOtB,GAAAA,IAAI;;;2DAG4C,KAAKmB,aAAY;;;wDAGpB,KAAKI,OAAM;;;oCAG/B,KAAKC,QAAO;;;;;KAM9C,CACF,EAAC,CAAAE,EAAA,CAAAX,EAAAD,GAAAa,EAAA,CAAAxB,EAAAyB,IAAAC,EAAAJ,EAAA,CAAA,CAAAlB,EAAA,EAAA,cAAA,CAAA,EAAAL,EAAA,EAAA,IAAA,GAzBiDH,EAAAA,eAAe,EAAA6B,EAAA"}
|