solid-ui 5.0.2-4 → 5.0.2-6
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/acl/access-controller.cjs.js +1 -1
- package/dist/acl/access-controller.cjs.js.map +1 -1
- package/dist/acl/access-controller.esm.js +37 -37
- package/dist/acl/access-groups.cjs.js +2 -2
- package/dist/acl/access-groups.cjs.js.map +1 -1
- package/dist/acl/access-groups.esm.js +78 -78
- package/dist/acl/acl-control.cjs.js +1 -1
- package/dist/acl/acl-control.cjs.js.map +1 -1
- package/dist/acl/acl-control.esm.js +19 -19
- package/dist/acl/add-agent-buttons.cjs.js +1 -1
- package/dist/acl/add-agent-buttons.cjs.js.map +1 -1
- package/dist/acl/add-agent-buttons.esm.js +51 -51
- package/dist/chat/bookmarks.cjs.js +1 -1
- package/dist/chat/bookmarks.cjs.js.map +1 -1
- package/dist/chat/bookmarks.esm.js +44 -44
- package/dist/chat/bookmarks.esm.js.map +1 -1
- package/dist/chat/chatLogic.cjs.js +2 -2
- package/dist/chat/chatLogic.cjs.js.map +1 -1
- package/dist/chat/chatLogic.esm.js +54 -54
- package/dist/chat/dateFolder.cjs.js +1 -1
- package/dist/chat/dateFolder.cjs.js.map +1 -1
- package/dist/chat/dateFolder.esm.js +30 -30
- package/dist/chat/infinite.cjs.js +1 -1
- package/dist/chat/infinite.cjs.js.map +1 -1
- package/dist/chat/infinite.esm.js +49 -49
- package/dist/chat/keys.cjs.js +2 -2
- package/dist/chat/keys.cjs.js.map +1 -1
- package/dist/chat/keys.esm.js +17 -17
- package/dist/chat/message.cjs.js +4 -4
- package/dist/chat/message.cjs.js.map +1 -1
- package/dist/chat/message.esm.js +114 -114
- package/dist/chat/message.esm.js.map +1 -1
- package/dist/chat/messageTools.cjs.js +1 -1
- package/dist/chat/messageTools.cjs.js.map +1 -1
- package/dist/chat/messageTools.esm.js +51 -51
- package/dist/chunks/{ResourceActionsMenu-Bllpr4M5.js → ResourceActionsMenu-KFMLta44.js} +78 -69
- package/dist/chunks/ResourceActionsMenu-KFMLta44.js.map +1 -0
- package/dist/chunks/{access-control-modal-CwmY_Dod.js → access-control-modal-BZdBv6VD.js} +165 -165
- package/dist/chunks/{access-control-modal-CwmY_Dod.js.map → access-control-modal-BZdBv6VD.js.map} +1 -1
- package/dist/chunks/{account-CoHPKKDu.js → account-DWmMJre6.js} +22 -22
- package/dist/chunks/{account-CoHPKKDu.js.map → account-DWmMJre6.js.map} +1 -1
- package/dist/chunks/{auth-CocCqS1p.js → auth-EK-iYNYZ.js} +37 -37
- package/dist/chunks/{auth-CocCqS1p.js.map → auth-EK-iYNYZ.js.map} +1 -1
- package/dist/chunks/{avatar-sNdKdWVO.js → avatar-BBgvMlqv.js} +13 -13
- package/dist/chunks/{avatar-sNdKdWVO.js.map → avatar-BBgvMlqv.js.map} +1 -1
- package/dist/chunks/{combobox-fSTp9qoT.js → combobox-DS6byaf1.js} +3 -3
- package/dist/chunks/{combobox-fSTp9qoT.js.map → combobox-DS6byaf1.js.map} +1 -1
- package/dist/chunks/{error-state-BD4_Wrkz.js → error-state-jV9dlFX2.js} +2 -2
- package/dist/chunks/{error-state-BD4_Wrkz.js.map → error-state-jV9dlFX2.js.map} +1 -1
- package/dist/chunks/{file-explorer-header-D0TebSYR.js → file-explorer-header-BJzo6xDU.js} +50 -50
- package/dist/chunks/{file-explorer-header-D0TebSYR.js.map → file-explorer-header-BJzo6xDU.js.map} +1 -1
- package/dist/chunks/{guard-BOicu9dt.js → guard-SxVT1xr4.js} +13 -13
- package/dist/chunks/{guard-BOicu9dt.js.map → guard-SxVT1xr4.js.map} +1 -1
- package/dist/chunks/{index.esm-C9oV3H3X.js → index.esm-BQrkxchZ.js} +2 -2
- package/dist/chunks/{index.esm-C9oV3H3X.js.map → index.esm-BQrkxchZ.js.map} +1 -1
- package/dist/chunks/{jsonld-D-TE94B0.js → jsonld-C6IOQ1Tg.js} +2 -2
- package/dist/chunks/{jsonld-D-TE94B0.js.map → jsonld-C6IOQ1Tg.js.map} +1 -1
- package/dist/chunks/{login-button-clTw_9tX.js → login-button-Dd0rwZJk.js} +11 -11
- package/dist/chunks/{login-button-clTw_9tX.js.map → login-button-Dd0rwZJk.js.map} +1 -1
- package/dist/chunks/{logout-button-CP-Pz70O.js → logout-button-Da34Lrnq.js} +11 -11
- package/dist/chunks/{logout-button-CP-Pz70O.js.map → logout-button-Da34Lrnq.js.map} +1 -1
- package/dist/chunks/{menu-D0k2fkiE.js → menu-BNJU654v.js} +2 -2
- package/dist/chunks/{menu-D0k2fkiE.js.map → menu-BNJU654v.js.map} +1 -1
- package/dist/chunks/{provider-Cuv3Kp6G.js → provider-B3FoP2qW.js} +11 -11
- package/dist/chunks/{provider-Cuv3Kp6G.js.map → provider-B3FoP2qW.js.map} +1 -1
- package/dist/chunks/{rdf-form-DVmTw3RG.js → rdf-form-BkKDmFPD.js} +36 -36
- package/dist/chunks/{rdf-form-DVmTw3RG.js.map → rdf-form-BkKDmFPD.js.map} +1 -1
- package/dist/chunks/{rdf-input-CRYLK-27.js → rdf-input-BPePtqfS.js} +61 -61
- package/dist/chunks/{rdf-input-CRYLK-27.js.map → rdf-input-BPePtqfS.js.map} +1 -1
- package/dist/chunks/{signup-button-CexdMWj6.js → signup-button-DOInssOu.js} +11 -11
- package/dist/chunks/{signup-button-CexdMWj6.js.map → signup-button-DOInssOu.js.map} +1 -1
- package/dist/chunks/{solidLogicSingleton.esm-BXyHD7mn.js → solidLogicSingleton.esm-Bvt7E7Vl.js} +50 -29
- package/dist/chunks/solidLogicSingleton.esm-Bvt7E7Vl.js.map +1 -0
- package/dist/chunks/square-arrow-out-up-right-DaALlpHo.js +9 -0
- package/dist/chunks/square-arrow-out-up-right-DaALlpHo.js.map +1 -0
- package/dist/chunks/{src-DQgHAH3d.js → src-Cv9Lm1V-.js} +3009 -2980
- package/dist/chunks/src-Cv9Lm1V-.js.map +1 -0
- package/dist/chunks/{style-CXaw5EYi.js → style-Dlw9-wPn.js} +3 -3
- package/dist/chunks/{style-CXaw5EYi.js.map → style-Dlw9-wPn.js.map} +1 -1
- package/dist/chunks/{widgets-BBEQu0CS.js → widgets-C92ihtlF.js} +733 -737
- package/dist/chunks/widgets-C92ihtlF.js.map +1 -0
- package/dist/components/access-control-modal/AccessControlAddAccess.cjs.js +1 -1
- package/dist/components/access-control-modal/AccessControlAddAccess.esm.js +5 -5
- package/dist/components/access-control-modal/AccessControlGeneralAccess.cjs.js +2 -2
- package/dist/components/access-control-modal/AccessControlGeneralAccess.cjs.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlGeneralAccess.esm.js +12 -12
- package/dist/components/access-control-modal/AccessControlModal.cjs.js +2 -2
- package/dist/components/access-control-modal/AccessControlModal.cjs.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlModal.esm.js +35 -35
- package/dist/components/access-control-modal/AccessControlModal.esm.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlSharedAccess.cjs.js +1 -1
- package/dist/components/access-control-modal/AccessControlSharedAccess.esm.js +2 -2
- package/dist/components/access-control-modal/accessTargetResolver.cjs.js +1 -1
- package/dist/components/access-control-modal/accessTargetResolver.cjs.js.map +1 -1
- package/dist/components/access-control-modal/accessTargetResolver.esm.js +21 -21
- package/dist/components/access-control-modal.js +1 -1
- package/dist/components/account/Account.cjs.js +1 -1
- package/dist/components/account/Account.esm.js +3 -3
- package/dist/components/account.js +1 -1
- package/dist/components/all.cjs.js +1 -1
- package/dist/components/all.esm.js +16 -16
- package/dist/components/avatar.js +1 -1
- package/dist/components/combobox/Combobox.cjs.js +1 -1
- package/dist/components/combobox/Combobox.esm.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/dialog/Dialog.cjs.js +2 -2
- package/dist/components/dialog/Dialog.cjs.js.map +1 -1
- package/dist/components/dialog/Dialog.esm.js +9 -9
- package/dist/components/dialog/Dialog.esm.js.map +1 -1
- package/dist/components/dialog-provider/DialogProvider.cjs.js +1 -1
- package/dist/components/dialog-provider/DialogProvider.cjs.js.map +1 -1
- package/dist/components/dialog-provider/DialogProvider.esm.js +6 -6
- package/dist/components/dialogs-root/DialogsRoot.cjs.js +2 -2
- package/dist/components/dialogs-root/DialogsRoot.cjs.js.map +1 -1
- package/dist/components/dialogs-root/DialogsRoot.esm.js +7 -7
- package/dist/components/error-state/ErrorState.cjs.js +1 -1
- package/dist/components/error-state/ErrorState.esm.js +1 -1
- package/dist/components/error-state.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +10 -10
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +5 -5
- package/dist/components/file-explorer-header.js +1 -1
- package/dist/components/guard.js +1 -1
- package/dist/components/login-button/LoginButton.cjs.js +1 -1
- package/dist/components/login-button/LoginButton.esm.js +1 -1
- package/dist/components/login-button.js +1 -1
- package/dist/components/login-modal/LoginModal.cjs.js +1 -1
- package/dist/components/login-modal/LoginModal.esm.js +2 -2
- package/dist/components/login-modal.js +1 -1
- package/dist/components/logout-button/LogoutButton.cjs.js +1 -1
- package/dist/components/logout-button/LogoutButton.esm.js +1 -1
- package/dist/components/logout-button.js +1 -1
- package/dist/components/menu/Menu.cjs.js +1 -1
- package/dist/components/menu/Menu.cjs.js.map +1 -1
- package/dist/components/menu/Menu.esm.js +1 -1
- package/dist/components/menu/Menu.esm.js.map +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/provider.js +1 -1
- package/dist/components/rdf-form/RDFForm.cjs.js +3 -3
- package/dist/components/rdf-form/RDFForm.cjs.js.map +1 -1
- package/dist/components/rdf-form/RDFForm.esm.js +13 -13
- package/dist/components/rdf-form/RDFForm.esm.js.map +1 -1
- package/dist/components/rdf-form.js +1 -1
- package/dist/components/rdf-input/RDFInput.cjs.js +2 -2
- package/dist/components/rdf-input/RDFInput.cjs.js.map +1 -1
- package/dist/components/rdf-input/RDFInput.esm.js +4 -4
- package/dist/components/rdf-input/RDFInput.esm.js.map +1 -1
- package/dist/components/rdf-input.js +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +9 -3
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +18 -9
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu.js +1 -1
- package/dist/components/select/Select.cjs.js +1 -1
- package/dist/components/select/Select.cjs.js.map +1 -1
- package/dist/components/select/Select.esm.js +1 -1
- package/dist/components/signup-button/SignupButton.cjs.js +1 -1
- package/dist/components/signup-button/SignupButton.esm.js +1 -1
- package/dist/components/signup-button.js +1 -1
- package/dist/components.js +21 -21
- package/dist/create/create.cjs.js +1 -1
- package/dist/create/create.cjs.js.map +1 -1
- package/dist/create/create.esm.js +23 -23
- package/dist/header/index.cjs.js +1 -1
- package/dist/header/index.cjs.js.map +1 -1
- package/dist/header/index.esm.js +53 -53
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +23 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/lib/auth/SolidAuth.cjs.js +1 -1
- package/dist/lib/auth/SolidAuth.cjs.js.map +1 -1
- package/dist/lib/auth/SolidAuth.esm.js +8 -8
- package/dist/lib/auth/SolidAuth.esm.js.map +1 -1
- package/dist/lib/code-editor/CodeEditor.cjs.js +1 -1
- package/dist/lib/code-editor/CodeEditor.cjs.js.map +1 -1
- package/dist/lib/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/lib/code-editor/CodeEditor.esm.js +34 -30
- package/dist/lib/code-editor/CodeEditor.esm.js.map +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.cjs.js +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.cjs.js.map +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.esm.js +4 -4
- package/dist/lib/components/index.cjs.js +1 -1
- package/dist/lib/components/index.esm.js +3 -3
- package/dist/lib/dialogs/helpers.cjs.js +1 -1
- package/dist/lib/dialogs/helpers.cjs.js.map +1 -1
- package/dist/lib/dialogs/helpers.esm.js +4 -4
- package/dist/lib/file-explorer/index.cjs.js +1 -1
- package/dist/lib/file-explorer/index.d.ts +1 -0
- package/dist/lib/file-explorer/index.d.ts.map +1 -1
- package/dist/lib/file-explorer/index.esm.js +2 -1
- package/dist/lib/file-explorer/pane-menu-items.cjs.js +2 -0
- package/dist/lib/file-explorer/pane-menu-items.cjs.js.map +1 -0
- package/dist/lib/file-explorer/pane-menu-items.d.ts +22 -0
- package/dist/lib/file-explorer/pane-menu-items.d.ts.map +1 -0
- package/dist/lib/file-explorer/pane-menu-items.esm.js +20 -0
- package/dist/lib/file-explorer/pane-menu-items.esm.js.map +1 -0
- package/dist/lib/file-explorer/relevant-panes.cjs.js +1 -1
- package/dist/lib/file-explorer/relevant-panes.cjs.js.map +1 -1
- package/dist/lib/file-explorer/relevant-panes.esm.js +8 -8
- package/dist/lib/messageArea.cjs.js +1 -1
- package/dist/lib/messageArea.cjs.js.map +1 -1
- package/dist/lib/messageArea.esm.js +27 -27
- package/dist/lib/pad.cjs.js +1 -1
- package/dist/lib/pad.cjs.js.map +1 -1
- package/dist/lib/pad.esm.js +15 -15
- package/dist/lib/participation.cjs.js +1 -1
- package/dist/lib/participation.cjs.js.map +1 -1
- package/dist/lib/participation.esm.js +59 -59
- package/dist/lib/preferences.cjs.js +1 -1
- package/dist/lib/preferences.cjs.js.map +1 -1
- package/dist/lib/preferences.esm.js +28 -28
- package/dist/lib/table.cjs.js +3 -3
- package/dist/lib/table.cjs.js.map +1 -1
- package/dist/lib/table.esm.js +123 -123
- package/dist/lib/table.esm.js.map +1 -1
- package/dist/lib/tabs.cjs.js +1 -1
- package/dist/lib/tabs.cjs.js.map +1 -1
- package/dist/lib/tabs.esm.js +16 -16
- package/dist/loader.js +11 -11
- package/dist/login/login.cjs.js +6 -6
- package/dist/login/login.cjs.js.map +1 -1
- package/dist/login/login.esm.js +142 -142
- package/dist/media/media-capture.cjs.js +1 -1
- package/dist/media/media-capture.cjs.js.map +1 -1
- package/dist/media/media-capture.esm.js +6 -6
- package/dist/solid-ui.js +34 -28
- package/dist/solid-ui.min.js +34 -28
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.cjs.js.map +1 -1
- package/dist/utils/index.esm.js +4 -4
- package/dist/utils/keyHelpers/accessData.cjs.js +1 -1
- package/dist/utils/keyHelpers/accessData.cjs.js.map +1 -1
- package/dist/utils/keyHelpers/accessData.esm.js +15 -15
- package/dist/utils/label.cjs.js +1 -1
- package/dist/utils/label.cjs.js.map +1 -1
- package/dist/utils/label.esm.js +4 -4
- package/dist/widgets/buttons.cjs.js +12 -12
- package/dist/widgets/buttons.cjs.js.map +1 -1
- package/dist/widgets/buttons.esm.js +179 -179
- package/dist/widgets/error.cjs.js +1 -1
- package/dist/widgets/error.cjs.js.map +1 -1
- package/dist/widgets/error.esm.js +5 -5
- package/dist/widgets/forms/autocomplete/autocompleteBar.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteBar.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteBar.esm.js +17 -17
- package/dist/widgets/forms/autocomplete/autocompleteField.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteField.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteField.esm.js +23 -23
- package/dist/widgets/forms/autocomplete/autocompletePicker.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/autocompletePicker.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/autocompletePicker.esm.js +26 -26
- package/dist/widgets/forms/autocomplete/language.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/language.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/language.esm.js +9 -9
- package/dist/widgets/forms/autocomplete/publicData.cjs.js +5 -5
- package/dist/widgets/forms/autocomplete/publicData.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/publicData.esm.js +67 -67
- package/dist/widgets/forms/basic.cjs.js +1 -1
- package/dist/widgets/forms/basic.cjs.js.map +1 -1
- package/dist/widgets/forms/basic.esm.js +11 -11
- package/dist/widgets/forms.cjs.js +4 -4
- package/dist/widgets/forms.cjs.js.map +1 -1
- package/dist/widgets/forms.esm.js +561 -561
- package/dist/widgets/forms.esm.js.map +1 -1
- package/dist/widgets/index.cjs.js +1 -1
- package/dist/widgets/index.cjs.js.map +1 -1
- package/dist/widgets/index.esm.js +82 -82
- package/dist/widgets/peoplePicker.cjs.js +2 -2
- package/dist/widgets/peoplePicker.cjs.js.map +1 -1
- package/dist/widgets/peoplePicker.esm.js +82 -82
- package/package.json +3 -3
- package/dist/chunks/ResourceActionsMenu-Bllpr4M5.js.map +0 -1
- package/dist/chunks/solidLogicSingleton.esm-BXyHD7mn.js.map +0 -1
- package/dist/chunks/src-DQgHAH3d.js.map +0 -1
- package/dist/chunks/widgets-BBEQu0CS.js.map +0 -1
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import e from "../lib/
|
|
2
|
-
import { label as
|
|
1
|
+
import { log as e, warn as t } from "../lib/debug.esm.js";
|
|
2
|
+
import { label as n } from "../utils/label.esm.js";
|
|
3
|
+
import { icons as r } from "../lib/iconBase.esm.js";
|
|
4
|
+
import i from "../lib/ns.esm.js";
|
|
5
|
+
import { errorMessageBlock as a } from "../widgets/error.esm.js";
|
|
3
6
|
import "../utils/index.esm.js";
|
|
4
|
-
import { log as n, warn as r } from "../lib/debug.esm.js";
|
|
5
|
-
import { errorMessageBlock as i } from "../widgets/error.esm.js";
|
|
6
|
-
import { icons as a } from "../lib/iconBase.esm.js";
|
|
7
7
|
import { button as o, cancelButton as s, deleteButtonWithCheck as c, refreshTree as l } from "../widgets/buttons.esm.js";
|
|
8
8
|
import { newThing as u } from "../widgets/forms.esm.js";
|
|
9
9
|
import "../widgets/index.esm.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { renderBookmarksButton as d } from "./bookmarks.esm.js";
|
|
11
|
+
import { allVersions as f, isDeleted as p, mostRecentVersion as m } from "./chatLogic.esm.js";
|
|
12
12
|
import { switchToEditor as h } from "./message.esm.js";
|
|
13
13
|
import * as g from "rdflib";
|
|
14
14
|
import { authn as _, store as v } from "solid-logic";
|
|
15
15
|
// src/chat/messageTools.js
|
|
16
16
|
var y = window.document, b = "noun_253504.svg", x = "noun_1384132.svg", S = "noun_1384135.svg", C = "noun-reply-5506924.svg", w = {};
|
|
17
|
-
w[
|
|
18
|
-
async function T(t,
|
|
19
|
-
let
|
|
17
|
+
w[i.schema("AgreeAction")] = "👍", w[i.schema("DisagreeAction")] = "👎", w[i.schema("EndorseAction")] = "⭐️", w[i.schema("LikeAction")] = "❤️";
|
|
18
|
+
async function T(t, n) {
|
|
19
|
+
let r = y.createElement("span");
|
|
20
20
|
async function a() {
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
24
|
-
let a =
|
|
25
|
-
v.any(
|
|
26
|
-
v.any(
|
|
27
|
-
v.any(
|
|
21
|
+
if (r.innerHTML = "", p(t)) return r;
|
|
22
|
+
let e = (await f(t)).map((e) => v.each(null, i.schema("target"), e, n)).flat();
|
|
23
|
+
if (e.length === 0) return r;
|
|
24
|
+
let a = e.map((e) => [
|
|
25
|
+
v.any(e, i.rdf("type"), null, n),
|
|
26
|
+
v.any(e, i.sioc("content"), null, n),
|
|
27
|
+
v.any(e, i.schema("agent"), null, n)
|
|
28
28
|
]);
|
|
29
29
|
a.sort(), a.forEach((e) => {
|
|
30
|
-
let [t, n,
|
|
31
|
-
|
|
30
|
+
let [t, n, i] = e, a;
|
|
31
|
+
i ? (a = y.createElement("a"), a.setAttribute("href", i.uri)) : a = y.createTextNode(""), a.textContent = n || w[t] || "⬜️", r.appendChild(a);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
return a().then(
|
|
34
|
+
return a().then(e("sentimentStripLinked: sentimentStripLinked async refreshed")), r.refresh = a, r;
|
|
35
35
|
}
|
|
36
|
-
async function E(
|
|
36
|
+
async function E(e, f, p, w) {
|
|
37
37
|
async function T() {
|
|
38
|
-
let
|
|
38
|
+
let n = v.any(e, i.foaf("maker"));
|
|
39
39
|
if (!j) alert("You can't delete the message, you are not logged in.");
|
|
40
|
-
else if (j.sameTerm(
|
|
40
|
+
else if (j.sameTerm(n)) {
|
|
41
41
|
try {
|
|
42
|
-
await w.deleteMessage(
|
|
42
|
+
await w.deleteMessage(e);
|
|
43
43
|
} catch (e) {
|
|
44
|
-
let
|
|
45
|
-
|
|
44
|
+
let n = "Error deleting messaage " + e;
|
|
45
|
+
t(n), alert(n), (p.statusArea || f.parentNode).appendChild(a(y, n));
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
} else alert("You can't delete the message, you are not logged in as the author, " +
|
|
47
|
+
f.parentNode.removeChild(f);
|
|
48
|
+
} else alert("You can't delete the message, you are not logged in as the author, " + n);
|
|
49
49
|
k();
|
|
50
50
|
}
|
|
51
51
|
async function E(t) {
|
|
52
|
-
j.value === v.any(
|
|
52
|
+
j.value === v.any(e, i.foaf("maker")).value && (k(), await h(t, e, w, p));
|
|
53
53
|
}
|
|
54
54
|
async function D() {
|
|
55
|
-
let
|
|
56
|
-
if (!
|
|
57
|
-
|
|
55
|
+
let t = await w.createThread(e), n = p.chatOptions;
|
|
56
|
+
if (!n) throw Error("replyInThread: missing options");
|
|
57
|
+
n.showThread(t, n), k();
|
|
58
58
|
}
|
|
59
59
|
let O = y.createElement("div");
|
|
60
|
-
if (await
|
|
60
|
+
if (await m(e).value === i.schema("dateDeleted").value) return O;
|
|
61
61
|
function k() {
|
|
62
62
|
O.parentElement.parentElement.removeChild(O.parentElement);
|
|
63
63
|
}
|
|
@@ -65,51 +65,51 @@ async function E(n, d, f, w) {
|
|
|
65
65
|
await v.updater.update(v.connectedStatements(e), []);
|
|
66
66
|
}
|
|
67
67
|
let j = _.currentUser();
|
|
68
|
-
j && v.holds(
|
|
68
|
+
j && v.holds(e, i.foaf("maker"), j) && (O.appendChild(c(y, O, "message", T)), O.appendChild(o(y, r.iconBase + b, "edit", () => E(f)))), d(p).then((e) => {
|
|
69
69
|
e && O.appendChild(e);
|
|
70
70
|
});
|
|
71
|
-
function M(
|
|
72
|
-
function
|
|
71
|
+
function M(e, t, r, a, s, c) {
|
|
72
|
+
function d() {
|
|
73
73
|
p.style.backgroundColor = _ ? "yellow" : "white";
|
|
74
74
|
}
|
|
75
|
-
let p = o(y,
|
|
76
|
-
if (_) await A(_), _ = null,
|
|
75
|
+
let p = o(y, r, n(a), async function(n) {
|
|
76
|
+
if (_) await A(_), _ = null, d();
|
|
77
77
|
else {
|
|
78
78
|
_ = u(s);
|
|
79
|
-
let
|
|
80
|
-
g.st(_,
|
|
81
|
-
g.st(_,
|
|
82
|
-
g.st(_,
|
|
79
|
+
let n = [
|
|
80
|
+
g.st(_, i.schema("agent"), e.me, s),
|
|
81
|
+
g.st(_, i.rdf("type"), a, s),
|
|
82
|
+
g.st(_, i.schema("target"), t, s)
|
|
83
83
|
];
|
|
84
|
-
if (await v.updater.update([],
|
|
84
|
+
if (await v.updater.update([], n), d(), c) {
|
|
85
85
|
let e = !1;
|
|
86
86
|
for (let t = 0; t < c.length; t++) {
|
|
87
87
|
let n = m(c[t]);
|
|
88
88
|
n && (await A(n), e = !0);
|
|
89
89
|
}
|
|
90
|
-
e && l(
|
|
90
|
+
e && l(f);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
|
-
function m(
|
|
95
|
-
let
|
|
96
|
-
return
|
|
94
|
+
function m(n) {
|
|
95
|
+
let r = v.each(null, i.schema("agent"), e.me, s).filter((e) => v.holds(e, i.rdf("type"), n, s)).filter((e) => v.holds(e, i.schema("target"), t, s));
|
|
96
|
+
return r.length ? r[0] : null;
|
|
97
97
|
}
|
|
98
98
|
function h() {
|
|
99
|
-
_ = m(a),
|
|
99
|
+
_ = m(a), d();
|
|
100
100
|
}
|
|
101
101
|
let _;
|
|
102
102
|
return p.refresh = h, h(), p;
|
|
103
103
|
}
|
|
104
|
-
if (j = _.currentUser(), j && await
|
|
104
|
+
if (j = _.currentUser(), j && await m(e).value !== i.schema("dateDeleted").value) {
|
|
105
105
|
let t = {
|
|
106
106
|
me: j,
|
|
107
107
|
dom: y,
|
|
108
108
|
div: O
|
|
109
109
|
};
|
|
110
|
-
O.appendChild(M(t,
|
|
110
|
+
O.appendChild(M(t, e, r.iconBase + x, i.schema("AgreeAction"), e.doc(), [i.schema("DisagreeAction")])), O.appendChild(M(t, e, r.iconBase + S, i.schema("DisagreeAction"), e.doc(), [i.schema("AgreeAction")]));
|
|
111
111
|
}
|
|
112
|
-
v.any(
|
|
112
|
+
v.any(e, i.dct("created")) && O.appendChild(o(y, r.iconBase + C, "Reply in thread", async () => {
|
|
113
113
|
await D();
|
|
114
114
|
}));
|
|
115
115
|
let N = O.appendChild(s(y));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as n, g as r, i, o as a, p as o, u as s } from "./components-C8c2Ucm5.js";
|
|
1
|
+
import { c as e, g as t, i as n, o as r, p as i, u as a } from "./components-C8c2Ucm5.js";
|
|
3
2
|
import "./button-D6qO2idW.js";
|
|
3
|
+
import "./menu-BNJU654v.js";
|
|
4
4
|
import "./menu-item-nfPpH4dN.js";
|
|
5
|
-
import "./
|
|
5
|
+
import "./square-arrow-out-up-right-DaALlpHo.js";
|
|
6
|
+
import { t as o, y as s } from "./solidLogicSingleton.esm-Bvt7E7Vl.js";
|
|
6
7
|
// ~icons/lucide/pencil
|
|
7
8
|
var c = class extends HTMLElement {
|
|
8
9
|
constructor() {
|
|
@@ -18,19 +19,19 @@ var l = class extends HTMLElement {
|
|
|
18
19
|
};
|
|
19
20
|
customElements.get("icon-lucide-ellipsis-vertical") || customElements.define("icon-lucide-ellipsis-vertical", l);
|
|
20
21
|
// src/utils/podUtils.ts
|
|
21
|
-
function u(e,
|
|
22
|
-
if (!e || !
|
|
23
|
-
let
|
|
24
|
-
return !!(
|
|
22
|
+
function u(e, t) {
|
|
23
|
+
if (!e || !t) return !1;
|
|
24
|
+
let n = e.sym(t), r = e.findTypeURIs(n);
|
|
25
|
+
return !!(r[s.ldp("Container").uri] || r[s.ldp("BasicContainer").uri] || n.uri.endsWith("/"));
|
|
25
26
|
}
|
|
26
|
-
function d(
|
|
27
|
-
if (!
|
|
28
|
-
let
|
|
29
|
-
for (let
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
return
|
|
27
|
+
function d(e, t) {
|
|
28
|
+
if (!e || !t) return 0;
|
|
29
|
+
let n = e.sym(t), r = /* @__PURE__ */ new Set();
|
|
30
|
+
for (let t of e.each(n, s.ldp("contains"))) if (t.termType === "NamedNode") {
|
|
31
|
+
let e = t;
|
|
32
|
+
o.resource.isHiddenFile(e) || r.add(e.uri);
|
|
33
|
+
}
|
|
34
|
+
return r.size;
|
|
34
35
|
}
|
|
35
36
|
// ~icons/lucide/user-round-cog
|
|
36
37
|
var f = class extends HTMLElement {
|
|
@@ -47,24 +48,24 @@ var p = class extends HTMLElement {
|
|
|
47
48
|
};
|
|
48
49
|
customElements.get("icon-lucide-file") || customElements.define("icon-lucide-file", p);
|
|
49
50
|
// src/components/resource-actions-menu/ResourceActionsMenu.styles.css
|
|
50
|
-
var m =
|
|
51
|
-
function
|
|
52
|
-
|
|
51
|
+
var m = i`:host{& .file-explorer-header-more-button{width:var(--solid-ui-clickable-area,42px);height:var(--solid-ui-clickable-area,42px);padding:0}& .ellipsisIcon{width:16px;height:16px}}`, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, ee, M, N, te, P, ne, F, I, L, R, z, B, V, H, U, W, G, K, q, J;
|
|
52
|
+
function Y(e, t, n) {
|
|
53
|
+
re(e, t), t.set(e, n);
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function re(e, t) {
|
|
55
56
|
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
return e.set(
|
|
58
|
+
function X(e, t, n) {
|
|
59
|
+
return e.set(ie(e, t), n), n;
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
return e.get(
|
|
61
|
+
function Z(e, t) {
|
|
62
|
+
return e.get(ie(e, t));
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function ie(e, t, n) {
|
|
64
65
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
65
66
|
throw TypeError("Private element is not present on this object");
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function Q(e, t, n) {
|
|
68
69
|
return (t = oe(t)) in e ? Object.defineProperty(e, t, {
|
|
69
70
|
value: n,
|
|
70
71
|
enumerable: !0,
|
|
@@ -219,105 +220,113 @@ function le(e) {
|
|
|
219
220
|
function ue(e) {
|
|
220
221
|
return e;
|
|
221
222
|
}
|
|
222
|
-
k = [
|
|
223
|
+
k = [t("solid-ui-resource-actions-menu")];
|
|
223
224
|
var $;
|
|
224
|
-
new (
|
|
225
|
+
new (q = (_ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), w = /*#__PURE__*/ new WeakMap(), T = /*#__PURE__*/ new WeakMap(), E = /*#__PURE__*/ new WeakMap(), J = (A = n({ attribute: !1 }), ee = n({ type: String }), N = n({ attribute: !1 }), P = n({ attribute: !1 }), F = n({ type: Boolean }), L = n({ type: Boolean }), z = n({ type: Boolean }), V = n({ type: Boolean }), U = n({
|
|
225
226
|
type: Boolean,
|
|
226
227
|
attribute: "show-access-in-menu"
|
|
227
|
-
}),
|
|
228
|
+
}), G = n({ attribute: !1 }), "store"), g = class extends r {
|
|
228
229
|
constructor(...e) {
|
|
229
|
-
super(...e),
|
|
230
|
+
super(...e), Y(this, _, (D(this), j(this))), Y(this, v, M(this)), Y(this, y, te(this, void 0)), Y(this, b, ne(this, void 0)), Y(this, x, I(this, !1)), Y(this, S, R(this, !1)), Y(this, C, B(this, !1)), Y(this, w, H(this, !1)), Y(this, T, W(this, !1)), Y(this, E, K(this, [])), Q(this, "handleOpenInNewTab", () => {
|
|
231
|
+
this.subjectUri && window.open(this.subjectUri, "_blank", "noopener,noreferrer");
|
|
232
|
+
});
|
|
230
233
|
}
|
|
231
|
-
get [
|
|
232
|
-
return
|
|
234
|
+
get [J]() {
|
|
235
|
+
return Z(_, this);
|
|
233
236
|
}
|
|
234
237
|
set store(e) {
|
|
235
|
-
|
|
238
|
+
X(_, this, e);
|
|
236
239
|
}
|
|
237
240
|
get subjectUri() {
|
|
238
|
-
return
|
|
241
|
+
return Z(v, this);
|
|
239
242
|
}
|
|
240
243
|
set subjectUri(e) {
|
|
241
|
-
|
|
244
|
+
X(v, this, e);
|
|
242
245
|
}
|
|
243
246
|
get handleAccessClick() {
|
|
244
|
-
return
|
|
247
|
+
return Z(y, this);
|
|
245
248
|
}
|
|
246
249
|
set handleAccessClick(e) {
|
|
247
|
-
|
|
250
|
+
X(y, this, e);
|
|
248
251
|
}
|
|
249
252
|
get handleEditingClick() {
|
|
250
|
-
return
|
|
253
|
+
return Z(b, this);
|
|
251
254
|
}
|
|
252
255
|
set handleEditingClick(e) {
|
|
253
|
-
|
|
256
|
+
X(b, this, e);
|
|
254
257
|
}
|
|
255
258
|
get paneSupportsEditing() {
|
|
256
|
-
return
|
|
259
|
+
return Z(x, this);
|
|
257
260
|
}
|
|
258
261
|
set paneSupportsEditing(e) {
|
|
259
|
-
|
|
262
|
+
X(x, this, e);
|
|
260
263
|
}
|
|
261
264
|
get canEdit() {
|
|
262
|
-
return
|
|
265
|
+
return Z(S, this);
|
|
263
266
|
}
|
|
264
267
|
set canEdit(e) {
|
|
265
|
-
|
|
268
|
+
X(S, this, e);
|
|
266
269
|
}
|
|
267
270
|
get canManageAccess() {
|
|
268
|
-
return
|
|
271
|
+
return Z(C, this);
|
|
269
272
|
}
|
|
270
273
|
set canManageAccess(e) {
|
|
271
|
-
|
|
274
|
+
X(C, this, e);
|
|
272
275
|
}
|
|
273
276
|
get isMobile() {
|
|
274
|
-
return
|
|
277
|
+
return Z(w, this);
|
|
275
278
|
}
|
|
276
279
|
set isMobile(e) {
|
|
277
|
-
|
|
280
|
+
X(w, this, e);
|
|
278
281
|
}
|
|
279
282
|
get showAccessInMenu() {
|
|
280
|
-
return
|
|
283
|
+
return Z(T, this);
|
|
281
284
|
}
|
|
282
285
|
set showAccessInMenu(e) {
|
|
283
|
-
|
|
286
|
+
X(T, this, e);
|
|
284
287
|
}
|
|
285
288
|
get menuItems() {
|
|
286
|
-
return
|
|
289
|
+
return Z(E, this);
|
|
287
290
|
}
|
|
288
291
|
set menuItems(e) {
|
|
289
|
-
|
|
292
|
+
X(E, this, e);
|
|
290
293
|
}
|
|
291
294
|
render() {
|
|
292
|
-
let
|
|
293
|
-
return
|
|
295
|
+
let t = !u(this.store, this.subjectUri) && this.isMobile && this.paneSupportsEditing && this.canEdit && !!this.handleEditingClick, n = this.canManageAccess && !!this.handleAccessClick && (this.showAccessInMenu || this.isMobile), r = this.menuItems.filter((e) => typeof e.action == "function");
|
|
296
|
+
return a`
|
|
294
297
|
<solid-ui-menu>
|
|
295
298
|
<solid-ui-button slot="trigger" class="file-explorer-header-more-button" variant="ghost" title="More options">
|
|
296
299
|
<icon-lucide-ellipsis-vertical slot="icon" class="ellipsisIcon"></icon-lucide-ellipsis-vertical>
|
|
297
300
|
<span class="sr-only">More options</span>
|
|
298
301
|
</solid-ui-button>
|
|
299
|
-
${r.map((e) =>
|
|
302
|
+
${r.map((e) => a`
|
|
300
303
|
<solid-ui-menu-item @solid-ui-select=${(t) => e.action(t)}>
|
|
301
|
-
${typeof e.icon == "string" ?
|
|
304
|
+
${typeof e.icon == "string" ? a`<img slot="left-icon" src=${e.icon} alt="">` : e.icon ?? a`<icon-lucide-file slot="left-icon" aria-hidden="true"></icon-lucide-file>`}
|
|
302
305
|
${e.label}
|
|
303
306
|
</solid-ui-menu-item>
|
|
304
307
|
`)}
|
|
305
|
-
${
|
|
308
|
+
${this.subjectUri ? a`
|
|
309
|
+
<solid-ui-menu-item @solid-ui-select=${this.handleOpenInNewTab}>
|
|
310
|
+
<icon-lucide-square-arrow-out-up-right slot="left-icon"></icon-lucide-square-arrow-out-up-right>
|
|
311
|
+
Open in New Tab
|
|
312
|
+
</solid-ui-menu-item>
|
|
313
|
+
` : e}
|
|
314
|
+
${t ? a`
|
|
306
315
|
<solid-ui-menu-item @solid-ui-select=${this.handleEditingClick}>
|
|
307
316
|
<icon-lucide-pencil slot="left-icon"></icon-lucide-pencil>
|
|
308
317
|
Edit
|
|
309
318
|
</solid-ui-menu-item>
|
|
310
|
-
` :
|
|
311
|
-
${
|
|
319
|
+
` : e}
|
|
320
|
+
${n ? a`
|
|
312
321
|
<solid-ui-menu-item @solid-ui-select=${this.handleAccessClick}>
|
|
313
322
|
<icon-lucide-user-round-cog slot="left-icon"></icon-lucide-user-round-cog>
|
|
314
323
|
Manage Access
|
|
315
324
|
</solid-ui-menu-item>
|
|
316
|
-
` :
|
|
325
|
+
` : e}
|
|
317
326
|
</solid-ui-menu>
|
|
318
327
|
`;
|
|
319
328
|
}
|
|
320
|
-
}, {e: [j, M, te,
|
|
329
|
+
}, {e: [j, M, te, ne, I, R, B, H, W, K, D], c: [$, O]} = ae(g, [
|
|
321
330
|
[
|
|
322
331
|
A,
|
|
323
332
|
1,
|
|
@@ -339,40 +348,40 @@ new (J = (_ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y =
|
|
|
339
348
|
"handleEditingClick"
|
|
340
349
|
],
|
|
341
350
|
[
|
|
342
|
-
|
|
351
|
+
F,
|
|
343
352
|
1,
|
|
344
353
|
"paneSupportsEditing"
|
|
345
354
|
],
|
|
346
355
|
[
|
|
347
|
-
|
|
356
|
+
L,
|
|
348
357
|
1,
|
|
349
358
|
"canEdit"
|
|
350
359
|
],
|
|
351
360
|
[
|
|
352
|
-
|
|
361
|
+
z,
|
|
353
362
|
1,
|
|
354
363
|
"canManageAccess"
|
|
355
364
|
],
|
|
356
365
|
[
|
|
357
|
-
|
|
366
|
+
V,
|
|
358
367
|
1,
|
|
359
368
|
"isMobile"
|
|
360
369
|
],
|
|
361
370
|
[
|
|
362
|
-
|
|
371
|
+
U,
|
|
363
372
|
1,
|
|
364
373
|
"showAccessInMenu"
|
|
365
374
|
],
|
|
366
375
|
[
|
|
367
|
-
|
|
376
|
+
G,
|
|
368
377
|
1,
|
|
369
378
|
"menuItems"
|
|
370
379
|
]
|
|
371
|
-
], k, 0, void 0,
|
|
380
|
+
], k, 0, void 0, r), g), h = class extends ue {
|
|
372
381
|
constructor() {
|
|
373
|
-
super($),
|
|
382
|
+
super($), Q(this, "styles", m), O();
|
|
374
383
|
}
|
|
375
|
-
},
|
|
384
|
+
}, Q(h, q, void 0), h)();
|
|
376
385
|
export { d as n, u as r, $ as t };
|
|
377
386
|
|
|
378
|
-
//# sourceMappingURL=ResourceActionsMenu-
|
|
387
|
+
//# sourceMappingURL=ResourceActionsMenu-KFMLta44.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceActionsMenu-KFMLta44.js","names":["solidLogicSingleton","store","ns","parse","isWebIdUri","getPodStorages","url","fetcher","load","doc","err","console","warn","uri","podStorages","each","space","results","Promise","all","map","pod","isPodStorage","filter","storage","findPodStorageFromUrl","error","podStorage","URL","value","pathStorage","pathname","length","substring","lastIndexOf","candidate","sym","origin","loadContainerRepresentation","holds","rdf","subject","any","ldp","undefined","response","webOperation","initFetchOptions","headers","accept","containerTurtle","responseText","isContainerSubject","subjectUri","typeUris","findTypeURIs","Boolean","endsWith","getContainerItemCount","seen","Set","item","termType","resource","isHiddenFile","add","size","ns","solidLogicSingleton","customElement","WebComponent","property","html","nothing","styles","isContainerSubject","_classDecs","_ResourceActionsMenu","_ResourceActionsMenu2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_ref","_storeDecs","attribute","_subjectUriDecs","type","String","_handleAccessClickDecs","_handleEditingClickDecs","_paneSupportsEditingDecs","Boolean","_canEditDecs","_canManageAccessDecs","_isMobileDecs","_showAccessInMenuDecs","_menuItemsDecs","_ResourceActionsMenu3","ResourceActionsMenu","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_store","_init_subjectUri","_init_handleAccessClick","undefined","_init_handleEditingClick","_init_paneSupportsEditing","_init_canEdit","_init_canManageAccess","_init_isMobile","_init_showAccessInMenu","_init_menuItems","_defineProperty","subjectUri","window","open","_classPrivateFieldGet","store","v","_classPrivateFieldSet","handleAccessClick","handleEditingClick","paneSupportsEditing","canEdit","canManageAccess","isMobile","showAccessInMenu","menuItems","render","isContainerResource","actionableMenuItems","filter","item","action","map","event","icon","label","handleOpenInNewTab","e","c","_initClass","_applyDecs","_Class","_identity","default","property","nothing","styles","A","customElement","WebComponent","b","c","ns_default","iconlucidepencil","iconlucideellipsisvertical","isContainerSubject","store","subjectUri","subject","typeUris","getContainerItemCount","seen","item","resource","iconlucideuserroundcog","iconlucidefile","ResourceActionsMenu_styles_default","_Class","_ResourceActionsMenu3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_initProto","_initClass","_classDecs","_storeDecs","_init_store","_subjectUriDecs","_init_subjectUri","_handleAccessClickDecs","_init_handleAccessClick","_handleEditingClickDecs","_init_handleEditingClick","_paneSupportsEditingDecs","_init_paneSupportsEditing","_canEditDecs","_init_canEdit","_canManageAccessDecs","_init_canManageAccess","_isMobileDecs","_init_isMobile","_showAccessInMenuDecs","_init_showAccessInMenu","_menuItemsDecs","_init_menuItems","_ResourceActionsMenu2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","S","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_ResourceActionsMenu","args","canEdit","canManageAccess","actionableMenuItems","event"],"sources":["../../src/utils/podUtils.ts","../../src/components/resource-actions-menu/ResourceActionsMenu.styles.css","../../src/components/resource-actions-menu/ResourceActionsMenu.ts"],"sourcesContent":["import { solidLogicSingleton, store } from 'solid-logic'\nimport ns from '@/lib/ns'\nimport { LiveStore, 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\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 if (!solidLogicSingleton.resource.isHiddenFile(resource)) {\n seen.add(resource.uri)\n }\n }\n }\n return seen.size\n}\n",":host {\n .file-explorer-header-more-button {\n width: var(--solid-ui-clickable-area, 42px);\n height: var(--solid-ui-clickable-area, 42px);\n padding: 0;\n }\n\n .ellipsisIcon {\n width: 16px;\n height: 16px;\n }\n}\n","import { customElement, WebComponent } from '@/lib/components'\nimport { property } from 'lit/decorators.js'\nimport { html, nothing } from 'lit'\nimport '@/components/button'\nimport '@/components/menu'\nimport '@/components/menu-item'\nimport '~icons/lucide/ellipsis-vertical'\nimport '~icons/lucide/user-round-cog'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/file'\nimport '~icons/lucide/square-arrow-out-up-right'\nimport { LiveStore } from 'rdflib'\nimport styles from './ResourceActionsMenu.styles.css'\nimport { isContainerSubject } from '@/utils/podUtils'\n\ntype ResourceActionMenuItem = {\n label: string\n icon?: HTMLElement | string\n action?: (event: Event) => void\n}\n\ntype ActionableResourceActionMenuItem = ResourceActionMenuItem & {\n action: (event: Event) => void\n}\n\n@customElement('solid-ui-resource-actions-menu')\nexport default class ResourceActionsMenu extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor store: LiveStore | undefined\n\n @property({ type: String })\n accessor subjectUri: string | undefined\n\n @property({ attribute: false })\n accessor handleAccessClick: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor handleEditingClick: (() => void) | undefined = undefined\n\n @property({ type: Boolean })\n accessor paneSupportsEditing = false\n\n @property({ type: Boolean })\n accessor canEdit = false\n\n @property({ type: Boolean })\n accessor canManageAccess = false\n\n @property({ type: Boolean })\n accessor isMobile = false\n\n @property({ type: Boolean, attribute: 'show-access-in-menu' })\n accessor showAccessInMenu = false\n\n @property({ attribute: false })\n accessor menuItems: ResourceActionMenuItem[] = []\n\n private handleOpenInNewTab = () => {\n if (!this.subjectUri) return\n window.open(this.subjectUri, '_blank', 'noopener,noreferrer')\n }\n\n render () {\n const isContainerResource = isContainerSubject(this.store, this.subjectUri)\n const canEdit = !isContainerResource && this.isMobile && this.paneSupportsEditing && this.canEdit && !!this.handleEditingClick\n const canManageAccess = this.canManageAccess && !!this.handleAccessClick &&\n (this.showAccessInMenu || this.isMobile)\n const actionableMenuItems = this.menuItems.filter((item): item is ActionableResourceActionMenuItem => typeof item.action === 'function')\n return html`\n <solid-ui-menu>\n <solid-ui-button slot=\"trigger\" class=\"file-explorer-header-more-button\" variant=\"ghost\" title=\"More options\">\n <icon-lucide-ellipsis-vertical slot=\"icon\" class=\"ellipsisIcon\"></icon-lucide-ellipsis-vertical>\n <span class=\"sr-only\">More options</span>\n </solid-ui-button>\n ${actionableMenuItems.map(item => html`\n <solid-ui-menu-item @solid-ui-select=${(event: Event) => item.action(event)}>\n ${typeof item.icon === 'string'\n ? html`<img slot=\"left-icon\" src=${item.icon} alt=\"\">`\n : item.icon ?? html`<icon-lucide-file slot=\"left-icon\" aria-hidden=\"true\"></icon-lucide-file>`}\n ${item.label}\n </solid-ui-menu-item>\n `)}\n ${this.subjectUri\n ? html`\n <solid-ui-menu-item @solid-ui-select=${this.handleOpenInNewTab}>\n <icon-lucide-square-arrow-out-up-right slot=\"left-icon\"></icon-lucide-square-arrow-out-up-right>\n Open in New Tab\n </solid-ui-menu-item>\n `\n : nothing}\n ${canEdit\n ? html`\n <solid-ui-menu-item @solid-ui-select=${this.handleEditingClick}>\n <icon-lucide-pencil slot=\"left-icon\"></icon-lucide-pencil>\n Edit\n </solid-ui-menu-item>\n `\n : nothing}\n ${canManageAccess\n ? html`\n <solid-ui-menu-item @solid-ui-select=${this.handleAccessClick}>\n <icon-lucide-user-round-cog slot=\"left-icon\"></icon-lucide-user-round-cog>\n Manage Access\n </solid-ui-menu-item>\n `\n : nothing}\n </solid-ui-menu>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2DA,SAAgBoD,EAAoBnD,GAA8BoD,GAAyC;CACzG,IAAI,CAACpD,KAAS,CAACoD,GAAY,OAAO;CAElC,IAAMZ,IAAUxC,EAAMmC,IAAIiB,CAAU,GAC9BC,IAAWrD,EAAMsD,aAAad,CAAO;CAC3C,OAAOe,GACLF,EAASpD,EAAGyC,IAAI,WAAW,CAAC,CAAC9B,QAC7ByC,EAASpD,EAAGyC,IAAI,gBAAgB,CAAC,CAAC9B,QAClC4B,EAAQ5B,IAAI4C,SAAS,GAAG;AAE5B;AAKA,SAAgBC,EAAuBzD,GAA8BoD,GAAwC;CAC3G,IAAI,CAACpD,KAAS,CAACoD,GAAY,OAAO;CAElC,IAAMZ,IAA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