profile-pane 3.1.3 → 3.1.4
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/FriendList.d.ts +0 -1
- package/lib/FriendList.d.ts.map +1 -1
- package/lib/FriendList.js +5 -33
- package/lib/SocialPresenter.js +1 -1
- package/lib/addMeToYourFriends.d.ts +4 -3
- package/lib/addMeToYourFriends.d.ts.map +1 -1
- package/lib/addMeToYourFriends.js +25 -9
- package/lib/editProfilePane/EditCVCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCVCard.js +2 -7
- package/lib/editProfilePane/EditCommunitiesCard.d.ts +3 -1
- package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.js +58 -23
- package/lib/editProfilePane/EditFriendsCard.d.ts +3 -1
- package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditFriendsCard.js +58 -23
- package/lib/editProfilePane/EditOtherPreferences.js +1 -1
- package/lib/editProfilePane/EditProfileView.d.ts +1 -1
- package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
- package/lib/editProfilePane/EditProfileView.js +7 -3
- package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditSocialCard.js +2 -7
- package/lib/editProfilePane/editProfilePresenter.d.ts +4 -0
- package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -0
- package/lib/editProfilePane/editProfilePresenter.js +108 -0
- package/lib/profile-pane.js +1005 -340
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +45 -46
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/rdfFormsHelper.d.ts +1 -0
- package/lib/rdfFormsHelper.d.ts.map +1 -1
- package/lib/rdfFormsHelper.js +125 -0
- package/lib/styles/ProfileCard.css +6 -0
- package/lib/styles/ProfileView.css +3 -5
- package/lib/styles/editProfile.css +62 -0
- package/lib/styles/profileRDFFormsEnforced.css +427 -0
- package/lib/styles/utilities.css +30 -1
- package/lib/texts.d.ts +5 -5
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +5 -5
- package/package.json +9 -6
- package/lib/styles/rdfFormsEnforced.css +0 -186
package/lib/FriendList.d.ts
CHANGED
|
@@ -3,5 +3,4 @@ import { NamedNode } from 'rdflib';
|
|
|
3
3
|
import { TemplateResult } from 'lit-html';
|
|
4
4
|
import './styles/FriendList.css';
|
|
5
5
|
export declare const FriendList: (subject: NamedNode, context: DataBrowserContext) => TemplateResult | null;
|
|
6
|
-
export declare const extractFriends: (subject: NamedNode, { dom }: DataBrowserContext) => HTMLDivElement;
|
|
7
6
|
//# sourceMappingURL=FriendList.d.ts.map
|
package/lib/FriendList.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FriendList.d.ts","sourceRoot":"","sources":["../src/FriendList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FriendList.d.ts","sourceRoot":"","sources":["../src/FriendList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,yBAAyB,CAAA;AAIhC,eAAO,MAAM,UAAU,GACrB,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,cAAc,GAAG,IAiBnB,CAAA"}
|
package/lib/FriendList.js
CHANGED
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var _solidUi = require("solid-ui");
|
|
6
|
+
exports.FriendList = void 0;
|
|
8
7
|
var _litHtml = require("lit-html");
|
|
9
8
|
require("./styles/FriendList.css");
|
|
9
|
+
var _addMeToYourFriends = require("./addMeToYourFriends");
|
|
10
10
|
const FriendList = (subject, context) => {
|
|
11
|
-
const friends = extractFriends(subject, context);
|
|
11
|
+
const friends = (0, _addMeToYourFriends.extractFriends)(false, subject, context);
|
|
12
12
|
if (!friends || !friends.textContent?.trim()) return null;
|
|
13
13
|
return (0, _litHtml.html)`
|
|
14
14
|
<section
|
|
15
15
|
class="friendListSection"
|
|
16
|
-
role="region"
|
|
17
|
-
aria-labelledby="friends-section-title"
|
|
18
16
|
data-testid="friend-list"
|
|
19
17
|
>
|
|
18
|
+
<h2 id="friends-section-title" class="sr-only">Friends</h2>
|
|
20
19
|
<nav aria-label="Friend profiles">
|
|
21
20
|
<ul class="list-reset zebra-stripe" role="list">
|
|
22
21
|
${friends}
|
|
@@ -25,31 +24,4 @@ const FriendList = (subject, context) => {
|
|
|
25
24
|
</section>
|
|
26
25
|
`;
|
|
27
26
|
};
|
|
28
|
-
exports.FriendList = FriendList;
|
|
29
|
-
const extractFriends = (subject, {
|
|
30
|
-
dom
|
|
31
|
-
}) => {
|
|
32
|
-
const target = dom.createElement('div');
|
|
33
|
-
_solidUi.widgets.attachmentList(dom, subject, target, {
|
|
34
|
-
doc: subject.doc(),
|
|
35
|
-
modify: false,
|
|
36
|
-
predicate: _solidUi.ns.foaf('knows'),
|
|
37
|
-
noun: 'friend'
|
|
38
|
-
});
|
|
39
|
-
if (target.textContent === '') return null;
|
|
40
|
-
// Add 'friendItem' class and unique aria-label to each <li> for accessibility
|
|
41
|
-
target.querySelectorAll('li').forEach((li, idx) => {
|
|
42
|
-
li.classList.add('friendItem');
|
|
43
|
-
// Try to find a link or text to use as a label
|
|
44
|
-
const link = li.querySelector('a');
|
|
45
|
-
if (link && link.textContent) {
|
|
46
|
-
li.setAttribute('aria-label', `Friend: ${link.textContent.trim()}`);
|
|
47
|
-
} else if (li.textContent) {
|
|
48
|
-
li.setAttribute('aria-label', `Friend: ${li.textContent.trim()}`);
|
|
49
|
-
} else {
|
|
50
|
-
li.setAttribute('aria-label', `Friend ${idx + 1}`);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
return target;
|
|
54
|
-
};
|
|
55
|
-
exports.extractFriends = extractFriends;
|
|
27
|
+
exports.FriendList = FriendList;
|
package/lib/SocialPresenter.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.presentSocial = presentSocial;
|
|
|
7
7
|
var _solidUi = require("solid-ui");
|
|
8
8
|
var _rdfFormsHelper = require("./rdfFormsHelper");
|
|
9
9
|
/* 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";
|
|
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 \"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
11
|
const socialMediaFormName = 'socialMedia.ttl'; // The name of the file to upload
|
|
12
12
|
|
|
13
13
|
const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
|
|
@@ -4,7 +4,8 @@ import { LiveStore, NamedNode } from 'rdflib';
|
|
|
4
4
|
import './styles/ProfileCard.css';
|
|
5
5
|
declare const addMeToYourFriendsDiv: (subject: NamedNode, context: DataBrowserContext) => TemplateResult;
|
|
6
6
|
declare const createAddMeToYourFriendsButton: (subject: NamedNode, context: DataBrowserContext) => HTMLButtonElement;
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
|
|
7
|
+
declare function saveNewThing(subject: NamedNode, context: DataBrowserContext, predicate: NamedNode): Promise<void>;
|
|
8
|
+
declare function checkIfThingExists(store: LiveStore, me: NamedNode, subject: NamedNode, predicate: NamedNode): Promise<boolean>;
|
|
9
|
+
declare function extractFriends(editable: boolean, subject: NamedNode, { dom }: DataBrowserContext): HTMLDivElement | null;
|
|
10
|
+
export { addMeToYourFriendsDiv, createAddMeToYourFriendsButton, saveNewThing, extractFriends, checkIfThingExists };
|
|
10
11
|
//# sourceMappingURL=addMeToYourFriends.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addMeToYourFriends.d.ts","sourceRoot":"","sources":["../src/addMeToYourFriends.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAM,MAAM,QAAQ,CAAA;AASjD,OAAO,0BAA0B,CAAA;AAIjC,QAAA,MAAM,qBAAqB,GACzB,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,cAkBF,CAAA;AAED,QAAA,MAAM,8BAA8B,GAClC,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,iBAmDF,CAAA;AAED,iBAAe,
|
|
1
|
+
{"version":3,"file":"addMeToYourFriends.d.ts","sourceRoot":"","sources":["../src/addMeToYourFriends.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAM,MAAM,QAAQ,CAAA;AASjD,OAAO,0BAA0B,CAAA;AAIjC,QAAA,MAAM,qBAAqB,GACzB,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,cAkBF,CAAA;AAED,QAAA,MAAM,8BAA8B,GAClC,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,iBAmDF,CAAA;AAED,iBAAe,YAAY,CACzB,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,IAAI,CAAC,CAoBf;AAOD,iBAAe,kBAAkB,CAC/B,KAAK,EAAE,SAAS,EAChB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC,CAKlB;AAED,iBAAS,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,kBAAkB,GAAG,cAAc,GAAG,IAAI,CAajH;AAED,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,YAAY,EACZ,cAAc,EACd,kBAAkB,EACnB,CAAA"}
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.addMeToYourFriendsDiv = void 0;
|
|
7
|
-
exports.
|
|
7
|
+
exports.checkIfThingExists = checkIfThingExists;
|
|
8
8
|
exports.createAddMeToYourFriendsButton = void 0;
|
|
9
|
-
exports.
|
|
9
|
+
exports.extractFriends = extractFriends;
|
|
10
|
+
exports.saveNewThing = saveNewThing;
|
|
10
11
|
var _litHtml = require("lit-html");
|
|
11
12
|
var _solidLogic = require("solid-logic");
|
|
12
13
|
var _rdflib = require("rdflib");
|
|
@@ -43,7 +44,7 @@ const createAddMeToYourFriendsButton = (subject, context) => {
|
|
|
43
44
|
});
|
|
44
45
|
function setButtonHandler(event) {
|
|
45
46
|
event.preventDefault();
|
|
46
|
-
|
|
47
|
+
saveNewThing(subject, context, _solidUi.ns.foaf('knows')).then(() => {
|
|
47
48
|
(0, _buttonsHelper.clearPreviousMessage)(buttonContainer);
|
|
48
49
|
(0, _buttonsHelper.mention)(buttonContainer, _texts.friendWasAddedSuccesMessage);
|
|
49
50
|
refreshButton();
|
|
@@ -58,7 +59,7 @@ const createAddMeToYourFriendsButton = (subject, context) => {
|
|
|
58
59
|
const me = _solidLogic.authn.currentUser();
|
|
59
60
|
const store = context.session.store;
|
|
60
61
|
if (checkIfAnyUserLoggedIn(me)) {
|
|
61
|
-
|
|
62
|
+
checkIfThingExists(store, me, subject, _solidUi.ns.foaf('knows')).then(friendExists => {
|
|
62
63
|
if (friendExists) {
|
|
63
64
|
//logged in and friend exists or friend was just added
|
|
64
65
|
button.innerHTML = _texts.friendExistsAlreadyButtonText.toUpperCase();
|
|
@@ -75,15 +76,15 @@ const createAddMeToYourFriendsButton = (subject, context) => {
|
|
|
75
76
|
return button;
|
|
76
77
|
};
|
|
77
78
|
exports.createAddMeToYourFriendsButton = createAddMeToYourFriendsButton;
|
|
78
|
-
async function
|
|
79
|
+
async function saveNewThing(subject, context, predicate) {
|
|
79
80
|
const me = _solidLogic.authn.currentUser();
|
|
80
81
|
const store = context.session.store;
|
|
81
82
|
if (checkIfAnyUserLoggedIn(me)) {
|
|
82
|
-
if (!(await
|
|
83
|
+
if (!(await checkIfThingExists(store, me, subject, predicate))) {
|
|
83
84
|
//if friend does not exist, we add her/him
|
|
84
85
|
await store.fetcher.load(me);
|
|
85
86
|
const updater = store.updater;
|
|
86
|
-
const toBeInserted = [(0, _rdflib.st)(me,
|
|
87
|
+
const toBeInserted = [(0, _rdflib.st)(me, predicate, subject, me.doc())];
|
|
87
88
|
try {
|
|
88
89
|
await updater.update([], toBeInserted);
|
|
89
90
|
} catch (error) {
|
|
@@ -97,7 +98,22 @@ async function saveNewFriend(subject, context) {
|
|
|
97
98
|
function checkIfAnyUserLoggedIn(me) {
|
|
98
99
|
if (me) return true;else return false;
|
|
99
100
|
}
|
|
100
|
-
async function
|
|
101
|
+
async function checkIfThingExists(store, me, subject, predicate) {
|
|
101
102
|
await store.fetcher.load(me);
|
|
102
|
-
if (store.whether(me,
|
|
103
|
+
if (store.whether(me, predicate, subject, me.doc()) === 0) return false;else return true;
|
|
104
|
+
}
|
|
105
|
+
function extractFriends(editable, subject, {
|
|
106
|
+
dom
|
|
107
|
+
}) {
|
|
108
|
+
const target = dom.createElement('div');
|
|
109
|
+
console.log('Extracting friends for subject:', subject.doc()); // Debug log to check the subject
|
|
110
|
+
_solidUi.widgets.attachmentList(dom, subject, target, {
|
|
111
|
+
doc: subject.doc(),
|
|
112
|
+
modify: editable,
|
|
113
|
+
predicate: _solidUi.ns.foaf('knows'),
|
|
114
|
+
noun: 'friend'
|
|
115
|
+
});
|
|
116
|
+
if (target.textContent === '') return null;
|
|
117
|
+
console.log('Extracted friends:', target.innerHTML); // Debug log to check the generated HTML
|
|
118
|
+
return target;
|
|
103
119
|
}
|
|
@@ -1 +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,
|
|
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,eA2BxH"}
|
|
@@ -8,7 +8,7 @@ var _rdfFormsHelper = _interopRequireDefault(require("../rdfFormsHelper"));
|
|
|
8
8
|
var _texts = require("../texts");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
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 :SkillsHeading :SkillsForm\n :LanguagesHeading :LanguagesForm\n ).\n\n# Curriculum Vitae: membership of organizations\n\n:CVGroup a ui:Group; \n ui:weight 1; \n ui:parts ( \n :CVPrompt \n :involvementWithOrganizationsForm \n ).\n\n:CVPrompt a ui:Comment; ui:contents \"What organizations have you been involved with?\" .\n\n:involvementWithOrganizationsForm a ui:Multiple;\n ui:label \"Involvement with organization\";\n ui:property org:member; \n 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\norg:member owl:inverse [ ui:label \"Involvement with organization\" ]. # timelimited involvement\n\n# This is a big important form for one of a series of roles in the list.\n\n:RoleMembershipForm a ui:Group; \n ui:weight 3; \n ui:parts ( \n :MembershipFormHeading \n :roleNameField\n :escoOccupationField \n :orgField \n :RoleClassifier \n :RoleDatesForm \n :RoleDescriptionForm).\n\n:MembershipFormHeading a ui:Heading; \n ui:contents \"Details of the role\"@en, \"D\xE9tailes de ce r\xF4le\"@fr .\n\n:roleNameField a ui:SingleLineTextField; \n ui:property vcard:role .\n\n:escoOccupationField a ui:AutocompleteField;\n ui:label \"Occupation\";\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:orgField a ui:Choice; \n ui:label \"Organization\"@en, \"Organization\"@fr;\n ui:canMintNew true; \n ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n\nvcard:Organization ui:creationForm :OrganizationCreationForm .\n\n###### eposodes in one's career - Roles\n\n:RoleClassifier a ui:Classifier; \n ui:label \"What sort of role?\"@en;\n ui:category solid:Role .\n\n:RoleDatesForm a ui:Options; \n ui:dependingOn rdf:type; \n 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 :TwoDateForm a ui:Group; \n ui:weight 0; \n ui:parts ( :StartDateForm :EndDateForm ) .\n :StartDateForm a ui:DateField; \n ui:label \"Start\"@en,\"D\xE9but\"@fr;\n ui:property schema:startDate .\n :EndDateForm a ui:DateField; \n ui:label \"End\"@en,\"Fin\"@fr;\n ui:property schema:endDate .\n\nsolid:Role a rdfs:Class;\n owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) ;\n owl:oneOf ( solid:CurrentRole solid:PastRole solid:FutureRole ). # Future Role too?\n\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:RoleDescriptionForm a ui:MultiLineTextField; \n ui:property schema:description;\n ui:label \"Describe your role\" .\n\n###### Organizations\n\n:OrganizationCreationForm a ui:Form; \n schema:name \"Form for editing an organization using public data\" ;\n ui:parts ( \n :OrgClassifier \n :OrgSwitch \n :OrganizationNameField \n :homePageURIField ) .\n\n:OrgClassifier a ui:Classifier; \n ui:label \"Type of organization?\"@en;\n ui:category solid:InterestingOrganization .\n\n:OrgSwitch a ui:Options; \n 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 schema:SportsOrganization; ui:use :SportsOrganizationForm ].\n\n:OrganizationNameField\n a ui:SingleLineTextField ;\n ui:label \"Name\";\n ui:maxLength \"200\" ;\n ui:property schema:name .\n\n:homePageURIField a ui:NamedNodeURIField;\n ui:label \"Homepage\"@en;\n ui:property schema:uri .\n\n# Ontology data to drive the :OrgClassifier classifier\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\n schema:PerformingGroup # a band\n schema:Project # like Solid\n schema:SportsOrganization) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; \n rdfs:label \"Research Organization\"@en, \"Organization de Recherche\"@fr ,\"organizaci\xF3n de investigaci\xF3n\"@es, \n \"\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##### Depending on the type of org, chose a different form\n\n#### Corporation\n:CorporationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :CorporationPrompt \n :CorporationAutocomplete ) .\n\n :CorporationPrompt a ui:Comment; ui:contents \"Corporation details\".\n\n :CorporationAutocomplete a ui:AutocompleteField; \n ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; \n 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#### Gouvernment\n:GovernmentOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :GovernmentOrganizationPrompt \n :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationPrompt a ui:Comment; ui:contents \"Government organization details\".\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; \n ui:dataSource :WikidataInstancesByName.\n\n#### Educational\n:EducationalOrganizationForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :EducationalOrganizationPrompt \n :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationPrompt a ui:Comment; ui:contents \"Educational organization details\".\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Research Group\n:ResearchOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ResearchOrganizationPrompt \n :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationPrompt a ui:Comment; ui:contents \"Research organizationd details\".\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### NGO\n:NGOForm a ui:Group; ui:weight 0; \n ui:parts ( \n :NGOPrompt \n :NGOAutocomplete ) .\n\n :NGOPrompt a ui:Comment; ui:contents \"NGO details\".\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Performing group\n:PerformingGroupForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :PerformingGroupPrompt \n :PerformingGroupAutocomplete ) .\n\n :PerformingGroupPrompt a ui:Comment; ui:contents \"Performing group details\".\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Project\n:ProjectForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ProjectPrompt \n :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectPrompt a ui:Comment; ui:contents \"Project details\".\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Sports Organization\n:SportsOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :SportsOrganizationPrompt \n :SportsOrganizationAutocomplete ) .\n\n:SportsOrganizationPrompt a ui:Comment; ui:contents \"Sports organization details\".\n\n:SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#################### Skills\n\n:SkillsHeading a ui:Heading; \n ui:contents \"Add your 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 :escoSkillField a ui:AutocompleteField;\n ui:label \"Find in ESCO\";\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#################### Languages\n\n:LanguagesHeading a ui:Heading; ui:contents \"Add your 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\";\n ui:property solid:publicId; \n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name \"Find in wikidata\";\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 ui:searchByNameQuery \"\"\"SELECT ?item ?subject ?name\n WHERE\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)\". }";
|
|
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 :SkillsHeading :SkillsForm\n :LanguagesHeading :LanguagesForm\n ).\n\n# Curriculum Vitae: membership of organizations\n\n:CVGroup a ui:Group; \n ui:weight 1; \n ui:parts ( \n :ResumeHeading \n :involvementWithOrganizationsForm \n ).\n\n:ResumeHeading a ui:Heading; \n ui:contents \"Add your work experience\" .\n\n:involvementWithOrganizationsForm a ui:Multiple;\n ui:label \"work experience\";\n ui:property org:member; \n 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\norg:member owl:inverse [ ui:label \"Work experience\" ]. # timelimited involvement\n\n# This is a big important form for one of a series of roles in the list.\n\n:RoleMembershipForm a ui:Group; \n ui:weight 3; \n ui:parts ( \n :MembershipFormHeading\n :RoleClassifier \n :roleNameField\n :escoOccupationField \n :orgField \n :RoleDatesForm \n :RoleDescriptionForm).\n\n:MembershipFormHeading a ui:Heading; \n ui:contents \"Details of the role\"@en, \"D\xE9tailes de ce r\xF4le\"@fr .\n\n:roleNameField a ui:SingleLineTextField;\n ui:label \"Job title\";\n ui:property vcard:role .\n\n:escoOccupationField a ui:AutocompleteField;\n ui:label \"Find in occupation catalog\";\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:orgField a ui:Choice; \n ui:label \"For organization\"@en, \"Pour l'organisation\"@fr;\n ui:canMintNew true; \n ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n\nvcard:Organization ui:creationForm :OrganizationCreationForm .\n\n###### eposodes in one's career - Roles\n\n:RoleClassifier a ui:Classifier; \n ui:label \"Job type\"@en;\n ui:category solid:Role .\n\n:RoleDatesForm a ui:Options; \n ui:dependingOn rdf:type; \n 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 :TwoDateForm a ui:Group; \n ui:weight 0; \n ui:parts ( :StartDateForm :EndDateForm ) .\n :StartDateForm a ui:DateField; \n ui:label \"Start\"@en,\"D\xE9but\"@fr;\n ui:property schema:startDate .\n :EndDateForm a ui:DateField; \n ui:label \"End\"@en,\"Fin\"@fr;\n ui:property schema:endDate .\n\nsolid:Role a rdfs:Class;\n owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) ;\n owl:oneOf ( solid:CurrentRole solid:PastRole solid:FutureRole ). # Future Role too?\n\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:RoleDescriptionForm a ui:MultiLineTextField; \n ui:property schema:description;\n ui:label \"Describe your role\" .\n\n###### Organizations\n\n:OrganizationCreationForm a ui:Form; \n schema:name \"Form for editing an organization using public data\" ;\n ui:parts ( \n :OrgClassifier \n :OrganizationNameField\n :OrgSwitch\n :homePageURIField ) .\n\n:OrgClassifier a ui:Classifier; \n ui:label \"Type\"@en;\n ui:category solid:InterestingOrganization .\n\n:OrgSwitch a ui:Options; \n 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 schema:SportsOrganization; ui:use :SportsOrganizationForm ].\n\n:OrganizationNameField a ui:SingleLineTextField ;\n ui:label \"Name\";\n ui:maxLength \"200\" ;\n ui:property schema:name .\n\n:homePageURIField a ui:NamedNodeURIField;\n ui:label \"Homepage\"@en;\n ui:property schema:uri .\n\n# Ontology data to drive the :OrgClassifier classifier\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\n schema:PerformingGroup # a band\n schema:Project # like Solid\n schema:SportsOrganization) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; \n rdfs:label \"Research Organization\"@en, \"Organization de Recherche\"@fr ,\"organizaci\xF3n de investigaci\xF3n\"@es, \n \"\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##### Depending on the type of org, chose a different form\n\n#### Corporation\n:CorporationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :CorporationAutocomplete ) .\n\n :CorporationAutocomplete a ui:AutocompleteField; \n ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; \n 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#### Gouvernment\n:GovernmentOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; \n ui:dataSource :WikidataInstancesByName.\n\n#### Educational\n:EducationalOrganizationForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Research Group\n:ResearchOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### NGO\n:NGOForm a ui:Group; ui:weight 0; \n ui:parts ( \n :NGOAutocomplete ) .\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Performing group\n:PerformingGroupForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :PerformingGroupAutocomplete ) .\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Project\n:ProjectForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Sports Organization\n :SportsOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :SportsOrganizationAutocomplete ) .\n\n :SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Find in wikidata\";\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#################### Skills\n\n:SkillsHeading a ui:Heading; \n ui:contents \"Add your skills\" .\n\n:SkillsForm a ui:Multiple;\n ui:label \"skill\";\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 :escoSkillField a ui:AutocompleteField;\n ui:label \"Find in skills catalog\";\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#################### Languages\n\n:LanguagesHeading a ui:Heading; ui:contents \"Add your languages\" .\n\n:LanguagesForm a ui:Multiple;\n ui:label \"language\";\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\";\n ui:property solid:publicId; \n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name \"Find in wikidata\";\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 ui:searchByNameQuery \"\"\"SELECT ?item ?subject ?name\n WHERE\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
12
|
const resumeFormName = 'resumeForm.ttl'; // The name of the form file
|
|
13
13
|
|
|
14
14
|
function EditCVSection(context, me, editableProfile, store) {
|
|
@@ -24,12 +24,7 @@ function EditCVSection(context, me, editableProfile, store) {
|
|
|
24
24
|
heading.textContent = _texts.resumeHeadingText;
|
|
25
25
|
header.appendChild(heading);
|
|
26
26
|
section.appendChild(header);
|
|
27
|
-
if (editableProfile) {
|
|
28
|
-
const comment2 = context.dom.createElement('p');
|
|
29
|
-
comment2.classList.add('p-md');
|
|
30
|
-
comment2.textContent = 'Edit your resume. These will be publicly visible on your profile.';
|
|
31
|
-
section.appendChild(comment2);
|
|
32
|
-
} else {
|
|
27
|
+
if (!editableProfile) {
|
|
33
28
|
const comment1 = context.dom.createElement('p');
|
|
34
29
|
comment1.classList.add('p-md');
|
|
35
30
|
comment1.textContent = 'Login to add resume information to your profile.';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { DataBrowserContext } from 'pane-registry';
|
|
2
2
|
import { NamedNode } from 'rdflib';
|
|
3
|
-
|
|
3
|
+
import '../styles/editProfile.css';
|
|
4
|
+
import '../styles/profileRDFFormsEnforced.css';
|
|
5
|
+
export declare function EditProfileCommunitiesSection(context: DataBrowserContext, me: NamedNode, editableProfile: NamedNode | null): HTMLElement;
|
|
4
6
|
//# sourceMappingURL=EditCommunitiesCard.d.ts.map
|
|
@@ -1 +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,
|
|
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,OAAO,2BAA2B,CAAA;AAClC,OAAO,uCAAuC,CAAA;AAS9C,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,eAoF1H"}
|
|
@@ -6,7 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.EditProfileCommunitiesSection = EditProfileCommunitiesSection;
|
|
7
7
|
var _solidUi = require("solid-ui");
|
|
8
8
|
var _texts = require("../texts");
|
|
9
|
-
|
|
9
|
+
var _solidLogic = require("solid-logic");
|
|
10
|
+
require("../styles/editProfile.css");
|
|
11
|
+
require("../styles/profileRDFFormsEnforced.css");
|
|
12
|
+
var _buttonsHelper = require("../buttonsHelper");
|
|
13
|
+
var _addMeToYourFriends = require("../addMeToYourFriends");
|
|
14
|
+
var _editProfilePresenter = require("./editProfilePresenter");
|
|
15
|
+
const GREEN_PLUS = _solidUi.icons.iconBase + 'noun_34653_green.svg';
|
|
16
|
+
function EditProfileCommunitiesSection(context, me, editableProfile) {
|
|
10
17
|
const section = context.dom.createElement('section');
|
|
11
18
|
section.setAttribute('aria-labelledby', 'edit-profile-communities-heading');
|
|
12
19
|
section.classList.add('profileSection', 'section-bg');
|
|
@@ -18,30 +25,58 @@ function EditProfileCommunitiesSection(context, me, editableProfile, profile) {
|
|
|
18
25
|
heading.textContent = _texts.communitiesHeadingText;
|
|
19
26
|
header.appendChild(heading);
|
|
20
27
|
section.appendChild(header);
|
|
21
|
-
const comment1 = context.dom.createElement('p');
|
|
22
|
-
comment1.id = 'edit-profile-communities-description';
|
|
23
|
-
comment1.classList.add('p-md');
|
|
24
|
-
comment1.textContent = 'These are organizations and projects whose stuff you share';
|
|
25
|
-
section.appendChild(comment1);
|
|
26
|
-
let comment2 = null;
|
|
27
28
|
if (editableProfile) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
section.appendChild(comment2);
|
|
29
|
+
let plusButtonDiv = context.dom.createElement('div');
|
|
30
|
+
plusButtonDiv.classList.add('add-community-button-container');
|
|
31
|
+
createAddButton(plusButtonDiv, context);
|
|
32
|
+
section.appendChild(plusButtonDiv);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
const attachmentOuter = section.appendChild(context.dom.createElement('table'));
|
|
35
|
+
attachmentOuter.classList.add('edit-community-attachment-outer');
|
|
36
|
+
const attachmentOne = attachmentOuter.appendChild(context.dom.createElement('tr'));
|
|
37
|
+
const attachmentRight = attachmentOne.appendChild(context.dom.createElement('td'));
|
|
38
|
+
const attachmentTable = attachmentRight.appendChild(context.dom.createElement('table'));
|
|
39
|
+
attachmentTable.classList.add('attachmentTable', 'table', 'table-striped', 'table-hover');
|
|
40
|
+
attachmentOuter.refresh = (0, _editProfilePresenter.refresh)(context.dom, attachmentTable, me, editableProfile, _solidUi.ns.solid('community')); // Participate in downstream changes
|
|
41
|
+
|
|
42
|
+
(0, _editProfilePresenter.refresh)(context.dom, attachmentTable, me, editableProfile, _solidUi.ns.solid('community'));
|
|
43
|
+
function createAddButton(buttonContainer, context) {
|
|
44
|
+
const plus = buttonContainer.appendChild(_solidUi.widgets.button(context.dom, GREEN_PLUS, 'Add a project or community', greenButtonHandler));
|
|
45
|
+
const predicate = _solidUi.ns.solid('community');
|
|
46
|
+
plus.setAttribute('class', 'add-button');
|
|
47
|
+
plus.setAttribute('aria-label', 'Add a new community');
|
|
48
|
+
const span = context.dom.createElement('span');
|
|
49
|
+
span.textContent = 'Add a community or project'; // for screen readers
|
|
50
|
+
span.setAttribute('class', 'span');
|
|
51
|
+
buttonContainer.appendChild(span);
|
|
52
|
+
async function greenButtonHandler(_event) {
|
|
53
|
+
const webid = await _solidUi.widgets.askName(context.dom, _solidLogic.store, buttonContainer, predicate, undefined, 'WebID of');
|
|
54
|
+
if (!webid) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
new URL(webid);
|
|
59
|
+
} catch {
|
|
60
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, 'Not a URL');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
await _solidLogic.store.fetcher.load(_solidLogic.store.sym(webid));
|
|
65
|
+
} catch {
|
|
66
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, 'Not a valid WebID');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (!(0, _editProfilePresenter.isAWebID)(_solidLogic.store.sym(webid))) {
|
|
70
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, 'WebID does not seem to exist');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
return (0, _addMeToYourFriends.saveNewThing)(webid, context, predicate).then(() => {
|
|
74
|
+
(0, _editProfilePresenter.refresh)(context.dom, attachmentTable, me, editableProfile, predicate); // Update the button state after adding a community
|
|
75
|
+
}).catch(error => {
|
|
76
|
+
(0, _buttonsHelper.clearPreviousMessage)(buttonContainer);
|
|
77
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, error);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
43
80
|
}
|
|
44
|
-
attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
|
|
45
|
-
section.appendChild(attachmentList);
|
|
46
81
|
return section;
|
|
47
82
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { DataBrowserContext } from 'pane-registry';
|
|
2
2
|
import { NamedNode } from 'rdflib';
|
|
3
|
-
|
|
3
|
+
import '../styles/profileRDFFormsEnforced.css';
|
|
4
|
+
import '../styles/editProfile.css';
|
|
5
|
+
export declare function EditFriendsSection(context: DataBrowserContext, me: NamedNode, editableProfile: NamedNode | null): HTMLElement;
|
|
4
6
|
//# sourceMappingURL=EditFriendsCard.d.ts.map
|
|
@@ -1 +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,
|
|
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,OAAO,uCAAuC,CAAA;AAC9C,OAAO,2BAA2B,CAAA;AASlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,eAqF/G"}
|
|
@@ -6,7 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.EditFriendsSection = EditFriendsSection;
|
|
7
7
|
var _solidUi = require("solid-ui");
|
|
8
8
|
var _texts = require("../texts");
|
|
9
|
-
|
|
9
|
+
var _addMeToYourFriends = require("../addMeToYourFriends");
|
|
10
|
+
require("../styles/profileRDFFormsEnforced.css");
|
|
11
|
+
require("../styles/editProfile.css");
|
|
12
|
+
var _solidLogic = require("solid-logic");
|
|
13
|
+
var _buttonsHelper = require("../buttonsHelper");
|
|
14
|
+
var _editProfilePresenter = require("./editProfilePresenter");
|
|
15
|
+
const GREEN_PLUS = _solidUi.icons.iconBase + 'noun_34653_green.svg';
|
|
16
|
+
function EditFriendsSection(context, me, editableProfile) {
|
|
10
17
|
const section = context.dom.createElement('section');
|
|
11
18
|
section.setAttribute('aria-labelledby', 'edit-profile-friends-heading');
|
|
12
19
|
section.classList.add('profileSection', 'section-bg');
|
|
@@ -18,30 +25,58 @@ function EditFriendsSection(context, me, editableProfile, profile) {
|
|
|
18
25
|
heading.textContent = _texts.friendsHeadingText;
|
|
19
26
|
header.appendChild(heading);
|
|
20
27
|
section.appendChild(header);
|
|
21
|
-
const comment1 = context.dom.createElement('p');
|
|
22
|
-
comment1.id = 'edit-profile-friends-description';
|
|
23
|
-
comment1.classList.add('p-md');
|
|
24
|
-
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.)';
|
|
25
|
-
section.appendChild(comment1);
|
|
26
|
-
let comment2 = null;
|
|
27
28
|
if (editableProfile) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
section.appendChild(comment2);
|
|
29
|
+
let plusButtonDiv = context.dom.createElement('div');
|
|
30
|
+
plusButtonDiv.classList.add('add-friend-button-container');
|
|
31
|
+
createAddButton(plusButtonDiv, context);
|
|
32
|
+
section.appendChild(plusButtonDiv);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
const attachmentOuter = section.appendChild(context.dom.createElement('table'));
|
|
35
|
+
attachmentOuter.classList.add('edit-friends-attachment-outer');
|
|
36
|
+
const attachmentOne = attachmentOuter.appendChild(context.dom.createElement('tr'));
|
|
37
|
+
const attachmentRight = attachmentOne.appendChild(context.dom.createElement('td'));
|
|
38
|
+
const attachmentTable = attachmentRight.appendChild(context.dom.createElement('table'));
|
|
39
|
+
attachmentTable.classList.add('attachmentTable', 'table', 'table-striped', 'table-hover');
|
|
40
|
+
attachmentOuter.refresh = (0, _editProfilePresenter.refresh)(context.dom, attachmentTable, me, editableProfile, _solidUi.ns.foaf('knows')); // Participate in downstream changes
|
|
41
|
+
|
|
42
|
+
(0, _editProfilePresenter.refresh)(context.dom, attachmentTable, me, editableProfile, _solidUi.ns.foaf('knows'));
|
|
43
|
+
function createAddButton(buttonContainer, context) {
|
|
44
|
+
const plus = buttonContainer.appendChild(_solidUi.widgets.button(context.dom, GREEN_PLUS, 'Add a friend', greenButtonHandler));
|
|
45
|
+
const predicate = _solidUi.ns.foaf('knows');
|
|
46
|
+
plus.setAttribute('class', 'add-button');
|
|
47
|
+
plus.setAttribute('aria-label', 'Add a friend');
|
|
48
|
+
const span = context.dom.createElement('span');
|
|
49
|
+
span.textContent = 'Add a friend'; // for screen readers
|
|
50
|
+
span.setAttribute('class', 'span');
|
|
51
|
+
buttonContainer.appendChild(span);
|
|
52
|
+
async function greenButtonHandler(_event) {
|
|
53
|
+
const webid = await _solidUi.widgets.askName(context.dom, _solidLogic.store, buttonContainer, predicate, undefined, 'WebID of the friend you');
|
|
54
|
+
if (!webid) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
new URL(webid);
|
|
59
|
+
} catch {
|
|
60
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, 'Not a URL');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
await _solidLogic.store.fetcher.load(_solidLogic.store.sym(webid));
|
|
65
|
+
} catch {
|
|
66
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, 'Not a valid WebID');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (!(0, _editProfilePresenter.isAWebID)(_solidLogic.store.sym(webid))) {
|
|
70
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, 'WebID does not seem to exist');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
return (0, _addMeToYourFriends.saveNewThing)(webid, context, predicate).then(() => {
|
|
74
|
+
(0, _editProfilePresenter.refresh)(context.dom, attachmentTable, me, editableProfile, predicate); // Update the button state after adding a friend
|
|
75
|
+
}).catch(error => {
|
|
76
|
+
(0, _buttonsHelper.clearPreviousMessage)(buttonContainer);
|
|
77
|
+
(0, _buttonsHelper.complain)(buttonContainer, context, error);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
43
80
|
}
|
|
44
|
-
attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
|
|
45
|
-
section.appendChild(attachmentList);
|
|
46
81
|
return section;
|
|
47
82
|
}
|
|
@@ -8,7 +8,7 @@ var _rdfFormsHelper = _interopRequireDefault(require("../rdfFormsHelper"));
|
|
|
8
8
|
var _texts = require("../texts");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
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
|
|
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 ).\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\".";
|
|
12
12
|
const otherPreferencesFormName = 'otherPreferencesForm.ttl'; // The name of the form file
|
|
13
13
|
|
|
14
14
|
function EditOtherPreferencesSection(context, me, editableProfile, store) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { PaneDefinition } from 'pane-registry';
|
|
11
11
|
import '../styles/utilities.css';
|
|
12
|
-
import '../styles/
|
|
12
|
+
import '../styles/profileRDFFormsEnforced.css';
|
|
13
13
|
declare const editProfileView: PaneDefinition;
|
|
14
14
|
export default editProfileView;
|
|
15
15
|
//# sourceMappingURL=EditProfileView.d.ts.map
|
|
@@ -1 +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;AAChC,OAAO,
|
|
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;AAChC,OAAO,uCAAuC,CAAA;AAK9C,QAAA,MAAM,eAAe,EAAE,cAuGtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|