profile-pane 3.1.1-e2c26c29 → 3.1.1
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/CVPresenter.d.ts.map +1 -1
- package/lib/CVPresenter.js +4 -4
- package/lib/ProfileView.d.ts.map +1 -1
- package/lib/ProfileView.js +21 -7
- package/lib/SocialCard.d.ts.map +1 -1
- package/lib/SocialCard.js +1 -0
- package/lib/SocialPresenter.d.ts +1 -0
- package/lib/SocialPresenter.d.ts.map +1 -1
- package/lib/SocialPresenter.js +35 -11
- package/lib/editProfilePane/{EditProfileView.d.ts → editProfile.view.d.ts} +2 -4
- package/lib/editProfilePane/editProfile.view.d.ts.map +1 -0
- package/lib/editProfilePane/editProfile.view.js +144 -0
- package/lib/editProfilePane/profile.dom.d.ts +4 -0
- package/lib/editProfilePane/profile.dom.d.ts.map +1 -0
- package/lib/editProfilePane/profile.dom.js +32 -0
- package/lib/index.js +2 -2
- package/lib/presenter.js +2 -3
- package/lib/profile-pane.js +285 -641
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +58 -48
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/styles/utilities.css +0 -12
- package/lib/texts.d.ts +0 -8
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +2 -12
- package/package.json +1 -1
- package/lib/editProfilePane/EditCVCard.d.ts +0 -4
- package/lib/editProfilePane/EditCVCard.d.ts.map +0 -1
- package/lib/editProfilePane/EditCVCard.js +0 -39
- package/lib/editProfilePane/EditCommunitiesCard.d.ts +0 -4
- package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +0 -1
- package/lib/editProfilePane/EditCommunitiesCard.js +0 -38
- package/lib/editProfilePane/EditContactsCard.d.ts +0 -4
- package/lib/editProfilePane/EditContactsCard.d.ts.map +0 -1
- package/lib/editProfilePane/EditContactsCard.js +0 -49
- package/lib/editProfilePane/EditFriendsCard.d.ts +0 -4
- package/lib/editProfilePane/EditFriendsCard.d.ts.map +0 -1
- package/lib/editProfilePane/EditFriendsCard.js +0 -38
- package/lib/editProfilePane/EditOtherPreferences.d.ts +0 -4
- package/lib/editProfilePane/EditOtherPreferences.d.ts.map +0 -1
- package/lib/editProfilePane/EditOtherPreferences.js +0 -28
- package/lib/editProfilePane/EditProfileView.d.ts.map +0 -1
- package/lib/editProfilePane/EditProfileView.js +0 -101
- package/lib/editProfilePane/EditSocialCard.d.ts +0 -4
- package/lib/editProfilePane/EditSocialCard.d.ts.map +0 -1
- package/lib/editProfilePane/EditSocialCard.js +0 -39
- package/lib/rdfFormsHelper.d.ts +0 -7
- package/lib/rdfFormsHelper.d.ts.map +0 -1
- package/lib/rdfFormsHelper.js +0 -40
- package/lib/styles/rdfFormsEnforced.css +0 -171
package/lib/CVPresenter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,
|
|
1
|
+
{"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,CAqBhB"}
|
package/lib/CVPresenter.js
CHANGED
|
@@ -21,13 +21,13 @@ function skillAsText(store, sk) {
|
|
|
21
21
|
}
|
|
22
22
|
const manual = store.anyJS(sk, _solidUi.ns.vcard('role'));
|
|
23
23
|
if (manual && manual[0] > '') return manual;
|
|
24
|
-
return '';
|
|
24
|
+
return '¿¿¿ skill ???';
|
|
25
25
|
}
|
|
26
26
|
function languageAsText(store, lan) {
|
|
27
27
|
if (lan.termType === 'Literal') return lan.value; // Not normal but allow this
|
|
28
28
|
const publicId = store.anyJS(lan, _solidUi.ns.solid('publicId'));
|
|
29
29
|
if (publicId) return _solidUi.utils.label(publicId, true); // @@ check language and get name in diff language if necessary
|
|
30
|
-
return '';
|
|
30
|
+
return '-';
|
|
31
31
|
}
|
|
32
32
|
function datesAsText(startDate, endDate) {
|
|
33
33
|
return startDate ? '(' + startDate.value.slice(0, 10) + ' to ' + (endDate ? endDate.value.slice(0, 10) : '') + ')' : '';
|
|
@@ -106,9 +106,9 @@ function presentCV(subject, store) {
|
|
|
106
106
|
return x.startDate > y.startDate ? -1 : 1;
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
const skills = store.each(subject, _solidUi.ns.schema('skills')).map(sk => skillAsText(store, sk))
|
|
109
|
+
const skills = store.each(subject, _solidUi.ns.schema('skills')).map(sk => skillAsText(store, sk));
|
|
110
110
|
const languageNodes = store.each(subject, _solidUi.ns.schema('knowsLanguage'));
|
|
111
|
-
const languages = languageNodes.flatMap(node => expandRdfList(store, node)).map(lan => languageAsText(store, lan))
|
|
111
|
+
const languages = languageNodes.flatMap(node => expandRdfList(store, node)).map(lan => languageAsText(store, lan));
|
|
112
112
|
return {
|
|
113
113
|
rolesByType,
|
|
114
114
|
skills,
|
package/lib/ProfileView.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileView.d.ts","sourceRoot":"","sources":["../src/ProfileView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAC7C,OAAO,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"ProfileView.d.ts","sourceRoot":"","sources":["../src/ProfileView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAC7C,OAAO,0BAA0B,CAAA;AAwBjC,wBAAsB,WAAW,CAC/B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAE,cAAc,CAAC,CAsI1B"}
|
package/lib/ProfileView.js
CHANGED
|
@@ -16,7 +16,6 @@ var _ProfileCard = require("./ProfileCard");
|
|
|
16
16
|
var _CVCard = require("./CVCard");
|
|
17
17
|
var _SocialCard = require("./SocialCard");
|
|
18
18
|
var _StuffCard = require("./StuffCard");
|
|
19
|
-
var _texts = require("./texts");
|
|
20
19
|
// 20210527
|
|
21
20
|
// 20210527
|
|
22
21
|
// 20210527
|
|
@@ -35,6 +34,9 @@ function renderEditButton (subject) {
|
|
|
35
34
|
|
|
36
35
|
async function ProfileView(subject, context) {
|
|
37
36
|
const store = context.session.store;
|
|
37
|
+
|
|
38
|
+
// Load ontologies first
|
|
39
|
+
await (0, _SocialPresenter.loadProfileForm)(store);
|
|
38
40
|
const profileBasics = (0, _presenter.presentProfile)(subject, store);
|
|
39
41
|
const rolesByType = (0, _CVPresenter.presentCV)(subject, store);
|
|
40
42
|
const accounts = (0, _SocialPresenter.presentSocial)(subject, store);
|
|
@@ -47,7 +49,19 @@ async function ProfileView(subject, context) {
|
|
|
47
49
|
role="main"
|
|
48
50
|
aria-label="Profile for ${profileBasics.name}"
|
|
49
51
|
tabindex="-1"
|
|
50
|
-
>
|
|
52
|
+
>
|
|
53
|
+
<!-- Enhanced breadcrumb navigation -->
|
|
54
|
+
<nav id="profile-nav" aria-label="Profile sections" class="visually-hidden">
|
|
55
|
+
<ol>
|
|
56
|
+
<li><a href="#profile-card-heading">Personal Information</a></li>
|
|
57
|
+
${(() => {
|
|
58
|
+
const cv = (0, _CVCard.CVCard)(rolesByType);
|
|
59
|
+
return cv && cv.strings && cv.strings.join('').trim() !== '' ? (0, _litHtml.html)`<li><a href="#cv-heading">Resume</a></li>` : '';
|
|
60
|
+
})()}
|
|
61
|
+
${accounts.accounts && accounts.accounts.length > 0 ? (0, _litHtml.html)`<li><a href="#social-heading" id="social-accounts">Social Accounts</a></li>` : ''}
|
|
62
|
+
<li><a href="#chat-heading" id="contact-section">Contact</a></li>
|
|
63
|
+
</ol>
|
|
64
|
+
</nav>
|
|
51
65
|
|
|
52
66
|
<article
|
|
53
67
|
aria-labelledby="profile-card-heading"
|
|
@@ -71,7 +85,7 @@ async function ProfileView(subject, context) {
|
|
|
71
85
|
tabindex="-1"
|
|
72
86
|
>
|
|
73
87
|
<header class="text-center mb-md">
|
|
74
|
-
<h2 id="cv-heading" tabindex="-1"
|
|
88
|
+
<h2 id="cv-heading" tabindex="-1">Resume</h2>
|
|
75
89
|
</header>
|
|
76
90
|
<div>
|
|
77
91
|
${cv}
|
|
@@ -88,7 +102,7 @@ async function ProfileView(subject, context) {
|
|
|
88
102
|
tabindex="-1"
|
|
89
103
|
>
|
|
90
104
|
<header class="text-center mb-md">
|
|
91
|
-
<h2 id="social-heading" tabindex="-1"
|
|
105
|
+
<h2 id="social-heading" tabindex="-1">Social Accounts</h2>
|
|
92
106
|
</header>
|
|
93
107
|
<nav aria-label="Social media links">
|
|
94
108
|
${(0, _SocialCard.SocialCard)(accounts)}
|
|
@@ -104,7 +118,7 @@ async function ProfileView(subject, context) {
|
|
|
104
118
|
tabindex="-1"
|
|
105
119
|
>
|
|
106
120
|
<header class="text-center mb-md">
|
|
107
|
-
<h2 id="stuff-heading" tabindex="-1"
|
|
121
|
+
<h2 id="stuff-heading" tabindex="-1">Shared Items</h2>
|
|
108
122
|
</header>
|
|
109
123
|
<div>
|
|
110
124
|
${(0, _StuffCard.StuffCard)(profileBasics, context, subject, stuffData)}
|
|
@@ -122,7 +136,7 @@ async function ProfileView(subject, context) {
|
|
|
122
136
|
tabindex="-1"
|
|
123
137
|
>
|
|
124
138
|
<header class="text-center mb-md">
|
|
125
|
-
<h2 id="friends-heading" tabindex="-1"
|
|
139
|
+
<h2 id="friends-heading" tabindex="-1">Friends</h2>
|
|
126
140
|
</header>
|
|
127
141
|
<div role="list" aria-label="Friend connections">
|
|
128
142
|
${friends}
|
|
@@ -138,7 +152,7 @@ async function ProfileView(subject, context) {
|
|
|
138
152
|
tabindex="-1"
|
|
139
153
|
>
|
|
140
154
|
<header class="text-center mb-md">
|
|
141
|
-
<h2 id="chat-heading" tabindex="-1"
|
|
155
|
+
<h2 id="chat-heading" tabindex="-1">Contact</h2>
|
|
142
156
|
</header>
|
|
143
157
|
<div>
|
|
144
158
|
${(0, _ChatWithMe.ChatWithMe)(subject, context)}
|
package/lib/SocialCard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialCard.d.ts","sourceRoot":"","sources":["../src/SocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,yBAAyB,CAAA;AAGhC,eAAO,MAAM,UAAU,GACrB,YAAY,kBAAkB,KAC7B,
|
|
1
|
+
{"version":3,"file":"SocialCard.d.ts","sourceRoot":"","sources":["../src/SocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,yBAAyB,CAAA;AAGhC,eAAO,MAAM,UAAU,GACrB,YAAY,kBAAkB,KAC7B,cA+CF,CAAA"}
|
package/lib/SocialCard.js
CHANGED
|
@@ -33,6 +33,7 @@ const SocialCard = SocialData => {
|
|
|
33
33
|
target="_blank"
|
|
34
34
|
rel="noopener noreferrer"
|
|
35
35
|
aria-label="Visit ${account.name} profile (opens in new tab)"
|
|
36
|
+
style="display: flex; align-items: center; gap: 0.5em; text-decoration: none;"
|
|
36
37
|
>
|
|
37
38
|
<img
|
|
38
39
|
class="socialIcon"
|
package/lib/SocialPresenter.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAe,MAAM,QAAQ,CAAA;AAO1D,wBAAgB,eAAe,CAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BhE;AACD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAuBD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CAkEpB"}
|
package/lib/SocialPresenter.js
CHANGED
|
@@ -3,15 +3,37 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.loadProfileForm = loadProfileForm;
|
|
6
7
|
exports.presentSocial = presentSocial;
|
|
8
|
+
var _rdflib = require("rdflib");
|
|
7
9
|
var _solidUi = require("solid-ui");
|
|
8
|
-
|
|
10
|
+
/* babel-plugin-inline-import './ontology/profileForm.ttl' */
|
|
11
|
+
const profileForm = "@prefix os: <http://www.w3.org/2000/10/swap/os#> .\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 : <https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#>.\n@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n\n# About forms: https://solidos.github.io/solid-ui/docs/forms-intro.html\n# About personal public data: https://www.w3.org/DesignIssues/PersonalPublic.html\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 :SocialsPrompt :SocialsForm\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########### Social Media - other accounts\n#\n# Twitter, Linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:SocialsPrompt a ui:Heading; ui:contents \"Social Media etc?\" .\n:SocialsPrompt a ui:Comment; ui:contents \"Link to accounts in social media sites, etc\" .\n\n:SocialsForm a ui:Multiple;\n ui:label \"online account\";\n ui:property foaf:account;\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; ui:weight 1; ui:parts ( :AccountField :AccountIdField ).\n\n:AccountField a ui:Classifier; ui:label \"What sort of account?\"@en;\n ui:multiple false ; \n ui:category foaf:Account .\n\n:AccountIdField a ui:Options . \n\n :AccountIdField a ui:Options; ui:dependingOn rdf:type; ui:case\n [ ui:for soc:BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for soc:DiggAccount; ui:use :DiggIdField],\n [ ui:for soc:FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for soc:GithubAccount; ui:use :GithubIdField ],\n [ ui:for soc:InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for soc:LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for soc:MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for soc:MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for soc:MediumAccount; ui:use :MediumIdField ],\n [ ui:for soc:NostrAccount; ui:use :NostrIdField ],\n [ ui:for soc:OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for soc:PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for soc:RedditAccount; ui:use :RedditIdField ],\n [ ui:for soc:StravaAccount; ui:use :StravaIdField ],\n [ ui:for soc:SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for soc:TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for soc:TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for soc:TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for soc:OtherAccount; ui:use :OtherIdForm ] .\n\n :BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label \"Bluesky Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :DiggIdField\n a ui:SingleLineTextField ;\n ui:label \"Digg Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :FacebookIdField\n a ui:SingleLineTextField ;\n ui:label \"Facebook Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :GithubIdField\n a ui:SingleLineTextField ;\n ui:label \"Github Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :InstagramIdField\n a ui:SingleLineTextField ;\n ui:label \"Instagram Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label \"Linked In Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MastodonIdField\n a ui:SingleLineTextField ;\n ui:label \"Mastodon (Activity Pub) Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MatrixIdField\n a ui:SingleLineTextField ;\n ui:label \"Matrix Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MediumIdField\n a ui:SingleLineTextField ;\n ui:label \"Medium Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :NostrIdField\n a ui:SingleLineTextField ;\n ui:label \"Nostr public key\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 70 .\n\n :OrcidIdField\n a ui:SingleLineTextField ;\n ui:label \"ORCiD id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :PinterestIdField\n a ui:SingleLineTextField ;\n ui:label \"Pinterest id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :RedditIdField\n a ui:SingleLineTextField ;\n ui:label \"Reddit Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :StravaIdField\n a ui:SingleLineTextField ;\n ui:label \"Strava Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label \"Snapchat Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TiktokIdField\n a ui:SingleLineTextField ;\n ui:label \"Tiktok Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TumblrIdField\n a ui:SingleLineTextField ;\n ui:label \"Tumblr user name\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TwitterIdField\n a ui:SingleLineTextField ;\n ui:label \"Twitter Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n# an unknown SN account needs more info\n\n :OtherIdForm a ui:Group; ui:weight 0; ui:parts ( :OtherIdField :OtherIconField :OtherLabelield ).\n\n :OtherIdField\n a ui:NamedNodeURIField ;\n ui:label \"URL of account to link to\";\n ui:maxLength \"200\" ;\n ui:property foaf:homepage ; \n ui:size 60 .\n\n :OtherLabelield\n a ui:SingleLineTextField ;\n ui:label \"Label\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label ; \n ui:size 40 .\n\n :OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"URL of icon to display\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon ;\n ui:size 60 .\n\n\n\n# Subclass definitions for foaf:Account (embedded for UI category selector)\nsoc:BlueSkyAccount rdfs:subClassOf foaf:Account; rdfs:label \"Bluesky\" .\nsoc:DiggAccount rdfs:subClassOf foaf:Account; rdfs:label \"Digg\" .\nsoc:FacebookAccount rdfs:subClassOf foaf:Account; rdfs:label \"Facebook\" .\nsoc:GithubAccount rdfs:subClassOf foaf:Account; rdfs:label \"Github\" .\nsoc:InstagramAccount rdfs:subClassOf foaf:Account; rdfs:label \"Instagram\" .\nsoc:LinkedInAccount rdfs:subClassOf foaf:Account; rdfs:label \"Linked In\" .\nsoc:MastodonAccount rdfs:subClassOf foaf:Account; rdfs:label \"Mastodon\" .\nsoc:MatrixAccount rdfs:subClassOf foaf:Account; rdfs:label \"Matrix\" .\nsoc:MediumAccount rdfs:subClassOf foaf:Account; rdfs:label \"Medium\" .\nsoc:NostrAccount rdfs:subClassOf foaf:Account; rdfs:label \"Nostr\" .\nsoc:OrcidAccount rdfs:subClassOf foaf:Account; rdfs:label \"ORCiD\" .\nsoc:PinterestAccount rdfs:subClassOf foaf:Account; rdfs:label \"Pinterest\" .\nsoc:RedditAccount rdfs:subClassOf foaf:Account; rdfs:label \"Reddit\" .\nsoc:SnapchatAccount rdfs:subClassOf foaf:Account; rdfs:label \"Snapchat\" .\nsoc:StravaAccount rdfs:subClassOf foaf:Account; rdfs:label \"Strava\" .\nsoc:TiktokAccount rdfs:subClassOf foaf:Account; rdfs:label \"TikTok\" .\nsoc:TumblrAccount rdfs:subClassOf foaf:Account; rdfs:label \"Tumblr\" .\nsoc:TwitterAccount rdfs:subClassOf foaf:Account; rdfs:label \"X (formerly Twitter)\" .\nsoc:OtherAccount rdfs:subClassOf foaf:Account; rdfs:label \"Other\" .\n\n\n\n# ENDS\n";
|
|
9
12
|
/* babel-plugin-inline-import './ontology/socialMedia.ttl' */
|
|
10
|
-
const socialMediaForm = "@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@prefix org: <http://www.w3.org/ns/org#>.\n@prefix : <#>.\n\n########### ATTENTION - we cannot rename this ontology file name without migrating existing data on existing accounts\n\n########### Social Media - other accounts\n#\n# Twitter, linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Social media form\" ;\n a ui:Form ;\n ui:parts (\n :SocialsForm\n ).\n\n:SocialsForm a ui:Multiple;\n ui:label \"online account\";\n ui:property foaf:account; # the triple is created with the foaf:acccounts predicate\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :AccountField \n :AccountIdField ).\n\n:AccountField a ui:Classifier; \n ui:label \"Choose account\"@en;\n ui:multiple false ; \n ui:category foaf:Account. # the accounts are described by the foaf:Account predicate\n\n# this is what is needed to make a dropdown box\nfoaf:Account a rdfs:Class;\n rdfs:label \"Online Account Provider\";\n owl:disjointUnionOf ( \n :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount \n :OrcidAccount :PinterestAccount :RedditAccount :SnapchatAccount :StravaAccount \n :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:AccountIdField a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for :BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for :DiggAccount; ui:use :DiggIdField],\n [ ui:for :FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for :GithubAccount; ui:use :GithubIdField ],\n [ ui:for :InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for :LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for :MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for :MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for :MediumAccount; ui:use :MediumIdField ],\n [ ui:for :NostrAccount; ui:use :NostrIdField ],\n [ ui:for :OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for :PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for :RedditAccount; ui:use :RedditIdField ],\n [ ui:for :StravaAccount; ui:use :StravaIdField ],\n [ ui:for :SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for :TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for :TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for :TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for :OtherAccount; ui:use :OtherIdForm ] .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Bluesky\";\n foaf:userProfilePrefix \"https://bsky.app/profile/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Digg\";\n foaf:userProfilePrefix \"https://www.digg.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Facebook\";\n foaf:userProfilePrefix \"https://www.facebook.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Github\";\n foaf:userProfilePrefix \"https://www.github.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Instagram\";\n foaf:userProfilePrefix \"https://www.instagram.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"LinkedIn\";\n foaf:userProfilePrefix \"https://www.linkedin.com/in/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Mastodon\" ;\n foaf:userProfilePrefix \"https://mastodon.social/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Matrix\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix \"https://matrix.to/#/\" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Medium\";\n foaf:userProfilePrefix \"https://medium.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Nostr\";\n foaf:userProfilePrefix \"https://primal.net/p/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ORCiD\";\n foaf:userProfilePrefix \"https://orcid.org/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Pinterest\";\n foaf:userProfilePrefix \"https://pin.it/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Reddit\";\n foaf:userProfilePrefix \"https://www.reddit.com/user/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Strava\";\n foaf:userProfilePrefix \"https://www.strava.com/athletes/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Tumblr\";\n foaf:userProfilePrefix \"https://www.tumblr.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"X\";\n foaf:userProfilePrefix \"https://x.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n:BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\".\n\n:DiggIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\".\n\n:FacebookIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:GithubIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:InstagramIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MastodonIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MatrixIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MediumIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:NostrIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:OrcidIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:PinterestIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:RedditIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:StravaIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TiktokIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TumblrIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TwitterIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n# an unknown online account needs more info\n\n:OtherIdForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :OtherIdField \n :OtherIconField \n :OtherLabelField ).\n\n:OtherIdField\n a ui:NamedNodeURIField ;\n ui:label \"Account link\";\n ui:maxLength \"200\" ;\n ui:property foaf:homepage.\n\n:OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"Icon link\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon.\n\n:OtherLabelField\n a ui:SingleLineTextField ;\n ui:label \"Name\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label.\n\n# ends\n";
|
|
11
|
-
const socialMediaFormName = 'socialMedia.ttl'; // The name of the file to upload
|
|
12
|
-
|
|
13
|
+
const socialMedia = "@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\n@prefix : <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n\n##### Ontology of Online Accounts\n\nfoaf:Account a rdfs:Class;\n rdfs:label \"Online Account Provider\";\n owl:disjointUnionOf ( :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount :OrcidAccount :PinterestAccount\n :RedditAccount :SnapchatAccount :StravaAccount :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Bluesky\";\n foaf:userProfilePrefix \"https://bsky.app/profile/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Digg\";\n foaf:userProfilePrefix \"https://www.digg.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Facebook\";\n foaf:userProfilePrefix \"https://www.facebook.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Github\";\n foaf:userProfilePrefix \"https://www.github.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Instagram\";\n foaf:userProfilePrefix \"https://www.instagram.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Linked In\";\n foaf:userProfilePrefix \"https://www.linkedin.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Mastodon\" ;\n foaf:userProfilePrefix \"https://mastodon.social/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Matrix\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix \"https://matrix.to/#/\" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Medium\";\n foaf:userProfilePrefix \"https://medium.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Nostr\";\n foaf:userProfilePrefix \"https://primal.net/p/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ORCiD\";\n foaf:userProfilePrefix \"https://orcid.org/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Pinterest\";\n foaf:userProfilePrefix \"https://pin.it/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Reddit\";\n foaf:userProfilePrefix \"https://www.reddit.com/user/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Strava\";\n foaf:userProfilePrefix \"https://www.strava.com/athletes/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Tumblr\";\n foaf:userProfilePrefix \"https://www.tumblr.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"X (formerly Twitter)\";\n foaf:userProfilePrefix \"https://x.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n# ends\n";
|
|
13
14
|
const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
|
|
14
15
|
|
|
16
|
+
function loadProfileForm(store) {
|
|
17
|
+
const preferencesForm = store.sym('https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this');
|
|
18
|
+
const preferencesFormDoc = preferencesForm.doc();
|
|
19
|
+
const socialMediaDoc = store.sym('https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl').doc();
|
|
20
|
+
const promises = [];
|
|
21
|
+
if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
|
|
22
|
+
promises.push(new Promise((resolve, reject) => {
|
|
23
|
+
(0, _rdflib.parse)(profileForm, store, preferencesFormDoc.uri, 'text/turtle', err => {
|
|
24
|
+
if (err) reject(err);else resolve();
|
|
25
|
+
});
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
if (!store.holds(undefined, undefined, undefined, socialMediaDoc)) {
|
|
29
|
+
promises.push(new Promise((resolve, reject) => {
|
|
30
|
+
(0, _rdflib.parse)(socialMedia, store, socialMediaDoc.uri, 'text/turtle', err => {
|
|
31
|
+
if (err) reject(err);else resolve();
|
|
32
|
+
});
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
return Promise.all(promises).then(() => undefined);
|
|
36
|
+
}
|
|
15
37
|
function expandRdfList(store, node) {
|
|
16
38
|
const collectionElements = node.elements;
|
|
17
39
|
if (Array.isArray(collectionElements)) {
|
|
@@ -32,8 +54,8 @@ function expandRdfList(store, node) {
|
|
|
32
54
|
}
|
|
33
55
|
function presentSocial(subject, store) {
|
|
34
56
|
function nameForAccount(subject) {
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
57
|
+
const acIcon = store.any(subject, _solidUi.ns.foaf('name')) || store.any(subject, _solidUi.ns.rdfs('label')); // on the account itself?
|
|
58
|
+
if (acIcon) return acIcon.value;
|
|
37
59
|
const classes = store.each(subject, _solidUi.ns.rdf('type'));
|
|
38
60
|
for (const k of classes) {
|
|
39
61
|
const classIcon = store.any(k, _solidUi.ns.rdfs('label'));
|
|
@@ -42,13 +64,14 @@ function presentSocial(subject, store) {
|
|
|
42
64
|
}
|
|
43
65
|
return _solidUi.utils.label(k);
|
|
44
66
|
}
|
|
45
|
-
return '
|
|
67
|
+
return '';
|
|
46
68
|
}
|
|
47
69
|
function iconForAccount(subject) {
|
|
48
70
|
const acIcon = store.any(subject, _solidUi.ns.foaf('icon')); // on the account itself?
|
|
49
71
|
if (acIcon) return acIcon.value;
|
|
50
72
|
const classes = store.each(subject, _solidUi.ns.rdf('type'));
|
|
51
73
|
if (classes.length > 0) {
|
|
74
|
+
console.log('@@ classes[0].termType 2 ', classes[0].termType);
|
|
52
75
|
for (const k of classes) {
|
|
53
76
|
const classIcon = store.any(k, _solidUi.ns.foaf('icon'));
|
|
54
77
|
if (classIcon !== null) {
|
|
@@ -59,7 +82,9 @@ function presentSocial(subject, store) {
|
|
|
59
82
|
return DEFAULT_ICON_URI;
|
|
60
83
|
}
|
|
61
84
|
function homepageForAccount(subject) {
|
|
62
|
-
const
|
|
85
|
+
const acHomepage = store.any(subject, _solidUi.ns.foaf('homepage')); // on the account itself?
|
|
86
|
+
if (acHomepage) return acHomepage.value;
|
|
87
|
+
const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || 'No_account_Name';
|
|
63
88
|
const classes = store.each(subject, _solidUi.ns.rdf('type'));
|
|
64
89
|
for (const k of classes) {
|
|
65
90
|
const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
|
|
@@ -67,7 +92,7 @@ function presentSocial(subject, store) {
|
|
|
67
92
|
return userProfilePrefix.value + id.trim();
|
|
68
93
|
}
|
|
69
94
|
}
|
|
70
|
-
return
|
|
95
|
+
return 'no userProfilePrefix?';
|
|
71
96
|
}
|
|
72
97
|
function accountAsObject(ac) {
|
|
73
98
|
return {
|
|
@@ -76,9 +101,8 @@ function presentSocial(subject, store) {
|
|
|
76
101
|
homepage: homepageForAccount(ac)
|
|
77
102
|
};
|
|
78
103
|
}
|
|
104
|
+
// Ontology should be pre-loaded by caller via loadProfileForm(store)
|
|
79
105
|
|
|
80
|
-
// we need to load the social media accounts ontology to be able to query all data needed
|
|
81
|
-
(0, _rdfFormsHelper.loadDocument)(socialMediaFormName, socialMediaForm, store);
|
|
82
106
|
const accountNodes = store.each(subject, _solidUi.ns.foaf('account'));
|
|
83
107
|
const accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
|
|
84
108
|
if (!accountThings.length) return {
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* Unlike view panes, this is available any place whatever the real subject,
|
|
5
5
|
* and allows the user to edit their own profile.
|
|
6
6
|
*
|
|
7
|
-
* Usage: paneRegistry.register('
|
|
7
|
+
* Usage: paneRegistry.register('profile/profilePane')
|
|
8
8
|
* or standalone script adding onto existing mashlib.
|
|
9
9
|
*/
|
|
10
10
|
import { PaneDefinition } from 'pane-registry';
|
|
11
|
-
import '../styles/utilities.css';
|
|
12
|
-
import '../styles/rdfFormsEnforced.css';
|
|
13
11
|
declare const editProfileView: PaneDefinition;
|
|
14
12
|
export default editProfileView;
|
|
15
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=editProfile.view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editProfile.view.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/editProfile.view.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAS9C,QAAA,MAAM,eAAe,EAAE,cAsJtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,144 @@
|
|
|
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 '../ontology/profileForm.ttl' */
|
|
20
|
+
const profileForm = "@prefix os: <http://www.w3.org/2000/10/swap/os#> .\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 : <https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#>.\n@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n\n# About forms: https://solidos.github.io/solid-ui/docs/forms-intro.html\n# About personal public data: https://www.w3.org/DesignIssues/PersonalPublic.html\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 :SocialsPrompt :SocialsForm\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########### Social Media - other accounts\n#\n# Twitter, Linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:SocialsPrompt a ui:Heading; ui:contents \"Social Media etc?\" .\n:SocialsPrompt a ui:Comment; ui:contents \"Link to accounts in social media sites, etc\" .\n\n:SocialsForm a ui:Multiple;\n ui:label \"online account\";\n ui:property foaf:account;\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; ui:weight 1; ui:parts ( :AccountField :AccountIdField ).\n\n:AccountField a ui:Classifier; ui:label \"What sort of account?\"@en;\n ui:multiple false ; \n ui:category foaf:Account .\n\n:AccountIdField a ui:Options . \n\n :AccountIdField a ui:Options; ui:dependingOn rdf:type; ui:case\n [ ui:for soc:BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for soc:DiggAccount; ui:use :DiggIdField],\n [ ui:for soc:FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for soc:GithubAccount; ui:use :GithubIdField ],\n [ ui:for soc:InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for soc:LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for soc:MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for soc:MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for soc:MediumAccount; ui:use :MediumIdField ],\n [ ui:for soc:NostrAccount; ui:use :NostrIdField ],\n [ ui:for soc:OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for soc:PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for soc:RedditAccount; ui:use :RedditIdField ],\n [ ui:for soc:StravaAccount; ui:use :StravaIdField ],\n [ ui:for soc:SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for soc:TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for soc:TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for soc:TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for soc:OtherAccount; ui:use :OtherIdForm ] .\n\n :BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label \"Bluesky Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :DiggIdField\n a ui:SingleLineTextField ;\n ui:label \"Digg Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :FacebookIdField\n a ui:SingleLineTextField ;\n ui:label \"Facebook Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :GithubIdField\n a ui:SingleLineTextField ;\n ui:label \"Github Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :InstagramIdField\n a ui:SingleLineTextField ;\n ui:label \"Instagram Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label \"Linked In Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MastodonIdField\n a ui:SingleLineTextField ;\n ui:label \"Mastodon (Activity Pub) Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MatrixIdField\n a ui:SingleLineTextField ;\n ui:label \"Matrix Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MediumIdField\n a ui:SingleLineTextField ;\n ui:label \"Medium Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :NostrIdField\n a ui:SingleLineTextField ;\n ui:label \"Nostr public key\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 70 .\n\n :OrcidIdField\n a ui:SingleLineTextField ;\n ui:label \"ORCiD id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :PinterestIdField\n a ui:SingleLineTextField ;\n ui:label \"Pinterest id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :RedditIdField\n a ui:SingleLineTextField ;\n ui:label \"Reddit Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :StravaIdField\n a ui:SingleLineTextField ;\n ui:label \"Strava Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label \"Snapchat Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TiktokIdField\n a ui:SingleLineTextField ;\n ui:label \"Tiktok Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TumblrIdField\n a ui:SingleLineTextField ;\n ui:label \"Tumblr user name\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TwitterIdField\n a ui:SingleLineTextField ;\n ui:label \"Twitter Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n# an unknown SN account needs more info\n\n :OtherIdForm a ui:Group; ui:weight 0; ui:parts ( :OtherIdField :OtherIconField :OtherLabelield ).\n\n :OtherIdField\n a ui:NamedNodeURIField ;\n ui:label \"URL of account to link to\";\n ui:maxLength \"200\" ;\n ui:property foaf:homepage ; \n ui:size 60 .\n\n :OtherLabelield\n a ui:SingleLineTextField ;\n ui:label \"Label\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label ; \n ui:size 40 .\n\n :OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"URL of icon to display\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon ;\n ui:size 60 .\n\n\n\n# Subclass definitions for foaf:Account (embedded for UI category selector)\nsoc:BlueSkyAccount rdfs:subClassOf foaf:Account; rdfs:label \"Bluesky\" .\nsoc:DiggAccount rdfs:subClassOf foaf:Account; rdfs:label \"Digg\" .\nsoc:FacebookAccount rdfs:subClassOf foaf:Account; rdfs:label \"Facebook\" .\nsoc:GithubAccount rdfs:subClassOf foaf:Account; rdfs:label \"Github\" .\nsoc:InstagramAccount rdfs:subClassOf foaf:Account; rdfs:label \"Instagram\" .\nsoc:LinkedInAccount rdfs:subClassOf foaf:Account; rdfs:label \"Linked In\" .\nsoc:MastodonAccount rdfs:subClassOf foaf:Account; rdfs:label \"Mastodon\" .\nsoc:MatrixAccount rdfs:subClassOf foaf:Account; rdfs:label \"Matrix\" .\nsoc:MediumAccount rdfs:subClassOf foaf:Account; rdfs:label \"Medium\" .\nsoc:NostrAccount rdfs:subClassOf foaf:Account; rdfs:label \"Nostr\" .\nsoc:OrcidAccount rdfs:subClassOf foaf:Account; rdfs:label \"ORCiD\" .\nsoc:PinterestAccount rdfs:subClassOf foaf:Account; rdfs:label \"Pinterest\" .\nsoc:RedditAccount rdfs:subClassOf foaf:Account; rdfs:label \"Reddit\" .\nsoc:SnapchatAccount rdfs:subClassOf foaf:Account; rdfs:label \"Snapchat\" .\nsoc:StravaAccount rdfs:subClassOf foaf:Account; rdfs:label \"Strava\" .\nsoc:TiktokAccount rdfs:subClassOf foaf:Account; rdfs:label \"TikTok\" .\nsoc:TumblrAccount rdfs:subClassOf foaf:Account; rdfs:label \"Tumblr\" .\nsoc:TwitterAccount rdfs:subClassOf foaf:Account; rdfs:label \"X (formerly Twitter)\" .\nsoc:OtherAccount rdfs:subClassOf foaf:Account; rdfs:label \"Other\" .\n\n\n\n# ENDS\n";
|
|
21
|
+
/* babel-plugin-inline-import '../ontology/socialMedia.ttl' */
|
|
22
|
+
const socialMedia = "@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\n@prefix : <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n\n##### Ontology of Online Accounts\n\nfoaf:Account a rdfs:Class;\n rdfs:label \"Online Account Provider\";\n owl:disjointUnionOf ( :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount :OrcidAccount :PinterestAccount\n :RedditAccount :SnapchatAccount :StravaAccount :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Bluesky\";\n foaf:userProfilePrefix \"https://bsky.app/profile/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Digg\";\n foaf:userProfilePrefix \"https://www.digg.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Facebook\";\n foaf:userProfilePrefix \"https://www.facebook.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Github\";\n foaf:userProfilePrefix \"https://www.github.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Instagram\";\n foaf:userProfilePrefix \"https://www.instagram.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Linked In\";\n foaf:userProfilePrefix \"https://www.linkedin.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Mastodon\" ;\n foaf:userProfilePrefix \"https://mastodon.social/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Matrix\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix \"https://matrix.to/#/\" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Medium\";\n foaf:userProfilePrefix \"https://medium.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Nostr\";\n foaf:userProfilePrefix \"https://primal.net/p/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ORCiD\";\n foaf:userProfilePrefix \"https://orcid.org/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Pinterest\";\n foaf:userProfilePrefix \"https://pin.it/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Reddit\";\n foaf:userProfilePrefix \"https://www.reddit.com/user/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Strava\";\n foaf:userProfilePrefix \"https://www.strava.com/athletes/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Tumblr\";\n foaf:userProfilePrefix \"https://www.tumblr.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"X (formerly Twitter)\";\n foaf:userProfilePrefix \"https://x.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n# ends\n";
|
|
23
|
+
const highlightColor = _solidUi.style.highlightColor || '#7C4DFF';
|
|
24
|
+
const editProfileView = {
|
|
25
|
+
global: true,
|
|
26
|
+
icon: _solidUi.icons.iconBase + 'noun_492246.svg',
|
|
27
|
+
name: 'editProfile',
|
|
28
|
+
label: () => null,
|
|
29
|
+
// don't use this in the normal solid-panes dispatching
|
|
30
|
+
|
|
31
|
+
render: function (subject, context) {
|
|
32
|
+
//console.log('@@@ render edit profile pane: subject, context', subject, context)
|
|
33
|
+
const dom = context.dom;
|
|
34
|
+
const store = context.session.store;
|
|
35
|
+
function complainIfBad(ok, mess) {
|
|
36
|
+
if (ok) return;
|
|
37
|
+
div.appendChild(_solidUi.widgets.errorMessageBlock(dom, mess, '#fee'));
|
|
38
|
+
}
|
|
39
|
+
function renderProfileForm(div, subject) {
|
|
40
|
+
const preferencesForm = (0, _rdflib.sym)('https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this');
|
|
41
|
+
const preferencesFormDoc = preferencesForm.doc();
|
|
42
|
+
const socialMediaDoc = (0, _rdflib.sym)('https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl').doc();
|
|
43
|
+
if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
|
|
44
|
+
// If not loaded already
|
|
45
|
+
(0, _rdflib.parse)(profileForm, store, preferencesFormDoc.uri, 'text/turtle', () => null); // Load form directly
|
|
46
|
+
}
|
|
47
|
+
if (!store.holds(undefined, undefined, undefined, socialMediaDoc)) {
|
|
48
|
+
// Load socialMedia ontology for the classifier
|
|
49
|
+
(0, _rdflib.parse)(socialMedia, store, socialMediaDoc.uri, 'text/turtle', () => null);
|
|
50
|
+
}
|
|
51
|
+
div.setAttribute('data-testid', 'profile-editor');
|
|
52
|
+
// @@ div.append?
|
|
53
|
+
_solidUi.widgets.appendForm(dom, div, {}, subject, preferencesForm, editableProfile, complainIfBad);
|
|
54
|
+
} // renderProfileForm
|
|
55
|
+
|
|
56
|
+
const div = dom.createElement('div');
|
|
57
|
+
div.setAttribute('data-testid', 'profile-editor');
|
|
58
|
+
let editableProfile;
|
|
59
|
+
div.setAttribute('style', `border: 0.3em solid ${highlightColor}; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;`);
|
|
60
|
+
const table = div.appendChild(dom.createElement('table'));
|
|
61
|
+
// const top = table.appendChild(dom.createElement('tr'))
|
|
62
|
+
const main = table.appendChild(dom.createElement('tr'));
|
|
63
|
+
const bottom = table.appendChild(dom.createElement('tr'));
|
|
64
|
+
const statusArea = bottom.appendChild(dom.createElement('div'));
|
|
65
|
+
statusArea.setAttribute('style', 'padding: 0.7em;');
|
|
66
|
+
function comment(str) {
|
|
67
|
+
const p = main.appendChild(dom.createElement('p'));
|
|
68
|
+
p.setAttribute('style', 'padding: 1em;');
|
|
69
|
+
p.textContent = str;
|
|
70
|
+
return p;
|
|
71
|
+
}
|
|
72
|
+
function heading(str) {
|
|
73
|
+
const h = main.appendChild(dom.createElement('h3'));
|
|
74
|
+
h.setAttribute('style', 'color:' + highlightColor + ';');
|
|
75
|
+
h.textContent = str;
|
|
76
|
+
return h;
|
|
77
|
+
}
|
|
78
|
+
const profileContext = {
|
|
79
|
+
dom: dom,
|
|
80
|
+
div: main,
|
|
81
|
+
statusArea: statusArea,
|
|
82
|
+
me: null
|
|
83
|
+
};
|
|
84
|
+
_solidUi.login.ensureLoadedProfile(profileContext).then(theContext => {
|
|
85
|
+
const me = theContext.me;
|
|
86
|
+
heading('Edit your public profile');
|
|
87
|
+
const profile = me.doc();
|
|
88
|
+
if (!store.updater) {
|
|
89
|
+
throw new Error('Store has no updater');
|
|
90
|
+
}
|
|
91
|
+
if (store.any(me, _solidUi.ns.solid('editableProfile'))) {
|
|
92
|
+
editableProfile = store.any(me, _solidUi.ns.solid('editableProfile'));
|
|
93
|
+
} else if (store.updater.editable(profile.uri, store)) {
|
|
94
|
+
editableProfile = profile;
|
|
95
|
+
} else {
|
|
96
|
+
statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`, 'straw'));
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
comment(`Everything you put here will be public.
|
|
100
|
+
There will be other places to record private things.`);
|
|
101
|
+
heading('Your contact information');
|
|
102
|
+
main.appendChild((0, _profile.paneDiv)(context, me, 'contact'));
|
|
103
|
+
heading('People you know who have WebIDs');
|
|
104
|
+
comment(`This is your public social network.
|
|
105
|
+
Only put people here to whom you are happy to be publicly connected.
|
|
106
|
+
(You can always keep private track of friends and family in your contacts.)`);
|
|
107
|
+
|
|
108
|
+
// TODO: would be useful to explain what it means to "drag people"
|
|
109
|
+
// what is it that is being dragged?
|
|
110
|
+
// is there a way to search for people (or things to drag) on this page?
|
|
111
|
+
if (editableProfile) {
|
|
112
|
+
comment('Drag people onto the target below to add people.');
|
|
113
|
+
}
|
|
114
|
+
_solidUi.widgets.attachmentList(dom, me, main, {
|
|
115
|
+
doc: profile,
|
|
116
|
+
modify: !!editableProfile,
|
|
117
|
+
predicate: _solidUi.ns.foaf('knows'),
|
|
118
|
+
noun: 'friend'
|
|
119
|
+
});
|
|
120
|
+
heading('Communities you participate in');
|
|
121
|
+
comment('These are organizations and projects (etc) whose stuff you share');
|
|
122
|
+
|
|
123
|
+
// TODO: would be useful to explain what it means to "drag organizations"
|
|
124
|
+
// what is it that is being dragged?
|
|
125
|
+
// is there a way to search for people (or things to drag) on this page?
|
|
126
|
+
// Also provide a way of using cut and paste
|
|
127
|
+
if (editableProfile) {
|
|
128
|
+
comment('Drag organizations onto the target below to add organizations.');
|
|
129
|
+
}
|
|
130
|
+
_solidUi.widgets.attachmentList(dom, me, main, {
|
|
131
|
+
doc: profile,
|
|
132
|
+
modify: !!editableProfile,
|
|
133
|
+
predicate: _solidUi.ns.solid('community'),
|
|
134
|
+
noun: 'community'
|
|
135
|
+
});
|
|
136
|
+
renderProfileForm(main, me);
|
|
137
|
+
heading('Thank you for filling your profile.');
|
|
138
|
+
}).catch(error => {
|
|
139
|
+
statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, error, '#fee'));
|
|
140
|
+
});
|
|
141
|
+
return div;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
var _default = exports.default = editProfileView;
|