profile-pane 3.0.0 → 3.1.0-8d67e17d
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/ProfileView.d.ts.map +1 -1
- package/lib/ProfileView.js +11 -21
- package/lib/SocialCard.d.ts.map +1 -1
- package/lib/SocialCard.js +0 -1
- package/lib/SocialPresenter.d.ts +1 -1
- package/lib/SocialPresenter.d.ts.map +1 -1
- package/lib/SocialPresenter.js +21 -19
- package/lib/editProfilePane/EditCVCard.d.ts +4 -0
- package/lib/editProfilePane/EditCVCard.d.ts.map +1 -0
- package/lib/editProfilePane/EditCVCard.js +39 -0
- package/lib/editProfilePane/EditCommunitiesCard.d.ts +4 -0
- package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -0
- package/lib/editProfilePane/EditCommunitiesCard.js +38 -0
- package/lib/editProfilePane/EditContactsCard.d.ts +4 -0
- package/lib/editProfilePane/EditContactsCard.d.ts.map +1 -0
- package/lib/editProfilePane/EditContactsCard.js +49 -0
- package/lib/editProfilePane/EditFriendsCard.d.ts +4 -0
- package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -0
- package/lib/editProfilePane/EditFriendsCard.js +38 -0
- package/lib/editProfilePane/EditOtherPreferences.d.ts +4 -0
- package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -0
- package/lib/editProfilePane/EditOtherPreferences.js +28 -0
- package/lib/editProfilePane/{editProfile.view.d.ts → EditProfileView.d.ts} +3 -2
- package/lib/editProfilePane/EditProfileView.d.ts.map +1 -0
- package/lib/editProfilePane/EditProfileView.js +100 -0
- package/lib/editProfilePane/EditSocialCard.d.ts +4 -0
- package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -0
- package/lib/editProfilePane/EditSocialCard.js +39 -0
- package/lib/editProfilePane/rdfFormsHelper.d.ts +6 -0
- package/lib/editProfilePane/rdfFormsHelper.d.ts.map +1 -0
- package/lib/editProfilePane/rdfFormsHelper.js +33 -0
- package/lib/index.js +2 -2
- package/lib/presenter.js +3 -2
- package/lib/profile-pane.js +3442 -3290
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +44 -54
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/texts.d.ts +8 -0
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +12 -2
- package/package.json +2 -2
- package/lib/editProfilePane/editProfile.view.d.ts.map +0 -1
- package/lib/editProfilePane/editProfile.view.js +0 -137
- package/lib/editProfilePane/profile.dom.d.ts +0 -4
- package/lib/editProfilePane/profile.dom.d.ts.map +0 -1
- package/lib/editProfilePane/profile.dom.js +0 -32
- package/lib/styles/global.css +0 -401
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;AA+BjC,wBAAsB,WAAW,CAC/B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAE,cAAc,CAAC,CAmH1B"}
|
package/lib/ProfileView.js
CHANGED
|
@@ -16,6 +16,7 @@ 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");
|
|
19
20
|
// 20210527
|
|
20
21
|
// 20210527
|
|
21
22
|
// 20210527
|
|
@@ -33,9 +34,10 @@ function renderEditButton (subject) {
|
|
|
33
34
|
*/
|
|
34
35
|
|
|
35
36
|
async function ProfileView(subject, context) {
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
37
|
+
const store = context.session.store;
|
|
38
|
+
const profileBasics = (0, _presenter.presentProfile)(subject, store);
|
|
39
|
+
const rolesByType = (0, _CVPresenter.presentCV)(subject, store);
|
|
40
|
+
const accounts = (0, _SocialPresenter.presentSocial)(subject, store);
|
|
39
41
|
const stuffData = await (0, _StuffPresenter.presentStuff)(subject);
|
|
40
42
|
return (0, _litHtml.html)`
|
|
41
43
|
<main
|
|
@@ -45,19 +47,7 @@ async function ProfileView(subject, context) {
|
|
|
45
47
|
role="main"
|
|
46
48
|
aria-label="Profile for ${profileBasics.name}"
|
|
47
49
|
tabindex="-1"
|
|
48
|
-
>
|
|
49
|
-
<!-- Enhanced breadcrumb navigation -->
|
|
50
|
-
<nav id="profile-nav" aria-label="Profile sections" class="visually-hidden">
|
|
51
|
-
<ol>
|
|
52
|
-
<li><a href="#profile-card-heading">Personal Information</a></li>
|
|
53
|
-
${(() => {
|
|
54
|
-
const cv = (0, _CVCard.CVCard)(rolesByType);
|
|
55
|
-
return cv && cv.strings && cv.strings.join('').trim() !== '' ? (0, _litHtml.html)`<li><a href="#cv-heading">Professional Experience</a></li>` : '';
|
|
56
|
-
})()}
|
|
57
|
-
${accounts.accounts && accounts.accounts.length > 0 ? (0, _litHtml.html)`<li><a href="#social-heading" id="social-accounts">Social Accounts</a></li>` : ''}
|
|
58
|
-
<li><a href="#chat-heading" id="contact-section">Contact</a></li>
|
|
59
|
-
</ol>
|
|
60
|
-
</nav>
|
|
50
|
+
>
|
|
61
51
|
|
|
62
52
|
<article
|
|
63
53
|
aria-labelledby="profile-card-heading"
|
|
@@ -81,7 +71,7 @@ async function ProfileView(subject, context) {
|
|
|
81
71
|
tabindex="-1"
|
|
82
72
|
>
|
|
83
73
|
<header class="text-center mb-md">
|
|
84
|
-
<h2 id="cv-heading" tabindex="-1"
|
|
74
|
+
<h2 id="cv-heading" tabindex="-1">${_texts.resumeHeadingText}</h2>
|
|
85
75
|
</header>
|
|
86
76
|
<div>
|
|
87
77
|
${cv}
|
|
@@ -98,7 +88,7 @@ async function ProfileView(subject, context) {
|
|
|
98
88
|
tabindex="-1"
|
|
99
89
|
>
|
|
100
90
|
<header class="text-center mb-md">
|
|
101
|
-
<h2 id="social-heading" tabindex="-1"
|
|
91
|
+
<h2 id="social-heading" tabindex="-1">${_texts.socialAccountsHeadingText}</h2>
|
|
102
92
|
</header>
|
|
103
93
|
<nav aria-label="Social media links">
|
|
104
94
|
${(0, _SocialCard.SocialCard)(accounts)}
|
|
@@ -114,7 +104,7 @@ async function ProfileView(subject, context) {
|
|
|
114
104
|
tabindex="-1"
|
|
115
105
|
>
|
|
116
106
|
<header class="text-center mb-md">
|
|
117
|
-
<h2 id="stuff-heading" tabindex="-1"
|
|
107
|
+
<h2 id="stuff-heading" tabindex="-1">${_texts.sharedItemsHeadingText}</h2>
|
|
118
108
|
</header>
|
|
119
109
|
<div>
|
|
120
110
|
${(0, _StuffCard.StuffCard)(profileBasics, context, subject, stuffData)}
|
|
@@ -132,7 +122,7 @@ async function ProfileView(subject, context) {
|
|
|
132
122
|
tabindex="-1"
|
|
133
123
|
>
|
|
134
124
|
<header class="text-center mb-md">
|
|
135
|
-
<h2 id="friends-heading" tabindex="-1"
|
|
125
|
+
<h2 id="friends-heading" tabindex="-1">${_texts.friendsHeadingText}</h2>
|
|
136
126
|
</header>
|
|
137
127
|
<div role="list" aria-label="Friend connections">
|
|
138
128
|
${friends}
|
|
@@ -148,7 +138,7 @@ async function ProfileView(subject, context) {
|
|
|
148
138
|
tabindex="-1"
|
|
149
139
|
>
|
|
150
140
|
<header class="text-center mb-md">
|
|
151
|
-
<h2 id="chat-heading" tabindex="-1"
|
|
141
|
+
<h2 id="chat-heading" tabindex="-1">${_texts.contactHeadingText}</h2>
|
|
152
142
|
</header>
|
|
153
143
|
<div>
|
|
154
144
|
${(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,cA8CF,CAAA"}
|
package/lib/SocialCard.js
CHANGED
|
@@ -33,7 +33,6 @@ 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;"
|
|
37
36
|
>
|
|
38
37
|
<img
|
|
39
38
|
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,EAAmB,MAAM,QAAQ,CAAA;AAU9D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,QASnD;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;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CAgEpB"}
|
package/lib/SocialPresenter.js
CHANGED
|
@@ -3,26 +3,32 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.loadSocialMediaForm = loadSocialMediaForm;
|
|
7
7
|
exports.presentSocial = presentSocial;
|
|
8
8
|
var _rdflib = require("rdflib");
|
|
9
9
|
var _solidUi = require("solid-ui");
|
|
10
|
-
/* babel-plugin-inline-import './ontology/
|
|
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# was: https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this\n# moved to: https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this\n\n\n\n\n# About forms: https://solidos.github.io/solid-ui/Documentation/forms-intro.html\n# About personal public data: https://www.w3.org/DesignIssues/PersonalPublic.html\n#\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\n\n# ENDS\n";
|
|
10
|
+
/* babel-plugin-inline-import './ontology/socialMedia.ttl' */
|
|
11
|
+
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 ui:size 20 .\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 ui:size 20 .\n\n:FacebookIdField\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 70 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\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 ui:size 20 .\n\n:OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"Icon link\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon ;\n ui:size 20 .\n\n:OtherLabelField\n a ui:SingleLineTextField ;\n ui:label \"Name\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label ; \n ui:size 20 .\n\n# ends\n";
|
|
12
12
|
const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const baseUri = 'https://solidos.github.io/profile-pane/src/ontology/';
|
|
15
|
+
const socialMediaFormName = 'socialMedia.ttl'; // The name of the file to upload
|
|
16
|
+
|
|
17
|
+
// we need to load into the store some additional information about Social Media accounts
|
|
18
|
+
function loadSocialMediaForm(store) {
|
|
19
|
+
const socialMediaUri = baseUri + socialMediaFormName; // Full URI to the file
|
|
20
|
+
const socialMediaDoc = (0, _rdflib.sym)(socialMediaUri); // rdflib NamedNode for the document
|
|
21
|
+
|
|
22
|
+
if (!store.holds(undefined, undefined, undefined, socialMediaDoc)) {
|
|
23
|
+
// we are using the social media form because it contains the information we need
|
|
24
|
+
// the form can be used for both use cases: create UI for edit and render UI for display
|
|
25
|
+
(0, _rdflib.parse)(socialMediaForm, store, socialMediaUri, 'text/turtle', () => null); // Load doc directly
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
function presentSocial(subject, store) {
|
|
23
29
|
function nameForAccount(subject) {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
30
|
+
const acName = store.any(subject, _solidUi.ns.foaf('name')) || store.any(subject, _solidUi.ns.rdfs('label')); // on the account itself?
|
|
31
|
+
if (acName) return acName.value;
|
|
26
32
|
const classes = store.each(subject, _solidUi.ns.rdf('type'));
|
|
27
33
|
for (const k of classes) {
|
|
28
34
|
const classIcon = store.any(k, _solidUi.ns.rdfs('label'));
|
|
@@ -31,14 +37,13 @@ function presentSocial(subject, store) {
|
|
|
31
37
|
}
|
|
32
38
|
return _solidUi.utils.label(k);
|
|
33
39
|
}
|
|
34
|
-
return '';
|
|
40
|
+
return 'Unknown Account';
|
|
35
41
|
}
|
|
36
42
|
function iconForAccount(subject) {
|
|
37
43
|
const acIcon = store.any(subject, _solidUi.ns.foaf('icon')); // on the account itself?
|
|
38
44
|
if (acIcon) return acIcon.value;
|
|
39
45
|
const classes = store.each(subject, _solidUi.ns.rdf('type'));
|
|
40
46
|
if (classes.length > 0) {
|
|
41
|
-
console.log('@@ classes[0].termType 2 ', classes[0].termType);
|
|
42
47
|
for (const k of classes) {
|
|
43
48
|
const classIcon = store.any(k, _solidUi.ns.foaf('icon'));
|
|
44
49
|
if (classIcon !== null) {
|
|
@@ -49,9 +54,7 @@ function presentSocial(subject, store) {
|
|
|
49
54
|
return DEFAULT_ICON_URI;
|
|
50
55
|
}
|
|
51
56
|
function homepageForAccount(subject) {
|
|
52
|
-
const
|
|
53
|
-
if (acHomepage) return acHomepage.value;
|
|
54
|
-
const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || 'No_account_Name';
|
|
57
|
+
const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || '';
|
|
55
58
|
const classes = store.each(subject, _solidUi.ns.rdf('type'));
|
|
56
59
|
for (const k of classes) {
|
|
57
60
|
const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
|
|
@@ -59,7 +62,7 @@ function presentSocial(subject, store) {
|
|
|
59
62
|
return userProfilePrefix.value + id.trim();
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
|
-
return '
|
|
65
|
+
return store.anyJS(subject, _solidUi.ns.foaf('homepage'), null, subject.doc()) || '';
|
|
63
66
|
}
|
|
64
67
|
function accountAsObject(ac) {
|
|
65
68
|
return {
|
|
@@ -68,8 +71,7 @@ function presentSocial(subject, store) {
|
|
|
68
71
|
homepage: homepageForAccount(ac)
|
|
69
72
|
};
|
|
70
73
|
}
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
loadSocialMediaForm(store);
|
|
73
75
|
const accountThings = store.anyJS(subject, _solidUi.ns.foaf('account')); // load the collection
|
|
74
76
|
if (!accountThings) return {
|
|
75
77
|
accounts: []
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataBrowserContext } from 'pane-registry';
|
|
2
|
+
import { NamedNode, Store } from 'rdflib';
|
|
3
|
+
export declare function EditCVSection(context: DataBrowserContext, me: NamedNode, editableProfile: NamedNode | null, store: Store): HTMLElement;
|
|
4
|
+
//# sourceMappingURL=EditCVCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditCVCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCVCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eA+BxH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EditCVSection = EditCVSection;
|
|
7
|
+
var _rdfFormsHelper = _interopRequireDefault(require("./rdfFormsHelper"));
|
|
8
|
+
var _texts = require("../texts");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/* babel-plugin-inline-import '../ontology/resumeForm.ttl' */
|
|
11
|
+
const resumeForm = "@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@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Resume form\" ;\n a ui:Form ;\n ui:parts (\n :CVGroup\n :SkillsPrompt :SkillsForm\n :LanguagesPrompt :LanguagesForm\n ).\n\n# Curriculum Vitae: membership of organizations\n\n:CVGroup a ui:Group; ui:weight 1; ui:parts ( :CVPrompt :involvementWithOrganizationsForm ).\n\n:CVPrompt a ui:Comment; ui:contents \"What organizations have you been involved with?\" .\n\nsolid:Role a rdfs:Class; owl:oneOf ( solid:CurrentRole solid:FormerRole solid:FutureRole ). # Future Role too?\n\norg: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# 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;\nui: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)\". }";
|
|
12
|
+
const resumeFormName = 'resumeForm.ttl'; // The name of the form file
|
|
13
|
+
|
|
14
|
+
function EditCVSection(context, me, editableProfile, store) {
|
|
15
|
+
const section = context.dom.createElement('section');
|
|
16
|
+
section.setAttribute('aria-labelledby', 'edit-profile-cv-heading');
|
|
17
|
+
section.classList.add('profileSection', 'section-bg');
|
|
18
|
+
const header = context.dom.createElement('header');
|
|
19
|
+
header.classList.add('text-center', 'mb-md');
|
|
20
|
+
const heading = context.dom.createElement('h2');
|
|
21
|
+
heading.id = 'edit-profile-cv-heading';
|
|
22
|
+
heading.classList.add('section-title');
|
|
23
|
+
heading.textContent = _texts.resumeHeadingText;
|
|
24
|
+
header.appendChild(heading);
|
|
25
|
+
section.appendChild(header);
|
|
26
|
+
if (editableProfile) {
|
|
27
|
+
const comment2 = context.dom.createElement('p');
|
|
28
|
+
comment2.classList.add('p-md');
|
|
29
|
+
comment2.textContent = 'Edit your resume. These will be publicly visible on your profile.';
|
|
30
|
+
section.appendChild(comment2);
|
|
31
|
+
} else {
|
|
32
|
+
const comment1 = context.dom.createElement('p');
|
|
33
|
+
comment1.classList.add('p-md');
|
|
34
|
+
comment1.textContent = 'Login to add resume information to your profile.';
|
|
35
|
+
section.appendChild(comment1);
|
|
36
|
+
}
|
|
37
|
+
(0, _rdfFormsHelper.default)(section, me, resumeForm, resumeFormName, store, context.dom, editableProfile);
|
|
38
|
+
return section;
|
|
39
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataBrowserContext } from 'pane-registry';
|
|
2
|
+
import { NamedNode } from 'rdflib';
|
|
3
|
+
export declare function EditProfileCommunitiesSection(context: DataBrowserContext, me: NamedNode, editableProfile: NamedNode | null, profile: NamedNode): HTMLElement;
|
|
4
|
+
//# sourceMappingURL=EditCommunitiesCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditCommunitiesCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCommunitiesCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eAqC9I"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EditProfileCommunitiesSection = EditProfileCommunitiesSection;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
8
|
+
var _texts = require("../texts");
|
|
9
|
+
function EditProfileCommunitiesSection(context, me, editableProfile, profile) {
|
|
10
|
+
const section = context.dom.createElement('section');
|
|
11
|
+
section.setAttribute('aria-labelledby', 'edit-profile-communities-heading');
|
|
12
|
+
section.classList.add('profileSection', 'section-bg');
|
|
13
|
+
const header = context.dom.createElement('header');
|
|
14
|
+
header.classList.add('text-center', 'mb-md');
|
|
15
|
+
const heading = context.dom.createElement('h2');
|
|
16
|
+
heading.id = 'edit-profile-communities-heading';
|
|
17
|
+
heading.classList.add('section-title');
|
|
18
|
+
heading.textContent = _texts.communitiesHeadingText;
|
|
19
|
+
header.appendChild(heading);
|
|
20
|
+
section.appendChild(header);
|
|
21
|
+
const comment1 = context.dom.createElement('p');
|
|
22
|
+
comment1.classList.add('p-md');
|
|
23
|
+
comment1.textContent = 'These are organizations and projects whose stuff you share';
|
|
24
|
+
section.appendChild(comment1);
|
|
25
|
+
if (editableProfile) {
|
|
26
|
+
const comment2 = context.dom.createElement('p');
|
|
27
|
+
comment2.classList.add('p-md');
|
|
28
|
+
comment2.textContent = 'Drag organizations onto the target below to add organizations.';
|
|
29
|
+
section.appendChild(comment2);
|
|
30
|
+
}
|
|
31
|
+
section.appendChild(_solidUi.widgets.attachmentList(context.dom, me, section, {
|
|
32
|
+
doc: profile,
|
|
33
|
+
modify: !!editableProfile,
|
|
34
|
+
predicate: _solidUi.ns.solid('community'),
|
|
35
|
+
noun: 'community'
|
|
36
|
+
}));
|
|
37
|
+
return section;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditContactsCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditContactsCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGlC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,GAAG,WAAW,CAiB3F"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EditContactsSection = EditContactsSection;
|
|
7
|
+
var _texts = require("../texts");
|
|
8
|
+
function EditContactsSection(context, me) {
|
|
9
|
+
const section = context.dom.createElement('section');
|
|
10
|
+
section.setAttribute('aria-labelledby', 'edit-profile-contact-heading');
|
|
11
|
+
section.classList.add('profileSection', 'section-bg');
|
|
12
|
+
const header = context.dom.createElement('header');
|
|
13
|
+
header.classList.add('text-center', 'mb-md');
|
|
14
|
+
const heading = context.dom.createElement('h2');
|
|
15
|
+
heading.id = 'edit-profile-contact-heading';
|
|
16
|
+
heading.classList.add('section-title');
|
|
17
|
+
heading.textContent = _texts.yourContactInformationHeading;
|
|
18
|
+
header.appendChild(heading);
|
|
19
|
+
section.appendChild(header);
|
|
20
|
+
section.appendChild(paneDiv(context, me, 'contact'));
|
|
21
|
+
return section;
|
|
22
|
+
}
|
|
23
|
+
function paneDiv(context, subject, paneName) {
|
|
24
|
+
const view = context.session.paneRegistry.byName(paneName);
|
|
25
|
+
if (!view) {
|
|
26
|
+
const warning = context.dom.createElement('div');
|
|
27
|
+
warning.innerText = `Unable to load view: ${paneName}`;
|
|
28
|
+
return warning;
|
|
29
|
+
}
|
|
30
|
+
const viewContainer = view.render(subject, context);
|
|
31
|
+
|
|
32
|
+
// Handle different node types
|
|
33
|
+
let container;
|
|
34
|
+
if (viewContainer && typeof viewContainer.setAttribute === 'function') {
|
|
35
|
+
// It's already an Element node
|
|
36
|
+
container = viewContainer;
|
|
37
|
+
} else if (viewContainer && viewContainer.nodeType === Node.TEXT_NODE) {
|
|
38
|
+
// It's a Text node, wrap it in a section for semantics
|
|
39
|
+
container = context.dom.createElement('section');
|
|
40
|
+
container.appendChild(viewContainer);
|
|
41
|
+
} else {
|
|
42
|
+
// Fallback for other cases
|
|
43
|
+
container = context.dom.createElement('section');
|
|
44
|
+
container.innerText = `View render did not return a valid Node for: ${paneName}`;
|
|
45
|
+
}
|
|
46
|
+
container.setAttribute('role', 'region');
|
|
47
|
+
container.setAttribute('aria-label', `${paneName} section`);
|
|
48
|
+
return container;
|
|
49
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataBrowserContext } from 'pane-registry';
|
|
2
|
+
import { NamedNode } from 'rdflib';
|
|
3
|
+
export declare function EditFriendsSection(context: DataBrowserContext, me: NamedNode, editableProfile: NamedNode | null, profile: NamedNode): HTMLElement;
|
|
4
|
+
//# sourceMappingURL=EditFriendsCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditFriendsCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditFriendsCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eAsCnI"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EditFriendsSection = EditFriendsSection;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
8
|
+
var _texts = require("../texts");
|
|
9
|
+
function EditFriendsSection(context, me, editableProfile, profile) {
|
|
10
|
+
const section = context.dom.createElement('section');
|
|
11
|
+
section.setAttribute('aria-labelledby', 'edit-profile-friends-heading');
|
|
12
|
+
section.classList.add('profileSection', 'section-bg');
|
|
13
|
+
const header = context.dom.createElement('header');
|
|
14
|
+
header.classList.add('text-center', 'mb-md');
|
|
15
|
+
const heading = context.dom.createElement('h2');
|
|
16
|
+
heading.id = 'edit-profile-friends-heading';
|
|
17
|
+
heading.classList.add('section-title');
|
|
18
|
+
heading.textContent = _texts.friendsHeadingText;
|
|
19
|
+
header.appendChild(heading);
|
|
20
|
+
section.appendChild(header);
|
|
21
|
+
const comment1 = context.dom.createElement('p');
|
|
22
|
+
comment1.classList.add('p-md');
|
|
23
|
+
comment1.textContent = 'This is your public social network. Only put people here to whom you are happy to be publicly connected. (You can always keep private track of friends and family in your contacts.)';
|
|
24
|
+
section.appendChild(comment1);
|
|
25
|
+
if (editableProfile) {
|
|
26
|
+
const comment2 = context.dom.createElement('p');
|
|
27
|
+
comment2.classList.add('p-md');
|
|
28
|
+
comment2.textContent = 'Drag people onto the target below to add people.';
|
|
29
|
+
section.appendChild(comment2);
|
|
30
|
+
}
|
|
31
|
+
section.appendChild(_solidUi.widgets.attachmentList(context.dom, me, section, {
|
|
32
|
+
doc: profile,
|
|
33
|
+
modify: !!editableProfile,
|
|
34
|
+
predicate: _solidUi.ns.foaf('knows'),
|
|
35
|
+
noun: 'friend'
|
|
36
|
+
}));
|
|
37
|
+
return section;
|
|
38
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataBrowserContext } from 'pane-registry';
|
|
2
|
+
import { NamedNode, Store } from 'rdflib';
|
|
3
|
+
export declare function EditOtherPreferencesSection(context: DataBrowserContext, me: NamedNode, editableProfile: NamedNode | null, store: Store): HTMLElement;
|
|
4
|
+
//# sourceMappingURL=EditOtherPreferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditOtherPreferences.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditOtherPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAmBtI"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EditOtherPreferencesSection = EditOtherPreferencesSection;
|
|
7
|
+
var _rdfFormsHelper = _interopRequireDefault(require("./rdfFormsHelper"));
|
|
8
|
+
var _texts = require("../texts");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/* babel-plugin-inline-import '../ontology/otherPreferencesForm.ttl' */
|
|
11
|
+
const otherPreferencesForm = "@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\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 foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Other preferences form\" ;\n a ui:Form ;\n ui:parts (\n :styleGroup\n :nicknameGroup\n :pronounsGroup\n ).\n\n:styleGroup a ui:Group; ui:weight 0; \n ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n\n:styleHeading a ui:Heading; ui:contents \"The style of your public profile.\".\n\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:nicknameGroup a ui:Group; ui:weight 0; \n ui:parts ( :nicknameHeading :nicknameField) .\n\n:nicknameHeading a ui:Heading; ui:contents \"What is your nickname?\" .\n\n:nicknameField a ui:SingleLineTextField; \n ui:property foaf:nick;\n ui:label \"Nickname\"@en, \"Nom court\"@fr.\n\n# Pronouns\n\n:pronounsGroup a ui:Group; ui:weight 0; \n ui:parts ( :pronounsHeading :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n:pronounsHeading a ui:Heading; 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...\" .";
|
|
12
|
+
const otherPreferencesFormName = 'otherPreferencesForm.ttl'; // The name of the form file
|
|
13
|
+
|
|
14
|
+
function EditOtherPreferencesSection(context, me, editableProfile, store) {
|
|
15
|
+
const section = context.dom.createElement('section');
|
|
16
|
+
section.setAttribute('aria-labelledby', 'edit-profile-other-preferences-heading');
|
|
17
|
+
section.classList.add('profileSection', 'section-bg');
|
|
18
|
+
const header = context.dom.createElement('header');
|
|
19
|
+
header.classList.add('text-center', 'mb-md');
|
|
20
|
+
const heading = context.dom.createElement('h2');
|
|
21
|
+
heading.id = 'edit-profile-other-preferences-heading';
|
|
22
|
+
heading.classList.add('section-title');
|
|
23
|
+
heading.textContent = _texts.otherPreferencesHeadingText;
|
|
24
|
+
header.appendChild(heading);
|
|
25
|
+
section.appendChild(header);
|
|
26
|
+
(0, _rdfFormsHelper.default)(section, me, otherPreferencesForm, otherPreferencesFormName, store, context.dom, editableProfile);
|
|
27
|
+
return section;
|
|
28
|
+
}
|
|
@@ -4,10 +4,11 @@
|
|
|
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('profile/
|
|
7
|
+
* Usage: paneRegistry.register('/profile/editProfile.view)
|
|
8
8
|
* or standalone script adding onto existing mashlib.
|
|
9
9
|
*/
|
|
10
10
|
import { PaneDefinition } from 'pane-registry';
|
|
11
|
+
import '../styles/utilities.css';
|
|
11
12
|
declare const editProfileView: PaneDefinition;
|
|
12
13
|
export default editProfileView;
|
|
13
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=EditProfileView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditProfileView.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditProfileView.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,yBAAyB,CAAA;AAIhC,QAAA,MAAM,eAAe,EAAE,cAiFtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|