solid-panes 3.7.3-671186bc → 3.7.3-bbb760a7
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 +147 -0
- package/dist/dashboard/basicPreferences.js.map +1 -0
- package/{lib → dist}/dashboard/dashboardPane.js +17 -21
- package/dist/dashboard/dashboardPane.js.map +1 -0
- package/dist/dashboard/homepage.js +54 -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/{lib → dist}/home/homePane.d.ts.map +1 -1
- package/dist/home/homePane.js +73 -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/{lib → dist}/index.js +17 -20
- package/dist/index.js.map +1 -0
- package/{lib → dist}/internal/internalPane.js +41 -41
- package/dist/internal/internalPane.js.map +1 -0
- package/{lib → dist}/mainPage/footer.js +2 -2
- package/{lib → dist}/mainPage/footer.js.map +1 -1
- package/dist/mainPage/header.js +85 -0
- package/dist/mainPage/header.js.map +1 -0
- package/{lib → dist}/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.js +25 -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/{lib → dist}/outline/context.js +4 -4
- package/{lib → dist}/outline/context.js.map +1 -1
- 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/{lib → dist}/outline/propertyViews.js +4 -4
- 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 +15 -0
- package/dist/outline/viewAsImage.js.map +1 -0
- package/dist/outline/viewAsMbox.js +22 -0
- package/dist/outline/viewAsMbox.js.map +1 -0
- package/{lib → dist}/pad/padPane.js +90 -96
- 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/{lib → dist}/schedule/schedulePane.js +171 -178
- package/dist/schedule/schedulePane.js.map +1 -0
- package/{lib → dist}/sharing/sharingPane.js +12 -12
- 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 +58 -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 +146 -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 +56 -0
- package/dist/trustedApplications/trustedApplications.view.js.map +1 -0
- package/{lib → dist}/ui/pane.js +30 -31
- package/dist/ui/pane.js.map +1 -0
- package/dist/versionInfo.js +37 -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 +37 -24
- 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.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.map +0 -1
- package/lib/internal/internalPane.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/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.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 +0 -23
- package/lib/outline/viewAsMbox.js.map +0 -1
- 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 -8
- package/lib/schedule/formsForSchedule.js.map +0 -1
- package/lib/schedule/schedulePane.js.map +0 -1
- 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.d.ts +0 -30
- package/lib/types.d.ts.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.js +0 -117
- 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}/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/src/attach/attachPane.js
DELETED
|
@@ -1,508 +0,0 @@
|
|
|
1
|
-
/* Attachment Pane
|
|
2
|
-
**
|
|
3
|
-
** - Attach a document to a thing
|
|
4
|
-
** - View attachments
|
|
5
|
-
** - Look at all unattached Supporting Documents.
|
|
6
|
-
** - Drag a document onto the pane to attach it @@
|
|
7
|
-
**
|
|
8
|
-
**
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import * as UI from 'solid-ui'
|
|
12
|
-
import * as $rdf from 'rdflib'
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
icon: UI.icons.iconBase + 'noun_25830.svg', // noun_25830
|
|
16
|
-
|
|
17
|
-
name: 'attachments',
|
|
18
|
-
|
|
19
|
-
// Does the subject deserve an attachments pane?
|
|
20
|
-
//
|
|
21
|
-
// In this case we will render any thing which is in any subclass of
|
|
22
|
-
// certain classes, or also the certain classes themselves, as a
|
|
23
|
-
// triage tool for correlating many attachees with attachments.
|
|
24
|
-
// We also offer the pane for anything of any class which just has an attachment already.
|
|
25
|
-
//
|
|
26
|
-
label: function (subject, context) {
|
|
27
|
-
const kb = context.session.store
|
|
28
|
-
const t = kb.findTypeURIs(subject)
|
|
29
|
-
const QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')
|
|
30
|
-
const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
|
|
31
|
-
if (
|
|
32
|
-
t['http://www.w3.org/ns/pim/trip#Trip'] || // If in any subclass
|
|
33
|
-
subject.uri === 'http://www.w3.org/ns/pim/trip#Trip' ||
|
|
34
|
-
t['http://www.w3.org/2005/01/wf/flow#Task'] ||
|
|
35
|
-
t['http://www.w3.org/2000/10/swap/pim/qif#Transaction'] ||
|
|
36
|
-
// subject.uri == 'http://www.w3.org/2000/10/swap/pim/qif#Transaction' ||
|
|
37
|
-
QU('Transaction') in kb.findSuperClassesNT(subject) ||
|
|
38
|
-
kb.holds(subject, WF('attachment'))
|
|
39
|
-
) {
|
|
40
|
-
return 'attachments'
|
|
41
|
-
}
|
|
42
|
-
return null
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
render: function (subject, context) {
|
|
46
|
-
const dom = context.dom
|
|
47
|
-
const kb = context.session.store
|
|
48
|
-
const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
|
|
49
|
-
const QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')
|
|
50
|
-
|
|
51
|
-
// ////////////////////////////////////////////////////////////////////////////
|
|
52
|
-
|
|
53
|
-
const complain = function complain (message) {
|
|
54
|
-
const pre = dom.createElement('pre')
|
|
55
|
-
pre.setAttribute('style', 'background-color: pink')
|
|
56
|
-
div.appendChild(pre)
|
|
57
|
-
pre.appendChild(dom.createTextNode(message))
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Where can we write about this thing?
|
|
61
|
-
//
|
|
62
|
-
// Returns term for document or null
|
|
63
|
-
const findStore = function (kb, subject) {
|
|
64
|
-
if (kb.updater.editable(subject.doc(), kb)) return subject.doc()
|
|
65
|
-
const store = kb.any(subject.doc(), QU('annotationStore'))
|
|
66
|
-
return store
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const div = dom.createElement('div')
|
|
70
|
-
const esc = UI.utils.escapeForXML
|
|
71
|
-
div.setAttribute('class', 'attachPane')
|
|
72
|
-
div.innerHTML =
|
|
73
|
-
'<h1>' + esc(UI.utils.label(subject, true)) + ' attachments</h1>' //
|
|
74
|
-
|
|
75
|
-
const predicate = WF('attachment')
|
|
76
|
-
const range = QU('SupportingDocument')
|
|
77
|
-
|
|
78
|
-
let subjects, multi
|
|
79
|
-
const options = {}
|
|
80
|
-
let currentMode = 0 // 0 -> Show all; 1 -> Attached; 2 -> unattached
|
|
81
|
-
let currentSubject = null
|
|
82
|
-
let currentObject = null
|
|
83
|
-
const objectType = QU('SupportingDocument')
|
|
84
|
-
|
|
85
|
-
// Find all members of the class which we know about
|
|
86
|
-
// and sort them by an appropriate property. @@ Move to library
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
const getSortKeySimple = function (_c) {
|
|
90
|
-
const uriMap = {
|
|
91
|
-
'http://www.w3.org/2005/01/wf/flow#Task': 'http://purl.org/dc/elements/1.1/created',
|
|
92
|
-
'http://www.w3.org/ns/pim/trip#Trip': 'http://www.w3.org/2002/12/cal/ical#dtstart',
|
|
93
|
-
'http://www.w3.org/2000/10/swap/pim/qif#Transaction': 'http://www.w3.org/2000/10/swap/pim/qif#date',
|
|
94
|
-
'http://www.w3.org/2000/10/swap/pim/qif#SupportingDocument': 'http://purl.org/dc/elements/1.1/date'
|
|
95
|
-
}
|
|
96
|
-
const uri = uriMap[subject.uri]
|
|
97
|
-
return uri ? kb.sym(uri) : kb.any(subject, UI.ns.ui('sortBy'))
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const getSortKey = function (c) {
|
|
101
|
-
let k = getSortKeySimple(c.uri)
|
|
102
|
-
if (k) return k
|
|
103
|
-
const sup = kb.findSuperClassesNT(c)
|
|
104
|
-
for (const cl in sup) {
|
|
105
|
-
// note unordered -- could be closest first
|
|
106
|
-
k = getSortKeySimple(kb.fromNT(cl).uri)
|
|
107
|
-
if (k) return k
|
|
108
|
-
}
|
|
109
|
-
return undefined // failure
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const getMembersAndSort = function (subject) {
|
|
113
|
-
const sortBy = getSortKey(subject)
|
|
114
|
-
let u, x, key
|
|
115
|
-
const uriHash = kb.findMemberURIs(subject)
|
|
116
|
-
const pairs = []
|
|
117
|
-
const subjects = []
|
|
118
|
-
for (u in uriHash) {
|
|
119
|
-
// @@ TODO: Write away the need for exception on next line
|
|
120
|
-
|
|
121
|
-
if (uriHash.hasOwnProperty(u)) {
|
|
122
|
-
x = kb.sym(u)
|
|
123
|
-
if (sortBy) {
|
|
124
|
-
key = kb.any(x, sortBy)
|
|
125
|
-
if (!key) {
|
|
126
|
-
// complain("No key "+key+" sortby "+sortBy+" for "+x)
|
|
127
|
-
key = '8888-12-31'
|
|
128
|
-
} else {
|
|
129
|
-
key = key.value
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
complain('No sortby ' + sortBy + ' for ' + x)
|
|
133
|
-
key = '9999-12-31'
|
|
134
|
-
}
|
|
135
|
-
// key = (sortBy && kb.any(x, sortBy)) || kb.literal("9999-12-31") // Undated appear future
|
|
136
|
-
// if (!key) complain("Sort: '"+key+"' No "+sortBy+" for "+x) // Assume just not in this year
|
|
137
|
-
pairs.push([key, x])
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
pairs.sort()
|
|
141
|
-
pairs.reverse() // @@ Descending order .. made a toggle?
|
|
142
|
-
for (let i = 0; i < pairs.length; i++) {
|
|
143
|
-
subjects.push(pairs[i][1])
|
|
144
|
-
}
|
|
145
|
-
return subjects
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Set up a triage of many class members against documents or just one
|
|
149
|
-
if (
|
|
150
|
-
subject.uri === 'http://www.w3.org/ns/pim/trip#Trip' ||
|
|
151
|
-
QU('Transaction') in kb.findSuperClassesNT(subject)
|
|
152
|
-
// subject.uri == 'http://www.w3.org/2000/10/swap/pim/qif#Transaction'
|
|
153
|
-
) {
|
|
154
|
-
multi = true
|
|
155
|
-
subjects = getMembersAndSort(subject)
|
|
156
|
-
} else {
|
|
157
|
-
currentSubject = subject
|
|
158
|
-
currentMode = 1 // Show attached only.
|
|
159
|
-
subjects = [subject]
|
|
160
|
-
multi = false
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// var store = findStore(kb, subject)
|
|
164
|
-
// if (!store) complain("There is no annotation store for: "+subject.uri)
|
|
165
|
-
|
|
166
|
-
// var objects = kb.each(undefined, ns.rdf('type'), range)
|
|
167
|
-
const objects = getMembersAndSort(range)
|
|
168
|
-
if (!objects) complain('objects:' + objects.length)
|
|
169
|
-
|
|
170
|
-
const deselectObject = function () {
|
|
171
|
-
currentObject = null
|
|
172
|
-
preview.innerHTML = ''
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const showFiltered = function (mode) {
|
|
176
|
-
const filtered = mode === 0 ? objects : getFiltered()
|
|
177
|
-
// eslint-enable
|
|
178
|
-
UI.widgets.selectorPanelRefresh(
|
|
179
|
-
objectList,
|
|
180
|
-
dom,
|
|
181
|
-
kb,
|
|
182
|
-
objectType,
|
|
183
|
-
predicate,
|
|
184
|
-
true,
|
|
185
|
-
filtered,
|
|
186
|
-
options,
|
|
187
|
-
showObject,
|
|
188
|
-
linkClicked
|
|
189
|
-
)
|
|
190
|
-
if (filtered.length === 1) {
|
|
191
|
-
currentObject = filtered[0]
|
|
192
|
-
showObject(currentObject, null, true) // @@ (Sure?) if only one select it.
|
|
193
|
-
} else {
|
|
194
|
-
deselectObject()
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
function getFiltered () {
|
|
198
|
-
return mode === 1
|
|
199
|
-
? currentSubject === null
|
|
200
|
-
? objects.filter(y => !!kb.holds(undefined, predicate, y))
|
|
201
|
-
: objects.filter(y => !!kb.holds(currentSubject, predicate, y))
|
|
202
|
-
: objects.filter(y => kb.each(undefined, predicate, y).length === 0)
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const setAttachment = function (x, y, value, refresh) {
|
|
207
|
-
if (kb.holds(x, predicate, y) === value) return
|
|
208
|
-
const verb = value ? 'attach' : 'detach'
|
|
209
|
-
// complain("Info: starting to "+verb+" " + y.uri + " to "+x.uri+ ":\n")
|
|
210
|
-
const linkDone3 = function (uri, ok, body) {
|
|
211
|
-
if (ok) {
|
|
212
|
-
// complain("Success "+verb+" "+y.uri+" to "+x.uri+ ":\n"+ body)
|
|
213
|
-
refresh()
|
|
214
|
-
} else {
|
|
215
|
-
complain(
|
|
216
|
-
'Error: Unable to ' +
|
|
217
|
-
verb +
|
|
218
|
-
' ' +
|
|
219
|
-
y.uri +
|
|
220
|
-
' to ' +
|
|
221
|
-
x.uri +
|
|
222
|
-
':\n' +
|
|
223
|
-
body
|
|
224
|
-
)
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const store = findStore(kb, x)
|
|
229
|
-
if (!store) {
|
|
230
|
-
complain('There is no annotation store for: ' + x.uri)
|
|
231
|
-
} else {
|
|
232
|
-
const sts = [$rdf.st(x, predicate, y, store)]
|
|
233
|
-
if (value) {
|
|
234
|
-
kb.updater.update([], sts, linkDone3)
|
|
235
|
-
} else {
|
|
236
|
-
kb.updater.update(sts, [], linkDone3)
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
const linkClicked = function (x, event, inverse, refresh) {
|
|
242
|
-
let s, o
|
|
243
|
-
if (inverse) {
|
|
244
|
-
// Objectlist
|
|
245
|
-
if (!currentSubject) {
|
|
246
|
-
complain('No subject for the link has been selected')
|
|
247
|
-
return
|
|
248
|
-
} else {
|
|
249
|
-
s = currentSubject
|
|
250
|
-
o = x
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
253
|
-
// Subjectlist
|
|
254
|
-
if (!currentObject) {
|
|
255
|
-
complain('No object for the link has been selected')
|
|
256
|
-
return
|
|
257
|
-
} else {
|
|
258
|
-
s = x
|
|
259
|
-
o = currentObject
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
setAttachment(s, o, !kb.holds(s, predicate, o), refresh) // @@ toggle
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// When you click on a subject, filter the objects connected to the subject in Mode 1
|
|
266
|
-
const showSubject = function (x, event, selected) {
|
|
267
|
-
if (selected) {
|
|
268
|
-
currentSubject = x
|
|
269
|
-
} else {
|
|
270
|
-
currentSubject = null
|
|
271
|
-
if (currentMode === 1) deselectObject()
|
|
272
|
-
} // If all are displayed, refresh would just annoy:
|
|
273
|
-
if (currentMode !== 0) showFiltered(currentMode) // Refresh the objects
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
if (multi) {
|
|
277
|
-
const subjectList = UI.widgets.selectorPanel(
|
|
278
|
-
dom,
|
|
279
|
-
kb,
|
|
280
|
-
subject,
|
|
281
|
-
predicate,
|
|
282
|
-
false,
|
|
283
|
-
subjects,
|
|
284
|
-
options,
|
|
285
|
-
showSubject,
|
|
286
|
-
linkClicked
|
|
287
|
-
)
|
|
288
|
-
subjectList.setAttribute(
|
|
289
|
-
'style',
|
|
290
|
-
'background-color: white; width: 25em; height: 100%; padding: 0 em; overflow:scroll; float:left'
|
|
291
|
-
)
|
|
292
|
-
div.appendChild(subjectList)
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
const showObject = function (x, event, selected) {
|
|
296
|
-
if (!selected) {
|
|
297
|
-
deselectObject()
|
|
298
|
-
preview.innerHTML = '' // Clean out what is there
|
|
299
|
-
// complain("Show object "+x.uri)
|
|
300
|
-
return
|
|
301
|
-
}
|
|
302
|
-
currentObject = x
|
|
303
|
-
try {
|
|
304
|
-
/*
|
|
305
|
-
var dispalyable = function (kb, x) {
|
|
306
|
-
var cts = kb.fetcher.getHeader(x, 'content-type')
|
|
307
|
-
if (cts) {
|
|
308
|
-
var displayables = ['text/html', 'image/png', 'application/pdf']
|
|
309
|
-
for (var j = 0; j < cts.length; j++) {
|
|
310
|
-
for (var k = 0; k < displayables.length; k++) {
|
|
311
|
-
if (cts[j].indexOf(displayables[k]) >= 0) {
|
|
312
|
-
return true
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return false
|
|
318
|
-
}
|
|
319
|
-
*/
|
|
320
|
-
preview.innerHTML = 'Loading ....'
|
|
321
|
-
if (x.uri) {
|
|
322
|
-
kb.fetcher
|
|
323
|
-
.load(x.uri)
|
|
324
|
-
.then(() => {
|
|
325
|
-
const outliner = context.getOutliner(dom)
|
|
326
|
-
const display = outliner.propertyTable(x) // ,table, pane
|
|
327
|
-
preview.innerHTML = ''
|
|
328
|
-
preview.appendChild(display)
|
|
329
|
-
})
|
|
330
|
-
.catch(err => {
|
|
331
|
-
preview.textContent = 'Error loading ' + x.uri + ': ' + err
|
|
332
|
-
})
|
|
333
|
-
}
|
|
334
|
-
/*
|
|
335
|
-
if (dispalyable(kb, x) || x.uri.slice(-4) == ".pdf" || x.uri.slice(-4) == ".png" || x.uri.slice(-5) == ".html" ||
|
|
336
|
-
x.uri.slice(-5) == ".jpeg") { // @@@@@@ MAJOR KLUDGE! use metadata after HEAD
|
|
337
|
-
preview.innerHTML = '<iframe height="100%" width="100%"src="'
|
|
338
|
-
+ x.uri + '">' + x.uri + '</iframe>'
|
|
339
|
-
} else {
|
|
340
|
-
}
|
|
341
|
-
*/
|
|
342
|
-
} catch (e) {
|
|
343
|
-
preview.innerHTML =
|
|
344
|
-
'<span style="background-color: pink;">' + 'Error:' + e + '</span>' // @@ enc
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
div.setAttribute(
|
|
349
|
-
'style',
|
|
350
|
-
'background-color: white; width:40cm; height:20cm;'
|
|
351
|
-
)
|
|
352
|
-
|
|
353
|
-
const headerButtons = function (dom, labels, intial, callback) {
|
|
354
|
-
const head = dom.createElement('table')
|
|
355
|
-
let current = intial
|
|
356
|
-
head.setAttribute(
|
|
357
|
-
'style',
|
|
358
|
-
'float: left; width: 30em; padding: 0.5em; height: 1.5em; background-color: #ddd; color: #444; font-weight: bold'
|
|
359
|
-
)
|
|
360
|
-
const tr = dom.createElement('tr')
|
|
361
|
-
const style0 = 'border-radius: 0.6em; text-align: center;'
|
|
362
|
-
const style1 = style0 + 'background-color: #ccc; color: black;'
|
|
363
|
-
head.appendChild(tr)
|
|
364
|
-
const setStyles = function () {
|
|
365
|
-
for (i = 0; i < labels.length; i++) {
|
|
366
|
-
buttons[i].setAttribute('style', i === current ? style1 : style0)
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
let i, b
|
|
370
|
-
const buttons = []
|
|
371
|
-
for (i = 0; i < labels.length; i++) {
|
|
372
|
-
b = buttons[i] = dom.createElement('td')
|
|
373
|
-
b.textContent = labels[i]
|
|
374
|
-
tr.appendChild(buttons[i])
|
|
375
|
-
const listen = function (b, i) {
|
|
376
|
-
b.addEventListener('click', function (_e) {
|
|
377
|
-
current = i
|
|
378
|
-
setStyles()
|
|
379
|
-
callback(i)
|
|
380
|
-
})
|
|
381
|
-
}
|
|
382
|
-
listen(b, i)
|
|
383
|
-
}
|
|
384
|
-
setStyles()
|
|
385
|
-
return head
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
const setMode = function (mode) {
|
|
389
|
-
if (mode !== currentMode) {
|
|
390
|
-
currentMode = mode
|
|
391
|
-
deselectObject()
|
|
392
|
-
showFiltered(mode)
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
const wrapper = dom.createElement('div')
|
|
397
|
-
wrapper.setAttribute(
|
|
398
|
-
'style',
|
|
399
|
-
' width: 30em; height: 100%; padding: 0em; float:left;'
|
|
400
|
-
)
|
|
401
|
-
// wrapper.appendChild(head)
|
|
402
|
-
div.appendChild(wrapper)
|
|
403
|
-
wrapper.appendChild(
|
|
404
|
-
headerButtons(
|
|
405
|
-
dom,
|
|
406
|
-
['all', 'attached', 'not attached'],
|
|
407
|
-
currentMode,
|
|
408
|
-
setMode
|
|
409
|
-
)
|
|
410
|
-
)
|
|
411
|
-
|
|
412
|
-
const objectList = UI.widgets.selectorPanel(
|
|
413
|
-
dom,
|
|
414
|
-
kb,
|
|
415
|
-
objectType,
|
|
416
|
-
predicate,
|
|
417
|
-
true,
|
|
418
|
-
objects,
|
|
419
|
-
options,
|
|
420
|
-
showObject,
|
|
421
|
-
linkClicked
|
|
422
|
-
)
|
|
423
|
-
objectList.setAttribute(
|
|
424
|
-
'style',
|
|
425
|
-
'background-color: #ffe; width: 30em; height: 100%; padding: 0em; overflow:scroll;'
|
|
426
|
-
) // float:left
|
|
427
|
-
wrapper.appendChild(objectList)
|
|
428
|
-
|
|
429
|
-
// objectList.insertBefore(head, objectList.firstChild)
|
|
430
|
-
|
|
431
|
-
const preview = dom.createElement('div')
|
|
432
|
-
preview.setAttribute(
|
|
433
|
-
'style',
|
|
434
|
-
/* background-color: black; */ 'padding: 0em; margin: 0; height: 100%; overflow:scroll;'
|
|
435
|
-
)
|
|
436
|
-
div.appendChild(preview)
|
|
437
|
-
showFiltered(currentMode)
|
|
438
|
-
|
|
439
|
-
if (subjects.length > 0 && multi) {
|
|
440
|
-
const stores = {}
|
|
441
|
-
for (let k = 0; k < subjects.length; k++) {
|
|
442
|
-
const store = findStore(kb, subjects[k])
|
|
443
|
-
if (store) stores[store.uri] = subjects[k]
|
|
444
|
-
// if (!store) complain("No store for "+subjects[k].uri)
|
|
445
|
-
}
|
|
446
|
-
for (const storeURI in stores) {
|
|
447
|
-
// var store = findStore(kb,subjects[subjectList.length-1])
|
|
448
|
-
const store = kb.sym(storeURI)
|
|
449
|
-
const mintBox = dom.createElement('div')
|
|
450
|
-
mintBox.setAttribute(
|
|
451
|
-
'style',
|
|
452
|
-
'clear: left; width: 20em; margin-top:2em; background-color:#ccc; border-radius: 1em; padding: 1em; font-weight: bold;'
|
|
453
|
-
)
|
|
454
|
-
mintBox.textContent = '+ New ' + UI.utils.label(subject)
|
|
455
|
-
|
|
456
|
-
mintBox.textContent += ' in ' + UI.utils.label(store)
|
|
457
|
-
const storeLab = dom.createElement('span')
|
|
458
|
-
storeLab.setAttribute(
|
|
459
|
-
'style',
|
|
460
|
-
'font-weight: normal; font-size: 80%; color: #777;'
|
|
461
|
-
)
|
|
462
|
-
storeLab.textContent = storeURI
|
|
463
|
-
mintBox.appendChild(dom.createElement('br'))
|
|
464
|
-
mintBox.appendChild(storeLab)
|
|
465
|
-
/*
|
|
466
|
-
var mintButton = dom.createElement('img')
|
|
467
|
-
mintBox.appendChild(mintButton)
|
|
468
|
-
mintButton.setAttribute('src', ...); @@ Invokes master handler
|
|
469
|
-
*/
|
|
470
|
-
mintBox.addEventListener(
|
|
471
|
-
'click',
|
|
472
|
-
function (_event) {
|
|
473
|
-
const thisForm = UI.widgets.promptForNew(
|
|
474
|
-
dom,
|
|
475
|
-
kb,
|
|
476
|
-
subject,
|
|
477
|
-
predicate,
|
|
478
|
-
subject,
|
|
479
|
-
null,
|
|
480
|
-
store,
|
|
481
|
-
function (ok, _body) {
|
|
482
|
-
if (!ok) {
|
|
483
|
-
// callback(ok, body); // @@ if ok, need some form of refresh of the select for the new thing
|
|
484
|
-
} else {
|
|
485
|
-
// Refresh @@
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
)
|
|
489
|
-
try {
|
|
490
|
-
div.insertBefore(thisForm, mintBox.nextSibling) // Sigh no insertAfter
|
|
491
|
-
} catch (e) {
|
|
492
|
-
div.appendChild(thisForm)
|
|
493
|
-
}
|
|
494
|
-
// var newObject = thisForm.AJAR_subject
|
|
495
|
-
},
|
|
496
|
-
false
|
|
497
|
-
)
|
|
498
|
-
div.appendChild(mintBox)
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
// if (!me) complain("(You do not have your Web Id set. Set your Web ID to make changes.)")
|
|
503
|
-
|
|
504
|
-
return div
|
|
505
|
-
}
|
|
506
|
-
} // pane object
|
|
507
|
-
|
|
508
|
-
// ends
|
|
Binary file
|
|
Binary file
|
|
Binary file
|