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
|
@@ -1,35 +1,34 @@
|
|
|
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.schedulePane = void 0;
|
|
8
7
|
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
9
8
|
var _solidLogic = require("solid-logic");
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(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 (var _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); }
|
|
9
|
+
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
10
|
+
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
11
|
/* Scheduler Pane
|
|
14
12
|
**
|
|
15
13
|
**
|
|
16
14
|
*/
|
|
17
15
|
/* global alert */
|
|
16
|
+
/* babel-plugin-inline-import './formsForSchedule.ttl' */
|
|
17
|
+
const formText = "@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix sched: <http://www.w3.org/ns/pim/schedule#>.\n\n cal:Vevent ui:annotationForm <#form2>, <#form3>; ui:creationForm <#form1> .\n\n<#bigForm>\n dc:title\n \"Schedule event (single form).\";\n a ui:Group;\n ui:parts ( <#form1> <#form2> <#form3> ).\n\n<#form1>\n dc:title\n \"Schedule an event (wizard)\";\n a ui:Form;\n ui:parts (\n <#form1header>\n <#eventTitle>\n <#eventLocation>\n <#eventType>\n <#eventSwitch>\n <#eventComment>\n <#eventAuthor> ).\n\n<#form1header> a ui:Heading; ui:contents \"Schedule an event\" .\n\n<#eventTitle>\n a ui:SingleLineTextField;\n ui:maxLength\n \"128\";\n ui:property\n cal:summary;\n ui:size\n \"40\".\n\n<#eventLocation>\n a ui:SingleLineTextField;\n ui:maxLength\n \"512\";\n ui:property\n cal:location;\n ui:size\n \"40\".\n\n<#eventType> a ui:BooleanField;\n ui:property sched:allDay;\n ui:default true . # Used to be the only way\n\n<#eventSwitch> a ui:Options;\n ui:dependingOn sched:allDay;\n ui:case [ ui:for true; ui:use <#AllDayForm> ];\n ui:case [ ui:for false; ui:use <#NotAllDayForm> ].\n\n <#AllDayForm> a ui:IntegerField ;\n ui:property sched:durationInDays;\n ui:label \"How many days?\";\n ui:min 1;\n ui:default 1 .\n\n <#NotAllDayForm> a ui:IntegerField ;\n ui:property sched:durationInMinutes;\n ui:label \"Duration (mins)\";\n ui:min 5;\n ui:default 55 .\n\n<#eventComment>\n a ui:MultiLineTextField;\n# ui:maxLength\n# \"1048\";\n# ui:size\n# \"40\".\n ui:property\n cal:comment.\n\n<#eventAuthor>\n a ui:Multiple; ui:min 1; ui:part <#eventAuthorGroup>; ui:property dc:author.\n\n <#eventAuthorGroup> a ui:Group; ui:parts ( <#authorName> <#authorEmail> ) .\n <#authorName> a ui:SingleLineTextField; ui:property foaf:name .\n <#authorEmail> a ui:EmailField; ui:label \"email\"; ui:property foaf:mbox .\n\n\n#####################\n\n<#form2> dc:title \"Select possible days or times\"; a ui:Form;\n ui:parts ( <#id1118132113134> <#possibleSwitch> ).\n\n <#id1118132113134> a ui:Heading; ui:contents \"Time proposals\" .\n\n <#possibleSwitch> a ui:Options;\n ui:dependingOn sched:allDay;\n ui:case [ ui:for true; ui:use <#AllDayForm2> ];\n ui:case [ ui:for false; ui:use <#NotAllDayForm2> ].\n\n <#AllDayForm2>\n a ui:Multiple; ui:min 2; ui:part <#posssibleDate>; ui:property sched:option.\n <#posssibleDate> a ui:DateField; ui:property cal:dtstart; ui:label \"date\".\n\n <#NotAllDayForm2>\n a ui:Multiple; ui:min 2; ui:part <#posssibleTime>; ui:property sched:option.\n <#posssibleTime> a ui:DateTimeField; ui:property cal:dtstart; ui:label \"date and time\".\n\n ##################################\n\n <#form3> dc:title \"Select invited people\"; a ui:Form; ui:parts ( <#id1118132113135> <#id1417314641301b> ) .\n<#id1417314641301b>\n a ui:Multiple; ui:min 1; ui:part <#id1417314674292b>; ui:property sched:invitee.\n <#id1417314674292b> a ui:EmailField; ui:label \"email\"; ui:property foaf:mbox .\n <#id1118132113135> a ui:Heading; ui:contents \"Who to invite\" .\n\n# ENDS\n";
|
|
18
|
+
const ns = UI.ns;
|
|
18
19
|
|
|
19
|
-
var $rdf = UI.rdf;
|
|
20
|
-
var ns = UI.ns;
|
|
21
20
|
// @@ Give other combos too-- see schedule ontology
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const possibleAvailabilities = [ns.sched('No'), ns.sched('Maybe'), ns.sched('Yes')];
|
|
22
|
+
const schedulePane = exports.schedulePane = {
|
|
24
23
|
icon: UI.icons.iconBase + 'noun_346777.svg',
|
|
25
24
|
// @@ better?
|
|
26
25
|
|
|
27
26
|
name: 'schedule',
|
|
28
27
|
audience: [ns.solid('PowerUser')],
|
|
29
28
|
// Does the subject deserve an Scheduler pane?
|
|
30
|
-
label: function
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
label: function (subject, context) {
|
|
30
|
+
const kb = context.session.store;
|
|
31
|
+
const t = kb.findTypeURIs(subject);
|
|
33
32
|
if (t['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) {
|
|
34
33
|
return 'Scheduling poll';
|
|
35
34
|
}
|
|
@@ -37,13 +36,13 @@ var schedulePane = exports.schedulePane = {
|
|
|
37
36
|
},
|
|
38
37
|
// Mint a new Schedule poll
|
|
39
38
|
mintClass: ns.sched('SchedulableEvent'),
|
|
40
|
-
mintNew: function
|
|
39
|
+
mintNew: function (context, options) {
|
|
41
40
|
return new Promise(function (resolve, reject) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const ns = UI.ns;
|
|
42
|
+
const kb = context.session.store;
|
|
43
|
+
let newBase = options.newBase;
|
|
44
|
+
const thisInstance = options.useExisting || $rdf.sym(options.newBase + 'index.ttl#this');
|
|
45
|
+
const complainIfBad = function (ok, body) {
|
|
47
46
|
if (ok) return;
|
|
48
47
|
console.log('Error in Schedule Pane: Error constructing new scheduler: ' + body);
|
|
49
48
|
reject(new Error(body));
|
|
@@ -54,12 +53,12 @@ var schedulePane = exports.schedulePane = {
|
|
|
54
53
|
// Two constiations of ACL for this app, public read and public read/write
|
|
55
54
|
// In all cases owner has read write control
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
const genACLtext = function (docURI, aclURI, allWrite) {
|
|
57
|
+
const g = $rdf.graph();
|
|
58
|
+
const auth = $rdf.Namespace('http://www.w3.org/ns/auth/acl#');
|
|
59
|
+
let a = g.sym(aclURI + '#a1');
|
|
60
|
+
const acl = g.sym(aclURI);
|
|
61
|
+
const doc = g.sym(docURI);
|
|
63
62
|
g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl);
|
|
64
63
|
g.add(a, auth('accessTo'), doc, acl);
|
|
65
64
|
g.add(a, auth('agent'), me, acl);
|
|
@@ -84,53 +83,49 @@ var schedulePane = exports.schedulePane = {
|
|
|
84
83
|
}
|
|
85
84
|
*/
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
const setACL2 = function setACL2(docURI, allWrite, callbackFunction) {
|
|
87
|
+
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
88
|
|
|
90
89
|
if (aclDoc) {
|
|
91
90
|
// Great we already know where it is
|
|
92
|
-
|
|
91
|
+
const aclText = genACLtext(docURI, aclDoc.uri, allWrite);
|
|
93
92
|
return fetcher.webOperation('PUT', aclDoc.uri, {
|
|
94
93
|
data: aclText,
|
|
95
94
|
contentType: 'text/turtle'
|
|
96
|
-
}).then(
|
|
97
|
-
return callbackFunction(true);
|
|
98
|
-
})["catch"](function (err) {
|
|
95
|
+
}).then(_result => callbackFunction(true)).catch(err => {
|
|
99
96
|
callbackFunction(false, err.message);
|
|
100
97
|
});
|
|
101
98
|
} else {
|
|
102
|
-
return fetcher.load(docURI)
|
|
99
|
+
return fetcher.load(docURI).catch(err => {
|
|
103
100
|
callbackFunction(false, 'Getting headers for ACL: ' + err);
|
|
104
|
-
}).then(
|
|
105
|
-
|
|
101
|
+
}).then(() => {
|
|
102
|
+
const aclDoc = kb.any(kb.sym(docURI), kb.sym('http://www.iana.org/assignments/link-relations/acl'));
|
|
106
103
|
if (!aclDoc) {
|
|
107
104
|
// complainIfBad(false, "No Link rel=ACL header for " + docURI)
|
|
108
105
|
throw new Error('No Link rel=ACL header for ' + docURI);
|
|
109
106
|
}
|
|
110
|
-
|
|
107
|
+
const aclText = genACLtext(docURI, aclDoc.uri, allWrite);
|
|
111
108
|
return fetcher.webOperation('PUT', aclDoc.uri, {
|
|
112
109
|
data: aclText,
|
|
113
110
|
contentType: 'text/turtle'
|
|
114
111
|
});
|
|
115
|
-
}).then(
|
|
116
|
-
return callbackFunction(true);
|
|
117
|
-
})["catch"](function (err) {
|
|
112
|
+
}).then(_result => callbackFunction(true)).catch(err => {
|
|
118
113
|
callbackFunction(false, err.message);
|
|
119
114
|
});
|
|
120
115
|
}
|
|
121
116
|
};
|
|
122
117
|
|
|
123
118
|
// Body of mintNew
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
const fetcher = kb.fetcher;
|
|
120
|
+
const updater = kb.updater;
|
|
121
|
+
let me = options.me || _solidLogic.authn.currentUser();
|
|
127
122
|
if (!me) {
|
|
128
123
|
console.log('MUST BE LOGGED IN');
|
|
129
124
|
alert('NOT LOGGED IN');
|
|
130
125
|
return;
|
|
131
126
|
}
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
const base = thisInstance.dir().uri;
|
|
128
|
+
let newDetailsDoc, newInstance; // , newIndexDoc
|
|
134
129
|
|
|
135
130
|
if (options.useExisting) {
|
|
136
131
|
newInstance = options.useExisting;
|
|
@@ -145,21 +140,21 @@ var schedulePane = exports.schedulePane = {
|
|
|
145
140
|
// newIndexDoc = kb.sym(newBase + 'index.html')
|
|
146
141
|
newInstance = kb.sym(newDetailsDoc.uri + '#event');
|
|
147
142
|
}
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
const newResultsDoc = kb.sym(newBase + 'results.ttl');
|
|
144
|
+
const toBeCopied = options.noIndexHTML ? {} : [{
|
|
150
145
|
local: 'index.html',
|
|
151
146
|
contentType: 'text/html'
|
|
152
147
|
}];
|
|
153
|
-
|
|
148
|
+
const agenda = [];
|
|
154
149
|
|
|
155
150
|
// @@ This needs some form of visible progress bar
|
|
156
|
-
for (
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
for (let f = 0; f < toBeCopied.length; f++) {
|
|
152
|
+
const item = toBeCopied[f];
|
|
153
|
+
const fun = function copyItem(item) {
|
|
159
154
|
agenda.push(function () {
|
|
160
|
-
|
|
155
|
+
const newURI = newBase + item.local;
|
|
161
156
|
console.log('Copying ' + base + item.local + ' to ' + newURI);
|
|
162
|
-
|
|
157
|
+
const setThatACL = function () {
|
|
163
158
|
setACL2(newURI, false, function (ok, message) {
|
|
164
159
|
if (!ok) {
|
|
165
160
|
complainIfBad(ok, 'FAILED to set ACL ' + newURI + ' : ' + message);
|
|
@@ -169,12 +164,10 @@ var schedulePane = exports.schedulePane = {
|
|
|
169
164
|
}
|
|
170
165
|
});
|
|
171
166
|
};
|
|
172
|
-
kb.fetcher.webCopy(base + item.local, newBase + item.local, item.contentType).then(
|
|
173
|
-
return _solidLogic.authn.checkUser();
|
|
174
|
-
}).then(function (webId) {
|
|
167
|
+
kb.fetcher.webCopy(base + item.local, newBase + item.local, item.contentType).then(() => _solidLogic.authn.checkUser()).then(webId => {
|
|
175
168
|
me = webId;
|
|
176
169
|
setThatACL();
|
|
177
|
-
})
|
|
170
|
+
}).catch(err => {
|
|
178
171
|
console.log('FAILED to copy ' + base + item.local + ' : ' + err.message);
|
|
179
172
|
complainIfBad(false, 'FAILED to copy ' + base + item.local + ' : ' + err.message);
|
|
180
173
|
});
|
|
@@ -203,9 +196,9 @@ var schedulePane = exports.schedulePane = {
|
|
|
203
196
|
kb.fetcher.webOperation('PUT', newResultsDoc.uri, {
|
|
204
197
|
data: '',
|
|
205
198
|
contentType: 'text/turtle'
|
|
206
|
-
}).then(
|
|
199
|
+
}).then(() => {
|
|
207
200
|
agenda.shift()();
|
|
208
|
-
})
|
|
201
|
+
}).catch(err => {
|
|
209
202
|
complainIfBad(false, 'Failed to initialize empty results file: ' + err.message);
|
|
210
203
|
});
|
|
211
204
|
});
|
|
@@ -234,55 +227,55 @@ var schedulePane = exports.schedulePane = {
|
|
|
234
227
|
// mintNew
|
|
235
228
|
|
|
236
229
|
// Render one meeting schedule poll
|
|
237
|
-
render: function
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
230
|
+
render: function (subject, context) {
|
|
231
|
+
const dom = context.dom;
|
|
232
|
+
const kb = context.session.store;
|
|
233
|
+
const ns = UI.ns;
|
|
234
|
+
const invitation = subject;
|
|
235
|
+
const appPathSegment = 'app-when-can-we.w3.org'; // how to allocate this string and connect to
|
|
243
236
|
|
|
244
237
|
// ////////////////////////////////////////////
|
|
245
238
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
239
|
+
const fetcher = kb.fetcher;
|
|
240
|
+
const updater = kb.updater;
|
|
241
|
+
let waitingForLogin = false;
|
|
242
|
+
const thisInstance = subject;
|
|
243
|
+
const detailsDoc = subject.doc();
|
|
244
|
+
const baseDir = detailsDoc.dir();
|
|
245
|
+
const base = baseDir.uri;
|
|
246
|
+
const resultsDoc = $rdf.sym(base + 'results.ttl');
|
|
254
247
|
// const formsURI = base + 'forms.ttl'
|
|
255
248
|
// We can't in fact host stuff from there because of CORS
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
$rdf.parse(
|
|
249
|
+
const formsURI = 'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl';
|
|
250
|
+
const form1 = kb.sym(formsURI + '#form1');
|
|
251
|
+
const form2 = kb.sym(formsURI + '#form2');
|
|
252
|
+
const form3 = kb.sym(formsURI + '#form3');
|
|
253
|
+
$rdf.parse(formText, kb, formsURI, 'text/turtle'); // Load forms directly
|
|
261
254
|
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
const inputStyle = 'background-color: #eef; padding: 0.5em; border: .5em solid white; font-size: 100%'; // font-size: 120%
|
|
256
|
+
const buttonIconStyle = 'width: 1.8em; height: 1.8em;';
|
|
264
257
|
|
|
265
258
|
// Utility functions
|
|
266
259
|
|
|
267
|
-
|
|
260
|
+
const complainIfBad = function (ok, message) {
|
|
268
261
|
if (!ok) {
|
|
269
262
|
div.appendChild(UI.widgets.errorMessageBlock(dom, message, 'pink'));
|
|
270
263
|
}
|
|
271
264
|
};
|
|
272
|
-
|
|
265
|
+
const clearElement = function (ele) {
|
|
273
266
|
while (ele.firstChild) {
|
|
274
267
|
ele.removeChild(ele.firstChild);
|
|
275
268
|
}
|
|
276
269
|
return ele;
|
|
277
270
|
};
|
|
278
|
-
|
|
279
|
-
|
|
271
|
+
const refreshCellColor = function (cell, value) {
|
|
272
|
+
const bg = kb.any(value, UI.ns.ui('backgroundColor'));
|
|
280
273
|
if (bg) {
|
|
281
274
|
cell.setAttribute('style', 'padding: 0.3em; text-align: center; background-color: ' + bg + ';');
|
|
282
275
|
}
|
|
283
276
|
};
|
|
284
|
-
|
|
285
|
-
_solidLogic.authn.checkUser().then(
|
|
277
|
+
let me;
|
|
278
|
+
_solidLogic.authn.checkUser().then(webId => {
|
|
286
279
|
me = webId;
|
|
287
280
|
if (logInOutButton) {
|
|
288
281
|
logInOutButton.refresh();
|
|
@@ -299,8 +292,8 @@ var schedulePane = exports.schedulePane = {
|
|
|
299
292
|
// Viral growth path: user of app decides to make another instance
|
|
300
293
|
//
|
|
301
294
|
|
|
302
|
-
|
|
303
|
-
|
|
295
|
+
const newInstanceButton = function () {
|
|
296
|
+
const b = UI.login.newAppInstance(dom, {
|
|
304
297
|
noun: 'scheduler'
|
|
305
298
|
}, initializeNewInstanceInWorkspace);
|
|
306
299
|
b.firstChild.setAttribute('style', inputStyle);
|
|
@@ -309,8 +302,8 @@ var schedulePane = exports.schedulePane = {
|
|
|
309
302
|
|
|
310
303
|
// /////////////////////// Create new document files for new instance of app
|
|
311
304
|
|
|
312
|
-
|
|
313
|
-
|
|
305
|
+
const initializeNewInstanceInWorkspace = function (ws) {
|
|
306
|
+
let newBase = kb.any(ws, ns.space('uriPrefix'));
|
|
314
307
|
if (!newBase) {
|
|
315
308
|
newBase = ws.uri.split('#')[0];
|
|
316
309
|
} else {
|
|
@@ -320,28 +313,28 @@ var schedulePane = exports.schedulePane = {
|
|
|
320
313
|
$rdf.log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase); // @@ paramater?
|
|
321
314
|
newBase = newBase + '/';
|
|
322
315
|
}
|
|
323
|
-
|
|
316
|
+
const now = new Date();
|
|
324
317
|
newBase += appPathSegment + '/id' + now.getTime() + '/'; // unique id
|
|
325
318
|
|
|
326
319
|
initializeNewInstanceAtBase(thisInstance, newBase);
|
|
327
320
|
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
thisInstance
|
|
331
|
-
newBase
|
|
321
|
+
const initializeNewInstanceAtBase = function (thisInstance, newBase) {
|
|
322
|
+
const options = {
|
|
323
|
+
thisInstance,
|
|
324
|
+
newBase
|
|
332
325
|
};
|
|
333
326
|
this.mintNew(context, options).then(function (options) {
|
|
334
|
-
|
|
327
|
+
const p = div.appendChild(dom.createElement('p'));
|
|
335
328
|
p.setAttribute('style', 'font-size: 140%;');
|
|
336
|
-
p.innerHTML =
|
|
337
|
-
})
|
|
329
|
+
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>';
|
|
330
|
+
}).catch(function (error) {
|
|
338
331
|
complainIfBad(false, 'Error createing new scheduler at ' + options.newInstance + ': ' + error);
|
|
339
332
|
});
|
|
340
333
|
};
|
|
341
334
|
|
|
342
335
|
// ///////////////////////
|
|
343
336
|
|
|
344
|
-
|
|
337
|
+
const getForms = function () {
|
|
345
338
|
console.log('getforms()');
|
|
346
339
|
getDetails();
|
|
347
340
|
/*
|
|
@@ -352,7 +345,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
352
345
|
})
|
|
353
346
|
*/
|
|
354
347
|
};
|
|
355
|
-
|
|
348
|
+
const getDetails = function () {
|
|
356
349
|
console.log('getDetails()'); // Looking for blank screen hang-up
|
|
357
350
|
fetcher.nowOrWhenFetched(detailsDoc.uri, undefined, function (ok, body) {
|
|
358
351
|
console.log('getDetails() ok? ' + ok);
|
|
@@ -360,9 +353,9 @@ var schedulePane = exports.schedulePane = {
|
|
|
360
353
|
showAppropriateDisplay();
|
|
361
354
|
});
|
|
362
355
|
};
|
|
363
|
-
|
|
356
|
+
const showAppropriateDisplay = function showAppropriateDisplay() {
|
|
364
357
|
console.log('showAppropriateDisplay()');
|
|
365
|
-
_solidLogic.authn.checkUser().then(
|
|
358
|
+
_solidLogic.authn.checkUser().then(webId => {
|
|
366
359
|
if (!webId) {
|
|
367
360
|
return showSignon();
|
|
368
361
|
}
|
|
@@ -375,7 +368,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
375
368
|
showBootstrap(div);
|
|
376
369
|
return;
|
|
377
370
|
}
|
|
378
|
-
|
|
371
|
+
const ready = kb.any(subject, ns.sched('ready'));
|
|
379
372
|
if (!ready) {
|
|
380
373
|
showForms();
|
|
381
374
|
} else {
|
|
@@ -384,39 +377,39 @@ var schedulePane = exports.schedulePane = {
|
|
|
384
377
|
}
|
|
385
378
|
});
|
|
386
379
|
};
|
|
387
|
-
|
|
380
|
+
const showSignon = function showSignon() {
|
|
388
381
|
clearElement(naviMain);
|
|
389
|
-
|
|
390
|
-
div
|
|
391
|
-
dom
|
|
382
|
+
const signonContext = {
|
|
383
|
+
div,
|
|
384
|
+
dom
|
|
392
385
|
};
|
|
393
|
-
UI.login.ensureLoggedIn(signonContext).then(
|
|
386
|
+
UI.login.ensureLoggedIn(signonContext).then(context => {
|
|
394
387
|
me = context.me;
|
|
395
388
|
waitingForLogin = false; // untested
|
|
396
389
|
showAppropriateDisplay();
|
|
397
390
|
});
|
|
398
391
|
};
|
|
399
|
-
|
|
400
|
-
|
|
392
|
+
const showBootstrap = function showBootstrap() {
|
|
393
|
+
const div = clearElement(naviMain);
|
|
401
394
|
div.appendChild(UI.login.newAppInstance(dom, {
|
|
402
395
|
noun: 'poll'
|
|
403
396
|
}, initializeNewInstanceInWorkspace));
|
|
404
397
|
div.appendChild(dom.createElement('hr')); // @@
|
|
405
398
|
|
|
406
|
-
|
|
399
|
+
const p = div.appendChild(dom.createElement('p'));
|
|
407
400
|
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
|
-
|
|
401
|
+
const baseField = div.appendChild(dom.createElement('input'));
|
|
409
402
|
baseField.setAttribute('type', 'text');
|
|
410
403
|
baseField.size = 80; // really a string
|
|
411
404
|
baseField.label = 'base URL';
|
|
412
405
|
baseField.autocomplete = 'on';
|
|
413
406
|
div.appendChild(dom.createElement('br')); // @@
|
|
414
407
|
|
|
415
|
-
|
|
408
|
+
const button = div.appendChild(dom.createElement('button'));
|
|
416
409
|
button.setAttribute('style', inputStyle);
|
|
417
410
|
button.textContent = 'Start new poll at this URI';
|
|
418
411
|
button.addEventListener('click', function (_e) {
|
|
419
|
-
|
|
412
|
+
let newBase = baseField.value;
|
|
420
413
|
if (newBase.slice(-1) !== '/') {
|
|
421
414
|
newBase += '/';
|
|
422
415
|
}
|
|
@@ -426,23 +419,23 @@ var schedulePane = exports.schedulePane = {
|
|
|
426
419
|
|
|
427
420
|
// ///////////// The forms to configure the poll
|
|
428
421
|
|
|
429
|
-
|
|
430
|
-
|
|
422
|
+
const doneButton = dom.createElement('button');
|
|
423
|
+
const showForms = function () {
|
|
431
424
|
clearElement(naviCenter); // Remove refresh button if nec
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
425
|
+
const div = naviMain;
|
|
426
|
+
const wizard = true;
|
|
427
|
+
let currentSlide = 0;
|
|
428
|
+
let gotDoneButton = false;
|
|
436
429
|
if (wizard) {
|
|
437
|
-
|
|
438
|
-
|
|
430
|
+
const forms = [form1, form2, form3];
|
|
431
|
+
const slides = [];
|
|
439
432
|
currentSlide = 0;
|
|
440
|
-
for (
|
|
441
|
-
|
|
433
|
+
for (let f = 0; f < forms.length; f++) {
|
|
434
|
+
const slide = dom.createElement('div');
|
|
442
435
|
UI.widgets.appendForm(document, slide, {}, subject, forms[f], detailsDoc, complainIfBad);
|
|
443
436
|
slides.push(slide);
|
|
444
437
|
}
|
|
445
|
-
|
|
438
|
+
const refresh = function () {
|
|
446
439
|
clearElement(naviMain).appendChild(slides[currentSlide]);
|
|
447
440
|
if (currentSlide === 0) {
|
|
448
441
|
b1.setAttribute('disabled', '');
|
|
@@ -461,7 +454,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
461
454
|
b2.removeAttribute('disabled');
|
|
462
455
|
}
|
|
463
456
|
};
|
|
464
|
-
|
|
457
|
+
const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'));
|
|
465
458
|
b1.setAttribute('style', inputStyle);
|
|
466
459
|
b1.textContent = '<- go back';
|
|
467
460
|
b1.addEventListener('click', function (_e) {
|
|
@@ -470,7 +463,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
470
463
|
refresh();
|
|
471
464
|
}
|
|
472
465
|
}, false);
|
|
473
|
-
|
|
466
|
+
const b2 = clearElement(naviRight).appendChild(dom.createElement('button'));
|
|
474
467
|
b2.setAttribute('style', inputStyle);
|
|
475
468
|
b2.textContent = 'continue ->';
|
|
476
469
|
b2.addEventListener('click', function (_e) {
|
|
@@ -483,7 +476,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
483
476
|
} else {
|
|
484
477
|
// not wizard one big form
|
|
485
478
|
// @@@ create the initial config doc if not exist
|
|
486
|
-
|
|
479
|
+
const table = div.appendChild(dom.createElement('table'));
|
|
487
480
|
UI.widgets.appendForm(document, table, {}, subject, form1, detailsDoc, complainIfBad);
|
|
488
481
|
UI.widgets.appendForm(document, table, {}, subject, form2, detailsDoc, complainIfBad);
|
|
489
482
|
UI.widgets.appendForm(document, table, {}, subject, form3, detailsDoc, complainIfBad);
|
|
@@ -491,7 +484,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
491
484
|
}
|
|
492
485
|
// @@@ link config to results
|
|
493
486
|
|
|
494
|
-
|
|
487
|
+
const insertables = [];
|
|
495
488
|
insertables.push($rdf.st(subject, ns.sched('availabilityOptions'), ns.sched('YesNoMaybe'), detailsDoc));
|
|
496
489
|
insertables.push($rdf.st(subject, ns.sched('ready'), new Date(), detailsDoc));
|
|
497
490
|
insertables.push($rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)); // @@ also link in results
|
|
@@ -515,16 +508,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
515
508
|
});
|
|
516
509
|
}
|
|
517
510
|
}, false);
|
|
518
|
-
|
|
511
|
+
const emailButton = dom.createElement('button');
|
|
519
512
|
emailButton.setAttribute('style', inputStyle);
|
|
520
|
-
|
|
513
|
+
const emailIcon = emailButton.appendChild(dom.createElement('img'));
|
|
521
514
|
emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg'); // noun_480183.svg
|
|
522
515
|
emailIcon.setAttribute('style', buttonIconStyle);
|
|
523
516
|
// emailButton.textContent = 'email invitations'
|
|
524
517
|
emailButton.addEventListener('click', function (_e) {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
518
|
+
const title = kb.anyValue(subject, ns.cal('summary')) || kb.anyValue(subject, ns.dc('title')) || '';
|
|
519
|
+
const mailto = 'mailto:' + kb.each(subject, ns.sched('invitee')).map(function (who) {
|
|
520
|
+
const mbox = kb.any(who, ns.foaf('mbox'));
|
|
528
521
|
return mbox ? mbox.uri.replace('mailto:', '') : '';
|
|
529
522
|
}).join(',') + '?subject=' + encodeURIComponent(title + '-- When can we meet?') + '&body=' + encodeURIComponent(title + '\n\nWhen can you?\n\nSee ' + subject + '\n');
|
|
530
523
|
// @@ assumed there is a data browser
|
|
@@ -656,7 +649,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
656
649
|
|
|
657
650
|
// Read or create empty results file
|
|
658
651
|
function getResults() {
|
|
659
|
-
fetcher.nowOrWhenFetched(resultsDoc.uri,
|
|
652
|
+
fetcher.nowOrWhenFetched(resultsDoc.uri, (ok, body, response) => {
|
|
660
653
|
if (!ok) {
|
|
661
654
|
if (response.status === 404) {
|
|
662
655
|
// / Check explicitly for 404 error
|
|
@@ -688,10 +681,10 @@ var schedulePane = exports.schedulePane = {
|
|
|
688
681
|
// div.appendChild(dom.createElement('hr'))
|
|
689
682
|
|
|
690
683
|
// const invitation = subject
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
684
|
+
const title = kb.any(invitation, ns.cal('summary'));
|
|
685
|
+
const comment = kb.any(invitation, ns.cal('comment'));
|
|
686
|
+
const location = kb.any(invitation, ns.cal('location'));
|
|
687
|
+
const div = naviMain;
|
|
695
688
|
if (title) div.appendChild(dom.createElement('h3')).textContent = title;
|
|
696
689
|
if (location) {
|
|
697
690
|
div.appendChild(dom.createElement('address')).textContent = location.value;
|
|
@@ -699,16 +692,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
699
692
|
if (comment) {
|
|
700
693
|
div.appendChild(dom.createElement('p')).textContent = comment.value;
|
|
701
694
|
}
|
|
702
|
-
|
|
695
|
+
const author = kb.any(invitation, ns.dc('author'));
|
|
703
696
|
if (author) {
|
|
704
|
-
|
|
697
|
+
const authorName = kb.any(author, ns.foaf('name'));
|
|
705
698
|
if (authorName) {
|
|
706
699
|
div.appendChild(dom.createElement('p')).textContent = authorName;
|
|
707
700
|
}
|
|
708
701
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
702
|
+
const query = new $rdf.Query('Responses');
|
|
703
|
+
const v = {};
|
|
704
|
+
const vs = ['time', 'author', 'value', 'resp', 'cell'];
|
|
712
705
|
vs.forEach(function (x) {
|
|
713
706
|
query.vars.push(v[x] = $rdf.variable(x));
|
|
714
707
|
});
|
|
@@ -720,7 +713,7 @@ var schedulePane = exports.schedulePane = {
|
|
|
720
713
|
|
|
721
714
|
// Sort by by person @@@
|
|
722
715
|
|
|
723
|
-
|
|
716
|
+
const options = {};
|
|
724
717
|
options.set_x = kb.each(subject, ns.sched('option')); // @@@@@ option -> dtstart in future
|
|
725
718
|
options.set_x = options.set_x.map(function (opt) {
|
|
726
719
|
return kb.any(opt, ns.cal('dtstart'));
|
|
@@ -729,16 +722,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
729
722
|
options.set_y = options.set_y.map(function (resp) {
|
|
730
723
|
return kb.any(resp, ns.dc('author'));
|
|
731
724
|
});
|
|
732
|
-
|
|
725
|
+
const possibleTimes = kb.each(invitation, ns.sched('option')).map(function (opt) {
|
|
733
726
|
return kb.any(opt, ns.cal('dtstart'));
|
|
734
727
|
});
|
|
735
|
-
|
|
736
|
-
|
|
728
|
+
const displayTheMatrix = function () {
|
|
729
|
+
const matrix = div.appendChild(UI.matrix.matrixForQuery(dom, query, v.time, v.author, v.value, options, function () {}));
|
|
737
730
|
matrix.setAttribute('class', 'matrix');
|
|
738
|
-
|
|
731
|
+
const refreshButton = dom.createElement('button');
|
|
739
732
|
refreshButton.setAttribute('style', inputStyle);
|
|
740
733
|
// refreshButton.textContent = 'refresh' // noun_479395.svg
|
|
741
|
-
|
|
734
|
+
const refreshIcon = dom.createElement('img');
|
|
742
735
|
refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg');
|
|
743
736
|
refreshIcon.setAttribute('style', buttonIconStyle);
|
|
744
737
|
refreshButton.appendChild(refreshIcon);
|
|
@@ -762,14 +755,14 @@ var schedulePane = exports.schedulePane = {
|
|
|
762
755
|
|
|
763
756
|
// const me = authn.currentUser()
|
|
764
757
|
|
|
765
|
-
|
|
766
|
-
|
|
758
|
+
const dataPointForNT = [];
|
|
759
|
+
const loginContext = {
|
|
767
760
|
div: naviCenter,
|
|
768
|
-
dom
|
|
761
|
+
dom
|
|
769
762
|
};
|
|
770
|
-
UI.login.ensureLoggedIn(loginContext).then(
|
|
771
|
-
|
|
772
|
-
|
|
763
|
+
UI.login.ensureLoggedIn(loginContext).then(context => {
|
|
764
|
+
const me = context.me;
|
|
765
|
+
const doc = resultsDoc;
|
|
773
766
|
options.set_y = options.set_y.filter(function (z) {
|
|
774
767
|
return !z.sameTerm(me);
|
|
775
768
|
});
|
|
@@ -782,42 +775,42 @@ var schedulePane = exports.schedulePane = {
|
|
|
782
775
|
});
|
|
783
776
|
}
|
|
784
777
|
if (y.sameTerm(me)) {
|
|
785
|
-
|
|
778
|
+
const callbackFunction = function () {
|
|
786
779
|
refreshCellColor(cell, value);
|
|
787
780
|
}; // @@ may need that
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
781
|
+
const selectOptions = {};
|
|
782
|
+
const predicate = ns.sched('availabilty');
|
|
783
|
+
const cellSubject = dataPointForNT[x.toNT()];
|
|
784
|
+
const selector = UI.widgets.makeSelectForOptions(dom, kb, cellSubject, predicate, possibleAvailabilities, selectOptions, resultsDoc, callbackFunction);
|
|
792
785
|
cell.appendChild(selector);
|
|
793
786
|
} else if (value !== null) {
|
|
794
787
|
cell.textContent = UI.utils.label(value);
|
|
795
788
|
}
|
|
796
789
|
};
|
|
797
|
-
|
|
798
|
-
|
|
790
|
+
const responses = kb.each(invitation, ns.sched('response'));
|
|
791
|
+
let myResponse = null;
|
|
799
792
|
responses.forEach(function (r) {
|
|
800
793
|
if (kb.holds(r, ns.dc('author'), me)) {
|
|
801
794
|
myResponse = r;
|
|
802
795
|
}
|
|
803
796
|
});
|
|
804
|
-
|
|
797
|
+
const insertables = []; // list of statements to be stored
|
|
805
798
|
|
|
806
|
-
|
|
799
|
+
const id = UI.widgets.newThing(doc).uri;
|
|
807
800
|
if (myResponse === null) {
|
|
808
801
|
myResponse = $rdf.sym(id + '_response');
|
|
809
802
|
insertables.push($rdf.st(invitation, ns.sched('response'), myResponse, doc));
|
|
810
803
|
insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc));
|
|
811
804
|
} else {
|
|
812
|
-
|
|
805
|
+
const dps = kb.each(myResponse, ns.sched('cell'));
|
|
813
806
|
dps.forEach(function (dataPoint) {
|
|
814
|
-
|
|
807
|
+
const time = kb.any(dataPoint, ns.cal('dtstart'));
|
|
815
808
|
dataPointForNT[time.toNT()] = dataPoint;
|
|
816
809
|
});
|
|
817
810
|
}
|
|
818
|
-
for (
|
|
811
|
+
for (let j = 0; j < possibleTimes.length; j++) {
|
|
819
812
|
if (dataPointForNT[possibleTimes[j].toNT()]) continue;
|
|
820
|
-
|
|
813
|
+
const dataPoint = $rdf.sym(id + '_' + j);
|
|
821
814
|
insertables.push($rdf.st(myResponse, ns.sched('cell'), dataPoint, doc));
|
|
822
815
|
insertables.push($rdf.st(dataPoint, ns.cal('dtstart'), possibleTimes[j], doc)); // @@
|
|
823
816
|
dataPointForNT[possibleTimes[j].toNT()] = dataPoint;
|
|
@@ -838,12 +831,12 @@ var schedulePane = exports.schedulePane = {
|
|
|
838
831
|
|
|
839
832
|
// If I made this in the first place, allow me to edit it.
|
|
840
833
|
// @@ optionally -- allows others to if according to original
|
|
841
|
-
|
|
834
|
+
const instanceCreator = kb.any(subject, ns.foaf('maker')); // owner?
|
|
842
835
|
if (!instanceCreator || instanceCreator.sameTerm(me)) {
|
|
843
|
-
|
|
836
|
+
const editButton = dom.createElement('button');
|
|
844
837
|
editButton.setAttribute('style', inputStyle);
|
|
845
838
|
// editButton.textContent = '(Modify the poll)' // noun_344563.svg
|
|
846
|
-
|
|
839
|
+
const editIcon = dom.createElement('img');
|
|
847
840
|
editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg');
|
|
848
841
|
editIcon.setAttribute('style', buttonIconStyle);
|
|
849
842
|
editButton.appendChild(editIcon);
|
|
@@ -861,14 +854,14 @@ var schedulePane = exports.schedulePane = {
|
|
|
861
854
|
naviRight.appendChild(newInstanceButton());
|
|
862
855
|
} // showResults
|
|
863
856
|
|
|
864
|
-
|
|
865
|
-
|
|
857
|
+
const div = dom.createElement('div');
|
|
858
|
+
const structure = div.appendChild(dom.createElement('table')); // @@ make responsive style
|
|
866
859
|
structure.setAttribute('style', 'background-color: white; min-width: 40em; min-height: 13em;');
|
|
867
|
-
|
|
860
|
+
const naviLoginoutTR = structure.appendChild(dom.createElement('tr'));
|
|
868
861
|
naviLoginoutTR.appendChild(dom.createElement('td'));
|
|
869
862
|
naviLoginoutTR.appendChild(dom.createElement('td'));
|
|
870
863
|
naviLoginoutTR.appendChild(dom.createElement('td'));
|
|
871
|
-
|
|
864
|
+
const logInOutButton = null;
|
|
872
865
|
/*
|
|
873
866
|
const logInOutButton = UI.login.loginStatusBox(dom, setUser)
|
|
874
867
|
// floating divs lead to a mess
|
|
@@ -877,16 +870,16 @@ var schedulePane = exports.schedulePane = {
|
|
|
877
870
|
logInOutButton.setAttribute('style', 'margin-right: 0em;')
|
|
878
871
|
*/
|
|
879
872
|
|
|
880
|
-
|
|
881
|
-
|
|
873
|
+
const naviTop = structure.appendChild(dom.createElement('tr'));
|
|
874
|
+
const naviMain = naviTop.appendChild(dom.createElement('td'));
|
|
882
875
|
naviMain.setAttribute('colspan', '3');
|
|
883
|
-
|
|
876
|
+
const naviMenu = structure.appendChild(dom.createElement('tr'));
|
|
884
877
|
naviMenu.setAttribute('class', 'naviMenu');
|
|
885
878
|
naviMenu.setAttribute('style', ' text-align: middle; vertical-align: middle; padding-top: 4em; ');
|
|
886
879
|
// naviMenu.setAttribute('style', 'margin-top: 3em;')
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
880
|
+
const naviLeft = naviMenu.appendChild(dom.createElement('td'));
|
|
881
|
+
const naviCenter = naviMenu.appendChild(dom.createElement('td'));
|
|
882
|
+
const naviRight = naviMenu.appendChild(dom.createElement('td'));
|
|
890
883
|
getForms();
|
|
891
884
|
return div;
|
|
892
885
|
} // render
|