solid-panes 4.4.2-7 → 4.5.0
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/README.md +40 -10
- package/dist/0314353e28ce6e5539af.svg +9 -0
- package/dist/04567ff683933c35c465.png +0 -0
- package/dist/10163fd9b5a0e00d63a0.png +0 -0
- package/dist/1234dcb2eec2e45f252b.png +0 -0
- package/dist/20899934157df4db56cb.png +0 -0
- package/dist/33760bf79f097f449da5.png +0 -0
- package/dist/4cceba29ab33b1ddd9bb.svg +6 -0
- package/dist/578d2b6ed32e7624164e.png +0 -0
- package/dist/5f62a5b2b7e99b9640c7.png +0 -0
- package/dist/6525766ecd288ec60129.png +0 -0
- package/dist/7800be6f6c4b5b0f4f20.png +0 -0
- package/dist/7b7538c6f6b317968009.svg +9 -0
- package/dist/92d03142abe6efc0b42d.svg +6 -0
- package/dist/976473cf5fe24d657d4b.png +0 -0
- package/dist/RDFXMLPane.css +70 -0
- package/dist/RDFXMLPane.d.ts +3 -2
- package/dist/RDFXMLPane.js +100 -0
- package/dist/argument/argumentPane.js +60 -0
- package/dist/attach/attachPane.js +393 -0
- package/dist/audio/audioPane.js +181 -0
- package/dist/bda84f59e7216675a208.png +0 -0
- package/dist/cd68e8f3990ba8b2139e.png +0 -0
- package/dist/classInstancePane.js +91 -0
- package/dist/dashboard/basicPreferences.d.ts +1 -1
- package/dist/dashboard/basicPreferences.js +147 -0
- package/dist/dashboard/dashboardPane.d.ts +1 -1
- package/dist/dashboard/dashboardPane.js +73 -0
- package/dist/dashboard/homepage.d.ts +1 -1
- package/dist/dashboard/homepage.js +42 -0
- package/dist/dataContentPane.css +271 -0
- package/dist/dataContentPane.d.ts +3 -2
- package/dist/dataContentPane.js +226 -0
- package/dist/defaultPane.css +97 -0
- package/dist/defaultPane.d.ts +3 -2
- package/dist/defaultPane.js +81 -0
- package/dist/dokieli/dokieliPane.js +74 -0
- package/dist/dokieli/{new.cjs.js → new.js} +10 -4
- package/dist/e7074a7e2cb69e51cfd3.png +0 -0
- package/dist/f3772696fb7ee53c23d8.png +0 -0
- package/dist/form/formPane.css +120 -0
- package/dist/form/pane.d.ts +2 -1
- package/dist/form/pane.js +250 -0
- package/dist/home/homePane.d.ts +1 -1
- package/dist/home/homePane.js +74 -0
- package/dist/humanReadablePane.css +129 -0
- package/dist/humanReadablePane.d.ts +3 -2
- package/dist/humanReadablePane.js +243 -0
- package/dist/icons/clock.svg +7 -0
- package/dist/icons/comment.svg +6 -0
- package/dist/icons/dashboard.svg +9 -0
- package/dist/icons/downArrow.svg +6 -0
- package/dist/icons/folder.svg +6 -0
- package/dist/icons/friends.svg +9 -0
- package/dist/icons/help.svg +8 -0
- package/dist/icons/iconHelper.js +23 -0
- package/dist/icons/menu.svg +8 -0
- package/dist/icons/person.svg +6 -0
- package/dist/icons/personInCircle.svg +8 -0
- package/dist/icons/sharing.svg +10 -0
- package/dist/icons/signOut.svg +8 -0
- package/dist/icons/signUp.svg +9 -0
- package/dist/icons/star.svg +3 -0
- package/dist/imagePane.css +4 -0
- package/dist/imagePane.d.ts +3 -2
- package/dist/imagePane.js +67 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +123 -0
- package/dist/internal/internalPane.css +14 -0
- package/dist/internal/internalPane.d.ts +2 -1
- package/dist/internal/internalPane.js +183 -0
- package/dist/mainPage/footer.d.ts +15 -0
- package/dist/mainPage/footer.d.ts.map +1 -0
- package/dist/mainPage/footer.js +29 -0
- package/dist/mainPage/header.d.ts +15 -1
- package/dist/mainPage/header.d.ts.map +1 -1
- package/dist/mainPage/header.js +203 -0
- package/dist/mainPage/index.d.ts +15 -3
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.js +78 -0
- package/dist/mainPage/menu.css +243 -0
- package/dist/mainPage/menu.d.ts +7 -0
- package/dist/mainPage/menu.d.ts.map +1 -0
- package/dist/mainPage/menu.js +436 -0
- package/dist/microblogPane/mbStyle.css +267 -0
- package/dist/microblogPane/microblogPane.js +1031 -0
- package/dist/n3Pane.css +49 -0
- package/dist/n3Pane.d.ts +3 -2
- package/dist/n3Pane.js +88 -0
- package/dist/outline/context.d.ts +3 -3
- package/dist/outline/context.js +21 -0
- package/dist/outline/manager.css +78 -0
- package/dist/outline/manager.js +2115 -0
- package/dist/outline/outlineIcons.js +126 -0
- package/dist/outline/propertyViews.js +43 -0
- package/dist/outline/queryByExample.js +285 -0
- package/dist/outline/userInput.js +1821 -0
- package/dist/outline/viewAsImage.js +14 -0
- package/dist/outline/viewAsMbox.js +21 -0
- package/dist/pad/padPane.css +40 -0
- package/dist/pad/padPane.d.ts +2 -1
- package/dist/pad/padPane.js +421 -0
- package/dist/playlist/playlistPane.js +119 -0
- package/dist/profileUtils/ownerProfile.d.ts +5 -0
- package/dist/profileUtils/ownerProfile.d.ts.map +1 -0
- package/dist/profileUtils/ownerProfile.js +84 -0
- package/dist/registerPanes.js +145 -0
- package/dist/schedule/schedulePane.css +294 -0
- package/dist/schedule/schedulePane.d.ts +4 -2
- package/dist/schedule/schedulePane.js +1022 -0
- package/dist/sharing/sharingPane.js +48 -0
- package/dist/slideshow/slideshowPane.js +79 -0
- package/dist/social/editProfileDetails.d.ts +2 -1
- package/dist/social/editProfileDetails.js +362 -0
- package/dist/social/{icons.esm.js → icons.js} +18 -12
- package/dist/social/socialPane.css +1464 -0
- package/dist/social/socialPane.d.ts +3 -2
- package/dist/social/socialPane.js +651 -0
- package/dist/social/socialSections.d.ts +2 -2
- package/dist/social/socialSections.js +393 -0
- package/dist/social/spinner.js +13 -0
- package/dist/social/triage.d.ts +2 -2
- package/dist/social/triage.js +79 -0
- package/dist/solid-panes.js +84629 -0
- package/dist/solid-panes.js.map +1 -0
- package/dist/solid-panes.min.js +3933 -0
- package/dist/solid-panes.min.js.map +1 -0
- package/dist/styles/tabbedtab.css +1066 -0
- package/dist/styles/utilities.css +5 -0
- package/dist/tabbed/tabbedPane.d.ts +1 -1
- package/dist/tabbed/tabbedPane.js +59 -0
- package/dist/tableViewPane.js +56 -0
- package/dist/transaction/pane.js +477 -0
- package/dist/transaction/period.js +323 -0
- package/dist/trip/tripPane.js +174 -0
- package/dist/trustedApplications/trustedApplications.dom.d.ts +1 -1
- package/dist/trustedApplications/trustedApplications.dom.js +145 -0
- package/dist/trustedApplications/trustedApplications.utils.d.ts +1 -1
- package/dist/trustedApplications/trustedApplications.utils.js +23 -0
- package/dist/trustedApplications/trustedApplications.view.d.ts +1 -1
- package/dist/trustedApplications/trustedApplications.view.js +55 -0
- package/dist/ui/pane.js +146 -0
- package/dist/versionInfo.js +41 -0
- package/dist/video/videoPane.js +42 -0
- package/package.json +66 -51
- package/dist/RDFXMLPane2.cjs.js +0 -3
- package/dist/RDFXMLPane2.cjs.js.map +0 -1
- package/dist/RDFXMLPane2.esm.js +0 -55
- package/dist/RDFXMLPane2.esm.js.map +0 -1
- package/dist/_virtual/_rolldown/runtime.cjs.js +0 -1
- 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-open.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/folder-open.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/help-circle.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/help-circle.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/help-circle.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/help-circle.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/layout-dashboard.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/pencil.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/pencil.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/pencil.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/settings-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/settings-2.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/settings-2.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/trash-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/trash-2.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/user.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/user.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/users.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/users.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/users.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/users.esm.js.map +0 -1
- package/dist/audio/audioPane.cjs.js +0 -2
- package/dist/audio/audioPane.cjs.js.map +0 -1
- package/dist/audio/audioPane.esm.js +0 -99
- package/dist/audio/audioPane.esm.js.map +0 -1
- package/dist/classInstancePane.cjs.js +0 -2
- package/dist/classInstancePane.cjs.js.map +0 -1
- package/dist/classInstancePane.esm.js +0 -50
- package/dist/classInstancePane.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 -19
- 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 -22
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -15
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -266
- 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 -19
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -19
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -321
- 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 -468
- 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/helper.cjs.js +0 -2
- package/dist/components/file-explorer-header/helper.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/helper.d.ts +0 -15
- package/dist/components/file-explorer-header/helper.d.ts.map +0 -1
- package/dist/components/file-explorer-header/helper.esm.js +0 -64
- package/dist/components/file-explorer-header/helper.esm.js.map +0 -1
- package/dist/components/file-explorer-header/types.d.ts +0 -2
- package/dist/components/file-explorer-header/types.d.ts.map +0 -1
- package/dist/components/header/Header.cjs.js +0 -19
- package/dist/components/header/Header.cjs.js.map +0 -1
- package/dist/components/header/Header.d.ts +0 -8
- package/dist/components/header/Header.d.ts.map +0 -1
- package/dist/components/header/Header.esm.js +0 -228
- package/dist/components/header/Header.esm.js.map +0 -1
- package/dist/components/header/Header.styles.cjs.js +0 -2
- package/dist/components/header/Header.styles.cjs.js.map +0 -1
- package/dist/components/header/Header.styles.esm.js +0 -7
- package/dist/components/header/Header.styles.esm.js.map +0 -1
- package/dist/components/header/index.cjs.js +0 -1
- package/dist/components/header/index.d.ts +0 -4
- package/dist/components/header/index.d.ts.map +0 -1
- package/dist/components/header/index.esm.js +0 -1
- package/dist/components/navbar/Navbar.cjs.js +0 -15
- package/dist/components/navbar/Navbar.cjs.js.map +0 -1
- package/dist/components/navbar/Navbar.d.ts +0 -14
- package/dist/components/navbar/Navbar.d.ts.map +0 -1
- package/dist/components/navbar/Navbar.esm.js +0 -232
- package/dist/components/navbar/Navbar.esm.js.map +0 -1
- package/dist/components/navbar/Navbar.styles.cjs.js +0 -2
- package/dist/components/navbar/Navbar.styles.cjs.js.map +0 -1
- package/dist/components/navbar/Navbar.styles.esm.js +0 -7
- package/dist/components/navbar/Navbar.styles.esm.js.map +0 -1
- package/dist/components/navbar/index.cjs.js +0 -1
- package/dist/components/navbar/index.d.ts +0 -4
- package/dist/components/navbar/index.d.ts.map +0 -1
- package/dist/components/navbar/index.esm.js +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +0 -16
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +0 -215
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -18
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -16
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -260
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
- package/dist/dashboard/basicPreferences.cjs.js +0 -2
- package/dist/dashboard/basicPreferences.cjs.js.map +0 -1
- package/dist/dashboard/basicPreferences.esm.js +0 -70
- package/dist/dashboard/basicPreferences.esm.js.map +0 -1
- package/dist/dashboard/dashboardPane.cjs.js +0 -2
- package/dist/dashboard/dashboardPane.cjs.js.map +0 -1
- package/dist/dashboard/dashboardPane.esm.js +0 -7
- package/dist/dashboard/dashboardPane.esm.js.map +0 -1
- package/dist/dashboard/homepage.cjs.js +0 -2
- package/dist/dashboard/homepage.cjs.js.map +0 -1
- package/dist/dashboard/homepage.esm.js +0 -26
- package/dist/dashboard/homepage.esm.js.map +0 -1
- package/dist/dashboard/ontologyData.cjs.js +0 -37
- package/dist/dashboard/ontologyData.cjs.js.map +0 -1
- package/dist/dashboard/ontologyData.esm.js +0 -6
- package/dist/dashboard/ontologyData.esm.js.map +0 -1
- package/dist/dashboard/preferencesFormText.cjs.js +0 -20
- package/dist/dashboard/preferencesFormText.cjs.js.map +0 -1
- package/dist/dashboard/preferencesFormText.esm.js +0 -6
- package/dist/dashboard/preferencesFormText.esm.js.map +0 -1
- package/dist/dataContentPane2.cjs.js +0 -2
- package/dist/dataContentPane2.cjs.js.map +0 -1
- package/dist/dataContentPane2.esm.js +0 -109
- package/dist/dataContentPane2.esm.js.map +0 -1
- package/dist/defaultPane2.cjs.js +0 -2
- package/dist/defaultPane2.cjs.js.map +0 -1
- package/dist/defaultPane2.esm.js +0 -41
- package/dist/defaultPane2.esm.js.map +0 -1
- package/dist/dev.d.ts +0 -10
- package/dist/dev.d.ts.map +0 -1
- package/dist/dokieli/dokieliPane.cjs.js +0 -2
- package/dist/dokieli/dokieliPane.cjs.js.map +0 -1
- package/dist/dokieli/dokieliPane.esm.js +0 -39
- package/dist/dokieli/dokieliPane.esm.js.map +0 -1
- package/dist/dokieli/new.cjs.js.map +0 -1
- package/dist/dokieli/new.esm.js +0 -6
- package/dist/dokieli/new.esm.js.map +0 -1
- package/dist/form/pane.cjs.js +0 -4
- package/dist/form/pane.cjs.js.map +0 -1
- package/dist/form/pane.esm.js +0 -122
- package/dist/form/pane.esm.js.map +0 -1
- package/dist/home/homePane.cjs.js +0 -2
- package/dist/home/homePane.cjs.js.map +0 -1
- package/dist/home/homePane.esm.js +0 -35
- package/dist/home/homePane.esm.js.map +0 -1
- package/dist/humanReadablePane2.cjs.js +0 -2
- package/dist/humanReadablePane2.cjs.js.map +0 -1
- package/dist/humanReadablePane2.esm.js +0 -123
- package/dist/humanReadablePane2.esm.js.map +0 -1
- package/dist/icons/folder.cjs.js +0 -2
- package/dist/icons/folder.cjs.js.map +0 -1
- package/dist/icons/folder.esm.js +0 -6
- package/dist/icons/folder.esm.js.map +0 -1
- package/dist/icons/friends.cjs.js +0 -2
- package/dist/icons/friends.cjs.js.map +0 -1
- package/dist/icons/friends.esm.js +0 -6
- package/dist/icons/friends.esm.js.map +0 -1
- package/dist/icons/person.cjs.js +0 -2
- package/dist/icons/person.cjs.js.map +0 -1
- package/dist/icons/person.esm.js +0 -6
- package/dist/icons/person.esm.js.map +0 -1
- package/dist/imagePane2.cjs.js +0 -2
- package/dist/imagePane2.cjs.js.map +0 -1
- package/dist/imagePane2.esm.js +0 -32
- package/dist/imagePane2.esm.js.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js +0 -31
- package/dist/index.esm.js.map +0 -1
- package/dist/internal/internalPane2.cjs.js +0 -2
- package/dist/internal/internalPane2.cjs.js.map +0 -1
- package/dist/internal/internalPane2.esm.js +0 -104
- package/dist/internal/internalPane2.esm.js.map +0 -1
- package/dist/mainPage/header.cjs.js +0 -2
- package/dist/mainPage/header.cjs.js.map +0 -1
- package/dist/mainPage/header.esm.js +0 -72
- package/dist/mainPage/header.esm.js.map +0 -1
- package/dist/mainPage/index.cjs.js +0 -2
- package/dist/mainPage/index.cjs.js.map +0 -1
- package/dist/mainPage/index.esm.js +0 -36
- package/dist/mainPage/index.esm.js.map +0 -1
- package/dist/mainPage/navbar.cjs.js +0 -2
- package/dist/mainPage/navbar.cjs.js.map +0 -1
- package/dist/mainPage/navbar.d.ts +0 -3
- package/dist/mainPage/navbar.d.ts.map +0 -1
- package/dist/mainPage/navbar.esm.js +0 -66
- package/dist/mainPage/navbar.esm.js.map +0 -1
- package/dist/n3Pane2.cjs.js +0 -3
- package/dist/n3Pane2.cjs.js.map +0 -1
- package/dist/n3Pane2.esm.js +0 -52
- package/dist/n3Pane2.esm.js.map +0 -1
- package/dist/outline/context.cjs.js +0 -2
- package/dist/outline/context.cjs.js.map +0 -1
- package/dist/outline/context.esm.js +0 -18
- package/dist/outline/context.esm.js.map +0 -1
- package/dist/outline/manager2.cjs.js +0 -2
- package/dist/outline/manager2.cjs.js.map +0 -1
- package/dist/outline/manager2.esm.js +0 -711
- package/dist/outline/manager2.esm.js.map +0 -1
- package/dist/outline/outlineIcons.cjs.js +0 -2
- package/dist/outline/outlineIcons.cjs.js.map +0 -1
- package/dist/outline/outlineIcons.esm.js +0 -10
- package/dist/outline/outlineIcons.esm.js.map +0 -1
- package/dist/outline/propertyViews.cjs.js +0 -2
- package/dist/outline/propertyViews.cjs.js.map +0 -1
- package/dist/outline/propertyViews.esm.js +0 -19
- package/dist/outline/propertyViews.esm.js.map +0 -1
- package/dist/outline/queryByExample.cjs.js +0 -2
- package/dist/outline/queryByExample.cjs.js.map +0 -1
- package/dist/outline/queryByExample.esm.js +0 -26
- package/dist/outline/queryByExample.esm.js.map +0 -1
- package/dist/outline/sourcePaneIcon.d.ts +0 -2
- package/dist/outline/sourcePaneIcon.d.ts.map +0 -1
- package/dist/outline/userInput.cjs.js +0 -61
- package/dist/outline/userInput.cjs.js.map +0 -1
- package/dist/outline/userInput.esm.js +0 -784
- package/dist/outline/userInput.esm.js.map +0 -1
- package/dist/outline/viewAsImage.cjs.js +0 -2
- package/dist/outline/viewAsImage.cjs.js.map +0 -1
- package/dist/outline/viewAsImage.esm.js +0 -10
- package/dist/outline/viewAsImage.esm.js.map +0 -1
- package/dist/outline/viewAsMbox.cjs.js +0 -2
- package/dist/outline/viewAsMbox.cjs.js.map +0 -1
- package/dist/outline/viewAsMbox.esm.js +0 -9
- package/dist/outline/viewAsMbox.esm.js.map +0 -1
- package/dist/pad/padPane2.cjs.js +0 -2
- package/dist/pad/padPane2.cjs.js.map +0 -1
- package/dist/pad/padPane2.esm.js +0 -173
- package/dist/pad/padPane2.esm.js.map +0 -1
- package/dist/playlist/playlistPane.cjs.js +0 -2
- package/dist/playlist/playlistPane.cjs.js.map +0 -1
- package/dist/playlist/playlistPane.esm.js +0 -49
- package/dist/playlist/playlistPane.esm.js.map +0 -1
- package/dist/registerPanes.cjs.js +0 -2
- package/dist/registerPanes.cjs.js.map +0 -1
- package/dist/registerPanes.esm.js +0 -46
- package/dist/registerPanes.esm.js.map +0 -1
- package/dist/schedule/formsForSchedule.cjs.js +0 -117
- package/dist/schedule/formsForSchedule.cjs.js.map +0 -1
- package/dist/schedule/formsForSchedule.esm.js +0 -6
- package/dist/schedule/formsForSchedule.esm.js.map +0 -1
- package/dist/schedule/schedulePane2.cjs.js +0 -8
- package/dist/schedule/schedulePane2.cjs.js.map +0 -1
- package/dist/schedule/schedulePane2.esm.js +0 -385
- package/dist/schedule/schedulePane2.esm.js.map +0 -1
- package/dist/sharing/sharingPane.cjs.js +0 -2
- package/dist/sharing/sharingPane.cjs.js.map +0 -1
- package/dist/sharing/sharingPane.esm.js +0 -22
- package/dist/sharing/sharingPane.esm.js.map +0 -1
- package/dist/slideshow/slideshowPane.cjs.js +0 -2
- package/dist/slideshow/slideshowPane.cjs.js.map +0 -1
- package/dist/slideshow/slideshowPane.esm.js +0 -46
- package/dist/slideshow/slideshowPane.esm.js.map +0 -1
- package/dist/social/editProfileDetails.cjs.js +0 -2
- package/dist/social/editProfileDetails.cjs.js.map +0 -1
- package/dist/social/editProfileDetails.esm.js +0 -12
- package/dist/social/editProfileDetails.esm.js.map +0 -1
- package/dist/social/icons.cjs.js +0 -82
- package/dist/social/icons.cjs.js.map +0 -1
- package/dist/social/icons.esm.js.map +0 -1
- package/dist/social/socialPane2.cjs.js +0 -6
- package/dist/social/socialPane2.cjs.js.map +0 -1
- package/dist/social/socialPane2.esm.js +0 -326
- package/dist/social/socialPane2.esm.js.map +0 -1
- package/dist/social/socialSections.cjs.js +0 -2
- package/dist/social/socialSections.cjs.js.map +0 -1
- package/dist/social/socialSections.esm.js +0 -222
- package/dist/social/socialSections.esm.js.map +0 -1
- package/dist/social/spinner.cjs.js +0 -1
- package/dist/social/spinner.esm.js +0 -1
- package/dist/social/triage.cjs.js +0 -2
- package/dist/social/triage.cjs.js.map +0 -1
- package/dist/social/triage.esm.js +0 -44
- package/dist/social/triage.esm.js.map +0 -1
- package/dist/tabbed/tabbedPane.cjs.js +0 -2
- package/dist/tabbed/tabbedPane.cjs.js.map +0 -1
- package/dist/tabbed/tabbedPane.esm.js +0 -38
- package/dist/tabbed/tabbedPane.esm.js.map +0 -1
- package/dist/tableViewPane.cjs.js +0 -2
- package/dist/tableViewPane.cjs.js.map +0 -1
- package/dist/tableViewPane.esm.js +0 -20
- package/dist/tableViewPane.esm.js.map +0 -1
- package/dist/transaction/pane.cjs.js +0 -8
- package/dist/transaction/pane.cjs.js.map +0 -1
- package/dist/transaction/pane.esm.js +0 -212
- package/dist/transaction/pane.esm.js.map +0 -1
- package/dist/transaction/period.cjs.js +0 -4
- package/dist/transaction/period.cjs.js.map +0 -1
- package/dist/transaction/period.esm.js +0 -126
- package/dist/transaction/period.esm.js.map +0 -1
- package/dist/trip/tripPane.cjs.js +0 -2
- package/dist/trip/tripPane.cjs.js.map +0 -1
- package/dist/trip/tripPane.esm.js +0 -85
- package/dist/trip/tripPane.esm.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.dom.cjs.js +0 -2
- package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.dom.esm.js +0 -108
- package/dist/trustedApplications/trustedApplications.dom.esm.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.utils.cjs.js +0 -2
- package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.utils.esm.js +0 -20
- package/dist/trustedApplications/trustedApplications.utils.esm.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.view.cjs.js +0 -2
- package/dist/trustedApplications/trustedApplications.view.cjs.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.view.esm.js +0 -41
- package/dist/trustedApplications/trustedApplications.view.esm.js.map +0 -1
- package/dist/ui/pane.cjs.js +0 -4
- package/dist/ui/pane.cjs.js.map +0 -1
- package/dist/ui/pane.esm.js +0 -56
- package/dist/ui/pane.esm.js.map +0 -1
- package/dist/utils/paneUtils.cjs.js +0 -2
- package/dist/utils/paneUtils.cjs.js.map +0 -1
- package/dist/utils/paneUtils.d.ts +0 -19
- package/dist/utils/paneUtils.d.ts.map +0 -1
- package/dist/utils/paneUtils.esm.js +0 -52
- package/dist/utils/paneUtils.esm.js.map +0 -1
- package/dist/utils/podUtils.cjs.js +0 -2
- package/dist/utils/podUtils.cjs.js.map +0 -1
- package/dist/utils/podUtils.d.ts +0 -4
- package/dist/utils/podUtils.d.ts.map +0 -1
- package/dist/utils/podUtils.esm.js +0 -46
- package/dist/utils/podUtils.esm.js.map +0 -1
- package/dist/utils/webIdUtils.cjs.js +0 -2
- package/dist/utils/webIdUtils.cjs.js.map +0 -1
- package/dist/utils/webIdUtils.d.ts +0 -6
- package/dist/utils/webIdUtils.d.ts.map +0 -1
- package/dist/utils/webIdUtils.esm.js +0 -48
- package/dist/utils/webIdUtils.esm.js.map +0 -1
- package/dist/versionInfo.cjs.js +0 -2
- package/dist/versionInfo.cjs.js.map +0 -1
- package/dist/versionInfo.esm.js +0 -40
- package/dist/versionInfo.esm.js.map +0 -1
- package/dist/video/videoPane.cjs.js +0 -2
- package/dist/video/videoPane.cjs.js.map +0 -1
- package/dist/video/videoPane.esm.js +0 -25
- package/dist/video/videoPane.esm.js.map +0 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
9
|
+
/* Financial Period Pane
|
|
10
|
+
**
|
|
11
|
+
** This outline pane allows a user to interact with a period
|
|
12
|
+
** downloaded from a bank statement, annotting it with classes and comments,
|
|
13
|
+
** trips, etc
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const ns = UI.ns;
|
|
17
|
+
var _default = exports.default = {
|
|
18
|
+
icon: UI.icons.iconBase + 'noun_142708.svg',
|
|
19
|
+
name: 'period',
|
|
20
|
+
audience: [ns.solid('PowerUser')],
|
|
21
|
+
// Does the subject deserve this pane?
|
|
22
|
+
label: function (subject, context) {
|
|
23
|
+
const kb = context.session.store;
|
|
24
|
+
const t = kb.findTypeURIs(subject);
|
|
25
|
+
if (t['http://www.w3.org/2000/10/swap/pim/qif#Period']) return 'period';
|
|
26
|
+
return null; // No under other circumstances (while testing at least!)
|
|
27
|
+
},
|
|
28
|
+
render: function (subject, context) {
|
|
29
|
+
const dom = context.dom;
|
|
30
|
+
const kb = context.session.store;
|
|
31
|
+
const ns = UI.ns;
|
|
32
|
+
const div = dom.createElement('div');
|
|
33
|
+
div.setAttribute('class', 'periodPane');
|
|
34
|
+
const mention = function mention(message, style) {
|
|
35
|
+
if (!style) style = 'color: grey;';
|
|
36
|
+
const pre = dom.createElement('pre');
|
|
37
|
+
pre.setAttribute('style', style);
|
|
38
|
+
div.appendChild(pre);
|
|
39
|
+
pre.appendChild(dom.createTextNode(message));
|
|
40
|
+
};
|
|
41
|
+
const happy = function happy(message) {
|
|
42
|
+
return mention('✓ ' + message, 'color: #010; background-color: #efe');
|
|
43
|
+
};
|
|
44
|
+
const complain = function complain(message) {
|
|
45
|
+
return mention(message, 'color: #100; background-color: #fee');
|
|
46
|
+
};
|
|
47
|
+
/*
|
|
48
|
+
var rerender = function (div) {
|
|
49
|
+
var parent = div.parentNode
|
|
50
|
+
var div2 = thisPane.render(subject, dom)
|
|
51
|
+
parent.replaceChild(div2, div)
|
|
52
|
+
}
|
|
53
|
+
*/
|
|
54
|
+
const renderPeriod = function () {
|
|
55
|
+
const dtstart = kb.any(subject, ns.cal('dtstart'));
|
|
56
|
+
if (dtstart === undefined) {
|
|
57
|
+
complain('(Error: There is no start date known for this period <' + subject.uri + '>,\n -- every period needs one.)');
|
|
58
|
+
}
|
|
59
|
+
const dtend = kb.any(subject, ns.cal('dtend'));
|
|
60
|
+
if (dtend === undefined) {
|
|
61
|
+
complain('(Error: There is no end date known for this period <' + subject.uri + '>,\n -- every period needs one.)');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// var store = kb.any(subject, UI.ns.qu('annotationStore')) || null
|
|
65
|
+
|
|
66
|
+
const predicateURIsDone = {};
|
|
67
|
+
const donePredicate = function (pred) {
|
|
68
|
+
predicateURIsDone[pred.uri] = true;
|
|
69
|
+
};
|
|
70
|
+
donePredicate(ns.rdf('type'));
|
|
71
|
+
const inPeriod = function (date) {
|
|
72
|
+
return !!(date && date >= dtstart && date < dtend);
|
|
73
|
+
};
|
|
74
|
+
const d2 = function (n) {
|
|
75
|
+
const s = '' + n;
|
|
76
|
+
if (s.indexOf('.') >= 0) {
|
|
77
|
+
return s.split('.')[0] + '.' + (s.split('.')[1] + '00').slice(0, 2);
|
|
78
|
+
}
|
|
79
|
+
return s + '.00';
|
|
80
|
+
};
|
|
81
|
+
const transactionInPeriod = function (x) {
|
|
82
|
+
return inPeriod(kb.any(x, ns.qu('date')));
|
|
83
|
+
};
|
|
84
|
+
const oderByDate = function (x, y) {
|
|
85
|
+
const dx = kb.any(x, ns.qu('date'));
|
|
86
|
+
const dy = kb.any(y, ns.qu('date'));
|
|
87
|
+
if (dx !== undefined && dy !== undefined) {
|
|
88
|
+
if (dx.value < dy.value) return -1;
|
|
89
|
+
if (dx.value > dy.value) return 1;
|
|
90
|
+
}
|
|
91
|
+
if (x.uri < y.uri) return -1; // Arbitrary but repeatable
|
|
92
|
+
if (x.uri > y.uri) return 1;
|
|
93
|
+
return 0;
|
|
94
|
+
};
|
|
95
|
+
/*
|
|
96
|
+
var setPaneStyle = function (account) {
|
|
97
|
+
var mystyle = 'padding: 0.5em 1.5em 1em 1.5em; '
|
|
98
|
+
if (account) {
|
|
99
|
+
var backgroundColor = kb.any(account, UI.ns.ui('backgroundColor'))
|
|
100
|
+
if (backgroundColor) {
|
|
101
|
+
mystyle += 'background-color: ' + backgroundColor.value + '; '
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
div.setAttribute('style', mystyle)
|
|
105
|
+
}
|
|
106
|
+
// setPaneStyle();
|
|
107
|
+
*/
|
|
108
|
+
const h2 = div.appendChild(dom.createElement('h2'));
|
|
109
|
+
h2.textContent = 'Period ' + dtstart.value.slice(0, 10) + ' - ' + dtend.value.slice(0, 10);
|
|
110
|
+
const insertedPane = function (context, subject, paneName) {
|
|
111
|
+
const p = context.session.paneRegistry.byName(paneName);
|
|
112
|
+
const d = p.render(subject, context);
|
|
113
|
+
d.setAttribute('style', 'border: 0.1em solid green;');
|
|
114
|
+
return d;
|
|
115
|
+
};
|
|
116
|
+
const expandAfterRow = function (dom, row, subject, paneName, solo) {
|
|
117
|
+
const siblings = row.parentNode.children;
|
|
118
|
+
if (solo) {
|
|
119
|
+
for (let j = siblings.length - 1; j >= 0; j--) {
|
|
120
|
+
if (siblings[j].expanded) {
|
|
121
|
+
siblings[j].parentNode.removeChild(siblings[j].expanded);
|
|
122
|
+
siblings[j].expanded = false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const tr = dom.createElement('tr');
|
|
127
|
+
const td = tr.appendChild(dom.createElement('td'));
|
|
128
|
+
td.setAttribute('style', 'width: 98%; padding: 1em; border: 0.1em solid grey;');
|
|
129
|
+
const cols = row.children.length;
|
|
130
|
+
if (row.nextSibling) {
|
|
131
|
+
row.parentNode.insertBefore(tr, row.nextSibling);
|
|
132
|
+
} else {
|
|
133
|
+
row.parentNode.appendChild(tr);
|
|
134
|
+
}
|
|
135
|
+
row.expanded = tr;
|
|
136
|
+
td.setAttribute('colspan', '' + cols);
|
|
137
|
+
td.appendChild(insertedPane(context, subject, paneName));
|
|
138
|
+
};
|
|
139
|
+
const expandAfterRowOrCollapse = function (dom, row, subject, paneName, solo) {
|
|
140
|
+
if (row.expanded) {
|
|
141
|
+
row.parentNode.removeChild(row.expanded);
|
|
142
|
+
row.expanded = false;
|
|
143
|
+
} else {
|
|
144
|
+
expandAfterRow(dom, row, subject, paneName, solo);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const transactionTable = function (dom, list) {
|
|
148
|
+
const table = dom.createElement('table');
|
|
149
|
+
table.setAttribute('style', 'margin-left: 100; font-size: 9pt; width: 85%;');
|
|
150
|
+
const transactionRow = function (dom, x) {
|
|
151
|
+
const tr = dom.createElement('tr');
|
|
152
|
+
const setTRStyle = function (tr, account) {
|
|
153
|
+
// var mystyle = "padding: 0.5em 1.5em 1em 1.5em; ";
|
|
154
|
+
let mystyle = 'margin-left: 8em; padding-left: 5em;';
|
|
155
|
+
if (account) {
|
|
156
|
+
const backgroundColor = kb.any(account, UI.ns.ui('backgroundColor'));
|
|
157
|
+
if (backgroundColor) {
|
|
158
|
+
mystyle += 'background-color: ' + backgroundColor.value + '; ';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
tr.setAttribute('style', mystyle);
|
|
162
|
+
};
|
|
163
|
+
const account = kb.any(x, ns.qu('toAccount'));
|
|
164
|
+
setTRStyle(tr, account);
|
|
165
|
+
const c0 = tr.appendChild(dom.createElement('td'));
|
|
166
|
+
const date = kb.any(x, ns.qu('date'));
|
|
167
|
+
c0.textContent = date ? date.value.slice(0, 10) : '???';
|
|
168
|
+
c0.setAttribute('style', 'width: 7em;');
|
|
169
|
+
const c1 = tr.appendChild(dom.createElement('td'));
|
|
170
|
+
c1.setAttribute('style', 'width: 36em;');
|
|
171
|
+
const payee = kb.any(x, ns.qu('payee'));
|
|
172
|
+
c1.textContent = payee ? payee.value : '???';
|
|
173
|
+
const a1 = c1.appendChild(dom.createElement('a'));
|
|
174
|
+
a1.textContent = ' ➜';
|
|
175
|
+
a1.setAttribute('href', x.uri);
|
|
176
|
+
const c3 = tr.appendChild(dom.createElement('td'));
|
|
177
|
+
const amount = kb.any(x, ns.qu('in_USD'));
|
|
178
|
+
c3.textContent = amount ? d2(amount.value) : '???';
|
|
179
|
+
c3.setAttribute('style', 'width: 6em; text-align: right; '); // @@ decimal alignment?
|
|
180
|
+
tr.addEventListener('click', function (e) {
|
|
181
|
+
// solo unless shift key
|
|
182
|
+
expandAfterRowOrCollapse(dom, tr, x, 'transaction', !e.shiftKey);
|
|
183
|
+
}, false);
|
|
184
|
+
return tr;
|
|
185
|
+
};
|
|
186
|
+
const list2 = list.filter(transactionInPeriod);
|
|
187
|
+
list2.sort(oderByDate);
|
|
188
|
+
for (let i = 0; i < list2.length; i++) {
|
|
189
|
+
table.appendChild(transactionRow(dom, list2[i]));
|
|
190
|
+
}
|
|
191
|
+
return table;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// List unclassified transactions
|
|
195
|
+
|
|
196
|
+
const dummies = {
|
|
197
|
+
'http://www.w3.org/2000/10/swap/pim/qif#Transaction': true,
|
|
198
|
+
// (we knew)
|
|
199
|
+
'http://www.w3.org/2000/10/swap/pim/qif#Unclassified': true,
|
|
200
|
+
// pseudo classifications we may phase out
|
|
201
|
+
'http://www.w3.org/2000/10/swap/pim/qif#UnclassifiedOutgoing': true,
|
|
202
|
+
'http://www.w3.org/2000/10/swap/pim/qif#UnclassifiedIncome': true
|
|
203
|
+
};
|
|
204
|
+
const xURIs = kb.findMemberURIs(ns.qu('Transaction'));
|
|
205
|
+
const unclassifiedIn = [];
|
|
206
|
+
const unclassifiedOut = [];
|
|
207
|
+
let usd, z;
|
|
208
|
+
for (const y in xURIs) {
|
|
209
|
+
// For each thing which can be inferred to be a transaction
|
|
210
|
+
// @@ TODO: Write away the need for exception on next line
|
|
211
|
+
|
|
212
|
+
if (Object.prototype.hasOwnProperty.call(xURIs, y)) {
|
|
213
|
+
z = kb.sym(y);
|
|
214
|
+
const tt = kb.each(z, ns.rdf('type')); // What EXPLICIT definitions
|
|
215
|
+
let classified = false;
|
|
216
|
+
for (let j = 0; j < tt.length; j++) {
|
|
217
|
+
const t = tt[j];
|
|
218
|
+
if (dummies[t.uri] === undefined) {
|
|
219
|
+
classified = true;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (!classified) {
|
|
223
|
+
usd = kb.any(z, ns.qu('in_USD'));
|
|
224
|
+
if (usd === undefined) {
|
|
225
|
+
usd = kb.any(z, ns.qu('amount'));
|
|
226
|
+
}
|
|
227
|
+
if (usd && ('' + usd.value).indexOf('-') >= 0) {
|
|
228
|
+
unclassifiedOut.push(kb.sym(y));
|
|
229
|
+
} else {
|
|
230
|
+
unclassifiedIn.push(kb.sym(y));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
let tab, count;
|
|
236
|
+
if (unclassifiedIn.length) {
|
|
237
|
+
tab = transactionTable(dom, unclassifiedIn);
|
|
238
|
+
count = tab.children.length;
|
|
239
|
+
div.appendChild(dom.createElement('h3')).textContent = 'Unclassified Income' + (count < 4 ? '' : ' (' + count + ')');
|
|
240
|
+
div.appendChild(tab);
|
|
241
|
+
} else {
|
|
242
|
+
happy('No unclassified income');
|
|
243
|
+
}
|
|
244
|
+
if (unclassifiedOut.length) {
|
|
245
|
+
tab = transactionTable(dom, unclassifiedOut);
|
|
246
|
+
count = tab.children.length;
|
|
247
|
+
div.appendChild(dom.createElement('h3')).textContent = 'Unclassified Outgoings' + (count < 4 ? '' : ' (' + count + ')');
|
|
248
|
+
div.appendChild(tab);
|
|
249
|
+
} else {
|
|
250
|
+
happy('No unclassified outgoings ');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// /////////////// Check some categories of transaction for having given fields
|
|
254
|
+
|
|
255
|
+
const catSymbol = function (catTail) {
|
|
256
|
+
const cats = kb.findSubClassesNT(ns.qu('Transaction'));
|
|
257
|
+
for (const cat in cats) {
|
|
258
|
+
// @@ TODO: Write away the need for exception on next line
|
|
259
|
+
|
|
260
|
+
if (Object.prototype.hasOwnProperty.call(cats, cat)) {
|
|
261
|
+
if (cat.slice(1, -1).split('#')[1] === catTail) {
|
|
262
|
+
return kb.sym(cat.slice(1, -1));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return null;
|
|
267
|
+
};
|
|
268
|
+
const checkCatHasField = function (catTail, pred) {
|
|
269
|
+
const cat = catSymbol(catTail);
|
|
270
|
+
let tab;
|
|
271
|
+
const guilty = [];
|
|
272
|
+
let count = 0;
|
|
273
|
+
if (!cat) {
|
|
274
|
+
complain('Error: No category correspnding to ' + catTail);
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
const list = kb.each(undefined, ns.rdf('type'), cat);
|
|
278
|
+
for (let i = 0; i < list.length; i++) {
|
|
279
|
+
if (!kb.any(list[i], pred)) {
|
|
280
|
+
guilty.push(list[i]);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (guilty.length) {
|
|
284
|
+
tab = transactionTable(dom, guilty);
|
|
285
|
+
count = tab.children.length;
|
|
286
|
+
div.appendChild(dom.createElement('h3')).textContent = UI.utils.label(cat) + ' with no ' + UI.utils.label(pred) + (count < 4 ? '' : ' (' + count + ')');
|
|
287
|
+
div.appendChild(tab);
|
|
288
|
+
}
|
|
289
|
+
return count;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
// Load dynamically as properties of period
|
|
293
|
+
if (checkCatHasField('Reimbursables', ns.trip('trip')) === 0) {
|
|
294
|
+
happy('Reimbursables all have trips');
|
|
295
|
+
}
|
|
296
|
+
if (checkCatHasField('Other_Inc_Speaking', ns.trip('trip')) === 0) {
|
|
297
|
+
happy('Speaking income all has trips');
|
|
298
|
+
}
|
|
299
|
+
// end of render period instance
|
|
300
|
+
}; // renderPeriod
|
|
301
|
+
|
|
302
|
+
// //////////////////////////////////////////////////////////////////////////////
|
|
303
|
+
|
|
304
|
+
// var me = authn.currentUser()
|
|
305
|
+
|
|
306
|
+
// Render a single Period
|
|
307
|
+
|
|
308
|
+
// This works only if enough metadata about the properties can drive the RDFS
|
|
309
|
+
// (or actual type statements whichtypically are NOT there on)
|
|
310
|
+
const t = kb.findTypeURIs(subject);
|
|
311
|
+
if (t['http://www.w3.org/2000/10/swap/pim/qif#Period']) {
|
|
312
|
+
const needed = kb.each(subject, ns.rdfs('seeAlso'));
|
|
313
|
+
console.log('Loading before render: ' + needed.length);
|
|
314
|
+
kb.fetcher.load(needed).then(function () {
|
|
315
|
+
renderPeriod();
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// if (!me) complain("You do not have your Web Id set. Set your Web ID to make changes.");
|
|
320
|
+
|
|
321
|
+
return div;
|
|
322
|
+
}
|
|
323
|
+
}; // ends
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
8
|
+
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
/* Trip Pane
|
|
11
|
+
**
|
|
12
|
+
** This pane deals with trips themselves and also
|
|
13
|
+
** will look at transactions organized by trip.
|
|
14
|
+
**
|
|
15
|
+
** This outline pane allows a user to interact with a transaction
|
|
16
|
+
** downloaded from a bank statement, annotting it with classes and comments,
|
|
17
|
+
** trips, etc
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const ns = UI.ns;
|
|
21
|
+
var _default = exports.default = {
|
|
22
|
+
icon: UI.icons.iconBase + 'noun_62007.svg',
|
|
23
|
+
name: 'travel expenses',
|
|
24
|
+
audience: [ns.solid('PowerUser')],
|
|
25
|
+
// Does the subject deserve this pane?
|
|
26
|
+
label: function (subject, context) {
|
|
27
|
+
const kb = context.session.store;
|
|
28
|
+
const t = kb.findTypeURIs(subject);
|
|
29
|
+
|
|
30
|
+
// if (t['http://www.w3.org/2000/10/swap/pim/qif#Transaction']) return "$$";
|
|
31
|
+
// if(kb.any(subject, UI.ns.qu('amount'))) return "$$$"; // In case schema not picked up
|
|
32
|
+
|
|
33
|
+
if (UI.ns.qu('Transaction') in kb.findSuperClassesNT(subject)) {
|
|
34
|
+
return 'by Trip';
|
|
35
|
+
}
|
|
36
|
+
if (t['http://www.w3.org/ns/pim/trip#Trip']) return 'Trip $';
|
|
37
|
+
return null; // No under other circumstances (while testing at least!)
|
|
38
|
+
},
|
|
39
|
+
render: function (subject, context) {
|
|
40
|
+
const myDocument = context.dom;
|
|
41
|
+
const kb = context.store;
|
|
42
|
+
const ns = UI.ns;
|
|
43
|
+
const CAL = $rdf.Namespace('http://www.w3.org/2002/12/cal/ical#');
|
|
44
|
+
const TRIP = $rdf.Namespace('http://www.w3.org/ns/pim/trip#');
|
|
45
|
+
const div = myDocument.createElement('div');
|
|
46
|
+
div.setAttribute('class', 'transactionPane');
|
|
47
|
+
div.innerHTML = '<h2>Trip transactions</h2>';
|
|
48
|
+
const complain = function complain(message, style) {
|
|
49
|
+
if (style === undefined) style = 'color: grey';
|
|
50
|
+
const pre = myDocument.createElement('pre');
|
|
51
|
+
pre.setAttribute('style', style);
|
|
52
|
+
div.appendChild(pre);
|
|
53
|
+
pre.appendChild(myDocument.createTextNode(message));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// //////////////////////////////////////////////////////////////////////////////
|
|
57
|
+
//
|
|
58
|
+
// Body of trip pane
|
|
59
|
+
|
|
60
|
+
const t = kb.findTypeURIs(subject);
|
|
61
|
+
|
|
62
|
+
// var me = authn.currentUser()
|
|
63
|
+
|
|
64
|
+
// Function: Render a single trip
|
|
65
|
+
|
|
66
|
+
const renderTrip = function renderTrip(subject, thisDiv) {
|
|
67
|
+
const query = new $rdf.Query(UI.utils.label(subject));
|
|
68
|
+
const vars = ['date', 'transaction', 'comment', 'type', 'in_USD'];
|
|
69
|
+
const v = {};
|
|
70
|
+
vars.forEach(function (x) {
|
|
71
|
+
query.vars.push(v[x] = $rdf.variable(x));
|
|
72
|
+
}); // Only used by UI
|
|
73
|
+
query.pat.add(v.transaction, TRIP('trip'), subject);
|
|
74
|
+
const opt = kb.formula();
|
|
75
|
+
opt.add(v.transaction, ns.rdf('type'), v.type); // Issue: this will get stored supertypes too
|
|
76
|
+
query.pat.optional.push(opt);
|
|
77
|
+
query.pat.add(v.transaction, UI.ns.qu('date'), v.date);
|
|
78
|
+
opt.add(v.transaction, ns.rdfs('comment'), v.comment);
|
|
79
|
+
query.pat.optional.push(opt);
|
|
80
|
+
|
|
81
|
+
// opt = kb.formula();
|
|
82
|
+
query.pat.add(v.transaction, UI.ns.qu('in_USD'), v.in_USD);
|
|
83
|
+
// query.pat.optional.push(opt);
|
|
84
|
+
|
|
85
|
+
const calculations = function () {
|
|
86
|
+
const total = {};
|
|
87
|
+
const trans = kb.each(undefined, TRIP('trip'), subject);
|
|
88
|
+
// complain("@@ Number of transactions in this trip: " + trans.length);
|
|
89
|
+
trans.forEach(function (t) {
|
|
90
|
+
let ty = kb.the(t, ns.rdf('type'));
|
|
91
|
+
// complain(" -- one trans: "+t.uri + ' -> '+kb.any(t, UI.ns.qu('in_USD')));
|
|
92
|
+
if (!ty) ty = UI.ns.qu('ErrorNoType');
|
|
93
|
+
if (ty && ty.uri) {
|
|
94
|
+
const tyuri = ty.uri;
|
|
95
|
+
if (!total[tyuri]) total[tyuri] = 0.0;
|
|
96
|
+
const lit = kb.any(t, UI.ns.qu('in_USD'));
|
|
97
|
+
if (!lit) {
|
|
98
|
+
complain(' @@ No amount in USD: ' + lit + ' for ' + t);
|
|
99
|
+
}
|
|
100
|
+
if (lit) {
|
|
101
|
+
total[tyuri] = total[tyuri] + parseFloat(lit.value);
|
|
102
|
+
// complain(' Trans type ='+ty+'; in_USD "' + lit
|
|
103
|
+
// +'; total[tyuri] = '+total[tyuri]+';')
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
let str = '';
|
|
108
|
+
let types = 0;
|
|
109
|
+
let grandTotal = 0.0;
|
|
110
|
+
for (const uri in total) {
|
|
111
|
+
str += UI.utils.label(kb.sym(uri)) + ': ' + total[uri] + '; ';
|
|
112
|
+
types++;
|
|
113
|
+
grandTotal += total[uri];
|
|
114
|
+
}
|
|
115
|
+
complain('Totals of ' + trans.length + ' transactions: ' + str, ''); // @@@@@ yucky -- need 2 col table
|
|
116
|
+
if (types > 1) {
|
|
117
|
+
complain('Overall net: ' + grandTotal, 'text-treatment: bold;');
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const tableDiv = UI.table(myDocument, {
|
|
121
|
+
query,
|
|
122
|
+
onDone: calculations
|
|
123
|
+
});
|
|
124
|
+
thisDiv.appendChild(tableDiv);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// Render the set of trips which have transactions in this class
|
|
128
|
+
|
|
129
|
+
if (UI.ns.qu('Transaction') in kb.findSuperClassesNT(subject)) {
|
|
130
|
+
const ts = kb.each(undefined, ns.rdf('type'), subject);
|
|
131
|
+
const triples = [];
|
|
132
|
+
const index = [];
|
|
133
|
+
for (let i = 0; i < ts.length; i++) {
|
|
134
|
+
const trans = ts[i];
|
|
135
|
+
const trip = kb.any(trans, TRIP('trip'));
|
|
136
|
+
if (!trip) {
|
|
137
|
+
triples.push(trans);
|
|
138
|
+
} else {
|
|
139
|
+
if (!(trans in index)) index[trip] = {
|
|
140
|
+
total: 0,
|
|
141
|
+
transactions: []
|
|
142
|
+
};
|
|
143
|
+
const usd = kb.any(trans, UI.ns.qu('in_USD'));
|
|
144
|
+
if (usd) index[trip].total += usd;
|
|
145
|
+
const date = kb.any(trans, UI.ns.qu('date'));
|
|
146
|
+
index[trip.toNT()].transactions.push([date, trans]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/* var byDate = function(a,b) {
|
|
150
|
+
return new Date(kb.any(a, CAL('dtstart'))) -
|
|
151
|
+
new Date(kb.any(b, CAL('dtstart')));
|
|
152
|
+
}
|
|
153
|
+
*/
|
|
154
|
+
const list = [];
|
|
155
|
+
for (const h1 in index) {
|
|
156
|
+
const t1 = kb.fromNT(h1);
|
|
157
|
+
list.push([kb.any(t1, CAL('dtstart')), t1]);
|
|
158
|
+
}
|
|
159
|
+
list.sort();
|
|
160
|
+
for (let j = 0; j < list.length; j++) {
|
|
161
|
+
const t2 = list[j][1];
|
|
162
|
+
renderTrip(t2, div);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Render a single trip
|
|
166
|
+
} else if (t['http://www.w3.org/ns/pim/trip#Trip']) {
|
|
167
|
+
renderTrip(subject, div);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// if (!me) complain("You do not have your Web Id set. Set your Web ID to make changes.");
|
|
171
|
+
|
|
172
|
+
return div;
|
|
173
|
+
}
|
|
174
|
+
}; // ends
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NamedNode } from '
|
|
1
|
+
import { NamedNode } from 'rdflib';
|
|
2
2
|
export declare function createApplicationTable(subject: NamedNode): HTMLTableElement;
|
|
3
3
|
export declare function createContainer<K extends keyof globalThis.HTMLElementTagNameMap>(elementName: K, children: HTMLElement[], attributes?: {}, eventListeners?: {}, onCreated?: null): HTMLElementTagNameMap[K];
|
|
4
4
|
export declare function createText<K extends keyof globalThis.HTMLElementTagNameMap>(elementName: K, textContent: string | null, attributes?: {}, eventListeners?: {}, onCreated?: null): HTMLElementTagNameMap[K];
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createApplicationTable = createApplicationTable;
|
|
7
|
+
exports.createContainer = createContainer;
|
|
8
|
+
exports.createText = createText;
|
|
9
|
+
var _rdflib = require("rdflib");
|
|
10
|
+
var _solidUi = require("solid-ui");
|
|
11
|
+
var _solidLogic = require("solid-logic");
|
|
12
|
+
var _trustedApplications = require("./trustedApplications.utils");
|
|
13
|
+
function createApplicationTable(subject) {
|
|
14
|
+
const applicationsTable = createElement('table', {
|
|
15
|
+
class: 'results'
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// creating headers
|
|
19
|
+
const header = createContainer('tr', [createText('th', 'Application URL'), createText('th', 'Access modes'), createText('th', 'Actions')]);
|
|
20
|
+
applicationsTable.appendChild(header);
|
|
21
|
+
|
|
22
|
+
// creating rows
|
|
23
|
+
_solidLogic.store.each(subject, _solidUi.ns.acl('trustedApp'), undefined, undefined).flatMap(app => _solidLogic.store.each(app, _solidUi.ns.acl('origin'), undefined, undefined).map(origin => ({
|
|
24
|
+
appModes: _solidLogic.store.each(app, _solidUi.ns.acl('mode'), undefined, undefined),
|
|
25
|
+
origin: origin
|
|
26
|
+
}))).sort((a, b) => a.origin.value < b.origin.value ? -1 : 1).forEach(({
|
|
27
|
+
appModes,
|
|
28
|
+
origin
|
|
29
|
+
}) => applicationsTable.appendChild(createApplicationEntry(subject, origin, appModes, updateTable)));
|
|
30
|
+
|
|
31
|
+
// adding a row for new applications
|
|
32
|
+
applicationsTable.appendChild(createApplicationEntry(subject, null, [_solidUi.ns.acl('Read')], updateTable));
|
|
33
|
+
return applicationsTable;
|
|
34
|
+
function updateTable() {
|
|
35
|
+
applicationsTable.parentElement.replaceChild(createApplicationTable(subject), applicationsTable);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function createApplicationEntry(subject, origin, appModes, updateTable) {
|
|
39
|
+
const trustedApplicationState = {
|
|
40
|
+
origin,
|
|
41
|
+
appModes,
|
|
42
|
+
formElements: {
|
|
43
|
+
modes: [],
|
|
44
|
+
origin: undefined
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return createContainer('tr', [createContainer('td', [createContainer('form', [createElement('input', {
|
|
48
|
+
class: 'textinput',
|
|
49
|
+
placeholder: 'Write new URL here',
|
|
50
|
+
value: origin ? origin.value : ''
|
|
51
|
+
}, {}, element => {
|
|
52
|
+
trustedApplicationState.formElements.origin = element;
|
|
53
|
+
})], {}, {
|
|
54
|
+
submit: addOrEditApplication
|
|
55
|
+
})]), createContainer('td', [createContainer('form', createModesInput(trustedApplicationState), {}, {
|
|
56
|
+
submit: addOrEditApplication
|
|
57
|
+
})]), createContainer('td', [createContainer('form', origin ? [createText('button', 'Update', {
|
|
58
|
+
class: 'controlButton',
|
|
59
|
+
style: 'background: LightGreen;'
|
|
60
|
+
}), createText('button', 'Delete', {
|
|
61
|
+
class: 'controlButton',
|
|
62
|
+
style: 'background: LightCoral;'
|
|
63
|
+
}, {
|
|
64
|
+
click: removeApplication
|
|
65
|
+
})] : [createText('button', 'Add', {
|
|
66
|
+
class: 'controlButton',
|
|
67
|
+
style: 'background: LightGreen;'
|
|
68
|
+
})], {}, {
|
|
69
|
+
submit: addOrEditApplication
|
|
70
|
+
})])]);
|
|
71
|
+
function addOrEditApplication(event) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
let origin;
|
|
74
|
+
try {
|
|
75
|
+
origin = (0, _rdflib.sym)(trustedApplicationState.formElements.origin.value);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
return alert('Please provide an application URL you want to trust');
|
|
78
|
+
}
|
|
79
|
+
const modes = trustedApplicationState.formElements.modes.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
|
|
80
|
+
const deletions = (0, _trustedApplications.getStatementsToDelete)(trustedApplicationState.origin || origin, subject, _solidLogic.store, _solidUi.ns);
|
|
81
|
+
const additions = (0, _trustedApplications.getStatementsToAdd)(origin, (0, _trustedApplications.generateRandomString)(), modes, subject, _solidUi.ns);
|
|
82
|
+
if (!_solidLogic.store.updater) {
|
|
83
|
+
throw new Error('Store has no updater');
|
|
84
|
+
}
|
|
85
|
+
_solidLogic.store.updater.update(deletions, additions, handleUpdateResponse);
|
|
86
|
+
}
|
|
87
|
+
function removeApplication(event) {
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
let origin;
|
|
90
|
+
try {
|
|
91
|
+
origin = (0, _rdflib.sym)(trustedApplicationState.formElements.origin.value);
|
|
92
|
+
} catch (err) {
|
|
93
|
+
return alert('Please provide an application URL you want to remove trust from');
|
|
94
|
+
}
|
|
95
|
+
const deletions = (0, _trustedApplications.getStatementsToDelete)(origin, subject, _solidLogic.store, _solidUi.ns);
|
|
96
|
+
if (!_solidLogic.store.updater) {
|
|
97
|
+
throw new Error('Store has no updater');
|
|
98
|
+
}
|
|
99
|
+
_solidLogic.store.updater.update(deletions, [], handleUpdateResponse);
|
|
100
|
+
}
|
|
101
|
+
function handleUpdateResponse(uri, success, errorBody) {
|
|
102
|
+
if (success) {
|
|
103
|
+
return updateTable();
|
|
104
|
+
}
|
|
105
|
+
// console.error(uri, errorBody)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function createElement(elementName, attributes = {}, eventListeners = {}, onCreated = null) {
|
|
109
|
+
const element = document.createElement(elementName);
|
|
110
|
+
if (onCreated) {
|
|
111
|
+
onCreated(element);
|
|
112
|
+
}
|
|
113
|
+
Object.keys(attributes).forEach(attName => {
|
|
114
|
+
element.setAttribute(attName, attributes[attName]);
|
|
115
|
+
});
|
|
116
|
+
Object.keys(eventListeners).forEach(eventName => {
|
|
117
|
+
element.addEventListener(eventName, eventListeners[eventName]);
|
|
118
|
+
});
|
|
119
|
+
return element;
|
|
120
|
+
}
|
|
121
|
+
function createContainer(elementName, children, attributes = {}, eventListeners = {}, onCreated = null) {
|
|
122
|
+
const element = createElement(elementName, attributes, eventListeners, onCreated);
|
|
123
|
+
children.forEach(child => element.appendChild(child));
|
|
124
|
+
return element;
|
|
125
|
+
}
|
|
126
|
+
function createText(elementName, textContent, attributes = {}, eventListeners = {}, onCreated = null) {
|
|
127
|
+
const element = createElement(elementName, attributes, eventListeners, onCreated);
|
|
128
|
+
element.textContent = textContent;
|
|
129
|
+
return element;
|
|
130
|
+
}
|
|
131
|
+
function createModesInput({
|
|
132
|
+
appModes,
|
|
133
|
+
formElements
|
|
134
|
+
}) {
|
|
135
|
+
return ['Read', 'Write', 'Append', 'Control'].map(mode => {
|
|
136
|
+
const isChecked = appModes.some(appMode => appMode.value === _solidUi.ns.acl(mode).value);
|
|
137
|
+
return createContainer('label', [createElement('input', {
|
|
138
|
+
type: 'checkbox',
|
|
139
|
+
...(isChecked ? {
|
|
140
|
+
checked: ''
|
|
141
|
+
} : {}),
|
|
142
|
+
value: _solidUi.ns.acl(mode).uri
|
|
143
|
+
}, {}, element => formElements.modes.push(element)), createText('span', mode)]);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IndexedFormula, NamedNode, Literal } from '
|
|
1
|
+
import { IndexedFormula, NamedNode, Literal } from 'rdflib';
|
|
2
2
|
import { Namespaces } from 'solid-namespace';
|
|
3
3
|
export declare function getStatementsToDelete(origin: NamedNode | Literal, person: NamedNode, kb: IndexedFormula, ns: Namespaces): any;
|
|
4
4
|
export declare function getStatementsToAdd(origin: NamedNode, nodeName: string, modes: string[], person: NamedNode, ns: Namespaces): any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateRandomString = generateRandomString;
|
|
7
|
+
exports.getStatementsToAdd = getStatementsToAdd;
|
|
8
|
+
exports.getStatementsToDelete = getStatementsToDelete;
|
|
9
|
+
var _rdflib = require("rdflib");
|
|
10
|
+
function getStatementsToDelete(origin, person, kb, ns) {
|
|
11
|
+
const applicationStatements = kb.statementsMatching(null, ns.acl('origin'), origin);
|
|
12
|
+
const statementsToDelete = applicationStatements.reduce((memo, st) => {
|
|
13
|
+
return memo.concat(kb.statementsMatching(person, ns.acl('trustedApp'), st.subject)).concat(kb.statementsMatching(st.subject));
|
|
14
|
+
}, []);
|
|
15
|
+
return statementsToDelete;
|
|
16
|
+
}
|
|
17
|
+
function getStatementsToAdd(origin, nodeName, modes, person, ns) {
|
|
18
|
+
const application = new _rdflib.BlankNode(`bn_${nodeName}`); // NamedNode(`${person.doc().uri}#${nodeName}`)
|
|
19
|
+
return [(0, _rdflib.st)(person, ns.acl('trustedApp'), application, person.doc()), (0, _rdflib.st)(application, ns.acl('origin'), origin, person.doc()), ...modes.map(mode => (0, _rdflib.sym)(mode)).map(mode => (0, _rdflib.st)(application, ns.acl('mode'), mode, person.doc()))];
|
|
20
|
+
}
|
|
21
|
+
function generateRandomString() {
|
|
22
|
+
return Math.random().toString(36).substr(2, 5);
|
|
23
|
+
}
|