profile-pane 3.1.1 → 3.1.2-22addc09

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.
Files changed (50) hide show
  1. package/lib/CVPresenter.d.ts.map +1 -1
  2. package/lib/CVPresenter.js +6 -4
  3. package/lib/ProfileView.d.ts.map +1 -1
  4. package/lib/ProfileView.js +7 -21
  5. package/lib/SocialCard.d.ts.map +1 -1
  6. package/lib/SocialCard.js +0 -1
  7. package/lib/SocialPresenter.d.ts +0 -1
  8. package/lib/SocialPresenter.d.ts.map +1 -1
  9. package/lib/SocialPresenter.js +55 -56
  10. package/lib/editProfilePane/EditCVCard.d.ts +4 -0
  11. package/lib/editProfilePane/EditCVCard.d.ts.map +1 -0
  12. package/lib/editProfilePane/EditCVCard.js +40 -0
  13. package/lib/editProfilePane/EditCommunitiesCard.d.ts +4 -0
  14. package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -0
  15. package/lib/editProfilePane/EditCommunitiesCard.js +47 -0
  16. package/lib/editProfilePane/EditContactsCard.d.ts +4 -0
  17. package/lib/editProfilePane/EditContactsCard.d.ts.map +1 -0
  18. package/lib/editProfilePane/EditContactsCard.js +49 -0
  19. package/lib/editProfilePane/EditFriendsCard.d.ts +4 -0
  20. package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -0
  21. package/lib/editProfilePane/EditFriendsCard.js +47 -0
  22. package/lib/editProfilePane/EditOtherPreferences.d.ts +4 -0
  23. package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -0
  24. package/lib/editProfilePane/EditOtherPreferences.js +29 -0
  25. package/lib/editProfilePane/{editProfile.view.d.ts → EditProfileView.d.ts} +4 -2
  26. package/lib/editProfilePane/EditProfileView.d.ts.map +1 -0
  27. package/lib/editProfilePane/EditProfileView.js +118 -0
  28. package/lib/editProfilePane/EditSocialCard.d.ts +4 -0
  29. package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -0
  30. package/lib/editProfilePane/EditSocialCard.js +40 -0
  31. package/lib/index.js +2 -2
  32. package/lib/presenter.js +3 -2
  33. package/lib/profile-pane.js +747 -307
  34. package/lib/profile-pane.js.map +1 -1
  35. package/lib/profile-pane.min.js +48 -58
  36. package/lib/profile-pane.min.js.map +1 -1
  37. package/lib/rdfFormsHelper.d.ts +7 -0
  38. package/lib/rdfFormsHelper.d.ts.map +1 -0
  39. package/lib/rdfFormsHelper.js +40 -0
  40. package/lib/styles/rdfFormsEnforced.css +186 -0
  41. package/lib/styles/utilities.css +17 -0
  42. package/lib/texts.d.ts +8 -0
  43. package/lib/texts.d.ts.map +1 -1
  44. package/lib/texts.js +12 -2
  45. package/package.json +3 -2
  46. package/lib/editProfilePane/editProfile.view.d.ts.map +0 -1
  47. package/lib/editProfilePane/editProfile.view.js +0 -144
  48. package/lib/editProfilePane/profile.dom.d.ts +0 -4
  49. package/lib/editProfilePane/profile.dom.d.ts.map +0 -1
  50. package/lib/editProfilePane/profile.dom.js +0 -32
@@ -1 +1 @@
1
- {"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,CAqBhB"}
1
+ {"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,CA0BhB"}
@@ -21,13 +21,13 @@ function skillAsText(store, sk) {
21
21
  }
22
22
  const manual = store.anyJS(sk, _solidUi.ns.vcard('role'));
23
23
  if (manual && manual[0] > '') return manual;
24
- return '¿¿¿ skill ???';
24
+ return '';
25
25
  }
26
26
  function languageAsText(store, lan) {
27
27
  if (lan.termType === 'Literal') return lan.value; // Not normal but allow this
28
28
  const publicId = store.anyJS(lan, _solidUi.ns.solid('publicId'));
29
29
  if (publicId) return _solidUi.utils.label(publicId, true); // @@ check language and get name in diff language if necessary
30
- return '-';
30
+ return '';
31
31
  }
32
32
  function datesAsText(startDate, endDate) {
33
33
  return startDate ? '(' + startDate.value.slice(0, 10) + ' to ' + (endDate ? endDate.value.slice(0, 10) : '') + ')' : '';
@@ -106,12 +106,14 @@ function presentCV(subject, store) {
106
106
  return x.startDate > y.startDate ? -1 : 1;
107
107
  });
108
108
  }
109
- const skills = store.each(subject, _solidUi.ns.schema('skills')).map(sk => skillAsText(store, sk));
109
+ const skills = store.each(subject, _solidUi.ns.schema('skills')).map(sk => skillAsText(store, sk)).filter(skill => skill !== '');
110
110
  const languageNodes = store.each(subject, _solidUi.ns.schema('knowsLanguage'));
111
111
  const languages = languageNodes.flatMap(node => expandRdfList(store, node)).map(lan => languageAsText(store, lan));
112
+ // Deduplicate languages
113
+ const uniqueLanguages = Array.from(new Set(languages));
112
114
  return {
113
115
  rolesByType,
114
116
  skills,
115
- languages
117
+ languages: uniqueLanguages
116
118
  };
117
119
  }
