solid-panes 3.5.36 → 3.6.0-edc88cf3
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/coverage/clover.xml +152 -0
- package/coverage/coverage-final.json +6 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/outline/index.html +161 -0
- package/coverage/lcov-report/outline/outlineIcons.js.html +565 -0
- package/coverage/lcov-report/outline/propertyViews.ts.html +196 -0
- package/coverage/lcov-report/outline/viewAsImage.ts.html +121 -0
- package/coverage/lcov-report/outline/viewAsMbox.ts.html +127 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/trustedApplications/index.html +116 -0
- package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +238 -0
- package/coverage/lcov.info +202 -0
- package/jest.config.js +3 -0
- package/lib/RDFXMLPane.js.map +1 -1
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js.map +1 -1
- package/lib/audio/audioPane.js +6 -6
- package/lib/audio/audioPane.js.map +1 -1
- package/lib/classInstancePane.js.map +1 -1
- package/lib/dashboard/basicPreferences.js +7 -7
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/dashboard/homepage.js +4 -4
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js.map +1 -1
- package/lib/dokieli/dokieliPane.js +1 -1
- package/lib/dokieli/dokieliPane.js.map +1 -1
- package/lib/form/pane.js +2 -2
- package/lib/form/pane.js.map +1 -1
- package/lib/home/homePane.js +3 -3
- package/lib/home/homePane.js.map +1 -1
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/imagePane.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/internal/internalPane.js.map +1 -1
- package/lib/mainPage/header.d.ts.map +1 -1
- package/lib/mainPage/header.js +8 -8
- package/lib/mainPage/header.js.map +1 -1
- package/lib/mainPage/index.js +3 -3
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js.map +1 -1
- package/lib/outline/manager.js +24 -28
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.d.ts +2 -0
- package/lib/outline/manager.test.d.ts.map +1 -0
- package/lib/outline/manager.test.js +4 -4
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/propertyViews.js +1 -1
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/propertyViews.test.d.ts +2 -0
- package/lib/outline/propertyViews.test.d.ts.map +1 -0
- package/lib/outline/propertyViews.test.js +1 -0
- package/lib/outline/propertyViews.test.js.map +1 -1
- package/lib/outline/userInput.js.map +1 -1
- package/lib/pad/padPane.js.map +1 -1
- package/lib/playlist/playlistPane.js.map +1 -1
- package/lib/registerPanes.js +8 -3
- package/lib/registerPanes.js.map +1 -1
- package/lib/schedule/schedulePane.js +1 -1
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/sharing/sharingPane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +1 -1
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +3 -3
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/tableViewPane.js.map +1 -1
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.d.ts +2 -0
- package/lib/trustedApplications/trustedApplications.test.d.ts.map +1 -0
- package/lib/trustedApplications/trustedApplications.test.js +1 -1
- package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +5 -5
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +3 -3
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/ui/pane.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js.map +1 -1
- package/package.json +4 -4
- package/src/mainPage/header.ts +6 -3
- package/src/outline/manager.js +6 -10
- package/src/outline/propertyViews.test.ts +2 -1
- package/src/registerPanes.js +7 -2
- package/src/versionInfo.ts +3 -3
- package/tsconfig.json +7 -1
- package/.babelrc +0 -16
- package/.eslintignore +0 -3
- package/.eslintrc +0 -26
- package/.github/workflows/ci.yml +0 -82
- package/.nvmrc +0 -1
- package/lib/outline/licenseOptions.js +0 -80
- package/lib/outline/licenseOptions.js.map +0 -1
- package/lib/profile/editProfile.view.d.ts +0 -13
- package/lib/profile/editProfile.view.d.ts.map +0 -1
- package/lib/profile/editProfile.view.js +0 -135
- package/lib/profile/editProfile.view.js.map +0 -1
- package/lib/profile/profile.dom.d.ts +0 -4
- package/lib/profile/profile.dom.d.ts.map +0 -1
- package/lib/profile/profile.dom.js +0 -18
- package/lib/profile/profile.dom.js.map +0 -1
- package/src/outline/licenseOptions.js +0 -105
- package/src/profile/editProfile.view.ts +0 -164
- package/src/profile/profile.dom.ts +0 -20
- package/src/profile/profileFormText.ttl +0 -386
package/.eslintrc
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"env": {
|
|
4
|
-
"browser": true,
|
|
5
|
-
"es6": true,
|
|
6
|
-
"node": true
|
|
7
|
-
},
|
|
8
|
-
"globals": {
|
|
9
|
-
"Atomics": "readonly",
|
|
10
|
-
"SharedArrayBuffer": "readonly"
|
|
11
|
-
},
|
|
12
|
-
"parser": "@typescript-eslint/parser",
|
|
13
|
-
"plugins": [
|
|
14
|
-
"@typescript-eslint"
|
|
15
|
-
],
|
|
16
|
-
"rules": {
|
|
17
|
-
"no-unused-vars": ["warn", {
|
|
18
|
-
"argsIgnorePattern": "^_",
|
|
19
|
-
"varsIgnorePattern": "^_"
|
|
20
|
-
}],
|
|
21
|
-
"@typescript-eslint/no-unused-vars": ["warn", {
|
|
22
|
-
"argsIgnorePattern": "^_",
|
|
23
|
-
"varsIgnorePattern": "^_"
|
|
24
|
-
}]
|
|
25
|
-
}
|
|
26
|
-
}
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
-
|
|
4
|
-
name: CI
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- "**"
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- "**"
|
|
13
|
-
workflow_dispatch:
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
build:
|
|
17
|
-
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
|
|
20
|
-
strategy:
|
|
21
|
-
matrix:
|
|
22
|
-
node-version:
|
|
23
|
-
- 16.x
|
|
24
|
-
- 18.x
|
|
25
|
-
|
|
26
|
-
steps:
|
|
27
|
-
- uses: actions/checkout@v2
|
|
28
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
29
|
-
uses: actions/setup-node@v1
|
|
30
|
-
with:
|
|
31
|
-
node-version: ${{ matrix.node-version }}
|
|
32
|
-
- run: npm ci
|
|
33
|
-
- run: npm run lint --if-present
|
|
34
|
-
- run: npm test
|
|
35
|
-
- run: npm run build --if-present
|
|
36
|
-
- name: Save build
|
|
37
|
-
if: matrix.node-version == '16.x'
|
|
38
|
-
uses: actions/upload-artifact@v2
|
|
39
|
-
with:
|
|
40
|
-
name: build
|
|
41
|
-
path: |
|
|
42
|
-
.
|
|
43
|
-
!node_modules
|
|
44
|
-
retention-days: 1
|
|
45
|
-
|
|
46
|
-
npm-publish-build:
|
|
47
|
-
needs: build
|
|
48
|
-
runs-on: ubuntu-latest
|
|
49
|
-
steps:
|
|
50
|
-
- uses: actions/download-artifact@v2
|
|
51
|
-
with:
|
|
52
|
-
name: build
|
|
53
|
-
- uses: actions/setup-node@v1
|
|
54
|
-
with:
|
|
55
|
-
node-version: 16.x
|
|
56
|
-
- uses: rlespinasse/github-slug-action@v3.x
|
|
57
|
-
- name: Append commit hash to package version
|
|
58
|
-
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
|
|
59
|
-
- name: Disable pre- and post-publish actions
|
|
60
|
-
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
|
|
61
|
-
- uses: JS-DevTools/npm-publish@v1
|
|
62
|
-
with:
|
|
63
|
-
token: ${{ secrets.NPM_TOKEN }}
|
|
64
|
-
tag: ${{ env.GITHUB_REF_SLUG }}
|
|
65
|
-
|
|
66
|
-
npm-publish-latest:
|
|
67
|
-
needs: build
|
|
68
|
-
runs-on: ubuntu-latest
|
|
69
|
-
if: github.ref == 'refs/heads/main'
|
|
70
|
-
steps:
|
|
71
|
-
- uses: actions/download-artifact@v2
|
|
72
|
-
with:
|
|
73
|
-
name: build
|
|
74
|
-
- uses: actions/setup-node@v1
|
|
75
|
-
with:
|
|
76
|
-
node-version: 16.x
|
|
77
|
-
- name: Disable pre- and post-publish actions
|
|
78
|
-
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
|
|
79
|
-
- uses: JS-DevTools/npm-publish@v1
|
|
80
|
-
with:
|
|
81
|
-
token: ${{ secrets.NPM_TOKEN }}
|
|
82
|
-
tag: latest
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v18.19.0
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.licenseOptions = licenseOptions;
|
|
7
|
-
exports.licenseURI = void 0;
|
|
8
|
-
var _solidLogic = require("solid-logic");
|
|
9
|
-
// This was a student project to
|
|
10
|
-
// allow the user to chose favoite CC license terms and have them highlighted
|
|
11
|
-
|
|
12
|
-
// tabulator.options becaome UI.licenseOptions
|
|
13
|
-
// Possible future alternative directoons: Store license preferences in a solid preferences file
|
|
14
|
-
|
|
15
|
-
var licenseURI = exports.licenseURI = ['http://creativecommons.org/licenses/by-nc-nd/3.0/', 'http://creativecommons.org/licenses/by-nc-sa/3.0/', 'http://creativecommons.org/licenses/by-nc/3.0/', 'http://creativecommons.org/licenses/by-nd/3.0/', 'http://creativecommons.org/licenses/by-sa/3.0/', 'http://creativecommons.org/licenses/by/3.0/'];
|
|
16
|
-
var names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY'];
|
|
17
|
-
function licenseOptions() {
|
|
18
|
-
this.options = {};
|
|
19
|
-
this.references = [];
|
|
20
|
-
this.checkedLicenses = [];
|
|
21
|
-
this.openCheckBoxWindow = function () {
|
|
22
|
-
this["this"].display = window.open(' ', 'NewWin', 'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200');
|
|
23
|
-
};
|
|
24
|
-
var message = "<font face='arial' size='2'><form name ='checkboxes'>";
|
|
25
|
-
var lics = this.checkedLicenses;
|
|
26
|
-
for (var kk = 0; kk < lics.length; kk++) {
|
|
27
|
-
message += "<input type='checkbox' name = 'n" + kk + "' onClick = 'tabulator.options.submit()'" + (
|
|
28
|
-
// @@ FIXME
|
|
29
|
-
lics[kk] ? 'CHECKED' : '') + ' />CC: ' + names[kk] + '<br />';
|
|
30
|
-
}
|
|
31
|
-
message += "<br /> <a onclick='tabulator.options.selectAll()'>[Select All] </a>"; // @@ FIXME
|
|
32
|
-
message += "<a onclick='tabulator.options.deselectAll()'> [Deselect All]</a>"; // @@ FIXME
|
|
33
|
-
message += '</form></font>';
|
|
34
|
-
this.display.document.write(message);
|
|
35
|
-
this.display.document.close();
|
|
36
|
-
var i;
|
|
37
|
-
for (i = 0; i < 6; i++) {
|
|
38
|
-
this.references[i] = this["this"].display.document.checkboxes.elements[i];
|
|
39
|
-
}
|
|
40
|
-
this.selectAll = function () {
|
|
41
|
-
var i;
|
|
42
|
-
for (i = 0; i < 6; i++) {
|
|
43
|
-
this.display.document.checkboxes.elements[i].checked = true;
|
|
44
|
-
this.references[i].checked = true;
|
|
45
|
-
this.checkedLicenses[i] = true;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
this.deselectAll = function () {
|
|
49
|
-
var i;
|
|
50
|
-
for (i = 0; i < 6; i++) {
|
|
51
|
-
this.display.document.checkboxes.elements[i].checked = false;
|
|
52
|
-
this.references[i].checked = false;
|
|
53
|
-
this.checkedLicenses[i] = false;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
this.submit = function () {
|
|
57
|
-
// alert('this.submit: checked=' + this.references[0].checked)
|
|
58
|
-
for (var _i = 0; _i < 6; _i++) {
|
|
59
|
-
this.checkedLicenses[_i] = !!this.references[_i].checked;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
this.checkLicense = function checkLicense(statement) {
|
|
63
|
-
var licenses = _solidLogic.store.each(statement.why, _solidLogic.store.sym('http://creativecommons.org/ns#license'), null, statement.why);
|
|
64
|
-
// UI.log.info('licenses:' + statement.why + ': ' + licenses)
|
|
65
|
-
for (var _i2 = 0; _i2 < licenses.length; _i2++) {
|
|
66
|
-
for (var j = 0; j < this.checkedLicenses.length; j++) {
|
|
67
|
-
if (this.checkedLicenses[j] && licenses[_i2].uri === licenseURI[j]) {
|
|
68
|
-
return true;
|
|
69
|
-
// theClass += ' licOkay' // icon_expand
|
|
70
|
-
// break
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
};
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// ends
|
|
80
|
-
//# sourceMappingURL=licenseOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"licenseOptions.js","names":["_solidLogic","require","licenseURI","exports","names","licenseOptions","options","references","checkedLicenses","openCheckBoxWindow","display","window","open","message","lics","kk","length","document","write","close","i","checkboxes","elements","selectAll","checked","deselectAll","submit","checkLicense","statement","licenses","store","each","why","sym","j","uri"],"sources":["../../src/outline/licenseOptions.js"],"sourcesContent":["// This was a student project to\n// allow the user to chose favoite CC license terms and have them highlighted\n\n// tabulator.options becaome UI.licenseOptions\n// Possible future alternative directoons: Store license preferences in a solid preferences file\nimport { store } from 'solid-logic'\n\nexport const licenseURI = [\n 'http://creativecommons.org/licenses/by-nc-nd/3.0/',\n 'http://creativecommons.org/licenses/by-nc-sa/3.0/',\n 'http://creativecommons.org/licenses/by-nc/3.0/',\n 'http://creativecommons.org/licenses/by-nd/3.0/',\n 'http://creativecommons.org/licenses/by-sa/3.0/',\n 'http://creativecommons.org/licenses/by/3.0/'\n]\n\nconst names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY']\n\nexport function licenseOptions () {\n this.options = {}\n this.references = []\n this.checkedLicenses = []\n\n this.openCheckBoxWindow = function () {\n this.this.display = window.open(\n ' ',\n 'NewWin',\n 'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200'\n )\n }\n let message = \"<font face='arial' size='2'><form name ='checkboxes'>\"\n const lics = this.checkedLicenses\n for (let kk = 0; kk < lics.length; kk++) {\n message +=\n \"<input type='checkbox' name = 'n\" +\n kk +\n \"' onClick = 'tabulator.options.submit()'\" + // @@ FIXME\n (lics[kk] ? 'CHECKED' : '') +\n ' />CC: ' +\n names[kk] +\n '<br />'\n }\n\n message +=\n \"<br /> <a onclick='tabulator.options.selectAll()'>[Select All] </a>\" // @@ FIXME\n message += \"<a onclick='tabulator.options.deselectAll()'> [Deselect All]</a>\" // @@ FIXME\n message += '</form></font>'\n\n this.display.document.write(message)\n\n this.display.document.close()\n\n let i\n for (i = 0; i < 6; i++) {\n this.references[i] = this.this.display.document.checkboxes.elements[i]\n }\n\n this.selectAll = function () {\n let i\n for (i = 0; i < 6; i++) {\n this.display.document.checkboxes.elements[i].checked = true\n this.references[i].checked = true\n this.checkedLicenses[i] = true\n }\n }\n\n this.deselectAll = function () {\n let i\n for (i = 0; i < 6; i++) {\n this.display.document.checkboxes.elements[i].checked = false\n this.references[i].checked = false\n this.checkedLicenses[i] = false\n }\n }\n\n this.submit = function () {\n // alert('this.submit: checked=' + this.references[0].checked)\n for (let i = 0; i < 6; i++) {\n this.checkedLicenses[i] = !!this.references[i].checked\n }\n }\n\n this.checkLicense = function checkLicense (statement) {\n const licenses = store.each(\n statement.why,\n store.sym('http://creativecommons.org/ns#license'),\n null,\n statement.why\n )\n // UI.log.info('licenses:' + statement.why + ': ' + licenses)\n for (let i = 0; i < licenses.length; i++) {\n for (let j = 0; j < this.checkedLicenses.length; j++) {\n if (this.checkedLicenses[j] && licenses[i].uri === licenseURI[j]) {\n return true\n // theClass += ' licOkay' // icon_expand\n // break\n }\n }\n }\n return false\n }\n return this\n}\n\n// ends\n"],"mappings":";;;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA;AALA;AACA;;AAEA;AACA;;AAGO,IAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,CACxB,mDAAmD,EACnD,mDAAmD,EACnD,gDAAgD,EAChD,gDAAgD,EAChD,gDAAgD,EAChD,6CAA6C,CAC9C;AAED,IAAME,KAAK,GAAG,CAAC,UAAU,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EAAEA,GAAC,GAAGS,QAAQ,CAACb,MAAM,EAAEI,GAAC,EAAE,EAAE;MACxC,KAAK,IAAIc,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAAC1B,eAAe,CAACQ,MAAM,EAAEkB,CAAC,EAAE,EAAE;QACpD,IAAI,IAAI,CAAC1B,eAAe,CAAC0B,CAAC,CAAC,IAAIL,QAAQ,CAACT,GAAC,CAAC,CAACe,GAAG,KAAKjC,UAAU,CAACgC,CAAC,CAAC,EAAE;UAChE,OAAO,IAAI;UACX;UACA;QACF;MACF;IACF;IACA,OAAO,KAAK;EACd,CAAC;EACD,OAAO,IAAI;AACb;;AAEA","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Profile Editing App Pane
|
|
3
|
-
*
|
|
4
|
-
* Unlike view panes, this is available any place whatever the real subject,
|
|
5
|
-
* and allows the user to edit their own profile.
|
|
6
|
-
*
|
|
7
|
-
* Usage: paneRegistry.register('profile/profilePane')
|
|
8
|
-
* or standalone script adding onto existing mashlib.
|
|
9
|
-
*/
|
|
10
|
-
import { PaneDefinition } from 'pane-registry';
|
|
11
|
-
declare const editProfileView: PaneDefinition;
|
|
12
|
-
export default editProfileView;
|
|
13
|
-
//# sourceMappingURL=editProfile.view.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editProfile.view.d.ts","sourceRoot":"","sources":["../../src/profile/editProfile.view.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAQ9C,QAAA,MAAM,eAAe,EAAE,cA+ItB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _rdflib = require("rdflib");
|
|
8
|
-
var _solidUi = require("solid-ui");
|
|
9
|
-
var _profile = require("./profile.dom");
|
|
10
|
-
/**
|
|
11
|
-
* Profile Editing App Pane
|
|
12
|
-
*
|
|
13
|
-
* Unlike view panes, this is available any place whatever the real subject,
|
|
14
|
-
* and allows the user to edit their own profile.
|
|
15
|
-
*
|
|
16
|
-
* Usage: paneRegistry.register('profile/profilePane')
|
|
17
|
-
* or standalone script adding onto existing mashlib.
|
|
18
|
-
*/
|
|
19
|
-
/* babel-plugin-inline-import './profileFormText.ttl' */
|
|
20
|
-
var profileFormText = "# 20210404a\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Profile form\" ;\n a ui:Form ;\n # ui:part :backgroundColor, :highlightColor;\n ui:parts (\n :styleGroup\n :nicknameField\n :pronounsForm\n :LanguagesPrompt :LanguagesForm\n :CVGroup\n :SkillsPrompt :SkillsForm\n ).\n\n:styleGroup a ui:Group; ui:weight 0; ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n :styleHeading a ui:Heading; ui:contents \"The style of your public profile.\".\n :backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;\n ui:label \"Background color\"; ui:default \"#ffffff\".\n :highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;\n ui:label \"Highlight color\"; ui:default \"#000000\".\n\n# Nickname\n\n:nicknameField a ui:SingleLineTextField; ui:size 12; ui:property foaf:nick;\n ui:label \"Short name for chats, etc.\"@en, \"nom court\"@fr.\n\n # Pronouns\n\n :pronounsForm a ui:Group; ui:weight 0; ui:parts ( :pronounsPrompt :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n :pronounsPrompt a ui:Comment; ui:contents \"What are your pronouns?\" .\n\n :subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;\n ui:size 10; ui:label \"he/she/they...\" .\n :objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;\n ui:size 10; ui:label \"him/her/them...\" .\n :relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;\n ui:size 10; ui:label \"his/hers/theirs...\" .\n\n # Curriculum Vitae: membership of organizations\n\n :CVHeading a ui:Heading; ui:contents \"Public Curriculum Vitae\".\n :CVPrompt a ui:Comment; ui:contents \"What organizations have you been involved with?\" .\n\n :CVGroup a ui:Group; ui:weight 1; ui:parts ( :CVHeading :CVPrompt :involvementWithOrganizationsForm ).\n\n\n solid:Role a rdfs:Class; owl:oneOf ( solid:CurrentRole solid:FormerRole solid:FutureRole ). # Future Role too?\n\n org:member owl:inverse [ ui:label \"involvement with company, org etc\" ]. # timelimited involvement\n\n :involvementWithOrganizationsForm a ui:Multiple;\n ui:label \"Involvement with Organization\";\n ui:property org:member; ui:reverse true; # link back from role to member\n ui:ordered false; # Allow user to order CV secions rather than force date order? No.\n ui:part :RoleMembershipForm.\n\n# This is a big important form for one of a series of roles in the list.\n\n :RoleMembershipForm a ui:Group; ui:weight 3; ui:parts ( :MembershipFormHeading :roleNameField\n :escoOccupationField :orgField :RoleClassifier :RoleDatesForm :RoleDescriptionForm).\n\n :MembershipFormHeading a ui:Heading; ui:contents \"Details of this role\"@en, \"D\xE9tailes de ce r\xF4le\"@fr .\n\n :orgField a ui:Choice; ui:label \"Organization\"@en, \"Organization\"@fr;\n ui:canMintNew true; ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n :roleNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 60 .\n\n :escoOccupationField a ui:AutocompleteField;\n ui:label \"occupation\"; ui:size 60;\n ui:property org:role;\n ui:dataSource :ESCO_Occupation_DataSource;\n ui:targetClass schema:Occupation .\n\n :ESCO_Occupation_DataSource a ui:DataSource;\n schema:name \"ESCO\";\n ui:targetClass schema:Occupation ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)\".\n\n :instituteIdentityField a ui:AutocompleteField; ui:label \"in wikidata\";\n ui:size 60;\n ui:property solid:publicId; ui:dataSource :WikidataOnOrganizations.\n\n :WikidataOnOrganizations a ui:DataSource ;\n schema:name \"Wikidata\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:targetClass <http://www.wikidata.org/entity/Q43229>; # Use if nothing else\n ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) \"\"\" .\n\n :WikidataOnOrganizations ui:classMap\n [ ui:internalClass schema:Corporation; ui:externalClass <http://www.wikidata.org/entity/Q6881511>], #Enterprise is for-profit\n [ ui:internalClass schema:EducationalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q178706>], #insitution\n [ ui:internalClass schema:ResearchOrganization; ui:externalClass <http://www.wikidata.org/entity/Q31855>], # reearch insitutie\n [ ui:internalClass schema:GovernmentOrganization; ui:externalClass <http://www.wikidata.org/entity/Q327333>], #government agency\n [ ui:internalClass schema:MedicalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4287745>],\n [ ui:internalClass schema:MusicGroup; ui:externalClass <http://www.wikidata.org/entity/Q32178211>], #music organization\n [ ui:internalClass schema:NGO; ui:externalClass <http://www.wikidata.org/entity/Q163740>], #nonprofit organization @@\n [ ui:internalClass schema:Occupation; ui:externalClass <http://www.wikidata.org/entity/Q28640>], # superclass: Profession\n [ ui:internalClass schema:Organization; ui:externalClass <http://www.wikidata.org/entity/Q43229>], # Superclass; Organization\n [ ui:internalClass schema:Project; ui:externalClass <http://www.wikidata.org/entity/Q170584>],\n [ ui:internalClass schema:SportsOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4438121>] .\n\n\n# eposodes in one's career - Roles\n\nsolid:Role owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) .\nsolid:PastRole a rdfs:Class; rdfs:label \"former role\"@en, \"ancien r\xF4le\"@fr, \"vergangene Rolle\"@de, \"rol anterior\"@es .\nsolid:CurrentRole a rdfs:Class; rdfs:label \"current role\"@en, \"r\xF4le actuel\"@fr, \"momentane Rolle\"@de , \"rol actual\"@es .\nsolid:FutureRole a rdfs:Class; rdfs:label \"future role\"@en, \"r\xF4le \xE0 venir\"@fr, \"zuk\xFCnftige Rolle\"@de, \"rol futuro\"@es .\n\n:RoleDatesGroup a ui:Group; ui:weight 0; ui:parts ( :RoleClassifier :RoleDatesForm ) .\n :RoleClassifier a ui:Classifier; ui:label \"What sort of role?\"@en;\n ui:category solid:Role .\n\n :RoleDatesForm a ui:Options; ui:dependingOn rdf:type; ui:case\n [ ui:for solid:PastRole; ui:use :TwoDateForm ],\n [ ui:for solid:CurrentRole; ui:use :StartDateForm ],\n [ ui:for solid:FutureRole; ui:use :StartDateForm ].\n\n :StartDateForm a ui:DateField; ui:label \"start\"@en,\"d\xE9but\"@fr;\n ui:property schema:startDate .\n :TwoDateForm a ui:Group; ui:weight 0; ui:parts ( :StartDateForm :EndDateForm ) .\n :EndDateForm a ui:DateField; ui:label \"end\"@en,\"fin\"@fr;\n ui:property schema:endDate .\n\n:RoleDescriptionForm a ui:MultiLineTextField; ui:property schema:description;\n ui:label \"Describe your role\" .\n\n# Organizations\n\n vcard:Organization ui:creationForm :OrganizationCreationForm .\n\n# Ontology data to drive the classifier\n\nsolid:InterestingOrganization owl:disjointUnionOf (\n# Airline - a Corporation\n# Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877\n# FundingScheme - eh?\n schema:GovernmentOrganization\n# LibrarySystem\n# LocalBusiness - Corporation\n# MedicalOrganization - a Corporation or a NGO\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\nschema:PerformingGroup # a band\nschema:Project # like Solid\nschema:SportsOrganization # a Team\nsolid:OtherOrganization\n ) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; rdfs:label \"Research Organization\"@en, \"Organization de Recherche\"@fr ,\n \"organizaci\xF3n de investigaci\xF3n\"@es, \"\u0645\u0646\u0638\u0645\u0629 \u0627\u0644\u0628\u062D\u062B\"@ar, \"\u0905\u0928\u0941\u0938\u0902\u0927\u093E\u0928 \u0938\u0902\u0917\u0920\u0928\"@hi, \"Forschungsorganisation\"@de, \"shirika la utafiti\"@sw .\n\n :OrganizationCreationForm a ui:Form; schema:name \"Form for editing an organization using public data\" ;\n ui:parts ( :OrgClassifier :OrgSwitch :OrganizationNameField :homePageURIField ) .\n\n\n :OrgClassifier a ui:Classifier; ui:label \"What sort of organization?\"@en;\n ui:category solid:InterestingOrganization .\n\n :OrganizationNameField\n a ui:SingleLineTextField ;\n ui:label \"Organization Name\";\n ui:maxLength \"200\" ;\n ui:property schema:name ;\n ui:size 80 .\n\n :homePageURIField a ui:NamedNodeURIField; ui:size 80;\n ui:label \"Home page URI\"@en;\n ui:property schema:uri . # @@ ??\n\n :initituteTypeField a ui:Classifier;\n ui:label \"What sort of organization\";\n ui:category solid:InterestingOrganization .\n\n# Depending on the type of org, chose a different form\n\n :OrgSwitch a ui:Options; ui:dependingOn rdf:type;\n ui:case\n [ ui:for schema:Corporation; ui:use :CorporationForm ],\n [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],\n [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],\n [ ui:for schema:Project; ui:use :ProjectForm ],\n [ ui:for schema:NGO; ui:use :NGOForm ],\n [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],\n [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],\n [ ui:for :SportsOrganization; ui:use :SportsOrganizationForm ],\n [ ui:for solid:OtherOrganization; ui:use :OtherOrganizationForm ].\n\n\n :CorporationForm a ui:Group; ui:weight 0; ui:parts ( :CorporationPrompt :CorporationAutocomplete ) .\n\n :CorporationPrompt a ui:Comment; ui:contents \"Which corporation?\".\n\n :CorporationAutocomplete a ui:AutocompleteField;\n a ui:AutocompleteField; ui:label \"Corporation in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :WikidataInstancesByName a ui:DataSource ;\n schema:name \"Wikidata instances by name\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) \"\"\" ;\n\n # Note this form of the query is very experimental\n ui:searchByName [ ui:construct { ?subject schema:name ?name } ;\n ui:where { ?klass wdt:P279 ?targetClass .\n ?subject wdt:P31 ?klass; rdfs:label ?name .\n };\n ].\n\n :GovernmentOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :GovernmentOrganizationPrompt :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationPrompt a ui:Comment; ui:contents \"Which GovernmentOrganization?\".\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"GovernmentOrganization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :EducationalOrganizationForm a ui:Group; ui:weight 1; ui:parts ( :EducationalOrganizationPrompt :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationPrompt a ui:Comment; ui:contents \"Which Educational Organization?\".\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Educational Organization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :ResearchOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :ResearchOrganizationPrompt :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationPrompt a ui:Comment; ui:contents \"Which Research Organization?\".\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Research Insitute in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :NGOForm a ui:Group; ui:weight 0; ui:parts ( :NGOPrompt :NGOAutocomplete ) .\n\n :NGOPrompt a ui:Comment; ui:contents \"Which NGO?\".\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label \"NGO in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :PerformingGroupForm a ui:Group; ui:weight 0; ui:parts ( :PerformingGroupPrompt :PerformingGroupAutocomplete ) .\n\n :PerformingGroupPrompt a ui:Comment; ui:contents \"Which PerformingGroup?\".\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label \"PerformingGroup in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :ProjectForm a ui:Group; ui:weight 0; ui:parts ( :ProjectPrompt :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectPrompt a ui:Comment; ui:contents \"Which Project?\".\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label \"Project in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :SportsOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :SportsOrganizationPrompt :SportsOrganizationAutocomplete ) .\n\n :SportsOrganizationPrompt a ui:Comment; ui:contents \"Which Sports Organization?\".\n\n :SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"SportsOrganization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :OtherOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :OrganizationNameField :homePageURIField ) .\n\n #################### Skills\n\n :SkillsPrompt a ui:Comment; ui:contents \"Skills?\" .\n\n :SkillsForm a ui:Multiple;\n ui:label \"Skills\";\n ui:property schema:skills;\n ui:ordered false; # Allow reader to order skills\n ui:part :SkillForm.\n\n :SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).\n\n # :skillNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 30 .\n\n :escoSkillField a ui:AutocompleteField;\n ui:label \"skill\"; ui:size 30;\n ui:property solid:publicId;\n ui:dataSource :ESCO_Skill_DataSource;\n ui:targetClass schema:Skill .\n\n :ESCO_Skill_DataSource a ui:DataSource;\n schema:name \"ESCO Skill\";\n ui:targetClass esco:Skill ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)\".\n\n# Language\n\n:LanguagesPrompt a ui:Comment; ui:contents \"Languages?\" .\n\n:LanguagesForm a ui:Multiple;\n ui:label \"Languages\";\n ui:property schema:knowsLanguage; # @@@\n ui:ordered true; # Allow user to order languages most important first.\n ui:part :LanguageForm.\n\n:LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).\n\n :WikidataLanguageField a ui:AutocompleteField;\n ui:label \"Language\"; ui:size 30;\n ui:property solid:publicId; # @@\n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name \"Wikidata languages\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;\n # Add this to any literal string returned as ?subject\n\n ui:searchByNameQuery \"\"\"SELECT ?item ?subject ?name\nWHERE\n{ ?item wdt:P305 ?subject .\n OPTIONAL {?item rdfs:label ?name}\n OPTIONAL {?item wdt:P1705 ?name}\n FILTER regex(?name, \"$(name)\", \"i\")\n FILTER regex(?subject, \"^..$\", \"i\")\n}\"\"\" .\n # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages\n # Hope there are not any important ones which have three-letter codes.\n # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language \"$(languages)\". }\n\n\n# ENDS\n";
|
|
21
|
-
var highlightColor = _solidUi.style.highlightColor || '#7C4DFF';
|
|
22
|
-
var editProfileView = {
|
|
23
|
-
global: true,
|
|
24
|
-
icon: _solidUi.icons.iconBase + 'noun_492246.svg',
|
|
25
|
-
name: 'editProfile',
|
|
26
|
-
label: function label() {
|
|
27
|
-
return null;
|
|
28
|
-
},
|
|
29
|
-
render: function render(subject, context) {
|
|
30
|
-
var dom = context.dom;
|
|
31
|
-
var store = context.session.store;
|
|
32
|
-
function complainIfBad(ok, mess) {
|
|
33
|
-
if (ok) return;
|
|
34
|
-
div.appendChild(_solidUi.widgets.errorMessageBlock(dom, mess, '#fee'));
|
|
35
|
-
}
|
|
36
|
-
function renderProfileForm(div, subject) {
|
|
37
|
-
var preferencesForm = (0, _rdflib.sym)('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this');
|
|
38
|
-
var preferencesFormDoc = preferencesForm.doc();
|
|
39
|
-
if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
|
|
40
|
-
// If not loaded already
|
|
41
|
-
(0, _rdflib.parse)(profileFormText, store, preferencesFormDoc.uri, 'text/turtle', function () {
|
|
42
|
-
return null;
|
|
43
|
-
}); // Load form directly
|
|
44
|
-
}
|
|
45
|
-
_solidUi.widgets.appendForm(dom, div, {}, subject, preferencesForm, editableProfile, complainIfBad);
|
|
46
|
-
} // renderProfileForm
|
|
47
|
-
|
|
48
|
-
var div = dom.createElement('div');
|
|
49
|
-
var editableProfile;
|
|
50
|
-
div.setAttribute('style', "border: 0.3em solid ".concat(highlightColor, "; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;"));
|
|
51
|
-
var table = div.appendChild(dom.createElement('table'));
|
|
52
|
-
// const top = table.appendChild(dom.createElement('tr'))
|
|
53
|
-
var main = table.appendChild(dom.createElement('tr'));
|
|
54
|
-
var bottom = table.appendChild(dom.createElement('tr'));
|
|
55
|
-
var statusArea = bottom.appendChild(dom.createElement('div'));
|
|
56
|
-
statusArea.setAttribute('style', 'padding: 0.7em;');
|
|
57
|
-
function comment(str) {
|
|
58
|
-
var p = main.appendChild(dom.createElement('p'));
|
|
59
|
-
p.setAttribute('style', 'padding: 1em;');
|
|
60
|
-
p.textContent = str;
|
|
61
|
-
return p;
|
|
62
|
-
}
|
|
63
|
-
function heading(str) {
|
|
64
|
-
var h = main.appendChild(dom.createElement('h3'));
|
|
65
|
-
h.setAttribute('style', 'color:' + highlightColor + ';');
|
|
66
|
-
h.textContent = str;
|
|
67
|
-
return h;
|
|
68
|
-
}
|
|
69
|
-
var profileContext = {
|
|
70
|
-
dom: dom,
|
|
71
|
-
div: main,
|
|
72
|
-
statusArea: statusArea,
|
|
73
|
-
me: null
|
|
74
|
-
};
|
|
75
|
-
_solidUi.login.ensureLoadedProfile(profileContext).then(function (theContext) {
|
|
76
|
-
var me = theContext.me;
|
|
77
|
-
heading('Edit your public profile');
|
|
78
|
-
var profile = me.doc();
|
|
79
|
-
if (!store.updater) {
|
|
80
|
-
throw new Error('Store has no updater');
|
|
81
|
-
}
|
|
82
|
-
if (store.any(me, _solidUi.ns.solid('editableProfile'))) {
|
|
83
|
-
editableProfile = store.any(me, _solidUi.ns.solid('editableProfile'));
|
|
84
|
-
} else if (store.updater.editable(profile.uri, store)) {
|
|
85
|
-
editableProfile = profile;
|
|
86
|
-
} else {
|
|
87
|
-
statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, "\u26A0\uFE0F Your profile ".concat(profile, " is not editable, so we cannot do much here."), 'straw'));
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
comment("Everything you put here will be public.\n There will be other places to record private things.");
|
|
91
|
-
heading('Your contact information');
|
|
92
|
-
main.appendChild((0, _profile.paneDiv)(context, me, 'contact'));
|
|
93
|
-
heading('People you know who have WebIDs');
|
|
94
|
-
comment("This is your public social network.\n Only put people here to whom you are happy to be publicly connected.\n (You can always keep private track of friends and family in your contacts.)");
|
|
95
|
-
|
|
96
|
-
// TODO: would be useful to explain what it means to "drag people"
|
|
97
|
-
// what is it that is being dragged?
|
|
98
|
-
// is there a way to search for people (or things to drag) on this page?
|
|
99
|
-
if (editableProfile) {
|
|
100
|
-
comment('Drag people onto the target below to add people.');
|
|
101
|
-
}
|
|
102
|
-
_solidUi.widgets.attachmentList(dom, me, main, {
|
|
103
|
-
doc: profile,
|
|
104
|
-
modify: !!editableProfile,
|
|
105
|
-
predicate: _solidUi.ns.foaf('knows'),
|
|
106
|
-
noun: 'friend'
|
|
107
|
-
});
|
|
108
|
-
heading('Communities you participate in');
|
|
109
|
-
comment("These are organizations and projects (etc) whose stuff you share");
|
|
110
|
-
|
|
111
|
-
// TODO: would be useful to explain what it means to "drag organizations"
|
|
112
|
-
// what is it that is being dragged?
|
|
113
|
-
// is there a way to search for people (or things to drag) on this page?
|
|
114
|
-
// Also provide a way of using cut and paste
|
|
115
|
-
if (editableProfile) {
|
|
116
|
-
comment('Drag organizations onto the target below to add organizations.');
|
|
117
|
-
}
|
|
118
|
-
_solidUi.widgets.attachmentList(dom, me, main, {
|
|
119
|
-
doc: profile,
|
|
120
|
-
modify: !!editableProfile,
|
|
121
|
-
predicate: _solidUi.ns.solid('community'),
|
|
122
|
-
noun: 'community'
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
// heading('The style of your public profile') headings are in form now
|
|
126
|
-
renderProfileForm(main, me);
|
|
127
|
-
heading('Thank you for filling your profile.');
|
|
128
|
-
})["catch"](function (error) {
|
|
129
|
-
statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, error, '#fee'));
|
|
130
|
-
});
|
|
131
|
-
return div;
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
var _default = exports["default"] = editProfileView;
|
|
135
|
-
//# sourceMappingURL=editProfile.view.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editProfile.view.js","names":["_rdflib","require","_solidUi","_profile","profileFormText","highlightColor","style","editProfileView","global","icon","icons","iconBase","name","label","render","subject","context","dom","store","session","complainIfBad","ok","mess","div","appendChild","widgets","errorMessageBlock","renderProfileForm","preferencesForm","sym","preferencesFormDoc","doc","holds","undefined","parse","uri","appendForm","editableProfile","createElement","setAttribute","concat","table","main","bottom","statusArea","comment","str","p","textContent","heading","h","profileContext","me","login","ensureLoadedProfile","then","theContext","profile","updater","Error","any","ns","solid","editable","paneDiv","attachmentList","modify","predicate","foaf","noun","error","_default","exports"],"sources":["../../src/profile/editProfile.view.ts"],"sourcesContent":["/**\n * Profile Editing App Pane\n *\n * Unlike view panes, this is available any place whatever the real subject,\n * and allows the user to edit their own profile.\n *\n * Usage: paneRegistry.register('profile/profilePane')\n * or standalone script adding onto existing mashlib.\n */\n\nimport { PaneDefinition } from 'pane-registry'\nimport { NamedNode, parse, Store, sym } from 'rdflib'\nimport { icons, login, ns, style, widgets } from 'solid-ui'\nimport { paneDiv } from './profile.dom'\nimport profileFormText from './profileFormText.ttl'\n\nconst highlightColor = style.highlightColor || '#7C4DFF'\n\nconst editProfileView: PaneDefinition = {\n global: true,\n\n icon: icons.iconBase + 'noun_492246.svg',\n\n name: 'editProfile',\n\n label: () => null,\n\n render: function (subject, context) {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n div.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n function renderProfileForm (div: HTMLElement, subject: NamedNode) {\n const preferencesForm = sym('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this')\n const preferencesFormDoc = preferencesForm.doc()\n if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {\n // If not loaded already\n parse(profileFormText, store, preferencesFormDoc.uri, 'text/turtle', () => null) // Load form directly\n }\n\n widgets.appendForm(\n dom,\n div,\n {},\n subject,\n preferencesForm,\n editableProfile,\n complainIfBad\n )\n } // renderProfileForm\n\n const div = dom.createElement('div')\n let editableProfile: NamedNode | null\n div.setAttribute('style', `border: 0.3em solid ${highlightColor}; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;`)\n\n const table = div.appendChild(dom.createElement('table'))\n // const top = table.appendChild(dom.createElement('tr'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n\n function comment (str: string) {\n const p = main.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'padding: 1em;')\n p.textContent = str\n return p\n }\n\n function heading (str: string) {\n const h = main.appendChild(dom.createElement('h3'))\n h.setAttribute('style', 'color:' + highlightColor + ';')\n h.textContent = str\n return h\n }\n\n const profileContext = {\n dom: dom,\n div: main,\n statusArea: statusArea,\n me: null\n }\n login.ensureLoadedProfile(profileContext)\n .then(theContext => {\n const me = theContext.me!\n\n heading('Edit your public profile')\n\n const profile = me.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n if (store.any(me, ns.solid('editableProfile'))) {\n editableProfile = store.any(me as any, ns.solid('editableProfile')) as NamedNode\n } else if (store.updater.editable(profile.uri, store)) {\n editableProfile = profile\n } else {\n statusArea.appendChild(widgets.errorMessageBlock(dom, `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`, 'straw'))\n return\n }\n\n comment(`Everything you put here will be public.\n There will be other places to record private things.`)\n\n heading('Your contact information')\n\n main.appendChild(paneDiv(context, me, 'contact'))\n\n\n heading('People you know who have WebIDs')\n\n comment(`This is your public social network.\n Only put people here to whom you are happy to be publicly connected.\n (You can always keep private track of friends and family in your contacts.)`)\n\n // TODO: would be useful to explain what it means to \"drag people\"\n // what is it that is being dragged?\n // is there a way to search for people (or things to drag) on this page?\n if (editableProfile) {\n comment('Drag people onto the target below to add people.')\n }\n\n widgets.attachmentList(dom, me, main, {\n doc: profile,\n modify: !!editableProfile,\n predicate: ns.foaf('knows'),\n noun: 'friend'\n })\n\n heading('Communities you participate in')\n\n comment(`These are organizations and projects (etc) whose stuff you share`)\n\n // TODO: would be useful to explain what it means to \"drag organizations\"\n // what is it that is being dragged?\n // is there a way to search for people (or things to drag) on this page?\n // Also provide a way of using cut and paste\n if (editableProfile) {\n comment('Drag organizations onto the target below to add organizations.')\n }\n\n widgets.attachmentList(dom, me, main, {\n doc: profile,\n modify: !!editableProfile,\n predicate: ns.solid('community'),\n noun: 'community'\n })\n\n // heading('The style of your public profile') headings are in form now\n renderProfileForm(main, me)\n\n heading('Thank you for filling your profile.')\n }).catch(error => {\n statusArea.appendChild(widgets.errorMessageBlock(dom, error, '#fee'))\n })\n return div\n }\n}\n\nexport default editProfileView\n"],"mappings":";;;;;;AAWA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAbA;A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ACf,WAAW,CAYb"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.paneDiv = paneDiv;
|
|
7
|
-
function paneDiv(context, subject, paneName) {
|
|
8
|
-
var view = context.session.paneRegistry.byName(paneName);
|
|
9
|
-
if (!view) {
|
|
10
|
-
var warning = context.dom.createElement('div');
|
|
11
|
-
warning.innerText = "Unable to load view: ".concat(paneName);
|
|
12
|
-
return warning;
|
|
13
|
-
}
|
|
14
|
-
var viewContainer = view.render(subject, context);
|
|
15
|
-
viewContainer.setAttribute('style', 'border: 0.3em solid #444; border-radius: 0.5em');
|
|
16
|
-
return viewContainer;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=profile.dom.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.dom.js","names":["paneDiv","context","subject","paneName","view","session","paneRegistry","byName","warning","dom","createElement","innerText","concat","viewContainer","render","setAttribute"],"sources":["../../src/profile/profile.dom.ts"],"sourcesContent":["import { DataBrowserContext } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\n\nexport function paneDiv (\n context: DataBrowserContext,\n subject: NamedNode,\n paneName: string\n): HTMLElement {\n const view = context.session.paneRegistry.byName(paneName)\n if (!view) {\n const warning = context.dom.createElement('div')\n warning.innerText = `Unable to load view: ${paneName}`\n return warning\n }\n const viewContainer = view.render(subject, context)\n viewContainer.setAttribute(\n 'style', 'border: 0.3em solid #444; border-radius: 0.5em'\n )\n return viewContainer\n}\n"],"mappings":";;;;;;AAGO,SAASA,OAAOA,CACrBC,OAA2B,EAC3BC,OAAkB,EAClBC,QAAgB,EACH;EACb,IAAMC,IAAI,GAAGH,OAAO,CAACI,OAAO,CAACC,YAAY,CAACC,MAAM,CAACJ,QAAQ,CAAC;EAC1D,IAAI,CAACC,IAAI,EAAE;IACT,IAAMI,OAAO,GAAGP,OAAO,CAACQ,GAAG,CAACC,aAAa,CAAC,KAAK,CAAC;IAChDF,OAAO,CAACG,SAAS,2BAAAC,MAAA,CAA2BT,QAAQ,CAAE;IACtD,OAAOK,OAAO;EAChB;EACA,IAAMK,aAAa,GAAGT,IAAI,CAACU,MAAM,CAACZ,OAAO,EAAED,OAAO,CAAC;EACnDY,aAAa,CAACE,YAAY,CACxB,OAAO,EAAE,gDACX,CAAC;EACD,OAAOF,aAAa;AACtB","ignoreList":[]}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// This was a student project to
|
|
2
|
-
// allow the user to chose favoite CC license terms and have them highlighted
|
|
3
|
-
|
|
4
|
-
// tabulator.options becaome UI.licenseOptions
|
|
5
|
-
// Possible future alternative directoons: Store license preferences in a solid preferences file
|
|
6
|
-
import { store } from 'solid-logic'
|
|
7
|
-
|
|
8
|
-
export const licenseURI = [
|
|
9
|
-
'http://creativecommons.org/licenses/by-nc-nd/3.0/',
|
|
10
|
-
'http://creativecommons.org/licenses/by-nc-sa/3.0/',
|
|
11
|
-
'http://creativecommons.org/licenses/by-nc/3.0/',
|
|
12
|
-
'http://creativecommons.org/licenses/by-nd/3.0/',
|
|
13
|
-
'http://creativecommons.org/licenses/by-sa/3.0/',
|
|
14
|
-
'http://creativecommons.org/licenses/by/3.0/'
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
const names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY']
|
|
18
|
-
|
|
19
|
-
export function licenseOptions () {
|
|
20
|
-
this.options = {}
|
|
21
|
-
this.references = []
|
|
22
|
-
this.checkedLicenses = []
|
|
23
|
-
|
|
24
|
-
this.openCheckBoxWindow = function () {
|
|
25
|
-
this.this.display = window.open(
|
|
26
|
-
' ',
|
|
27
|
-
'NewWin',
|
|
28
|
-
'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200'
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
let message = "<font face='arial' size='2'><form name ='checkboxes'>"
|
|
32
|
-
const lics = this.checkedLicenses
|
|
33
|
-
for (let kk = 0; kk < lics.length; kk++) {
|
|
34
|
-
message +=
|
|
35
|
-
"<input type='checkbox' name = 'n" +
|
|
36
|
-
kk +
|
|
37
|
-
"' onClick = 'tabulator.options.submit()'" + // @@ FIXME
|
|
38
|
-
(lics[kk] ? 'CHECKED' : '') +
|
|
39
|
-
' />CC: ' +
|
|
40
|
-
names[kk] +
|
|
41
|
-
'<br />'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
message +=
|
|
45
|
-
"<br /> <a onclick='tabulator.options.selectAll()'>[Select All] </a>" // @@ FIXME
|
|
46
|
-
message += "<a onclick='tabulator.options.deselectAll()'> [Deselect All]</a>" // @@ FIXME
|
|
47
|
-
message += '</form></font>'
|
|
48
|
-
|
|
49
|
-
this.display.document.write(message)
|
|
50
|
-
|
|
51
|
-
this.display.document.close()
|
|
52
|
-
|
|
53
|
-
let i
|
|
54
|
-
for (i = 0; i < 6; i++) {
|
|
55
|
-
this.references[i] = this.this.display.document.checkboxes.elements[i]
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
this.selectAll = function () {
|
|
59
|
-
let i
|
|
60
|
-
for (i = 0; i < 6; i++) {
|
|
61
|
-
this.display.document.checkboxes.elements[i].checked = true
|
|
62
|
-
this.references[i].checked = true
|
|
63
|
-
this.checkedLicenses[i] = true
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
this.deselectAll = function () {
|
|
68
|
-
let i
|
|
69
|
-
for (i = 0; i < 6; i++) {
|
|
70
|
-
this.display.document.checkboxes.elements[i].checked = false
|
|
71
|
-
this.references[i].checked = false
|
|
72
|
-
this.checkedLicenses[i] = false
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
this.submit = function () {
|
|
77
|
-
// alert('this.submit: checked=' + this.references[0].checked)
|
|
78
|
-
for (let i = 0; i < 6; i++) {
|
|
79
|
-
this.checkedLicenses[i] = !!this.references[i].checked
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
this.checkLicense = function checkLicense (statement) {
|
|
84
|
-
const licenses = store.each(
|
|
85
|
-
statement.why,
|
|
86
|
-
store.sym('http://creativecommons.org/ns#license'),
|
|
87
|
-
null,
|
|
88
|
-
statement.why
|
|
89
|
-
)
|
|
90
|
-
// UI.log.info('licenses:' + statement.why + ': ' + licenses)
|
|
91
|
-
for (let i = 0; i < licenses.length; i++) {
|
|
92
|
-
for (let j = 0; j < this.checkedLicenses.length; j++) {
|
|
93
|
-
if (this.checkedLicenses[j] && licenses[i].uri === licenseURI[j]) {
|
|
94
|
-
return true
|
|
95
|
-
// theClass += ' licOkay' // icon_expand
|
|
96
|
-
// break
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return false
|
|
101
|
-
}
|
|
102
|
-
return this
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// ends
|