solid-panes 3.5.14 → 3.5.15
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/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -1
- 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 +190 -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/outline/context.d.ts +2 -1
- package/lib/outline/context.d.ts.map +1 -1
- package/lib/outline/context.js.map +1 -1
- package/lib/outline/manager.js +12 -3
- package/lib/outline/manager.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/package.json +13 -13
- package/src/index.ts +4 -3
- package/src/mainPage/footer.ts +19 -0
- package/src/mainPage/header.ts +75 -0
- package/src/mainPage/index.ts +20 -0
- package/src/outline/context.ts +2 -1
- package/src/outline/manager.js +1 -0
- package/src/versionInfo.ts +3 -3
package/lib/versionInfo.js
CHANGED
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
buildTime: '
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2022-01-28T10:16:20Z',
|
|
9
|
+
commit: 'ad1ef0272c97b0830f9cb8d74ab8d42af173bcc1',
|
|
10
10
|
npmInfo: {
|
|
11
|
-
'solid-panes': '3.5.
|
|
11
|
+
'solid-panes': '3.5.15',
|
|
12
12
|
npm: '6.14.13',
|
|
13
13
|
ares: '1.17.1',
|
|
14
14
|
brotli: '1.0.9',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACbA,EAAAA,SAAS,EAAE,sBADE;AAEbC,EAAAA,MAAM,EAAE,0CAFK;AAGbC,EAAAA,OAAO,EACT;AACE,mBAAe,QADjB;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,OAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\n buildTime: '
|
|
1
|
+
{"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACbA,EAAAA,SAAS,EAAE,sBADE;AAEbC,EAAAA,MAAM,EAAE,0CAFK;AAGbC,EAAAA,OAAO,EACT;AACE,mBAAe,QADjB;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,OAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\n buildTime: '2022-01-28T10:16:20Z',\n commit: 'ad1ef0272c97b0830f9cb8d74ab8d42af173bcc1',\n npmInfo:\n{\n 'solid-panes': '3.5.15',\n npm: '6.14.13',\n ares: '1.17.1',\n brotli: '1.0.9',\n cldr: '39.0',\n icu: '69.1',\n llhttp: '2.1.3',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.17.3',\n openssl: '1.1.1k',\n tz: '2021a',\n unicode: '13.0',\n uv: '1.41.0',\n v8: '8.4.371.23-node.67',\n zlib: '1.2.11'\n}\n}\n"],"file":"versionInfo.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.15",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -45,27 +45,27 @@
|
|
|
45
45
|
"homepage": "https://github.com/solid/solid-panes",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/polyfill": "^7.12.1",
|
|
48
|
-
"@inrupt/solid-client-authn-browser": "^1.11.3",
|
|
49
48
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
50
|
-
"activitystreams-pane": "^0.6.
|
|
49
|
+
"activitystreams-pane": "^0.6.3",
|
|
51
50
|
"babel-preset-env": "^1.7.0",
|
|
52
51
|
"babel-preset-metalab": "^1.0.0",
|
|
53
|
-
"chat-pane": "^2.4.
|
|
54
|
-
"contacts-pane": "^2.
|
|
55
|
-
"folder-pane": "^2.4.
|
|
56
|
-
"issue-pane": "^2.4.
|
|
52
|
+
"chat-pane": "^2.4.14",
|
|
53
|
+
"contacts-pane": "^2.6.0",
|
|
54
|
+
"folder-pane": "^2.4.12",
|
|
55
|
+
"issue-pane": "^2.4.9",
|
|
57
56
|
"marked": "^4.0.8",
|
|
58
|
-
"meeting-pane": "^2.3.
|
|
57
|
+
"meeting-pane": "^2.3.8",
|
|
59
58
|
"mime-types": "^2.1.34",
|
|
60
|
-
"pane-registry": "^2.4.
|
|
59
|
+
"pane-registry": "^2.4.6",
|
|
61
60
|
"path-browserify": "^1.0.1",
|
|
62
|
-
"profile-pane": "^1.0.
|
|
63
|
-
"rdflib": "^2.2.
|
|
61
|
+
"profile-pane": "^1.0.7",
|
|
62
|
+
"rdflib": "^2.2.17",
|
|
64
63
|
"react": "^17.0.2",
|
|
65
64
|
"react-dom": "^17.0.2",
|
|
65
|
+
"solid-logic": "^1.3.13",
|
|
66
66
|
"solid-namespace": "^0.5.2",
|
|
67
|
-
"solid-ui": "^2.4.
|
|
68
|
-
"source-pane": "^2.2.
|
|
67
|
+
"solid-ui": "^2.4.15",
|
|
68
|
+
"source-pane": "^2.2.14"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@babel/cli": "^7.16.0",
|
package/src/index.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// var UI = require('solid-ui') // Note we will add the panes register to this.
|
|
15
15
|
import versionInfo from './versionInfo'
|
|
16
16
|
import * as UI from 'solid-ui'
|
|
17
|
+
import { LiveStore } from 'rdflib'
|
|
17
18
|
import OutlineManager from './outline/manager.js'
|
|
18
19
|
import registerPanes from './registerPanes.js'
|
|
19
20
|
import {
|
|
@@ -21,10 +22,10 @@ import {
|
|
|
21
22
|
paneForIcon,
|
|
22
23
|
paneForPredicate,
|
|
23
24
|
register,
|
|
24
|
-
byName
|
|
25
|
-
LiveStore
|
|
25
|
+
byName
|
|
26
26
|
} from 'pane-registry'
|
|
27
27
|
import { createContext } from './outline/context'
|
|
28
|
+
import initMainPage from './mainPage'
|
|
28
29
|
|
|
29
30
|
export function getOutliner (dom) {
|
|
30
31
|
if (!dom.outlineManager) {
|
|
@@ -61,4 +62,4 @@ export {
|
|
|
61
62
|
// where there are many occurrences of window and of window.document
|
|
62
63
|
// But each DOM should have just one outline manager.
|
|
63
64
|
|
|
64
|
-
export { OutlineManager, UI, versionInfo }
|
|
65
|
+
export { OutlineManager, UI, versionInfo, initMainPage }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IndexedFormula } from 'rdflib'
|
|
2
|
+
import { initFooter } from 'solid-ui'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* links in the footer
|
|
6
|
+
*/
|
|
7
|
+
const SOLID_PROJECT_URL = 'https://solidproject.org'
|
|
8
|
+
const SOLID_PROJECT_NAME = 'solidproject.org'
|
|
9
|
+
|
|
10
|
+
export function createFooter (store: IndexedFormula) {
|
|
11
|
+
initFooter(store, setFooterOptions())
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function setFooterOptions () {
|
|
15
|
+
return {
|
|
16
|
+
solidProjectUrl: SOLID_PROJECT_URL,
|
|
17
|
+
solidProjectName: SOLID_PROJECT_NAME
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { icons, authn, initHeader } from 'solid-ui'
|
|
2
|
+
/**
|
|
3
|
+
* menu icons
|
|
4
|
+
*/
|
|
5
|
+
const HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'
|
|
6
|
+
const SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* menu elements
|
|
10
|
+
*/
|
|
11
|
+
const USER_GUIDE_MENU_ITEM = 'User guide'
|
|
12
|
+
const REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'
|
|
13
|
+
const SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'
|
|
14
|
+
const LOG_OUT_MENU_ITEM = 'Log out'
|
|
15
|
+
/**
|
|
16
|
+
* URLS
|
|
17
|
+
*/
|
|
18
|
+
const USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'
|
|
19
|
+
const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'
|
|
20
|
+
|
|
21
|
+
export async function createHeader (store, outliner) {
|
|
22
|
+
initHeader(store, await setUserMenu(outliner), setHeaderOptions())
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function setHeaderOptions () {
|
|
26
|
+
const helpMenuList = [
|
|
27
|
+
{ label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },
|
|
28
|
+
{ label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }
|
|
29
|
+
]
|
|
30
|
+
const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }
|
|
31
|
+
|
|
32
|
+
return headerOptions
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function setUserMenu (outliner: any) {
|
|
36
|
+
const showProfile = {
|
|
37
|
+
label: SHOW_YOUR_PROFILE_MENU_ITEM,
|
|
38
|
+
onclick: () => openUserProfile(outliner)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const logOut = {
|
|
42
|
+
label: LOG_OUT_MENU_ITEM,
|
|
43
|
+
onclick: () => {
|
|
44
|
+
authn.authSession.logout()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// the order of the menu is important here, show profile first and logout last
|
|
49
|
+
let userMenuList = [showProfile]
|
|
50
|
+
userMenuList = userMenuList.concat(await getMenuItems(outliner))
|
|
51
|
+
userMenuList.push(logOut)
|
|
52
|
+
|
|
53
|
+
return userMenuList
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function openUserProfile (outliner: any) {
|
|
57
|
+
outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)
|
|
58
|
+
location.reload()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function getMenuItems (outliner: any) {
|
|
62
|
+
const items = await outliner.getDashboardItems()
|
|
63
|
+
return items.map((element) => {
|
|
64
|
+
return {
|
|
65
|
+
label: element.label,
|
|
66
|
+
onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function openDashboardPane (outliner: any, pane: string): Promise<void> {
|
|
72
|
+
outliner.showDashboard({
|
|
73
|
+
pane
|
|
74
|
+
})
|
|
75
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Main Page
|
|
2
|
+
**
|
|
3
|
+
** This code is called in mashlib and renders the header and footer of the Databrowser.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { IndexedFormula, NamedNode } from 'rdflib'
|
|
7
|
+
import { getOutliner } from '../index'
|
|
8
|
+
import { createHeader } from './header'
|
|
9
|
+
import { createFooter } from './footer'
|
|
10
|
+
|
|
11
|
+
export default async function initMainPage (store: IndexedFormula, uri?: string|NamedNode|null) {
|
|
12
|
+
const outliner = getOutliner(document)
|
|
13
|
+
uri = uri || window.location.href
|
|
14
|
+
let subject = uri
|
|
15
|
+
if (typeof uri === 'string') subject = store.sym(uri)
|
|
16
|
+
outliner.GotoSubject(subject, true, undefined, true, undefined)
|
|
17
|
+
const header = await createHeader(store, outliner)
|
|
18
|
+
const footer = createFooter(store)
|
|
19
|
+
return Promise.all([header, footer])
|
|
20
|
+
}
|
package/src/outline/context.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DataBrowserContext,
|
|
1
|
+
import { DataBrowserContext, PaneRegistry } from 'pane-registry'
|
|
2
2
|
import { getOutliner } from '../index'
|
|
3
3
|
import { SolidLogic } from 'solid-logic'
|
|
4
|
+
import { LiveStore } from 'rdflib'
|
|
4
5
|
|
|
5
6
|
export function createContext (
|
|
6
7
|
dom: HTMLDocument,
|
package/src/outline/manager.js
CHANGED
|
@@ -392,6 +392,7 @@ export default function (context) {
|
|
|
392
392
|
|
|
393
393
|
async function getDashboardItems () {
|
|
394
394
|
const me = UI.authn.currentUser()
|
|
395
|
+
if (!me) return []
|
|
395
396
|
const div = dom.createElement('div')
|
|
396
397
|
const [books, pods] = await Promise.all([getAddressBooks(), getPods()])
|
|
397
398
|
return [
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: '
|
|
3
|
-
commit: '
|
|
2
|
+
buildTime: '2022-01-28T10:16:20Z',
|
|
3
|
+
commit: 'ad1ef0272c97b0830f9cb8d74ab8d42af173bcc1',
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.5.
|
|
6
|
+
'solid-panes': '3.5.15',
|
|
7
7
|
npm: '6.14.13',
|
|
8
8
|
ares: '1.17.1',
|
|
9
9
|
brotli: '1.0.9',
|