@@ -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;AAwBjC,wBAAsB,WAAW,CAC/B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAE,cAAc,CAAC,CAsI1B"}
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"}
@@ -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
@@ -34,9 +35,6 @@ function renderEditButton (subject) {
34
35
 
35
36
  async function ProfileView(subject, context) {
36
37
  const store = context.session.store;
37
-
38
- // Load ontologies first
39
- await (0, _SocialPresenter.loadProfileForm)(store);
40
38
  const profileBasics = (0, _presenter.presentProfile)(subject, store);
41
39
  const rolesByType = (0, _CVPresenter.presentCV)(subject, store);
42
40
  const accounts = (0, _SocialPresenter.presentSocial)(subject, store);
@@ -49,19 +47,7 @@ async function ProfileView(subject, context) {
49
47
  role="main"
50
48
  aria-label="Profile for ${profileBasics.name}"
51
49
  tabindex="-1"
52
- >
53
- <!-- Enhanced breadcrumb navigation -->
54
- <nav id="profile-nav" aria-label="Profile sections" class="visually-hidden">
55
- <ol>
56
- <li><a href="#profile-card-heading">Personal Information</a></li>
57
- ${(() => {
58
- const cv = (0, _CVCard.CVCard)(rolesByType);
59
- return cv && cv.strings && cv.strings.join('').trim() !== '' ? (0, _litHtml.html)`<li><a href="#cv-heading">Resume</a></li>` : '';
60
- })()}
61
- ${accounts.accounts && accounts.accounts.length > 0 ? (0, _litHtml.html)`<li><a href="#social-heading" id="social-accounts">Social Accounts</a></li>` : ''}
62
- <li><a href="#chat-heading" id="contact-section">Contact</a></li>
63
- </ol>
64
- </nav>
50
+ >
65
51
 
66
52
  <article
67
53
  aria-labelledby="profile-card-heading"
@@ -85,7 +71,7 @@ async function ProfileView(subject, context) {
85
71
  tabindex="-1"
86
72
  >
87
73
  <header class="text-center mb-md">
88
- <h2 id="cv-heading" tabindex="-1">Resume</h2>
74
+ <h2 id="cv-heading" tabindex="-1">${_texts.resumeHeadingText}</h2>
89
75
  </header>
90
76
  <div>
91
77
  ${cv}
@@ -102,7 +88,7 @@ async function ProfileView(subject, context) {
102
88
  tabindex="-1"
103
89
  >
104
90
  <header class="text-center mb-md">
105
- <h2 id="social-heading" tabindex="-1">Social Accounts</h2>
91
+ <h2 id="social-heading" tabindex="-1">${_texts.socialAccountsHeadingText}</h2>
106
92
  </header>
107
93
  <nav aria-label="Social media links">
108
94
  ${(0, _SocialCard.SocialCard)(accounts)}
@@ -118,7 +104,7 @@ async function ProfileView(subject, context) {
118
104
  tabindex="-1"
119
105
  >
120
106
  <header class="text-center mb-md">
121
- <h2 id="stuff-heading" tabindex="-1">Shared Items</h2>
107
+ <h2 id="stuff-heading" tabindex="-1">${_texts.sharedItemsHeadingText}</h2>
122
108
  </header>
123
109
  <div>
124
110
  ${(0, _StuffCard.StuffCard)(profileBasics, context, subject, stuffData)}
@@ -136,7 +122,7 @@ async function ProfileView(subject, context) {
136
122
  tabindex="-1"
137
123
  >
138
124
  <header class="text-center mb-md">
139
- <h2 id="friends-heading" tabindex="-1">Friends</h2>
125
+ <h2 id="friends-heading" tabindex="-1">${_texts.friendsHeadingText}</h2>
140
126
  </header>
141
127
  <div role="list" aria-label="Friend connections">
142
128
  ${friends}
@@ -152,7 +138,7 @@ async function ProfileView(subject, context) {
152
138
  tabindex="-1"
153
139
  >
154
140
  <header class="text-center mb-md">
155
- <h2 id="chat-heading" tabindex="-1">Contact</h2>
141
+ <h2 id="chat-heading" tabindex="-1">${_texts.contactHeadingText}</h2>
156
142
  </header>
157
143
  <div>
158
144
  ${(0, _ChatWithMe.ChatWithMe)(subject, context)}
@@ -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,cA+CF,CAAA"}
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"
@@ -1,5 +1,4 @@
1
1
  import { LiveStore, NamedNode } from 'rdflib';
2
- export declare function loadProfileForm(store: LiveStore): Promise<void>;
3
2
  export interface Account {
4
3
  name: string;
5
4
  icon: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAe,MAAM,QAAQ,CAAA;AAO1D,wBAAgB,eAAe,CAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BhE;AACD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAuBD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CAkEpB"}
1
+ {"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAQ,MAAM,QAAQ,CAAA;AAQnD,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;AAiCD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CA+EpB"}
@@ -3,59 +3,46 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.loadProfileForm = loadProfileForm;
7
6
  exports.presentSocial = presentSocial;
8
- var _rdflib = require("rdflib");
9
7
  var _solidUi = require("solid-ui");
10
- /* babel-plugin-inline-import './ontology/profileForm.ttl' */
11
- const profileForm = "@prefix os: <http://www.w3.org/2000/10/swap/os#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#>.\n@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n\n# About forms: https://solidos.github.io/solid-ui/docs/forms-intro.html\n# About personal public data: https://www.w3.org/DesignIssues/PersonalPublic.html\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Profile form\" ;\n a ui:Form ;\n # ui:part :backgroundColor, :highlightColor;\n ui:parts (\n :styleGroup\n :nicknameField\n :pronounsForm\n :LanguagesPrompt :LanguagesForm\n :SocialsPrompt :SocialsForm\n :CVGroup\n :SkillsPrompt :SkillsForm\n ).\n\n:styleGroup a ui:Group; ui:weight 0; ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n :styleHeading a ui:Heading; ui:contents \"The style of your public profile.\".\n :backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;\n ui:label \"Background color\"; ui:default \"#ffffff\".\n :highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;\n ui:label \"Highlight color\"; ui:default \"#000000\".\n\n# Nickname\n\n:nicknameField a ui:SingleLineTextField; ui:size 12; ui:property foaf:nick;\n ui:label \"Short name for chats, etc.\"@en, \"nom court\"@fr.\n\n # Pronouns\n\n :pronounsForm a ui:Group; ui:weight 0; ui:parts ( :pronounsPrompt :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n :pronounsPrompt a ui:Comment; ui:contents \"What are your pronouns?\" .\n\n :subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;\n ui:size 10; ui:label \"he/she/they...\" .\n :objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;\n ui:size 10; ui:label \"him/her/them...\" .\n :relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;\n ui:size 10; ui:label \"his/hers/theirs...\" .\n\n # Curriculum Vitae: membership of organizations\n\n :CVHeading a ui:Heading; ui:contents \"Public Curriculum Vitae\".\n :CVPrompt a ui:Comment; ui:contents \"What organizations have you been involved with?\" .\n\n :CVGroup a ui:Group; ui:weight 1; ui:parts ( :CVHeading :CVPrompt :involvementWithOrganizationsForm ).\n\n\n solid:Role a rdfs:Class; owl:oneOf ( solid:CurrentRole solid:FormerRole solid:FutureRole ). # Future Role too?\n\n org:member owl:inverse [ ui:label \"involvement with company, org etc\" ]. # timelimited involvement\n\n :involvementWithOrganizationsForm a ui:Multiple;\n ui:label \"Involvement with Organization\";\n ui:property org:member; ui:reverse true; # link back from role to member\n ui:ordered false; # Allow user to order CV secions rather than force date order? No.\n ui:part :RoleMembershipForm.\n\n# This is a big important form for one of a series of roles in the list.\n\n :RoleMembershipForm a ui:Group; ui:weight 3; ui:parts ( :MembershipFormHeading :roleNameField\n :escoOccupationField :orgField :RoleClassifier :RoleDatesForm :RoleDescriptionForm).\n\n :MembershipFormHeading a ui:Heading; ui:contents \"Details of this role\"@en, \"D\xE9tailes de ce r\xF4le\"@fr .\n\n :orgField a ui:Choice; ui:label \"Organization\"@en, \"Organization\"@fr;\n ui:canMintNew true; ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n :roleNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 60 .\n\n :escoOccupationField a ui:AutocompleteField;\n ui:label \"occupation\"; ui:size 60;\n ui:property org:role;\n ui:dataSource :ESCO_Occupation_DataSource;\n ui:targetClass schema:Occupation .\n\n :ESCO_Occupation_DataSource a ui:DataSource;\n schema:name \"ESCO\";\n ui:targetClass schema:Occupation ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)\".\n\n :instituteIdentityField a ui:AutocompleteField; ui:label \"in wikidata\";\n ui:size 60;\n ui:property solid:publicId; ui:dataSource :WikidataOnOrganizations.\n\n :WikidataOnOrganizations a ui:DataSource ;\n schema:name \"Wikidata\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:targetClass <http://www.wikidata.org/entity/Q43229>; # Use if nothing else\n ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) \"\"\" .\n\n :WikidataOnOrganizations ui:classMap\n [ ui:internalClass schema:Corporation; ui:externalClass <http://www.wikidata.org/entity/Q6881511>], #Enterprise is for-profit\n [ ui:internalClass schema:EducationalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q178706>], #insitution\n [ ui:internalClass schema:ResearchOrganization; ui:externalClass <http://www.wikidata.org/entity/Q31855>], # reearch insitutie\n [ ui:internalClass schema:GovernmentOrganization; ui:externalClass <http://www.wikidata.org/entity/Q327333>], #government agency\n [ ui:internalClass schema:MedicalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4287745>],\n [ ui:internalClass schema:MusicGroup; ui:externalClass <http://www.wikidata.org/entity/Q32178211>], #music organization\n [ ui:internalClass schema:NGO; ui:externalClass <http://www.wikidata.org/entity/Q163740>], #nonprofit organization @@\n [ ui:internalClass schema:Occupation; ui:externalClass <http://www.wikidata.org/entity/Q28640>], # superclass: Profession\n [ ui:internalClass schema:Organization; ui:externalClass <http://www.wikidata.org/entity/Q43229>], # Superclass; Organization\n [ ui:internalClass schema:Project; ui:externalClass <http://www.wikidata.org/entity/Q170584>],\n [ ui:internalClass schema:SportsOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4438121>] .\n\n\n# eposodes in one's career - Roles\n\nsolid:Role owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) .\nsolid:PastRole a rdfs:Class; rdfs:label \"former role\"@en, \"ancien r\xF4le\"@fr, \"vergangene Rolle\"@de, \"rol anterior\"@es .\nsolid:CurrentRole a rdfs:Class; rdfs:label \"current role\"@en, \"r\xF4le actuel\"@fr, \"momentane Rolle\"@de , \"rol actual\"@es .\nsolid:FutureRole a rdfs:Class; rdfs:label \"future role\"@en, \"r\xF4le \xE0 venir\"@fr, \"zuk\xFCnftige Rolle\"@de, \"rol futuro\"@es .\n\n:RoleDatesGroup a ui:Group; ui:weight 0; ui:parts ( :RoleClassifier :RoleDatesForm ) .\n :RoleClassifier a ui:Classifier; ui:label \"What sort of role?\"@en;\n ui:category solid:Role .\n\n :RoleDatesForm a ui:Options; ui:dependingOn rdf:type; ui:case\n [ ui:for solid:PastRole; ui:use :TwoDateForm ],\n [ ui:for solid:CurrentRole; ui:use :StartDateForm ],\n [ ui:for solid:FutureRole; ui:use :StartDateForm ].\n\n :StartDateForm a ui:DateField; ui:label \"start\"@en,\"d\xE9but\"@fr;\n ui:property schema:startDate .\n :TwoDateForm a ui:Group; ui:weight 0; ui:parts ( :StartDateForm :EndDateForm ) .\n :EndDateForm a ui:DateField; ui:label \"end\"@en,\"fin\"@fr;\n ui:property schema:endDate .\n\n:RoleDescriptionForm a ui:MultiLineTextField; ui:property schema:description;\n ui:label \"Describe your role\" .\n\n# Organizations\n\n vcard:Organization ui:creationForm :OrganizationCreationForm .\n\n# Ontology data to drive the classifier\n\nsolid:InterestingOrganization owl:disjointUnionOf (\n# Airline - a Corporation\n# Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877\n# FundingScheme - eh?\n schema:GovernmentOrganization\n# LibrarySystem\n# LocalBusiness - Corporation\n# MedicalOrganization - a Corporation or a NGO\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\nschema:PerformingGroup # a band\nschema:Project # like Solid\nschema:SportsOrganization # a Team\nsolid:OtherOrganization\n ) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; rdfs:label \"Research Organization\"@en, \"Organization de Recherche\"@fr ,\n \"organizaci\xF3n de investigaci\xF3n\"@es, \"\u0645\u0646\u0638\u0645\u0629 \u0627\u0644\u0628\u062D\u062B\"@ar, \"\u0905\u0928\u0941\u0938\u0902\u0927\u093E\u0928 \u0938\u0902\u0917\u0920\u0928\"@hi, \"Forschungsorganisation\"@de, \"shirika la utafiti\"@sw .\n\n :OrganizationCreationForm a ui:Form; schema:name \"Form for editing an organization using public data\" ;\n ui:parts ( :OrgClassifier :OrgSwitch :OrganizationNameField :homePageURIField ) .\n\n\n :OrgClassifier a ui:Classifier; ui:label \"What sort of organization?\"@en;\n ui:category solid:InterestingOrganization .\n\n :OrganizationNameField\n a ui:SingleLineTextField ;\n ui:label \"Organization Name\";\n ui:maxLength \"200\" ;\n ui:property schema:name ;\n ui:size 80 .\n\n :homePageURIField a ui:NamedNodeURIField; ui:size 80;\n ui:label \"Home page URI\"@en;\n ui:property schema:uri . # @@ ??\n\n :initituteTypeField a ui:Classifier;\n ui:label \"What sort of organization\";\n ui:category solid:InterestingOrganization .\n\n# Depending on the type of org, chose a different form\n\n :OrgSwitch a ui:Options; ui:dependingOn rdf:type;\n ui:case\n [ ui:for schema:Corporation; ui:use :CorporationForm ],\n [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],\n [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],\n [ ui:for schema:Project; ui:use :ProjectForm ],\n [ ui:for schema:NGO; ui:use :NGOForm ],\n [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],\n [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],\n [ ui:for :SportsOrganization; ui:use :SportsOrganizationForm ],\n [ ui:for solid:OtherOrganization; ui:use :OtherOrganizationForm ].\n\n\n :CorporationForm a ui:Group; ui:weight 0; ui:parts ( :CorporationPrompt :CorporationAutocomplete ) .\n\n :CorporationPrompt a ui:Comment; ui:contents \"Which corporation?\".\n\n :CorporationAutocomplete a ui:AutocompleteField;\n a ui:AutocompleteField; ui:label \"Corporation in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :WikidataInstancesByName a ui:DataSource ;\n schema:name \"Wikidata instances by name\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, \"$(name)\", \"i\")\n } LIMIT $(limit) \"\"\" ;\n\n # Note this form of the query is very experimental\n ui:searchByName [ ui:construct { ?subject schema:name ?name } ;\n ui:where { ?klass wdt:P279 ?targetClass .\n ?subject wdt:P31 ?klass; rdfs:label ?name .\n };\n ].\n\n :GovernmentOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :GovernmentOrganizationPrompt :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationPrompt a ui:Comment; ui:contents \"Which GovernmentOrganization?\".\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"GovernmentOrganization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :EducationalOrganizationForm a ui:Group; ui:weight 1; ui:parts ( :EducationalOrganizationPrompt :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationPrompt a ui:Comment; ui:contents \"Which Educational Organization?\".\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Educational Organization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :ResearchOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :ResearchOrganizationPrompt :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationPrompt a ui:Comment; ui:contents \"Which Research Organization?\".\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"Research Insitute in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :NGOForm a ui:Group; ui:weight 0; ui:parts ( :NGOPrompt :NGOAutocomplete ) .\n\n :NGOPrompt a ui:Comment; ui:contents \"Which NGO?\".\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label \"NGO in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :PerformingGroupForm a ui:Group; ui:weight 0; ui:parts ( :PerformingGroupPrompt :PerformingGroupAutocomplete ) .\n\n :PerformingGroupPrompt a ui:Comment; ui:contents \"Which PerformingGroup?\".\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label \"PerformingGroup in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n :ProjectForm a ui:Group; ui:weight 0; ui:parts ( :ProjectPrompt :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectPrompt a ui:Comment; ui:contents \"Which Project?\".\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label \"Project in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :SportsOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :SportsOrganizationPrompt :SportsOrganizationAutocomplete ) .\n\n :SportsOrganizationPrompt a ui:Comment; ui:contents \"Which Sports Organization?\".\n\n :SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label \"SportsOrganization in wikidata\";\n ui:size 60;\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n :OtherOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :OrganizationNameField :homePageURIField ) .\n\n #################### Skills\n\n :SkillsPrompt a ui:Comment; ui:contents \"Skills?\" .\n\n :SkillsForm a ui:Multiple;\n ui:label \"Skills\";\n ui:property schema:skills;\n ui:ordered false; # Allow reader to order skills\n ui:part :SkillForm.\n\n :SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).\n\n # :skillNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 30 .\n\n :escoSkillField a ui:AutocompleteField;\n ui:label \"skill\"; ui:size 30;\n ui:property solid:publicId;\n ui:dataSource :ESCO_Skill_DataSource;\n ui:targetClass schema:Skill .\n\n :ESCO_Skill_DataSource a ui:DataSource;\n schema:name \"ESCO Skill\";\n ui:targetClass esco:Skill ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)\".\n\n# Language\n\n:LanguagesPrompt a ui:Comment; ui:contents \"Languages?\" .\n\n:LanguagesForm a ui:Multiple;\n ui:label \"Languages\";\n ui:property schema:knowsLanguage; # @@@\n ui:ordered true; # Allow user to order languages most important first.\n ui:part :LanguageForm.\n\n:LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).\n\n :WikidataLanguageField a ui:AutocompleteField;\n ui:label \"Language\"; ui:size 30;\n ui:property solid:publicId; # @@\n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name \"Wikidata languages\";\n ui:endpoint \"https://query.wikidata.org/sparql\" ;\n ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;\n # Add this to any literal string returned as ?subject\n\n ui:searchByNameQuery \"\"\"SELECT ?item ?subject ?name\nWHERE\n{ ?item wdt:P305 ?subject .\n OPTIONAL {?item rdfs:label ?name}\n OPTIONAL {?item wdt:P1705 ?name}\n FILTER regex(?name, \"$(name)\", \"i\")\n FILTER regex(?subject, \"^..$\", \"i\")\n}\"\"\" .\n # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages\n # Hope there are not any important ones which have three-letter codes.\n # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language \"$(languages)\". }\n\n########### Social Media - other accounts\n#\n# Twitter, Linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:SocialsPrompt a ui:Heading; ui:contents \"Social Media etc?\" .\n:SocialsPrompt a ui:Comment; ui:contents \"Link to accounts in social media sites, etc\" .\n\n:SocialsForm a ui:Multiple;\n ui:label \"online account\";\n ui:property foaf:account;\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; ui:weight 1; ui:parts ( :AccountField :AccountIdField ).\n\n:AccountField a ui:Classifier; ui:label \"What sort of account?\"@en;\n ui:multiple false ; \n ui:category foaf:Account .\n\n:AccountIdField a ui:Options . \n\n :AccountIdField a ui:Options; ui:dependingOn rdf:type; ui:case\n [ ui:for soc:BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for soc:DiggAccount; ui:use :DiggIdField],\n [ ui:for soc:FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for soc:GithubAccount; ui:use :GithubIdField ],\n [ ui:for soc:InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for soc:LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for soc:MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for soc:MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for soc:MediumAccount; ui:use :MediumIdField ],\n [ ui:for soc:NostrAccount; ui:use :NostrIdField ],\n [ ui:for soc:OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for soc:PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for soc:RedditAccount; ui:use :RedditIdField ],\n [ ui:for soc:StravaAccount; ui:use :StravaIdField ],\n [ ui:for soc:SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for soc:TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for soc:TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for soc:TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for soc:OtherAccount; ui:use :OtherIdForm ] .\n\n :BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label \"Bluesky Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :DiggIdField\n a ui:SingleLineTextField ;\n ui:label \"Digg Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :FacebookIdField\n a ui:SingleLineTextField ;\n ui:label \"Facebook Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :GithubIdField\n a ui:SingleLineTextField ;\n ui:label \"Github Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :InstagramIdField\n a ui:SingleLineTextField ;\n ui:label \"Instagram Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label \"Linked In Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MastodonIdField\n a ui:SingleLineTextField ;\n ui:label \"Mastodon (Activity Pub) Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MatrixIdField\n a ui:SingleLineTextField ;\n ui:label \"Matrix Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :MediumIdField\n a ui:SingleLineTextField ;\n ui:label \"Medium Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 40 .\n\n :NostrIdField\n a ui:SingleLineTextField ;\n ui:label \"Nostr public key\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\"; # @@\n ui:size 70 .\n\n :OrcidIdField\n a ui:SingleLineTextField ;\n ui:label \"ORCiD id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :PinterestIdField\n a ui:SingleLineTextField ;\n ui:label \"Pinterest id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :RedditIdField\n a ui:SingleLineTextField ;\n ui:label \"Reddit Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :StravaIdField\n a ui:SingleLineTextField ;\n ui:label \"Strava Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label \"Snapchat Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TiktokIdField\n a ui:SingleLineTextField ;\n ui:label \"Tiktok Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TumblrIdField\n a ui:SingleLineTextField ;\n ui:label \"Tumblr user name\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n :TwitterIdField\n a ui:SingleLineTextField ;\n ui:label \"Twitter Id\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\"; # @@\n ui:size 40 .\n\n# an unknown SN account needs more info\n\n :OtherIdForm a ui:Group; ui:weight 0; ui:parts ( :OtherIdField :OtherIconField :OtherLabelield ).\n\n :OtherIdField\n a ui:NamedNodeURIField ;\n ui:label \"URL of account to link to\";\n ui:maxLength \"200\" ;\n ui:property foaf:homepage ; \n ui:size 60 .\n\n :OtherLabelield\n a ui:SingleLineTextField ;\n ui:label \"Label\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label ; \n ui:size 40 .\n\n :OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"URL of icon to display\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon ;\n ui:size 60 .\n\n\n\n# Subclass definitions for foaf:Account (embedded for UI category selector)\nsoc:BlueSkyAccount rdfs:subClassOf foaf:Account; rdfs:label \"Bluesky\" .\nsoc:DiggAccount rdfs:subClassOf foaf:Account; rdfs:label \"Digg\" .\nsoc:FacebookAccount rdfs:subClassOf foaf:Account; rdfs:label \"Facebook\" .\nsoc:GithubAccount rdfs:subClassOf foaf:Account; rdfs:label \"Github\" .\nsoc:InstagramAccount rdfs:subClassOf foaf:Account; rdfs:label \"Instagram\" .\nsoc:LinkedInAccount rdfs:subClassOf foaf:Account; rdfs:label \"Linked In\" .\nsoc:MastodonAccount rdfs:subClassOf foaf:Account; rdfs:label \"Mastodon\" .\nsoc:MatrixAccount rdfs:subClassOf foaf:Account; rdfs:label \"Matrix\" .\nsoc:MediumAccount rdfs:subClassOf foaf:Account; rdfs:label \"Medium\" .\nsoc:NostrAccount rdfs:subClassOf foaf:Account; rdfs:label \"Nostr\" .\nsoc:OrcidAccount rdfs:subClassOf foaf:Account; rdfs:label \"ORCiD\" .\nsoc:PinterestAccount rdfs:subClassOf foaf:Account; rdfs:label \"Pinterest\" .\nsoc:RedditAccount rdfs:subClassOf foaf:Account; rdfs:label \"Reddit\" .\nsoc:SnapchatAccount rdfs:subClassOf foaf:Account; rdfs:label \"Snapchat\" .\nsoc:StravaAccount rdfs:subClassOf foaf:Account; rdfs:label \"Strava\" .\nsoc:TiktokAccount rdfs:subClassOf foaf:Account; rdfs:label \"TikTok\" .\nsoc:TumblrAccount rdfs:subClassOf foaf:Account; rdfs:label \"Tumblr\" .\nsoc:TwitterAccount rdfs:subClassOf foaf:Account; rdfs:label \"X (formerly Twitter)\" .\nsoc:OtherAccount rdfs:subClassOf foaf:Account; rdfs:label \"Other\" .\n\n\n\n# ENDS\n";
8
+ var _rdfFormsHelper = require("./rdfFormsHelper");
12
9
  /* babel-plugin-inline-import './ontology/socialMedia.ttl' */
13
- const socialMedia = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n\n@prefix org: <http://www.w3.org/ns/org#>.\n\n@prefix : <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n@prefix soc: <https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl#>.\n\n##### Ontology of Online Accounts\n\nfoaf:Account a rdfs:Class;\n rdfs:label \"Online Account Provider\";\n owl:disjointUnionOf ( :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount :OrcidAccount :PinterestAccount\n :RedditAccount :SnapchatAccount :StravaAccount :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Bluesky\";\n foaf:userProfilePrefix \"https://bsky.app/profile/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Digg\";\n foaf:userProfilePrefix \"https://www.digg.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Facebook\";\n foaf:userProfilePrefix \"https://www.facebook.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Github\";\n foaf:userProfilePrefix \"https://www.github.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Instagram\";\n foaf:userProfilePrefix \"https://www.instagram.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Linked In\";\n foaf:userProfilePrefix \"https://www.linkedin.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Mastodon\" ;\n foaf:userProfilePrefix \"https://mastodon.social/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Matrix\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix \"https://matrix.to/#/\" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Medium\";\n foaf:userProfilePrefix \"https://medium.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Nostr\";\n foaf:userProfilePrefix \"https://primal.net/p/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ORCiD\";\n foaf:userProfilePrefix \"https://orcid.org/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Pinterest\";\n foaf:userProfilePrefix \"https://pin.it/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Reddit\";\n foaf:userProfilePrefix \"https://www.reddit.com/user/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Strava\";\n foaf:userProfilePrefix \"https://www.strava.com/athletes/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Tumblr\";\n foaf:userProfilePrefix \"https://www.tumblr.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"X (formerly Twitter)\";\n foaf:userProfilePrefix \"https://x.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n# ends\n";
10
+ const socialMediaForm = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix : <#>.\n\n########### ATTENTION - we cannot rename this ontology file name without migrating existing data on existing accounts\n\n########### Social Media - other accounts\n#\n# Twitter, linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Social media form\" ;\n a ui:Form ;\n ui:parts (\n :SocialsForm\n ).\n\n:SocialsForm a ui:Multiple;\n ui:label \"online account\";\n ui:property foaf:account; # the triple is created with the foaf:acccounts predicate\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :AccountField \n :AccountIdField ).\n\n:AccountField a ui:Classifier; \n ui:label \"Choose account\"@en;\n ui:multiple false ; \n ui:category foaf:Account. # the accounts are described by the foaf:Account predicate\n\n# this is what is needed to make a dropdown box\nfoaf:Account a rdfs:Class;\n rdfs:label \"Online Account Provider\";\n owl:disjointUnionOf ( \n :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount \n :OrcidAccount :PinterestAccount :RedditAccount :SnapchatAccount :StravaAccount \n :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:AccountIdField a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for :BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for :DiggAccount; ui:use :DiggIdField],\n [ ui:for :FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for :GithubAccount; ui:use :GithubIdField ],\n [ ui:for :InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for :LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for :MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for :MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for :MediumAccount; ui:use :MediumIdField ],\n [ ui:for :NostrAccount; ui:use :NostrIdField ],\n [ ui:for :OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for :PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for :RedditAccount; ui:use :RedditIdField ],\n [ ui:for :StravaAccount; ui:use :StravaIdField ],\n [ ui:for :SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for :TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for :TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for :TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for :OtherAccount; ui:use :OtherIdForm ] .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Bluesky\";\n foaf:userProfilePrefix \"https://bsky.app/profile/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Digg\";\n foaf:userProfilePrefix \"https://www.digg.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Facebook\";\n foaf:userProfilePrefix \"https://www.facebook.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Github\";\n foaf:userProfilePrefix \"https://www.github.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Instagram\";\n foaf:userProfilePrefix \"https://www.instagram.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"LinkedIn\";\n foaf:userProfilePrefix \"https://www.linkedin.com/in/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Mastodon\" ;\n foaf:userProfilePrefix \"https://mastodon.social/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Matrix\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix \"https://matrix.to/#/\" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Medium\";\n foaf:userProfilePrefix \"https://medium.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Nostr\";\n foaf:userProfilePrefix \"https://primal.net/p/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ORCiD\";\n foaf:userProfilePrefix \"https://orcid.org/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Pinterest\";\n foaf:userProfilePrefix \"https://pin.it/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Reddit\";\n foaf:userProfilePrefix \"https://www.reddit.com/user/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Strava\";\n foaf:userProfilePrefix \"https://www.strava.com/athletes/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Tumblr\";\n foaf:userProfilePrefix \"https://www.tumblr.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"X\";\n foaf:userProfilePrefix \"https://x.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n:BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\".\n\n:DiggIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\".\n\n:FacebookIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:GithubIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:InstagramIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MastodonIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MatrixIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MediumIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:NostrIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:OrcidIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:PinterestIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:RedditIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:StravaIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TiktokIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TumblrIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TwitterIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n# an unknown online account needs more info\n\n:OtherIdForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :OtherIdField \n :OtherIconField \n :OtherLabelField ).\n\n:OtherIdField\n a ui:NamedNodeURIField ;\n ui:label \"Account link\";\n ui:maxLength \"200\" ;\n ui:property foaf:homepage.\n\n:OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"Icon link\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon.\n\n:OtherLabelField\n a ui:SingleLineTextField ;\n ui:label \"Name\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label.\n\n# ends\n";
11
+ const socialMediaFormName = 'socialMedia.ttl'; // The name of the file to upload
12
+
14
13
  const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
15
14
 
16
- function loadProfileForm(store) {
17
- const preferencesForm = store.sym('https://solidos.github.io/profile-pane/src/ontology/profileForm.ttl#this');
18
- const preferencesFormDoc = preferencesForm.doc();
19
- const socialMediaDoc = store.sym('https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl').doc();
20
- const promises = [];
21
- if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
22
- promises.push(new Promise((resolve, reject) => {
23
- (0, _rdflib.parse)(profileForm, store, preferencesFormDoc.uri, 'text/turtle', err => {
24
- if (err) reject(err);else resolve();
25
- });
26
- }));
27
- }
28
- if (!store.holds(undefined, undefined, undefined, socialMediaDoc)) {
29
- promises.push(new Promise((resolve, reject) => {
30
- (0, _rdflib.parse)(socialMedia, store, socialMediaDoc.uri, 'text/turtle', err => {
31
- if (err) reject(err);else resolve();
32
- });
33
- }));
34
- }
35
- return Promise.all(promises).then(() => undefined);
36
- }
37
15
  function expandRdfList(store, node) {
38
- const collectionElements = node.elements;
39
- if (Array.isArray(collectionElements)) {
40
- return collectionElements.flatMap(element => expandRdfList(store, element));
41
- }
42
- const first = store.any(node, _solidUi.ns.rdf('first'));
43
- if (!first) return [node];
44
- const items = [];
45
- let current = node;
46
- while (current) {
47
- const value = store.any(current, _solidUi.ns.rdf('first'));
48
- if (value) items.push(...expandRdfList(store, value));
49
- const rest = store.any(current, _solidUi.ns.rdf('rest'));
50
- if (!rest || rest.termType === 'NamedNode' && rest.value === _solidUi.ns.rdf('nil').value) break;
51
- current = rest;
16
+ const visited = new Set();
17
+ function inner(node) {
18
+ const termType = node.termType || typeof node;
19
+ const value = node.value || String(node);
20
+ const key = `${termType}:${value}`;
21
+ if (visited.has(key)) return [];
22
+ visited.add(key);
23
+ const collectionElements = node.elements;
24
+ if (Array.isArray(collectionElements)) {
25
+ return collectionElements.flatMap(element => inner(element));
26
+ }
27
+ const first = store.any(node, _solidUi.ns.rdf('first'));
28
+ if (!first) return [node];
29
+ const items = [];
30
+ let current = node;
31
+ while (current) {
32
+ const value = store.any(current, _solidUi.ns.rdf('first'));
33
+ if (value) items.push(...inner(value));
34
+ const rest = store.any(current, _solidUi.ns.rdf('rest'));
35
+ if (!rest || rest.termType === 'NamedNode' && rest.value === _solidUi.ns.rdf('nil').value) break;
36
+ current = rest;
37
+ }
38
+ return items;
52
39
  }
53
- return items;
40
+ return inner(node);
54
41
  }
55
42
  function presentSocial(subject, store) {
56
43
  function nameForAccount(subject) {
57
- const acIcon = store.any(subject, _solidUi.ns.foaf('name')) || store.any(subject, _solidUi.ns.rdfs('label')); // on the account itself?
58
- if (acIcon) return acIcon.value;
44
+ const acName = store.any(subject, _solidUi.ns.foaf('name')) || store.any(subject, _solidUi.ns.rdfs('label')); // on the account itself?
45
+ if (acName) return acName.value;
59
46
  const classes = store.each(subject, _solidUi.ns.rdf('type'));
60
47
  for (const k of classes) {
61
48
  const classIcon = store.any(k, _solidUi.ns.rdfs('label'));
@@ -64,14 +51,13 @@ function presentSocial(subject, store) {
64
51
  }
65
52
  return _solidUi.utils.label(k);
66
53
  }
67
- return '';
54
+ return 'Unknown Account';
68
55
  }
69
56
  function iconForAccount(subject) {
70
57
  const acIcon = store.any(subject, _solidUi.ns.foaf('icon')); // on the account itself?
71
58
  if (acIcon) return acIcon.value;
72
59
  const classes = store.each(subject, _solidUi.ns.rdf('type'));
73
60
  if (classes.length > 0) {
74
- console.log('@@ classes[0].termType 2 ', classes[0].termType);
75
61
  for (const k of classes) {
76
62
  const classIcon = store.any(k, _solidUi.ns.foaf('icon'));
77
63
  if (classIcon !== null) {
@@ -87,12 +73,15 @@ function presentSocial(subject, store) {
87
73
  const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || 'No_account_Name';
88
74
  const classes = store.each(subject, _solidUi.ns.rdf('type'));
89
75
  for (const k of classes) {
90
- const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
91
- if (userProfilePrefix) {
92
- return userProfilePrefix.value + id.trim();
76
+ // Fix: ensure k is a NamedNode for store.any
77
+ if (k.termType === 'NamedNode') {
78
+ const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
79
+ if (userProfilePrefix) {
80
+ return userProfilePrefix.value + id.trim();
81
+ }
93
82
  }
94
83
  }
95
- return 'no userProfilePrefix?';
84
+ return store.anyJS(subject, _solidUi.ns.foaf('homepage'), null, subject.doc()) || '';
96
85
  }
97
86
  function accountAsObject(ac) {
98
87
  return {
@@ -101,17 +90,27 @@ function presentSocial(subject, store) {
101
90
  homepage: homepageForAccount(ac)
102
91
  };
103
92
  }
104
- // Ontology should be pre-loaded by caller via loadProfileForm(store)
105
93
 
94
+ // we need to load the social media accounts ontology to be able to query all data needed
95
+ (0, _rdfFormsHelper.loadDocument)(store, socialMediaForm, socialMediaFormName);
106
96
  const accountNodes = store.each(subject, _solidUi.ns.foaf('account'));
107
- const accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
108
- if (!accountThings.length) return {
97
+ let accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
98
+ // Deduplicate by foaf:accountName value
99
+ const accountNameSet = new Set();
100
+ const accounts = [];
101
+ for (const ac of accountThings) {
102
+ if (ac.termType === 'NamedNode') {
103
+ const accountNameNode = store.any(ac, _solidUi.ns.foaf('accountName'));
104
+ const accountName = accountNameNode ? accountNameNode.value : '';
105
+ if (!accountNameSet.has(accountName)) {
106
+ accountNameSet.add(accountName);
107
+ accounts.push(accountAsObject(ac));
108
+ }
109
+ }
110
+ }
111
+ if (!accounts.length) return {
109
112
  accounts: []
110
113
  };
111
- //console.log('Social: accountThings', accountThings)
112
- const accounts = accountThings.map(ac => accountAsObject(ac));
113
- //console.log('Social: account objects', accounts)
114
-
115
114
  return {
116
115
  accounts
117
116
  };
@@ -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,eAgCxH"}
@@ -0,0 +1,40 @@
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 :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)\". }";
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('data-testid', 'edit-cv-section');
17
+ section.setAttribute('aria-labelledby', 'edit-profile-cv-heading');
18
+ section.classList.add('profileSection', 'section-bg', 'profile-form');
19
+ const header = context.dom.createElement('header');
20
+ header.classList.add('text-center', 'mb-md');
21
+ const heading = context.dom.createElement('h2');
22
+ heading.id = 'edit-profile-cv-heading';
23
+ heading.classList.add('section-title');
24
+ heading.textContent = _texts.resumeHeadingText;
25
+ header.appendChild(heading);
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 {
33
+ const comment1 = context.dom.createElement('p');
34
+ comment1.classList.add('p-md');
35
+ comment1.textContent = 'Login to add resume information to your profile.';
36
+ section.appendChild(comment1);
37
+ }
38
+ (0, _rdfFormsHelper.default)(section, me, resumeForm, resumeFormName, store, context.dom, editableProfile);
39
+ return section;
40
+ }
@@ -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,eA6C9I"}
@@ -0,0 +1,47 @@
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.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
+ if (editableProfile) {
28
+ comment2 = context.dom.createElement('p');
29
+ comment2.id = 'edit-profile-communities-help';
30
+ comment2.classList.add('p-md');
31
+ comment2.textContent = 'Drag organizations onto the target below to add organizations.';
32
+ section.appendChild(comment2);
33
+ }
34
+ const attachmentList = _solidUi.widgets.attachmentList(context.dom, me, section, {
35
+ doc: profile,
36
+ modify: !!editableProfile,
37
+ predicate: _solidUi.ns.solid('community'),
38
+ noun: 'community'
39
+ });
40
+ const descriptions = [comment1.id];
41
+ if (comment2?.id) {
42
+ descriptions.push(comment2.id);
43
+ }
44
+ attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
45
+ section.appendChild(attachmentList);
46
+ return section;
47
+ }
@@ -0,0 +1,4 @@
1
+ import { DataBrowserContext } from 'pane-registry';
2
+ import { NamedNode } from 'rdflib';
3
+ export declare function EditContactsSection(context: DataBrowserContext, me: NamedNode): HTMLElement;
4
+ //# sourceMappingURL=EditContactsCard.d.ts.map
@@ -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"}