solid-panes 3.5.14 → 3.5.16-alpha-07d0f77b
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/.babelrc +0 -0
- package/.eslintignore +0 -0
- package/.eslintrc +0 -0
- package/.github/workflows/ci.yml +45 -6
- package/.nvmrc +0 -0
- package/Documentation/VisualLanguage.html +0 -0
- package/Documentation/conventions.md +0 -0
- package/LICENSE.md +0 -0
- package/README.md +0 -0
- package/dev/index.html +0 -0
- package/dev/loader.ts +11 -11
- package/dev/pane/index.ts +0 -0
- package/doc/images/panes-for-classes.epgz +0 -0
- package/doc/images/panes-for-classes.svg +0 -0
- package/jest.config.js +0 -0
- package/jest.setup.ts +0 -0
- package/lib/RDFXMLPane.js +0 -0
- package/lib/RDFXMLPane.js.map +0 -0
- package/lib/argument/argumentPane.js +15 -7
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js +0 -0
- package/lib/attach/attachPane.js.map +0 -0
- package/lib/audio/audioPane.js +0 -0
- package/lib/audio/audioPane.js.map +0 -0
- package/lib/classInstancePane.js +0 -0
- package/lib/classInstancePane.js.map +0 -0
- package/lib/dashboard/basicPreferences.d.ts +0 -0
- package/lib/dashboard/basicPreferences.d.ts.map +1 -1
- package/lib/dashboard/basicPreferences.js +6 -6
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/dashboardPane.d.ts +0 -0
- package/lib/dashboard/dashboardPane.d.ts.map +1 -1
- package/lib/dashboard/dashboardPane.js +6 -4
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/dashboard/homepage.d.ts +0 -0
- package/lib/dashboard/homepage.d.ts.map +0 -0
- package/lib/dashboard/homepage.js +0 -0
- package/lib/dashboard/homepage.js.map +0 -0
- package/lib/dataContentPane.js +1 -1
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js +0 -0
- package/lib/defaultPane.js.map +0 -0
- package/lib/dokieli/dokieliPane.js +0 -0
- package/lib/dokieli/dokieliPane.js.map +0 -0
- package/lib/dokieli/new.js +0 -0
- package/lib/dokieli/new.js.map +0 -0
- package/lib/form/pane.js +15 -6
- package/lib/form/pane.js.map +1 -1
- package/lib/global.d.js +0 -0
- package/lib/global.d.js.map +0 -0
- package/lib/home/homePane.d.ts +0 -0
- package/lib/home/homePane.d.ts.map +1 -1
- package/lib/home/homePane.js +7 -5
- package/lib/home/homePane.js.map +1 -1
- package/lib/humanReadablePane.js +0 -0
- package/lib/humanReadablePane.js.map +0 -0
- package/lib/imagePane.js +0 -0
- package/lib/imagePane.js.map +0 -0
- package/lib/index.d.ts +8 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +21 -13
- package/lib/index.js.map +1 -1
- package/lib/internal/internalPane.d.ts +0 -0
- package/lib/internal/internalPane.d.ts.map +0 -0
- package/lib/internal/internalPane.js +0 -0
- package/lib/internal/internalPane.js.map +0 -0
- package/lib/mainPage/footer.d.ts +3 -0
- package/lib/mainPage/footer.d.ts.map +1 -0
- package/lib/mainPage/footer.js +26 -0
- package/lib/mainPage/footer.js.map +1 -0
- package/lib/mainPage/header.d.ts +2 -0
- package/lib/mainPage/header.d.ts.map +1 -0
- package/lib/mainPage/header.js +192 -0
- package/lib/mainPage/header.js.map +1 -0
- package/lib/mainPage/index.d.ts +3 -0
- package/lib/mainPage/index.d.ts.map +1 -0
- package/lib/mainPage/index.js +51 -0
- package/lib/mainPage/index.js.map +1 -0
- package/lib/microblogPane/microblogPane.js +16 -14
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js +0 -0
- package/lib/n3Pane.js.map +0 -0
- package/lib/outline/context.d.ts +2 -1
- package/lib/outline/context.d.ts.map +1 -1
- package/lib/outline/context.js +0 -0
- package/lib/outline/context.js.map +1 -1
- package/lib/outline/dragDrop.js +16 -6
- package/lib/outline/dragDrop.js.map +1 -1
- package/lib/outline/licenseOptions.js +12 -5
- package/lib/outline/licenseOptions.js.map +1 -1
- package/lib/outline/manager.js +222 -176
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +0 -0
- package/lib/outline/manager.test.js.map +0 -0
- package/lib/outline/outlineIcons.js +0 -0
- package/lib/outline/outlineIcons.js.map +0 -0
- package/lib/outline/propertyViews.d.ts +0 -0
- package/lib/outline/propertyViews.d.ts.map +0 -0
- package/lib/outline/propertyViews.js +0 -0
- package/lib/outline/propertyViews.js.map +0 -0
- package/lib/outline/propertyViews.test.js +0 -0
- package/lib/outline/propertyViews.test.js.map +0 -0
- package/lib/outline/queryByExample.js +14 -6
- package/lib/outline/queryByExample.js.map +1 -1
- package/lib/outline/userInput.js +90 -80
- package/lib/outline/userInput.js.map +1 -1
- package/lib/outline/viewAsImage.d.ts +0 -0
- package/lib/outline/viewAsImage.d.ts.map +0 -0
- package/lib/outline/viewAsImage.js +0 -0
- package/lib/outline/viewAsImage.js.map +0 -0
- package/lib/outline/viewAsMbox.d.ts +0 -0
- package/lib/outline/viewAsMbox.d.ts.map +0 -0
- package/lib/outline/viewAsMbox.js +0 -0
- package/lib/outline/viewAsMbox.js.map +0 -0
- package/lib/pad/padPane.d.ts +0 -0
- package/lib/pad/padPane.d.ts.map +1 -1
- package/lib/pad/padPane.js +6 -4
- package/lib/pad/padPane.js.map +1 -1
- package/lib/playlist/playlistPane.js +0 -0
- package/lib/playlist/playlistPane.js.map +0 -0
- package/lib/profile/editProfile.view.d.ts +0 -0
- package/lib/profile/editProfile.view.d.ts.map +1 -1
- package/lib/profile/editProfile.view.js +3 -3
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/profile/profile.dom.d.ts +0 -0
- package/lib/profile/profile.dom.d.ts.map +0 -0
- package/lib/profile/profile.dom.js +0 -0
- package/lib/profile/profile.dom.js.map +0 -0
- package/lib/registerPanes.js +0 -0
- package/lib/registerPanes.js.map +0 -0
- package/lib/schedule/formsForSchedule.js +0 -0
- package/lib/schedule/formsForSchedule.js.map +0 -0
- package/lib/schedule/schedulePane.js +26 -14
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/sharing/sharingPane.d.ts +0 -0
- package/lib/sharing/sharingPane.d.ts.map +0 -0
- package/lib/sharing/sharingPane.js +0 -0
- package/lib/sharing/sharingPane.js.map +0 -0
- package/lib/slideshow/slideshowPane.js +0 -0
- package/lib/slideshow/slideshowPane.js.map +0 -0
- package/lib/socialPane.js +16 -6
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.d.ts +0 -0
- package/lib/tabbed/tabbedPane.d.ts.map +0 -0
- package/lib/tabbed/tabbedPane.js +0 -0
- package/lib/tabbed/tabbedPane.js.map +0 -0
- package/lib/tableViewPane.js +0 -0
- package/lib/tableViewPane.js.map +0 -0
- package/lib/test-import-export/common.js +0 -0
- package/lib/test-import-export/common.js.map +0 -0
- package/lib/test-import-export/edit-importer.js +0 -0
- package/lib/test-import-export/edit-importer.js.map +0 -0
- package/lib/test-import-export/testImportExport.js +0 -0
- package/lib/test-import-export/testImportExport.js.map +0 -0
- package/lib/transaction/pane.js +1 -1
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js +1 -1
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js +1 -1
- package/lib/trip/tripPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.dom.d.ts.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +11 -9
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +0 -0
- package/lib/trustedApplications/trustedApplications.test.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
- package/lib/trustedApplications/trustedApplications.utils.js +0 -0
- package/lib/trustedApplications/trustedApplications.utils.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.view.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.view.d.ts.map +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +5 -3
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/types.d.ts +0 -0
- package/lib/types.d.ts.map +0 -0
- package/lib/types.js +0 -0
- package/lib/types.js.map +0 -0
- package/lib/ui/pane.js +0 -0
- package/lib/ui/pane.js.map +0 -0
- package/lib/versionInfo.d.ts +0 -0
- package/lib/versionInfo.d.ts.map +0 -0
- package/lib/versionInfo.js +14 -14
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +0 -0
- package/lib/video/videoPane.js.map +0 -0
- package/package.json +14 -14
- package/src/RDFXMLPane.js +0 -0
- package/src/argument/argumentPane.js +5 -5
- 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 -0
- package/src/attach/tbl-paperclip-128.png +0 -0
- package/src/attach/tbl-paperclip-22.png +0 -0
- package/src/attach/tbl-paperclip-22a.png +0 -0
- package/src/audio/audioPane.js +0 -0
- package/src/chatPreferencesForm.ttl +0 -0
- package/src/classInstancePane.js +0 -0
- package/src/dashboard/basicPreferences.ts +4 -5
- package/src/dashboard/dashboardPane.ts +4 -3
- package/src/dashboard/homepage.ts +0 -0
- package/src/dashboard/languages/codes.html +0 -0
- package/src/dashboard/languages/codes.xml +0 -0
- package/src/dashboard/languages/codes2.txt +0 -0
- package/src/dashboard/languages/foo +0 -0
- package/src/dashboard/languages/foo.ttl +0 -0
- package/src/dashboard/languages/get-language-names.sh +0 -0
- package/src/dashboard/ontologyData.ttl +0 -0
- package/src/dashboard/preferencesFormText.ttl +0 -0
- package/src/dataContentPane.js +1 -1
- package/src/defaultPane.js +0 -0
- package/src/dokieli/Makefile +0 -0
- package/src/dokieli/dokieliPane.js +0 -0
- package/src/dokieli/new.html +0 -0
- package/src/dokieli/new.js +0 -0
- 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 +5 -4
- package/src/form/psuedocode-notes.txt +0 -0
- package/src/global.d.ts +0 -0
- package/src/home/homePane.ts +7 -6
- package/src/humanReadablePane.js +0 -0
- package/src/imagePane.js +0 -0
- package/src/index.ts +27 -21
- package/src/internal/internalPane.ts +0 -0
- package/src/mainPage/footer.ts +19 -0
- package/src/mainPage/header.ts +76 -0
- package/src/mainPage/index.ts +20 -0
- package/src/meeting/Makefile +0 -0
- package/src/meeting/test/meeting1/Actions/actions.ttl +0 -0
- package/src/meeting/test/meeting1/Actions/config.ttl +0 -0
- package/src/meeting/test/meeting1/Actions/state.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/index.html +0 -0
- package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -0
- package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -0
- package/src/meeting/test/meeting1/chat/chat.ttl +0 -0
- package/src/meeting/test/meeting1/details.ttl +0 -0
- package/src/meeting/test/meeting1/pad/pad.ttl +0 -0
- package/src/microblogPane/mbStyle.css +0 -0
- package/src/microblogPane/microblogPane.js +9 -8
- package/src/n3Pane.js +0 -0
- package/src/outline/context.ts +2 -1
- package/src/outline/dragDrop.js +5 -4
- package/src/outline/licenseOptions.js +4 -5
- package/src/outline/manager.js +43 -27
- package/src/outline/manager.test.ts +0 -0
- package/src/outline/outlineIcons.js +0 -0
- package/src/outline/propertyViews.test.ts +0 -0
- package/src/outline/propertyViews.ts +0 -0
- package/src/outline/queryByExample.js +4 -4
- package/src/outline/userInput.js +72 -72
- package/src/outline/viewAsImage.ts +0 -0
- package/src/outline/viewAsMbox.ts +0 -0
- package/src/pad/images/ColourOff.ai +0 -0
- package/src/pad/images/ColourOff.png +0 -0
- package/src/pad/images/ColourOn.ai +0 -0
- package/src/pad/images/ColourOn.png +0 -0
- package/src/pad/padPane.ts +3 -3
- package/src/playlist/playlistPane.js +0 -0
- package/src/profile/editProfile.view.ts +5 -8
- package/src/profile/profile.dom.ts +0 -0
- package/src/profile/profileFormText.ttl +0 -0
- package/src/registerPanes.js +0 -0
- package/src/schedule/Makefile +0 -0
- package/src/schedule/formsForSchedule.js +0 -0
- package/src/schedule/formsForSchedule.ttl +0 -0
- package/src/schedule/schedulePane.js +14 -13
- package/src/sharing/sharingPane.ts +0 -0
- package/src/slideshow/slideshowPane.js +0 -0
- package/src/socialPane.js +5 -4
- package/src/style/tabbedtab.css +0 -0
- package/src/tabbed/tabbedPane.ts +0 -0
- package/src/tableViewPane.js +0 -0
- package/src/test-import-export/common.js +0 -0
- package/src/test-import-export/edit-importer.js +0 -0
- package/src/test-import-export/testImportExport.js +0 -0
- package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
- package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/pane.js +1 -1
- package/src/transaction/period.js +1 -1
- 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 +1 -1
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -0
- package/src/trustedApplications/trustedApplications.dom.ts +2 -1
- package/src/trustedApplications/trustedApplications.test.ts +0 -0
- package/src/trustedApplications/trustedApplications.utils.ts +0 -0
- package/src/trustedApplications/trustedApplications.view.ts +4 -4
- package/src/types.ts +0 -0
- package/src/ui/22-builder.png +0 -0
- package/src/ui/builder.graffle +0 -0
- package/src/ui/builder.png +0 -0
- package/src/ui/builder2.png +0 -0
- package/src/ui/pane.js +0 -0
- package/src/versionInfo.ts +14 -14
- package/src/video/videoPane.js +0 -0
- package/timestamp.sh +0 -0
- package/travis/bumpversion.js +0 -0
- package/tsconfig.json +0 -0
- package/typings/raw-loader.d.ts +0 -0
- package/typings/solid-namespace/index.d.ts +0 -0
- package/webpack.config.js +0 -0
package/src/outline/manager.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import * as UI from 'solid-ui'
|
|
7
|
+
import { authn, authSession, store } from 'solid-logic'
|
|
7
8
|
import * as panes from 'pane-registry'
|
|
8
9
|
import * as $rdf from 'rdflib'
|
|
9
10
|
import YAHOO from './dragDrop'
|
|
@@ -30,9 +31,9 @@ export default function (context) {
|
|
|
30
31
|
this.selection = selection
|
|
31
32
|
this.ancestor = UI.utils.ancestor // make available as outline.ancestor in callbacks
|
|
32
33
|
this.sparql = UI.rdf.UpdateManager
|
|
33
|
-
this.kb =
|
|
34
|
-
const kb =
|
|
35
|
-
const sf =
|
|
34
|
+
this.kb = store
|
|
35
|
+
const kb = store
|
|
36
|
+
const sf = store.fetcher
|
|
36
37
|
dom.outline = this
|
|
37
38
|
this.qs = new queryByExample.QuerySource() // Track queries in queryByExample
|
|
38
39
|
|
|
@@ -344,7 +345,7 @@ export default function (context) {
|
|
|
344
345
|
async function globalAppTabs (options = {}) {
|
|
345
346
|
console.log('globalAppTabs @@')
|
|
346
347
|
const div = dom.createElement('div')
|
|
347
|
-
const me =
|
|
348
|
+
const me = authn.currentUser()
|
|
348
349
|
if (!me) {
|
|
349
350
|
alert('Must be logged in for this')
|
|
350
351
|
throw new Error('Not logged in')
|
|
@@ -361,7 +362,7 @@ export default function (context) {
|
|
|
361
362
|
const pane = panes.byName(item.paneName) // 20190701
|
|
362
363
|
containerDiv.innerHTML = ''
|
|
363
364
|
const table = containerDiv.appendChild(dom.createElement('table'))
|
|
364
|
-
const me =
|
|
365
|
+
const me = authn.currentUser()
|
|
365
366
|
thisOutline.GotoSubject(
|
|
366
367
|
item.subject || me,
|
|
367
368
|
true,
|
|
@@ -391,7 +392,8 @@ export default function (context) {
|
|
|
391
392
|
this.getDashboard = globalAppTabs
|
|
392
393
|
|
|
393
394
|
async function getDashboardItems () {
|
|
394
|
-
const me =
|
|
395
|
+
const me = authn.currentUser()
|
|
396
|
+
if (!me) return []
|
|
395
397
|
const div = dom.createElement('div')
|
|
396
398
|
const [books, pods] = await Promise.all([getAddressBooks(), getPods()])
|
|
397
399
|
return [
|
|
@@ -415,23 +417,23 @@ export default function (context) {
|
|
|
415
417
|
.concat(pods)
|
|
416
418
|
|
|
417
419
|
async function getPods () {
|
|
418
|
-
async function
|
|
419
|
-
await
|
|
420
|
+
async function addPodStorage (pod) { // namedNode
|
|
421
|
+
await loadContainerRepresentation(pod)
|
|
420
422
|
if (kb.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())) {
|
|
421
423
|
pods.push(pod)
|
|
422
424
|
return true
|
|
423
425
|
}
|
|
424
426
|
return false
|
|
425
427
|
}
|
|
426
|
-
async function
|
|
428
|
+
async function addPodStorageFromUrl (url) {
|
|
427
429
|
const podStorage = new URL(url)
|
|
428
|
-
// check
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
430
|
+
// check for predicate pim:Storage in containers up the path tree
|
|
431
|
+
let pathStorage = podStorage.pathname
|
|
432
|
+
while (pathStorage.length) {
|
|
433
|
+
pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'))
|
|
434
|
+
if (await addPodStorage(kb.sym(`${podStorage.origin}${pathStorage}/`))) return
|
|
434
435
|
}
|
|
436
|
+
// TODO should url.origin be added to pods list when there are no pim:Storage ???
|
|
435
437
|
}
|
|
436
438
|
|
|
437
439
|
try {
|
|
@@ -441,16 +443,30 @@ export default function (context) {
|
|
|
441
443
|
console.error('Unable to load profile', err)
|
|
442
444
|
return []
|
|
443
445
|
}
|
|
444
|
-
|
|
446
|
+
// load pod's storages from profile
|
|
447
|
+
let pods = kb.each(me, ns.space('storage'), null, me.doc())
|
|
448
|
+
pods.map(async (pod) => {
|
|
449
|
+
// TODO use addPodStorageFromUrl(pod.uri) to check for pim:Storage ???
|
|
450
|
+
await loadContainerRepresentation(pod)
|
|
451
|
+
})
|
|
445
452
|
|
|
446
453
|
try {
|
|
447
454
|
// if uri then SolidOS is a browse.html web app
|
|
448
455
|
const uri = (new URL(window.location.href)).searchParams.get('uri')
|
|
449
456
|
const podUrl = uri || window.location.href
|
|
450
|
-
await
|
|
457
|
+
await addPodStorageFromUrl(podUrl)
|
|
451
458
|
} catch (err) {
|
|
452
459
|
console.error('cannot load container', err)
|
|
453
460
|
}
|
|
461
|
+
// remove namedNodes duplicates
|
|
462
|
+
function uniques (nodes) {
|
|
463
|
+
const uniqueNodes = []
|
|
464
|
+
nodes.forEach(node => {
|
|
465
|
+
if (!uniqueNodes.find(uniqueNode => uniqueNode.equals(node))) uniqueNodes.push(node)
|
|
466
|
+
})
|
|
467
|
+
return uniqueNodes
|
|
468
|
+
}
|
|
469
|
+
pods = uniques(pods)
|
|
454
470
|
if (!pods.length) return []
|
|
455
471
|
return pods.map((pod, index) => {
|
|
456
472
|
function split (item) { return item.uri.split('//')[1].slice(0, -1) }
|
|
@@ -467,7 +483,7 @@ export default function (context) {
|
|
|
467
483
|
|
|
468
484
|
async function getAddressBooks () {
|
|
469
485
|
try {
|
|
470
|
-
const context = await UI.
|
|
486
|
+
const context = await UI.login.findAppInstances(
|
|
471
487
|
{ me, div, dom },
|
|
472
488
|
ns.vcard('AddressBook')
|
|
473
489
|
)
|
|
@@ -519,7 +535,7 @@ export default function (context) {
|
|
|
519
535
|
})
|
|
520
536
|
|
|
521
537
|
// close the dashboard if user log out
|
|
522
|
-
|
|
538
|
+
authSession.onLogout(closeDashboard)
|
|
523
539
|
|
|
524
540
|
// finally - switch to showing dashboard
|
|
525
541
|
outlineContainer.style.display = 'none'
|
|
@@ -565,7 +581,7 @@ export default function (context) {
|
|
|
565
581
|
)
|
|
566
582
|
}
|
|
567
583
|
|
|
568
|
-
async function
|
|
584
|
+
async function loadContainerRepresentation (subject) {
|
|
569
585
|
// force reload for index.html with RDFa
|
|
570
586
|
if (!kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
|
|
571
587
|
const response = await kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, { headers: { accept: 'text/turtle' } }))
|
|
@@ -576,7 +592,7 @@ export default function (context) {
|
|
|
576
592
|
|
|
577
593
|
async function getRelevantPanes (subject, context) {
|
|
578
594
|
// make sure container representation is loaded (when server returns index.html)
|
|
579
|
-
if (subject.uri.endsWith('/')) { await
|
|
595
|
+
if (subject.uri.endsWith('/')) { await loadContainerRepresentation(subject) }
|
|
580
596
|
const panes = context.session.paneRegistry
|
|
581
597
|
const relevantPanes = panes.list.filter(
|
|
582
598
|
pane => pane.label(subject, context) && !pane.global
|
|
@@ -585,7 +601,7 @@ export default function (context) {
|
|
|
585
601
|
// there are no relevant panes, simply return default pane (which ironically is internalPane)
|
|
586
602
|
return [panes.byName('internal')]
|
|
587
603
|
}
|
|
588
|
-
const filteredPanes = await UI.
|
|
604
|
+
const filteredPanes = await UI.login.filterAvailablePanes(relevantPanes)
|
|
589
605
|
if (filteredPanes.length === 0) {
|
|
590
606
|
// if no relevant panes are available panes because of user role, we still allow for the most relevant pane to be viewed
|
|
591
607
|
return [relevantPanes[0]]
|
|
@@ -1352,7 +1368,7 @@ export default function (context) {
|
|
|
1352
1368
|
if (target.label) {
|
|
1353
1369
|
window.content.location = target.label
|
|
1354
1370
|
// The following alternative does not work in the extension.
|
|
1355
|
-
// var s =
|
|
1371
|
+
// var s = store.sym(target.label);
|
|
1356
1372
|
// outline.GotoSubject(s, true);
|
|
1357
1373
|
}
|
|
1358
1374
|
}
|
|
@@ -1423,7 +1439,7 @@ export default function (context) {
|
|
|
1423
1439
|
// don't do these for headers or base nodes
|
|
1424
1440
|
const source = st.why
|
|
1425
1441
|
// var target = st.why
|
|
1426
|
-
const editable =
|
|
1442
|
+
const editable = store.updater.editable(source.uri, kb)
|
|
1427
1443
|
if (!editable) {
|
|
1428
1444
|
// let target = node.parentNode.AJAR_inverse ? st.object : st.subject
|
|
1429
1445
|
} // left hand side
|
|
@@ -1594,7 +1610,7 @@ export default function (context) {
|
|
|
1594
1610
|
// I don't know why 'HTML'
|
|
1595
1611
|
const object = UI.utils.getAbout(kb, selectedTd)
|
|
1596
1612
|
target = selectedTd.parentNode.AJAR_statement.why
|
|
1597
|
-
editable =
|
|
1613
|
+
editable = store.updater.editable(target.uri, kb)
|
|
1598
1614
|
if (object) {
|
|
1599
1615
|
// <Feature about='enterToExpand'>
|
|
1600
1616
|
outline.GotoSubject(object, true)
|
|
@@ -1645,7 +1661,7 @@ export default function (context) {
|
|
|
1645
1661
|
case 46: // delete
|
|
1646
1662
|
case 8: // backspace
|
|
1647
1663
|
target = selectedTd.parentNode.AJAR_statement.why
|
|
1648
|
-
editable =
|
|
1664
|
+
editable = store.updater.editable(target.uri, kb)
|
|
1649
1665
|
if (editable) {
|
|
1650
1666
|
e.preventDefault() // prevent from going back
|
|
1651
1667
|
this.UserInput.Delete(selectedTd)
|
|
@@ -1887,7 +1903,7 @@ export default function (context) {
|
|
|
1887
1903
|
const st = node.parentNode.AJAR_statement
|
|
1888
1904
|
if (!st) return // For example in the title TD of an expanded pane
|
|
1889
1905
|
const target = st.why
|
|
1890
|
-
const editable =
|
|
1906
|
+
const editable = store.updater.editable(target.uri, kb)
|
|
1891
1907
|
if (sel && editable) thisOutline.UserInput.Click(e, selection[0]) // was next 2 lines
|
|
1892
1908
|
// var text='TabulatorMouseDown@Outline()';
|
|
1893
1909
|
// HCIoptions['able to edit in Discovery Mode by mouse'].setupHere([sel,e,thisOutline,selection[0]],text);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
// to find all other places which had the same pattern.
|
|
7
7
|
// Fields could be optional by pressing th ewhite optoional button
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
import { store } from 'solid-logic'
|
|
10
|
+
import * as UI from 'solid-ui'
|
|
10
11
|
|
|
11
12
|
module.exports = {
|
|
12
13
|
makeQueryRow,
|
|
@@ -31,7 +32,6 @@ function predParentOf (node) {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
function makeQueryRow (q, tr, constraint) {
|
|
34
|
-
const kb = UI.store
|
|
35
35
|
// predtr = predParentOf(tr)
|
|
36
36
|
// var nodes = tr.childNodes
|
|
37
37
|
// var n = tr.childNodes.length
|
|
@@ -87,7 +87,7 @@ function makeQueryRow (q, tr, constraint) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
if (opt) {
|
|
90
|
-
const optForm =
|
|
90
|
+
const optForm = store.formula()
|
|
91
91
|
optionalSubqueriesIndex.push(optForm)
|
|
92
92
|
predtr.setAttribute(
|
|
93
93
|
'optionalSubqueriesIndex',
|
|
@@ -115,7 +115,7 @@ function makeQueryRow (q, tr, constraint) {
|
|
|
115
115
|
// UI.log.debug('Initial variable: '+tr.AJAR_variable)
|
|
116
116
|
const v = tr.AJAR_variable
|
|
117
117
|
? tr.AJAR_variable
|
|
118
|
-
:
|
|
118
|
+
: store.variable(UI.utils.newVariableName())
|
|
119
119
|
q.vars.push(v)
|
|
120
120
|
v.label = hasParent ? parentVar.label : UI.utils.label(parentVar)
|
|
121
121
|
v.label += ' ' + UI.utils.predicateLabelForXML(st.predicate, inverse)
|