solid-panes 3.7.3 → 4.0.0-60467249
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 +59 -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 +64 -63
- package/dist/dataContentPane.js.map +1 -0
- package/{lib → dist}/defaultPane.js +15 -16
- 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 +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 +86 -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 +270 -270
- package/dist/microblogPane/microblogPane.js.map +1 -0
- package/dist/n3Pane.js +57 -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 +33 -33
- package/dist/outline/queryByExample.js.map +1 -0
- package/{lib → dist}/outline/userInput.js +268 -266
- 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 +142 -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 +46 -40
- 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}/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabbedPane.js","names":["_solidUi","require","TabbedPane","icon","icons","iconBase","name","audience","ns","solid","label","subject","context","kb","session","store","typeURIs","findTypeURIs","meeting","uri","render","dom","div","createElement","fetcher","Error","load","appendChild","tabs","tabWidget","predicate","any","ordered","orientation","anyValue","renderMain","containerDiv","item","innerHTML","table","getOutliner","GotoSubject","undefined","renderTab","the","widgets","personTR","backgroundColor","ui","_default","exports","default"],"sources":["../../src/tabbed/tabbedPane.ts"],"sourcesContent":["/* Tabbed view of anything\n **\n ** data-driven\n **\n */\nimport { Store } from 'rdflib'\nimport { PaneDefinition } from 'pane-registry'\nimport { icons, ns, tabs, widgets } from 'solid-ui'\n\nconst TabbedPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_688606.svg',\n\n name: 'tabbed',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: (subject, context) => {\n const kb = context.session.store as Store\n const typeURIs = kb.findTypeURIs(subject)\n if (ns.meeting('Cluster').uri in typeURIs) {\n return 'Tabbed'\n }\n return null\n },\n\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n const div = dom.createElement('div')\n\n ;(async () => {\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n await store.fetcher.load(subject)\n\n div.appendChild(tabs.tabWidget({\n dom,\n subject,\n predicate: store.any(subject, ns.meeting('predicate')) || ns.meeting('toolList'),\n ordered: true,\n orientation: ((store as Store).anyValue(subject, ns.meeting('orientation')) || '0') as ('0' | '1' | '2' | '3'),\n renderMain: (containerDiv, item) => {\n containerDiv.innerHTML = ''\n const table = containerDiv.appendChild(context.dom.createElement('table'))\n ;(context.getOutliner(context.dom) as any).GotoSubject(item, true, null, false, undefined, table)\n },\n renderTab: (containerDiv, item) => {\n const predicate = store.the(subject, ns.meeting('predicate'))\n containerDiv.appendChild(widgets.personTR(context.dom, predicate, item, {}))\n },\n backgroundColor: store.anyValue(subject, ns.ui('backgroundColor')) || '#ddddcc'\n }))\n })()\n return div\n }\n}\n\nexport default TabbedPane\n"],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAKA,MAAMC,UAA0B,GAAG;EACjCC,IAAI,EAAEC,cAAK,CAACC,QAAQ,GAAG,iBAAiB;EAExCC,IAAI,EAAE,QAAQ;EAEdC,QAAQ,EAAE,CAACC,WAAE,CAACC,KAAK,CAAC,WAAW,CAAC,CAAC;EAEjC;EACAC,KAAK,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;IAC3B,MAAMC,EAAE,GAAGD,OAAO,CAACE,OAAO,CAACC,KAAc;IACzC,MAAMC,QAAQ,GAAGH,EAAE,CAACI,YAAY,CAACN,OAAO,CAAC;IACzC,IAAIH,WAAE,CAACU,OAAO,CAAC,SAAS,CAAC,CAACC,GAAG,IAAIH,QAAQ,EAAE;MACzC,OAAO,QAAQ;IACjB;IACA,OAAO,IAAI;EACb,CAAC;EAEDI,MAAM,EAAEA,CAACT,OAAO,EAAEC,OAAO,KAAK;IAC5B,MAAMS,GAAG,GAAGT,OAAO,CAACS,GAAG;IACvB,MAAMN,KAAK,GAAGH,OAAO,CAACE,OAAO,CAACC,KAAc;IAC5C,MAAMO,GAAG,GAAGD,GAAG,CAACE,aAAa,CAAC,KAAK,CAAC;IAEnC,CAAC,YAAY;MACZ,IAAI,CAACR,KAAK,CAACS,OAAO,EAAE;QAClB,MAAM,IAAIC,KAAK,CAAC,sBAAsB,CAAC;MACzC;MACA,MAAMV,KAAK,CAACS,OAAO,CAACE,IAAI,CAACf,OAAO,CAAC;MAEjCW,GAAG,CAACK,WAAW,CAACC,aAAI,CAACC,SAAS,CAAC;QAC7BR,GAAG;QACHV,OAAO;QACPmB,SAAS,EAAEf,KAAK,CAACgB,GAAG,CAACpB,OAAO,EAAEH,WAAE,CAACU,OAAO,CAAC,WAAW,CAAC,CAAC,IAAIV,WAAE,CAACU,OAAO,CAAC,UAAU,CAAC;QAChFc,OAAO,EAAE,IAAI;QACbC,WAAW,EAAIlB,KAAK,CAAWmB,QAAQ,CAACvB,OAAO,EAAEH,WAAE,CAACU,OAAO,CAAC,aAAa,CAAC,CAAC,IAAI,GAA+B;QAC9GiB,UAAU,EAAEA,CAACC,YAAY,EAAEC,IAAI,KAAK;UAClCD,YAAY,CAACE,SAAS,GAAG,EAAE;UAC3B,MAAMC,KAAK,GAAGH,YAAY,CAACT,WAAW,CAACf,OAAO,CAACS,GAAG,CAACE,aAAa,CAAC,OAAO,CAAC,CAAC;UACxEX,OAAO,CAAC4B,WAAW,CAAC5B,OAAO,CAACS,GAAG,CAAC,CAASoB,WAAW,CAACJ,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAEK,SAAS,EAAEH,KAAK,CAAC;QACnG,CAAC;QACDI,SAAS,EAAEA,CAACP,YAAY,EAAEC,IAAI,KAAK;UACjC,MAAMP,SAAS,GAAGf,KAAK,CAAC6B,GAAG,CAACjC,OAAO,EAAEH,WAAE,CAACU,OAAO,CAAC,WAAW,CAAC,CAAC;UAC7DkB,YAAY,CAACT,WAAW,CAACkB,gBAAO,CAACC,QAAQ,CAAClC,OAAO,CAACS,GAAG,EAAES,SAAS,EAAEO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC;QACDU,eAAe,EAAEhC,KAAK,CAACmB,QAAQ,CAACvB,OAAO,EAAEH,WAAE,CAACwC,EAAE,CAAC,iBAAiB,CAAC,CAAC,IAAI;MACxE,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC;IACJ,OAAO1B,GAAG;EACZ;AACF,CAAC;AAAA,IAAA2B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcjD,UAAU","ignoreList":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.tableViewPane = void 0;
|
|
8
7
|
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
9
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
9
|
// Format an array of RDF statements as an HTML table.
|
|
11
10
|
//
|
|
12
11
|
// This can operate in one of three modes: when the class of object is given
|
|
@@ -25,16 +24,16 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
25
24
|
|
|
26
25
|
// Table view pane -- view of a class as a table of properties of class members
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
const tableViewPane = exports.tableViewPane = {
|
|
29
28
|
icon: UI.icons.originalIconBase + 'table.png',
|
|
30
29
|
name: 'tableOfClass',
|
|
31
|
-
label: function
|
|
32
|
-
|
|
30
|
+
label: function (subject, context) {
|
|
31
|
+
const store = context.session.store;
|
|
33
32
|
// if (!store.holds(subject, UI.ns.rdf('type'),UI.ns.rdfs('Class'))) return null
|
|
34
33
|
if (!store.any(undefined, UI.ns.rdf('type'), subject)) {
|
|
35
34
|
return null;
|
|
36
35
|
}
|
|
37
|
-
|
|
36
|
+
const n = store.statementsMatching(undefined, UI.ns.rdf('type'), subject).length;
|
|
38
37
|
if (n === 0) {
|
|
39
38
|
// None, suppress pane
|
|
40
39
|
return null;
|
|
@@ -45,9 +44,9 @@ var tableViewPane = exports.tableViewPane = {
|
|
|
45
44
|
}
|
|
46
45
|
return UI.utils.label(subject) + ' table';
|
|
47
46
|
},
|
|
48
|
-
render: function
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
render: function (subject, context) {
|
|
48
|
+
const myDocument = context.dom;
|
|
49
|
+
const div = myDocument.createElement('div');
|
|
51
50
|
div.setAttribute('class', 'tablePane');
|
|
52
51
|
div.appendChild(UI.table(myDocument, {
|
|
53
52
|
tableClass: subject
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableViewPane.js","names":["UI","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","tableViewPane","exports","icon","icons","originalIconBase","name","label","subject","context","store","session","any","undefined","ns","rdf","statementsMatching","length","utils","render","myDocument","dom","div","createElement","setAttribute","appendChild","table","tableClass"],"sources":["../src/tableViewPane.js"],"sourcesContent":["// Format an array of RDF statements as an HTML table.\n//\n// This can operate in one of three modes: when the class of object is given\n// or when the source document from which data is taken is given,\n// or if a prepared query object is given.\n// (In principle it could operate with neither class nor document\n// given but typically\n// there would be too much data.)\n// When the tableClass is not given, it looks for common classes in the data,\n// and gives the user the option.\n//\n// 2008 Written, Ilaria Liccardi\n// 2014 core functionality now in common/table.js -timbl\n\n// ///////////////////////////////////////////////////////////////////\n\n// Table view pane -- view of a class as a table of properties of class members\nimport * as UI from 'solid-ui'\n\nexport const tableViewPane = {\n icon: UI.icons.originalIconBase + 'table.png',\n\n name: 'tableOfClass',\n\n label: function (subject, context) {\n const store = context.session.store\n // if (!store.holds(subject, UI.ns.rdf('type'),UI.ns.rdfs('Class'))) return null\n if (!store.any(undefined, UI.ns.rdf('type'), subject)) {\n return null\n }\n const n = store.statementsMatching(undefined, UI.ns.rdf('type'), subject)\n .length\n if (n === 0) {\n // None, suppress pane\n return null\n }\n if (n > 15) {\n // @@ At the moment this pane can be slow with too many @@ fixme by using limits\n return null\n }\n return UI.utils.label(subject) + ' table'\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'tablePane')\n div.appendChild(UI.table(myDocument, { tableClass: subject }))\n return div\n }\n}\n"],"mappings":";;;;;;AAiBA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8B,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAjB9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAGO,MAAMkB,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,IAAI,EAAExB,EAAE,CAACyB,KAAK,CAACC,gBAAgB,GAAG,WAAW;EAE7CC,IAAI,EAAE,cAAc;EAEpBC,KAAK,EAAE,SAAAA,CAAUC,OAAO,EAAEC,OAAO,EAAE;IACjC,MAAMC,KAAK,GAAGD,OAAO,CAACE,OAAO,CAACD,KAAK;IACnC;IACA,IAAI,CAACA,KAAK,CAACE,GAAG,CAACC,SAAS,EAAElC,EAAE,CAACmC,EAAE,CAACC,GAAG,CAAC,MAAM,CAAC,EAAEP,OAAO,CAAC,EAAE;MACrD,OAAO,IAAI;IACb;IACA,MAAMtB,CAAC,GAAGwB,KAAK,CAACM,kBAAkB,CAACH,SAAS,EAAElC,EAAE,CAACmC,EAAE,CAACC,GAAG,CAAC,MAAM,CAAC,EAAEP,OAAO,CAAC,CACtES,MAAM;IACT,IAAI/B,CAAC,KAAK,CAAC,EAAE;MACX;MACA,OAAO,IAAI;IACb;IACA,IAAIA,CAAC,GAAG,EAAE,EAAE;MACV;MACA,OAAO,IAAI;IACb;IACA,OAAOP,EAAE,CAACuC,KAAK,CAACX,KAAK,CAACC,OAAO,CAAC,GAAG,QAAQ;EAC3C,CAAC;EAEDW,MAAM,EAAE,SAAAA,CAAUX,OAAO,EAAEC,OAAO,EAAE;IAClC,MAAMW,UAAU,GAAGX,OAAO,CAACY,GAAG;IAC9B,MAAMC,GAAG,GAAGF,UAAU,CAACG,aAAa,CAAC,KAAK,CAAC;IAC3CD,GAAG,CAACE,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC;IACtCF,GAAG,CAACG,WAAW,CAAC9C,EAAE,CAAC+C,KAAK,CAACN,UAAU,EAAE;MAAEO,UAAU,EAAEnB;IAAQ,CAAC,CAAC,CAAC;IAC9D,OAAOc,GAAG;EACZ;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
9
8
|
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
10
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
10
|
/* Financial Transaction Pane
|
|
12
11
|
**
|
|
13
12
|
** This outline pane allows a user to interact with a transaction
|
|
@@ -15,16 +14,16 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
15
14
|
** trips, etc
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
var _default = exports
|
|
17
|
+
const ns = UI.ns;
|
|
18
|
+
var _default = exports.default = {
|
|
20
19
|
// icon: (module.__dirname || __dirname) + '22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png',
|
|
21
20
|
icon: UI.icons.iconBase + 'noun_106746.svg',
|
|
22
21
|
name: 'transaction',
|
|
23
22
|
audience: [ns.solid('PowerUser')],
|
|
24
23
|
// Does the subject deserve this pane?
|
|
25
|
-
label: function
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
label: function (subject, context) {
|
|
25
|
+
const kb = context.session.store;
|
|
26
|
+
const t = kb.findTypeURIs(subject);
|
|
28
27
|
if (t['http://www.w3.org/2000/10/swap/pim/qif#Transaction']) return '$$';
|
|
29
28
|
if (kb.any(subject, UI.ns.qu('amount'))) return '$$$'; // In case schema not picked up
|
|
30
29
|
|
|
@@ -33,22 +32,22 @@ var _default = exports["default"] = {
|
|
|
33
32
|
if (t['http://www.w3.org/ns/pim/trip#Trip']) return 'Trip $';
|
|
34
33
|
return null; // No under other circumstances (while testing at least!)
|
|
35
34
|
},
|
|
36
|
-
render: function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
render: function (subject, context) {
|
|
36
|
+
const dom = context.dom;
|
|
37
|
+
const kb = context.session.store;
|
|
38
|
+
const fetcher = kb.fetcher;
|
|
39
|
+
const Q = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#');
|
|
40
|
+
const TRIP = $rdf.Namespace('http://www.w3.org/ns/pim/trip#');
|
|
41
|
+
const div = dom.createElement('div');
|
|
43
42
|
div.setAttribute('class', 'transactionPane');
|
|
44
|
-
|
|
43
|
+
const mention = function mention(message, style) {
|
|
45
44
|
if (style === undefined) style = 'color: grey';
|
|
46
|
-
|
|
45
|
+
const pre = dom.createElement('pre');
|
|
47
46
|
pre.setAttribute('style', style);
|
|
48
47
|
div.appendChild(pre);
|
|
49
48
|
pre.appendChild(dom.createTextNode(message));
|
|
50
49
|
};
|
|
51
|
-
|
|
50
|
+
const complain = function complain(message) {
|
|
52
51
|
return mention(message, 'color: #100; background-color: #fee');
|
|
53
52
|
};
|
|
54
53
|
|
|
@@ -62,19 +61,19 @@ var _default = exports["default"] = {
|
|
|
62
61
|
*/
|
|
63
62
|
// //////////////////////////////////////////////////////////////////////////////
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
const plist = kb.statementsMatching(subject);
|
|
65
|
+
const qlist = kb.statementsMatching(undefined, undefined, subject);
|
|
66
|
+
const t = kb.findTypeURIs(subject);
|
|
68
67
|
|
|
69
68
|
// var me = authn.currentUser()
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
const predicateURIsDone = {};
|
|
70
|
+
const donePredicate = function (pred) {
|
|
72
71
|
predicateURIsDone[pred.uri] = true;
|
|
73
72
|
};
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
const setPaneStyle = function (account) {
|
|
74
|
+
let mystyle = 'padding: 0.5em 1.5em 1em 1.5em; ';
|
|
76
75
|
if (account) {
|
|
77
|
-
|
|
76
|
+
const backgroundColor = kb.any(account, UI.ns.ui('backgroundColor'));
|
|
78
77
|
if (backgroundColor) {
|
|
79
78
|
mystyle += 'background-color: ' + backgroundColor.value + '; ';
|
|
80
79
|
}
|
|
@@ -87,31 +86,31 @@ var _default = exports["default"] = {
|
|
|
87
86
|
// Click on the transaction line to expand it into a pane
|
|
88
87
|
// Shift-click to expand without collapsing others
|
|
89
88
|
|
|
90
|
-
|
|
89
|
+
const d2 = function (n) {
|
|
91
90
|
if (n === undefined) return '';
|
|
92
|
-
|
|
91
|
+
const s = '' + n;
|
|
93
92
|
if (s.indexOf('.') >= 0) {
|
|
94
93
|
return s.split('.')[0] + '.' + (s.split('.')[1] + '00').slice(0, 2);
|
|
95
94
|
}
|
|
96
95
|
return s + '.00';
|
|
97
96
|
};
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const numericCell = function numericCell(amount, suppressZero) {
|
|
98
|
+
const td = dom.createElement('td');
|
|
100
99
|
if (!(0.0 + amount === 0.0 && suppressZero)) {
|
|
101
100
|
td.textContent = d2(amount);
|
|
102
101
|
}
|
|
103
102
|
td.setAttribute('style', 'width: 6em; text-align: right; ');
|
|
104
103
|
return td;
|
|
105
104
|
};
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
const headerCell = function headerCell(str) {
|
|
106
|
+
const td = dom.createElement('th');
|
|
108
107
|
td.textContent = str;
|
|
109
108
|
td.setAttribute('style', 'text-align: right; ');
|
|
110
109
|
return td;
|
|
111
110
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
const oderByDate = function (x, y) {
|
|
112
|
+
const dx = kb.any(x, ns.qu('date'));
|
|
113
|
+
const dy = kb.any(y, ns.qu('date'));
|
|
115
114
|
if (dx !== undefined && dy !== undefined) {
|
|
116
115
|
if (dx.value < dy.value) return -1;
|
|
117
116
|
if (dx.value > dy.value) return 1;
|
|
@@ -120,26 +119,26 @@ var _default = exports["default"] = {
|
|
|
120
119
|
if (x.uri > y.uri) return 1;
|
|
121
120
|
return 0;
|
|
122
121
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
const insertedPane = function (context, subject, paneName) {
|
|
123
|
+
const p = context.session.paneRegistry.byName(paneName);
|
|
124
|
+
const d = p.render(subject, context);
|
|
126
125
|
d.setAttribute('style', 'border: 0.1em solid green;');
|
|
127
126
|
return d;
|
|
128
127
|
};
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
const expandAfterRow = function (dom, row, subject, paneName, solo) {
|
|
129
|
+
const siblings = row.parentNode.children;
|
|
131
130
|
if (solo) {
|
|
132
|
-
for (
|
|
131
|
+
for (let j = siblings.length - 1; j >= 0; j--) {
|
|
133
132
|
if (siblings[j].expanded) {
|
|
134
133
|
siblings[j].parentNode.removeChild(siblings[j].expanded);
|
|
135
134
|
siblings[j].expanded = false;
|
|
136
135
|
}
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
const tr = dom.createElement('tr');
|
|
139
|
+
const td = tr.appendChild(dom.createElement('td'));
|
|
141
140
|
td.setAttribute('style', 'width: 98%; padding: 1em; border: 0.1em solid grey;');
|
|
142
|
-
|
|
141
|
+
const cols = row.children.length;
|
|
143
142
|
if (row.nextSibling) {
|
|
144
143
|
row.parentNode.insertBefore(tr, row.nextSibling);
|
|
145
144
|
} else {
|
|
@@ -149,7 +148,7 @@ var _default = exports["default"] = {
|
|
|
149
148
|
td.setAttribute('colspan', '' + cols);
|
|
150
149
|
td.appendChild(insertedPane(context, subject, paneName));
|
|
151
150
|
};
|
|
152
|
-
|
|
151
|
+
const expandAfterRowOrCollapse = function (dom, row, subject, paneName, solo) {
|
|
153
152
|
if (row.expanded) {
|
|
154
153
|
row.parentNode.removeChild(row.expanded);
|
|
155
154
|
row.expanded = false;
|
|
@@ -157,37 +156,37 @@ var _default = exports["default"] = {
|
|
|
157
156
|
expandAfterRow(dom, row, subject, paneName, solo);
|
|
158
157
|
}
|
|
159
158
|
};
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
const transactionTable = function (dom, list, filter) {
|
|
160
|
+
const table = dom.createElement('table');
|
|
162
161
|
table.setAttribute('style', 'padding-left: 0.5em; padding-right: 0.5em; font-size: 9pt; width: 85%;');
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
const transactionRow = function (dom, x) {
|
|
163
|
+
const tr = dom.createElement('tr');
|
|
164
|
+
const setTRStyle = function (tr, account) {
|
|
166
165
|
// var mystyle = "padding: 0.5em 1.5em 1em 1.5em; "
|
|
167
|
-
|
|
166
|
+
let mystyle = '\'padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.1em;';
|
|
168
167
|
if (account) {
|
|
169
|
-
|
|
168
|
+
const backgroundColor = kb.any(account, UI.ns.ui('backgroundColor'));
|
|
170
169
|
if (backgroundColor) {
|
|
171
170
|
mystyle += 'background-color: ' + backgroundColor.value + '; ';
|
|
172
171
|
}
|
|
173
172
|
}
|
|
174
173
|
tr.setAttribute('style', mystyle);
|
|
175
174
|
};
|
|
176
|
-
|
|
175
|
+
const account = kb.any(x, ns.qu('toAccount'));
|
|
177
176
|
setTRStyle(tr, account);
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
const c0 = tr.appendChild(dom.createElement('td'));
|
|
178
|
+
const date = kb.any(x, ns.qu('date'));
|
|
180
179
|
c0.textContent = date ? date.value.slice(0, 10) : '???';
|
|
181
180
|
c0.setAttribute('style', 'width: 7em;');
|
|
182
|
-
|
|
181
|
+
const c1 = tr.appendChild(dom.createElement('td'));
|
|
183
182
|
c1.setAttribute('style', 'width: 36em;');
|
|
184
|
-
|
|
183
|
+
const payee = kb.any(x, ns.qu('payee'));
|
|
185
184
|
c1.textContent = payee ? payee.value : '???';
|
|
186
|
-
|
|
185
|
+
const a1 = c1.appendChild(dom.createElement('a'));
|
|
187
186
|
a1.textContent = ' ➜';
|
|
188
187
|
a1.setAttribute('href', x.uri);
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
const c3 = tr.appendChild(dom.createElement('td'));
|
|
189
|
+
const amount = kb.any(x, ns.qu('in_USD'));
|
|
191
190
|
c3.textContent = amount ? d2(amount.value) : '???';
|
|
192
191
|
c3.setAttribute('style', 'width: 6em; text-align: right; '); // @@ decimal alignment?
|
|
193
192
|
tr.addEventListener('click', function (e) {
|
|
@@ -196,9 +195,9 @@ var _default = exports["default"] = {
|
|
|
196
195
|
}, false);
|
|
197
196
|
return tr;
|
|
198
197
|
};
|
|
199
|
-
|
|
198
|
+
const list2 = filter ? list.filter(filter) : list.slice(); // don't sort a paramater passed in place
|
|
200
199
|
list2.sort(oderByDate);
|
|
201
|
-
for (
|
|
200
|
+
for (let i = 0; i < list2.length; i++) {
|
|
202
201
|
table.appendChild(transactionRow(dom, list2[i]));
|
|
203
202
|
}
|
|
204
203
|
return table;
|
|
@@ -211,29 +210,29 @@ var _default = exports["default"] = {
|
|
|
211
210
|
if (t['http://www.w3.org/2000/10/swap/pim/qif#Transaction'] || kb.any(subject, ns.qu('toAccount'))) {
|
|
212
211
|
// var trip = kb.any(subject, WF('trip'))
|
|
213
212
|
donePredicate(ns.rdf('type'));
|
|
214
|
-
|
|
213
|
+
const account = kb.any(subject, UI.ns.qu('toAccount'));
|
|
215
214
|
setPaneStyle(account);
|
|
216
215
|
if (!account) {
|
|
217
216
|
complain('(Error: There is no bank account known for this transaction <' + subject.uri + '>,\n -- every transaction needs one.)');
|
|
218
217
|
}
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
let store = null;
|
|
219
|
+
const statement = kb.any(subject, UI.ns.qu('accordingTo'));
|
|
221
220
|
if (statement === undefined) {
|
|
222
|
-
complain('(Error: There is no back link to the original data source foir this transaction <' + subject.uri +
|
|
221
|
+
complain('(Error: There is no back link to the original data source foir this transaction <' + subject.uri + '>,\nso I can\'t tell how to annotate it.)');
|
|
223
222
|
} else {
|
|
224
223
|
store = statement !== undefined ? kb.any(statement, UI.ns.qu('annotationStore')) : null;
|
|
225
224
|
if (store === undefined) {
|
|
226
225
|
complain('(There is no annotation document for this statement\n<' + statement.uri + '>,\nso you cannot classify this transaction.)');
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
|
-
|
|
228
|
+
const nav = dom.createElement('div');
|
|
230
229
|
nav.setAttribute('style', 'float:right');
|
|
231
230
|
div.appendChild(nav);
|
|
232
|
-
|
|
231
|
+
const navLink = function (pred, label) {
|
|
233
232
|
donePredicate(pred);
|
|
234
|
-
|
|
233
|
+
const obj = kb.any(subject, pred);
|
|
235
234
|
if (!obj) return;
|
|
236
|
-
|
|
235
|
+
const a = dom.createElement('a');
|
|
237
236
|
a.setAttribute('href', obj.uri);
|
|
238
237
|
a.setAttribute('style', 'float:right');
|
|
239
238
|
nav.appendChild(a).textContent = label || UI.utils.label(obj);
|
|
@@ -244,17 +243,17 @@ var _default = exports["default"] = {
|
|
|
244
243
|
navLink(TRIP('trip'));
|
|
245
244
|
|
|
246
245
|
// Basic data:
|
|
247
|
-
|
|
246
|
+
const table = dom.createElement('table');
|
|
248
247
|
div.appendChild(table);
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
const preds = ['date', 'payee', 'amount', 'in_USD', 'currency'].map(Q);
|
|
249
|
+
const inner = preds.map(function (p) {
|
|
251
250
|
donePredicate(p);
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
const value = kb.any(subject, p);
|
|
252
|
+
const s = value ? UI.utils.labelForXML(value) : '';
|
|
254
253
|
return '<tr><td style="text-align: right; padding-right: 0.6em">' + UI.utils.labelForXML(p) + '</td><td style="font-weight: bold;">' + s + '</td></tr>';
|
|
255
254
|
}).join('\n');
|
|
256
255
|
table.innerHTML = inner;
|
|
257
|
-
|
|
256
|
+
const complainIfBad = function (ok, body) {
|
|
258
257
|
if (ok) {
|
|
259
258
|
// setModifiedDate(store, kb, store)
|
|
260
259
|
// rerender(div) // deletes the new trip form
|
|
@@ -267,8 +266,8 @@ var _default = exports["default"] = {
|
|
|
267
266
|
if (store) {
|
|
268
267
|
kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {
|
|
269
268
|
if (!ok) complain('Cannot load store ' + store + ' ' + body);
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
const calendarYear = kb.any(store, ns.qu('calendarYear'));
|
|
270
|
+
const renderCatgorySelectors = function () {
|
|
272
271
|
div.insertBefore(UI.widgets.makeSelectForNestedCategory(dom, kb, subject, UI.ns.qu('Classified'), store, complainIfBad), table.nextSibling);
|
|
273
272
|
};
|
|
274
273
|
if (kb.any(undefined, ns.rdfs('subClassOf'), ns.qu.Classified)) {
|
|
@@ -277,25 +276,25 @@ var _default = exports["default"] = {
|
|
|
277
276
|
fetcher.load(calendarYear).then(function (_xhrs) {
|
|
278
277
|
fetcher.load(kb.each(calendarYear, ns.rdfs('seeAlso'))).then(function () {
|
|
279
278
|
renderCatgorySelectors();
|
|
280
|
-
})
|
|
279
|
+
}).catch(function (e) {
|
|
281
280
|
console.log('Error loading background data: ' + e);
|
|
282
281
|
});
|
|
283
|
-
})
|
|
282
|
+
}).catch(function (e) {
|
|
284
283
|
console.log('Error loading calendarYear: ' + e);
|
|
285
284
|
});
|
|
286
285
|
} else {
|
|
287
|
-
console.log(
|
|
286
|
+
console.log('Can\'t get categories, because no calendarYear');
|
|
288
287
|
}
|
|
289
288
|
div.appendChild(UI.widgets.makeDescription(dom, kb, subject, UI.ns.rdfs('comment'), store, complainIfBad));
|
|
290
|
-
|
|
289
|
+
let trips = kb.statementsMatching(undefined, TRIP('trip'), undefined, store).map(function (st) {
|
|
291
290
|
return st.object;
|
|
292
291
|
}); // @@ Use rdfs
|
|
293
|
-
|
|
292
|
+
const trips2 = kb.each(undefined, UI.ns.rdf('type'), TRIP('Trip'));
|
|
294
293
|
trips = trips.concat(trips2).sort(); // @@ Unique
|
|
295
294
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
const sortedBy = function (kb, list, pred, reverse) {
|
|
296
|
+
const l2 = list.map(function (x) {
|
|
297
|
+
let key = kb.any(x, pred);
|
|
299
298
|
key = key ? key.value : '9999-12-31';
|
|
300
299
|
return [key, x];
|
|
301
300
|
});
|
|
@@ -313,8 +312,8 @@ var _default = exports["default"] = {
|
|
|
313
312
|
nullLabel: '-- what trip? --',
|
|
314
313
|
mint: 'New Trip *',
|
|
315
314
|
mintClass: TRIP('Trip'),
|
|
316
|
-
mintStatementsFun: function
|
|
317
|
-
|
|
315
|
+
mintStatementsFun: function (trip) {
|
|
316
|
+
const is = [];
|
|
318
317
|
is.push($rdf.st(trip, UI.ns.rdf('type'), TRIP('Trip'), trip.doc()));
|
|
319
318
|
return is;
|
|
320
319
|
}
|
|
@@ -324,7 +323,7 @@ var _default = exports["default"] = {
|
|
|
324
323
|
|
|
325
324
|
// Add in simple comments about the transaction
|
|
326
325
|
|
|
327
|
-
|
|
326
|
+
const outliner = context.getOutliner(dom);
|
|
328
327
|
donePredicate(ns.rdfs('comment')); // Done above
|
|
329
328
|
|
|
330
329
|
UI.widgets.attachmentList(dom, subject, div);
|
|
@@ -366,77 +365,77 @@ var _default = exports["default"] = {
|
|
|
366
365
|
var tableDiv = UI.widgets.renderTableViewPane(dom, {'query': query, 'onDone': calculations} )
|
|
367
366
|
div.appendChild(tableDiv)
|
|
368
367
|
*/
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
368
|
+
const calculations = function () {
|
|
369
|
+
const total = {};
|
|
370
|
+
const yearTotal = {};
|
|
371
|
+
const yearCategoryTotal = {};
|
|
372
|
+
const trans = kb.each(undefined, TRIP('trip'), subject);
|
|
373
|
+
const bankStatements = trans.map(function (t) {
|
|
375
374
|
return t.doc();
|
|
376
375
|
});
|
|
377
376
|
kb.fetcher.load(bankStatements).then(function () {
|
|
378
377
|
trans.forEach(function (t) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
const date = kb.the(t, ns.qu('date'));
|
|
379
|
+
const year = date ? ('' + date.value).slice(0, 4) : '????';
|
|
380
|
+
let ty = kb.the(t, ns.rdf('type')); // @@ find most specific type
|
|
382
381
|
// complain(" -- one trans: "+t.uri + ' -> '+kb.any(t, UI.ns.qu('in_USD')))
|
|
383
382
|
if (!ty) ty = UI.ns.qu('ErrorNoType');
|
|
384
383
|
if (ty && ty.uri) {
|
|
385
|
-
|
|
384
|
+
const tyuri = ty.uri;
|
|
386
385
|
if (!yearTotal[year]) yearTotal[year] = 0.0;
|
|
387
386
|
if (!yearCategoryTotal[year]) yearCategoryTotal[year] = {};
|
|
388
387
|
if (!total[tyuri]) total[tyuri] = 0.0;
|
|
389
388
|
if (!yearCategoryTotal[year][tyuri]) {
|
|
390
389
|
yearCategoryTotal[year][tyuri] = 0.0;
|
|
391
390
|
}
|
|
392
|
-
|
|
391
|
+
const lit = kb.any(t, UI.ns.qu('in_USD'));
|
|
393
392
|
if (!lit) {
|
|
394
393
|
complain('@@ No amount in USD: ' + lit + ' for ' + t);
|
|
395
394
|
}
|
|
396
395
|
if (lit) {
|
|
397
|
-
|
|
396
|
+
const amount = parseFloat(lit.value);
|
|
398
397
|
total[tyuri] += amount;
|
|
399
398
|
yearCategoryTotal[year][tyuri] += amount;
|
|
400
399
|
yearTotal[year] += amount;
|
|
401
400
|
}
|
|
402
401
|
}
|
|
403
402
|
});
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
for (
|
|
403
|
+
const types = [];
|
|
404
|
+
let grandTotal = 0.0;
|
|
405
|
+
const years = [];
|
|
406
|
+
let i;
|
|
407
|
+
for (const y in yearCategoryTotal) {
|
|
409
408
|
// @@ TODO: Write away the need for exception on next line
|
|
410
409
|
|
|
411
|
-
if (
|
|
410
|
+
if (Object.prototype.hasOwnProperty.call(yearCategoryTotal, y)) {
|
|
412
411
|
years.push(y);
|
|
413
412
|
}
|
|
414
413
|
}
|
|
415
414
|
years.sort();
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
415
|
+
const ny = years.length;
|
|
416
|
+
let cell;
|
|
417
|
+
const table = div.appendChild(dom.createElement('table'));
|
|
419
418
|
table.setAttribute('style', 'font-size: 120%; margin-left:auto; margin-right:1em; margin-top: 1em; border: 0.05em solid gray; padding: 1em;');
|
|
420
419
|
if (ny > 1) {
|
|
421
|
-
|
|
420
|
+
const header = table.appendChild(dom.createElement('tr'));
|
|
422
421
|
header.appendChild(headerCell(''));
|
|
423
422
|
for (i = 0; i < ny; i++) {
|
|
424
423
|
header.appendChild(headerCell(years[i]));
|
|
425
424
|
}
|
|
426
425
|
header.appendChild(headerCell('total'));
|
|
427
426
|
}
|
|
428
|
-
for (
|
|
427
|
+
for (const uri in total) {
|
|
429
428
|
// @@ TODO: Write away the need for exception on next line
|
|
430
429
|
|
|
431
|
-
if (
|
|
430
|
+
if (Object.prototype.hasOwnProperty.call(total, uri)) {
|
|
432
431
|
types.push(uri);
|
|
433
432
|
grandTotal += total[uri];
|
|
434
433
|
}
|
|
435
434
|
}
|
|
436
435
|
types.sort();
|
|
437
|
-
|
|
438
|
-
for (
|
|
439
|
-
|
|
436
|
+
let row, label, z;
|
|
437
|
+
for (let j = 0; j < types.length; j++) {
|
|
438
|
+
const cat = kb.sym(types[j]);
|
|
440
439
|
row = table.appendChild(dom.createElement('tr'));
|
|
441
440
|
label = row.appendChild(dom.createElement('td'));
|
|
442
441
|
label.textContent = UI.utils.label(cat);
|
|
@@ -462,11 +461,11 @@ var _default = exports["default"] = {
|
|
|
462
461
|
cell = row.appendChild(numericCell(grandTotal));
|
|
463
462
|
cell.setAttribute('style', 'font-weight: bold; text-align: right;');
|
|
464
463
|
}
|
|
465
|
-
|
|
464
|
+
const tab = transactionTable(dom, trans);
|
|
466
465
|
tab.setAttribute('style', 'margin-left:auto; margin-right:1em; margin-top: 1em; border: padding: 1em;');
|
|
467
466
|
div.appendChild(tab);
|
|
468
467
|
UI.widgets.attachmentList(dom, subject, div);
|
|
469
|
-
})
|
|
468
|
+
}).catch(function (e) {
|
|
470
469
|
complain('Error loading transactions: ' + e);
|
|
471
470
|
});
|
|
472
471
|
};
|