profile-pane 3.2.0 → 3.2.2-test.0
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/README.md +50 -0
- package/icons-png/discord.png +0 -0
- package/icons-png/dribbble.png +0 -0
- package/icons-png/facebook.png +0 -0
- package/icons-png/instagram.png +0 -0
- package/icons-png/linkedin.png +0 -0
- package/icons-png/pinterest.png +0 -0
- package/icons-png/sharechat.png +0 -0
- package/icons-png/signup.png +0 -0
- package/icons-png/snapchat.png +0 -0
- package/icons-png/spotify.png +0 -0
- package/icons-png/telegram.png +0 -0
- package/icons-png/tiktok.png +0 -0
- package/icons-png/whatsapp.png +0 -0
- package/icons-png/x.png +0 -0
- package/icons-png/youtube.png +0 -0
- package/lib/303.profile-pane.js +1362 -0
- package/lib/303.profile-pane.js.map +1 -0
- package/lib/303.profile-pane.min.js +2 -0
- package/lib/303.profile-pane.min.js.map +1 -0
- package/lib/ProfileView.css +1090 -0
- package/lib/ProfileView.d.ts +2 -1
- package/lib/ProfileView.d.ts.map +1 -1
- package/lib/ProfileView.js +64 -36
- package/lib/buttonsHelper.d.ts +1 -1
- package/lib/buttonsHelper.d.ts.map +1 -1
- package/lib/buttonsHelper.js +2 -1
- package/lib/editProfilePane/EditCVCard.js +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.js +1 -1
- package/lib/editProfilePane/EditFriendsCard.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 +4 -5
- package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
- package/lib/editProfilePane/editProfilePresenter.js +5 -4
- package/lib/icons-svg/profileIcons.d.ts +1 -1
- package/lib/icons-svg/profileIcons.d.ts.map +1 -1
- package/lib/icons-svg/profileIcons.js +9 -17
- package/lib/index.d.ts +1 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +74 -40
- package/lib/ontology/otherPreferencesForm.ttl +32 -0
- package/lib/ontology/resumeForm.ttl +349 -0
- package/lib/ontology/socialMedia.ttl +433 -0
- package/lib/profile-pane.js +32266 -13247
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +2315 -935
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/rdfFormsHelper.d.ts +13 -1
- package/lib/rdfFormsHelper.d.ts.map +1 -1
- package/lib/rdfFormsHelper.js +13 -1
- package/lib/sections/bio/BioEditDialog.d.ts.map +1 -1
- package/lib/sections/bio/BioEditDialog.js +7 -7
- package/lib/sections/bio/BioSection.css +300 -0
- package/lib/sections/bio/BioSection.d.ts +3 -2
- package/lib/sections/bio/BioSection.d.ts.map +1 -1
- package/lib/sections/bio/BioSection.js +26 -19
- package/lib/sections/bio/mutations.d.ts.map +1 -1
- package/lib/sections/bio/mutations.js +14 -3
- package/lib/sections/contactInfo/ContactInfoEditDialog.css +354 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +3 -1
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -1
- package/lib/sections/contactInfo/ContactInfoEditDialog.js +183 -98
- package/lib/sections/contactInfo/ContactInfoSection.css +125 -0
- package/lib/sections/contactInfo/ContactInfoSection.d.ts +2 -0
- package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -1
- package/lib/sections/contactInfo/ContactInfoSection.js +64 -41
- package/lib/sections/contactInfo/mutations.d.ts.map +1 -1
- package/lib/sections/contactInfo/mutations.js +51 -16
- package/lib/sections/education/EducationEditDialog.d.ts +3 -1
- package/lib/sections/education/EducationEditDialog.d.ts.map +1 -1
- package/lib/sections/education/EducationEditDialog.js +170 -92
- package/lib/sections/education/EducationSection.css +133 -0
- package/lib/sections/education/EducationSection.d.ts +3 -2
- package/lib/sections/education/EducationSection.d.ts.map +1 -1
- package/lib/sections/education/EducationSection.js +32 -25
- package/lib/sections/education/mutations.d.ts.map +1 -1
- package/lib/sections/education/mutations.js +14 -3
- package/lib/sections/heading/HeadingEditDialog.d.ts +4 -1
- package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -1
- package/lib/sections/heading/HeadingEditDialog.js +287 -162
- package/lib/sections/heading/HeadingSection.css +862 -0
- package/lib/sections/heading/HeadingSection.d.ts +3 -2
- package/lib/sections/heading/HeadingSection.d.ts.map +1 -1
- package/lib/sections/heading/HeadingSection.js +63 -32
- package/lib/sections/heading/imageHelpers.d.ts +1 -0
- package/lib/sections/heading/imageHelpers.d.ts.map +1 -1
- package/lib/sections/heading/imageHelpers.js +40 -1
- package/lib/sections/heading/mutations.d.ts.map +1 -1
- package/lib/sections/heading/mutations.js +86 -23
- package/lib/sections/heading/selectors.d.ts.map +1 -1
- package/lib/sections/heading/selectors.js +14 -3
- package/lib/sections/heading/types.d.ts +1 -2
- package/lib/sections/heading/types.d.ts.map +1 -1
- package/lib/sections/languages/LanguageEditDialog.d.ts +3 -1
- package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -1
- package/lib/sections/languages/LanguageEditDialog.js +202 -119
- package/lib/sections/languages/LanguageSection.css +53 -0
- package/lib/sections/languages/LanguageSection.d.ts +2 -0
- package/lib/sections/languages/LanguageSection.d.ts.map +1 -1
- package/lib/sections/languages/LanguageSection.js +42 -31
- package/lib/sections/languages/mutations.d.ts.map +1 -1
- package/lib/sections/languages/mutations.js +60 -161
- package/lib/sections/languages/selectors.d.ts.map +1 -1
- package/lib/sections/languages/selectors.js +1 -2
- package/lib/sections/projects/ProjectEditDialog.d.ts +2 -1
- package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -1
- package/lib/sections/projects/ProjectEditDialog.js +13 -24
- package/lib/sections/projects/ProjectSection.css +368 -0
- package/lib/sections/projects/ProjectSection.d.ts +2 -1
- package/lib/sections/projects/ProjectSection.d.ts.map +1 -1
- package/lib/sections/projects/ProjectSection.js +116 -34
- package/lib/sections/projects/mutations.d.ts.map +1 -1
- package/lib/sections/projects/mutations.js +109 -132
- package/lib/sections/projects/selectors.d.ts.map +1 -1
- package/lib/sections/projects/selectors.js +4 -45
- package/lib/{QRCodeCard.d.ts → sections/qrcode/QRCodeCard.d.ts} +2 -1
- package/lib/sections/qrcode/QRCodeCard.d.ts.map +1 -0
- package/lib/{QRCodeCard.js → sections/qrcode/QRCodeCard.js} +59 -11
- package/lib/sections/qrcode/QRCodeSection.css +108 -0
- package/lib/sections/qrcode/QRCodeSection.d.ts +4 -0
- package/lib/sections/qrcode/QRCodeSection.d.ts.map +1 -0
- package/lib/sections/qrcode/QRCodeSection.js +17 -0
- package/lib/sections/resume/ResumeEditDialog.d.ts +10 -1
- package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -1
- package/lib/sections/resume/ResumeEditDialog.js +531 -149
- package/lib/sections/resume/ResumeSection.css +350 -0
- package/lib/sections/resume/ResumeSection.d.ts +3 -2
- package/lib/sections/resume/ResumeSection.d.ts.map +1 -1
- package/lib/sections/resume/ResumeSection.js +78 -49
- package/lib/sections/resume/mutations.d.ts.map +1 -1
- package/lib/sections/resume/mutations.js +17 -3
- package/lib/sections/resume/selectors.d.ts.map +1 -1
- package/lib/sections/resume/selectors.js +1 -0
- package/lib/sections/resume/types.d.ts +1 -0
- package/lib/sections/resume/types.d.ts.map +1 -1
- package/lib/sections/shared/collapsibleSection.d.ts.map +1 -1
- package/lib/sections/shared/collapsibleSection.js +1 -0
- package/lib/sections/shared/phoneCountries.d.ts +1 -1
- package/lib/sections/shared/phoneCountries.d.ts.map +1 -1
- package/lib/sections/shared/phoneCountries.js +2 -2
- package/lib/sections/shared/projectCommunityNodes.d.ts +6 -0
- package/lib/sections/shared/projectCommunityNodes.d.ts.map +1 -0
- package/lib/sections/shared/projectCommunityNodes.js +56 -0
- package/lib/sections/shared/rdfMutationHelpers.d.ts +35 -2
- package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -1
- package/lib/sections/shared/rdfMutationHelpers.js +290 -14
- package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -1
- package/lib/sections/shared/sectionCardHelpers.js +80 -11
- package/lib/sections/shared/types.d.ts +24 -0
- package/lib/sections/shared/types.d.ts.map +1 -1
- package/lib/sections/skills/SkillsEditDialog.d.ts +3 -1
- package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -1
- package/lib/sections/skills/SkillsEditDialog.js +136 -115
- package/lib/sections/skills/SkillsSection.css +173 -0
- package/lib/sections/skills/SkillsSection.d.ts +2 -0
- package/lib/sections/skills/SkillsSection.d.ts.map +1 -1
- package/lib/sections/skills/SkillsSection.js +107 -47
- package/lib/sections/skills/mutations.d.ts.map +1 -1
- package/lib/sections/skills/mutations.js +25 -21
- package/lib/sections/skills/selectors.d.ts.map +1 -1
- package/lib/sections/skills/selectors.js +5 -3
- package/lib/sections/social/SocialEditDialog.d.ts +3 -1
- package/lib/sections/social/SocialEditDialog.d.ts.map +1 -1
- package/lib/sections/social/SocialEditDialog.js +170 -62
- package/lib/sections/social/SocialSection.css +194 -0
- package/lib/sections/social/SocialSection.d.ts +4 -3
- package/lib/sections/social/SocialSection.d.ts.map +1 -1
- package/lib/sections/social/SocialSection.js +59 -43
- package/lib/sections/social/mutations.d.ts.map +1 -1
- package/lib/sections/social/mutations.js +23 -132
- package/lib/specialButtons/AddMeToYourFriends.css +54 -0
- package/lib/specialButtons/addContact/AddMeToYourContacts.css +1118 -0
- package/lib/specialButtons/addContact/ContactCreationDialog.d.ts +10 -0
- package/lib/specialButtons/addContact/ContactCreationDialog.d.ts.map +1 -0
- package/lib/specialButtons/addContact/ContactCreationDialog.js +1123 -0
- package/lib/specialButtons/addContact/addMeToYourContacts.d.ts +16 -0
- package/lib/specialButtons/addContact/addMeToYourContacts.d.ts.map +1 -0
- package/lib/specialButtons/addContact/addMeToYourContacts.js +136 -0
- package/lib/specialButtons/addContact/contactsErrors.d.ts +8 -0
- package/lib/specialButtons/addContact/contactsErrors.d.ts.map +1 -0
- package/lib/specialButtons/addContact/contactsErrors.js +106 -0
- package/lib/specialButtons/addContact/contactsTypes.d.ts +43 -0
- package/lib/specialButtons/addContact/contactsTypes.d.ts.map +1 -0
- package/lib/specialButtons/addContact/contactsTypes.js +5 -0
- package/lib/specialButtons/addContact/helpers.d.ts +7 -0
- package/lib/specialButtons/addContact/helpers.d.ts.map +1 -0
- package/lib/specialButtons/addContact/helpers.js +103 -0
- package/lib/specialButtons/addContact/mutations.d.ts +16 -0
- package/lib/specialButtons/addContact/mutations.d.ts.map +1 -0
- package/lib/specialButtons/addContact/mutations.js +300 -0
- package/lib/specialButtons/addContact/selectors.d.ts +10 -0
- package/lib/specialButtons/addContact/selectors.d.ts.map +1 -0
- package/lib/specialButtons/addContact/selectors.js +163 -0
- package/lib/{addMeToYourFriends.d.ts → specialButtons/addMeToYourFriends.d.ts} +6 -4
- package/lib/specialButtons/addMeToYourFriends.d.ts.map +1 -0
- package/lib/{addMeToYourFriends.js → specialButtons/addMeToYourFriends.js} +46 -11
- package/lib/styles/CollapsibleSection.css +519 -0
- package/lib/styles/EditDialogs.css +506 -686
- package/lib/styles/EditDialogs.responsive.css +989 -0
- package/lib/texts/buttonTexts.d.ts +9 -0
- package/lib/texts/buttonTexts.d.ts.map +1 -0
- package/lib/texts/buttonTexts.js +14 -0
- package/lib/texts/dialogTexts.d.ts +14 -0
- package/lib/texts/dialogTexts.d.ts.map +1 -0
- package/lib/texts/dialogTexts.js +19 -0
- package/lib/texts/messageTexts.d.ts +42 -0
- package/lib/texts/messageTexts.d.ts.map +1 -0
- package/lib/texts/messageTexts.js +47 -0
- package/lib/texts/profileTexts.d.ts +14 -0
- package/lib/texts/profileTexts.d.ts.map +1 -0
- package/lib/texts/profileTexts.js +19 -0
- package/lib/texts/qrCodeTexts.d.ts +2 -0
- package/lib/texts/qrCodeTexts.d.ts.map +1 -0
- package/lib/texts/qrCodeTexts.js +7 -0
- package/lib/texts.d.ts +5 -60
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +55 -70
- package/lib/ui/dialog.css +233 -0
- package/lib/ui/dialog.d.ts +15 -1
- package/lib/ui/dialog.d.ts.map +1 -1
- package/lib/ui/dialog.js +245 -45
- package/lib/ui/dialog.responsive.css +195 -0
- package/lib/ui/errors.d.ts.map +1 -1
- package/lib/ui/errors.js +2 -1
- package/lib/ui/spinner.d.ts +3 -0
- package/lib/ui/spinner.d.ts.map +1 -0
- package/lib/ui/spinner.js +13 -0
- package/lib/utils/debug.d.ts +5 -0
- package/lib/utils/debug.d.ts.map +1 -0
- package/lib/utils/debug.js +23 -0
- package/lib/utils/errorDisplay.d.ts +2 -0
- package/lib/utils/errorDisplay.d.ts.map +1 -0
- package/lib/utils/errorDisplay.js +19 -0
- package/package.json +34 -26
- package/lib/ChatWithMe.d.ts +0 -7
- package/lib/ChatWithMe.d.ts.map +0 -1
- package/lib/ChatWithMe.js +0 -90
- package/lib/QRCodeCard.d.ts.map +0 -1
- package/lib/addMeToYourFriends.d.ts.map +0 -1
- package/lib/sections/heading/camera.d.ts +0 -19
- package/lib/sections/heading/camera.d.ts.map +0 -1
- package/lib/sections/heading/camera.js +0 -199
- package/lib/styles/BioSection.css +0 -77
- package/lib/styles/CVCard.css +0 -142
- package/lib/styles/ChatWithMe.css +0 -6
- package/lib/styles/ContactInfoEditDialog.css +0 -153
- package/lib/styles/EducationCard.css +0 -103
- package/lib/styles/HeadingSection.css +0 -309
- package/lib/styles/ProfileCard.css +0 -66
- package/lib/styles/ProfileView.css +0 -65
- package/lib/styles/ProjectsCard.css +0 -206
- package/lib/styles/QRCodeCard.css +0 -43
- package/lib/styles/SocialCard.css +0 -89
- package/lib/styles/dialog.css +0 -209
- package/lib/styles/utilities.css +0 -740
package/lib/ProfileView.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
|
2
2
|
import { DataBrowserContext } from 'pane-registry';
|
|
3
3
|
import { NamedNode } from 'rdflib';
|
|
4
|
-
import './
|
|
4
|
+
import './ProfileView.css';
|
|
5
|
+
import './styles/CollapsibleSection.css';
|
|
5
6
|
export declare function ProfileView(subject: NamedNode, context: DataBrowserContext, onSaved?: () => Promise<void> | void): Promise<TemplateResult>;
|
|
6
7
|
//# sourceMappingURL=ProfileView.d.ts.map
|
package/lib/ProfileView.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileView.d.ts","sourceRoot":"","sources":["../src/ProfileView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAE7C,OAAO,
|
|
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;AAE7C,OAAO,mBAAmB,CAAA;AAC1B,OAAO,iCAAiC,CAAA;AAiDxC,wBAAsB,WAAW,CAC/B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GACnC,OAAO,CAAE,cAAc,CAAC,CA8E1B"}
|
package/lib/ProfileView.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ProfileView = ProfileView;
|
|
7
7
|
var _litHtml = require("lit-html");
|
|
8
8
|
var _solidLogic = require("solid-logic");
|
|
9
|
-
require("./
|
|
10
|
-
|
|
9
|
+
require("./ProfileView.css");
|
|
10
|
+
require("./styles/CollapsibleSection.css");
|
|
11
11
|
var _ProfileViewModelPresenter = require("./ProfileViewModelPresenter");
|
|
12
12
|
var _ContactInfoSection = require("./sections/contactInfo/ContactInfoSection");
|
|
13
13
|
var _LanguageSection = require("./sections/languages/LanguageSection");
|
|
@@ -17,6 +17,7 @@ var _ProjectSection = require("./sections/projects/ProjectSection");
|
|
|
17
17
|
var _HeadingSection = require("./sections/heading/HeadingSection");
|
|
18
18
|
var _BioSection = require("./sections/bio/BioSection");
|
|
19
19
|
var _SocialSection = require("./sections/social/SocialSection");
|
|
20
|
+
var _QRCodeSection = require("./sections/qrcode/QRCodeSection");
|
|
20
21
|
function getViewerMode(subject) {
|
|
21
22
|
let mode = 'anonymous';
|
|
22
23
|
if (_solidLogic.authn.currentUser() && _solidLogic.authn.currentUser().sameTerm(subject)) mode = 'owner';
|
|
@@ -25,34 +26,26 @@ function getViewerMode(subject) {
|
|
|
25
26
|
}
|
|
26
27
|
function renderSidebar(store, subject, accounts, skills, languages, contactInfo, viewerMode, onSaved) {
|
|
27
28
|
return (0, _litHtml.html)`
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
class="profile__sidebar p-sm"
|
|
29
|
+
<div
|
|
30
|
+
class="profile__sidebar"
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
${(0, _SocialSection.
|
|
32
|
+
<aside class="profile__sidebar-content" aria-labelledby="profile-sidebar-heading">
|
|
33
|
+
<h2 id="profile-sidebar-heading" class="sr-only">Profile sidebar</h2>
|
|
34
|
+
${(0, _SocialSection.renderSocialSection)(store, subject, accounts, viewerMode, onSaved)}
|
|
35
35
|
${(0, _SkillsSection.renderSkillsSection)(store, subject, skills, viewerMode, onSaved)}
|
|
36
36
|
${(0, _LanguageSection.renderLanguageSection)(store, subject, languages, viewerMode, onSaved)}
|
|
37
37
|
${(0, _ContactInfoSection.renderContactInfoSection)(store, subject, contactInfo, viewerMode, onSaved)}
|
|
38
|
-
${
|
|
39
|
-
</
|
|
40
|
-
</
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
function renderQRCode(subject, store) {
|
|
44
|
-
return (0, _litHtml.html)`
|
|
45
|
-
<section class="profile__section border-lighter profile__qr-code" aria-labelledby="qr-heading" tabindex="-1">
|
|
46
|
-
<h2 id="qr-heading" class="sr-only">QR code</h2>
|
|
47
|
-
<div class="qrcode-card__frame flex-center">
|
|
48
|
-
${(0, _QRCodeCard.QRCodeCard)(subject, store)}
|
|
49
|
-
</div>
|
|
50
|
-
</section>
|
|
38
|
+
${(0, _QRCodeSection.renderQRCodeSection)(subject, store)}
|
|
39
|
+
</aside>
|
|
40
|
+
</div>
|
|
51
41
|
`;
|
|
52
42
|
}
|
|
53
43
|
async function ProfileView(subject, context, onSaved) {
|
|
54
44
|
const store = context.session.store;
|
|
55
45
|
const viewerMode = getViewerMode(subject);
|
|
46
|
+
const layout = context.environment?.layout ?? 'desktop';
|
|
47
|
+
const theme = context.environment?.theme ?? 'light';
|
|
48
|
+
const inputMode = context.environment?.inputMode ?? 'pointer';
|
|
56
49
|
const viewModel = await (0, _ProfileViewModelPresenter.presentProfileViewModel)(subject, store);
|
|
57
50
|
const profileDetails = viewModel.profileDetails;
|
|
58
51
|
const rolesByType = viewModel.cvDetails;
|
|
@@ -62,28 +55,63 @@ async function ProfileView(subject, context, onSaved) {
|
|
|
62
55
|
const bioDetails = viewModel.bioDetails;
|
|
63
56
|
const accounts = viewModel.social;
|
|
64
57
|
const contactInfo = viewModel.contactInfo;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
const headingSection = await (0, _HeadingSection.renderHeadingSection)(context, subject, profileDetails, viewerMode, onSaved);
|
|
59
|
+
const bioSection = (0, _BioSection.renderBioSection)(store, subject, bioDetails, viewerMode, onSaved);
|
|
60
|
+
const skillsSection = (0, _SkillsSection.renderSkillsSection)(store, subject, skills, viewerMode, onSaved);
|
|
61
|
+
const languageSection = (0, _LanguageSection.renderLanguageSection)(store, subject, languages, viewerMode, onSaved);
|
|
62
|
+
const cvSection = (0, _ResumeSection.renderCVSection)(store, subject, rolesByType, viewerMode, onSaved);
|
|
63
|
+
const projectSection = (0, _ProjectSection.renderProjectSection)(store, subject, projects, viewerMode, onSaved);
|
|
64
|
+
const socialSection = (0, _SocialSection.renderSocialSection)(store, subject, accounts, viewerMode, onSaved);
|
|
65
|
+
const contactInfoSection = (0, _ContactInfoSection.renderContactInfoSection)(store, subject, contactInfo, viewerMode, onSaved);
|
|
66
|
+
const qrCodeSection = (0, _QRCodeSection.renderQRCodeSection)(subject, store);
|
|
67
|
+
if (layout === 'mobile') {
|
|
68
|
+
return (0, _litHtml.html)`
|
|
69
|
+
<div
|
|
70
|
+
class="profile-pane-root"
|
|
71
|
+
data-layout=${layout}
|
|
72
|
+
data-theme=${theme}
|
|
73
|
+
data-input-mode=${inputMode}
|
|
74
|
+
>
|
|
75
|
+
<main
|
|
76
|
+
id="main-content"
|
|
77
|
+
class="profile-grid"
|
|
78
|
+
tabindex="-1"
|
|
79
|
+
>
|
|
80
|
+
${headingSection}
|
|
81
|
+
${bioSection}
|
|
82
|
+
${skillsSection}
|
|
83
|
+
${languageSection}
|
|
84
|
+
${cvSection}
|
|
85
|
+
${projectSection}
|
|
86
|
+
${socialSection}
|
|
87
|
+
${contactInfoSection}
|
|
88
|
+
${qrCodeSection}
|
|
89
|
+
</main>
|
|
90
|
+
</div>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
return (0, _litHtml.html)`
|
|
94
|
+
<div
|
|
95
|
+
class="profile-pane-root"
|
|
96
|
+
data-layout=${layout}
|
|
97
|
+
data-theme=${theme}
|
|
98
|
+
data-input-mode=${inputMode}
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
68
101
|
id="main-content"
|
|
69
102
|
class="profile-grid"
|
|
70
103
|
tabindex="-1"
|
|
71
|
-
>
|
|
72
|
-
<h1 id="profile-content-heading" class="sr-only">Profile for ${profileDetails.name}</h1>
|
|
104
|
+
>
|
|
73
105
|
|
|
74
|
-
<section
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
106
|
+
<section class="profile__main">
|
|
107
|
+
${headingSection}
|
|
108
|
+
${bioSection}
|
|
109
|
+
${cvSection}
|
|
110
|
+
${projectSection}
|
|
78
111
|
|
|
79
|
-
${(0, _HeadingSection.renderHeadingSection)(context, subject, profileDetails, viewerMode, onSaved)}
|
|
80
|
-
${(0, _BioSection.renderBioSection)(store, subject, bioDetails, viewerMode, onSaved)}
|
|
81
|
-
${(0, _ResumeSection.renderCVSection)(store, subject, rolesByType, viewerMode, onSaved)}
|
|
82
|
-
${(0, _ProjectSection.renderProjectSection)(store, subject, projects, viewerMode, onSaved)}
|
|
83
|
-
|
|
84
112
|
</section>
|
|
85
113
|
${renderSidebar(store, subject, accounts, skills, languages, contactInfo, viewerMode, onSaved)}
|
|
86
|
-
</
|
|
114
|
+
</div>
|
|
87
115
|
</div>
|
|
88
116
|
`;
|
|
89
117
|
}
|
package/lib/buttonsHelper.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataBrowserContext } from 'pane-registry';
|
|
2
2
|
import { NamedNode } from 'rdflib';
|
|
3
|
-
declare function complain(buttonContainer: HTMLDivElement, context: DataBrowserContext, error:
|
|
3
|
+
declare function complain(buttonContainer: HTMLDivElement, context: DataBrowserContext, error: unknown): void;
|
|
4
4
|
declare function mention(buttonContainer: HTMLDivElement, message: string): void;
|
|
5
5
|
declare function clearPreviousMessage(buttonContainer: HTMLDivElement): void;
|
|
6
6
|
declare function checkIfAnyUserLoggedIn(me: NamedNode): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonsHelper.d.ts","sourceRoot":"","sources":["../src/buttonsHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"buttonsHelper.d.ts","sourceRoot":"","sources":["../src/buttonsHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGlC,iBAAS,QAAQ,CACf,eAAe,EAAE,cAAc,EAC/B,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,OAAO,GACb,IAAI,CAYN;AAED,iBAAS,OAAO,CAAC,eAAe,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAcvE;AAED,iBAAS,oBAAoB,CAAC,eAAe,EAAE,cAAc,GAAG,IAAI,CAInE;AAED,iBAAS,sBAAsB,CAAC,EAAE,EAAE,SAAS,GAAG,OAAO,CAGtD;AAED,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,CAAA"}
|
package/lib/buttonsHelper.js
CHANGED
|
@@ -8,8 +8,9 @@ exports.clearPreviousMessage = clearPreviousMessage;
|
|
|
8
8
|
exports.complain = complain;
|
|
9
9
|
exports.mention = mention;
|
|
10
10
|
var _solidUi = require("solid-ui");
|
|
11
|
+
var _errorDisplay = require("./utils/errorDisplay");
|
|
11
12
|
function complain(buttonContainer, context, error) {
|
|
12
|
-
const errorBlock = _solidUi.widgets.errorMessageBlock(context.dom, error);
|
|
13
|
+
const errorBlock = _solidUi.widgets.errorMessageBlock(context.dom, (0, _errorDisplay.formatDisplayError)(error));
|
|
13
14
|
errorBlock.setAttribute('role', 'alert');
|
|
14
15
|
errorBlock.setAttribute('aria-live', 'assertive');
|
|
15
16
|
errorBlock.setAttribute('tabindex', '0');
|
|
@@ -9,7 +9,7 @@ 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
11
|
/** Project-local: currently unused component. Keep temporarily; do not add new usage. */
|
|
12
|
-
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@prefix l: <https://www.w3.org/ns/iana/language-code/>.\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
|
+
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@prefix l: <https://www.w3.org/ns/iana/language-code/>.\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)&selectedVersion=v1.2.0\".\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)&selectedVersion=v1.2.0\".\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)\". }";
|
|
13
13
|
const resumeFormName = 'resumeForm.ttl'; // The name of the form file
|
|
14
14
|
|
|
15
15
|
function EditCVSection(context, me, editableProfile, store) {
|
|
@@ -9,7 +9,7 @@ var _texts = require("../texts");
|
|
|
9
9
|
var _solidLogic = require("solid-logic");
|
|
10
10
|
require("../styles/editProfile.css");
|
|
11
11
|
var _buttonsHelper = require("../buttonsHelper");
|
|
12
|
-
var _addMeToYourFriends = require("../addMeToYourFriends");
|
|
12
|
+
var _addMeToYourFriends = require("../specialButtons/addMeToYourFriends");
|
|
13
13
|
var _editProfilePresenter = require("./editProfilePresenter");
|
|
14
14
|
/** Project-local: currently unused component. Keep temporarily; do not add new usage. */
|
|
15
15
|
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.EditFriendsSection = EditFriendsSection;
|
|
7
7
|
var _solidUi = require("solid-ui");
|
|
8
8
|
var _texts = require("../texts");
|
|
9
|
-
var _addMeToYourFriends = require("../addMeToYourFriends");
|
|
9
|
+
var _addMeToYourFriends = require("../specialButtons/addMeToYourFriends");
|
|
10
10
|
require("../styles/editProfile.css");
|
|
11
11
|
var _solidLogic = require("solid-logic");
|
|
12
12
|
var _buttonsHelper = require("../buttonsHelper");
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* or standalone script adding onto existing mashlib.
|
|
10
10
|
*/
|
|
11
11
|
import { PaneDefinition } from 'pane-registry';
|
|
12
|
-
import '../
|
|
12
|
+
import '../ProfileView.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,yFAAyF;AACzF;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,
|
|
1
|
+
{"version":3,"file":"EditProfileView.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditProfileView.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,oBAAoB,CAAA;AAK3B,QAAA,MAAM,eAAe,EAAE,cAsGtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -9,7 +9,7 @@ var _EditContactsCard = require("./EditContactsCard");
|
|
|
9
9
|
var _EditFriendsCard = require("./EditFriendsCard");
|
|
10
10
|
var _EditSocialCard = require("./EditSocialCard");
|
|
11
11
|
var _EditCommunitiesCard = require("./EditCommunitiesCard");
|
|
12
|
-
require("../
|
|
12
|
+
require("../ProfileView.css");
|
|
13
13
|
var _EditCVCard = require("./EditCVCard");
|
|
14
14
|
var _EditOtherPreferences = require("./EditOtherPreferences");
|
|
15
15
|
var _rdfFormsHelper = require("../rdfFormsHelper");
|
|
@@ -31,8 +31,7 @@ const editProfileView = {
|
|
|
31
31
|
label: () => null,
|
|
32
32
|
// don't use this in the normal solid-panes dispatching
|
|
33
33
|
|
|
34
|
-
render: function (
|
|
35
|
-
//console.log('@@@ render edit profile pane: subject, context', subject, context)
|
|
34
|
+
render: function (_subject, context) {
|
|
36
35
|
const dom = context.dom;
|
|
37
36
|
const store = context.session.store;
|
|
38
37
|
|
|
@@ -43,8 +42,8 @@ const editProfileView = {
|
|
|
43
42
|
div.setAttribute('aria-label', 'Edit your profile');
|
|
44
43
|
let editableProfile;
|
|
45
44
|
|
|
46
|
-
//
|
|
47
|
-
const main = dom.createElement('
|
|
45
|
+
// Pane root content. The page-level <main> landmark is on the shell's #MainContent.
|
|
46
|
+
const main = dom.createElement('div');
|
|
48
47
|
main.setAttribute('id', 'profile-edit-main-content');
|
|
49
48
|
main.setAttribute('aria-busy', 'true');
|
|
50
49
|
main.setAttribute('tabindex', '-1');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editProfilePresenter.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/editProfilePresenter.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"editProfilePresenter.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/editProfilePresenter.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAOvC,wBAAgB,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,gBAAgB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,SAAS,EAAE,SAAS,QAmB/I;AAiFD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAMpD"}
|
|
@@ -8,6 +8,7 @@ exports.refresh = refresh;
|
|
|
8
8
|
var _rdflib = require("rdflib");
|
|
9
9
|
var _solidLogic = require("solid-logic");
|
|
10
10
|
var _solidUi = require("solid-ui");
|
|
11
|
+
var _debug = require("../utils/debug");
|
|
11
12
|
/** Project-local: currently unused component. Keep temporarily; do not add new usage. */
|
|
12
13
|
|
|
13
14
|
const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
|
|
@@ -64,7 +65,7 @@ async function deleteAttachment(dom, attachmentTable, me, editableProfile, targe
|
|
|
64
65
|
// Delete the exact statements in the store so we don't rely on doc() matching
|
|
65
66
|
const statementsToDelete = _solidLogic.store.statementsMatching(me, predicate, target, null);
|
|
66
67
|
if (!statementsToDelete.length) {
|
|
67
|
-
|
|
68
|
+
(0, _debug.warn)('No matching statement found to delete for', target.value);
|
|
68
69
|
refresh(dom, attachmentTable, me, editableProfile, predicate);
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
@@ -77,7 +78,7 @@ async function deleteAttachment(dom, attachmentTable, me, editableProfile, targe
|
|
|
77
78
|
if (stillThere) {
|
|
78
79
|
try {
|
|
79
80
|
_solidLogic.store.removeStatements(statementsToDelete);
|
|
80
|
-
} catch (
|
|
81
|
+
} catch (_error) {
|
|
81
82
|
// Ignore if already gone
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -87,13 +88,13 @@ async function deleteAttachment(dom, attachmentTable, me, editableProfile, targe
|
|
|
87
88
|
if (_solidLogic.store.fetcher) await _solidLogic.store.fetcher.load(me.doc());
|
|
88
89
|
refresh(dom, attachmentTable, me, editableProfile, predicate);
|
|
89
90
|
} catch (error) {
|
|
90
|
-
|
|
91
|
+
(0, _debug.error)('Error deleting:', error);
|
|
91
92
|
|
|
92
93
|
// If update failed, try to keep UI in sync anyway
|
|
93
94
|
if (typeof _solidLogic.store.removeStatements === 'function') {
|
|
94
95
|
try {
|
|
95
96
|
_solidLogic.store.removeStatements(statementsToDelete);
|
|
96
|
-
} catch (
|
|
97
|
+
} catch (_error) {
|
|
97
98
|
/* ignore */
|
|
98
99
|
}
|
|
99
100
|
}
|
|
@@ -3,11 +3,11 @@ export declare const locationIcon: import("lit-html").TemplateResult<1>;
|
|
|
3
3
|
export declare const checkMarkIcon: import("lit-html").TemplateResult<1>;
|
|
4
4
|
export declare const plusDarkIcon: import("lit-html").TemplateResult<1>;
|
|
5
5
|
export declare const plusIcon: import("lit-html").TemplateResult<1>;
|
|
6
|
-
export declare const searchIcon: import("lit-html").TemplateResult<1>;
|
|
7
6
|
export declare const trashIcon: import("lit-html").TemplateResult<1>;
|
|
8
7
|
export declare const bentoIcon: import("lit-html").TemplateResult<1>;
|
|
9
8
|
export declare const starIcon: import("lit-html").TemplateResult<1>;
|
|
10
9
|
export declare const addIcon: import("lit-html").TemplateResult<1>;
|
|
10
|
+
export declare const chevronDownIcon: import("lit-html").TemplateResult<1>;
|
|
11
11
|
export declare const personInCircleIcon: import("lit-html").TemplateResult<1>;
|
|
12
12
|
export declare const globeIcon: import("lit-html").TemplateResult<1>;
|
|
13
13
|
export declare const lighteningIcon: import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileIcons.d.ts","sourceRoot":"","sources":["../../src/icons-svg/profileIcons.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,sCAoBxB,CAAA;AACD,eAAO,MAAM,YAAY,sCAYxB,CAAA;AACD,eAAO,MAAM,aAAa,sCAWzB,CAAA;AACD,eAAO,MAAM,YAAY,sCAYxB,CAAA;AAED,eAAO,MAAM,QAAQ,sCAkBpB,CAAA;AACD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"profileIcons.d.ts","sourceRoot":"","sources":["../../src/icons-svg/profileIcons.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,sCAoBxB,CAAA;AACD,eAAO,MAAM,YAAY,sCAYxB,CAAA;AACD,eAAO,MAAM,aAAa,sCAWzB,CAAA;AACD,eAAO,MAAM,YAAY,sCAYxB,CAAA;AAED,eAAO,MAAM,QAAQ,sCAkBpB,CAAA;AACD,eAAO,MAAM,SAAS,sCAerB,CAAA;AACD,eAAO,MAAM,SAAS,sCAgBrB,CAAA;AACD,eAAO,MAAM,QAAQ,sCAYpB,CAAA;AACD,eAAO,MAAM,OAAO,sCAkBnB,CAAA;AAED,eAAO,MAAM,eAAe,sCAI3B,CAAA;AACD,eAAO,MAAM,kBAAkB,sCAa9B,CAAA;AACD,eAAO,MAAM,SAAS,sCAarB,CAAA;AACD,eAAO,MAAM,cAAc,sCAiB1B,CAAA;AACD,eAAO,MAAM,WAAW,sCAWvB,CAAA;AACD,eAAO,MAAM,YAAY,sCAYxB,CAAA;AACD,eAAO,MAAM,SAAS,sCAWrB,CAAA;AAED,eAAO,MAAM,SAAS,sCAWrB,CAAA;AAED,eAAO,MAAM,QAAQ,sCAWpB,CAAA;AACD,eAAO,MAAM,UAAU,sCAYtB,CAAA;AACD,eAAO,MAAM,UAAU,sCAYtB,CAAA;AAED,eAAO,MAAM,iBAAiB,sCAY7B,CAAA"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.twoDownArrowsIcon = exports.trashIcon = exports.starIcon = exports.
|
|
6
|
+
exports.twoDownArrowsIcon = exports.trashIcon = exports.starIcon = exports.plusIcon = exports.plusDarkIcon = exports.personInCircleIcon = exports.pasteIcon = exports.locationIcon = exports.lighteningIcon = exports.globeIcon = exports.envelopeIcon = exports.editIcon = exports.deleteIcon = exports.commentIcon = exports.closeIcon = exports.chevronDownIcon = exports.checkMarkIcon = exports.cameraIcon = exports.birthdayIcon = exports.bentoIcon = exports.addIcon = void 0;
|
|
7
7
|
var _litHtml = require("lit-html");
|
|
8
8
|
const birthdayIcon = exports.birthdayIcon = (0, _litHtml.html)`
|
|
9
9
|
<svg
|
|
@@ -83,19 +83,6 @@ const plusIcon = exports.plusIcon = (0, _litHtml.html)`
|
|
|
83
83
|
</defs>
|
|
84
84
|
</svg>
|
|
85
85
|
`;
|
|
86
|
-
const searchIcon = exports.searchIcon = (0, _litHtml.html)`
|
|
87
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
88
|
-
width="13"
|
|
89
|
-
height="13"
|
|
90
|
-
viewBox="0 0 13 13"
|
|
91
|
-
fill="none"
|
|
92
|
-
aria-hidden="true"
|
|
93
|
-
focusable="false"
|
|
94
|
-
>
|
|
95
|
-
<circle cx="5.5" cy="5.5" r="4.5" stroke="#99A1AF" stroke-width="1.2" fill="none"/>
|
|
96
|
-
<path d="M9.1 9.1L12 12" stroke="#99A1AF" stroke-width="1.2" stroke-linecap="round"/>
|
|
97
|
-
</svg>
|
|
98
|
-
`;
|
|
99
86
|
const trashIcon = exports.trashIcon = (0, _litHtml.html)`
|
|
100
87
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
101
88
|
width="20"
|
|
@@ -161,6 +148,11 @@ const addIcon = exports.addIcon = (0, _litHtml.html)`
|
|
|
161
148
|
</defs>
|
|
162
149
|
</svg>
|
|
163
150
|
`;
|
|
151
|
+
const chevronDownIcon = exports.chevronDownIcon = (0, _litHtml.html)`
|
|
152
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7" fill="none" aria-hidden="true" focusable="false">
|
|
153
|
+
<path d="M10.1831 0.183058C10.4271 -0.061018 10.8228 -0.061015 11.0668 0.183058C11.3109 0.427136 11.3109 0.82277 11.0668 1.06685L6.06685 6.06685C5.82277 6.31093 5.42714 6.31093 5.18306 6.06685L0.183058 1.06685C-0.0610194 0.82277 -0.0610194 0.427136 0.183058 0.183058C0.427136 -0.0610194 0.82277 -0.0610194 1.06685 0.183058L5.62495 4.74116L10.1831 0.183058Z" fill="#6A7282"/>
|
|
154
|
+
</svg>
|
|
155
|
+
`;
|
|
164
156
|
const personInCircleIcon = exports.personInCircleIcon = (0, _litHtml.html)`
|
|
165
157
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
166
158
|
width="64"
|
|
@@ -258,9 +250,9 @@ const closeIcon = exports.closeIcon = (0, _litHtml.html)`
|
|
|
258
250
|
`;
|
|
259
251
|
const editIcon = exports.editIcon = (0, _litHtml.html)`
|
|
260
252
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
261
|
-
width="
|
|
262
|
-
height="
|
|
263
|
-
viewBox="
|
|
253
|
+
width="14"
|
|
254
|
+
height="14"
|
|
255
|
+
viewBox="3 3 14 14"
|
|
264
256
|
fill="none"
|
|
265
257
|
aria-hidden="true"
|
|
266
258
|
focusable="false"
|
package/lib/index.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { DataBrowserContext } from 'pane-registry';
|
|
2
|
-
import './styles/CVCard.css';
|
|
3
|
-
import './styles/ChatWithMe.css';
|
|
4
|
-
import './styles/ProfileCard.css';
|
|
5
|
-
import './styles/ProfileView.css';
|
|
6
|
-
import './styles/QRCodeCard.css';
|
|
7
|
-
import './styles/SocialCard.css';
|
|
8
|
-
import './styles/utilities.css';
|
|
9
2
|
import { NamedNode } from 'rdflib';
|
|
10
|
-
export { addMeToYourFriendsDiv, createAddMeToYourFriendsButton, saveNewThing, checkIfThingExists } from './addMeToYourFriends';
|
|
3
|
+
export { addMeToYourFriendsDiv, createAddMeToYourFriendsButton, saveNewThing, checkIfThingExists } from './specialButtons/addMeToYourFriends';
|
|
11
4
|
declare const Pane: {
|
|
12
5
|
global: boolean;
|
|
13
6
|
icon: string;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAK7C,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,YAAY,EACZ,kBAAkB,EACnB,MAAM,qCAAqC,CAAA;AAsG5C,QAAA,MAAM,IAAI;;;;qBAKG,SAAS,WACT,kBAAkB,KAC1B,MAAM,GAAG,IAAI;sBAWE,SAAS,WAAW,kBAAkB,KAAG,WAAW;CAqBvE,CAAA;AAED,eAAe,IAAI,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -28,25 +28,81 @@ Object.defineProperty(exports, "saveNewThing", {
|
|
|
28
28
|
return _addMeToYourFriends.saveNewThing;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
require("./styles/CVCard.css");
|
|
32
|
-
require("./styles/ChatWithMe.css");
|
|
33
|
-
require("./styles/ProfileCard.css");
|
|
34
|
-
require("./styles/ProfileView.css");
|
|
35
|
-
require("./styles/QRCodeCard.css");
|
|
36
|
-
require("./styles/SocialCard.css");
|
|
37
|
-
require("./styles/utilities.css");
|
|
38
31
|
var _litHtml = require("lit-html");
|
|
39
|
-
var
|
|
32
|
+
var _ProfileView = require("./ProfileView");
|
|
40
33
|
var _solidUi = require("solid-ui");
|
|
41
|
-
var
|
|
42
|
-
var _addMeToYourFriends = require("./addMeToYourFriends");
|
|
43
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
34
|
+
var _QRCodeCard = require("./sections/qrcode/QRCodeCard");
|
|
35
|
+
var _addMeToYourFriends = require("./specialButtons/addMeToYourFriends");
|
|
44
36
|
async function loadExtendedProfile(store, subject) {
|
|
45
37
|
const otherProfiles = store.each(subject, _solidUi.ns.rdfs('seeAlso'), null, subject.doc());
|
|
46
38
|
if (otherProfiles.length > 0) {
|
|
47
39
|
await store.fetcher.load(otherProfiles);
|
|
48
40
|
}
|
|
49
41
|
}
|
|
42
|
+
const HEADING_SECTION_SELECTOR = '[data-profile-section="heading"]';
|
|
43
|
+
const SOCIAL_SECTION_SELECTOR = '[data-profile-section="social"]';
|
|
44
|
+
function syncSocialSectionHeight(root) {
|
|
45
|
+
let animationFrameId = 0;
|
|
46
|
+
const updateHeight = () => {
|
|
47
|
+
animationFrameId = 0;
|
|
48
|
+
const grid = root.querySelector('.profile-grid');
|
|
49
|
+
const headingSection = root.querySelector(HEADING_SECTION_SELECTOR);
|
|
50
|
+
const socialSection = root.querySelector(SOCIAL_SECTION_SELECTOR);
|
|
51
|
+
if (!grid || !headingSection || !socialSection) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const isDesktopGrid = root.dataset.layout !== 'mobile' && getComputedStyle(grid).display === 'grid';
|
|
55
|
+
if (!isDesktopGrid) {
|
|
56
|
+
socialSection.style.removeProperty('min-height');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const nextMinHeight = `${Math.ceil(headingSection.getBoundingClientRect().height)}px`;
|
|
60
|
+
if (socialSection.style.minHeight !== nextMinHeight) {
|
|
61
|
+
socialSection.style.minHeight = nextMinHeight;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const scheduleUpdate = () => {
|
|
65
|
+
if (animationFrameId !== 0) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
animationFrameId = window.requestAnimationFrame(updateHeight);
|
|
69
|
+
};
|
|
70
|
+
updateHeight();
|
|
71
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
72
|
+
window.addEventListener('resize', scheduleUpdate);
|
|
73
|
+
return () => {
|
|
74
|
+
if (animationFrameId !== 0) {
|
|
75
|
+
window.cancelAnimationFrame(animationFrameId);
|
|
76
|
+
}
|
|
77
|
+
window.removeEventListener('resize', scheduleUpdate);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
81
|
+
resizeObserver.observe(root);
|
|
82
|
+
const headingSection = root.querySelector(HEADING_SECTION_SELECTOR);
|
|
83
|
+
const socialSection = root.querySelector(SOCIAL_SECTION_SELECTOR);
|
|
84
|
+
if (headingSection) {
|
|
85
|
+
resizeObserver.observe(headingSection);
|
|
86
|
+
}
|
|
87
|
+
if (socialSection) {
|
|
88
|
+
resizeObserver.observe(socialSection);
|
|
89
|
+
}
|
|
90
|
+
return () => {
|
|
91
|
+
if (animationFrameId !== 0) {
|
|
92
|
+
window.cancelAnimationFrame(animationFrameId);
|
|
93
|
+
}
|
|
94
|
+
resizeObserver.disconnect();
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function applyEnvironmentAttributes(element, context) {
|
|
98
|
+
const layout = context.environment?.layout ?? 'desktop';
|
|
99
|
+
const theme = context.environment?.theme ?? 'light';
|
|
100
|
+
const inputMode = context.environment?.inputMode ?? 'pointer';
|
|
101
|
+
element.classList.add('profile-pane-host');
|
|
102
|
+
element.dataset.layout = layout;
|
|
103
|
+
element.dataset.theme = theme;
|
|
104
|
+
element.dataset.inputMode = inputMode;
|
|
105
|
+
}
|
|
50
106
|
const Pane = {
|
|
51
107
|
global: false,
|
|
52
108
|
icon: _solidUi.icons.iconBase + 'noun_15059.svg',
|
|
@@ -61,36 +117,14 @@ const Pane = {
|
|
|
61
117
|
render: (subject, context) => {
|
|
62
118
|
const target = context.dom.createElement('div');
|
|
63
119
|
const store = context.session.store;
|
|
120
|
+
let cleanupSocialSectionHeightSync = null;
|
|
121
|
+
applyEnvironmentAttributes(target, context);
|
|
64
122
|
const renderWithData = async () => {
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (!value) return console.error('QRCode data-value missing');
|
|
71
|
-
const options = {
|
|
72
|
-
type: 'svg',
|
|
73
|
-
color: {
|
|
74
|
-
dark: '#000000',
|
|
75
|
-
light: '#ffffff'
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
qrcode.toString(value, options, function (error, svg) {
|
|
79
|
-
if (error) {
|
|
80
|
-
console.error('QRcode error!', error);
|
|
81
|
-
} else {
|
|
82
|
-
const imageContainer = QRCodeElement.querySelector('div[role="img"]');
|
|
83
|
-
if (!imageContainer) {
|
|
84
|
-
console.error('QRCode image container missing');
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
imageContainer.innerHTML = svg;
|
|
88
|
-
imageContainer.style.width = '100%';
|
|
89
|
-
imageContainer.style.height = '100%';
|
|
90
|
-
imageContainer.style.margin = '0';
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}
|
|
123
|
+
applyEnvironmentAttributes(target, context);
|
|
124
|
+
(0, _litHtml.render)(await (0, _ProfileView.ProfileView)(subject, context, renderWithData), target);
|
|
125
|
+
cleanupSocialSectionHeightSync?.();
|
|
126
|
+
cleanupSocialSectionHeightSync = syncSocialSectionHeight(target);
|
|
127
|
+
await (0, _QRCodeCard.hydrateQRCodes)(target);
|
|
94
128
|
};
|
|
95
129
|
loadExtendedProfile(store, subject).then(async () => {
|
|
96
130
|
await renderWithData();
|