solid-panes 5.1.0-1 → 5.1.0-2
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/RDFXMLPane2.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
- package/dist/audio/audioPane.esm.js +1 -2
- package/dist/classInstancePane.esm.js +1 -2
- package/dist/components/editor-card/EditorCard.cjs.js +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.esm.js +6 -7
- package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js +7 -8
- package/dist/components/header/Header.styles.esm.js +1 -2
- package/dist/components/navbar/Navbar.cjs.js +2 -2
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js +8 -9
- package/dist/components/navbar/Navbar.styles.esm.js +1 -2
- package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
- package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
- package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
- package/dist/components/profile-heading/friendActions.esm.js +1 -2
- package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
- package/dist/dashboard/basicPreferences.esm.js +1 -2
- package/dist/dashboard/dashboardPane.esm.js +0 -1
- package/dist/dashboard/homepage.esm.js +1 -2
- package/dist/dashboard/ontologyData.esm.js +1 -2
- package/dist/dashboard/preferencesFormText.esm.js +1 -2
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.esm.js +2 -3
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.esm.js +2 -3
- package/dist/dokieli/dokieliPane.cjs.js +1 -1
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
- package/dist/dokieli/dokieliPane.esm.js +7 -12
- package/dist/dokieli/dokieliPane.esm.js.map +1 -1
- package/dist/dokieli/new.esm.js +1 -2
- package/dist/form/pane.esm.js +1 -2
- package/dist/home/homePane.esm.js +1 -2
- package/dist/humanReadablePane.d.ts +3 -0
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +276 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +428 -31
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/icons/folder.esm.js +1 -2
- package/dist/icons/friends.esm.js +1 -2
- package/dist/icons/person.esm.js +1 -2
- package/dist/imagePane.d.ts.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +2 -3
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.esm.js +1 -2
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.esm.js +2 -3
- package/dist/mainPage/header.esm.js +1 -2
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts +1 -1
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +6 -2
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.esm.js +1 -2
- package/dist/mainPage/navigation.cjs.js +1 -1
- package/dist/mainPage/navigation.cjs.js.map +1 -1
- package/dist/mainPage/navigation.d.ts.map +1 -1
- package/dist/mainPage/navigation.esm.js +14 -11
- package/dist/mainPage/navigation.esm.js.map +1 -1
- package/dist/mainPage/profileHeading2.esm.js +1 -2
- package/dist/n3Pane2.esm.js +1 -2
- package/dist/navigation/browserEvents.esm.js +1 -2
- package/dist/navigation/chrome.esm.js +1 -2
- package/dist/navigation/controller.cjs.js +1 -1
- package/dist/navigation/controller.cjs.js.map +1 -1
- package/dist/navigation/controller.esm.js +6 -7
- package/dist/navigation/controller.esm.js.map +1 -1
- package/dist/navigation/events.esm.js +1 -2
- package/dist/navigation/navbarVisibility.esm.js +1 -2
- package/dist/navigation/options.esm.js +1 -2
- package/dist/navigation/podContext.esm.js +1 -2
- package/dist/navigation/state.esm.js +1 -2
- package/dist/outline/context.esm.js +1 -2
- package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
- package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
- package/dist/outline/fileExplorerHelpers.d.ts +13 -0
- package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
- package/dist/outline/fileExplorerHelpers.esm.js +24 -0
- package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +422 -433
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/outlineDomHelpers.cjs.js +2 -0
- package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
- package/dist/outline/outlineDomHelpers.d.ts +30 -0
- package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
- package/dist/outline/outlineDomHelpers.esm.js +79 -0
- package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
- package/dist/outline/outlineIcons.esm.js +1 -2
- package/dist/outline/propertyViews.esm.js +1 -2
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +1 -2
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +9 -9
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +50 -40
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/outline/viewAsImage.esm.js +1 -2
- package/dist/outline/viewAsMbox.esm.js +1 -2
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.esm.js +2 -3
- package/dist/playlist/playlistPane.esm.js +1 -2
- package/dist/registerPanes.esm.js +1 -2
- package/dist/schedule/formsForSchedule.esm.js +1 -2
- package/dist/schedule/schedulePane.d.ts.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js +60 -59
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -2
- package/dist/slideshow/slideshowPane.esm.js +1 -2
- package/dist/social/editProfileDetails.cjs.js +1 -1
- package/dist/social/editProfileDetails.esm.js +1 -2
- package/dist/social/icons.esm.js +1 -2
- package/dist/social/socialPane2.esm.js +1 -2
- package/dist/social/socialSections.esm.js +1 -2
- package/dist/social/triage.esm.js +1 -2
- package/dist/tabbed/tabbedPane.esm.js +1 -2
- package/dist/tableViewPane.esm.js +1 -2
- package/dist/transaction/pane.esm.js +1 -2
- package/dist/transaction/period.esm.js +1 -2
- package/dist/trip/tripPane.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
- package/dist/ui/pane.esm.js +1 -2
- package/dist/utils/paneUtils.cjs.js +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.d.ts +5 -3
- package/dist/utils/paneUtils.d.ts.map +1 -1
- package/dist/utils/paneUtils.esm.js +36 -29
- package/dist/utils/paneUtils.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 +9 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +22 -95
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/utils/viewerUtils.esm.js +1 -2
- package/dist/utils/webIdUtils.esm.js +1 -2
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +4 -5
- package/dist/versionInfo.esm.js.map +1 -1
- package/dist/video/videoPane.esm.js +1 -2
- package/package.json +7 -6
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/index.cjs.js +0 -1
- package/dist/components/file-explorer-header/index.d.ts +0 -3
- package/dist/components/file-explorer-header/index.d.ts.map +0 -1
- package/dist/components/file-explorer-header/index.esm.js +0 -2
- package/dist/components/file-explorer-header/types.d.ts +0 -10
- package/dist/components/file-explorer-header/types.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { getViewerRelation as i } from "../utils/viewerUtils.esm.js";
|
|
|
5
5
|
import { loadFriendshipTriage as a, triageFriends as o } from "./triage.esm.js";
|
|
6
6
|
import { icons as s, log as c, ns as l, utils as u, widgets as d } from "solid-ui";
|
|
7
7
|
import { authn as f } from "solid-logic";
|
|
8
|
-
|
|
8
|
+
// src/social/socialPane.ts
|
|
9
9
|
function ee(e, t) {
|
|
10
10
|
let n = t.environment?.layout ?? "desktop", r = t.environment?.theme ?? "light", i = t.environment?.inputMode ?? "pointer";
|
|
11
11
|
e.classList.add("social-pane-host"), e.dataset.layout = n, e.dataset.theme = r, e.dataset.inputMode = i;
|
|
@@ -263,7 +263,6 @@ async function* _(e, t, n = te) {
|
|
|
263
263
|
}
|
|
264
264
|
c.length > 0 && c.length % n !== 0 && (yield [...c]);
|
|
265
265
|
}
|
|
266
|
-
//#endregion
|
|
267
266
|
export { m as pronounsAsText, p as socialPane, _ as streamFriends };
|
|
268
267
|
|
|
269
268
|
//# sourceMappingURL=socialPane2.esm.js.map
|
|
@@ -2,7 +2,7 @@ import "./icons.esm.js";
|
|
|
2
2
|
import "./editProfileDetails.esm.js";
|
|
3
3
|
import { ns as e, utils as t, widgets as n } from "solid-ui";
|
|
4
4
|
import { Statement as r } from "rdflib";
|
|
5
|
-
|
|
5
|
+
// src/social/socialSections.ts
|
|
6
6
|
function i(i) {
|
|
7
7
|
let { dom: a, subject: o, familiar: s, me: c, meUri: l, incoming: u, outgoing: d, editable: f, profile: p, knows: m, mutualConnections: h, link: g, text: _, buildCheckboxForm: v, renderSupportingInfo: y, renderNameSuffix: b } = i, x = function() {}, S = a.createElement("section");
|
|
8
8
|
S.className = "social-pane__mutual-friends social-primary__panel", S.id = "social-panel-mutual", S.setAttribute("role", "tabpanel"), S.setAttribute("aria-labelledby", "social-tab-mutual");
|
|
@@ -139,7 +139,6 @@ function o(r) {
|
|
|
139
139
|
refreshRequests: _
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
//#endregion
|
|
143
142
|
export { a as createAllFriendsSection, i as createMutualSection, o as createRequestsSection };
|
|
144
143
|
|
|
145
144
|
//# sourceMappingURL=socialSections.esm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ns as e } from "solid-ui";
|
|
2
|
-
|
|
2
|
+
// src/social/triage.ts
|
|
3
3
|
function t(e) {
|
|
4
4
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
5
5
|
for (let r of e) {
|
|
@@ -38,7 +38,6 @@ async function r(t, r) {
|
|
|
38
38
|
} catch {}
|
|
39
39
|
return n(i, r);
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { r as loadFriendshipTriage, n as triageFriends };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=triage.esm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { icons as e, ns as t, tabs as n, widgets as r } from "solid-ui";
|
|
2
|
-
|
|
2
|
+
// src/tabbed/tabbedPane.ts
|
|
3
3
|
var i = {
|
|
4
4
|
icon: e.iconBase + "noun_688606.svg",
|
|
5
5
|
name: "tabbed",
|
|
@@ -32,7 +32,6 @@ var i = {
|
|
|
32
32
|
})(), s;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { i as default };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=tabbedPane.esm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as e from "solid-ui";
|
|
2
|
-
|
|
2
|
+
// src/tableViewPane.js
|
|
3
3
|
var t = {
|
|
4
4
|
icon: e.icons.originalIconBase + "table.png",
|
|
5
5
|
name: "tableOfClass",
|
|
@@ -14,7 +14,6 @@ var t = {
|
|
|
14
14
|
return i.setAttribute("class", "tablePane"), i.appendChild(e.table(r, { tableClass: t })), i;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { t as tableViewPane };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=tableViewPane.esm.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as e from "solid-ui";
|
|
2
2
|
import * as t from "rdflib";
|
|
3
|
-
|
|
3
|
+
// src/transaction/pane.js
|
|
4
4
|
var n = e.ns, r = {
|
|
5
5
|
icon: e.icons.iconBase + "noun_106746.svg",
|
|
6
6
|
name: "transaction",
|
|
@@ -206,7 +206,6 @@ var n = e.ns, r = {
|
|
|
206
206
|
return u;
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
|
-
//#endregion
|
|
210
209
|
export { r as default };
|
|
211
210
|
|
|
212
211
|
//# sourceMappingURL=pane.esm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as e from "solid-ui";
|
|
2
|
-
|
|
2
|
+
// src/transaction/period.js
|
|
3
3
|
var t = e.ns, n = {
|
|
4
4
|
icon: e.icons.iconBase + "noun_142708.svg",
|
|
5
5
|
name: "period",
|
|
@@ -120,7 +120,6 @@ var t = e.ns, n = {
|
|
|
120
120
|
return o;
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
//#endregion
|
|
124
123
|
export { n as default };
|
|
125
124
|
|
|
126
125
|
//# sourceMappingURL=period.esm.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as e from "solid-ui";
|
|
2
2
|
import * as t from "rdflib";
|
|
3
|
-
|
|
3
|
+
// src/trip/tripPane.js
|
|
4
4
|
var n = e.ns, r = {
|
|
5
5
|
icon: e.icons.iconBase + "noun_62007.svg",
|
|
6
6
|
name: "travel expenses",
|
|
@@ -79,7 +79,6 @@ var n = e.ns, r = {
|
|
|
79
79
|
return l;
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { r as default };
|
|
84
83
|
|
|
85
84
|
//# sourceMappingURL=tripPane.esm.js.map
|
|
@@ -2,7 +2,7 @@ import { generateRandomString as e, getStatementsToAdd as t, getStatementsToDele
|
|
|
2
2
|
import { ns as r } from "solid-ui";
|
|
3
3
|
import { store as i } from "solid-logic";
|
|
4
4
|
import { sym as a } from "rdflib";
|
|
5
|
-
|
|
5
|
+
// src/trustedApplications/trustedApplications.dom.ts
|
|
6
6
|
function o(e) {
|
|
7
7
|
let t = c("table", { class: "results" }), n = l("tr", [
|
|
8
8
|
u("th", "Application URL"),
|
|
@@ -102,7 +102,6 @@ function d({ appModes: e, formElements: t }) {
|
|
|
102
102
|
value: r.acl(n).uri
|
|
103
103
|
}, {}, (e) => t.modes.push(e)), u("span", n)]));
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { o as createApplicationTable, l as createContainer, u as createText };
|
|
107
106
|
|
|
108
107
|
//# sourceMappingURL=trustedApplications.dom.esm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlankNode as e, st as t, sym as n } from "rdflib";
|
|
2
|
-
|
|
2
|
+
// src/trustedApplications/trustedApplications.utils.ts
|
|
3
3
|
function r(e, t, n, r) {
|
|
4
4
|
return n.statementsMatching(null, r.acl("origin"), e).reduce((e, i) => e.concat(n.statementsMatching(t, r.acl("trustedApp"), i.subject)).concat(n.statementsMatching(i.subject)), []);
|
|
5
5
|
}
|
|
@@ -14,7 +14,6 @@ function i(r, i, a, o, s) {
|
|
|
14
14
|
function a() {
|
|
15
15
|
return Math.random().toString(36).substr(2, 5);
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { a as generateRandomString, i as getStatementsToAdd, r as getStatementsToDelete };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=trustedApplications.utils.esm.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createApplicationTable as e, createContainer as t, createText as n } from "./trustedApplications.dom.esm.js";
|
|
2
2
|
import { icons as r, login as i, widgets as a } from "solid-ui";
|
|
3
3
|
import { store as o } from "solid-logic";
|
|
4
|
-
|
|
4
|
+
// src/trustedApplications/trustedApplications.view.ts
|
|
5
5
|
var s = {
|
|
6
6
|
global: !0,
|
|
7
7
|
icon: `${r.iconBase}noun_15177.svg`,
|
|
@@ -35,7 +35,6 @@ async function c(r, s, c) {
|
|
|
35
35
|
s.appendChild(n("li", "They will not gain more access than you have."))
|
|
36
36
|
])), s.appendChild(n("p", "Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app."));
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { s as default };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=trustedApplications.view.esm.js.map
|
package/dist/ui/pane.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as e from "solid-ui";
|
|
2
2
|
import * as t from "rdflib";
|
|
3
|
-
|
|
3
|
+
// src/ui/pane.js
|
|
4
4
|
var n = e.ns, r = {
|
|
5
5
|
icon: e.icons.iconBase + "noun_170702.svg",
|
|
6
6
|
name: "ui",
|
|
@@ -47,7 +47,6 @@ var n = e.ns, r = {
|
|
|
47
47
|
}), s;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { r as default };
|
|
52
51
|
|
|
53
52
|
//# sourceMappingURL=pane.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../_virtual/_rolldown/runtime.cjs.js"),t=require("./webIdUtils.cjs.js"),n=require("./podUtils.cjs.js"),r=require("../icons/folder.cjs.js"),i=require("../icons/person.cjs.js"),a=require("../icons/friends.cjs.js");let o=require("pane-registry");o=e.__toESM(o);let s=require("rdflib");var c=r.default,l=i.default,u=a.default;function d(e,t,n,r,i,a){return{name:e.name,paneName:n,tabName:a,label:function(){return r},render:function(
|
|
1
|
+
const e=require("../_virtual/_rolldown/runtime.cjs.js"),t=require("./webIdUtils.cjs.js"),n=require("./podUtils.cjs.js"),r=require("../icons/folder.cjs.js"),i=require("../icons/person.cjs.js"),a=require("../icons/friends.cjs.js");let o=require("pane-registry");o=e.__toESM(o);let s=require("rdflib");var c=r.default,l=i.default,u=a.default;function d(e,t,n,r,i,a){return{name:e.name,paneName:n,tabName:a,label:function(){return r},render:function(r,i,a){return e.render(t,i,n===`folder`?{...a,solo:!1,fullView:!1}:a)},shouldGetFocus:function(){return!1},requireQueryButton:!!e.requireQueryButton,subject:t,icon:i}}async function f(e,n,r=`Pane`,i=``,a=o.byName){let c=new URL(window.location.href),l=n||(0,s.sym)(c.toString()),u=await t.loadProfileFromURI(l);if(!u||!u.value)return null;let f=a(e);return f?d(f,u,e,r,i):null}async function p(e,n=o.byName){if(e&&t.isWebIdUri(e)){let t=n(`profile`);return t?d(t,e,`profile`,`Profile`,l):null}return f(`profile`,e,`Profile`,l,n)}async function m(e,t=o.byName){return f(`social`,e,`Social`,u,t)}async function h(e,t){let n=o.byName(`folder`);return n?d(n,e,n.name,t||`Storage`,c):null}async function g(e){let t=await n.getPodStorages(e);return t.length===0?[]:Promise.all(t.map((e,n)=>h(e,t.length>1?`Storage ${n+1}`:`Storage`))).then(e=>e.filter(e=>e!==null))}exports.createPaneItem=d,exports.getFolderPaneForStorage=h,exports.getFolderPanesFromURI=g,exports.getPaneItemFromURI=f,exports.getProfilePaneFromURI=p,exports.getSocialPaneFromURI=m;
|
|
2
2
|
//# sourceMappingURL=paneUtils.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paneUtils.cjs.js","names":["folderIcon","personIcon","friendsIcon","sym","loadProfileFromURI","
|
|
1
|
+
{"version":3,"file":"paneUtils.cjs.js","names":["folderIcon","personIcon","friendsIcon","paneRegistry","sym","loadProfileFromURI","isWebIdUri","getPodStorages","require_runtime","require_webIdUtils","require_podUtils","require_folder","require_person","require_friends","pane_registry","rdflib","FOLDER_ICON","PERSON_ICON","FRIENDS_ICON","createPaneItem","pane","labelText","subject","context","paneName","options","getPaneItemFromURI","windowHref","finalURL","webId","byName","icon","getProfilePaneFromURI","getSocialPaneFromURI","getFolderPaneForStorage","folderPane","podUrl","label","getFolderPanesFromURI","podStorages","pod","index","panes"],"sources":["../../src/utils/paneUtils.ts"],"sourcesContent":["import * as paneRegistry from 'pane-registry'\nimport folderIcon from '../icons/folder.svg'\nimport personIcon from '../icons/person.svg'\nimport friendsIcon from '../icons/friends.svg'\nimport { isWebIdUri, loadProfileFromURI } from './webIdUtils'\nimport { getPodStorages } from './podUtils'\nimport { NamedNode, sym } from 'rdflib'\n\nconst FOLDER_ICON = folderIcon\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nexport type PaneItem = {\n name: string\n paneName: string\n tabName?: string\n label: () => string\n render: (subject: NamedNode, context: any, options: any) => any\n shouldGetFocus: () => boolean\n requireQueryButton: boolean\n subject: NamedNode\n icon: string\n}\n\ntype PaneLookup = (name: string) => any\n\nexport function createPaneItem (\n pane: any,\n subject: NamedNode,\n paneName: string,\n labelText: string,\n icon: string,\n tabName?: string\n): PaneItem {\n return {\n name: pane.name,\n paneName,\n tabName,\n label: function () {\n return labelText\n },\n render: function (_subject, context, options) {\n // Storage is an explicit browser view, even though GotoSubject uses solo for top-level navigation.\n return pane.render(subject, context, paneName === 'folder' ? { ...options, solo: false, fullView: false } : options)\n },\n shouldGetFocus: function () {\n return false\n },\n requireQueryButton: !!pane.requireQueryButton,\n subject,\n icon\n }\n}\n\nexport async function getPaneItemFromURI (\n paneName: string,\n subject?: NamedNode,\n labelText = 'Pane',\n icon = '',\n byName: PaneLookup = paneRegistry.byName\n): Promise<PaneItem | null> {\n const windowHref = new URL(window.location.href)\n const finalURL = subject || sym(windowHref.toString())\n const webId = await loadProfileFromURI(finalURL)\n if (!webId || !webId.value) return null\n\n const pane = byName(paneName)\n if (!pane) return null\n\n return createPaneItem(pane, webId, paneName, labelText, icon)\n}\n\nexport async function getProfilePaneFromURI (subject?: NamedNode, byName: PaneLookup = paneRegistry.byName) {\n if (subject && isWebIdUri(subject)) {\n const pane = byName('profile')\n return pane\n ? createPaneItem(pane, subject, 'profile', 'Profile', PERSON_ICON)\n : null\n }\n return getPaneItemFromURI('profile', subject, 'Profile', PERSON_ICON, byName)\n}\n\nexport async function getSocialPaneFromURI (subject?: NamedNode, byName: PaneLookup = paneRegistry.byName) {\n return getPaneItemFromURI('social', subject, 'Social', FRIENDS_ICON, byName)\n}\n\nexport async function getFolderPaneForStorage (podUrl: NamedNode, label?: string): Promise<PaneItem | null> {\n const folderPane = paneRegistry.byName('folder')\n if (!folderPane) return null\n\n return createPaneItem(folderPane, podUrl, folderPane.name, label || 'Storage', FOLDER_ICON)\n}\nexport async function getFolderPanesFromURI (subject: NamedNode): Promise<PaneItem[]> {\n const podStorages = await getPodStorages(subject)\n if (podStorages.length === 0) return []\n\n return Promise.all(\n podStorages.map((pod, index) =>\n getFolderPaneForStorage(\n pod,\n podStorages.length > 1 ? `Storage ${index + 1}` : 'Storage'\n )\n )\n ).then(panes => panes.filter((pane): pane is PaneItem => pane !== null))\n}\n"],"mapp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7E,CAEA,eAAsBI,EAAyB,EAAmB,EAA0C,CAC1G,IAAMC,EAAahC,EAAa,OAAO,QAAQ,EAG/C,OAFKgC,EAEEhB,EAAegB,EAAYC,EAAQD,EAAW,KAAME,GAAS,UAAWrB,CAAW,EAFlE,IAG1B,CACA,eAAsBsB,EAAuB,EAAyC,CACpF,IAAMC,EAAc,MAAMhC,EAAAA,eAAee,CAAO,EAGhD,OAFIiB,EAAY,SAAW,EAAU,CAAC,EAE/B,QAAQ,IACbA,EAAY,KAAK,EAAK,IACpBL,EACEM,EACAD,EAAY,OAAS,EAAI,WAAWE,EAAQ,IAAM,SACpD,CACF,CACF,CAAC,CAAC,KAAK,GAASC,EAAM,OAAQ,GAA2BtB,IAAS,IAAI,CAAC,CACzE,C"}
|
|
@@ -10,10 +10,12 @@ export type PaneItem = {
|
|
|
10
10
|
subject: NamedNode;
|
|
11
11
|
icon: string;
|
|
12
12
|
};
|
|
13
|
+
type PaneLookup = (name: string) => any;
|
|
13
14
|
export declare function createPaneItem(pane: any, subject: NamedNode, paneName: string, labelText: string, icon: string, tabName?: string): PaneItem;
|
|
14
|
-
export declare function getPaneItemFromURI(paneName: string, subject?: NamedNode, labelText?: string, icon?: string): Promise<PaneItem | null>;
|
|
15
|
-
export declare function getProfilePaneFromURI(subject?: NamedNode): Promise<PaneItem | null>;
|
|
16
|
-
export declare function getSocialPaneFromURI(subject?: NamedNode): Promise<PaneItem | null>;
|
|
15
|
+
export declare function getPaneItemFromURI(paneName: string, subject?: NamedNode, labelText?: string, icon?: string, byName?: PaneLookup): Promise<PaneItem | null>;
|
|
16
|
+
export declare function getProfilePaneFromURI(subject?: NamedNode, byName?: PaneLookup): Promise<PaneItem | null>;
|
|
17
|
+
export declare function getSocialPaneFromURI(subject?: NamedNode, byName?: PaneLookup): Promise<PaneItem | null>;
|
|
17
18
|
export declare function getFolderPaneForStorage(podUrl: NamedNode, label?: string): Promise<PaneItem | null>;
|
|
18
19
|
export declare function getFolderPanesFromURI(subject: NamedNode): Promise<PaneItem[]>;
|
|
20
|
+
export {};
|
|
19
21
|
//# sourceMappingURL=paneUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paneUtils.d.ts","sourceRoot":"","sources":["../../src/utils/paneUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAMvC,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,GAAG,CAAA;IAC/D,cAAc,EAAE,MAAM,OAAO,CAAA;IAC7B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,OAAO,EAAE,SAAS,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GACf,QAAQ,
|
|
1
|
+
{"version":3,"file":"paneUtils.d.ts","sourceRoot":"","sources":["../../src/utils/paneUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAMvC,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,GAAG,CAAA;IAC/D,cAAc,EAAE,MAAM,OAAO,CAAA;IAC7B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,OAAO,EAAE,SAAS,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;AAEvC,wBAAgB,cAAc,CAC5B,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GACf,QAAQ,CAmBV;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,SAAS,EACnB,SAAS,SAAS,EAClB,IAAI,SAAK,EACT,MAAM,GAAE,UAAgC,GACvC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAU1B;AAED,wBAAsB,qBAAqB,CAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,GAAE,UAAgC,4BAQzG;AAED,wBAAsB,oBAAoB,CAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,GAAE,UAAgC,4BAExG;AAED,wBAAsB,uBAAuB,CAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAK1G;AACD,wBAAsB,qBAAqB,CAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAYpF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getPodStorages as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import * as
|
|
7
|
-
import { sym as
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
function
|
|
1
|
+
import { isWebIdUri as e, loadProfileFromURI as t } from "./webIdUtils.esm.js";
|
|
2
|
+
import { getPodStorages as n } from "./podUtils.esm.js";
|
|
3
|
+
import r from "../icons/folder.esm.js";
|
|
4
|
+
import i from "../icons/person.esm.js";
|
|
5
|
+
import a from "../icons/friends.esm.js";
|
|
6
|
+
import * as o from "pane-registry";
|
|
7
|
+
import { sym as s } from "rdflib";
|
|
8
|
+
// src/utils/paneUtils.ts
|
|
9
|
+
var c = r, l = i, u = a;
|
|
10
|
+
function d(e, t, n, r, i, a) {
|
|
11
11
|
return {
|
|
12
12
|
name: e.name,
|
|
13
13
|
paneName: n,
|
|
@@ -15,8 +15,12 @@ function u(e, t, n, r, i, a) {
|
|
|
15
15
|
label: function() {
|
|
16
16
|
return r;
|
|
17
17
|
},
|
|
18
|
-
render: function(
|
|
19
|
-
return e.render(t,
|
|
18
|
+
render: function(r, i, a) {
|
|
19
|
+
return e.render(t, i, n === "folder" ? {
|
|
20
|
+
...a,
|
|
21
|
+
solo: !1,
|
|
22
|
+
fullView: !1
|
|
23
|
+
} : a);
|
|
20
24
|
},
|
|
21
25
|
shouldGetFocus: function() {
|
|
22
26
|
return !1;
|
|
@@ -26,27 +30,30 @@ function u(e, t, n, r, i, a) {
|
|
|
26
30
|
icon: i
|
|
27
31
|
};
|
|
28
32
|
}
|
|
29
|
-
async function
|
|
30
|
-
let
|
|
31
|
-
if (!
|
|
32
|
-
let
|
|
33
|
-
return
|
|
33
|
+
async function f(e, n, r = "Pane", i = "", a = o.byName) {
|
|
34
|
+
let c = new URL(window.location.href), l = n || s(c.toString()), u = await t(l);
|
|
35
|
+
if (!u || !u.value) return null;
|
|
36
|
+
let f = a(e);
|
|
37
|
+
return f ? d(f, u, e, r, i) : null;
|
|
34
38
|
}
|
|
35
|
-
async function
|
|
36
|
-
|
|
39
|
+
async function p(t, n = o.byName) {
|
|
40
|
+
if (t && e(t)) {
|
|
41
|
+
let e = n("profile");
|
|
42
|
+
return e ? d(e, t, "profile", "Profile", l) : null;
|
|
43
|
+
}
|
|
44
|
+
return f("profile", t, "Profile", l, n);
|
|
37
45
|
}
|
|
38
|
-
async function
|
|
39
|
-
return
|
|
46
|
+
async function m(e, t = o.byName) {
|
|
47
|
+
return f("social", e, "Social", u, t);
|
|
40
48
|
}
|
|
41
|
-
async function
|
|
42
|
-
let n =
|
|
43
|
-
return n ?
|
|
49
|
+
async function h(e, t) {
|
|
50
|
+
let n = o.byName("folder");
|
|
51
|
+
return n ? d(n, e, n.name, t || "Storage", c) : null;
|
|
44
52
|
}
|
|
45
|
-
async function
|
|
46
|
-
let
|
|
47
|
-
return
|
|
53
|
+
async function g(e) {
|
|
54
|
+
let t = await n(e);
|
|
55
|
+
return t.length === 0 ? [] : Promise.all(t.map((e, n) => h(e, t.length > 1 ? `Storage ${n + 1}` : "Storage"))).then((e) => e.filter((e) => e !== null));
|
|
48
56
|
}
|
|
49
|
-
|
|
50
|
-
export { u as createPaneItem, m as getFolderPaneForStorage, h as getFolderPanesFromURI, d as getPaneItemFromURI, f as getProfilePaneFromURI, p as getSocialPaneFromURI };
|
|
57
|
+
export { d as createPaneItem, h as getFolderPaneForStorage, g as getFolderPanesFromURI, f as getPaneItemFromURI, p as getProfilePaneFromURI, m as getSocialPaneFromURI };
|
|
51
58
|
|
|
52
59
|
//# sourceMappingURL=paneUtils.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paneUtils.esm.js","names":["folderIcon","personIcon","friendsIcon","folder_default","person_default","friends_default","paneRegistry","FOLDER_ICON","PERSON_ICON","FRIENDS_ICON","createPaneItem","pane","labelText","subject","context","options","getPaneItemFromURI","windowHref","finalURL","sym","webId","loadProfileFromURI","
|
|
1
|
+
{"version":3,"file":"paneUtils.esm.js","names":["folderIcon","personIcon","friendsIcon","folder_default","person_default","friends_default","paneRegistry","FOLDER_ICON","PERSON_ICON","FRIENDS_ICON","createPaneItem","pane","labelText","subject","context","paneName","options","getPaneItemFromURI","windowHref","finalURL","sym","webId","loadProfileFromURI","byName","icon","getProfilePaneFromURI","isWebIdUri","getSocialPaneFromURI","getFolderPaneForStorage","folderPane","podUrl","label","getFolderPanesFromURI","podStorages","getPodStorages","pod","index","panes"],"sources":["../../src/utils/paneUtils.ts"],"sourcesContent":["import * as paneRegistry from 'pane-registry'\nimport folderIcon from '../icons/folder.svg'\nimport personIcon from '../icons/person.svg'\nimport friendsIcon from '../icons/friends.svg'\nimport { isWebIdUri, loadProfileFromURI } from './webIdUtils'\nimport { getPodStorages } from './podUtils'\nimport { NamedNode, sym } from 'rdflib'\n\nconst FOLDER_ICON = folderIcon\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nexport type PaneItem = {\n name: string\n paneName: string\n tabName?: string\n label: () => string\n render: (subject: NamedNode, context: any, options: any) => any\n shouldGetFocus: () => boolean\n requireQueryButton: boolean\n subject: NamedNode\n icon: string\n}\n\ntype PaneLookup = (name: string) => any\n\nexport function createPaneItem (\n pane: any,\n subject: NamedNode,\n paneName: string,\n labelText: string,\n icon: string,\n tabName?: string\n): PaneItem {\n return {\n name: pane.name,\n paneName,\n tabName,\n label: function () {\n return labelText\n },\n render: function (_subject, context, options) {\n // Storage is an explicit browser view, even though GotoSubject uses solo for top-level navigation.\n return pane.render(subject, context, paneName === 'folder' ? { ...options, solo: false, fullView: false } : options)\n },\n shouldGetFocus: function () {\n return false\n },\n requireQueryButton: !!pane.requireQueryButton,\n subject,\n icon\n }\n}\n\nexport async function getPaneItemFromURI (\n paneName: string,\n subject?: NamedNode,\n labelText = 'Pane',\n icon = '',\n byName: PaneLookup = paneRegistry.byName\n): Promise<PaneItem | null> {\n const windowHref = new URL(window.location.href)\n const finalURL = subject || sym(windowHref.toString())\n const webId = await loadProfileFromURI(finalURL)\n if (!webId || !webId.value) return null\n\n const pane = byName(paneName)\n if (!pane) return null\n\n return createPaneItem(pane, webId, paneName, labelText, icon)\n}\n\nexport async function getProfilePaneFromURI (subject?: NamedNode, byName: PaneLookup = paneRegistry.byName) {\n if (subject && isWebIdUri(subject)) {\n const pane = byName('profile')\n return pane\n ? createPaneItem(pane, subject, 'profile', 'Profile', PERSON_ICON)\n : null\n }\n return getPaneItemFromURI('profile', subject, 'Profile', PERSON_ICON, byName)\n}\n\nexport async function getSocialPaneFromURI (subject?: NamedNode, byName: PaneLookup = paneRegistry.byName) {\n return getPaneItemFromURI('social', subject, 'Social', FRIENDS_ICON, byName)\n}\n\nexport async function getFolderPaneForStorage (podUrl: NamedNode, label?: string): Promise<PaneItem | null> {\n const folderPane = paneRegistry.byName('folder')\n if (!folderPane) return null\n\n return createPaneItem(folderPane, podUrl, folderPane.name, label || 'Storage', FOLDER_ICON)\n}\nexport async function getFolderPanesFromURI (subject: NamedNode): Promise<PaneItem[]> {\n const podStorages = await getPodStorages(subject)\n if (podStorages.length === 0) return []\n\n return Promise.all(\n podStorages.map((pod, index) =>\n getFolderPaneForStorage(\n pod,\n podStorages.length > 1 ? `Storage ${index + 1}` : 'Storage'\n )\n )\n ).then(panes => panes.filter((pane): pane is PaneItem => pane !== null))\n}\n"],"mappings":";;;;;;;;AAQA,IAAMO,IAAcP,GACdQ,IAAcP,GACdQ,IAAeP;AAgBrB,SAAgBQ,EACd,GACA,GACA,GACA,GACA,GACA,GACU;CACV,OAAO;EACL,MAAMC,EAAK;EACX;EACA;EACA,OAAO,WAAY;GACjB,OAAOC;EACT;EACA,QAAQ,SAAU,GAAU,GAAS,GAAS;GAE5C,OAAOD,EAAK,OAAOE,GAASC,GAASC,MAAa,WAAW;IAAE,GAAGC;IAAS,MAAM;IAAO,UAAU;GAAM,IAAIA,CAAO;EACrH;EACA,gBAAgB,WAAY;GAC1B,OAAO;EACT;EACA,oBAAoB,CAAC,CAACL,EAAK;EAC3B;EACA;CACF;AACF;AAEA,eAAsBM,EACpB,GACA,GACA,IAAY,QACZ,IAAO,IACP,IAAqBX,EAAa,QACR;CAC1B,IAAMY,IAAa,IAAI,IAAI,OAAO,SAAS,IAAI,GACzCC,IAAWN,KAAWO,EAAIF,EAAW,SAAS,CAAC,GAC/CG,IAAQ,MAAMC,EAAmBH,CAAQ;CAC/C,IAAI,CAACE,KAAS,CAACA,EAAM,OAAO,OAAO;CAEnC,IAAMV,IAAOY,EAAOR,CAAQ;CAG5B,OAFKJ,IAEED,EAAeC,GAAMU,GAAON,GAAUH,GAAWY,CAAI,IAF1C;AAGpB;AAEA,eAAsBC,EAAuB,GAAqB,IAAqBnB,EAAa,QAAQ;CAC1G,IAAIO,KAAWa,EAAWb,CAAO,GAAG;EAClC,IAAMF,IAAOY,EAAO,SAAS;EAC7B,OAAOZ,IACHD,EAAeC,GAAME,GAAS,WAAW,WAAWL,CAAW,IAC/D;CACN;CACA,OAAOS,EAAmB,WAAWJ,GAAS,WAAWL,GAAae,CAAM;AAC9E;AAEA,eAAsBI,EAAsB,GAAqB,IAAqBrB,EAAa,QAAQ;CACzG,OAAOW,EAAmB,UAAUJ,GAAS,UAAUJ,GAAcc,CAAM;AAC7E;AAEA,eAAsBK,EAAyB,GAAmB,GAA0C;CAC1G,IAAMC,IAAavB,EAAa,OAAO,QAAQ;CAG/C,OAFKuB,IAEEnB,EAAemB,GAAYC,GAAQD,EAAW,MAAME,KAAS,WAAWxB,CAAW,IAFlE;AAG1B;AACA,eAAsByB,EAAuB,GAAyC;CACpF,IAAMC,IAAc,MAAMC,EAAerB,CAAO;CAGhD,OAFIoB,EAAY,WAAW,IAAU,CAAC,IAE/B,QAAQ,IACbA,EAAY,KAAK,GAAK,MACpBL,EACEO,GACAF,EAAY,SAAS,IAAI,WAAWG,IAAQ,MAAM,SACpD,CACF,CACF,CAAC,CAAC,MAAK,MAASC,EAAM,QAAQ,MAA2B1B,MAAS,IAAI,CAAC;AACzE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./webIdUtils.cjs.js");let t=require("solid-ui"),n=require("solid-logic"),r=require("rdflib");
|
|
1
|
+
const e=require("./webIdUtils.cjs.js");let t=require("solid-ui"),n=require("solid-logic"),r=require("rdflib");async function i(r){if(e.isWebIdUri(r)){try{await n.store.fetcher.load(r.doc())}catch(e){console.warn(`Unable to load profile document for WebID`,r.doc().uri,e)}return n.store.each(r,t.ns.space(`storage`)).filter(e=>e.termType===`NamedNode`)}try{let e=await a(r);return e?[e]:[]}catch(e){return console.error(`cannot load container`,e),[]}}async function a(e){let t=new URL(e.value||e.uri),r=t.pathname;for(;r.length;){r=r.substring(0,r.lastIndexOf(`/`));let e=n.store.sym(`${t.origin}${r}/`);if(await o(e))return e}return null}async function o(e){return await s(e),n.store.holds(e,t.ns.rdf(`type`),t.ns.space(`Storage`),e.doc())}async function s(e){if(!n.store.any(e,t.ns.ldp(`contains`),void 0,e.doc()))try{let t=(await n.store.fetcher.webOperation(`GET`,e.uri,n.store.fetcher.initFetchOptions(e.uri,{headers:{accept:`text/turtle`}}))).responseText;e.uri&&t&&(0,r.parse)(t,n.store,e.uri,`text/turtle`)}catch(t){console.warn(`Unable to load container representation for`,e.uri,t)}}exports.getPodStorages=i,exports.loadContainerRepresentation=s;
|
|
2
2
|
//# sourceMappingURL=podUtils.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podUtils.cjs.js","names":["isWebIdUri","store","ns","ACL_LINK","require_webIdUtils","solid_ui","solid_logic","rdflib","parseWacAllowHeader","permissions","headerValue","entry","match","permissionGroup","accessModes","modes","mode","deriveAccessFlags","wacAllow","userModes","publicModes","getPodStorages","url","err","podStorages","isPodStorage","pod","storage","findPodStorageFromUrl","podStorage","pathStorage","candidate","loadContainerRepresentation","subject","containerTurtle","isContainerSubject","store","subjectUri","typeUris","getContainerItemCount","seen","item","resource","parent","pathEnd","getResponseMetadata","contentType","canEdit","isPublic","eTag","modified","response","accessFlags","responseNode","req","aclUri","fetchResourceMetadata","metadata"],"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":"A,8GAOA,SAASQ,EAAqB,EAAwC,CACpE,IAAMC,EAAc,IAAI,IACxB,GAAI,CAACC,EAAa,OAAOD,EAEzB,IAAK,IAAME,KAASD,EAAY,MAAM,GAAG,EAAG,CAC1C,IAAME,EAAQD,EAAM,KAAK,CAAC,CAAC,MAAM,+BAA+B,EAChE,GAAIC,EAAO,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AI,8CAA8C,EACxDH,CAEF,CAAA,CAAK,QAAS,GAAa,CACzB,IAAMoB,EAAejB,EAAM,IACzBkB,EACAlB,EAAM,IAAI,0CAA0C,CACtD,EACA,GAAIiB,GAAgBA,EAAa,WAAa,YAAa,CACzD,EAAcjB,EAAM,SAASiB,EAAqBnD,EAAAA,GAAG,MAAM,cAAc,CAAC,GAAK,IAAA,GAG/E,IAAMkD,EAAcnC,EAFFmB,EAAM,SAASiB,EAAqBnD,EAAAA,GAAG,MAAM,WAAW,CAAC,GACxEkC,EAAM,SAASiB,EAAqBnD,EAAAA,GAAG,MAAM,WAAW,CAAC,CACd,EAC9C,EAAUkD,EAAY,QACtB,EAAWA,EAAY,SACvB,EAAOhB,EAAM,SAASiB,EAAqBnD,EAAAA,GAAG,MAAM,MAAM,CAAC,GAAK,IAAA,GAChE,EAAWkC,EAAM,SAASH,EAAgB/B,EAAAA,GAAG,IAAI,UAAU,CAAC,GAAKkC,EAAM,SAASH,EAAgB/B,EAAAA,GAAG,GAAG,UAAU,CAAC,GAAK,IAAA,EACxH,CACF,CAAC,EAGH,IAAMqD,EAASnB,EAAM,IAAIH,EAAS9B,EAAAA,QAAQ,CAAC,EAAE,OAAS,IAAA,GACtD,MAAO,CAAE,cAAa,UAAS,WAAU,SAAQ,OAAM,UAAS,CAClE,CAEA,eAAsBqD,EAAuB,EAAkB,EAA2D,CACxH,IAAML,EAAW,MAAMf,EAAM,QAAQ,aAAa,OAAQH,EAAQ,GAAG,EAErE,GAAI,CAACkB,EAAS,GACZ,MAAU,MAAM,mCAAmCA,EAAS,QAAQ,EAGtE,IAAMM,EAAWZ,EAAoBT,EAAOH,EAASkB,CAAQ,EAC7D,GAAI,CAACM,EAAS,YACZ,MAAU,MAAM,4BAA4B,EAG9C,OAAOA,CACT,C"}
|
|
1
|
+
{"version":3,"file":"podUtils.cjs.js","names":["isWebIdUri","store","ns","require_webIdUtils","solid_ui","solid_logic","rdflib","getPodStorages","url","err","pod","storage","findPodStorageFromUrl","podStorage","pathStorage","candidate","isPodStorage","loadContainerRepresentation","subject","containerTurtle"],"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'\n\ntype 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 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 // A WebID's pim:storage assertion is authoritative; not every server serializes space:Storage on its root container.\n return podStorages.filter((pod): pod is NamedNode => pod.termType === '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)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AQ,IAAI,CAAC,EAClE,GAAI,CAEF,IAAMC,GAAkB,MADDlB,EAAAA,MAAM,QAAQ,aAAa,MAAOiB,EAAQ,IAAKjB,EAAAA,MAAM,QAAQ,iBAAiBiB,EAAQ,IAAK,CAAE,QAAS,CAAE,OAAQ,aAAc,CAAE,CAAC,CAAC,EAAA,CACxH,aAC7BA,EAAQ,KAAOC,IACjB,EAAAb,EAAA,MAAA,CAAMa,EAAiBlB,EAAAA,MAAOiB,EAAQ,IAAK,aAAa,CAE5D,OAAST,EAAK,CACZ,QAAQ,KAAK,8CAA+CS,EAAQ,IAAKT,CAAG,CAC9E,CAEJ,C"}
|
package/dist/utils/podUtils.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { LiveStore, NamedNode } from '../../node_modules/rdflib';
|
|
2
|
-
|
|
2
|
+
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
|
+
};
|
|
3
10
|
export declare function getPodStorages(url: NamedNode): Promise<NamedNode[]>;
|
|
4
11
|
export declare function loadContainerRepresentation(subject: any): Promise<void>;
|
|
5
12
|
export declare function isContainerSubject(store: LiveStore | undefined, subjectUri: string | undefined): boolean;
|
|
6
13
|
export declare function getContainerItemCount(store: LiveStore | undefined, subjectUri: string | undefined): number;
|
|
7
14
|
export declare function getResponseMetadata(store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata;
|
|
8
15
|
export declare function fetchResourceMetadata(store: LiveStore, subject: NamedNode): Promise<FileExplorerResourceMetadata>;
|
|
16
|
+
export {};
|
|
9
17
|
//# sourceMappingURL=podUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podUtils.d.ts","sourceRoot":"","sources":["../../src/utils/podUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAS,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"podUtils.d.ts","sourceRoot":"","sources":["../../src/utils/podUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAS,MAAM,QAAQ,CAAA;AAIpD,KAAK,4BAA4B,GAAG;IAClC,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,wBAAsB,cAAc,CAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAkB1E;AAqBD,wBAAsB,2BAA2B,CAAE,OAAO,KAAA,iBAazD;AAED,wBAAgB,kBAAkB,CAAE,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAUzG;AAKD,wBAAgB,qBAAqB,CAAE,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAwB3G;AAED,wBAAgB,mBAAmB,CAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,4BAA4B,CAyC3H;AAED,wBAAsB,qBAAqB,CAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAaxH"}
|