solid-panes 3.5.23 → 3.5.24
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/README.md +4 -4
- package/dev/loader.ts +1 -1
- package/lib/dashboard/basicPreferences.js +2 -2
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/imagePane.js +14 -7
- package/lib/imagePane.js.map +1 -1
- package/lib/mainPage/header.js +2 -2
- package/lib/mainPage/header.js.map +1 -1
- package/lib/outline/manager.test.js +3 -3
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/profile/editProfile.view.js +1 -1
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/registerPanes.js +1 -1
- package/lib/registerPanes.js.map +1 -1
- package/lib/schedule/schedulePane.js +1 -1
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +23 -10
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/package.json +24 -24
- package/src/dashboard/basicPreferences.ts +2 -2
- package/src/imagePane.js +18 -7
- package/src/mainPage/header.ts +2 -2
- package/src/outline/manager.test.ts +3 -3
- package/src/profile/editProfile.view.ts +1 -1
- package/src/registerPanes.js +1 -1
- package/src/schedule/schedulePane.js +1 -1
- package/src/slideshow/slideshowPane.js +16 -7
- package/src/versionInfo.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.24",
|
|
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",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/solidos/solid-panes"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"solid",
|
|
@@ -40,42 +40,42 @@
|
|
|
40
40
|
"author": "Tim Berners-Lee <timbl@mit.edu>",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"bugs": {
|
|
43
|
-
"url": "https://github.com/
|
|
43
|
+
"url": "https://github.com/solidos/solid-panes/issues"
|
|
44
44
|
},
|
|
45
|
-
"homepage": "https://github.com/
|
|
45
|
+
"homepage": "https://github.com/solidos/solid-panes",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
48
|
-
"activitystreams-pane": "^0.6.
|
|
49
|
-
"chat-pane": "^2.4.
|
|
50
|
-
"contacts-pane": "^2.6.
|
|
51
|
-
"folder-pane": "^2.4.
|
|
52
|
-
"issue-pane": "^2.4.
|
|
53
|
-
"marked": "^4.0.
|
|
54
|
-
"meeting-pane": "^2.3.
|
|
48
|
+
"activitystreams-pane": "^0.6.6",
|
|
49
|
+
"chat-pane": "^2.4.18",
|
|
50
|
+
"contacts-pane": "^2.6.3",
|
|
51
|
+
"folder-pane": "^2.4.17",
|
|
52
|
+
"issue-pane": "^2.4.12",
|
|
53
|
+
"marked": "^4.0.14",
|
|
54
|
+
"meeting-pane": "^2.3.11",
|
|
55
55
|
"mime-types": "^2.1.35",
|
|
56
|
-
"pane-registry": "^2.4.
|
|
57
|
-
"profile-pane": "^1.0.
|
|
56
|
+
"pane-registry": "^2.4.10",
|
|
57
|
+
"profile-pane": "^1.0.10",
|
|
58
58
|
"rdflib": "^2.2.19",
|
|
59
|
-
"solid-logic": "^1.3.
|
|
59
|
+
"solid-logic": "^1.3.17",
|
|
60
60
|
"solid-namespace": "^0.5.2",
|
|
61
|
-
"solid-ui": "
|
|
62
|
-
"source-pane": "^2.2.
|
|
61
|
+
"solid-ui": "2.4.22",
|
|
62
|
+
"source-pane": "^2.2.17"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@babel/cli": "^7.17.6",
|
|
66
|
-
"@babel/core": "^7.17.
|
|
66
|
+
"@babel/core": "^7.17.9",
|
|
67
67
|
"@babel/preset-env": "^7.16.11",
|
|
68
68
|
"@babel/preset-typescript": "^7.16.7",
|
|
69
|
-
"@testing-library/dom": "^8.
|
|
70
|
-
"@testing-library/jest-dom": "^5.16.
|
|
69
|
+
"@testing-library/dom": "^8.13.0",
|
|
70
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
71
71
|
"@types/jest": "^27.4.1",
|
|
72
72
|
"@types/webpack-env": "^1.16.3",
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
74
|
-
"@typescript-eslint/parser": "^5.
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
|
74
|
+
"@typescript-eslint/parser": "^5.19.0",
|
|
75
75
|
"babel-loader": "^8.2.4",
|
|
76
76
|
"babel-plugin-inline-import": "^3.0.0",
|
|
77
77
|
"buffer": "^6.0.3",
|
|
78
|
-
"eslint": "^8.
|
|
78
|
+
"eslint": "^8.13.0",
|
|
79
79
|
"html-webpack-plugin": "^5.5.0",
|
|
80
80
|
"husky": "^7.0.4",
|
|
81
81
|
"jest": "^27.5.1",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"react-dom": "^18.0.0",
|
|
87
87
|
"ts-jest": "^27.1.4",
|
|
88
88
|
"typescript": "^4.6.3",
|
|
89
|
-
"webpack": "^5.
|
|
89
|
+
"webpack": "^5.72.0",
|
|
90
90
|
"webpack-cli": "^4.9.2",
|
|
91
|
-
"webpack-dev-server": "^4.
|
|
91
|
+
"webpack-dev-server": "^4.8.1"
|
|
92
92
|
},
|
|
93
93
|
"husky": {
|
|
94
94
|
"hooks": {
|
|
@@ -93,7 +93,7 @@ function setupUserTypesSection (
|
|
|
93
93
|
description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'
|
|
94
94
|
|
|
95
95
|
const userTypesLink = formContainer.appendChild(dom.createElement('a'))
|
|
96
|
-
userTypesLink.href = 'https://github.com/
|
|
96
|
+
userTypesLink.href = 'https://github.com/solidos/userguide/#role'
|
|
97
97
|
userTypesLink.innerText = 'Read more'
|
|
98
98
|
|
|
99
99
|
const formArea = formContainer.appendChild(dom.createElement('div'))
|
|
@@ -146,7 +146,7 @@ async function generateDeletionLink (
|
|
|
146
146
|
*
|
|
147
147
|
* This function infers the deletion link by assuming the URL structure of Node Solid server.
|
|
148
148
|
* In the future, Solid will hopefully provide a standardised way of discovering the deletion link:
|
|
149
|
-
* https://github.com/
|
|
149
|
+
* https://github.com/solidos/data-interoperability-panel/issues/18
|
|
150
150
|
*
|
|
151
151
|
* If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for
|
|
152
152
|
* vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the
|
package/src/imagePane.js
CHANGED
|
@@ -10,12 +10,12 @@ module.exports = {
|
|
|
10
10
|
name: 'image',
|
|
11
11
|
|
|
12
12
|
label: function (subject, context) {
|
|
13
|
-
const
|
|
13
|
+
const store = context.session.store
|
|
14
14
|
if (
|
|
15
|
-
!
|
|
15
|
+
!store.anyStatementMatching(
|
|
16
16
|
subject,
|
|
17
17
|
UI.ns.rdf('type'),
|
|
18
|
-
|
|
18
|
+
store.sym('http://purl.org/dc/terms/Image')
|
|
19
19
|
)
|
|
20
20
|
) {
|
|
21
21
|
// NB: Not dc: namespace!
|
|
@@ -24,8 +24,8 @@ module.exports = {
|
|
|
24
24
|
|
|
25
25
|
// See also the source pane, which has lower precedence.
|
|
26
26
|
|
|
27
|
-
const contentTypeMatch = function (
|
|
28
|
-
const cts =
|
|
27
|
+
const contentTypeMatch = function (store, x, contentTypes) {
|
|
28
|
+
const cts = store.fetcher.getHeader(x, 'content-type')
|
|
29
29
|
if (cts) {
|
|
30
30
|
for (let j = 0; j < cts.length; j++) {
|
|
31
31
|
for (let k = 0; k < contentTypes.length; k++) {
|
|
@@ -39,7 +39,7 @@ module.exports = {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const suppressed = ['application/pdf']
|
|
42
|
-
if (contentTypeMatch(
|
|
42
|
+
if (contentTypeMatch(store, subject, suppressed)) {
|
|
43
43
|
return null
|
|
44
44
|
}
|
|
45
45
|
return 'view'
|
|
@@ -47,10 +47,21 @@ module.exports = {
|
|
|
47
47
|
|
|
48
48
|
render: function (subject, context) {
|
|
49
49
|
const myDocument = context.dom
|
|
50
|
+
const store = context.session.store
|
|
50
51
|
const div = myDocument.createElement('div')
|
|
51
52
|
div.setAttribute('class', 'imageView')
|
|
52
53
|
const img = myDocument.createElement('IMG')
|
|
53
|
-
|
|
54
|
+
|
|
55
|
+
// get image with authenticated fetch
|
|
56
|
+
store.fetcher._fetch(subject.uri)
|
|
57
|
+
.then(function(response) {
|
|
58
|
+
return response.blob()
|
|
59
|
+
})
|
|
60
|
+
.then(function(myBlob) {
|
|
61
|
+
const objectURL = URL.createObjectURL(myBlob)
|
|
62
|
+
img.setAttribute('src', objectURL) // w640 h480 //
|
|
63
|
+
})
|
|
64
|
+
|
|
54
65
|
img.setAttribute('style', 'max-width: 100%; max-height: 100%;')
|
|
55
66
|
// div.style['max-width'] = '640'
|
|
56
67
|
// div.style['max-height'] = '480'
|
package/src/mainPage/header.ts
CHANGED
|
@@ -16,8 +16,8 @@ const LOG_OUT_MENU_ITEM = 'Log out'
|
|
|
16
16
|
/**
|
|
17
17
|
* URLS
|
|
18
18
|
*/
|
|
19
|
-
const USER_GUIDE_MENU_URL = 'https://
|
|
20
|
-
const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/
|
|
19
|
+
const USER_GUIDE_MENU_URL = 'https://solidos.github.io/userguide/'
|
|
20
|
+
const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues'
|
|
21
21
|
|
|
22
22
|
export async function createHeader (store, outliner) {
|
|
23
23
|
initHeader(store, await setUserMenu(outliner), setHeaderOptions())
|
|
@@ -47,7 +47,7 @@ describe('manager', () => {
|
|
|
47
47
|
it('shows an expand icon', () => {
|
|
48
48
|
const img = result.firstChild
|
|
49
49
|
expect(img.nodeName).toBe('IMG')
|
|
50
|
-
expect(img).toHaveAttribute('src', 'https://
|
|
50
|
+
expect(img).toHaveAttribute('src', 'https://solidos.github.io/solid-ui/src/originalIcons/tbl-expand-trans.png')
|
|
51
51
|
})
|
|
52
52
|
it('shows the node label', () => {
|
|
53
53
|
expect(result).toHaveTextContent('namednode.example')
|
|
@@ -101,7 +101,7 @@ describe('manager', () => {
|
|
|
101
101
|
it('shows an expand icon', () => {
|
|
102
102
|
const img = result.firstChild
|
|
103
103
|
expect(img.nodeName).toBe('IMG')
|
|
104
|
-
expect(img).toHaveAttribute('src', 'https://
|
|
104
|
+
expect(img).toHaveAttribute('src', 'https://solidos.github.io/solid-ui/src/originalIcons/tbl-expand-trans.png')
|
|
105
105
|
})
|
|
106
106
|
it('shows the phone number', () => {
|
|
107
107
|
expect(result).toHaveTextContent('+1-201-555-0123')
|
|
@@ -119,7 +119,7 @@ describe('manager', () => {
|
|
|
119
119
|
it('is represented by phone icon', () => {
|
|
120
120
|
const phoneIcon = phoneLink.lastChild
|
|
121
121
|
expect(phoneIcon.nodeName).toBe('IMG')
|
|
122
|
-
expect(phoneIcon).toHaveAttribute('src', 'https://
|
|
122
|
+
expect(phoneIcon).toHaveAttribute('src', 'https://solidos.github.io/solid-ui/src/originalIcons/silk/telephone.png')
|
|
123
123
|
})
|
|
124
124
|
})
|
|
125
125
|
})
|
|
@@ -35,7 +35,7 @@ const editProfileView: PaneDefinition = {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function renderProfileForm (div: HTMLElement, subject: NamedNode) {
|
|
38
|
-
const preferencesForm = sym('https://
|
|
38
|
+
const preferencesForm = sym('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this')
|
|
39
39
|
const preferencesFormDoc = preferencesForm.doc()
|
|
40
40
|
if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
|
|
41
41
|
// If not loaded already
|
package/src/registerPanes.js
CHANGED
|
@@ -21,7 +21,7 @@ module.exports = function registerPanes (register) {
|
|
|
21
21
|
register(require('./transaction/period.js'))
|
|
22
22
|
|
|
23
23
|
const chatPanes = require('chat-pane')
|
|
24
|
-
// FIXME: https://github.com/
|
|
24
|
+
// FIXME: https://github.com/solidos/chat-pane/issues/40
|
|
25
25
|
if (chatPanes.longChatPane) {
|
|
26
26
|
register(chatPanes.longChatPane) // Long pane must have prio in case short pane tries to do a long pane
|
|
27
27
|
register(chatPanes.shortChatPane) // was './chat/chatPane.js'
|
|
@@ -337,7 +337,7 @@ module.exports = {
|
|
|
337
337
|
// const formsURI = base + 'forms.ttl'
|
|
338
338
|
// We can't in fact host stuff from there because of CORS
|
|
339
339
|
const formsURI =
|
|
340
|
-
'https://
|
|
340
|
+
'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl'
|
|
341
341
|
|
|
342
342
|
const form1 = kb.sym(formsURI + '#form1')
|
|
343
343
|
const form2 = kb.sym(formsURI + '#form2')
|
|
@@ -18,11 +18,11 @@ module.exports = {
|
|
|
18
18
|
|
|
19
19
|
// Does the subject deserve an slideshow pane?
|
|
20
20
|
label: function (subject, context) {
|
|
21
|
-
const
|
|
21
|
+
const store = context.session.store
|
|
22
22
|
const ns = UI.ns
|
|
23
|
-
const t =
|
|
23
|
+
const t = store.findTypeURIs(subject)
|
|
24
24
|
if (t[ns.ldp('Container').uri] || t[ns.ldp('BasicContainer').uri]) {
|
|
25
|
-
const contents =
|
|
25
|
+
const contents = store.each(subject, ns.ldp('contains'))
|
|
26
26
|
let count = 0
|
|
27
27
|
contents.forEach(function (file) {
|
|
28
28
|
if (UI.widgets.isImage(file)) count++
|
|
@@ -40,24 +40,33 @@ module.exports = {
|
|
|
40
40
|
'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css'
|
|
41
41
|
UI.widgets.addStyleSheet(dom, styleSheet)
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const store = context.session.store
|
|
44
44
|
const ns = UI.ns
|
|
45
45
|
const div = dom.createElement('div')
|
|
46
46
|
div.setAttribute('class', 'bss-slides')
|
|
47
47
|
|
|
48
|
-
const t =
|
|
48
|
+
const t = store.findTypeURIs(subject)
|
|
49
49
|
let predicate
|
|
50
50
|
if (t[ns.ldp('BasicContainer').uri] || t[ns.ldp('Container').uri]) {
|
|
51
51
|
predicate = ns.ldp('contains')
|
|
52
52
|
}
|
|
53
|
-
const images =
|
|
53
|
+
const images = store.each(subject, predicate) // @@ random order?
|
|
54
54
|
// @@ Ideally: sort by embedded time of image
|
|
55
55
|
images.sort() // Sort for now by URI
|
|
56
56
|
for (let i = 0; i < images.length; i++) {
|
|
57
57
|
if (!UI.widgets.isImage(images[i])) continue
|
|
58
58
|
const figure = div.appendChild(dom.createElement('figure'))
|
|
59
59
|
const img = figure.appendChild(dom.createElement('img'))
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
// get image with authenticated fetch
|
|
62
|
+
store.fetcher._fetch(images[i].uri)
|
|
63
|
+
.then(function(response) {
|
|
64
|
+
return response.blob()
|
|
65
|
+
})
|
|
66
|
+
.then(function(myBlob) {
|
|
67
|
+
const objectURL = URL.createObjectURL(myBlob)
|
|
68
|
+
img.setAttribute('src', objectURL) // w640 h480 //
|
|
69
|
+
})
|
|
61
70
|
img.setAttribute('width', '100%')
|
|
62
71
|
figure.appendChild(dom.createElement('figcaption'))
|
|
63
72
|
}
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: "2022-
|
|
3
|
-
commit: "
|
|
2
|
+
buildTime: "2022-04-14T19:51:41Z",
|
|
3
|
+
commit: "506c126345c03f6667cde9c6440753122186f955",
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.5.
|
|
6
|
+
'solid-panes': '3.5.24',
|
|
7
7
|
npm: '8.3.1',
|
|
8
8
|
node: '16.14.0',
|
|
9
9
|
v8: '9.4.146.24-node.20',
|