solid-panes 3.7.3-cc40de56 → 3.7.3-f251a0e3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RDFXMLPane.js +58 -0
- package/dist/RDFXMLPane.js.map +1 -0
- package/{lib → dist}/argument/argumentPane.js +14 -15
- package/dist/argument/argumentPane.js.map +1 -0
- package/{lib → dist}/attach/attachPane.js +83 -93
- package/dist/attach/attachPane.js.map +1 -0
- package/{lib → dist}/audio/audioPane.js +49 -50
- package/dist/audio/audioPane.js.map +1 -0
- package/{lib → dist}/classInstancePane.js +23 -24
- package/dist/classInstancePane.js.map +1 -0
- package/dist/dashboard/basicPreferences.js +155 -0
- package/dist/dashboard/basicPreferences.js.map +1 -0
- package/dist/dashboard/dashboardPane.js +63 -0
- package/dist/dashboard/dashboardPane.js.map +1 -0
- package/dist/dashboard/homepage.js +63 -0
- package/dist/dashboard/homepage.js.map +1 -0
- package/{lib → dist}/dataContentPane.js +63 -63
- package/dist/dataContentPane.js.map +1 -0
- package/{lib → dist}/defaultPane.js +14 -15
- package/dist/defaultPane.js.map +1 -0
- package/{lib → dist}/dokieli/dokieliPane.js +49 -53
- package/dist/dokieli/dokieliPane.js.map +1 -0
- package/{src → dist}/dokieli/new.js +9 -3
- package/dist/dokieli/new.js.map +1 -0
- package/{lib → dist}/form/pane.js +44 -45
- package/dist/form/pane.js.map +1 -0
- package/dist/home/homePane.js +68 -0
- package/dist/home/homePane.js.map +1 -0
- package/dist/humanReadablePane.js +135 -0
- package/dist/humanReadablePane.js.map +1 -0
- package/dist/imagePane.js +70 -0
- package/dist/imagePane.js.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/internalPane.js +195 -0
- package/dist/internal/internalPane.js.map +1 -0
- package/dist/mainPage/footer.js +16 -0
- package/dist/mainPage/footer.js.map +1 -0
- package/dist/mainPage/header.js +84 -0
- package/dist/mainPage/header.js.map +1 -0
- package/{lib → dist}/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.js +30 -0
- package/dist/mainPage/index.js.map +1 -0
- package/{lib → dist}/microblogPane/microblogPane.js +261 -262
- package/dist/microblogPane/microblogPane.js.map +1 -0
- package/dist/n3Pane.js +56 -0
- package/dist/n3Pane.js.map +1 -0
- package/dist/outline/context.js +13 -0
- package/dist/outline/context.js.map +1 -0
- package/dist/outline/manager.js +1997 -0
- package/dist/outline/manager.js.map +1 -0
- package/{lib → dist}/outline/outlineIcons.js +2 -3
- package/dist/outline/outlineIcons.js.map +1 -0
- package/dist/outline/propertyViews.js +33 -0
- package/dist/outline/propertyViews.js.map +1 -0
- package/{lib → dist}/outline/queryByExample.js +30 -31
- package/dist/outline/queryByExample.js.map +1 -0
- package/{lib → dist}/outline/userInput.js +262 -260
- package/dist/outline/userInput.js.map +1 -0
- package/dist/outline/viewAsImage.js +7 -0
- package/dist/outline/viewAsImage.js.map +1 -0
- package/{lib → dist}/outline/viewAsMbox.js +4 -14
- package/dist/outline/viewAsMbox.js.map +1 -0
- package/dist/pad/padPane.js +420 -0
- package/dist/pad/padPane.js.map +1 -0
- package/{lib → dist}/playlist/playlistPane.js +36 -37
- package/dist/playlist/playlistPane.js.map +1 -0
- package/{lib → dist}/registerPanes.js +29 -29
- package/dist/registerPanes.js.map +1 -0
- package/{src → dist}/schedule/formsForSchedule.js +9 -2
- package/dist/schedule/formsForSchedule.js.map +1 -0
- package/{lib → dist}/schedule/schedulePane.js +171 -177
- package/dist/schedule/schedulePane.js.map +1 -0
- package/dist/sharing/sharingPane.js +45 -0
- package/dist/sharing/sharingPane.js.map +1 -0
- package/dist/slideshow/slideshowPane.js +80 -0
- package/dist/slideshow/slideshowPane.js.map +1 -0
- package/{lib → dist}/socialPane.js +141 -142
- package/dist/socialPane.js.map +1 -0
- package/dist/tabbed/tabbedPane.js +55 -0
- package/dist/tabbed/tabbedPane.js.map +1 -0
- package/{lib → dist}/tableViewPane.js +8 -9
- package/dist/tableViewPane.js.map +1 -0
- package/{lib → dist}/transaction/pane.js +117 -118
- package/dist/transaction/pane.js.map +1 -0
- package/{lib → dist}/transaction/period.js +82 -83
- package/dist/transaction/period.js.map +1 -0
- package/{lib → dist}/trip/tripPane.js +47 -48
- package/dist/trip/tripPane.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.dom.js +158 -0
- package/dist/trustedApplications/trustedApplications.dom.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.utils.js +24 -0
- package/dist/trustedApplications/trustedApplications.utils.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.view.js +62 -0
- package/dist/trustedApplications/trustedApplications.view.js.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/{lib → dist}/ui/pane.js +30 -31
- package/dist/ui/pane.js.map +1 -0
- package/dist/versionInfo.js +31 -0
- package/dist/versionInfo.js.map +1 -0
- package/dist/video/videoPane.js +43 -0
- package/dist/video/videoPane.js.map +1 -0
- package/package.json +26 -13
- package/Documentation/VisualLanguage.html +0 -538
- package/Documentation/conventions.md +0 -333
- package/coverage/clover.xml +0 -152
- package/coverage/coverage-final.json +0 -6
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -131
- package/coverage/lcov-report/outline/index.html +0 -161
- package/coverage/lcov-report/outline/outlineIcons.js.html +0 -565
- package/coverage/lcov-report/outline/propertyViews.ts.html +0 -196
- package/coverage/lcov-report/outline/viewAsImage.ts.html +0 -121
- package/coverage/lcov-report/outline/viewAsMbox.ts.html +0 -127
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/trustedApplications/index.html +0 -116
- package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +0 -238
- package/coverage/lcov.info +0 -204
- package/dev/index.html +0 -28
- package/dev/loader.ts +0 -91
- package/dev/pane/index.ts +0 -10
- package/doc/images/panes-for-classes.epgz +0 -0
- package/doc/images/panes-for-classes.svg +0 -609
- package/eslint.config.mjs +0 -34
- package/jest.config.js +0 -27
- package/jest.setup.ts +0 -4
- package/lib/RDFXMLPane.js +0 -59
- package/lib/RDFXMLPane.js.map +0 -1
- package/lib/argument/argumentPane.js.map +0 -1
- package/lib/attach/attachPane.js.map +0 -1
- package/lib/audio/audioPane.js.map +0 -1
- package/lib/classInstancePane.js.map +0 -1
- package/lib/dashboard/basicPreferences.js +0 -229
- package/lib/dashboard/basicPreferences.js.map +0 -1
- package/lib/dashboard/dashboardPane.js +0 -73
- package/lib/dashboard/dashboardPane.js.map +0 -1
- package/lib/dashboard/homepage.js +0 -86
- package/lib/dashboard/homepage.js.map +0 -1
- package/lib/dataContentPane.js.map +0 -1
- package/lib/defaultPane.js.map +0 -1
- package/lib/dokieli/dokieliPane.js.map +0 -1
- package/lib/dokieli/new.js +0 -9
- package/lib/dokieli/new.js.map +0 -1
- package/lib/form/pane.js.map +0 -1
- package/lib/global.d.js +0 -2
- package/lib/global.d.js.map +0 -1
- package/lib/home/homePane.js +0 -91
- package/lib/home/homePane.js.map +0 -1
- package/lib/humanReadablePane.js +0 -138
- package/lib/humanReadablePane.js.map +0 -1
- package/lib/imagePane.js +0 -71
- package/lib/imagePane.js.map +0 -1
- package/lib/index.js +0 -112
- package/lib/index.js.map +0 -1
- package/lib/internal/internalPane.js +0 -184
- package/lib/internal/internalPane.js.map +0 -1
- package/lib/mainPage/footer.js +0 -22
- package/lib/mainPage/footer.js.map +0 -1
- package/lib/mainPage/header.js +0 -152
- package/lib/mainPage/header.js.map +0 -1
- package/lib/mainPage/index.js +0 -42
- package/lib/mainPage/index.js.map +0 -1
- package/lib/microblogPane/microblogPane.js.map +0 -1
- package/lib/n3Pane.js +0 -57
- package/lib/n3Pane.js.map +0 -1
- package/lib/outline/context.js +0 -19
- package/lib/outline/context.js.map +0 -1
- package/lib/outline/manager.js +0 -2264
- package/lib/outline/manager.js.map +0 -1
- package/lib/outline/manager.test.d.ts +0 -2
- package/lib/outline/manager.test.d.ts.map +0 -1
- package/lib/outline/manager.test.js +0 -210
- package/lib/outline/manager.test.js.map +0 -1
- package/lib/outline/outlineIcons.js.map +0 -1
- package/lib/outline/propertyViews.js +0 -44
- package/lib/outline/propertyViews.js.map +0 -1
- package/lib/outline/propertyViews.test.d.ts +0 -2
- package/lib/outline/propertyViews.test.d.ts.map +0 -1
- package/lib/outline/propertyViews.test.js +0 -27
- package/lib/outline/propertyViews.test.js.map +0 -1
- package/lib/outline/queryByExample.js.map +0 -1
- package/lib/outline/userInput.js.map +0 -1
- package/lib/outline/viewAsImage.js +0 -17
- package/lib/outline/viewAsImage.js.map +0 -1
- package/lib/outline/viewAsMbox.js.map +0 -1
- package/lib/pad/padPane.js +0 -417
- package/lib/pad/padPane.js.map +0 -1
- package/lib/playlist/playlistPane.js.map +0 -1
- package/lib/registerPanes.js.map +0 -1
- package/lib/schedule/formsForSchedule.js +0 -4
- package/lib/schedule/formsForSchedule.js.map +0 -1
- package/lib/schedule/schedulePane.js.map +0 -1
- package/lib/sharing/sharingPane.js +0 -49
- package/lib/sharing/sharingPane.js.map +0 -1
- package/lib/slideshow/slideshowPane.js +0 -84
- package/lib/slideshow/slideshowPane.js.map +0 -1
- package/lib/socialPane.js.map +0 -1
- package/lib/tabbed/tabbedPane.js +0 -72
- package/lib/tabbed/tabbedPane.js.map +0 -1
- package/lib/tableViewPane.js.map +0 -1
- package/lib/test-import-export/common.js +0 -12
- package/lib/test-import-export/common.js.map +0 -1
- package/lib/test-import-export/edit-importer.js +0 -25
- package/lib/test-import-export/edit-importer.js.map +0 -1
- package/lib/test-import-export/testImportExport.js +0 -2
- package/lib/test-import-export/testImportExport.js.map +0 -1
- package/lib/transaction/pane.js.map +0 -1
- package/lib/transaction/period.js.map +0 -1
- package/lib/trip/tripPane.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.dom.js +0 -177
- package/lib/trustedApplications/trustedApplications.dom.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.test.d.ts +0 -2
- package/lib/trustedApplications/trustedApplications.test.d.ts.map +0 -1
- package/lib/trustedApplications/trustedApplications.test.js +0 -64
- package/lib/trustedApplications/trustedApplications.test.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.utils.js +0 -34
- package/lib/trustedApplications/trustedApplications.utils.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.view.js +0 -87
- package/lib/trustedApplications/trustedApplications.view.js.map +0 -1
- package/lib/types.js +0 -6
- package/lib/types.js.map +0 -1
- package/lib/ui/pane.js.map +0 -1
- package/lib/versionInfo.d.ts +0 -32
- package/lib/versionInfo.d.ts.map +0 -1
- package/lib/versionInfo.js +0 -37
- package/lib/versionInfo.js.map +0 -1
- package/lib/video/videoPane.js +0 -44
- package/lib/video/videoPane.js.map +0 -1
- package/src/RDFXMLPane.js +0 -60
- package/src/argument/argumentPane.js +0 -65
- package/src/argument/argument_icon_v04.jpg +0 -0
- package/src/argument/icon_argument.png +0 -0
- package/src/argument/transparentyingyang.png +0 -0
- package/src/attach/attachPane.js +0 -508
- package/src/attach/tbl-paperclip-128.png +0 -0
- package/src/attach/tbl-paperclip-22.png +0 -0
- package/src/attach/tbl-paperclip-22a.png +0 -0
- package/src/audio/audioPane.js +0 -197
- package/src/chatPreferencesForm.ttl +0 -12
- package/src/classInstancePane.js +0 -110
- package/src/dashboard/basicPreferences.ts +0 -201
- package/src/dashboard/dashboardPane.ts +0 -83
- package/src/dashboard/homepage.ts +0 -72
- package/src/dashboard/languages/codes.html +0 -8611
- package/src/dashboard/languages/codes.xml +0 -3563
- package/src/dashboard/languages/codes2.txt +0 -170
- package/src/dashboard/languages/foo +0 -70
- package/src/dashboard/languages/foo.ttl +0 -0
- package/src/dashboard/languages/get-language-names.sh +0 -12
- package/src/dashboard/ontologyData.ttl +0 -35
- package/src/dashboard/preferencesFormText.ttl +0 -18
- package/src/dataContentPane.js +0 -290
- package/src/defaultPane.js +0 -102
- package/src/dokieli/Makefile +0 -6
- package/src/dokieli/dokieliPane.js +0 -190
- package/src/dokieli/new.html +0 -30
- package/src/form/form-22.png +0 -0
- package/src/form/form-b-22.png +0 -0
- package/src/form/form.graffle +0 -0
- package/src/form/form.png +0 -0
- package/src/form/pane.js +0 -217
- package/src/form/psuedocode-notes.txt +0 -57
- package/src/global.d.ts +0 -4
- package/src/home/homePane.ts +0 -72
- package/src/humanReadablePane.js +0 -150
- package/src/imagePane.js +0 -75
- package/src/index.ts +0 -71
- package/src/internal/internalPane.ts +0 -263
- package/src/mainPage/footer.ts +0 -19
- package/src/mainPage/header.ts +0 -79
- package/src/mainPage/index.ts +0 -20
- package/src/meeting/Makefile +0 -3
- package/src/meeting/test/meeting1/Actions/actions.ttl +0 -14
- package/src/meeting/test/meeting1/Actions/config.ttl +0 -16
- package/src/meeting/test/meeting1/Actions/state.ttl +0 -30
- package/src/meeting/test/meeting1/Schedule/details.ttl +0 -34
- package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -20
- package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -75
- package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -20
- package/src/meeting/test/meeting1/Schedule/index.html +0 -72
- package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -20
- package/src/meeting/test/meeting1/Schedule/results.ttl +0 -15
- package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -20
- package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -23
- package/src/meeting/test/meeting1/chat/chat.ttl +0 -1
- package/src/meeting/test/meeting1/details.ttl +0 -35
- package/src/meeting/test/meeting1/pad/pad.ttl +0 -16
- package/src/microblogPane/mbStyle.css +0 -267
- package/src/microblogPane/microblogPane.js +0 -1412
- package/src/n3Pane.js +0 -56
- package/src/outline/context.ts +0 -21
- package/src/outline/manager.js +0 -2384
- package/src/outline/manager.test.ts +0 -189
- package/src/outline/outlineIcons.js +0 -160
- package/src/outline/propertyViews.test.ts +0 -36
- package/src/outline/propertyViews.ts +0 -37
- package/src/outline/queryByExample.js +0 -296
- package/src/outline/userInput.js +0 -2373
- package/src/outline/viewAsImage.ts +0 -12
- package/src/outline/viewAsMbox.ts +0 -14
- package/src/pad/images/ColourOff.ai +2 -872
- package/src/pad/images/ColourOff.png +0 -0
- package/src/pad/images/ColourOn.ai +1 -935
- package/src/pad/images/ColourOn.png +0 -0
- package/src/pad/padPane.ts +0 -559
- package/src/playlist/playlistPane.js +0 -161
- package/src/registerPanes.js +0 -147
- package/src/schedule/Makefile +0 -6
- package/src/schedule/formsForSchedule.ttl +0 -115
- package/src/schedule/schedulePane.js +0 -1201
- package/src/sharing/sharingPane.ts +0 -49
- package/src/slideshow/slideshowPane.js +0 -80
- package/src/socialPane.js +0 -523
- package/src/style/tabbedtab.css +0 -1347
- package/src/tabbed/tabbedPane.ts +0 -60
- package/src/tableViewPane.js +0 -51
- package/src/test-import-export/common.js +0 -6
- package/src/test-import-export/edit-importer.js +0 -20
- package/src/test-import-export/testImportExport.js +0 -0
- package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
- package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/pane.js +0 -629
- package/src/transaction/period.js +0 -374
- package/src/transaction/thumbs_075987-3d-transparent-glass-icon-business-creditcard2.png +0 -0
- package/src/transaction/thumbs_075989-3d-transparent-glass-icon-business-currency-cent-sc35.png +0 -0
- package/src/trip/tripPane.js +0 -176
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -176
- package/src/trustedApplications/trustedApplications.dom.ts +0 -276
- package/src/trustedApplications/trustedApplications.test.ts +0 -82
- package/src/trustedApplications/trustedApplications.utils.ts +0 -51
- package/src/trustedApplications/trustedApplications.view.ts +0 -80
- package/src/types.ts +0 -34
- package/src/ui/22-builder.png +0 -0
- package/src/ui/builder.graffle +0 -0
- package/src/ui/builder.png +0 -0
- package/src/ui/builder2.png +0 -0
- package/src/ui/pane.js +0 -226
- package/src/versionInfo.ts +0 -30
- package/src/video/videoPane.js +0 -44
- package/timestamp.sh +0 -13
- package/travis/bumpversion.js +0 -29
- package/tsconfig.json +0 -78
- package/typings/raw-loader.d.ts +0 -4
- package/typings/solid-namespace/index.d.ts +0 -9
- package/webpack.config.js +0 -41
- /package/{lib → dist}/dashboard/basicPreferences.d.ts +0 -0
- /package/{lib → dist}/dashboard/basicPreferences.d.ts.map +0 -0
- /package/{lib → dist}/dashboard/dashboardPane.d.ts +0 -0
- /package/{lib → dist}/dashboard/dashboardPane.d.ts.map +0 -0
- /package/{lib → dist}/dashboard/homepage.d.ts +0 -0
- /package/{lib → dist}/dashboard/homepage.d.ts.map +0 -0
- /package/{lib → dist}/home/homePane.d.ts +0 -0
- /package/{lib → dist}/home/homePane.d.ts.map +0 -0
- /package/{lib → dist}/index.d.ts +0 -0
- /package/{lib → dist}/index.d.ts.map +0 -0
- /package/{lib → dist}/internal/internalPane.d.ts +0 -0
- /package/{lib → dist}/internal/internalPane.d.ts.map +0 -0
- /package/{lib → dist}/mainPage/footer.d.ts +0 -0
- /package/{lib → dist}/mainPage/footer.d.ts.map +0 -0
- /package/{lib → dist}/mainPage/header.d.ts +0 -0
- /package/{lib → dist}/mainPage/header.d.ts.map +0 -0
- /package/{lib → dist}/mainPage/index.d.ts +0 -0
- /package/{lib → dist}/outline/context.d.ts +0 -0
- /package/{lib → dist}/outline/context.d.ts.map +0 -0
- /package/{lib → dist}/outline/propertyViews.d.ts +0 -0
- /package/{lib → dist}/outline/propertyViews.d.ts.map +0 -0
- /package/{lib → dist}/outline/viewAsImage.d.ts +0 -0
- /package/{lib → dist}/outline/viewAsImage.d.ts.map +0 -0
- /package/{lib → dist}/outline/viewAsMbox.d.ts +0 -0
- /package/{lib → dist}/outline/viewAsMbox.d.ts.map +0 -0
- /package/{lib → dist}/pad/padPane.d.ts +0 -0
- /package/{lib → dist}/pad/padPane.d.ts.map +0 -0
- /package/{lib → dist}/sharing/sharingPane.d.ts +0 -0
- /package/{lib → dist}/sharing/sharingPane.d.ts.map +0 -0
- /package/{lib → dist}/tabbed/tabbedPane.d.ts +0 -0
- /package/{lib → dist}/tabbed/tabbedPane.d.ts.map +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.dom.d.ts +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.utils.d.ts +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.view.d.ts +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.view.d.ts.map +0 -0
- /package/{lib → dist}/types.d.ts +0 -0
- /package/{lib → dist}/types.d.ts.map +0 -0
package/src/defaultPane.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/* Default Pane
|
|
2
|
-
**
|
|
3
|
-
** This outline pane contains the properties which are
|
|
4
|
-
** normally displayed to the user. See also: internalPane
|
|
5
|
-
** This pane hides the ones considered too low-level for the normal user.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as UI from 'solid-ui'
|
|
9
|
-
import * as $rdf from 'rdflib'
|
|
10
|
-
const ns = UI.ns
|
|
11
|
-
|
|
12
|
-
export const defaultPane = {
|
|
13
|
-
icon: UI.icons.originalIconBase + 'about.png',
|
|
14
|
-
|
|
15
|
-
name: 'default',
|
|
16
|
-
|
|
17
|
-
audience: [ns.solid('Developer')],
|
|
18
|
-
|
|
19
|
-
label: function (_subject) {
|
|
20
|
-
return 'about '
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
render: function (subject, context) {
|
|
24
|
-
const dom = context.dom
|
|
25
|
-
|
|
26
|
-
const filter = function (pred, inverse) {
|
|
27
|
-
if (
|
|
28
|
-
typeof context.session.paneRegistry.byName('internal').predicates[
|
|
29
|
-
pred.uri
|
|
30
|
-
] !== 'undefined'
|
|
31
|
-
) {
|
|
32
|
-
return false
|
|
33
|
-
}
|
|
34
|
-
if (
|
|
35
|
-
inverse &&
|
|
36
|
-
pred.uri === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
|
|
37
|
-
) {
|
|
38
|
-
return false
|
|
39
|
-
}
|
|
40
|
-
return true
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const outliner = context.getOutliner(dom)
|
|
44
|
-
const kb = context.session.store
|
|
45
|
-
// var outline = outliner; // @@
|
|
46
|
-
UI.log.info('@defaultPane.render, dom is now ' + dom.location)
|
|
47
|
-
subject = kb.canon(subject)
|
|
48
|
-
const div = dom.createElement('div')
|
|
49
|
-
div.setAttribute('class', 'defaultPane')
|
|
50
|
-
// appendRemoveIcon(div, subject, div)
|
|
51
|
-
|
|
52
|
-
let plist = kb.statementsMatching(subject)
|
|
53
|
-
outliner.appendPropertyTRs(div, plist, false, filter)
|
|
54
|
-
plist = kb.statementsMatching(undefined, undefined, subject)
|
|
55
|
-
outliner.appendPropertyTRs(div, plist, true, filter)
|
|
56
|
-
if (
|
|
57
|
-
subject.termType === 'Literal' &&
|
|
58
|
-
subject.value.slice(0, 7) === 'http://'
|
|
59
|
-
) {
|
|
60
|
-
outliner.appendPropertyTRs(
|
|
61
|
-
div,
|
|
62
|
-
[$rdf.st(kb.sym(subject.value), UI.ns.link('uri'), subject)],
|
|
63
|
-
true,
|
|
64
|
-
filter
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
if (
|
|
68
|
-
(subject.termType === 'NamedNode' &&
|
|
69
|
-
kb.updater.editable(UI.rdf.Util.uri.docpart(subject.uri), kb)) ||
|
|
70
|
-
(subject.termType === 'BlankNode' &&
|
|
71
|
-
kb.anyStatementMatching(subject) &&
|
|
72
|
-
kb.anyStatementMatching(subject).why &&
|
|
73
|
-
kb.anyStatementMatching(subject).why.uri &&
|
|
74
|
-
kb.updater.editable(kb.anyStatementMatching(subject).why.uri))
|
|
75
|
-
// check the document containing something about of the bnode @@ what about as object?
|
|
76
|
-
/* ! && HCIoptions["bottom insert highlights"].enabled */
|
|
77
|
-
) {
|
|
78
|
-
const holdingTr = dom.createElement('tr') // these are to minimize required changes
|
|
79
|
-
const holdingTd = dom.createElement('td') // in userinput.js
|
|
80
|
-
holdingTd.setAttribute('colspan', '2')
|
|
81
|
-
holdingTd.setAttribute('notSelectable', 'true')
|
|
82
|
-
const img = dom.createElement('img')
|
|
83
|
-
img.src = UI.icons.originalIconBase + 'tango/22-list-add-new.png'
|
|
84
|
-
img.addEventListener('click', function addNewTripleIconMouseDownListener (
|
|
85
|
-
e
|
|
86
|
-
) {
|
|
87
|
-
outliner.UserInput.addNewPredicateObject(e)
|
|
88
|
-
e.stopPropagation()
|
|
89
|
-
e.preventDefault()
|
|
90
|
-
})
|
|
91
|
-
img.className = 'bottom-border-active'
|
|
92
|
-
// img.addEventListener('click', thisOutline.UserInput.addNewPredicateObject,false)
|
|
93
|
-
div
|
|
94
|
-
.appendChild(holdingTr)
|
|
95
|
-
.appendChild(holdingTd)
|
|
96
|
-
.appendChild(img)
|
|
97
|
-
}
|
|
98
|
-
return div
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// ends
|
package/src/dokieli/Makefile
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
/* Human-readable editable "Dokieli" Pane
|
|
2
|
-
**
|
|
3
|
-
** This outline pane contains the document contents for a Dokieli document
|
|
4
|
-
** The dokeili system allows the user to edit a document including anotations
|
|
5
|
-
** review. It does not use turtle, but RDF/a
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as UI from 'solid-ui'
|
|
9
|
-
import * as $rdf from 'rdflib'
|
|
10
|
-
import * as mime from 'mime-types'
|
|
11
|
-
|
|
12
|
-
// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok
|
|
13
|
-
|
|
14
|
-
import DOKIELI_TEMPLATE from './new.js' // Distributed with this library
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?
|
|
18
|
-
|
|
19
|
-
name: 'Dokieli',
|
|
20
|
-
|
|
21
|
-
mintClass: UI.ns.solid('DokieliDocument'), // @@ A better class?
|
|
22
|
-
|
|
23
|
-
label: function (subject, context) {
|
|
24
|
-
const kb = context.session.store
|
|
25
|
-
const ns = UI.ns
|
|
26
|
-
const allowed = [
|
|
27
|
-
// 'text/plain',
|
|
28
|
-
'text/html',
|
|
29
|
-
'application/xhtml+xml'
|
|
30
|
-
// 'image/png', 'image/jpeg', 'application/pdf',
|
|
31
|
-
// 'video/mp4'
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
const hasContentTypeIn = function (kb, x, displayables) {
|
|
35
|
-
const cts = kb.fetcher.getHeader(x, 'content-type')
|
|
36
|
-
if (cts) {
|
|
37
|
-
for (let j = 0; j < cts.length; j++) {
|
|
38
|
-
for (let k = 0; k < displayables.length; k++) {
|
|
39
|
-
if (cts[j].indexOf(displayables[k]) >= 0) {
|
|
40
|
-
return true
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return false
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// This data coul d come from a fetch OR from ldp comtaimner
|
|
49
|
-
const hasContentTypeIn2 = function (kb, x, displayables) {
|
|
50
|
-
const t = kb.findTypeURIs(x)
|
|
51
|
-
for (let k = 0; k < displayables.length; k++) {
|
|
52
|
-
if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) {
|
|
53
|
-
return true
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return false
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (!subject.uri) return null // no bnodes
|
|
60
|
-
|
|
61
|
-
const t = kb.findTypeURIs(subject)
|
|
62
|
-
if (t[ns.link('WebPage').uri]) return 'view'
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
hasContentTypeIn(kb, subject, allowed) ||
|
|
66
|
-
hasContentTypeIn2(kb, subject, allowed)
|
|
67
|
-
) {
|
|
68
|
-
return 'Dok'
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return null
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
// Create a new folder in a Solid system, with a dokieli editable document in it
|
|
75
|
-
mintNew: function (context, newPaneOptions) {
|
|
76
|
-
const kb = context.session.store
|
|
77
|
-
let newInstance = newPaneOptions.newInstance
|
|
78
|
-
if (!newInstance) {
|
|
79
|
-
let uri = newPaneOptions.newBase
|
|
80
|
-
if (uri.endsWith('/')) {
|
|
81
|
-
uri = uri.slice(0, -1)
|
|
82
|
-
newPaneOptions.newBase = uri
|
|
83
|
-
}
|
|
84
|
-
newInstance = kb.sym(uri)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const contentType = mime.lookup(newInstance.uri)
|
|
88
|
-
if (!contentType || !contentType.includes('html')) {
|
|
89
|
-
newInstance = $rdf.sym(newInstance.uri + '.html')
|
|
90
|
-
}
|
|
91
|
-
newPaneOptions.newInstance = newInstance // Save for creation system
|
|
92
|
-
|
|
93
|
-
// console.log('New dokieli will make: ' + newInstance)
|
|
94
|
-
|
|
95
|
-
let htmlContents = DOKIELI_TEMPLATE
|
|
96
|
-
let filename = newInstance.uri.split('/').slice(-1)[0]
|
|
97
|
-
filename = decodeURIComponent(filename.split('.')[0])
|
|
98
|
-
const encodedTitle = filename
|
|
99
|
-
.replace(/&/g, '&')
|
|
100
|
-
.replace(/</g, '<')
|
|
101
|
-
.replace(/>/g, '>')
|
|
102
|
-
htmlContents = htmlContents.replace('<title>', '<title>' + encodedTitle)
|
|
103
|
-
htmlContents = htmlContents.replace(
|
|
104
|
-
'</article>',
|
|
105
|
-
'<h1>' + encodedTitle + '</h1></article>'
|
|
106
|
-
)
|
|
107
|
-
// console.log('@@ New HTML for Dok:' + htmlContents)
|
|
108
|
-
return new Promise(function (resolve) {
|
|
109
|
-
kb.fetcher
|
|
110
|
-
.webOperation('PUT', newInstance.uri, {
|
|
111
|
-
data: htmlContents,
|
|
112
|
-
contentType: 'text/html'
|
|
113
|
-
})
|
|
114
|
-
.then(function () {
|
|
115
|
-
console.log(
|
|
116
|
-
'new Dokieli document created at ' + newPaneOptions.newInstance
|
|
117
|
-
)
|
|
118
|
-
resolve(newPaneOptions)
|
|
119
|
-
})
|
|
120
|
-
.catch(function (err) {
|
|
121
|
-
console.log(
|
|
122
|
-
'Error creating dokieli doc at ' +
|
|
123
|
-
newPaneOptions.newInstance +
|
|
124
|
-
': ' +
|
|
125
|
-
err
|
|
126
|
-
)
|
|
127
|
-
})
|
|
128
|
-
})
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
// Derived from: humanReadablePane .. share code?
|
|
132
|
-
render: function (subject, context) {
|
|
133
|
-
const myDocument = context.dom
|
|
134
|
-
const div = myDocument.createElement('div')
|
|
135
|
-
const kb = context.session.store
|
|
136
|
-
|
|
137
|
-
// @@ When we can, use CSP to turn off scripts within the iframe
|
|
138
|
-
div.setAttribute('class', 'docView')
|
|
139
|
-
const iframe = myDocument.createElement('IFRAME')
|
|
140
|
-
|
|
141
|
-
// Function to set iframe attributes
|
|
142
|
-
const setIframeAttributes = (iframe, blob, lines) => {
|
|
143
|
-
const objectURL = URL.createObjectURL(blob)
|
|
144
|
-
iframe.setAttribute('src', objectURL)
|
|
145
|
-
iframe.setAttribute('type', blob.type)
|
|
146
|
-
iframe.setAttribute('class', 'doc')
|
|
147
|
-
iframe.setAttribute('style', `border: 1px solid; padding: 1em; height:${lines}em; width:800px; resize: both; overflow: auto;`)
|
|
148
|
-
|
|
149
|
-
// Apply sandbox attribute only for HTML files
|
|
150
|
-
// @@ NOte beflow - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
|
|
151
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
152
|
-
// You can;'t have any sandbox and allow plugins.
|
|
153
|
-
// We could sandbox only HTML files I suppose.
|
|
154
|
-
// HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html
|
|
155
|
-
if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') {
|
|
156
|
-
iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin')
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// Fetch and process the blob
|
|
161
|
-
kb.fetcher._fetch(subject.uri)
|
|
162
|
-
.then(response => response.blob())
|
|
163
|
-
.then(blob => {
|
|
164
|
-
const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve('')
|
|
165
|
-
return blobTextPromise.then(blobText => ({ blob, blobText }))
|
|
166
|
-
})
|
|
167
|
-
.then(({ blob, blobText }) => {
|
|
168
|
-
const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5
|
|
169
|
-
const lines = Math.min(30, blobText.split(/\n/).length + newLines)
|
|
170
|
-
setIframeAttributes(iframe, blob, lines)
|
|
171
|
-
})
|
|
172
|
-
.catch(err => {
|
|
173
|
-
console.log('Error fetching or processing blob:', err)
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')
|
|
177
|
-
const ct = cts ? cts[0].split(';', 1)[0].trim() : null
|
|
178
|
-
if (ct) {
|
|
179
|
-
console.log('dokieliPane: c-t:' + ct)
|
|
180
|
-
} else {
|
|
181
|
-
console.log('dokieliPane: unknown content-type?')
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const tr = myDocument.createElement('tr')
|
|
185
|
-
tr.appendChild(iframe)
|
|
186
|
-
div.appendChild(tr)
|
|
187
|
-
return div
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// ends
|
package/src/dokieli/new.html
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title></title>
|
|
6
|
-
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
7
|
-
<link
|
|
8
|
-
href="https://dokie.li/media/css/basic.css"
|
|
9
|
-
media="all"
|
|
10
|
-
rel="stylesheet"
|
|
11
|
-
title="Basic"
|
|
12
|
-
/>
|
|
13
|
-
<link
|
|
14
|
-
href="https://dokie.li/media/css/dokieli.css"
|
|
15
|
-
media="all"
|
|
16
|
-
rel="stylesheet"
|
|
17
|
-
/>
|
|
18
|
-
<script src="https://dokie.li/scripts/dokieli.js"></script>
|
|
19
|
-
</head>
|
|
20
|
-
|
|
21
|
-
<body
|
|
22
|
-
about=""
|
|
23
|
-
prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# cc: https://creativecommons.org/ns# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#"
|
|
24
|
-
typeof="schema:CreativeWork sioc:Post prov:Entity"
|
|
25
|
-
>
|
|
26
|
-
<main>
|
|
27
|
-
<article about="" typeof="schema:Article"></article>
|
|
28
|
-
</main>
|
|
29
|
-
</body>
|
|
30
|
-
</html>
|
package/src/form/form-22.png
DELETED
|
Binary file
|
package/src/form/form-b-22.png
DELETED
|
Binary file
|
package/src/form/form.graffle
DELETED
|
Binary file
|
package/src/form/form.png
DELETED
|
Binary file
|
package/src/form/pane.js
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
** Pane for running existing forms for any object
|
|
3
|
-
**
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as UI from 'solid-ui'
|
|
7
|
-
import { authn } from 'solid-logic'
|
|
8
|
-
import * as $rdf from 'rdflib'
|
|
9
|
-
const ns = UI.ns
|
|
10
|
-
|
|
11
|
-
export const formPane = {
|
|
12
|
-
icon: UI.icons.iconBase + 'noun_122196.svg',
|
|
13
|
-
|
|
14
|
-
name: 'form',
|
|
15
|
-
|
|
16
|
-
audience: [ns.solid('PowerUser')],
|
|
17
|
-
|
|
18
|
-
// Does the subject deserve this pane?
|
|
19
|
-
label: function (subject) {
|
|
20
|
-
const n = UI.widgets.formsFor(subject).length
|
|
21
|
-
UI.log.debug('Form pane: forms for ' + subject + ': ' + n)
|
|
22
|
-
if (!n) return null
|
|
23
|
-
return '' + n + ' forms'
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
render: function (subject, context) {
|
|
27
|
-
const kb = context.session.store
|
|
28
|
-
const dom = context.dom
|
|
29
|
-
|
|
30
|
-
const mention = function complain (message, style) {
|
|
31
|
-
const pre = dom.createElement('p')
|
|
32
|
-
pre.setAttribute('style', style || 'color: grey; background-color: white')
|
|
33
|
-
box.appendChild(pre).textContent = message
|
|
34
|
-
return pre
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const complain = function complain (message, style) {
|
|
38
|
-
mention(message, 'style', style || 'color: grey; background-color: #fdd;')
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const complainIfBad = function (ok, body) {
|
|
42
|
-
if (ok) {
|
|
43
|
-
// setModifiedDate(store, kb, store);
|
|
44
|
-
// rerender(box); // Deleted forms at the moment
|
|
45
|
-
} else complain('Sorry, failed to save your change:\n' + body)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// The question of where to store this data about subject
|
|
49
|
-
// This in general needs a whole lot more thought
|
|
50
|
-
// and it connects to the discoverbility through links
|
|
51
|
-
|
|
52
|
-
// const t = kb.findTypeURIs(subject)
|
|
53
|
-
|
|
54
|
-
const me = authn.currentUser()
|
|
55
|
-
|
|
56
|
-
const box = dom.createElement('div')
|
|
57
|
-
box.setAttribute('class', 'formPane')
|
|
58
|
-
|
|
59
|
-
if (!me) {
|
|
60
|
-
mention(
|
|
61
|
-
'You are not logged in. If you log in and have ' +
|
|
62
|
-
'workspaces then you would be able to select workspace in which ' +
|
|
63
|
-
'to put this new information'
|
|
64
|
-
)
|
|
65
|
-
} else {
|
|
66
|
-
const ws = kb.each(me, ns.ui('workspace'))
|
|
67
|
-
if (ws.length === 0) {
|
|
68
|
-
mention(
|
|
69
|
-
"You don't seem to have any workspaces defined. " +
|
|
70
|
-
'A workspace is a place on the web (http://..) or in ' +
|
|
71
|
-
'the file system (file:///) to store application data.\n'
|
|
72
|
-
)
|
|
73
|
-
} else {
|
|
74
|
-
// @@
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Render forms using a given store
|
|
79
|
-
|
|
80
|
-
const renderFormsFor = function (store, subject) {
|
|
81
|
-
kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {
|
|
82
|
-
if (!ok) return complain('Cannot load store ' + store.uri + ': ' + body)
|
|
83
|
-
|
|
84
|
-
// Render the forms
|
|
85
|
-
|
|
86
|
-
const forms = UI.widgets.formsFor(subject)
|
|
87
|
-
|
|
88
|
-
// complain('Form for editing this form:');
|
|
89
|
-
for (let i = 0; i < forms.length; i++) {
|
|
90
|
-
const form = forms[i]
|
|
91
|
-
const heading = dom.createElement('h4')
|
|
92
|
-
box.appendChild(heading)
|
|
93
|
-
if (form.uri) {
|
|
94
|
-
const formStore = $rdf.Util.uri.document(form.uri)
|
|
95
|
-
if (formStore.uri !== form.uri) {
|
|
96
|
-
// The form is a hash-type URI
|
|
97
|
-
const e = box.appendChild(
|
|
98
|
-
UI.widgets.editFormButton(
|
|
99
|
-
dom,
|
|
100
|
-
box,
|
|
101
|
-
form,
|
|
102
|
-
formStore,
|
|
103
|
-
complainIfBad
|
|
104
|
-
)
|
|
105
|
-
)
|
|
106
|
-
e.setAttribute('style', 'float: right;')
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const anchor = dom.createElement('a')
|
|
110
|
-
anchor.setAttribute('href', form.uri)
|
|
111
|
-
heading.appendChild(anchor)
|
|
112
|
-
anchor.textContent = UI.utils.label(form, true)
|
|
113
|
-
|
|
114
|
-
/* Keep tis as a reminder to let a New one have its URI given by user
|
|
115
|
-
mention("Where will this information be stored?")
|
|
116
|
-
const ele = dom.createElement('input');
|
|
117
|
-
box.appendChild(ele);
|
|
118
|
-
ele.setAttribute('type', 'text');
|
|
119
|
-
ele.setAttribute('size', '72');
|
|
120
|
-
ele.setAttribute('maxlength', '1024');
|
|
121
|
-
ele.setAttribute('style', 'font-size: 80%; color:#222;');
|
|
122
|
-
ele.value = store.uri
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
UI.widgets.appendForm(
|
|
126
|
-
dom,
|
|
127
|
-
box,
|
|
128
|
-
{},
|
|
129
|
-
subject,
|
|
130
|
-
form,
|
|
131
|
-
store,
|
|
132
|
-
complainIfBad
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
}) // end: when store loded
|
|
136
|
-
} // renderFormsFor
|
|
137
|
-
|
|
138
|
-
// Figure out what store
|
|
139
|
-
|
|
140
|
-
// Which places are editable and have stuff about the subject?
|
|
141
|
-
|
|
142
|
-
let store = null
|
|
143
|
-
|
|
144
|
-
// 1. The document URI of the subject itself
|
|
145
|
-
const docuri = $rdf.Util.uri.docpart(subject.uri)
|
|
146
|
-
if (subject.uri !== docuri && kb.updater.editable(docuri, kb)) {
|
|
147
|
-
store = subject.doc()
|
|
148
|
-
} // an editable data file with hash
|
|
149
|
-
|
|
150
|
-
store = store || kb.any(kb.sym(docuri), ns.link('annotationStore'))
|
|
151
|
-
|
|
152
|
-
// 2. where stuff is already stored
|
|
153
|
-
if (!store) {
|
|
154
|
-
const docs = {}
|
|
155
|
-
const docList = []
|
|
156
|
-
store.statementsMatching(subject).forEach(function (st) {
|
|
157
|
-
docs[st.why.uri] = 1
|
|
158
|
-
})
|
|
159
|
-
store
|
|
160
|
-
.statementsMatching(undefined, undefined, subject)
|
|
161
|
-
.forEach(function (st) {
|
|
162
|
-
docs[st.why.uri] = 2
|
|
163
|
-
})
|
|
164
|
-
for (const d in docs) docList.push(docs[d], d)
|
|
165
|
-
docList.sort()
|
|
166
|
-
for (let i = 0; i < docList.length; i++) {
|
|
167
|
-
const uri = docList[i][1]
|
|
168
|
-
if (uri && store.updater.editable(uri)) {
|
|
169
|
-
store = store.sym(uri)
|
|
170
|
-
break
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// 3. In a workspace store
|
|
176
|
-
// @@ TODO: Can probably remove _followeach (not done this time because the commit is a very safe refactor)
|
|
177
|
-
const _followeach = function (kb, subject, path) {
|
|
178
|
-
if (path.length === 0) return [subject]
|
|
179
|
-
const oo = kb.each(subject, path[0])
|
|
180
|
-
let res = []
|
|
181
|
-
for (let i = 0; i < oo.length; i++) {
|
|
182
|
-
res = res.concat(_followeach(kb, oo[i], path.slice(1)))
|
|
183
|
-
}
|
|
184
|
-
return res
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const date = '2014' // @@@@@@@@@@@@ pass as parameter
|
|
188
|
-
|
|
189
|
-
if (store) {
|
|
190
|
-
// mention("@@ Ok, we have a store <" + store.uri + ">.");
|
|
191
|
-
renderFormsFor(store, subject)
|
|
192
|
-
} else {
|
|
193
|
-
complain('No suitable store is known, to edit <' + subject.uri + '>.')
|
|
194
|
-
const foobarbaz = UI.login.selectWorkspace(dom, function (ws) {
|
|
195
|
-
mention('Workspace selected OK: ' + ws)
|
|
196
|
-
|
|
197
|
-
const activities = store.each(undefined, ns.space('workspace'), ws)
|
|
198
|
-
for (let j = 0; j < activities.length; j++) {
|
|
199
|
-
const act = activities[j]
|
|
200
|
-
|
|
201
|
-
const subjectDoc2 = store.any(ws, ns.space('store'))
|
|
202
|
-
const start = store.any(ws, ns.cal('dtstart')).value()
|
|
203
|
-
const end = store.any(ws, ns.cal('dtend')).value()
|
|
204
|
-
if (subjectDoc2 && start && end && start <= date && end > date) {
|
|
205
|
-
renderFormsFor(subjectDoc2, subject)
|
|
206
|
-
break
|
|
207
|
-
} else {
|
|
208
|
-
complain('Note no suitable annotation store in activity: ' + act)
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
})
|
|
212
|
-
box.appendChild(foobarbaz)
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return box
|
|
216
|
-
}
|
|
217
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
These notes are about the user interaction flowchart
|
|
2
|
-
for the process of chosing a workspace and if necessray
|
|
3
|
-
making one, chosing an account or if necessary signing up for one.
|
|
4
|
-
This is yet to be coded up mostly (2013-07).
|
|
5
|
-
|
|
6
|
-
Could reflect as to whether to build the flow
|
|
7
|
-
is data or RDF or do it with futures or just code it up in AJAX normal.
|
|
8
|
-
|
|
9
|
-
________________________________________
|
|
10
|
-
|
|
11
|
-
Allow cancel back to here at any time directly or indirectly
|
|
12
|
-
|
|
13
|
-
If preferences not loaded, load preferences.
|
|
14
|
-
on error, explain problem and what trying to do, offer to cancel or try again.
|
|
15
|
-
In preferences, find workspaces.
|
|
16
|
-
|
|
17
|
-
workspace dialogue:
|
|
18
|
-
offer create a new workspace
|
|
19
|
-
if so, refresh workspace form
|
|
20
|
-
offer select a workspace
|
|
21
|
-
if selected, continue returning ws.
|
|
22
|
-
|
|
23
|
-
activity dialogue:
|
|
24
|
-
if workspace not loaded, load workspace
|
|
25
|
-
look for suitable activity
|
|
26
|
-
if only one, return that.
|
|
27
|
-
If none or more, make form.
|
|
28
|
-
offer to create a suitable activity
|
|
29
|
-
offer to select an activity.
|
|
30
|
-
on activity selected,
|
|
31
|
-
return the activity
|
|
32
|
-
|
|
33
|
-
create the form in the activity's store.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
In normal synchronous form this would look like:
|
|
38
|
-
|
|
39
|
-
createForm(getActivity(selectWorkspace(loadPreferences(me))))
|
|
40
|
-
|
|
41
|
-
or p = loadPreferences(me)
|
|
42
|
-
w = selectWorkspace(p)
|
|
43
|
-
a = getActivity(w)
|
|
44
|
-
x = createForm(a)
|
|
45
|
-
|
|
46
|
-
World futures really help? You would end up with
|
|
47
|
-
|
|
48
|
-
loadPreference(me).then(function(p){
|
|
49
|
-
selectWorkspace(p).then(function(w){})})
|
|
50
|
-
.... etc
|
|
51
|
-
|
|
52
|
-
or
|
|
53
|
-
loadPreference(me).then(function(p){
|
|
54
|
-
selectWorkspace(p)})
|
|
55
|
-
.then(function(w){
|
|
56
|
-
});
|
|
57
|
-
|
package/src/global.d.ts
DELETED
package/src/home/homePane.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/* Home Pane
|
|
2
|
-
**
|
|
3
|
-
** The home pane is avaiable everywhere and allows a user
|
|
4
|
-
** to
|
|
5
|
-
** - keep track of their stuff
|
|
6
|
-
** - make new things, and possibly
|
|
7
|
-
** - keep track of accounts and workspaces etc
|
|
8
|
-
**
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { PaneDefinition } from 'pane-registry'
|
|
12
|
-
import { NamedNode } from 'rdflib'
|
|
13
|
-
import { authn } from 'solid-logic'
|
|
14
|
-
import { create, icons, login } from 'solid-ui'
|
|
15
|
-
import { CreateContext } from 'solid-ui/lib/create/types'
|
|
16
|
-
|
|
17
|
-
const HomePaneSource: PaneDefinition = {
|
|
18
|
-
icon: icons.iconBase + 'noun_547570.svg', // noun_25830
|
|
19
|
-
|
|
20
|
-
global: true,
|
|
21
|
-
|
|
22
|
-
name: 'home',
|
|
23
|
-
|
|
24
|
-
// Does the subject deserve an home pane?
|
|
25
|
-
//
|
|
26
|
-
// yes, always!
|
|
27
|
-
//
|
|
28
|
-
label: function () {
|
|
29
|
-
return 'home'
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
render: function (subject, context) {
|
|
33
|
-
const dom = context.dom
|
|
34
|
-
const showContent = async function () {
|
|
35
|
-
const homePaneContext = { div: div, dom: dom, statusArea: div, me: me }
|
|
36
|
-
/*
|
|
37
|
-
div.appendChild(dom.createElement('h4')).textContent = 'Login status'
|
|
38
|
-
var loginStatusDiv = div.appendChild(context.dom.createElement('div'))
|
|
39
|
-
// TODO: Find out what the actual type is:
|
|
40
|
-
type UriType = unknown;
|
|
41
|
-
loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {
|
|
42
|
-
// Here we know new log in status
|
|
43
|
-
}))
|
|
44
|
-
*/
|
|
45
|
-
div.appendChild(dom.createElement('h4')).textContent =
|
|
46
|
-
'Create new thing somewhere'
|
|
47
|
-
const creationDiv = div.appendChild(dom.createElement('div'))
|
|
48
|
-
const creationContext: CreateContext = {
|
|
49
|
-
div: creationDiv,
|
|
50
|
-
dom: dom,
|
|
51
|
-
statusArea: div,
|
|
52
|
-
me: me
|
|
53
|
-
}
|
|
54
|
-
const relevantPanes = await login.filterAvailablePanes(
|
|
55
|
-
context.session.paneRegistry.list
|
|
56
|
-
)
|
|
57
|
-
create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down
|
|
58
|
-
|
|
59
|
-
login.registrationList(homePaneContext, {}).then(function () {})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const div = dom.createElement('div')
|
|
63
|
-
const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in
|
|
64
|
-
|
|
65
|
-
showContent()
|
|
66
|
-
|
|
67
|
-
return div
|
|
68
|
-
}
|
|
69
|
-
} // pane object
|
|
70
|
-
|
|
71
|
-
// ends
|
|
72
|
-
export default HomePaneSource
|