solid-panes 3.7.3 → 4.0.0-32da9eb1
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 +47 -41
- 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
|
Binary file
|
package/src/pad/padPane.ts
DELETED
|
@@ -1,559 +0,0 @@
|
|
|
1
|
-
import { icons, ns, pad, widgets, login } from 'solid-ui'
|
|
2
|
-
import { authn, AppDetails } from 'solid-logic'
|
|
3
|
-
import { graph, log, NamedNode, Namespace, sym, serialize, Store } from 'rdflib'
|
|
4
|
-
import { PaneDefinition } from 'pane-registry'
|
|
5
|
-
/* pad Pane
|
|
6
|
-
**
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const paneDef: PaneDefinition = {
|
|
10
|
-
// icon: (module.__dirname || __dirname) + 'images/ColourOn.png',
|
|
11
|
-
icon: icons.iconBase + 'noun_79217.svg',
|
|
12
|
-
|
|
13
|
-
name: 'pad',
|
|
14
|
-
|
|
15
|
-
audience: [ns.solid('PowerUser')],
|
|
16
|
-
|
|
17
|
-
// Does the subject deserve an pad pane?
|
|
18
|
-
label: function (subject, context) {
|
|
19
|
-
const t = (context.session.store as Store).findTypeURIs(subject)
|
|
20
|
-
if (t['http://www.w3.org/ns/pim/pad#Notepad']) {
|
|
21
|
-
return 'pad'
|
|
22
|
-
}
|
|
23
|
-
return null // No under other circumstances
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
mintClass: ns.pad('Notepad'),
|
|
27
|
-
|
|
28
|
-
mintNew: function (context, newPaneOptions: any) {
|
|
29
|
-
const store = context.session.store as Store
|
|
30
|
-
const updater = store.updater
|
|
31
|
-
if (newPaneOptions.me && !newPaneOptions.me.uri) {
|
|
32
|
-
throw new Error('notepad mintNew: Invalid userid')
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const newInstance = (newPaneOptions.newInstance =
|
|
36
|
-
newPaneOptions.newInstance ||
|
|
37
|
-
store.sym(newPaneOptions.newBase + 'index.ttl#this'))
|
|
38
|
-
// const newInstance = kb.sym(newBase + 'pad.ttl#thisPad');
|
|
39
|
-
const newPadDoc = newInstance.doc()
|
|
40
|
-
|
|
41
|
-
store.add(newInstance, ns.rdf('type'), ns.pad('Notepad'), newPadDoc)
|
|
42
|
-
store.add(newInstance, ns.dc('title'), 'Shared Notes', newPadDoc)
|
|
43
|
-
store.add(newInstance, ns.dc('created'), new Date() as any, newPadDoc) // @@ TODO Remove casting
|
|
44
|
-
if (newPaneOptions.me) {
|
|
45
|
-
store.add(newInstance, ns.dc('author'), newPaneOptions.me, newPadDoc)
|
|
46
|
-
}
|
|
47
|
-
// kb.add(newInstance, ns.pad('next'), newInstance, newPadDoc);
|
|
48
|
-
// linked list empty @@
|
|
49
|
-
const chunk = store.sym(newInstance.uri + '_line0')
|
|
50
|
-
store.add(newInstance, ns.pad('next'), chunk, newPadDoc) // Linked list has one entry
|
|
51
|
-
store.add(chunk, ns.pad('next'), newInstance, newPadDoc)
|
|
52
|
-
store.add(chunk, ns.dc('author'), newPaneOptions.me, newPadDoc)
|
|
53
|
-
store.add(chunk, ns.sioc('content'), '', newPadDoc)
|
|
54
|
-
|
|
55
|
-
return new Promise(function (resolve, reject) {
|
|
56
|
-
if (!updater) {
|
|
57
|
-
reject(new Error('Have no updater'))
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
updater.put(
|
|
61
|
-
newPadDoc,
|
|
62
|
-
store.statementsMatching(undefined, undefined, undefined, newPadDoc),
|
|
63
|
-
'text/turtle',
|
|
64
|
-
function (uri2, ok, message) {
|
|
65
|
-
if (ok) {
|
|
66
|
-
resolve(newPaneOptions)
|
|
67
|
-
} else {
|
|
68
|
-
reject(
|
|
69
|
-
new Error('FAILED to save new tool at: ' + uri2 + ' : ' + message)
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
})
|
|
75
|
-
},
|
|
76
|
-
// and follow instructions there
|
|
77
|
-
// @@ TODO Set better type for paneOptions
|
|
78
|
-
render: function (subject, context, paneOptions: any) {
|
|
79
|
-
const dom = context.dom
|
|
80
|
-
const store = context.session.store as Store
|
|
81
|
-
// Utility functions
|
|
82
|
-
const complainIfBad = function (ok: boolean, message: string) {
|
|
83
|
-
if (!ok) {
|
|
84
|
-
div.appendChild(widgets.errorMessageBlock(dom, message, 'pink'))
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const clearElement = function (ele: HTMLElement) {
|
|
89
|
-
while (ele.firstChild) {
|
|
90
|
-
ele.removeChild(ele.firstChild)
|
|
91
|
-
}
|
|
92
|
-
return ele
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Access control
|
|
96
|
-
|
|
97
|
-
// Two constiations of ACL for this app, public read and public read/write
|
|
98
|
-
// In all cases owner has read write control
|
|
99
|
-
const genACLtext = function (
|
|
100
|
-
docURI: string,
|
|
101
|
-
aclURI: string,
|
|
102
|
-
allWrite: boolean
|
|
103
|
-
) {
|
|
104
|
-
const g = graph()
|
|
105
|
-
const auth = Namespace('http://www.w3.org/ns/auth/acl#')
|
|
106
|
-
let a = g.sym(aclURI + '#a1')
|
|
107
|
-
const acl = g.sym(aclURI)
|
|
108
|
-
const doc = g.sym(docURI)
|
|
109
|
-
g.add(a, ns.rdf('type'), auth('Authorization'), acl)
|
|
110
|
-
g.add(a, auth('accessTo'), doc, acl)
|
|
111
|
-
g.add(a, auth('agent'), me, acl)
|
|
112
|
-
g.add(a, auth('mode'), auth('Read'), acl)
|
|
113
|
-
g.add(a, auth('mode'), auth('Write'), acl)
|
|
114
|
-
g.add(a, auth('mode'), auth('Control'), acl)
|
|
115
|
-
|
|
116
|
-
a = g.sym(aclURI + '#a2')
|
|
117
|
-
g.add(a, ns.rdf('type'), auth('Authorization'), acl)
|
|
118
|
-
g.add(a, auth('accessTo'), doc, acl)
|
|
119
|
-
g.add(a, auth('agentClass'), ns.foaf('Agent'), acl)
|
|
120
|
-
g.add(a, auth('mode'), auth('Read'), acl)
|
|
121
|
-
if (allWrite) {
|
|
122
|
-
g.add(a, auth('mode'), auth('Write'), acl)
|
|
123
|
-
}
|
|
124
|
-
// TODO: Figure out why `serialize` isn't on the type definition according to TypeScript:
|
|
125
|
-
return serialize(acl, g, aclURI, 'text/turtle')
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @param docURI
|
|
130
|
-
* @param allWrite
|
|
131
|
-
* @param callbackFunction
|
|
132
|
-
*
|
|
133
|
-
* @returns {Promise<Response>}
|
|
134
|
-
*/
|
|
135
|
-
const setACL = function setACL (
|
|
136
|
-
docURI: string,
|
|
137
|
-
allWrite: boolean,
|
|
138
|
-
callbackFunction: Function
|
|
139
|
-
) {
|
|
140
|
-
const aclDoc = store.any(
|
|
141
|
-
sym(docURI),
|
|
142
|
-
sym('http://www.iana.org/assignments/link-relations/acl')
|
|
143
|
-
) as NamedNode // @@ check that this get set by web.js
|
|
144
|
-
if (!fetcher) {
|
|
145
|
-
throw new Error('Have no fetcher')
|
|
146
|
-
}
|
|
147
|
-
if (aclDoc) {
|
|
148
|
-
// Great we already know where it is
|
|
149
|
-
const aclText = genACLtext(docURI, aclDoc.uri, allWrite)
|
|
150
|
-
return fetcher
|
|
151
|
-
.webOperation('PUT', aclDoc.uri, {
|
|
152
|
-
data: aclText,
|
|
153
|
-
contentType: 'text/turtle'
|
|
154
|
-
})
|
|
155
|
-
.then(() => callbackFunction(true))
|
|
156
|
-
.catch(err => {
|
|
157
|
-
callbackFunction(false, err.message)
|
|
158
|
-
})
|
|
159
|
-
} else {
|
|
160
|
-
return fetcher
|
|
161
|
-
.load(docURI)
|
|
162
|
-
.catch((err: Error) => {
|
|
163
|
-
callbackFunction(false, 'Getting headers for ACL: ' + err)
|
|
164
|
-
})
|
|
165
|
-
.then(() => {
|
|
166
|
-
const aclDoc = store.any(
|
|
167
|
-
sym(docURI),
|
|
168
|
-
sym('http://www.iana.org/assignments/link-relations/acl')
|
|
169
|
-
) as NamedNode
|
|
170
|
-
|
|
171
|
-
if (!aclDoc) {
|
|
172
|
-
// complainIfBad(false, "No Link rel=ACL header for " + docURI);
|
|
173
|
-
throw new Error('No Link rel=ACL header for ' + docURI)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const aclText = genACLtext(docURI, aclDoc.uri, allWrite)
|
|
177
|
-
|
|
178
|
-
return fetcher.webOperation('PUT', aclDoc.uri, {
|
|
179
|
-
data: aclText,
|
|
180
|
-
contentType: 'text/turtle'
|
|
181
|
-
})
|
|
182
|
-
})
|
|
183
|
-
.then(() => callbackFunction(true))
|
|
184
|
-
.catch(err => {
|
|
185
|
-
callbackFunction(false, err.message)
|
|
186
|
-
})
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Reproduction: spawn a new instance
|
|
191
|
-
//
|
|
192
|
-
// Viral growth path: user of app decides to make another instance
|
|
193
|
-
const newInstanceButton = function () {
|
|
194
|
-
const button = div.appendChild(dom.createElement('button'))
|
|
195
|
-
button.textContent = 'Start another pad'
|
|
196
|
-
button.addEventListener('click', function () {
|
|
197
|
-
return showBootstrap(subject, spawnArea, 'pad')
|
|
198
|
-
})
|
|
199
|
-
return button
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Option of either using the workspace system or just typing in a URI
|
|
203
|
-
const showBootstrap = function showBootstrap (
|
|
204
|
-
thisInstance: any,
|
|
205
|
-
container: HTMLElement,
|
|
206
|
-
noun: string
|
|
207
|
-
) {
|
|
208
|
-
const div = clearElement(container)
|
|
209
|
-
const appDetails = { noun: 'notepad' } as AppDetails
|
|
210
|
-
div.appendChild(
|
|
211
|
-
login.newAppInstance(dom, appDetails, (workspace: string | null, newBase) => {
|
|
212
|
-
// FIXME: not sure if this will work at all, just
|
|
213
|
-
// trying to get the types to match - Michiel.
|
|
214
|
-
return initializeNewInstanceInWorkspace(new NamedNode(workspace || newBase))
|
|
215
|
-
})
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
div.appendChild(dom.createElement('hr')) // @@
|
|
219
|
-
|
|
220
|
-
const p = div.appendChild(dom.createElement('p'))
|
|
221
|
-
p.textContent =
|
|
222
|
-
'Where would you like to store the data for the ' +
|
|
223
|
-
noun +
|
|
224
|
-
'? ' +
|
|
225
|
-
'Give the URL of the directory where you would like the data stored.'
|
|
226
|
-
const baseField = div.appendChild(dom.createElement('input'))
|
|
227
|
-
baseField.setAttribute('type', 'text')
|
|
228
|
-
baseField.size = 80 // really a string
|
|
229
|
-
;(baseField as any).label = 'base URL'
|
|
230
|
-
baseField.autocomplete = 'on'
|
|
231
|
-
|
|
232
|
-
div.appendChild(dom.createElement('br')) // @@
|
|
233
|
-
|
|
234
|
-
const button = div.appendChild(dom.createElement('button'))
|
|
235
|
-
button.textContent = 'Start new ' + noun + ' at this URI'
|
|
236
|
-
button.addEventListener('click', function (_e) {
|
|
237
|
-
let newBase = baseField.value
|
|
238
|
-
if (newBase.slice(-1) !== '/') {
|
|
239
|
-
newBase += '/'
|
|
240
|
-
}
|
|
241
|
-
initializeNewInstanceAtBase(thisInstance, newBase)
|
|
242
|
-
})
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Create new document files for new instance of app
|
|
246
|
-
const initializeNewInstanceInWorkspace = function (ws: NamedNode) {
|
|
247
|
-
// @@ TODO Clean up type for newBase
|
|
248
|
-
let newBase: any = store.any(ws, ns.space('uriPrefix'))
|
|
249
|
-
if (!newBase) {
|
|
250
|
-
newBase = ws.uri.split('#')[0]
|
|
251
|
-
} else {
|
|
252
|
-
newBase = newBase.value
|
|
253
|
-
}
|
|
254
|
-
if (newBase.slice(-1) !== '/') {
|
|
255
|
-
log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?
|
|
256
|
-
newBase = newBase + '/'
|
|
257
|
-
}
|
|
258
|
-
const now = new Date()
|
|
259
|
-
newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id
|
|
260
|
-
|
|
261
|
-
initializeNewInstanceAtBase(thisInstance, newBase)
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const initializeNewInstanceAtBase = function (
|
|
265
|
-
thisInstance: any,
|
|
266
|
-
newBase: string
|
|
267
|
-
) {
|
|
268
|
-
const here = sym(thisInstance.uri.split('#')[0])
|
|
269
|
-
const base = here // @@ ???
|
|
270
|
-
|
|
271
|
-
const newPadDoc = store.sym(newBase + 'pad.ttl')
|
|
272
|
-
const newIndexDoc = store.sym(newBase + 'index.html')
|
|
273
|
-
|
|
274
|
-
const toBeCopied = [{ local: 'index.html', contentType: 'text/html' }]
|
|
275
|
-
|
|
276
|
-
const newInstance = store.sym(newPadDoc.uri + '#thisPad')
|
|
277
|
-
|
|
278
|
-
// log.debug("\n Ready to put " + kb.statementsMatching(undefined, undefined, undefined, there)); //@@
|
|
279
|
-
|
|
280
|
-
const agenda: Function[] = []
|
|
281
|
-
|
|
282
|
-
let f // @@ This needs some form of visible progress bar
|
|
283
|
-
for (f = 0; f < toBeCopied.length; f++) {
|
|
284
|
-
const item = toBeCopied[f]
|
|
285
|
-
const fun = function copyItem (item: any) {
|
|
286
|
-
agenda.push(function () {
|
|
287
|
-
const newURI = newBase + item.local
|
|
288
|
-
console.log('Copying ' + base + item.local + ' to ' + newURI)
|
|
289
|
-
|
|
290
|
-
const setThatACL = function () {
|
|
291
|
-
setACL(newURI, false, function (ok: boolean, message: string) {
|
|
292
|
-
if (!ok) {
|
|
293
|
-
complainIfBad(
|
|
294
|
-
ok,
|
|
295
|
-
'FAILED to set ACL ' + newURI + ' : ' + message
|
|
296
|
-
)
|
|
297
|
-
console.log('FAILED to set ACL ' + newURI + ' : ' + message)
|
|
298
|
-
} else {
|
|
299
|
-
agenda.shift()!() // beware too much nesting
|
|
300
|
-
}
|
|
301
|
-
})
|
|
302
|
-
}
|
|
303
|
-
if (!store.fetcher) {
|
|
304
|
-
throw new Error('Store has no fetcher')
|
|
305
|
-
}
|
|
306
|
-
store.fetcher
|
|
307
|
-
.webCopy(
|
|
308
|
-
base + item.local,
|
|
309
|
-
newBase + item.local,
|
|
310
|
-
item.contentType
|
|
311
|
-
)
|
|
312
|
-
.then(() => authn.checkUser())
|
|
313
|
-
.then(webId => {
|
|
314
|
-
me = webId
|
|
315
|
-
|
|
316
|
-
setThatACL()
|
|
317
|
-
})
|
|
318
|
-
.catch(err => {
|
|
319
|
-
console.log(
|
|
320
|
-
'FAILED to copy ' + base + item.local + ' : ' + err.message
|
|
321
|
-
)
|
|
322
|
-
complainIfBad(
|
|
323
|
-
false,
|
|
324
|
-
'FAILED to copy ' + base + item.local + ' : ' + err.message
|
|
325
|
-
)
|
|
326
|
-
})
|
|
327
|
-
})
|
|
328
|
-
}
|
|
329
|
-
fun(item)
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
agenda.push(function createNewPadDataFile () {
|
|
333
|
-
store.add(newInstance, ns.rdf('type'), PAD('Notepad'), newPadDoc)
|
|
334
|
-
|
|
335
|
-
// TODO @@ Remove casting of add
|
|
336
|
-
store.add(
|
|
337
|
-
newInstance,
|
|
338
|
-
ns.dc('created'),
|
|
339
|
-
new Date() as any, // @@ TODO Remove casting
|
|
340
|
-
newPadDoc
|
|
341
|
-
)
|
|
342
|
-
if (me) {
|
|
343
|
-
store.add(newInstance, ns.dc('author'), me, newPadDoc)
|
|
344
|
-
}
|
|
345
|
-
store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty
|
|
346
|
-
|
|
347
|
-
// Keep a paper trail @@ Revisit when we have non-public ones @@ Privacy
|
|
348
|
-
store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
|
|
349
|
-
store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)
|
|
350
|
-
if (!updater) {
|
|
351
|
-
throw new Error('Have no updater')
|
|
352
|
-
}
|
|
353
|
-
updater.put(
|
|
354
|
-
newPadDoc,
|
|
355
|
-
store.statementsMatching(undefined, undefined, undefined, newPadDoc),
|
|
356
|
-
'text/turtle',
|
|
357
|
-
function (_uri2, ok, message) {
|
|
358
|
-
if (ok) {
|
|
359
|
-
agenda.shift()!()
|
|
360
|
-
} else {
|
|
361
|
-
complainIfBad(
|
|
362
|
-
ok,
|
|
363
|
-
'FAILED to save new notepad at: ' +
|
|
364
|
-
newPadDoc.uri +
|
|
365
|
-
' : ' +
|
|
366
|
-
message
|
|
367
|
-
)
|
|
368
|
-
console.log(
|
|
369
|
-
'FAILED to save new notepad at: ' +
|
|
370
|
-
newPadDoc.uri +
|
|
371
|
-
' : ' +
|
|
372
|
-
message
|
|
373
|
-
)
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
)
|
|
377
|
-
})
|
|
378
|
-
|
|
379
|
-
agenda.push(function () {
|
|
380
|
-
setACL(newPadDoc.uri, true, function (ok: boolean, body: string) {
|
|
381
|
-
complainIfBad(
|
|
382
|
-
ok,
|
|
383
|
-
'Failed to set Read-Write ACL on pad data file: ' + body
|
|
384
|
-
)
|
|
385
|
-
if (ok) agenda.shift()!()
|
|
386
|
-
})
|
|
387
|
-
})
|
|
388
|
-
|
|
389
|
-
agenda.push(function () {
|
|
390
|
-
// give the user links to the new app
|
|
391
|
-
|
|
392
|
-
const p = div.appendChild(dom.createElement('p'))
|
|
393
|
-
p.setAttribute('style', 'font-size: 140%;')
|
|
394
|
-
p.innerHTML =
|
|
395
|
-
"Your <a href='" +
|
|
396
|
-
newIndexDoc.uri +
|
|
397
|
-
"'><b>new notepad</b></a> is ready. " +
|
|
398
|
-
"<br/><br/><a href='" +
|
|
399
|
-
newIndexDoc.uri +
|
|
400
|
-
"'>Go to new pad</a>"
|
|
401
|
-
})
|
|
402
|
-
|
|
403
|
-
agenda.shift()!()
|
|
404
|
-
// Created new data files.
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// Update on incoming changes
|
|
408
|
-
const showResults = function (exists: boolean) {
|
|
409
|
-
console.log('showResults()')
|
|
410
|
-
|
|
411
|
-
me = authn.currentUser()
|
|
412
|
-
|
|
413
|
-
authn.checkUser().then((webId: unknown) => {
|
|
414
|
-
me = webId as string
|
|
415
|
-
})
|
|
416
|
-
|
|
417
|
-
const title =
|
|
418
|
-
store.any(subject, ns.dc('title')) || store.any(subject, ns.vcard('fn'))
|
|
419
|
-
if (paneOptions.solo && typeof window !== 'undefined' && title) {
|
|
420
|
-
window.document.title = title.value
|
|
421
|
-
}
|
|
422
|
-
options.exists = exists
|
|
423
|
-
padEle = pad.notepad(dom, padDoc, subject, me, options)
|
|
424
|
-
naviMain.appendChild(padEle)
|
|
425
|
-
|
|
426
|
-
const partipationTarget =
|
|
427
|
-
store.any(subject, ns.meeting('parentMeeting')) || subject
|
|
428
|
-
pad.manageParticipation(
|
|
429
|
-
dom,
|
|
430
|
-
naviMiddle2,
|
|
431
|
-
padDoc,
|
|
432
|
-
partipationTarget as any,
|
|
433
|
-
me,
|
|
434
|
-
options
|
|
435
|
-
)
|
|
436
|
-
if (!store.updater) {
|
|
437
|
-
throw new Error('Store has no updater')
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
store.updater.setRefreshHandler(padDoc, padEle.reloadAndSync) // initiated =
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
// Read or create empty data file
|
|
444
|
-
const loadPadData = function () {
|
|
445
|
-
if (!fetcher) {
|
|
446
|
-
throw new Error('Have no fetcher')
|
|
447
|
-
}
|
|
448
|
-
fetcher.nowOrWhenFetched(padDoc.uri, undefined, function (
|
|
449
|
-
ok: boolean,
|
|
450
|
-
body: string,
|
|
451
|
-
response: any
|
|
452
|
-
) {
|
|
453
|
-
if (!ok) {
|
|
454
|
-
if (response.status === 404) {
|
|
455
|
-
// / Check explicitly for 404 error
|
|
456
|
-
console.log('Initializing results file ' + padDoc)
|
|
457
|
-
if (!updater) {
|
|
458
|
-
throw new Error('Have no updater')
|
|
459
|
-
}
|
|
460
|
-
updater.put(padDoc, [], 'text/turtle', function (
|
|
461
|
-
_uri2,
|
|
462
|
-
ok,
|
|
463
|
-
message
|
|
464
|
-
) {
|
|
465
|
-
if (ok) {
|
|
466
|
-
clearElement(naviMain)
|
|
467
|
-
showResults(false)
|
|
468
|
-
} else {
|
|
469
|
-
complainIfBad(
|
|
470
|
-
ok,
|
|
471
|
-
'FAILED to create results file at: ' +
|
|
472
|
-
padDoc.uri +
|
|
473
|
-
' : ' +
|
|
474
|
-
message
|
|
475
|
-
)
|
|
476
|
-
console.log(
|
|
477
|
-
'FAILED to craete results file at: ' +
|
|
478
|
-
padDoc.uri +
|
|
479
|
-
' : ' +
|
|
480
|
-
message
|
|
481
|
-
)
|
|
482
|
-
}
|
|
483
|
-
})
|
|
484
|
-
} else {
|
|
485
|
-
// Other error, not 404 -- do not try to overwite the file
|
|
486
|
-
complainIfBad(ok, 'FAILED to read results file: ' + body)
|
|
487
|
-
}
|
|
488
|
-
} else {
|
|
489
|
-
// Happy read
|
|
490
|
-
clearElement(naviMain)
|
|
491
|
-
if (store.holds(subject, ns.rdf('type'), ns.wf('TemplateInstance'))) {
|
|
492
|
-
showBootstrap(subject, naviMain, 'pad')
|
|
493
|
-
}
|
|
494
|
-
showResults(true)
|
|
495
|
-
naviMiddle3.appendChild(newInstanceButton())
|
|
496
|
-
}
|
|
497
|
-
})
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// Body of Pane
|
|
501
|
-
const appPathSegment = 'app-pad.timbl.com' // how to allocate this string and connect to
|
|
502
|
-
|
|
503
|
-
const fetcher = store.fetcher
|
|
504
|
-
const updater = store.updater
|
|
505
|
-
let me: any
|
|
506
|
-
|
|
507
|
-
const PAD = Namespace('http://www.w3.org/ns/pim/pad#')
|
|
508
|
-
|
|
509
|
-
const thisInstance = subject
|
|
510
|
-
const padDoc = subject.doc()
|
|
511
|
-
|
|
512
|
-
let padEle
|
|
513
|
-
|
|
514
|
-
const div = dom.createElement('div')
|
|
515
|
-
|
|
516
|
-
// Build the DOM
|
|
517
|
-
const structure = div.appendChild(dom.createElement('table')) // @@ make responsive style
|
|
518
|
-
structure.setAttribute(
|
|
519
|
-
'style',
|
|
520
|
-
'background-color: white; min-width: 94%; margin-right:3% margin-left: 3%; min-height: 13em;'
|
|
521
|
-
)
|
|
522
|
-
|
|
523
|
-
const naviLoginoutTR = structure.appendChild(dom.createElement('tr'))
|
|
524
|
-
naviLoginoutTR.appendChild(dom.createElement('td')) // naviLoginout1
|
|
525
|
-
naviLoginoutTR.appendChild(dom.createElement('td'))
|
|
526
|
-
naviLoginoutTR.appendChild(dom.createElement('td'))
|
|
527
|
-
|
|
528
|
-
const naviTop = structure.appendChild(dom.createElement('tr')) // stuff
|
|
529
|
-
const naviMain = naviTop.appendChild(dom.createElement('td'))
|
|
530
|
-
naviMain.setAttribute('colspan', '3')
|
|
531
|
-
|
|
532
|
-
const naviMiddle = structure.appendChild(dom.createElement('tr')) // controls
|
|
533
|
-
const naviMiddle1 = naviMiddle.appendChild(dom.createElement('td'))
|
|
534
|
-
const naviMiddle2 = naviMiddle.appendChild(dom.createElement('td'))
|
|
535
|
-
const naviMiddle3 = naviMiddle.appendChild(dom.createElement('td'))
|
|
536
|
-
|
|
537
|
-
const naviStatus = structure.appendChild(dom.createElement('tr')) // status etc
|
|
538
|
-
const statusArea = naviStatus.appendChild(dom.createElement('div'))
|
|
539
|
-
|
|
540
|
-
const naviSpawn = structure.appendChild(dom.createElement('tr')) // create new
|
|
541
|
-
const spawnArea = naviSpawn.appendChild(dom.createElement('div'))
|
|
542
|
-
|
|
543
|
-
const naviMenu = structure.appendChild(dom.createElement('tr'))
|
|
544
|
-
naviMenu.setAttribute('class', 'naviMenu')
|
|
545
|
-
// naviMenu.setAttribute('style', 'margin-top: 3em;');
|
|
546
|
-
naviMenu.appendChild(dom.createElement('td')) // naviLeft
|
|
547
|
-
naviMenu.appendChild(dom.createElement('td'))
|
|
548
|
-
naviMenu.appendChild(dom.createElement('td'))
|
|
549
|
-
|
|
550
|
-
const options: any = { statusArea: statusArea, timingArea: naviMiddle1 }
|
|
551
|
-
|
|
552
|
-
loadPadData()
|
|
553
|
-
|
|
554
|
-
return div
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
// ends
|
|
558
|
-
|
|
559
|
-
export default paneDef
|