solid-panes 3.7.3-18da570b → 3.7.3-322e9b27
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/Documentation/VisualLanguage.html +538 -0
- package/Documentation/conventions.md +333 -0
- package/coverage/clover.xml +152 -0
- package/coverage/coverage-final.json +6 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/outline/index.html +161 -0
- package/coverage/lcov-report/outline/outlineIcons.js.html +565 -0
- package/coverage/lcov-report/outline/propertyViews.ts.html +196 -0
- package/coverage/lcov-report/outline/viewAsImage.ts.html +121 -0
- package/coverage/lcov-report/outline/viewAsMbox.ts.html +127 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/trustedApplications/index.html +116 -0
- package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +238 -0
- package/coverage/lcov.info +204 -0
- package/dev/index.html +28 -0
- package/dev/loader.ts +91 -0
- package/dev/pane/index.ts +10 -0
- package/doc/images/panes-for-classes.epgz +0 -0
- package/doc/images/panes-for-classes.svg +609 -0
- package/eslint.config.mjs +34 -0
- package/jest.config.js +27 -0
- package/jest.setup.ts +4 -0
- package/lib/RDFXMLPane.js +59 -0
- package/lib/RDFXMLPane.js.map +1 -0
- package/{dist → lib}/argument/argumentPane.js +15 -14
- package/lib/argument/argumentPane.js.map +1 -0
- package/{dist → lib}/attach/attachPane.js +93 -83
- package/lib/attach/attachPane.js.map +1 -0
- package/{dist → lib}/audio/audioPane.js +50 -49
- package/lib/audio/audioPane.js.map +1 -0
- package/{dist → lib}/classInstancePane.js +24 -23
- package/lib/classInstancePane.js.map +1 -0
- package/lib/dashboard/basicPreferences.js +229 -0
- package/lib/dashboard/basicPreferences.js.map +1 -0
- package/{dist → lib}/dashboard/dashboardPane.js +21 -17
- package/lib/dashboard/dashboardPane.js.map +1 -0
- package/lib/dashboard/homepage.js +86 -0
- package/lib/dashboard/homepage.js.map +1 -0
- package/{dist → lib}/dataContentPane.js +63 -63
- package/lib/dataContentPane.js.map +1 -0
- package/{dist → lib}/defaultPane.js +15 -14
- package/lib/defaultPane.js.map +1 -0
- package/{dist → lib}/dokieli/dokieliPane.js +53 -49
- package/lib/dokieli/dokieliPane.js.map +1 -0
- package/lib/dokieli/new.js +9 -0
- package/lib/dokieli/new.js.map +1 -0
- package/{dist → lib}/form/pane.js +45 -44
- package/lib/form/pane.js.map +1 -0
- package/lib/home/homePane.js +91 -0
- package/lib/home/homePane.js.map +1 -0
- package/lib/humanReadablePane.js +138 -0
- package/lib/humanReadablePane.js.map +1 -0
- package/lib/imagePane.js +71 -0
- package/lib/imagePane.js.map +1 -0
- package/{dist → lib}/index.js +20 -17
- package/lib/index.js.map +1 -0
- package/{dist → lib}/internal/internalPane.js +41 -41
- package/lib/internal/internalPane.js.map +1 -0
- package/{dist → lib}/mainPage/footer.js +2 -2
- package/{dist → lib}/mainPage/footer.js.map +1 -1
- package/lib/mainPage/header.js +152 -0
- package/lib/mainPage/header.js.map +1 -0
- package/{dist → lib}/mainPage/index.d.ts.map +1 -1
- package/lib/mainPage/index.js +42 -0
- package/lib/mainPage/index.js.map +1 -0
- package/{dist → lib}/microblogPane/microblogPane.js +262 -261
- package/lib/microblogPane/microblogPane.js.map +1 -0
- package/lib/n3Pane.js +57 -0
- package/lib/n3Pane.js.map +1 -0
- package/{dist → lib}/outline/context.js +4 -4
- package/{dist → lib}/outline/context.js.map +1 -1
- package/lib/outline/manager.js +2264 -0
- package/lib/outline/manager.js.map +1 -0
- package/lib/outline/manager.test.d.ts +2 -0
- package/lib/outline/manager.test.d.ts.map +1 -0
- package/lib/outline/manager.test.js +210 -0
- package/lib/outline/manager.test.js.map +1 -0
- package/{dist → lib}/outline/outlineIcons.js +3 -2
- package/lib/outline/outlineIcons.js.map +1 -0
- package/{dist → lib}/outline/propertyViews.js +4 -4
- package/lib/outline/propertyViews.js.map +1 -0
- package/lib/outline/propertyViews.test.d.ts +2 -0
- package/lib/outline/propertyViews.test.d.ts.map +1 -0
- package/lib/outline/propertyViews.test.js +27 -0
- package/lib/outline/propertyViews.test.js.map +1 -0
- package/{dist → lib}/outline/queryByExample.js +31 -30
- package/lib/outline/queryByExample.js.map +1 -0
- package/{dist → lib}/outline/userInput.js +260 -262
- package/lib/outline/userInput.js.map +1 -0
- package/lib/outline/viewAsImage.js +17 -0
- package/lib/outline/viewAsImage.js.map +1 -0
- package/lib/outline/viewAsMbox.js +23 -0
- package/lib/outline/viewAsMbox.js.map +1 -0
- package/{dist → lib}/pad/padPane.js +96 -90
- package/lib/pad/padPane.js.map +1 -0
- package/{dist → lib}/playlist/playlistPane.js +37 -36
- package/lib/playlist/playlistPane.js.map +1 -0
- package/{dist → lib}/registerPanes.js +29 -29
- package/lib/registerPanes.js.map +1 -0
- package/lib/schedule/formsForSchedule.js +8 -0
- package/lib/schedule/formsForSchedule.js.map +1 -0
- package/{dist → lib}/schedule/schedulePane.js +178 -171
- package/lib/schedule/schedulePane.js.map +1 -0
- package/{dist → lib}/sharing/sharingPane.js +12 -12
- package/lib/sharing/sharingPane.js.map +1 -0
- package/lib/slideshow/slideshowPane.js +84 -0
- package/lib/slideshow/slideshowPane.js.map +1 -0
- package/{dist → lib}/socialPane.js +142 -141
- package/lib/socialPane.js.map +1 -0
- package/lib/tabbed/tabbedPane.js +72 -0
- package/lib/tabbed/tabbedPane.js.map +1 -0
- package/{dist → lib}/tableViewPane.js +9 -8
- package/lib/tableViewPane.js.map +1 -0
- package/lib/test-import-export/common.js +12 -0
- package/lib/test-import-export/common.js.map +1 -0
- package/lib/test-import-export/edit-importer.js +25 -0
- package/lib/test-import-export/edit-importer.js.map +1 -0
- package/lib/test-import-export/testImportExport.js +2 -0
- package/lib/test-import-export/testImportExport.js.map +1 -0
- package/{dist → lib}/transaction/pane.js +118 -117
- package/lib/transaction/pane.js.map +1 -0
- package/{dist → lib}/transaction/period.js +83 -82
- package/lib/transaction/period.js.map +1 -0
- package/{dist → lib}/trip/tripPane.js +48 -47
- package/lib/trip/tripPane.js.map +1 -0
- package/lib/trustedApplications/trustedApplications.dom.js +177 -0
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -0
- package/lib/trustedApplications/trustedApplications.test.d.ts +2 -0
- package/lib/trustedApplications/trustedApplications.test.d.ts.map +1 -0
- package/lib/trustedApplications/trustedApplications.test.js +64 -0
- package/lib/trustedApplications/trustedApplications.test.js.map +1 -0
- package/lib/trustedApplications/trustedApplications.utils.js +34 -0
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -0
- package/lib/trustedApplications/trustedApplications.view.js +87 -0
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -0
- package/lib/types.js.map +1 -0
- package/{dist → lib}/ui/pane.js +31 -30
- package/lib/ui/pane.js.map +1 -0
- package/lib/versionInfo.d.ts +32 -0
- package/lib/versionInfo.d.ts.map +1 -0
- package/lib/versionInfo.js +37 -0
- package/lib/versionInfo.js.map +1 -0
- package/lib/video/videoPane.js +44 -0
- package/lib/video/videoPane.js.map +1 -0
- package/package.json +14 -27
- package/src/RDFXMLPane.js +60 -0
- package/src/argument/argumentPane.js +65 -0
- 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 +508 -0
- 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 +197 -0
- package/src/chatPreferencesForm.ttl +12 -0
- package/src/classInstancePane.js +110 -0
- package/src/dashboard/basicPreferences.ts +201 -0
- package/src/dashboard/dashboardPane.ts +83 -0
- package/src/dashboard/homepage.ts +72 -0
- package/src/dashboard/languages/codes.html +8611 -0
- package/src/dashboard/languages/codes.xml +3563 -0
- package/src/dashboard/languages/codes2.txt +170 -0
- package/src/dashboard/languages/foo +70 -0
- package/src/dashboard/languages/foo.ttl +0 -0
- package/src/dashboard/languages/get-language-names.sh +12 -0
- package/src/dashboard/ontologyData.ttl +35 -0
- package/src/dashboard/preferencesFormText.ttl +18 -0
- package/src/dataContentPane.js +290 -0
- package/src/defaultPane.js +102 -0
- package/src/dokieli/Makefile +6 -0
- package/src/dokieli/dokieliPane.js +190 -0
- package/src/dokieli/new.html +30 -0
- package/{dist → src}/dokieli/new.js +3 -9
- 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 +217 -0
- package/src/form/psuedocode-notes.txt +57 -0
- package/src/global.d.ts +4 -0
- package/src/home/homePane.ts +72 -0
- package/src/humanReadablePane.js +150 -0
- package/src/imagePane.js +75 -0
- package/src/index.ts +71 -0
- package/src/internal/internalPane.ts +263 -0
- package/src/mainPage/footer.ts +19 -0
- package/src/mainPage/header.ts +79 -0
- package/src/mainPage/index.ts +20 -0
- package/src/meeting/Makefile +3 -0
- package/src/meeting/test/meeting1/Actions/actions.ttl +14 -0
- package/src/meeting/test/meeting1/Actions/config.ttl +16 -0
- package/src/meeting/test/meeting1/Actions/state.ttl +30 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl +34 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl.acl +20 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl +75 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +20 -0
- package/src/meeting/test/meeting1/Schedule/index.html +72 -0
- package/src/meeting/test/meeting1/Schedule/index.html.acl +20 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl +15 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl.acl +20 -0
- package/src/meeting/test/meeting1/SharedNotes/pad.ttl +23 -0
- package/src/meeting/test/meeting1/chat/chat.ttl +1 -0
- package/src/meeting/test/meeting1/details.ttl +35 -0
- package/src/meeting/test/meeting1/pad/pad.ttl +16 -0
- package/src/microblogPane/mbStyle.css +267 -0
- package/src/microblogPane/microblogPane.js +1412 -0
- package/src/n3Pane.js +56 -0
- package/src/outline/context.ts +21 -0
- package/src/outline/manager.js +2384 -0
- package/src/outline/manager.test.ts +189 -0
- package/src/outline/outlineIcons.js +160 -0
- package/src/outline/propertyViews.test.ts +36 -0
- package/src/outline/propertyViews.ts +37 -0
- package/src/outline/queryByExample.js +296 -0
- package/src/outline/userInput.js +2373 -0
- package/src/outline/viewAsImage.ts +12 -0
- package/src/outline/viewAsMbox.ts +14 -0
- package/src/pad/images/ColourOff.ai +873 -1
- package/src/pad/images/ColourOff.png +0 -0
- package/src/pad/images/ColourOn.ai +934 -2
- package/src/pad/images/ColourOn.png +0 -0
- package/src/pad/padPane.ts +559 -0
- package/src/playlist/playlistPane.js +161 -0
- package/src/registerPanes.js +147 -0
- package/src/schedule/Makefile +6 -0
- package/src/schedule/formsForSchedule.js +117 -0
- package/src/schedule/formsForSchedule.ttl +115 -0
- package/src/schedule/schedulePane.js +1201 -0
- package/src/sharing/sharingPane.ts +49 -0
- package/src/slideshow/slideshowPane.js +80 -0
- package/src/socialPane.js +523 -0
- package/src/style/tabbedtab.css +1347 -0
- package/src/tabbed/tabbedPane.ts +60 -0
- package/src/tableViewPane.js +51 -0
- package/src/test-import-export/common.js +6 -0
- package/src/test-import-export/edit-importer.js +20 -0
- 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 +629 -0
- package/src/transaction/period.js +374 -0
- 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 +176 -0
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +176 -0
- package/src/trustedApplications/trustedApplications.dom.ts +276 -0
- package/src/trustedApplications/trustedApplications.test.ts +82 -0
- package/src/trustedApplications/trustedApplications.utils.ts +51 -0
- package/src/trustedApplications/trustedApplications.view.ts +80 -0
- package/src/types.ts +34 -0
- 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 +226 -0
- package/src/versionInfo.ts +30 -0
- package/src/video/videoPane.js +44 -0
- package/timestamp.sh +13 -0
- package/travis/bumpversion.js +29 -0
- package/tsconfig.json +78 -0
- package/typings/raw-loader.d.ts +4 -0
- package/typings/solid-namespace/index.d.ts +9 -0
- package/webpack.config.js +41 -0
- package/dist/RDFXMLPane.js +0 -58
- package/dist/RDFXMLPane.js.map +0 -1
- package/dist/argument/argumentPane.js.map +0 -1
- package/dist/attach/attachPane.js.map +0 -1
- package/dist/audio/audioPane.js.map +0 -1
- package/dist/classInstancePane.js.map +0 -1
- package/dist/dashboard/basicPreferences.js +0 -147
- package/dist/dashboard/basicPreferences.js.map +0 -1
- package/dist/dashboard/dashboardPane.js.map +0 -1
- package/dist/dashboard/homepage.js +0 -54
- package/dist/dashboard/homepage.js.map +0 -1
- package/dist/dataContentPane.js.map +0 -1
- package/dist/defaultPane.js.map +0 -1
- package/dist/dokieli/dokieliPane.js.map +0 -1
- package/dist/dokieli/new.js.map +0 -1
- package/dist/form/pane.js.map +0 -1
- package/dist/home/homePane.js +0 -73
- package/dist/home/homePane.js.map +0 -1
- package/dist/humanReadablePane.js +0 -135
- package/dist/humanReadablePane.js.map +0 -1
- package/dist/imagePane.js +0 -70
- package/dist/imagePane.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/internalPane.js.map +0 -1
- package/dist/mainPage/header.js +0 -85
- package/dist/mainPage/header.js.map +0 -1
- package/dist/mainPage/index.js +0 -25
- package/dist/mainPage/index.js.map +0 -1
- package/dist/microblogPane/microblogPane.js.map +0 -1
- package/dist/n3Pane.js +0 -56
- package/dist/n3Pane.js.map +0 -1
- package/dist/outline/manager.js +0 -1997
- package/dist/outline/manager.js.map +0 -1
- package/dist/outline/outlineIcons.js.map +0 -1
- package/dist/outline/propertyViews.js.map +0 -1
- package/dist/outline/queryByExample.js.map +0 -1
- package/dist/outline/userInput.js.map +0 -1
- package/dist/outline/viewAsImage.js +0 -15
- package/dist/outline/viewAsImage.js.map +0 -1
- package/dist/outline/viewAsMbox.js +0 -22
- package/dist/outline/viewAsMbox.js.map +0 -1
- package/dist/pad/padPane.js.map +0 -1
- package/dist/playlist/playlistPane.js.map +0 -1
- package/dist/registerPanes.js.map +0 -1
- package/dist/schedule/schedulePane.js.map +0 -1
- package/dist/sharing/sharingPane.js.map +0 -1
- package/dist/slideshow/slideshowPane.js +0 -80
- package/dist/slideshow/slideshowPane.js.map +0 -1
- package/dist/socialPane.js.map +0 -1
- package/dist/tabbed/tabbedPane.js +0 -58
- package/dist/tabbed/tabbedPane.js.map +0 -1
- package/dist/tableViewPane.js.map +0 -1
- package/dist/transaction/pane.js.map +0 -1
- package/dist/transaction/period.js.map +0 -1
- package/dist/trip/tripPane.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.dom.js +0 -146
- package/dist/trustedApplications/trustedApplications.dom.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.utils.js +0 -24
- package/dist/trustedApplications/trustedApplications.utils.js.map +0 -1
- package/dist/trustedApplications/trustedApplications.view.js +0 -56
- package/dist/trustedApplications/trustedApplications.view.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/ui/pane.js.map +0 -1
- package/dist/versionInfo.js +0 -37
- package/dist/versionInfo.js.map +0 -1
- package/dist/video/videoPane.js +0 -43
- package/dist/video/videoPane.js.map +0 -1
- /package/{dist → lib}/dashboard/basicPreferences.d.ts +0 -0
- /package/{dist → lib}/dashboard/basicPreferences.d.ts.map +0 -0
- /package/{dist → lib}/dashboard/dashboardPane.d.ts +0 -0
- /package/{dist → lib}/dashboard/dashboardPane.d.ts.map +0 -0
- /package/{dist → lib}/dashboard/homepage.d.ts +0 -0
- /package/{dist → lib}/dashboard/homepage.d.ts.map +0 -0
- /package/{dist → lib}/global.d.js +0 -0
- /package/{dist → lib}/global.d.js.map +0 -0
- /package/{dist → lib}/home/homePane.d.ts +0 -0
- /package/{dist → lib}/home/homePane.d.ts.map +0 -0
- /package/{dist → lib}/index.d.ts +0 -0
- /package/{dist → lib}/index.d.ts.map +0 -0
- /package/{dist → lib}/internal/internalPane.d.ts +0 -0
- /package/{dist → lib}/internal/internalPane.d.ts.map +0 -0
- /package/{dist → lib}/mainPage/footer.d.ts +0 -0
- /package/{dist → lib}/mainPage/footer.d.ts.map +0 -0
- /package/{dist → lib}/mainPage/header.d.ts +0 -0
- /package/{dist → lib}/mainPage/header.d.ts.map +0 -0
- /package/{dist → lib}/mainPage/index.d.ts +0 -0
- /package/{dist → lib}/outline/context.d.ts +0 -0
- /package/{dist → lib}/outline/context.d.ts.map +0 -0
- /package/{dist → lib}/outline/propertyViews.d.ts +0 -0
- /package/{dist → lib}/outline/propertyViews.d.ts.map +0 -0
- /package/{dist → lib}/outline/viewAsImage.d.ts +0 -0
- /package/{dist → lib}/outline/viewAsImage.d.ts.map +0 -0
- /package/{dist → lib}/outline/viewAsMbox.d.ts +0 -0
- /package/{dist → lib}/outline/viewAsMbox.d.ts.map +0 -0
- /package/{dist → lib}/pad/padPane.d.ts +0 -0
- /package/{dist → lib}/pad/padPane.d.ts.map +0 -0
- /package/{dist → lib}/sharing/sharingPane.d.ts +0 -0
- /package/{dist → lib}/sharing/sharingPane.d.ts.map +0 -0
- /package/{dist → lib}/tabbed/tabbedPane.d.ts +0 -0
- /package/{dist → lib}/tabbed/tabbedPane.d.ts.map +0 -0
- /package/{dist → lib}/trustedApplications/trustedApplications.dom.d.ts +0 -0
- /package/{dist → lib}/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
- /package/{dist → lib}/trustedApplications/trustedApplications.utils.d.ts +0 -0
- /package/{dist → lib}/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
- /package/{dist → lib}/trustedApplications/trustedApplications.view.d.ts +0 -0
- /package/{dist → lib}/trustedApplications/trustedApplications.view.d.ts.map +0 -0
- /package/{dist → lib}/types.d.ts +0 -0
- /package/{dist → lib}/types.d.ts.map +0 -0
- /package/{dist → lib}/types.js +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/* eslint-env jest */
|
|
2
|
+
|
|
3
|
+
import { TextEncoder, TextDecoder } from 'util'
|
|
4
|
+
global.TextEncoder = TextEncoder as any
|
|
5
|
+
global.TextDecoder = TextDecoder as any
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import OutlineManager from './manager'
|
|
9
|
+
|
|
10
|
+
import { lit, NamedNode, sym, blankNode } from 'rdflib'
|
|
11
|
+
import { findByText, getByText } from '@testing-library/dom'
|
|
12
|
+
|
|
13
|
+
const MockPane = {
|
|
14
|
+
render: (subject: NamedNode) => {
|
|
15
|
+
const div = document.createElement('div')
|
|
16
|
+
div.appendChild(document.createTextNode(`Mock Pane for ${subject.uri}`))
|
|
17
|
+
return div
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const mockPaneRegistry = {
|
|
22
|
+
list: [],
|
|
23
|
+
byName: () => MockPane
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
describe('manager', () => {
|
|
27
|
+
describe('outline object td', () => {
|
|
28
|
+
describe('for a named node', () => {
|
|
29
|
+
let result
|
|
30
|
+
beforeAll(() => {
|
|
31
|
+
const table = document.createElement('table')
|
|
32
|
+
const row = document.createElement('tr')
|
|
33
|
+
table.appendChild(row)
|
|
34
|
+
const manager = new OutlineManager({ dom: document, session: { paneRegistry: mockPaneRegistry } })
|
|
35
|
+
result = manager.outlineObjectTD(sym('https://namednode.example/'), null, null, null)
|
|
36
|
+
row.appendChild(result)
|
|
37
|
+
})
|
|
38
|
+
it('is a html td element', () => {
|
|
39
|
+
expect(result.nodeName).toBe('TD')
|
|
40
|
+
})
|
|
41
|
+
it('about attribute refers to node', () => {
|
|
42
|
+
expect(result).toHaveAttribute('about', '<https://namednode.example/>')
|
|
43
|
+
})
|
|
44
|
+
it('has class obj', () => {
|
|
45
|
+
expect(result).toHaveClass('obj')
|
|
46
|
+
})
|
|
47
|
+
it('is selectable', () => {
|
|
48
|
+
expect(result).toHaveAttribute('notselectable', 'false')
|
|
49
|
+
})
|
|
50
|
+
it('has style', () => {
|
|
51
|
+
expect(result).toHaveStyle('margin: 0.2em; border: none; padding: 0; vertical-align: top;')
|
|
52
|
+
})
|
|
53
|
+
it('shows an expand icon', () => {
|
|
54
|
+
const img = result.firstChild
|
|
55
|
+
expect(img.nodeName).toBe('IMG')
|
|
56
|
+
expect(img).toHaveAttribute('src', 'https://solidos.github.io/solid-ui/src/originalIcons/tbl-expand-trans.png')
|
|
57
|
+
})
|
|
58
|
+
it('shows the node label', () => {
|
|
59
|
+
expect(result).toHaveTextContent('namednode.example')
|
|
60
|
+
})
|
|
61
|
+
it('label is draggable', () => {
|
|
62
|
+
const label = getByText(result, 'namednode.example')
|
|
63
|
+
expect(label).toHaveAttribute('draggable', 'true')
|
|
64
|
+
})
|
|
65
|
+
describe('link icon', () => {
|
|
66
|
+
let linkIcon
|
|
67
|
+
beforeEach(() => {
|
|
68
|
+
const label = getByText(result, 'namednode.example')
|
|
69
|
+
linkIcon = label.lastChild
|
|
70
|
+
})
|
|
71
|
+
it('is linked to named node URI', () => {
|
|
72
|
+
expect(linkIcon.nodeName).toBe('A')
|
|
73
|
+
expect(linkIcon).toHaveAttribute('href', 'https://namednode.example/')
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
describe('expanding', () => {
|
|
77
|
+
it('renders relevant pane', async () => {
|
|
78
|
+
const expand = result.firstChild
|
|
79
|
+
expand.click()
|
|
80
|
+
const error = await findByText(result.parentNode, /Mock Pane/)
|
|
81
|
+
expect(error).toHaveTextContent('Mock Pane for https://namednode.example/')
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
describe('for a tel uri', () => {
|
|
87
|
+
let result
|
|
88
|
+
beforeAll(() => {
|
|
89
|
+
const manager = new OutlineManager({ dom: document })
|
|
90
|
+
result = manager.outlineObjectTD(sym('tel:+1-201-555-0123'), null, null, null)
|
|
91
|
+
})
|
|
92
|
+
it('is a html td element', () => {
|
|
93
|
+
expect(result.nodeName).toBe('TD')
|
|
94
|
+
})
|
|
95
|
+
it('about attribute refers to tel uri', () => {
|
|
96
|
+
expect(result).toHaveAttribute('about', '<tel:+1-201-555-0123>')
|
|
97
|
+
})
|
|
98
|
+
it('has class obj', () => {
|
|
99
|
+
expect(result).toHaveClass('obj')
|
|
100
|
+
})
|
|
101
|
+
it('is selectable', () => {
|
|
102
|
+
expect(result).toHaveAttribute('notselectable', 'false')
|
|
103
|
+
})
|
|
104
|
+
it('has style', () => {
|
|
105
|
+
expect(result).toHaveStyle('margin: 0.2em; border: none; padding: 0; vertical-align: top;')
|
|
106
|
+
})
|
|
107
|
+
it('shows an expand icon', () => {
|
|
108
|
+
const img = result.firstChild
|
|
109
|
+
expect(img.nodeName).toBe('IMG')
|
|
110
|
+
expect(img).toHaveAttribute('src', 'https://solidos.github.io/solid-ui/src/originalIcons/tbl-expand-trans.png')
|
|
111
|
+
})
|
|
112
|
+
it('shows the phone number', () => {
|
|
113
|
+
expect(result).toHaveTextContent('+1-201-555-0123')
|
|
114
|
+
})
|
|
115
|
+
describe('phone link', () => {
|
|
116
|
+
let phoneLink
|
|
117
|
+
beforeAll(() => {
|
|
118
|
+
const label = getByText(result, '+1-201-555-0123')
|
|
119
|
+
phoneLink = label.lastChild
|
|
120
|
+
})
|
|
121
|
+
it('is linked to tel uri', () => {
|
|
122
|
+
expect(phoneLink.nodeName).toBe('A')
|
|
123
|
+
expect(phoneLink).toHaveAttribute('href', 'tel:+1-201-555-0123')
|
|
124
|
+
})
|
|
125
|
+
it('is represented by phone icon', () => {
|
|
126
|
+
const phoneIcon = phoneLink.lastChild
|
|
127
|
+
expect(phoneIcon.nodeName).toBe('IMG')
|
|
128
|
+
expect(phoneIcon).toHaveAttribute('src', 'https://solidos.github.io/solid-ui/src/originalIcons/silk/telephone.png')
|
|
129
|
+
})
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
describe('for a literal', () => {
|
|
134
|
+
let result
|
|
135
|
+
beforeAll(() => {
|
|
136
|
+
const manager = new OutlineManager({ dom: document })
|
|
137
|
+
result = manager.outlineObjectTD(lit('some text'), null, null, null)
|
|
138
|
+
})
|
|
139
|
+
it('is a html td element', () => {
|
|
140
|
+
expect(result.nodeName).toBe('TD')
|
|
141
|
+
})
|
|
142
|
+
it('has no about attribute', () => {
|
|
143
|
+
expect(result).not.toHaveAttribute('about')
|
|
144
|
+
})
|
|
145
|
+
it('has class obj', () => {
|
|
146
|
+
expect(result).toHaveClass('obj')
|
|
147
|
+
})
|
|
148
|
+
it('is selectable', () => {
|
|
149
|
+
expect(result).toHaveAttribute('notselectable', 'false')
|
|
150
|
+
})
|
|
151
|
+
it('has style', () => {
|
|
152
|
+
expect(result).toHaveStyle('margin: 0.2em; border: none; padding: 0; vertical-align: top;')
|
|
153
|
+
})
|
|
154
|
+
it('shows the literal text', () => {
|
|
155
|
+
expect(result).toHaveTextContent('some text')
|
|
156
|
+
})
|
|
157
|
+
it('literal text preserves white space', () => {
|
|
158
|
+
const text = getByText(result, 'some text')
|
|
159
|
+
expect(text).toHaveStyle('white-space: pre-wrap;')
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
describe('for a blank node', () => {
|
|
164
|
+
let result
|
|
165
|
+
beforeAll(() => {
|
|
166
|
+
const manager = new OutlineManager({ dom: document })
|
|
167
|
+
result = manager.outlineObjectTD(blankNode('blank-node'), null, null, null)
|
|
168
|
+
})
|
|
169
|
+
it('is a html td element', () => {
|
|
170
|
+
expect(result.nodeName).toBe('TD')
|
|
171
|
+
})
|
|
172
|
+
it('has about attribute', () => {
|
|
173
|
+
expect(result).toHaveAttribute('about', '_:blank-node')
|
|
174
|
+
})
|
|
175
|
+
it('has class obj', () => {
|
|
176
|
+
expect(result).toHaveClass('obj')
|
|
177
|
+
})
|
|
178
|
+
it('is selectable', () => {
|
|
179
|
+
expect(result).toHaveAttribute('notselectable', 'false')
|
|
180
|
+
})
|
|
181
|
+
it('has style', () => {
|
|
182
|
+
expect(result).toHaveStyle('margin: 0.2em; border: none; padding: 0; vertical-align: top;')
|
|
183
|
+
})
|
|
184
|
+
it('shows 3 dots', () => {
|
|
185
|
+
expect(result).toHaveTextContent('...')
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
})
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// This is a system of tracking tooltip phrases used by the tabulator outliner
|
|
2
|
+
|
|
3
|
+
import * as UI from 'solid-ui'
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const outlineIcons = {}
|
|
7
|
+
|
|
8
|
+
outlineIcons.src = [] // collect the URIs of the icon filterColumns
|
|
9
|
+
outlineIcons.tooltips = [] // look up tool tips from URL
|
|
10
|
+
|
|
11
|
+
/// /////////////////////// Common icons
|
|
12
|
+
|
|
13
|
+
outlineIcons.src.icon_expand =
|
|
14
|
+
UI.icons.originalIconBase + 'tbl-expand-trans.png'
|
|
15
|
+
outlineIcons.src.icon_more = UI.icons.originalIconBase + 'tbl-more-trans.png' // looks just like expand, diff semantics
|
|
16
|
+
// Icon.src.icon_expand = UI.icons.originalIconBase + 'clean/Icon.src.Icon.src.icon_expand.png';
|
|
17
|
+
outlineIcons.src.icon_collapse = UI.icons.originalIconBase + 'tbl-collapse.png'
|
|
18
|
+
outlineIcons.src.icon_internals =
|
|
19
|
+
UI.icons.originalIconBase + 'tango/22-emblem-system.png'
|
|
20
|
+
outlineIcons.src.icon_instances =
|
|
21
|
+
UI.icons.originalIconBase + 'tango/22-folder-open.png'
|
|
22
|
+
outlineIcons.src.icon_foaf = UI.icons.originalIconBase + 'foaf/foafTiny.gif'
|
|
23
|
+
outlineIcons.src.icon_social = UI.icons.originalIconBase + 'social/social.gif'
|
|
24
|
+
outlineIcons.src.icon_mb = UI.icons.originalIconBase + 'microblog/microblog.png'
|
|
25
|
+
outlineIcons.src.icon_shrink = UI.icons.originalIconBase + 'tbl-shrink.png' // shrink list back up
|
|
26
|
+
outlineIcons.src.icon_rows = UI.icons.originalIconBase + 'tbl-rows.png'
|
|
27
|
+
// Icon.src.Icon.src.icon_columns = 'icons/tbl-columns.png';
|
|
28
|
+
|
|
29
|
+
// Status balls:
|
|
30
|
+
|
|
31
|
+
outlineIcons.src.icon_unrequested = UI.icons.originalIconBase + '16dot-blue.gif'
|
|
32
|
+
// outlineIcons.src.Icon.src.icon_parse = UI.icons.originalIconBase + '18x18-white.gif';
|
|
33
|
+
outlineIcons.src.icon_fetched = UI.icons.originalIconBase + '16dot-green.gif'
|
|
34
|
+
outlineIcons.src.icon_failed = UI.icons.originalIconBase + '16dot-red.gif'
|
|
35
|
+
outlineIcons.src.icon_requested = UI.icons.originalIconBase + '16dot-yellow.gif'
|
|
36
|
+
// Icon.src.icon_maximize = UI.icons.originalIconBase + 'clean/Icon.src.Icon.src.icon_con_max.png';
|
|
37
|
+
|
|
38
|
+
// Panes:
|
|
39
|
+
outlineIcons.src.icon_CVPane = UI.icons.originalIconBase + 'CV.png'
|
|
40
|
+
outlineIcons.src.icon_defaultPane = UI.icons.originalIconBase + 'about.png'
|
|
41
|
+
outlineIcons.src.icon_visit =
|
|
42
|
+
UI.icons.originalIconBase + 'tango/22-text-x-generic.png'
|
|
43
|
+
outlineIcons.src.icon_dataContents =
|
|
44
|
+
UI.icons.originalIconBase + 'rdf_flyer.24.gif' // @@ Bad .. find better
|
|
45
|
+
outlineIcons.src.icon_n3Pane = UI.icons.originalIconBase + 'w3c/n3_smaller.png' // @@ Bad .. find better
|
|
46
|
+
outlineIcons.src.icon_RDFXMLPane =
|
|
47
|
+
UI.icons.originalIconBase + '22-text-xml4.png' // @@ Bad .. find better
|
|
48
|
+
outlineIcons.src.icon_imageContents =
|
|
49
|
+
UI.icons.originalIconBase + 'tango/22-image-x-generic.png'
|
|
50
|
+
outlineIcons.src.icon_airPane = UI.icons.originalIconBase + '1pt5a.gif'
|
|
51
|
+
outlineIcons.src.icon_LawPane = UI.icons.originalIconBase + 'law.jpg'
|
|
52
|
+
outlineIcons.src.icon_pushbackPane = UI.icons.originalIconBase + 'pb-logo.png'
|
|
53
|
+
|
|
54
|
+
// For photo albums (By albert08@csail.mit.edu)
|
|
55
|
+
outlineIcons.src.icon_photoPane = UI.icons.originalIconBase + 'photo_small.png'
|
|
56
|
+
outlineIcons.src.icon_tagPane = UI.icons.originalIconBase + 'tag_small.png'
|
|
57
|
+
outlineIcons.src.icon_TinyTag = UI.icons.originalIconBase + 'tag_tiny.png'
|
|
58
|
+
outlineIcons.src.icon_photoBegin = UI.icons.originalIconBase + 'photo_begin.png'
|
|
59
|
+
outlineIcons.src.icon_photoNext = UI.icons.originalIconBase + 'photo_next.png'
|
|
60
|
+
outlineIcons.src.icon_photoBack = UI.icons.originalIconBase + 'photo_back.png'
|
|
61
|
+
outlineIcons.src.icon_photoEnd = UI.icons.originalIconBase + 'photo_end.png'
|
|
62
|
+
outlineIcons.src.icon_photoImportPane =
|
|
63
|
+
UI.icons.originalIconBase + 'flickr_small.png'
|
|
64
|
+
// Icon.src.icon_CloseButton = UI.icons.originalIconBase + 'close_tiny.png';
|
|
65
|
+
// Icon.src.icon_AddButton = UI.icons.originalIconBase + 'addphoto_tiny.png';
|
|
66
|
+
|
|
67
|
+
// For that one we need a document with grid lines. Make data-x-generix maybe
|
|
68
|
+
|
|
69
|
+
// actions for sources;
|
|
70
|
+
outlineIcons.src.icon_retract = UI.icons.originalIconBase + 'retract.gif'
|
|
71
|
+
outlineIcons.src.icon_refresh = UI.icons.originalIconBase + 'refresh.gif'
|
|
72
|
+
outlineIcons.src.icon_optoff = UI.icons.originalIconBase + 'optional_off.PNG'
|
|
73
|
+
outlineIcons.src.icon_opton = UI.icons.originalIconBase + 'optional_on.PNG'
|
|
74
|
+
outlineIcons.src.icon_map = UI.icons.originalIconBase + 'compassrose.png'
|
|
75
|
+
outlineIcons.src.icon_retracted = outlineIcons.src.icon_unrequested
|
|
76
|
+
outlineIcons.src.icon_retracted = outlineIcons.src.icon_unrequested
|
|
77
|
+
|
|
78
|
+
outlineIcons.src.icon_time = UI.icons.originalIconBase + 'icons/Wclocksmall.png'
|
|
79
|
+
|
|
80
|
+
// Within outline mode:
|
|
81
|
+
|
|
82
|
+
outlineIcons.src.icon_telephone =
|
|
83
|
+
UI.icons.originalIconBase + 'silk/telephone.png'
|
|
84
|
+
outlineIcons.src.icon_time = UI.icons.originalIconBase + 'Wclocksmall.png'
|
|
85
|
+
outlineIcons.src.icon_remove_node =
|
|
86
|
+
UI.icons.originalIconBase + 'tbl-x-small.png'
|
|
87
|
+
outlineIcons.src.icon_add_triple =
|
|
88
|
+
UI.icons.originalIconBase + 'tango/22-list-add.png'
|
|
89
|
+
outlineIcons.src.icon_add_new_triple =
|
|
90
|
+
UI.icons.originalIconBase + 'tango/22-list-add-new.png'
|
|
91
|
+
outlineIcons.src.icon_show_choices =
|
|
92
|
+
UI.icons.originalIconBase + 'userinput_show_choices_temp.png' // looks just like collapse, diff smmantics
|
|
93
|
+
|
|
94
|
+
// Inline Justification
|
|
95
|
+
outlineIcons.src.icon_display_reasons =
|
|
96
|
+
UI.icons.originalIconBase + 'tango/22-help-browser.png'
|
|
97
|
+
outlineIcons.tooltips[outlineIcons.src.icon_display_reasons] =
|
|
98
|
+
'Display explanations'
|
|
99
|
+
|
|
100
|
+
// Other tooltips
|
|
101
|
+
outlineIcons.tooltips[outlineIcons.src.icon_add_triple] = 'Add more'
|
|
102
|
+
outlineIcons.tooltips[outlineIcons.src.icon_add_new_triple] = 'Add one'
|
|
103
|
+
outlineIcons.tooltips[outlineIcons.src.icon_remove_node] = 'Remove'
|
|
104
|
+
outlineIcons.tooltips[outlineIcons.src.icon_expand] = 'View details.'
|
|
105
|
+
outlineIcons.tooltips[outlineIcons.src.icon_collapse] = 'Hide details.'
|
|
106
|
+
outlineIcons.tooltips[outlineIcons.src.icon_shrink] = 'Shrink list.'
|
|
107
|
+
outlineIcons.tooltips[outlineIcons.src.icon_internals] = 'Under the hood'
|
|
108
|
+
outlineIcons.tooltips[outlineIcons.src.icon_instances] = 'List'
|
|
109
|
+
outlineIcons.tooltips[outlineIcons.src.icon_foaf] = 'Friends'
|
|
110
|
+
outlineIcons.tooltips[outlineIcons.src.icon_rows] =
|
|
111
|
+
'Make a table of data like this'
|
|
112
|
+
// Note the string '[Tt]his resource' can be replaced with an actual URI by the code
|
|
113
|
+
outlineIcons.tooltips[outlineIcons.src.icon_unrequested] = 'Fetch this.'
|
|
114
|
+
outlineIcons.tooltips[outlineIcons.src.icon_fetched] = 'Fetched successfully.'
|
|
115
|
+
outlineIcons.tooltips[outlineIcons.src.icon_failed] =
|
|
116
|
+
'Failed to load. Click to retry.'
|
|
117
|
+
outlineIcons.tooltips[outlineIcons.src.icon_requested] =
|
|
118
|
+
'This is being fetched. Please wait...'
|
|
119
|
+
|
|
120
|
+
outlineIcons.tooltips[outlineIcons.src.icon_visit] = 'View document'
|
|
121
|
+
outlineIcons.tooltips[outlineIcons.src.icon_retract] =
|
|
122
|
+
'Remove this source and all its data from tabulator.'
|
|
123
|
+
outlineIcons.tooltips[outlineIcons.src.icon_refresh] =
|
|
124
|
+
'Refresh this source and reload its triples.'
|
|
125
|
+
|
|
126
|
+
/// ////////////////////////////// End comon area
|
|
127
|
+
|
|
128
|
+
outlineIcons.OutlinerIcon = function (src, width, alt, tooltip, filter) {
|
|
129
|
+
this.src = src
|
|
130
|
+
this.alt = alt
|
|
131
|
+
this.width = width
|
|
132
|
+
this.tooltip = tooltip
|
|
133
|
+
this.filter = filter
|
|
134
|
+
// filter: RDFStatement,('subj'|'pred'|'obj')->boolean, inverse->boolean (whether the statement is an inverse).
|
|
135
|
+
// Filter on whether to show this icon for a term; optional property.
|
|
136
|
+
// If filter is not passed, this icon will never AUTOMATICALLY be shown.
|
|
137
|
+
// You can show it with termWidget.addIcon
|
|
138
|
+
return this
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
outlineIcons.termWidgets = {}
|
|
142
|
+
outlineIcons.termWidgets.optOn = new outlineIcons.OutlinerIcon(
|
|
143
|
+
outlineIcons.src.icon_opton,
|
|
144
|
+
20,
|
|
145
|
+
'opt on',
|
|
146
|
+
'Make this branch of your query mandatory.'
|
|
147
|
+
)
|
|
148
|
+
outlineIcons.termWidgets.optOff = new outlineIcons.OutlinerIcon(
|
|
149
|
+
outlineIcons.src.icon_optoff,
|
|
150
|
+
20,
|
|
151
|
+
'opt off',
|
|
152
|
+
'Make this branch of your query optional.'
|
|
153
|
+
)
|
|
154
|
+
outlineIcons.termWidgets.addTri = new outlineIcons.OutlinerIcon(
|
|
155
|
+
outlineIcons.src.icon_add_triple,
|
|
156
|
+
18,
|
|
157
|
+
'add tri',
|
|
158
|
+
'Add one'
|
|
159
|
+
)
|
|
160
|
+
// Ideally: "New "+label(subject)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-env jest */
|
|
2
|
+
|
|
3
|
+
import { TextEncoder, TextDecoder } from 'util'
|
|
4
|
+
global.TextEncoder = TextEncoder as any
|
|
5
|
+
global.TextDecoder = TextDecoder as any
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import { sym } from 'rdflib'
|
|
9
|
+
import { propertyViews } from './propertyViews'
|
|
10
|
+
|
|
11
|
+
describe('property views', () => {
|
|
12
|
+
it.each([
|
|
13
|
+
'http://xmlns.com/foaf/0.1/depiction',
|
|
14
|
+
'http://xmlns.com/foaf/0.1/img',
|
|
15
|
+
'http://xmlns.com/foaf/0.1/thumbnail',
|
|
16
|
+
'http://xmlns.com/foaf/0.1/logo',
|
|
17
|
+
'http://schema.org/image'
|
|
18
|
+
])('renders %s as image', (property) => {
|
|
19
|
+
const views = propertyViews(document)
|
|
20
|
+
const view = views.defaults[property]
|
|
21
|
+
const result = view(sym('https://pod.example/img.jpg'))
|
|
22
|
+
expect(result).toBeInstanceOf(HTMLImageElement)
|
|
23
|
+
expect(result).toHaveAttribute('src', 'https://pod.example/img.jpg')
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it.each([
|
|
27
|
+
'http://xmlns.com/foaf/0.1/mbox'
|
|
28
|
+
])('renders %s as anchor', (property) => {
|
|
29
|
+
const views = propertyViews(document)
|
|
30
|
+
const view = views.defaults[property]
|
|
31
|
+
const result = view(sym('mailto:alice@mail.example'))
|
|
32
|
+
expect(result).toBeInstanceOf(HTMLAnchorElement)
|
|
33
|
+
expect(result).toHaveAttribute('href', 'mailto:alice@mail.example');
|
|
34
|
+
expect(result).toHaveTextContent('alice@mail.example');
|
|
35
|
+
})
|
|
36
|
+
})
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ns } from 'solid-ui'
|
|
2
|
+
import viewAsImage from './viewAsImage'
|
|
3
|
+
import viewAsMbox from './viewAsMbox'
|
|
4
|
+
|
|
5
|
+
/** some builtin simple views **/
|
|
6
|
+
|
|
7
|
+
export function propertyViews (dom) {
|
|
8
|
+
// view that applies to items that are objects of certain properties.
|
|
9
|
+
const views = {
|
|
10
|
+
properties: [],
|
|
11
|
+
defaults: [],
|
|
12
|
+
classes: []
|
|
13
|
+
} // views
|
|
14
|
+
|
|
15
|
+
const asImage = viewAsImage(dom)
|
|
16
|
+
const asMbox = viewAsMbox(dom)
|
|
17
|
+
|
|
18
|
+
viewsAddPropertyView(views, ns.foaf('depiction').uri, asImage, true)
|
|
19
|
+
viewsAddPropertyView(views, ns.foaf('img').uri, asImage, true)
|
|
20
|
+
viewsAddPropertyView(views, ns.foaf('thumbnail').uri, asImage, true)
|
|
21
|
+
viewsAddPropertyView(views, ns.foaf('logo').uri, asImage, true)
|
|
22
|
+
viewsAddPropertyView(views, ns.schema('image').uri, asImage, true)
|
|
23
|
+
viewsAddPropertyView(views, ns.foaf('mbox').uri, asMbox, true)
|
|
24
|
+
return views
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** add a property view function **/
|
|
28
|
+
export function viewsAddPropertyView (views, property, pviewfunc, isDefault) {
|
|
29
|
+
if (!views.properties[property]) {
|
|
30
|
+
views.properties[property] = []
|
|
31
|
+
}
|
|
32
|
+
views.properties[property].push(pviewfunc)
|
|
33
|
+
if (isDefault) {
|
|
34
|
+
// will override an existing default!
|
|
35
|
+
views.defaults[property] = pviewfunc
|
|
36
|
+
}
|
|
37
|
+
} // viewsAddPropertyView
|