solid-panes 3.7.3-cc40de56 → 3.7.3-f251a0e3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RDFXMLPane.js +58 -0
- package/dist/RDFXMLPane.js.map +1 -0
- package/{lib → dist}/argument/argumentPane.js +14 -15
- package/dist/argument/argumentPane.js.map +1 -0
- package/{lib → dist}/attach/attachPane.js +83 -93
- package/dist/attach/attachPane.js.map +1 -0
- package/{lib → dist}/audio/audioPane.js +49 -50
- package/dist/audio/audioPane.js.map +1 -0
- package/{lib → dist}/classInstancePane.js +23 -24
- package/dist/classInstancePane.js.map +1 -0
- package/dist/dashboard/basicPreferences.js +155 -0
- package/dist/dashboard/basicPreferences.js.map +1 -0
- package/dist/dashboard/dashboardPane.js +63 -0
- package/dist/dashboard/dashboardPane.js.map +1 -0
- package/dist/dashboard/homepage.js +63 -0
- package/dist/dashboard/homepage.js.map +1 -0
- package/{lib → dist}/dataContentPane.js +63 -63
- package/dist/dataContentPane.js.map +1 -0
- package/{lib → dist}/defaultPane.js +14 -15
- package/dist/defaultPane.js.map +1 -0
- package/{lib → dist}/dokieli/dokieliPane.js +49 -53
- package/dist/dokieli/dokieliPane.js.map +1 -0
- package/{src → dist}/dokieli/new.js +9 -3
- package/dist/dokieli/new.js.map +1 -0
- package/{lib → dist}/form/pane.js +44 -45
- package/dist/form/pane.js.map +1 -0
- package/dist/home/homePane.js +68 -0
- package/dist/home/homePane.js.map +1 -0
- package/dist/humanReadablePane.js +135 -0
- package/dist/humanReadablePane.js.map +1 -0
- package/dist/imagePane.js +70 -0
- package/dist/imagePane.js.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/internalPane.js +195 -0
- package/dist/internal/internalPane.js.map +1 -0
- package/dist/mainPage/footer.js +16 -0
- package/dist/mainPage/footer.js.map +1 -0
- package/dist/mainPage/header.js +84 -0
- package/dist/mainPage/header.js.map +1 -0
- package/{lib → dist}/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.js +30 -0
- package/dist/mainPage/index.js.map +1 -0
- package/{lib → dist}/microblogPane/microblogPane.js +261 -262
- package/dist/microblogPane/microblogPane.js.map +1 -0
- package/dist/n3Pane.js +56 -0
- package/dist/n3Pane.js.map +1 -0
- package/dist/outline/context.js +13 -0
- package/dist/outline/context.js.map +1 -0
- package/dist/outline/manager.js +1997 -0
- package/dist/outline/manager.js.map +1 -0
- package/{lib → dist}/outline/outlineIcons.js +2 -3
- package/dist/outline/outlineIcons.js.map +1 -0
- package/dist/outline/propertyViews.js +33 -0
- package/dist/outline/propertyViews.js.map +1 -0
- package/{lib → dist}/outline/queryByExample.js +30 -31
- package/dist/outline/queryByExample.js.map +1 -0
- package/{lib → dist}/outline/userInput.js +262 -260
- package/dist/outline/userInput.js.map +1 -0
- package/dist/outline/viewAsImage.js +7 -0
- package/dist/outline/viewAsImage.js.map +1 -0
- package/{lib → dist}/outline/viewAsMbox.js +4 -14
- package/dist/outline/viewAsMbox.js.map +1 -0
- package/dist/pad/padPane.js +420 -0
- package/dist/pad/padPane.js.map +1 -0
- package/{lib → dist}/playlist/playlistPane.js +36 -37
- package/dist/playlist/playlistPane.js.map +1 -0
- package/{lib → dist}/registerPanes.js +29 -29
- package/dist/registerPanes.js.map +1 -0
- package/{src → dist}/schedule/formsForSchedule.js +9 -2
- package/dist/schedule/formsForSchedule.js.map +1 -0
- package/{lib → dist}/schedule/schedulePane.js +171 -177
- package/dist/schedule/schedulePane.js.map +1 -0
- package/dist/sharing/sharingPane.js +45 -0
- package/dist/sharing/sharingPane.js.map +1 -0
- package/dist/slideshow/slideshowPane.js +80 -0
- package/dist/slideshow/slideshowPane.js.map +1 -0
- package/{lib → dist}/socialPane.js +141 -142
- package/dist/socialPane.js.map +1 -0
- package/dist/tabbed/tabbedPane.js +55 -0
- package/dist/tabbed/tabbedPane.js.map +1 -0
- package/{lib → dist}/tableViewPane.js +8 -9
- package/dist/tableViewPane.js.map +1 -0
- package/{lib → dist}/transaction/pane.js +117 -118
- package/dist/transaction/pane.js.map +1 -0
- package/{lib → dist}/transaction/period.js +82 -83
- package/dist/transaction/period.js.map +1 -0
- package/{lib → dist}/trip/tripPane.js +47 -48
- package/dist/trip/tripPane.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.dom.js +158 -0
- package/dist/trustedApplications/trustedApplications.dom.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.utils.js +24 -0
- package/dist/trustedApplications/trustedApplications.utils.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.view.js +62 -0
- package/dist/trustedApplications/trustedApplications.view.js.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/{lib → dist}/ui/pane.js +30 -31
- package/dist/ui/pane.js.map +1 -0
- package/dist/versionInfo.js +31 -0
- package/dist/versionInfo.js.map +1 -0
- package/dist/video/videoPane.js +43 -0
- package/dist/video/videoPane.js.map +1 -0
- package/package.json +26 -13
- package/Documentation/VisualLanguage.html +0 -538
- package/Documentation/conventions.md +0 -333
- package/coverage/clover.xml +0 -152
- package/coverage/coverage-final.json +0 -6
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -131
- package/coverage/lcov-report/outline/index.html +0 -161
- package/coverage/lcov-report/outline/outlineIcons.js.html +0 -565
- package/coverage/lcov-report/outline/propertyViews.ts.html +0 -196
- package/coverage/lcov-report/outline/viewAsImage.ts.html +0 -121
- package/coverage/lcov-report/outline/viewAsMbox.ts.html +0 -127
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/trustedApplications/index.html +0 -116
- package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +0 -238
- package/coverage/lcov.info +0 -204
- package/dev/index.html +0 -28
- package/dev/loader.ts +0 -91
- package/dev/pane/index.ts +0 -10
- package/doc/images/panes-for-classes.epgz +0 -0
- package/doc/images/panes-for-classes.svg +0 -609
- package/eslint.config.mjs +0 -34
- package/jest.config.js +0 -27
- package/jest.setup.ts +0 -4
- package/lib/RDFXMLPane.js +0 -59
- package/lib/RDFXMLPane.js.map +0 -1
- package/lib/argument/argumentPane.js.map +0 -1
- package/lib/attach/attachPane.js.map +0 -1
- package/lib/audio/audioPane.js.map +0 -1
- package/lib/classInstancePane.js.map +0 -1
- package/lib/dashboard/basicPreferences.js +0 -229
- package/lib/dashboard/basicPreferences.js.map +0 -1
- package/lib/dashboard/dashboardPane.js +0 -73
- package/lib/dashboard/dashboardPane.js.map +0 -1
- package/lib/dashboard/homepage.js +0 -86
- package/lib/dashboard/homepage.js.map +0 -1
- package/lib/dataContentPane.js.map +0 -1
- package/lib/defaultPane.js.map +0 -1
- package/lib/dokieli/dokieliPane.js.map +0 -1
- package/lib/dokieli/new.js +0 -9
- package/lib/dokieli/new.js.map +0 -1
- package/lib/form/pane.js.map +0 -1
- package/lib/global.d.js +0 -2
- package/lib/global.d.js.map +0 -1
- package/lib/home/homePane.js +0 -91
- package/lib/home/homePane.js.map +0 -1
- package/lib/humanReadablePane.js +0 -138
- package/lib/humanReadablePane.js.map +0 -1
- package/lib/imagePane.js +0 -71
- package/lib/imagePane.js.map +0 -1
- package/lib/index.js +0 -112
- package/lib/index.js.map +0 -1
- package/lib/internal/internalPane.js +0 -184
- package/lib/internal/internalPane.js.map +0 -1
- package/lib/mainPage/footer.js +0 -22
- package/lib/mainPage/footer.js.map +0 -1
- package/lib/mainPage/header.js +0 -152
- package/lib/mainPage/header.js.map +0 -1
- package/lib/mainPage/index.js +0 -42
- package/lib/mainPage/index.js.map +0 -1
- package/lib/microblogPane/microblogPane.js.map +0 -1
- package/lib/n3Pane.js +0 -57
- package/lib/n3Pane.js.map +0 -1
- package/lib/outline/context.js +0 -19
- package/lib/outline/context.js.map +0 -1
- package/lib/outline/manager.js +0 -2264
- package/lib/outline/manager.js.map +0 -1
- package/lib/outline/manager.test.d.ts +0 -2
- package/lib/outline/manager.test.d.ts.map +0 -1
- package/lib/outline/manager.test.js +0 -210
- package/lib/outline/manager.test.js.map +0 -1
- package/lib/outline/outlineIcons.js.map +0 -1
- package/lib/outline/propertyViews.js +0 -44
- package/lib/outline/propertyViews.js.map +0 -1
- package/lib/outline/propertyViews.test.d.ts +0 -2
- package/lib/outline/propertyViews.test.d.ts.map +0 -1
- package/lib/outline/propertyViews.test.js +0 -27
- package/lib/outline/propertyViews.test.js.map +0 -1
- package/lib/outline/queryByExample.js.map +0 -1
- package/lib/outline/userInput.js.map +0 -1
- package/lib/outline/viewAsImage.js +0 -17
- package/lib/outline/viewAsImage.js.map +0 -1
- package/lib/outline/viewAsMbox.js.map +0 -1
- package/lib/pad/padPane.js +0 -417
- package/lib/pad/padPane.js.map +0 -1
- package/lib/playlist/playlistPane.js.map +0 -1
- package/lib/registerPanes.js.map +0 -1
- package/lib/schedule/formsForSchedule.js +0 -4
- package/lib/schedule/formsForSchedule.js.map +0 -1
- package/lib/schedule/schedulePane.js.map +0 -1
- package/lib/sharing/sharingPane.js +0 -49
- package/lib/sharing/sharingPane.js.map +0 -1
- package/lib/slideshow/slideshowPane.js +0 -84
- package/lib/slideshow/slideshowPane.js.map +0 -1
- package/lib/socialPane.js.map +0 -1
- package/lib/tabbed/tabbedPane.js +0 -72
- package/lib/tabbed/tabbedPane.js.map +0 -1
- package/lib/tableViewPane.js.map +0 -1
- package/lib/test-import-export/common.js +0 -12
- package/lib/test-import-export/common.js.map +0 -1
- package/lib/test-import-export/edit-importer.js +0 -25
- package/lib/test-import-export/edit-importer.js.map +0 -1
- package/lib/test-import-export/testImportExport.js +0 -2
- package/lib/test-import-export/testImportExport.js.map +0 -1
- package/lib/transaction/pane.js.map +0 -1
- package/lib/transaction/period.js.map +0 -1
- package/lib/trip/tripPane.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.dom.js +0 -177
- package/lib/trustedApplications/trustedApplications.dom.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.test.d.ts +0 -2
- package/lib/trustedApplications/trustedApplications.test.d.ts.map +0 -1
- package/lib/trustedApplications/trustedApplications.test.js +0 -64
- package/lib/trustedApplications/trustedApplications.test.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.utils.js +0 -34
- package/lib/trustedApplications/trustedApplications.utils.js.map +0 -1
- package/lib/trustedApplications/trustedApplications.view.js +0 -87
- package/lib/trustedApplications/trustedApplications.view.js.map +0 -1
- package/lib/types.js +0 -6
- package/lib/types.js.map +0 -1
- package/lib/ui/pane.js.map +0 -1
- package/lib/versionInfo.d.ts +0 -32
- package/lib/versionInfo.d.ts.map +0 -1
- package/lib/versionInfo.js +0 -37
- package/lib/versionInfo.js.map +0 -1
- package/lib/video/videoPane.js +0 -44
- package/lib/video/videoPane.js.map +0 -1
- package/src/RDFXMLPane.js +0 -60
- package/src/argument/argumentPane.js +0 -65
- package/src/argument/argument_icon_v04.jpg +0 -0
- package/src/argument/icon_argument.png +0 -0
- package/src/argument/transparentyingyang.png +0 -0
- package/src/attach/attachPane.js +0 -508
- package/src/attach/tbl-paperclip-128.png +0 -0
- package/src/attach/tbl-paperclip-22.png +0 -0
- package/src/attach/tbl-paperclip-22a.png +0 -0
- package/src/audio/audioPane.js +0 -197
- package/src/chatPreferencesForm.ttl +0 -12
- package/src/classInstancePane.js +0 -110
- package/src/dashboard/basicPreferences.ts +0 -201
- package/src/dashboard/dashboardPane.ts +0 -83
- package/src/dashboard/homepage.ts +0 -72
- package/src/dashboard/languages/codes.html +0 -8611
- package/src/dashboard/languages/codes.xml +0 -3563
- package/src/dashboard/languages/codes2.txt +0 -170
- package/src/dashboard/languages/foo +0 -70
- package/src/dashboard/languages/foo.ttl +0 -0
- package/src/dashboard/languages/get-language-names.sh +0 -12
- package/src/dashboard/ontologyData.ttl +0 -35
- package/src/dashboard/preferencesFormText.ttl +0 -18
- package/src/dataContentPane.js +0 -290
- package/src/defaultPane.js +0 -102
- package/src/dokieli/Makefile +0 -6
- package/src/dokieli/dokieliPane.js +0 -190
- package/src/dokieli/new.html +0 -30
- package/src/form/form-22.png +0 -0
- package/src/form/form-b-22.png +0 -0
- package/src/form/form.graffle +0 -0
- package/src/form/form.png +0 -0
- package/src/form/pane.js +0 -217
- package/src/form/psuedocode-notes.txt +0 -57
- package/src/global.d.ts +0 -4
- package/src/home/homePane.ts +0 -72
- package/src/humanReadablePane.js +0 -150
- package/src/imagePane.js +0 -75
- package/src/index.ts +0 -71
- package/src/internal/internalPane.ts +0 -263
- package/src/mainPage/footer.ts +0 -19
- package/src/mainPage/header.ts +0 -79
- package/src/mainPage/index.ts +0 -20
- package/src/meeting/Makefile +0 -3
- package/src/meeting/test/meeting1/Actions/actions.ttl +0 -14
- package/src/meeting/test/meeting1/Actions/config.ttl +0 -16
- package/src/meeting/test/meeting1/Actions/state.ttl +0 -30
- package/src/meeting/test/meeting1/Schedule/details.ttl +0 -34
- package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -20
- package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -75
- package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -20
- package/src/meeting/test/meeting1/Schedule/index.html +0 -72
- package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -20
- package/src/meeting/test/meeting1/Schedule/results.ttl +0 -15
- package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -20
- package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -23
- package/src/meeting/test/meeting1/chat/chat.ttl +0 -1
- package/src/meeting/test/meeting1/details.ttl +0 -35
- package/src/meeting/test/meeting1/pad/pad.ttl +0 -16
- package/src/microblogPane/mbStyle.css +0 -267
- package/src/microblogPane/microblogPane.js +0 -1412
- package/src/n3Pane.js +0 -56
- package/src/outline/context.ts +0 -21
- package/src/outline/manager.js +0 -2384
- package/src/outline/manager.test.ts +0 -189
- package/src/outline/outlineIcons.js +0 -160
- package/src/outline/propertyViews.test.ts +0 -36
- package/src/outline/propertyViews.ts +0 -37
- package/src/outline/queryByExample.js +0 -296
- package/src/outline/userInput.js +0 -2373
- package/src/outline/viewAsImage.ts +0 -12
- package/src/outline/viewAsMbox.ts +0 -14
- package/src/pad/images/ColourOff.ai +2 -872
- package/src/pad/images/ColourOff.png +0 -0
- package/src/pad/images/ColourOn.ai +1 -935
- package/src/pad/images/ColourOn.png +0 -0
- package/src/pad/padPane.ts +0 -559
- package/src/playlist/playlistPane.js +0 -161
- package/src/registerPanes.js +0 -147
- package/src/schedule/Makefile +0 -6
- package/src/schedule/formsForSchedule.ttl +0 -115
- package/src/schedule/schedulePane.js +0 -1201
- package/src/sharing/sharingPane.ts +0 -49
- package/src/slideshow/slideshowPane.js +0 -80
- package/src/socialPane.js +0 -523
- package/src/style/tabbedtab.css +0 -1347
- package/src/tabbed/tabbedPane.ts +0 -60
- package/src/tableViewPane.js +0 -51
- package/src/test-import-export/common.js +0 -6
- package/src/test-import-export/edit-importer.js +0 -20
- package/src/test-import-export/testImportExport.js +0 -0
- package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
- package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/pane.js +0 -629
- package/src/transaction/period.js +0 -374
- package/src/transaction/thumbs_075987-3d-transparent-glass-icon-business-creditcard2.png +0 -0
- package/src/transaction/thumbs_075989-3d-transparent-glass-icon-business-currency-cent-sc35.png +0 -0
- package/src/trip/tripPane.js +0 -176
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -176
- package/src/trustedApplications/trustedApplications.dom.ts +0 -276
- package/src/trustedApplications/trustedApplications.test.ts +0 -82
- package/src/trustedApplications/trustedApplications.utils.ts +0 -51
- package/src/trustedApplications/trustedApplications.view.ts +0 -80
- package/src/types.ts +0 -34
- package/src/ui/22-builder.png +0 -0
- package/src/ui/builder.graffle +0 -0
- package/src/ui/builder.png +0 -0
- package/src/ui/builder2.png +0 -0
- package/src/ui/pane.js +0 -226
- package/src/versionInfo.ts +0 -30
- package/src/video/videoPane.js +0 -44
- package/timestamp.sh +0 -13
- package/travis/bumpversion.js +0 -29
- package/tsconfig.json +0 -78
- package/typings/raw-loader.d.ts +0 -4
- package/typings/solid-namespace/index.d.ts +0 -9
- package/webpack.config.js +0 -41
- /package/{lib → dist}/dashboard/basicPreferences.d.ts +0 -0
- /package/{lib → dist}/dashboard/basicPreferences.d.ts.map +0 -0
- /package/{lib → dist}/dashboard/dashboardPane.d.ts +0 -0
- /package/{lib → dist}/dashboard/dashboardPane.d.ts.map +0 -0
- /package/{lib → dist}/dashboard/homepage.d.ts +0 -0
- /package/{lib → dist}/dashboard/homepage.d.ts.map +0 -0
- /package/{lib → dist}/home/homePane.d.ts +0 -0
- /package/{lib → dist}/home/homePane.d.ts.map +0 -0
- /package/{lib → dist}/index.d.ts +0 -0
- /package/{lib → dist}/index.d.ts.map +0 -0
- /package/{lib → dist}/internal/internalPane.d.ts +0 -0
- /package/{lib → dist}/internal/internalPane.d.ts.map +0 -0
- /package/{lib → dist}/mainPage/footer.d.ts +0 -0
- /package/{lib → dist}/mainPage/footer.d.ts.map +0 -0
- /package/{lib → dist}/mainPage/header.d.ts +0 -0
- /package/{lib → dist}/mainPage/header.d.ts.map +0 -0
- /package/{lib → dist}/mainPage/index.d.ts +0 -0
- /package/{lib → dist}/outline/context.d.ts +0 -0
- /package/{lib → dist}/outline/context.d.ts.map +0 -0
- /package/{lib → dist}/outline/propertyViews.d.ts +0 -0
- /package/{lib → dist}/outline/propertyViews.d.ts.map +0 -0
- /package/{lib → dist}/outline/viewAsImage.d.ts +0 -0
- /package/{lib → dist}/outline/viewAsImage.d.ts.map +0 -0
- /package/{lib → dist}/outline/viewAsMbox.d.ts +0 -0
- /package/{lib → dist}/outline/viewAsMbox.d.ts.map +0 -0
- /package/{lib → dist}/pad/padPane.d.ts +0 -0
- /package/{lib → dist}/pad/padPane.d.ts.map +0 -0
- /package/{lib → dist}/sharing/sharingPane.d.ts +0 -0
- /package/{lib → dist}/sharing/sharingPane.d.ts.map +0 -0
- /package/{lib → dist}/tabbed/tabbedPane.d.ts +0 -0
- /package/{lib → dist}/tabbed/tabbedPane.d.ts.map +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.dom.d.ts +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.utils.d.ts +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.view.d.ts +0 -0
- /package/{lib → dist}/trustedApplications/trustedApplications.view.d.ts.map +0 -0
- /package/{lib → dist}/types.d.ts +0 -0
- /package/{lib → dist}/types.d.ts.map +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
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
|
});
|
|
@@ -8,28 +7,29 @@ exports.schedulePane = void 0;
|
|
|
8
7
|
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
9
8
|
var _solidLogic = require("solid-logic");
|
|
10
9
|
var _formsForSchedule = _interopRequireDefault(require("./formsForSchedule.js"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : {
|
|
12
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
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); }
|
|
13
12
|
/* Scheduler Pane
|
|
14
13
|
**
|
|
15
14
|
**
|
|
16
15
|
*/
|
|
17
16
|
/* global alert */
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const $rdf = UI.rdf;
|
|
19
|
+
const ns = UI.ns;
|
|
20
|
+
|
|
21
21
|
// @@ Give other combos too-- see schedule ontology
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const possibleAvailabilities = [ns.sched('No'), ns.sched('Maybe'), ns.sched('Yes')];
|
|
23
|
+
const schedulePane = exports.schedulePane = {
|
|
24
24
|
icon: UI.icons.iconBase + 'noun_346777.svg',
|
|
25
25
|
// @@ better?
|
|
26
26
|
|
|
27
27
|
name: 'schedule',
|
|
28
28
|
audience: [ns.solid('PowerUser')],
|
|
29
29
|
// Does the subject deserve an Scheduler pane?
|
|
30
|
-
label: function
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
label: function (subject, context) {
|
|
31
|
+
const kb = context.session.store;
|
|
32
|
+
const t = kb.findTypeURIs(subject);
|
|
33
33
|
if (t['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) {
|
|
34
34
|
return 'Scheduling poll';
|
|
35
35
|
}
|
|
@@ -37,13 +37,13 @@ var schedulePane = exports.schedulePane = {
|
|
|
37
37
|
},
|
|
38
38
|
// Mint a new Schedule poll
|
|
39
39
|
mintClass: ns.sched('SchedulableEvent'),
|
|
40
|
-
mintNew: function
|
|
40
|
+
mintNew: function (context, options) {
|
|
41
41
|
return new Promise(function (resolve, reject) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
const ns = UI.ns;
|
|
43
|
+
const kb = context.session.store;
|
|
44
|
+
let newBase = options.newBase;
|
|
45
|
+
const thisInstance = options.useExisting || $rdf.sym(options.newBase + 'index.ttl#this');
|
|
46
|
+
const complainIfBad = function (ok, body) {
|
|
47
47
|
if (ok) return;
|
|
48
48
|
console.log('Error in Schedule Pane: Error constructing new scheduler: ' + body);
|
|
49
49
|
reject(new Error(body));
|
|
@@ -54,12 +54,12 @@ var schedulePane = exports.schedulePane = {
|
|
|
54
54
|
// Two constiations of ACL for this app, public read and public read/write
|
|
55
55
|
// In all cases owner has read write control
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
const genACLtext = function (docURI, aclURI, allWrite) {
|
|
58
|
+
const g = $rdf.graph();
|
|
59
|
+
const auth = $rdf.Namespace('http://www.w3.org/ns/auth/acl#');
|
|
60
|
+
let a = g.sym(aclURI + '#a1');
|
|
61
|
+
const acl = g.sym(aclURI);
|
|
62
|
+
const doc = g.sym(docURI);
|
|
63
63
|
g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl);
|
|
64
64
|
g.add(a, auth('accessTo'), doc, acl);
|
|
65
65
|
g.add(a, auth('agent'), me, acl);
|
|
@@ -84,53 +84,49 @@ var schedulePane = exports.schedulePane = {
|
|
|
84
84
|
}
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
const setACL2 = function setACL2(docURI, allWrite, callbackFunction) {
|
|
88
|
+
const aclDoc = kb.any(kb.sym(docURI), kb.sym('http://www.iana.org/assignments/link-relations/acl')); // @@ check that this get set by web.js
|
|
89
89
|
|
|
90
90
|
if (aclDoc) {
|
|
91
91
|
// Great we already know where it is
|
|
92
|
-
|
|
92
|
+
const aclText = genACLtext(docURI, aclDoc.uri, allWrite);
|
|
93
93
|
return fetcher.webOperation('PUT', aclDoc.uri, {
|
|
94
94
|
data: aclText,
|
|
95
95
|
contentType: 'text/turtle'
|
|
96
|
-
}).then(
|
|
97
|
-
return callbackFunction(true);
|
|
98
|
-
})["catch"](function (err) {
|
|
96
|
+
}).then(_result => callbackFunction(true)).catch(err => {
|
|
99
97
|
callbackFunction(false, err.message);
|
|
100
98
|
});
|
|
101
99
|
} else {
|
|
102
|
-
return fetcher.load(docURI)
|
|
100
|
+
return fetcher.load(docURI).catch(err => {
|
|
103
101
|
callbackFunction(false, 'Getting headers for ACL: ' + err);
|
|
104
|
-
}).then(
|
|
105
|
-
|
|
102
|
+
}).then(() => {
|
|
103
|
+
const aclDoc = kb.any(kb.sym(docURI), kb.sym('http://www.iana.org/assignments/link-relations/acl'));
|
|
106
104
|
if (!aclDoc) {
|
|
107
105
|
// complainIfBad(false, "No Link rel=ACL header for " + docURI)
|
|
108
106
|
throw new Error('No Link rel=ACL header for ' + docURI);
|
|
109
107
|
}
|
|
110
|
-
|
|
108
|
+
const aclText = genACLtext(docURI, aclDoc.uri, allWrite);
|
|
111
109
|
return fetcher.webOperation('PUT', aclDoc.uri, {
|
|
112
110
|
data: aclText,
|
|
113
111
|
contentType: 'text/turtle'
|
|
114
112
|
});
|
|
115
|
-
}).then(
|
|
116
|
-
return callbackFunction(true);
|
|
117
|
-
})["catch"](function (err) {
|
|
113
|
+
}).then(_result => callbackFunction(true)).catch(err => {
|
|
118
114
|
callbackFunction(false, err.message);
|
|
119
115
|
});
|
|
120
116
|
}
|
|
121
117
|
};
|
|
122
118
|
|
|
123
119
|
// Body of mintNew
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
const fetcher = kb.fetcher;
|
|
121
|
+
const updater = kb.updater;
|
|
122
|
+
let me = options.me || _solidLogic.authn.currentUser();
|
|
127
123
|
if (!me) {
|
|
128
124
|
console.log('MUST BE LOGGED IN');
|
|
129
125
|
alert('NOT LOGGED IN');
|
|
130
126
|
return;
|
|
131
127
|
}
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
const base = thisInstance.dir().uri;
|
|
129
|
+
let newDetailsDoc, newInstance; // , newIndexDoc
|
|
134
130
|
|
|
135
131
|
if (options.useExisting) {
|
|
136
132
|
newInstance = options.useExisting;
|
|
@@ -145,21 +141,21 @@ var schedulePane = exports.schedulePane = {
|
|
|
145
141
|
// newIndexDoc = kb.sym(newBase + 'index.html')
|
|
146
142
|
newInstance = kb.sym(newDetailsDoc.uri + '#event');
|
|
147
143
|
}
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
const newResultsDoc = kb.sym(newBase + 'results.ttl');
|
|
145
|
+
const toBeCopied = options.noIndexHTML ? {} : [{
|
|
150
146
|
local: 'index.html',
|
|
151
147
|
contentType: 'text/html'
|
|
152
148
|
}];
|
|
153
|
-
|
|
149
|
+
const agenda = [];
|
|
154
150
|
|
|
155
151
|
// @@ This needs some form of visible progress bar
|
|
156
|
-
for (
|
|
157
|
-
|
|
158
|
-
|
|
152
|
+
for (let f = 0; f < toBeCopied.length; f++) {
|
|
153
|
+
const item = toBeCopied[f];
|
|
154
|
+
const fun = function copyItem(item) {
|
|
159
155
|
agenda.push(function () {
|
|
160
|
-
|
|
156
|
+
const newURI = newBase + item.local;
|
|
161
157
|
console.log('Copying ' + base + item.local + ' to ' + newURI);
|
|
162
|
-
|
|
158
|
+
const setThatACL = function () {
|
|
163
159
|
setACL2(newURI, false, function (ok, message) {
|
|
164
160
|
if (!ok) {
|
|
165
161
|
complainIfBad(ok, 'FAILED to set ACL ' + newURI + ' : ' + message);
|
|
@@ -169,12 +165,10 @@ var schedulePane = exports.schedulePane = {
|
|
|
169
165
|
}
|
|
170
166
|
});
|
|
171
167
|
};
|
|
172
|
-
kb.fetcher.webCopy(base + item.local, newBase + item.local, item.contentType).then(
|
|
173
|
-
return _solidLogic.authn.checkUser();
|
|
174
|
-
}).then(function (webId) {
|
|
168
|
+
kb.fetcher.webCopy(base + item.local, newBase + item.local, item.contentType).then(() => _solidLogic.authn.checkUser()).then(webId => {
|
|
175
169
|
me = webId;
|
|
176
170
|
setThatACL();
|
|
177
|
-
})
|
|
171
|
+
}).catch(err => {
|
|
178
172
|
console.log('FAILED to copy ' + base + item.local + ' : ' + err.message);
|
|
179
173
|
complainIfBad(false, 'FAILED to copy ' + base + item.local + ' : ' + err.message);
|
|
180
174
|
});
|
|
@@ -203,9 +197,9 @@ var schedulePane = exports.schedulePane = {
|
|
|
203
197
|
kb.fetcher.webOperation('PUT', newResultsDoc.uri, {
|
|
204
198
|
data: '',
|
|
205
199
|
contentType: 'text/turtle'
|
|
206
|
-
}).then(
|
|
200
|
+
}).then(() => {
|
|
207
201
|
agenda.shift()();
|
|
208
|
-
})
|
|
202
|
+
}).catch(err => {
|
|
209
203
|
complainIfBad(false, 'Failed to initialize empty results file: ' + err.message);
|
|
210
204
|
});
|
|
211
205
|
});
|
|
@@ -234,55 +228,55 @@ var schedulePane = exports.schedulePane = {
|
|
|
234
228
|
// mintNew
|
|
235
229
|
|
|
236
230
|
// Render one meeting schedule poll
|
|
237
|
-
render: function
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
231
|
+
render: function (subject, context) {
|
|
232
|
+
const dom = context.dom;
|
|
233
|
+
const kb = context.session.store;
|
|
234
|
+
const ns = UI.ns;
|
|
235
|
+
const invitation = subject;
|
|
236
|
+
const appPathSegment = 'app-when-can-we.w3.org'; // how to allocate this string and connect to
|
|
243
237
|
|
|
244
238
|
// ////////////////////////////////////////////
|
|
245
239
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
240
|
+
const fetcher = kb.fetcher;
|
|
241
|
+
const updater = kb.updater;
|
|
242
|
+
let waitingForLogin = false;
|
|
243
|
+
const thisInstance = subject;
|
|
244
|
+
const detailsDoc = subject.doc();
|
|
245
|
+
const baseDir = detailsDoc.dir();
|
|
246
|
+
const base = baseDir.uri;
|
|
247
|
+
const resultsDoc = $rdf.sym(base + 'results.ttl');
|
|
254
248
|
// const formsURI = base + 'forms.ttl'
|
|
255
249
|
// We can't in fact host stuff from there because of CORS
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
$rdf.parse(_formsForSchedule
|
|
250
|
+
const formsURI = 'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl';
|
|
251
|
+
const form1 = kb.sym(formsURI + '#form1');
|
|
252
|
+
const form2 = kb.sym(formsURI + '#form2');
|
|
253
|
+
const form3 = kb.sym(formsURI + '#form3');
|
|
254
|
+
$rdf.parse(_formsForSchedule.default, kb, formsURI, 'text/turtle'); // Load forms directly
|
|
261
255
|
|
|
262
|
-
|
|
263
|
-
|
|
256
|
+
const inputStyle = 'background-color: #eef; padding: 0.5em; border: .5em solid white; font-size: 100%'; // font-size: 120%
|
|
257
|
+
const buttonIconStyle = 'width: 1.8em; height: 1.8em;';
|
|
264
258
|
|
|
265
259
|
// Utility functions
|
|
266
260
|
|
|
267
|
-
|
|
261
|
+
const complainIfBad = function (ok, message) {
|
|
268
262
|
if (!ok) {
|
|
269
263
|
div.appendChild(UI.widgets.errorMessageBlock(dom, message, 'pink'));
|
|
270
264
|
}
|
|
271
265
|
};
|
|
272
|
-
|
|
266
|
+
const clearElement = function (ele) {
|
|
273
267
|
while (ele.firstChild) {
|
|
274
268
|
ele.removeChild(ele.firstChild);
|
|
275
269
|
}
|
|
276
270
|
return ele;
|
|
277
271
|
};
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
const refreshCellColor = function (cell, value) {
|
|
273
|
+
const bg = kb.any(value, UI.ns.ui('backgroundColor'));
|
|
280
274
|
if (bg) {
|
|
281
275
|
cell.setAttribute('style', 'padding: 0.3em; text-align: center; background-color: ' + bg + ';');
|
|
282
276
|
}
|
|
283
277
|
};
|
|
284
|
-
|
|
285
|
-
_solidLogic.authn.checkUser().then(
|
|
278
|
+
let me;
|
|
279
|
+
_solidLogic.authn.checkUser().then(webId => {
|
|
286
280
|
me = webId;
|
|
287
281
|
if (logInOutButton) {
|
|
288
282
|
logInOutButton.refresh();
|
|
@@ -299,8 +293,8 @@ var schedulePane = exports.schedulePane = {
|
|
|
299
293
|
// Viral growth path: user of app decides to make another instance
|
|
300
294
|
//
|
|
301
295
|
|
|
302
|
-
|
|
303
|
-
|
|
296
|
+
const newInstanceButton = function () {
|
|
297
|
+
const b = UI.login.newAppInstance(dom, {
|
|
304
298
|
noun: 'scheduler'
|
|
305
299
|
}, initializeNewInstanceInWorkspace);
|
|
306
300
|
b.firstChild.setAttribute('style', inputStyle);
|
|
@@ -309,8 +303,8 @@ var schedulePane = exports.schedulePane = {
|
|
|
309
303
|
|
|
310
304
|
// /////////////////////// Create new document files for new instance of app
|
|
311
305
|
|
|
312
|
-
|
|
313
|
-
|
|
306
|
+
const initializeNewInstanceInWorkspace = function (ws) {
|
|
307
|
+
let newBase = kb.any(ws, ns.space('uriPrefix'));
|
|
314
308
|
if (!newBase) {
|
|
315
309
|
newBase = ws.uri.split('#')[0];
|
|
316
310
|
} else {
|
|
@@ -320,28 +314,28 @@ var schedulePane = exports.schedulePane = {
|
|
|
320
314
|
$rdf.log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase); // @@ paramater?
|
|
321
315
|
newBase = newBase + '/';
|
|
322
316
|
}
|
|
323
|
-
|
|
317
|
+
const now = new Date();
|
|
324
318
|
newBase += appPathSegment + '/id' + now.getTime() + '/'; // unique id
|
|
325
319
|
|
|
326
320
|
initializeNewInstanceAtBase(thisInstance, newBase);
|
|
327
321
|
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
thisInstance
|
|
331
|
-
newBase
|
|
322
|
+
const initializeNewInstanceAtBase = function (thisInstance, newBase) {
|
|
323
|
+
const options = {
|
|
324
|
+
thisInstance,
|
|
325
|
+
newBase
|
|
332
326
|
};
|
|
333
327
|
this.mintNew(context, options).then(function (options) {
|
|
334
|
-
|
|
328
|
+
const p = div.appendChild(dom.createElement('p'));
|
|
335
329
|
p.setAttribute('style', 'font-size: 140%;');
|
|
336
|
-
p.innerHTML =
|
|
337
|
-
})
|
|
330
|
+
p.innerHTML = 'Your <a href=\'' + options.newInstance.uri + '\'><b>new scheduler</b></a> is ready to be set up. ' + '<br/><br/><a href=\'' + options.newInstance.uri + '\'>Say when you what days work for you.</a>';
|
|
331
|
+
}).catch(function (error) {
|
|
338
332
|
complainIfBad(false, 'Error createing new scheduler at ' + options.newInstance + ': ' + error);
|
|
339
333
|
});
|
|
340
334
|
};
|
|
341
335
|
|
|
342
336
|
// ///////////////////////
|
|
343
337
|
|
|
344
|
-
|
|
338
|
+
const getForms = function () {
|
|
345
339
|
console.log('getforms()');
|
|
346
340
|
getDetails();
|
|
347
341
|
/*
|
|
@@ -352,7 +346,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
352
346
|
})
|
|
353
347
|
*/
|
|
354
348
|
};
|
|
355
|
-
|
|
349
|
+
const getDetails = function () {
|
|
356
350
|
console.log('getDetails()'); // Looking for blank screen hang-up
|
|
357
351
|
fetcher.nowOrWhenFetched(detailsDoc.uri, undefined, function (ok, body) {
|
|
358
352
|
console.log('getDetails() ok? ' + ok);
|
|
@@ -360,9 +354,9 @@ var schedulePane = exports.schedulePane = {
|
|
|
360
354
|
showAppropriateDisplay();
|
|
361
355
|
});
|
|
362
356
|
};
|
|
363
|
-
|
|
357
|
+
const showAppropriateDisplay = function showAppropriateDisplay() {
|
|
364
358
|
console.log('showAppropriateDisplay()');
|
|
365
|
-
_solidLogic.authn.checkUser().then(
|
|
359
|
+
_solidLogic.authn.checkUser().then(webId => {
|
|
366
360
|
if (!webId) {
|
|
367
361
|
return showSignon();
|
|
368
362
|
}
|
|
@@ -375,7 +369,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
375
369
|
showBootstrap(div);
|
|
376
370
|
return;
|
|
377
371
|
}
|
|
378
|
-
|
|
372
|
+
const ready = kb.any(subject, ns.sched('ready'));
|
|
379
373
|
if (!ready) {
|
|
380
374
|
showForms();
|
|
381
375
|
} else {
|
|
@@ -384,39 +378,39 @@ var schedulePane = exports.schedulePane = {
|
|
|
384
378
|
}
|
|
385
379
|
});
|
|
386
380
|
};
|
|
387
|
-
|
|
381
|
+
const showSignon = function showSignon() {
|
|
388
382
|
clearElement(naviMain);
|
|
389
|
-
|
|
390
|
-
div
|
|
391
|
-
dom
|
|
383
|
+
const signonContext = {
|
|
384
|
+
div,
|
|
385
|
+
dom
|
|
392
386
|
};
|
|
393
|
-
UI.login.ensureLoggedIn(signonContext).then(
|
|
387
|
+
UI.login.ensureLoggedIn(signonContext).then(context => {
|
|
394
388
|
me = context.me;
|
|
395
389
|
waitingForLogin = false; // untested
|
|
396
390
|
showAppropriateDisplay();
|
|
397
391
|
});
|
|
398
392
|
};
|
|
399
|
-
|
|
400
|
-
|
|
393
|
+
const showBootstrap = function showBootstrap() {
|
|
394
|
+
const div = clearElement(naviMain);
|
|
401
395
|
div.appendChild(UI.login.newAppInstance(dom, {
|
|
402
396
|
noun: 'poll'
|
|
403
397
|
}, initializeNewInstanceInWorkspace));
|
|
404
398
|
div.appendChild(dom.createElement('hr')); // @@
|
|
405
399
|
|
|
406
|
-
|
|
400
|
+
const p = div.appendChild(dom.createElement('p'));
|
|
407
401
|
p.textContent = 'Where would you like to store the data for the poll? ' + 'Give the URL of the directory where you would like the data stored.';
|
|
408
|
-
|
|
402
|
+
const baseField = div.appendChild(dom.createElement('input'));
|
|
409
403
|
baseField.setAttribute('type', 'text');
|
|
410
404
|
baseField.size = 80; // really a string
|
|
411
405
|
baseField.label = 'base URL';
|
|
412
406
|
baseField.autocomplete = 'on';
|
|
413
407
|
div.appendChild(dom.createElement('br')); // @@
|
|
414
408
|
|
|
415
|
-
|
|
409
|
+
const button = div.appendChild(dom.createElement('button'));
|
|
416
410
|
button.setAttribute('style', inputStyle);
|
|
417
411
|
button.textContent = 'Start new poll at this URI';
|
|
418
412
|
button.addEventListener('click', function (_e) {
|
|
419
|
-
|
|
413
|
+
let newBase = baseField.value;
|
|
420
414
|
if (newBase.slice(-1) !== '/') {
|
|
421
415
|
newBase += '/';
|
|
422
416
|
}
|
|
@@ -426,23 +420,23 @@ var schedulePane = exports.schedulePane = {
|
|
|
426
420
|
|
|
427
421
|
// ///////////// The forms to configure the poll
|
|
428
422
|
|
|
429
|
-
|
|
430
|
-
|
|
423
|
+
const doneButton = dom.createElement('button');
|
|
424
|
+
const showForms = function () {
|
|
431
425
|
clearElement(naviCenter); // Remove refresh button if nec
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
426
|
+
const div = naviMain;
|
|
427
|
+
const wizard = true;
|
|
428
|
+
let currentSlide = 0;
|
|
429
|
+
let gotDoneButton = false;
|
|
436
430
|
if (wizard) {
|
|
437
|
-
|
|
438
|
-
|
|
431
|
+
const forms = [form1, form2, form3];
|
|
432
|
+
const slides = [];
|
|
439
433
|
currentSlide = 0;
|
|
440
|
-
for (
|
|
441
|
-
|
|
434
|
+
for (let f = 0; f < forms.length; f++) {
|
|
435
|
+
const slide = dom.createElement('div');
|
|
442
436
|
UI.widgets.appendForm(document, slide, {}, subject, forms[f], detailsDoc, complainIfBad);
|
|
443
437
|
slides.push(slide);
|
|
444
438
|
}
|
|
445
|
-
|
|
439
|
+
const refresh = function () {
|
|
446
440
|
clearElement(naviMain).appendChild(slides[currentSlide]);
|
|
447
441
|
if (currentSlide === 0) {
|
|
448
442
|
b1.setAttribute('disabled', '');
|
|
@@ -461,7 +455,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
461
455
|
b2.removeAttribute('disabled');
|
|
462
456
|
}
|
|
463
457
|
};
|
|
464
|
-
|
|
458
|
+
const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'));
|
|
465
459
|
b1.setAttribute('style', inputStyle);
|
|
466
460
|
b1.textContent = '<- go back';
|
|
467
461
|
b1.addEventListener('click', function (_e) {
|
|
@@ -470,7 +464,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
470
464
|
refresh();
|
|
471
465
|
}
|
|
472
466
|
}, false);
|
|
473
|
-
|
|
467
|
+
const b2 = clearElement(naviRight).appendChild(dom.createElement('button'));
|
|
474
468
|
b2.setAttribute('style', inputStyle);
|
|
475
469
|
b2.textContent = 'continue ->';
|
|
476
470
|
b2.addEventListener('click', function (_e) {
|
|
@@ -483,7 +477,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
483
477
|
} else {
|
|
484
478
|
// not wizard one big form
|
|
485
479
|
// @@@ create the initial config doc if not exist
|
|
486
|
-
|
|
480
|
+
const table = div.appendChild(dom.createElement('table'));
|
|
487
481
|
UI.widgets.appendForm(document, table, {}, subject, form1, detailsDoc, complainIfBad);
|
|
488
482
|
UI.widgets.appendForm(document, table, {}, subject, form2, detailsDoc, complainIfBad);
|
|
489
483
|
UI.widgets.appendForm(document, table, {}, subject, form3, detailsDoc, complainIfBad);
|
|
@@ -491,7 +485,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
491
485
|
}
|
|
492
486
|
// @@@ link config to results
|
|
493
487
|
|
|
494
|
-
|
|
488
|
+
const insertables = [];
|
|
495
489
|
insertables.push($rdf.st(subject, ns.sched('availabilityOptions'), ns.sched('YesNoMaybe'), detailsDoc));
|
|
496
490
|
insertables.push($rdf.st(subject, ns.sched('ready'), new Date(), detailsDoc));
|
|
497
491
|
insertables.push($rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)); // @@ also link in results
|
|
@@ -515,16 +509,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
515
509
|
});
|
|
516
510
|
}
|
|
517
511
|
}, false);
|
|
518
|
-
|
|
512
|
+
const emailButton = dom.createElement('button');
|
|
519
513
|
emailButton.setAttribute('style', inputStyle);
|
|
520
|
-
|
|
514
|
+
const emailIcon = emailButton.appendChild(dom.createElement('img'));
|
|
521
515
|
emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg'); // noun_480183.svg
|
|
522
516
|
emailIcon.setAttribute('style', buttonIconStyle);
|
|
523
517
|
// emailButton.textContent = 'email invitations'
|
|
524
518
|
emailButton.addEventListener('click', function (_e) {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
519
|
+
const title = kb.anyValue(subject, ns.cal('summary')) || kb.anyValue(subject, ns.dc('title')) || '';
|
|
520
|
+
const mailto = 'mailto:' + kb.each(subject, ns.sched('invitee')).map(function (who) {
|
|
521
|
+
const mbox = kb.any(who, ns.foaf('mbox'));
|
|
528
522
|
return mbox ? mbox.uri.replace('mailto:', '') : '';
|
|
529
523
|
}).join(',') + '?subject=' + encodeURIComponent(title + '-- When can we meet?') + '&body=' + encodeURIComponent(title + '\n\nWhen can you?\n\nSee ' + subject + '\n');
|
|
530
524
|
// @@ assumed there is a data browser
|
|
@@ -656,7 +650,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
656
650
|
|
|
657
651
|
// Read or create empty results file
|
|
658
652
|
function getResults() {
|
|
659
|
-
fetcher.nowOrWhenFetched(resultsDoc.uri,
|
|
653
|
+
fetcher.nowOrWhenFetched(resultsDoc.uri, (ok, body, response) => {
|
|
660
654
|
if (!ok) {
|
|
661
655
|
if (response.status === 404) {
|
|
662
656
|
// / Check explicitly for 404 error
|
|
@@ -688,10 +682,10 @@ var schedulePane = exports.schedulePane = {
|
|
|
688
682
|
// div.appendChild(dom.createElement('hr'))
|
|
689
683
|
|
|
690
684
|
// const invitation = subject
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
685
|
+
const title = kb.any(invitation, ns.cal('summary'));
|
|
686
|
+
const comment = kb.any(invitation, ns.cal('comment'));
|
|
687
|
+
const location = kb.any(invitation, ns.cal('location'));
|
|
688
|
+
const div = naviMain;
|
|
695
689
|
if (title) div.appendChild(dom.createElement('h3')).textContent = title;
|
|
696
690
|
if (location) {
|
|
697
691
|
div.appendChild(dom.createElement('address')).textContent = location.value;
|
|
@@ -699,16 +693,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
699
693
|
if (comment) {
|
|
700
694
|
div.appendChild(dom.createElement('p')).textContent = comment.value;
|
|
701
695
|
}
|
|
702
|
-
|
|
696
|
+
const author = kb.any(invitation, ns.dc('author'));
|
|
703
697
|
if (author) {
|
|
704
|
-
|
|
698
|
+
const authorName = kb.any(author, ns.foaf('name'));
|
|
705
699
|
if (authorName) {
|
|
706
700
|
div.appendChild(dom.createElement('p')).textContent = authorName;
|
|
707
701
|
}
|
|
708
702
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
703
|
+
const query = new $rdf.Query('Responses');
|
|
704
|
+
const v = {};
|
|
705
|
+
const vs = ['time', 'author', 'value', 'resp', 'cell'];
|
|
712
706
|
vs.forEach(function (x) {
|
|
713
707
|
query.vars.push(v[x] = $rdf.variable(x));
|
|
714
708
|
});
|
|
@@ -720,7 +714,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
720
714
|
|
|
721
715
|
// Sort by by person @@@
|
|
722
716
|
|
|
723
|
-
|
|
717
|
+
const options = {};
|
|
724
718
|
options.set_x = kb.each(subject, ns.sched('option')); // @@@@@ option -> dtstart in future
|
|
725
719
|
options.set_x = options.set_x.map(function (opt) {
|
|
726
720
|
return kb.any(opt, ns.cal('dtstart'));
|
|
@@ -729,16 +723,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
729
723
|
options.set_y = options.set_y.map(function (resp) {
|
|
730
724
|
return kb.any(resp, ns.dc('author'));
|
|
731
725
|
});
|
|
732
|
-
|
|
726
|
+
const possibleTimes = kb.each(invitation, ns.sched('option')).map(function (opt) {
|
|
733
727
|
return kb.any(opt, ns.cal('dtstart'));
|
|
734
728
|
});
|
|
735
|
-
|
|
736
|
-
|
|
729
|
+
const displayTheMatrix = function () {
|
|
730
|
+
const matrix = div.appendChild(UI.matrix.matrixForQuery(dom, query, v.time, v.author, v.value, options, function () {}));
|
|
737
731
|
matrix.setAttribute('class', 'matrix');
|
|
738
|
-
|
|
732
|
+
const refreshButton = dom.createElement('button');
|
|
739
733
|
refreshButton.setAttribute('style', inputStyle);
|
|
740
734
|
// refreshButton.textContent = 'refresh' // noun_479395.svg
|
|
741
|
-
|
|
735
|
+
const refreshIcon = dom.createElement('img');
|
|
742
736
|
refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg');
|
|
743
737
|
refreshIcon.setAttribute('style', buttonIconStyle);
|
|
744
738
|
refreshButton.appendChild(refreshIcon);
|
|
@@ -762,14 +756,14 @@ var schedulePane = exports.schedulePane = {
|
|
|
762
756
|
|
|
763
757
|
// const me = authn.currentUser()
|
|
764
758
|
|
|
765
|
-
|
|
766
|
-
|
|
759
|
+
const dataPointForNT = [];
|
|
760
|
+
const loginContext = {
|
|
767
761
|
div: naviCenter,
|
|
768
|
-
dom
|
|
762
|
+
dom
|
|
769
763
|
};
|
|
770
|
-
UI.login.ensureLoggedIn(loginContext).then(
|
|
771
|
-
|
|
772
|
-
|
|
764
|
+
UI.login.ensureLoggedIn(loginContext).then(context => {
|
|
765
|
+
const me = context.me;
|
|
766
|
+
const doc = resultsDoc;
|
|
773
767
|
options.set_y = options.set_y.filter(function (z) {
|
|
774
768
|
return !z.sameTerm(me);
|
|
775
769
|
});
|
|
@@ -782,42 +776,42 @@ var schedulePane = exports.schedulePane = {
|
|
|
782
776
|
});
|
|
783
777
|
}
|
|
784
778
|
if (y.sameTerm(me)) {
|
|
785
|
-
|
|
779
|
+
const callbackFunction = function () {
|
|
786
780
|
refreshCellColor(cell, value);
|
|
787
781
|
}; // @@ may need that
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
782
|
+
const selectOptions = {};
|
|
783
|
+
const predicate = ns.sched('availabilty');
|
|
784
|
+
const cellSubject = dataPointForNT[x.toNT()];
|
|
785
|
+
const selector = UI.widgets.makeSelectForOptions(dom, kb, cellSubject, predicate, possibleAvailabilities, selectOptions, resultsDoc, callbackFunction);
|
|
792
786
|
cell.appendChild(selector);
|
|
793
787
|
} else if (value !== null) {
|
|
794
788
|
cell.textContent = UI.utils.label(value);
|
|
795
789
|
}
|
|
796
790
|
};
|
|
797
|
-
|
|
798
|
-
|
|
791
|
+
const responses = kb.each(invitation, ns.sched('response'));
|
|
792
|
+
let myResponse = null;
|
|
799
793
|
responses.forEach(function (r) {
|
|
800
794
|
if (kb.holds(r, ns.dc('author'), me)) {
|
|
801
795
|
myResponse = r;
|
|
802
796
|
}
|
|
803
797
|
});
|
|
804
|
-
|
|
798
|
+
const insertables = []; // list of statements to be stored
|
|
805
799
|
|
|
806
|
-
|
|
800
|
+
const id = UI.widgets.newThing(doc).uri;
|
|
807
801
|
if (myResponse === null) {
|
|
808
802
|
myResponse = $rdf.sym(id + '_response');
|
|
809
803
|
insertables.push($rdf.st(invitation, ns.sched('response'), myResponse, doc));
|
|
810
804
|
insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc));
|
|
811
805
|
} else {
|
|
812
|
-
|
|
806
|
+
const dps = kb.each(myResponse, ns.sched('cell'));
|
|
813
807
|
dps.forEach(function (dataPoint) {
|
|
814
|
-
|
|
808
|
+
const time = kb.any(dataPoint, ns.cal('dtstart'));
|
|
815
809
|
dataPointForNT[time.toNT()] = dataPoint;
|
|
816
810
|
});
|
|
817
811
|
}
|
|
818
|
-
for (
|
|
812
|
+
for (let j = 0; j < possibleTimes.length; j++) {
|
|
819
813
|
if (dataPointForNT[possibleTimes[j].toNT()]) continue;
|
|
820
|
-
|
|
814
|
+
const dataPoint = $rdf.sym(id + '_' + j);
|
|
821
815
|
insertables.push($rdf.st(myResponse, ns.sched('cell'), dataPoint, doc));
|
|
822
816
|
insertables.push($rdf.st(dataPoint, ns.cal('dtstart'), possibleTimes[j], doc)); // @@
|
|
823
817
|
dataPointForNT[possibleTimes[j].toNT()] = dataPoint;
|
|
@@ -838,12 +832,12 @@ var schedulePane = exports.schedulePane = {
|
|
|
838
832
|
|
|
839
833
|
// If I made this in the first place, allow me to edit it.
|
|
840
834
|
// @@ optionally -- allows others to if according to original
|
|
841
|
-
|
|
835
|
+
const instanceCreator = kb.any(subject, ns.foaf('maker')); // owner?
|
|
842
836
|
if (!instanceCreator || instanceCreator.sameTerm(me)) {
|
|
843
|
-
|
|
837
|
+
const editButton = dom.createElement('button');
|
|
844
838
|
editButton.setAttribute('style', inputStyle);
|
|
845
839
|
// editButton.textContent = '(Modify the poll)' // noun_344563.svg
|
|
846
|
-
|
|
840
|
+
const editIcon = dom.createElement('img');
|
|
847
841
|
editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg');
|
|
848
842
|
editIcon.setAttribute('style', buttonIconStyle);
|
|
849
843
|
editButton.appendChild(editIcon);
|
|
@@ -861,14 +855,14 @@ var schedulePane = exports.schedulePane = {
|
|
|
861
855
|
naviRight.appendChild(newInstanceButton());
|
|
862
856
|
} // showResults
|
|
863
857
|
|
|
864
|
-
|
|
865
|
-
|
|
858
|
+
const div = dom.createElement('div');
|
|
859
|
+
const structure = div.appendChild(dom.createElement('table')); // @@ make responsive style
|
|
866
860
|
structure.setAttribute('style', 'background-color: white; min-width: 40em; min-height: 13em;');
|
|
867
|
-
|
|
861
|
+
const naviLoginoutTR = structure.appendChild(dom.createElement('tr'));
|
|
868
862
|
naviLoginoutTR.appendChild(dom.createElement('td'));
|
|
869
863
|
naviLoginoutTR.appendChild(dom.createElement('td'));
|
|
870
864
|
naviLoginoutTR.appendChild(dom.createElement('td'));
|
|
871
|
-
|
|
865
|
+
const logInOutButton = null;
|
|
872
866
|
/*
|
|
873
867
|
const logInOutButton = UI.login.loginStatusBox(dom, setUser)
|
|
874
868
|
// floating divs lead to a mess
|
|
@@ -877,16 +871,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
877
871
|
logInOutButton.setAttribute('style', 'margin-right: 0em;')
|
|
878
872
|
*/
|
|
879
873
|
|
|
880
|
-
|
|
881
|
-
|
|
874
|
+
const naviTop = structure.appendChild(dom.createElement('tr'));
|
|
875
|
+
const naviMain = naviTop.appendChild(dom.createElement('td'));
|
|
882
876
|
naviMain.setAttribute('colspan', '3');
|
|
883
|
-
|
|
877
|
+
const naviMenu = structure.appendChild(dom.createElement('tr'));
|
|
884
878
|
naviMenu.setAttribute('class', 'naviMenu');
|
|
885
879
|
naviMenu.setAttribute('style', ' text-align: middle; vertical-align: middle; padding-top: 4em; ');
|
|
886
880
|
// naviMenu.setAttribute('style', 'margin-top: 3em;')
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
881
|
+
const naviLeft = naviMenu.appendChild(dom.createElement('td'));
|
|
882
|
+
const naviCenter = naviMenu.appendChild(dom.createElement('td'));
|
|
883
|
+
const naviRight = naviMenu.appendChild(dom.createElement('td'));
|
|
890
884
|
getForms();
|
|
891
885
|
return div;
|
|
892
886
|
} // render
|