profile-pane 3.1.5 → 3.2.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 +16 -0
- package/lib/04567ff683933c35c465.png +0 -0
- package/lib/10163fd9b5a0e00d63a0.png +0 -0
- package/lib/1234dcb2eec2e45f252b.png +0 -0
- package/lib/20899934157df4db56cb.png +0 -0
- package/lib/33760bf79f097f449da5.png +0 -0
- package/lib/578d2b6ed32e7624164e.png +0 -0
- package/lib/5f62a5b2b7e99b9640c7.png +0 -0
- package/lib/6525766ecd288ec60129.png +0 -0
- package/lib/7800be6f6c4b5b0f4f20.png +0 -0
- package/lib/976473cf5fe24d657d4b.png +0 -0
- package/lib/ChatWithMe.d.ts +2 -1
- package/lib/ChatWithMe.d.ts.map +1 -1
- package/lib/ChatWithMe.js +3 -3
- package/lib/ProfileView.d.ts +1 -1
- package/lib/ProfileView.d.ts.map +1 -1
- package/lib/ProfileView.js +71 -131
- package/lib/ProfileViewModelPresenter.d.ts +23 -0
- package/lib/ProfileViewModelPresenter.d.ts.map +1 -0
- package/lib/ProfileViewModelPresenter.js +37 -0
- package/lib/QRCodeCard.d.ts +3 -1
- package/lib/QRCodeCard.d.ts.map +1 -1
- package/lib/QRCodeCard.js +86 -66
- package/lib/addMeToYourFriends.d.ts +3 -3
- package/lib/addMeToYourFriends.d.ts.map +1 -1
- package/lib/addMeToYourFriends.js +14 -30
- package/lib/bda84f59e7216675a208.png +0 -0
- package/lib/buttonsHelper.js +1 -1
- package/lib/cd68e8f3990ba8b2139e.png +0 -0
- package/lib/e7074a7e2cb69e51cfd3.png +0 -0
- package/lib/editProfilePane/EditCVCard.d.ts +1 -0
- package/lib/editProfilePane/EditCVCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCVCard.js +2 -1
- package/lib/editProfilePane/EditCommunitiesCard.d.ts +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.js +2 -1
- package/lib/editProfilePane/EditContactsCard.d.ts +1 -0
- package/lib/editProfilePane/EditContactsCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditContactsCard.js +2 -0
- package/lib/editProfilePane/EditFriendsCard.d.ts +1 -1
- package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditFriendsCard.js +2 -1
- package/lib/editProfilePane/EditOtherPreferences.d.ts +1 -0
- package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -1
- package/lib/editProfilePane/EditOtherPreferences.js +1 -0
- package/lib/editProfilePane/EditProfileView.d.ts +1 -1
- package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
- package/lib/editProfilePane/EditProfileView.js +1 -1
- package/lib/editProfilePane/EditSocialCard.d.ts +1 -0
- package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditSocialCard.js +2 -1
- package/lib/editProfilePane/editProfilePresenter.d.ts +1 -0
- package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
- package/lib/editProfilePane/editProfilePresenter.js +2 -0
- package/lib/f3772696fb7ee53c23d8.png +0 -0
- package/lib/icons-svg/contactIcons.d.ts +3 -0
- package/lib/icons-svg/contactIcons.d.ts.map +1 -0
- package/lib/icons-svg/contactIcons.js +32 -0
- package/lib/icons-svg/profileIcons.d.ts +22 -0
- package/lib/icons-svg/profileIcons.d.ts.map +1 -0
- package/lib/icons-svg/profileIcons.js +309 -0
- package/lib/index.d.ts +1 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +42 -19
- package/lib/profile-pane.js +15629 -5670
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +2171 -230
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/rdfFormsHelper.d.ts +1 -0
- package/lib/rdfFormsHelper.d.ts.map +1 -1
- package/lib/rdfFormsHelper.js +2 -0
- package/lib/sections/bio/BioEditDialog.d.ts +6 -0
- package/lib/sections/bio/BioEditDialog.d.ts.map +1 -0
- package/lib/sections/bio/BioEditDialog.js +119 -0
- package/lib/sections/bio/BioSection.d.ts +7 -0
- package/lib/sections/bio/BioSection.d.ts.map +1 -0
- package/lib/sections/bio/BioSection.js +131 -0
- package/lib/sections/bio/mutations.d.ts +4 -0
- package/lib/sections/bio/mutations.d.ts.map +1 -0
- package/lib/sections/bio/mutations.js +43 -0
- package/lib/sections/bio/selectors.d.ts +4 -0
- package/lib/sections/bio/selectors.d.ts.map +1 -0
- package/lib/sections/bio/selectors.js +15 -0
- package/lib/sections/bio/types.d.ts +15 -0
- package/lib/sections/bio/types.d.ts.map +1 -0
- package/lib/sections/bio/types.js +5 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +7 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.js +658 -0
- package/lib/sections/contactInfo/ContactInfoSection.d.ts +5 -0
- package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -0
- package/lib/sections/contactInfo/ContactInfoSection.js +229 -0
- package/lib/sections/contactInfo/mutations.d.ts +4 -0
- package/lib/sections/contactInfo/mutations.d.ts.map +1 -0
- package/lib/sections/contactInfo/mutations.js +150 -0
- package/lib/sections/contactInfo/selectors.d.ts +4 -0
- package/lib/sections/contactInfo/selectors.d.ts.map +1 -0
- package/lib/sections/contactInfo/selectors.js +104 -0
- package/lib/sections/contactInfo/types.d.ts +44 -0
- package/lib/sections/contactInfo/types.d.ts.map +1 -0
- package/lib/sections/contactInfo/types.js +5 -0
- package/lib/sections/education/EducationEditDialog.d.ts +7 -0
- package/lib/sections/education/EducationEditDialog.d.ts.map +1 -0
- package/lib/sections/education/EducationEditDialog.js +459 -0
- package/lib/sections/education/EducationSection.d.ts +7 -0
- package/lib/sections/education/EducationSection.d.ts.map +1 -0
- package/lib/sections/education/EducationSection.js +126 -0
- package/lib/sections/education/mutations.d.ts +4 -0
- package/lib/sections/education/mutations.d.ts.map +1 -0
- package/lib/sections/education/mutations.js +60 -0
- package/lib/sections/education/selectors.d.ts +4 -0
- package/lib/sections/education/selectors.d.ts.map +1 -0
- package/lib/sections/education/selectors.js +64 -0
- package/lib/sections/education/types.d.ts +20 -0
- package/lib/sections/education/types.d.ts.map +1 -0
- package/lib/sections/education/types.js +5 -0
- package/lib/sections/heading/HeadingEditDialog.d.ts +6 -0
- package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -0
- package/lib/sections/heading/HeadingEditDialog.js +742 -0
- package/lib/sections/heading/HeadingSection.d.ts +9 -0
- package/lib/sections/heading/HeadingSection.d.ts.map +1 -0
- package/lib/sections/heading/HeadingSection.js +97 -0
- package/lib/sections/heading/camera.d.ts +19 -0
- package/lib/sections/heading/camera.d.ts.map +1 -0
- package/lib/sections/heading/camera.js +199 -0
- package/lib/sections/heading/dateHelpers.d.ts +4 -0
- package/lib/sections/heading/dateHelpers.d.ts.map +1 -0
- package/lib/sections/heading/dateHelpers.js +48 -0
- package/lib/sections/heading/imageHelpers.d.ts +4 -0
- package/lib/sections/heading/imageHelpers.d.ts.map +1 -0
- package/lib/sections/heading/imageHelpers.js +81 -0
- package/lib/sections/heading/mutations.d.ts +4 -0
- package/lib/sections/heading/mutations.d.ts.map +1 -0
- package/lib/sections/heading/mutations.js +190 -0
- package/lib/sections/heading/selectors.d.ts +5 -0
- package/lib/sections/heading/selectors.d.ts.map +1 -0
- package/lib/sections/heading/selectors.js +157 -0
- package/lib/sections/heading/types.d.ts +36 -0
- package/lib/sections/heading/types.d.ts.map +1 -0
- package/lib/sections/heading/types.js +5 -0
- package/lib/sections/languages/LanguageEditDialog.d.ts +7 -0
- package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -0
- package/lib/sections/languages/LanguageEditDialog.js +457 -0
- package/lib/sections/languages/LanguageSection.d.ts +5 -0
- package/lib/sections/languages/LanguageSection.d.ts.map +1 -0
- package/lib/sections/languages/LanguageSection.js +137 -0
- package/lib/sections/languages/mutations.d.ts +6 -0
- package/lib/sections/languages/mutations.d.ts.map +1 -0
- package/lib/sections/languages/mutations.js +296 -0
- package/lib/sections/languages/selectors.d.ts +5 -0
- package/lib/sections/languages/selectors.d.ts.map +1 -0
- package/lib/sections/languages/selectors.js +146 -0
- package/lib/sections/languages/types.d.ts +15 -0
- package/lib/sections/languages/types.d.ts.map +1 -0
- package/lib/sections/languages/types.js +5 -0
- package/lib/sections/projects/ProjectEditDialog.d.ts +7 -0
- package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -0
- package/lib/sections/projects/ProjectEditDialog.js +182 -0
- package/lib/sections/projects/ProjectSection.d.ts +6 -0
- package/lib/sections/projects/ProjectSection.d.ts.map +1 -0
- package/lib/sections/projects/ProjectSection.js +220 -0
- package/lib/sections/projects/mutations.d.ts +4 -0
- package/lib/sections/projects/mutations.d.ts.map +1 -0
- package/lib/sections/projects/mutations.js +188 -0
- package/lib/sections/projects/selectors.d.ts +5 -0
- package/lib/sections/projects/selectors.d.ts.map +1 -0
- package/lib/sections/projects/selectors.js +163 -0
- package/lib/sections/projects/types.d.ts +28 -0
- package/lib/sections/projects/types.d.ts.map +1 -0
- package/lib/sections/projects/types.js +8 -0
- package/lib/sections/resume/ResumeEditDialog.d.ts +7 -0
- package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -0
- package/lib/sections/resume/ResumeEditDialog.js +629 -0
- package/lib/sections/resume/ResumeSection.d.ts +7 -0
- package/lib/sections/resume/ResumeSection.d.ts.map +1 -0
- package/lib/sections/resume/ResumeSection.js +160 -0
- package/lib/sections/resume/mutations.d.ts +6 -0
- package/lib/sections/resume/mutations.d.ts.map +1 -0
- package/lib/sections/resume/mutations.js +172 -0
- package/lib/sections/resume/selectors.d.ts +4 -0
- package/lib/sections/resume/selectors.d.ts.map +1 -0
- package/lib/sections/resume/selectors.js +142 -0
- package/lib/sections/resume/types.d.ts +33 -0
- package/lib/sections/resume/types.d.ts.map +1 -0
- package/lib/sections/resume/types.js +8 -0
- package/lib/sections/shared/collapsibleSection.d.ts +2 -0
- package/lib/sections/shared/collapsibleSection.d.ts.map +1 -0
- package/lib/sections/shared/collapsibleSection.js +24 -0
- package/lib/sections/shared/contactTypeUtils.d.ts +7 -0
- package/lib/sections/shared/contactTypeUtils.d.ts.map +1 -0
- package/lib/sections/shared/contactTypeUtils.js +48 -0
- package/lib/sections/shared/idNodeFactory.d.ts +3 -0
- package/lib/sections/shared/idNodeFactory.d.ts.map +1 -0
- package/lib/sections/shared/idNodeFactory.js +14 -0
- package/lib/sections/shared/phoneCountries.d.ts +20 -0
- package/lib/sections/shared/phoneCountries.d.ts.map +1 -0
- package/lib/sections/shared/phoneCountries.js +1080 -0
- package/lib/sections/shared/rdfList.d.ts +3 -0
- package/lib/sections/shared/rdfList.d.ts.map +1 -0
- package/lib/sections/shared/rdfList.js +34 -0
- package/lib/sections/shared/rdfMutationHelpers.d.ts +12 -0
- package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
- package/lib/sections/shared/rdfMutationHelpers.js +82 -0
- package/lib/sections/shared/rowState.d.ts +21 -0
- package/lib/sections/shared/rowState.d.ts.map +1 -0
- package/lib/sections/shared/rowState.js +52 -0
- package/lib/sections/shared/sanitizeUtils.d.ts +5 -0
- package/lib/sections/shared/sanitizeUtils.d.ts.map +1 -0
- package/lib/sections/shared/sanitizeUtils.js +22 -0
- package/lib/sections/shared/sectionCardHelpers.d.ts +11 -0
- package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -0
- package/lib/sections/shared/sectionCardHelpers.js +105 -0
- package/lib/sections/shared/types.d.ts +7 -0
- package/lib/sections/shared/types.d.ts.map +1 -0
- package/lib/sections/shared/types.js +5 -0
- package/lib/sections/skills/SkillsEditDialog.d.ts +7 -0
- package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -0
- package/lib/sections/skills/SkillsEditDialog.js +340 -0
- package/lib/sections/skills/SkillsSection.d.ts +5 -0
- package/lib/sections/skills/SkillsSection.d.ts.map +1 -0
- package/lib/sections/skills/SkillsSection.js +169 -0
- package/lib/sections/skills/mutations.d.ts +6 -0
- package/lib/sections/skills/mutations.d.ts.map +1 -0
- package/lib/sections/skills/mutations.js +110 -0
- package/lib/sections/skills/selectors.d.ts +6 -0
- package/lib/sections/skills/selectors.d.ts.map +1 -0
- package/lib/sections/skills/selectors.js +37 -0
- package/lib/sections/skills/types.d.ts +14 -0
- package/lib/sections/skills/types.d.ts.map +1 -0
- package/lib/sections/skills/types.js +5 -0
- package/lib/sections/social/SocialEditDialog.d.ts +7 -0
- package/lib/sections/social/SocialEditDialog.d.ts.map +1 -0
- package/lib/sections/social/SocialEditDialog.js +362 -0
- package/lib/sections/social/SocialSection.d.ts +8 -0
- package/lib/sections/social/SocialSection.d.ts.map +1 -0
- package/lib/sections/social/SocialSection.js +201 -0
- package/lib/sections/social/constants.d.ts +3 -0
- package/lib/sections/social/constants.d.ts.map +1 -0
- package/lib/sections/social/constants.js +16 -0
- package/lib/sections/social/helpers.d.ts +15 -0
- package/lib/sections/social/helpers.d.ts.map +1 -0
- package/lib/sections/social/helpers.js +316 -0
- package/lib/sections/social/mutations.d.ts +4 -0
- package/lib/sections/social/mutations.d.ts.map +1 -0
- package/lib/sections/social/mutations.js +298 -0
- package/lib/sections/social/selectors.d.ts +4 -0
- package/lib/sections/social/selectors.d.ts.map +1 -0
- package/lib/sections/social/selectors.js +43 -0
- package/lib/sections/social/types.d.ts +19 -0
- package/lib/sections/social/types.d.ts.map +1 -0
- package/lib/sections/social/types.js +5 -0
- package/lib/styles/BioSection.css +77 -0
- package/lib/styles/CVCard.css +107 -2
- package/lib/styles/ContactInfoEditDialog.css +153 -0
- package/lib/styles/EditDialogs.css +1028 -0
- package/lib/styles/EducationCard.css +103 -0
- package/lib/styles/HeadingSection.css +309 -0
- package/lib/styles/ProfileCard.css +10 -42
- package/lib/styles/ProfileView.css +53 -8
- package/lib/styles/ProjectsCard.css +206 -0
- package/lib/styles/QRCodeCard.css +29 -10
- package/lib/styles/SocialCard.css +41 -13
- package/lib/styles/dialog.css +209 -0
- package/lib/styles/utilities.css +638 -256
- package/lib/textUtils.d.ts +6 -0
- package/lib/textUtils.d.ts.map +1 -0
- package/lib/textUtils.js +44 -0
- package/lib/texts.d.ts +45 -4
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +46 -5
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +5 -0
- package/lib/ui/dialog.d.ts +29 -0
- package/lib/ui/dialog.d.ts.map +1 -0
- package/lib/ui/dialog.js +269 -0
- package/lib/ui/errors.d.ts +2 -0
- package/lib/ui/errors.d.ts.map +1 -0
- package/lib/ui/errors.js +10 -0
- package/package.json +6 -4
- package/lib/CVCard.d.ts +0 -4
- package/lib/CVCard.d.ts.map +0 -1
- package/lib/CVCard.js +0 -114
- package/lib/CVPresenter.d.ts +0 -25
- package/lib/CVPresenter.d.ts.map +0 -1
- package/lib/CVPresenter.js +0 -119
- package/lib/FriendList.d.ts +0 -6
- package/lib/FriendList.d.ts.map +0 -1
- package/lib/FriendList.js +0 -27
- package/lib/ProfileCard.d.ts +0 -6
- package/lib/ProfileCard.d.ts.map +0 -1
- package/lib/ProfileCard.js +0 -62
- package/lib/SocialCard.d.ts +0 -5
- package/lib/SocialCard.d.ts.map +0 -1
- package/lib/SocialCard.js +0 -51
- package/lib/SocialPresenter.d.ts +0 -11
- package/lib/SocialPresenter.d.ts.map +0 -1
- package/lib/SocialPresenter.js +0 -117
- package/lib/StuffCard.d.ts +0 -10
- package/lib/StuffCard.d.ts.map +0 -1
- package/lib/StuffCard.js +0 -52
- package/lib/StuffPresenter.d.ts +0 -14
- package/lib/StuffPresenter.d.ts.map +0 -1
- package/lib/StuffPresenter.js +0 -53
- package/lib/presenter.d.ts +0 -14
- package/lib/presenter.d.ts.map +0 -1
- package/lib/presenter.js +0 -68
- package/lib/styles/FriendList.css +0 -12
- package/lib/styles/StuffCard.css +0 -23
- package/lib/styles/editProfile.css +0 -62
- package/lib/styles/profileRDFFormsEnforced.css +0 -431
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CVCard = void 0;
|
|
7
|
+
exports.renderCVSection = renderCVSection;
|
|
8
|
+
var _litHtml = require("lit-html");
|
|
9
|
+
require("../../styles/CVCard.css");
|
|
10
|
+
var _texts = require("../../texts");
|
|
11
|
+
var _ResumeEditDialog = require("./ResumeEditDialog");
|
|
12
|
+
var _sectionCardHelpers = require("../shared/sectionCardHelpers");
|
|
13
|
+
var _collapsibleSection = require("../shared/collapsibleSection");
|
|
14
|
+
var _profileIcons = require("../../icons-svg/profileIcons");
|
|
15
|
+
function renderRole(role, index) {
|
|
16
|
+
if (!role) return (0, _litHtml.html)``;
|
|
17
|
+
const roleTitleId = `cv-role-title-${index}`;
|
|
18
|
+
const rolePeriodId = `cv-role-period-${index}`;
|
|
19
|
+
const roleOrgId = `cv-role-org-${index}`;
|
|
20
|
+
const roleDescriptionId = `cv-role-description-${index}`;
|
|
21
|
+
const ariaDescribedBy = role.description ? `${rolePeriodId} ${roleOrgId} ${roleDescriptionId}` : `${rolePeriodId} ${roleOrgId}`;
|
|
22
|
+
return (0, _litHtml.html)`
|
|
23
|
+
<li class="cvRole" role="listitem" aria-labelledby=${roleTitleId} aria-describedby=${ariaDescribedBy}>
|
|
24
|
+
<div class="cvRoleHeader">
|
|
25
|
+
<h4 id=${roleTitleId}>${role.title}</h4>
|
|
26
|
+
<p id=${rolePeriodId} class="cvRolePeriod">
|
|
27
|
+
<time datetime=${(0, _sectionCardHelpers.toMonthDateTime)(role.startDate)}>${(0, _sectionCardHelpers.formatMonthYear)(role.startDate)}</time>
|
|
28
|
+
<span aria-hidden="true"> to </span>
|
|
29
|
+
${role.endDate ? (0, _litHtml.html)`<time datetime=${(0, _sectionCardHelpers.toMonthDateTime)(role.endDate)}>${(0, _sectionCardHelpers.formatMonthYear)(role.endDate)}</time>` : (0, _litHtml.html)`<span>Present</span>`}
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
<p class="cvOrg" id=${roleOrgId}>
|
|
33
|
+
<strong>${role.orgName}</strong>${role.orgLocation ? (0, _litHtml.html)` | ${role.orgLocation}` : ''}
|
|
34
|
+
</p>
|
|
35
|
+
${role.description ? (0, _litHtml.html)`
|
|
36
|
+
<div class="cvDescriptionWrap">
|
|
37
|
+
<p class="cvDescriptionText" id=${roleDescriptionId}>${role.description}</p>
|
|
38
|
+
<button
|
|
39
|
+
type="button"
|
|
40
|
+
class="cvDescriptionToggle"
|
|
41
|
+
aria-controls=${roleDescriptionId}
|
|
42
|
+
aria-expanded="false"
|
|
43
|
+
hidden
|
|
44
|
+
@click=${_sectionCardHelpers.toggleDescription}
|
|
45
|
+
>
|
|
46
|
+
...more
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
` : ''}
|
|
50
|
+
</li>
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
function renderRoles(roles) {
|
|
54
|
+
if (!roles || !roles.length) return (0, _litHtml.html)``;
|
|
55
|
+
return (0, _litHtml.html)`${roles.map((role, index) => renderRole(role, index))}`;
|
|
56
|
+
}
|
|
57
|
+
const CVCard = (cvData, viewerMode) => {
|
|
58
|
+
void viewerMode;
|
|
59
|
+
const hasRoles = Array.isArray(cvData) && cvData.length > 0;
|
|
60
|
+
if (!hasRoles) return (0, _litHtml.html)``;
|
|
61
|
+
return (0, _litHtml.html)`
|
|
62
|
+
<article class="cvCard" aria-label="Resume" data-testid="curriculum-vitae">
|
|
63
|
+
<section class="cvSection">
|
|
64
|
+
<ul role="list" aria-label="Work experience in chronological order">
|
|
65
|
+
${renderRoles(cvData)}
|
|
66
|
+
</ul>
|
|
67
|
+
</section>
|
|
68
|
+
</article>
|
|
69
|
+
`;
|
|
70
|
+
};
|
|
71
|
+
exports.CVCard = CVCard;
|
|
72
|
+
function renderResumeSectionDefault(store, subject, resumeDetails, viewerMode, onSaved) {
|
|
73
|
+
(0, _sectionCardHelpers.scheduleDescriptionOverflowCheck)();
|
|
74
|
+
const hasResume = resumeDetails.length > 0;
|
|
75
|
+
const showSection = true;
|
|
76
|
+
const cv = hasResume ? CVCard(resumeDetails, viewerMode) : (0, _litHtml.html)``;
|
|
77
|
+
const isOwner = viewerMode === 'owner';
|
|
78
|
+
return showSection ? (0, _litHtml.html)`
|
|
79
|
+
<section
|
|
80
|
+
aria-labelledby="cv-heading"
|
|
81
|
+
class="profile__section border-lighter profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
|
|
82
|
+
role="region"
|
|
83
|
+
tabindex="-1"
|
|
84
|
+
data-expanded="false"
|
|
85
|
+
>
|
|
86
|
+
<header class="profile__section-header profile-section-collapsible__header">
|
|
87
|
+
<h2 id="cv-heading" tabindex="-1">${_texts.resumeHeadingText}</h2>
|
|
88
|
+
<div class="profile-section-collapsible__actions flex-column">
|
|
89
|
+
${isOwner ? (0, _litHtml.html)`
|
|
90
|
+
<button
|
|
91
|
+
type="button"
|
|
92
|
+
class="profile__action-button profile-action-text flex-center profile-section-collapsible__edit-button"
|
|
93
|
+
aria-label="Edit resume details"
|
|
94
|
+
@click=${event => (0, _ResumeEditDialog.createResumeEditDialog)(event, store, subject, resumeDetails, viewerMode, onSaved)}
|
|
95
|
+
>
|
|
96
|
+
<span class="profile-section-collapsible__edit-label">${_profileIcons.editIcon} Edit</span>
|
|
97
|
+
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
98
|
+
</button>
|
|
99
|
+
` : (0, _litHtml.html)``}
|
|
100
|
+
<button
|
|
101
|
+
type="button"
|
|
102
|
+
class="inline-flex-row"
|
|
103
|
+
aria-label="Toggle resume section"
|
|
104
|
+
aria-controls="cv-panel"
|
|
105
|
+
aria-expanded="false"
|
|
106
|
+
@click=${_collapsibleSection.toggleCollapsibleSection}
|
|
107
|
+
>
|
|
108
|
+
<span class="profile-section-collapsible__chevron" aria-hidden="true">⌄</span>
|
|
109
|
+
</button>
|
|
110
|
+
</div>
|
|
111
|
+
</header>
|
|
112
|
+
<div id="cv-panel" class="profile-section-collapsible__content" aria-hidden="true">
|
|
113
|
+
${hasResume ? cv : (0, _litHtml.html)`<p>No resume details added yet.</p>`}
|
|
114
|
+
</div>
|
|
115
|
+
</section>
|
|
116
|
+
` : '';
|
|
117
|
+
}
|
|
118
|
+
function renderOwnerEmptyResumeContent(store, subject, resumeDetails, viewerMode, onSaved) {
|
|
119
|
+
return (0, _litHtml.html)`
|
|
120
|
+
<div class="profile__empty-state-content flex-column-center" role="group" aria-label="Empty resume section">
|
|
121
|
+
<h2 id="resume-heading" tabindex="-1">${_texts.resumeHeadingText}</h2>
|
|
122
|
+
<p class="profile__empty-state-message">
|
|
123
|
+
You haven't included any professional experience yet. Consider adding your work history to enhance your resume.
|
|
124
|
+
</p>
|
|
125
|
+
</div>
|
|
126
|
+
<button
|
|
127
|
+
type="button"
|
|
128
|
+
class="profile__action-button--empty"
|
|
129
|
+
aria-label="Add resume details"
|
|
130
|
+
@click=${event => {
|
|
131
|
+
return (0, _ResumeEditDialog.createResumeEditDialog)(event, store, subject, resumeDetails, viewerMode, onSaved);
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<span class="profile__action-icon" aria-hidden="true">${_profileIcons.plusDarkIcon} Add Resume</span>
|
|
135
|
+
</button>
|
|
136
|
+
|
|
137
|
+
`;
|
|
138
|
+
}
|
|
139
|
+
function renderOwnerEmptyResumeSection(store, subject, resumeDetails, viewerMode, onSaved) {
|
|
140
|
+
return (0, _litHtml.html)`
|
|
141
|
+
<section
|
|
142
|
+
aria-labelledby="resume-heading"
|
|
143
|
+
data-profile-section="resume"
|
|
144
|
+
class="profile__section--empty border-lighter flex-column-center rounded-md gap-lg"
|
|
145
|
+
role="region"
|
|
146
|
+
tabindex="-1"
|
|
147
|
+
>
|
|
148
|
+
${renderOwnerEmptyResumeContent(store, subject, resumeDetails, viewerMode, onSaved)}
|
|
149
|
+
</section>
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
function renderCVSection(store, subject, roles, viewerMode, onSaved) {
|
|
153
|
+
const resumeDetails = roles || [];
|
|
154
|
+
const hasResume = resumeDetails.length > 0;
|
|
155
|
+
const showOwnerEmptyResume = !hasResume && viewerMode === 'owner';
|
|
156
|
+
const showSection = true;
|
|
157
|
+
return showSection ? (0, _litHtml.html)`
|
|
158
|
+
${showOwnerEmptyResume ? renderOwnerEmptyResumeSection(store, subject, resumeDetails, viewerMode, onSaved) : renderResumeSectionDefault(store, subject, resumeDetails, viewerMode, onSaved)}
|
|
159
|
+
` : '';
|
|
160
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LiveStore, NamedNode } from 'rdflib';
|
|
2
|
+
import { ResumeRow } from './types';
|
|
3
|
+
import { MutationOps } from '../shared/types';
|
|
4
|
+
export type ResumeMutationPlan = MutationOps<ResumeRow>;
|
|
5
|
+
export declare function processResumeMutations(store: LiveStore, subject: NamedNode, mutationPlan: ResumeMutationPlan): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/resume/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0B,MAAM,QAAQ,CAAA;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAkM7C,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAA;AAEvD,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,iBAQlH"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.processResumeMutations = processResumeMutations;
|
|
7
|
+
var _rdflib = require("rdflib");
|
|
8
|
+
var _solidUi = require("solid-ui");
|
|
9
|
+
var _rdfMutationHelpers = require("../shared/rdfMutationHelpers");
|
|
10
|
+
var _idNodeFactory = require("../shared/idNodeFactory");
|
|
11
|
+
var _texts = require("../../texts");
|
|
12
|
+
function asXsdDateLiteral(dateLike) {
|
|
13
|
+
const value = (dateLike?.value || '').trim();
|
|
14
|
+
if (!value) return null;
|
|
15
|
+
const dateOnly = value.slice(0, 10);
|
|
16
|
+
return (0, _rdflib.literal)(dateOnly, _solidUi.ns.xsd('date'));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* The following helper was generated by AI Model: GPT-5.3-Codex. */
|
|
20
|
+
/* Prompt: write me a function to determine PastRole, CurrentRole, or FutureRole based on resume role date data.
|
|
21
|
+
The function should return a NamedNode with the correct solid namespace and role type local name.
|
|
22
|
+
The function should use the roleType field if it is set to one of those three values,
|
|
23
|
+
otherwise it should infer the role type based on the start and end dates and isCurrentRole field. */
|
|
24
|
+
function membershipTypeForRole(resumeData) {
|
|
25
|
+
const normalizedRoleType = (resumeData.roleType || '').trim();
|
|
26
|
+
if (normalizedRoleType === 'PastRole' || normalizedRoleType === 'CurrentRole' || normalizedRoleType === 'FutureRole') {
|
|
27
|
+
return _solidUi.ns.solid(normalizedRoleType);
|
|
28
|
+
}
|
|
29
|
+
if (resumeData.isCurrentRole) return _solidUi.ns.solid('CurrentRole');
|
|
30
|
+
const todayIso = new Date().toISOString().slice(0, 10);
|
|
31
|
+
const startIso = resumeData.startDate?.value?.slice(0, 10) || '';
|
|
32
|
+
const endIso = resumeData.endDate?.value?.slice(0, 10) || '';
|
|
33
|
+
if (startIso && startIso > todayIso) return _solidUi.ns.solid('FutureRole');
|
|
34
|
+
if (endIso && endIso < todayIso) return _solidUi.ns.solid('PastRole');
|
|
35
|
+
return _solidUi.ns.solid('FutureRole');
|
|
36
|
+
}
|
|
37
|
+
function roleTypeNode(orgType) {
|
|
38
|
+
const text = (orgType || '').trim();
|
|
39
|
+
if (!text) return null;
|
|
40
|
+
|
|
41
|
+
// These are membership role classes, not organization classes.
|
|
42
|
+
if (text === 'PastRole' || text === 'CurrentRole' || text === 'FutureRole') {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
if (text.startsWith('http://') || text.startsWith('https://')) {
|
|
46
|
+
const local = text.split(/[#/]/).pop();
|
|
47
|
+
if (local === 'PastRole' || local === 'CurrentRole' || local === 'FutureRole') {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return (0, _rdflib.sym)(text);
|
|
51
|
+
}
|
|
52
|
+
const prefixed = text.match(/^([a-zA-Z][\w-]*):(.*)$/);
|
|
53
|
+
if (prefixed) {
|
|
54
|
+
const prefix = prefixed[1].toLowerCase();
|
|
55
|
+
const local = prefixed[2].trim();
|
|
56
|
+
if (!local) return null;
|
|
57
|
+
if (local === 'PastRole' || local === 'CurrentRole' || local === 'FutureRole') {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
/* Organization types vary need to return the correct namespace */
|
|
61
|
+
if (prefix === 'schema') return _solidUi.ns.schema(local);
|
|
62
|
+
if (prefix === 'vcard') return _solidUi.ns.vcard(local);
|
|
63
|
+
if (prefix === 'solid') return _solidUi.ns.solid(local);
|
|
64
|
+
if (prefix === 'org') return _solidUi.ns.org(local);
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// For plain values like "Corporation", map to schema:Corporation.
|
|
69
|
+
return _solidUi.ns.schema(text);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* The following helper was generated by AI Model: GPT-5.3-Codex.
|
|
73
|
+
Prompt: 'do you see anything I can do differently in the mutation code so that it's not so verbose and possible reusable accross sections' */
|
|
74
|
+
function buildOrganizationStatements(doc, membershipNode, resumeData) {
|
|
75
|
+
if (!resumeData.orgName && !resumeData.orgType && !resumeData.orgLocation && !resumeData.orgHomePage) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
const organizationNode = (0, _idNodeFactory.createIdNode)(doc);
|
|
79
|
+
const inserts = [(0, _rdflib.st)(membershipNode, _solidUi.ns.org('organization'), organizationNode, doc)];
|
|
80
|
+
const organizationClassNode = roleTypeNode(resumeData.orgType || '');
|
|
81
|
+
if (organizationClassNode) {
|
|
82
|
+
inserts.push((0, _rdflib.st)(organizationNode, _solidUi.ns.rdf('type'), organizationClassNode, doc));
|
|
83
|
+
}
|
|
84
|
+
inserts.push((0, _rdflib.st)(organizationNode, _solidUi.ns.rdf('type'), _solidUi.ns.vcard('Organization'), doc));
|
|
85
|
+
if (resumeData.orgName) {
|
|
86
|
+
inserts.push((0, _rdflib.st)(organizationNode, _solidUi.ns.schema('name'), (0, _rdflib.literal)(resumeData.orgName), doc));
|
|
87
|
+
}
|
|
88
|
+
if (resumeData.orgLocation) {
|
|
89
|
+
inserts.push((0, _rdflib.st)(organizationNode, _solidUi.ns.org('location'), (0, _rdflib.literal)(resumeData.orgLocation), doc));
|
|
90
|
+
}
|
|
91
|
+
if (resumeData.orgHomePage) {
|
|
92
|
+
inserts.push((0, _rdflib.st)(organizationNode, _solidUi.ns.schema('uri'), (0, _rdflib.literal)(resumeData.orgHomePage), doc));
|
|
93
|
+
}
|
|
94
|
+
return inserts;
|
|
95
|
+
}
|
|
96
|
+
function buildResumeStatements(subject, doc, node, resumeData, includeMembershipLink = true) {
|
|
97
|
+
const inserts = [];
|
|
98
|
+
if (includeMembershipLink) {
|
|
99
|
+
inserts.push((0, _rdflib.st)(node, _solidUi.ns.org('member'), subject, doc));
|
|
100
|
+
}
|
|
101
|
+
inserts.push((0, _rdflib.st)(node, _solidUi.ns.rdf('type'), membershipTypeForRole(resumeData), doc));
|
|
102
|
+
if (resumeData.title) {
|
|
103
|
+
inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('role'), (0, _rdflib.literal)(resumeData.title), doc));
|
|
104
|
+
}
|
|
105
|
+
if (resumeData.startDate) {
|
|
106
|
+
const startDateLiteral = asXsdDateLiteral(resumeData.startDate);
|
|
107
|
+
if (startDateLiteral) {
|
|
108
|
+
inserts.push((0, _rdflib.st)(node, _solidUi.ns.schema('startDate'), startDateLiteral, doc));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (resumeData.endDate && !resumeData.isCurrentRole) {
|
|
112
|
+
const endDateLiteral = asXsdDateLiteral(resumeData.endDate);
|
|
113
|
+
if (endDateLiteral) {
|
|
114
|
+
inserts.push((0, _rdflib.st)(node, _solidUi.ns.schema('endDate'), endDateLiteral, doc));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (resumeData.description) {
|
|
118
|
+
inserts.push((0, _rdflib.st)(node, _solidUi.ns.schema('description'), (0, _rdflib.literal)(resumeData.description), doc));
|
|
119
|
+
}
|
|
120
|
+
inserts.push(...buildOrganizationStatements(doc, node, resumeData));
|
|
121
|
+
return inserts;
|
|
122
|
+
}
|
|
123
|
+
async function mutateResumeEntries(store, subject, resumeOps) {
|
|
124
|
+
const doc = subject.doc();
|
|
125
|
+
const existingResumeNodes = store.each(null, _solidUi.ns.org('member'), subject, doc);
|
|
126
|
+
const deletions = [];
|
|
127
|
+
const insertions = [];
|
|
128
|
+
resumeOps.remove.forEach(resume => {
|
|
129
|
+
if (!resume.entryNode) return;
|
|
130
|
+
const existingNode = (0, _rdfMutationHelpers.findExistingNode)(existingResumeNodes, resume.entryNode);
|
|
131
|
+
if (existingNode) {
|
|
132
|
+
const linkedOrganizations = (0, _rdfMutationHelpers.collectLinkedNodeStatements)(store, existingNode, _solidUi.ns.org('organization'), doc);
|
|
133
|
+
deletions.push(...linkedOrganizations.linkedStatements);
|
|
134
|
+
deletions.push(...(0, _rdfMutationHelpers.collectNodeStatements)(store, existingNode, doc));
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
resumeOps.update.forEach(resume => {
|
|
138
|
+
if (!resume.entryNode) return;
|
|
139
|
+
const existingNode = (0, _rdfMutationHelpers.findExistingNode)(existingResumeNodes, resume.entryNode);
|
|
140
|
+
if (!existingNode) {
|
|
141
|
+
throw new Error(_texts.resumeUpdateEntryNotFoundErrorMessageText);
|
|
142
|
+
}
|
|
143
|
+
if (existingNode.termType === 'BlankNode') {
|
|
144
|
+
// Blank node labels are not always stable for remote updates; migrate to a named node.
|
|
145
|
+
const migratedNode = (0, _idNodeFactory.createIdNode)(doc);
|
|
146
|
+
insertions.push(...buildResumeStatements(subject, doc, migratedNode, resume, true));
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// For updates on existing named memberships, keep the membership link and replace only mutable fields.
|
|
151
|
+
;
|
|
152
|
+
[_solidUi.ns.rdf('type'), _solidUi.ns.vcard('role'), _solidUi.ns.schema('startDate'), _solidUi.ns.schema('endDate'), _solidUi.ns.schema('description')].forEach(predicate => {
|
|
153
|
+
(0, _rdfMutationHelpers.replacePredicateStatements)(store, existingNode, predicate, doc, deletions, insertions, null);
|
|
154
|
+
});
|
|
155
|
+
const linkedOrganizations = (0, _rdfMutationHelpers.collectLinkedNodeStatements)(store, existingNode, _solidUi.ns.org('organization'), doc);
|
|
156
|
+
deletions.push(...linkedOrganizations.linkedStatements);
|
|
157
|
+
deletions.push(...linkedOrganizations.linkStatements);
|
|
158
|
+
insertions.push(...buildResumeStatements(subject, doc, existingNode, resume, false));
|
|
159
|
+
});
|
|
160
|
+
resumeOps.create.forEach(resume => {
|
|
161
|
+
insertions.push(...buildResumeStatements(subject, doc, (0, _idNodeFactory.createIdNode)(doc), resume));
|
|
162
|
+
});
|
|
163
|
+
await (0, _rdfMutationHelpers.applyUpdaterPatch)(store, deletions, insertions);
|
|
164
|
+
}
|
|
165
|
+
async function processResumeMutations(store, subject, mutationPlan) {
|
|
166
|
+
try {
|
|
167
|
+
await mutateResumeEntries(store, subject, mutationPlan);
|
|
168
|
+
} catch (error) {
|
|
169
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
170
|
+
throw new Error(`${_texts.mutationSaveResumeFailedPrefixText} ${message}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/sections/resume/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAiB,MAAM,QAAQ,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAwKrC,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,WAAW,EAAE,CAOf"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.presentCV = presentCV;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
8
|
+
const educationMembershipType = _solidUi.ns.schema('EducationalOccupationalCredential');
|
|
9
|
+
const vcardOrganizationType = _solidUi.ns.vcard('Organization').value;
|
|
10
|
+
const schemaNamespace = 'http://schema.org/';
|
|
11
|
+
function localNameFromUri(uri) {
|
|
12
|
+
const value = (uri || '').trim();
|
|
13
|
+
if (!value) return '';
|
|
14
|
+
const fragmentMatch = value.match(/[#/]([^#/]+)$/);
|
|
15
|
+
return fragmentMatch?.[1] || value;
|
|
16
|
+
}
|
|
17
|
+
function nodeToDisplayText(store, node, doc) {
|
|
18
|
+
if (!node) return '';
|
|
19
|
+
if (node.termType === 'Literal') return node.value;
|
|
20
|
+
if (node.termType === 'NamedNode') {
|
|
21
|
+
const label = store.anyJS(node, _solidUi.ns.rdfs('label'), null, doc);
|
|
22
|
+
if (label) return label;
|
|
23
|
+
return localNameFromUri(node.value);
|
|
24
|
+
}
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
function roleTypeFromMembership(store, membership, doc) {
|
|
28
|
+
const roleTypes = store.each(membership, _solidUi.ns.rdf('type'), null, doc).filter(node => node.termType === 'NamedNode' && node.value.startsWith(_solidUi.ns.solid('').value));
|
|
29
|
+
const matched = roleTypes.find(node => {
|
|
30
|
+
const local = localNameFromUri(node.value);
|
|
31
|
+
return local === 'PastRole' || local === 'CurrentRole' || local === 'FutureRole';
|
|
32
|
+
}) || roleTypes[0];
|
|
33
|
+
return nodeToDisplayText(store, matched, doc);
|
|
34
|
+
}
|
|
35
|
+
function organizationTypeFromNode(store, organization, doc) {
|
|
36
|
+
const classification = store.any(organization, _solidUi.ns.org('classification'), null, doc);
|
|
37
|
+
const classificationText = nodeToDisplayText(store, classification, doc);
|
|
38
|
+
if (classificationText) return classificationText;
|
|
39
|
+
const organizationTypes = store.each(organization, _solidUi.ns.rdf('type'), null, doc).filter(node => node.termType === 'NamedNode').filter(node => node.value !== vcardOrganizationType);
|
|
40
|
+
const preferred = organizationTypes.find(node => node.value.startsWith(schemaNamespace)) || organizationTypes[0];
|
|
41
|
+
return nodeToDisplayText(store, preferred, doc);
|
|
42
|
+
}
|
|
43
|
+
function isEducationMembership(store, membership, doc) {
|
|
44
|
+
return store.holds(membership, _solidUi.ns.rdf('type'), educationMembershipType, doc);
|
|
45
|
+
}
|
|
46
|
+
// Copied from CVPresenter and modified for new functionallity.
|
|
47
|
+
/* Restructure for new design - notes */
|
|
48
|
+
/* The design displays in reverse chronological order: removed rolesByType and
|
|
49
|
+
just sort the Roles */
|
|
50
|
+
/* Data */
|
|
51
|
+
/* isCurrentRole: derive from no end date. Use to force behaviour of ui - enforcing an end date
|
|
52
|
+
when not selected. */
|
|
53
|
+
/* Dates: change to Month Year format: Leave dates as startDate and endDate, populate
|
|
54
|
+
these dates by using the 1st day of the month for the month that is selected.
|
|
55
|
+
Compute at render time */
|
|
56
|
+
/* New Types:
|
|
57
|
+
Organization type: use org:classification note on vocab it's noted that
|
|
58
|
+
this is a somewhat unsettled type.
|
|
59
|
+
Organization location: use org:location note: this is for a person's location inside
|
|
60
|
+
an organization I'm thinking this is what we want here.
|
|
61
|
+
Role description: use schema:description on the membership. Not sure if this is the best choice but what I could find.
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
function getRoles(store, subject) {
|
|
65
|
+
const roles = [];
|
|
66
|
+
const deduped = new Map();
|
|
67
|
+
const doc = subject.doc();
|
|
68
|
+
const memberships = store.each(null, _solidUi.ns.org('member'), subject, doc).filter(membership => !isEducationMembership(store, membership, doc));
|
|
69
|
+
for (const membership of memberships) {
|
|
70
|
+
let orgHomePage, orgNameGiven, publicIdName, roleName, publicId, orgType, orgLocation;
|
|
71
|
+
// Things should have start dates but we will be very lenient in this view
|
|
72
|
+
const startDate = store.any(membership, _solidUi.ns.schema('startDate'), null, doc);
|
|
73
|
+
const endDate = store.any(membership, _solidUi.ns.schema('endDate'), null, doc);
|
|
74
|
+
const roleDescription = store.anyJS(membership, _solidUi.ns.schema('description'), null, doc);
|
|
75
|
+
const isCurrentRole = !endDate;
|
|
76
|
+
const roleType = roleTypeFromMembership(store, membership, doc);
|
|
77
|
+
const organization = store.any(membership, _solidUi.ns.org('organization'), null, doc);
|
|
78
|
+
if (organization) {
|
|
79
|
+
orgNameGiven = store.anyJS(organization, _solidUi.ns.schema('name'), null, doc);
|
|
80
|
+
orgHomePage = store.any(organization, _solidUi.ns.schema('uri'), null, doc);
|
|
81
|
+
orgType = organizationTypeFromNode(store, organization, doc);
|
|
82
|
+
orgLocation = store.any(organization, _solidUi.ns.org('location'), null, doc);
|
|
83
|
+
publicId = store.any(organization, _solidUi.ns.solid('publicId'), null, doc);
|
|
84
|
+
}
|
|
85
|
+
if (publicId) {
|
|
86
|
+
publicIdName = store.anyJS(publicId, _solidUi.ns.schema('name'), null, doc);
|
|
87
|
+
}
|
|
88
|
+
const orgName = publicIdName || orgNameGiven;
|
|
89
|
+
const escoRole = store.any(membership, _solidUi.ns.org('role'), null, doc);
|
|
90
|
+
if (escoRole) {
|
|
91
|
+
roleName = store.anyJS(escoRole, _solidUi.ns.schema('name'), null, doc);
|
|
92
|
+
}
|
|
93
|
+
const roleText0 = store.anyJS(membership, _solidUi.ns.vcard('role'), null, doc);
|
|
94
|
+
const title = roleText0 && roleName ? roleName + ' - ' + roleText0 : roleText0 || roleName;
|
|
95
|
+
const item = {
|
|
96
|
+
title,
|
|
97
|
+
roleType,
|
|
98
|
+
entryNode: membership,
|
|
99
|
+
startDate: startDate,
|
|
100
|
+
endDate,
|
|
101
|
+
isCurrentRole,
|
|
102
|
+
orgName,
|
|
103
|
+
orgType,
|
|
104
|
+
orgLocation,
|
|
105
|
+
orgHomePage,
|
|
106
|
+
description: roleDescription || undefined
|
|
107
|
+
};
|
|
108
|
+
const dedupeKey = [item.title || '', item.orgName || '', item.startDate?.value || '', item.endDate?.value || ''].join('|');
|
|
109
|
+
const existing = deduped.get(dedupeKey);
|
|
110
|
+
if (!existing) {
|
|
111
|
+
deduped.set(dedupeKey, item);
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
const existingIsNamed = existing.entryNode.termType === 'NamedNode';
|
|
115
|
+
const nextIsNamed = item.entryNode.termType === 'NamedNode';
|
|
116
|
+
if (!existingIsNamed && nextIsNamed) {
|
|
117
|
+
deduped.set(dedupeKey, item);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
deduped.forEach(item => roles.push(item));
|
|
121
|
+
return roles;
|
|
122
|
+
}
|
|
123
|
+
function sortRoles(roles) {
|
|
124
|
+
return roles.sort((x, y) => {
|
|
125
|
+
// Current roles first
|
|
126
|
+
const xIsCurrent = !x.endDate;
|
|
127
|
+
const yIsCurrent = !y.endDate;
|
|
128
|
+
if (xIsCurrent !== yIsCurrent) return xIsCurrent ? -1 : 1;
|
|
129
|
+
const xEnd = x.endDate?.value || '';
|
|
130
|
+
const yEnd = y.endDate?.value || '';
|
|
131
|
+
if (xEnd !== yEnd) return yEnd.localeCompare(xEnd);
|
|
132
|
+
const xStart = x.startDate?.value || '';
|
|
133
|
+
const yStart = y.startDate?.value || '';
|
|
134
|
+
return yStart.localeCompare(xStart);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function presentCV(subject, store) {
|
|
138
|
+
const roles = getRoles(store, subject);
|
|
139
|
+
// Most recent thing most relevant -> sort by end date
|
|
140
|
+
const sortedRoles = sortRoles(roles);
|
|
141
|
+
return sortedRoles;
|
|
142
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Literal, Node } from 'rdflib';
|
|
2
|
+
import { RowStatus } from '../shared/types';
|
|
3
|
+
export interface ResumeDetails extends RoleDetails {
|
|
4
|
+
}
|
|
5
|
+
export interface RoleDetails extends Role {
|
|
6
|
+
entryNode: Node;
|
|
7
|
+
}
|
|
8
|
+
export interface ResumeRow extends Role {
|
|
9
|
+
entryNode: string;
|
|
10
|
+
status: RowStatus;
|
|
11
|
+
}
|
|
12
|
+
export interface Role {
|
|
13
|
+
title: string;
|
|
14
|
+
roleType?: string;
|
|
15
|
+
startDate?: Literal;
|
|
16
|
+
endDate?: Literal;
|
|
17
|
+
isCurrentRole?: boolean;
|
|
18
|
+
orgName: string;
|
|
19
|
+
orgType?: string;
|
|
20
|
+
orgLocation?: string;
|
|
21
|
+
orgHomePage?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const typesOfRole: string[];
|
|
25
|
+
export interface CVPresentation {
|
|
26
|
+
roles: RoleDetails[];
|
|
27
|
+
}
|
|
28
|
+
export interface RolesByType {
|
|
29
|
+
PastRole: RoleDetails[];
|
|
30
|
+
CurrentRole: RoleDetails[];
|
|
31
|
+
FutureRole: RoleDetails[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sections/resume/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,WAAW,aAAc,SAAQ,WAAW;CAAG;AAErD,MAAM,WAAW,WAAY,SAAQ,IAAI;IACvC,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,SAAS,CAAA;CAClB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAGD,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,UAAU,EAAE,WAAW,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.typesOfRole = void 0;
|
|
7
|
+
/* Presentation of CV data has changed do not need rolesbytype */
|
|
8
|
+
const typesOfRole = exports.typesOfRole = ['PastRole', 'CurrentRole', 'FutureRole'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsibleSection.d.ts","sourceRoot":"","sources":["../../../src/sections/shared/collapsibleSection.ts"],"names":[],"mappings":"AAEA,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAkB3D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toggleCollapsibleSection = toggleCollapsibleSection;
|
|
7
|
+
var _sectionCardHelpers = require("./sectionCardHelpers");
|
|
8
|
+
function toggleCollapsibleSection(event) {
|
|
9
|
+
const button = event.currentTarget;
|
|
10
|
+
const section = button?.closest('.profile-section-collapsible');
|
|
11
|
+
const panel = section?.querySelector('.profile-section-collapsible__content');
|
|
12
|
+
if (!button || !section || !panel) return;
|
|
13
|
+
const nextExpanded = section.getAttribute('data-expanded') !== 'true';
|
|
14
|
+
section.setAttribute('data-expanded', String(nextExpanded));
|
|
15
|
+
button.setAttribute('aria-expanded', String(nextExpanded));
|
|
16
|
+
panel.setAttribute('aria-hidden', String(!nextExpanded));
|
|
17
|
+
if (nextExpanded && typeof window !== 'undefined') {
|
|
18
|
+
window.requestAnimationFrame(() => {
|
|
19
|
+
window.requestAnimationFrame(() => {
|
|
20
|
+
(0, _sectionCardHelpers.scheduleDescriptionOverflowCheck)();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function normalizePhoneTypeForEdit(value: unknown): string;
|
|
2
|
+
export declare function normalizePhoneTypeForContactInfoEdit(value: unknown): string;
|
|
3
|
+
export declare function normalizeEmailTypeForEdit(value: unknown): string;
|
|
4
|
+
export declare function normalizeEmailTypeForContactInfoEdit(value: unknown): string;
|
|
5
|
+
export declare function toSavedHeadingEmailType(type: string | undefined): string;
|
|
6
|
+
export declare function toSavedHeadingPhoneType(type: string | undefined): string;
|
|
7
|
+
//# sourceMappingURL=contactTypeUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactTypeUtils.d.ts","sourceRoot":"","sources":["../../../src/sections/shared/contactTypeUtils.ts"],"names":[],"mappings":"AAEA,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQhE;AAED,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ3E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOhE;AAED,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAO3E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAExE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAExE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.normalizeEmailTypeForContactInfoEdit = normalizeEmailTypeForContactInfoEdit;
|
|
7
|
+
exports.normalizeEmailTypeForEdit = normalizeEmailTypeForEdit;
|
|
8
|
+
exports.normalizePhoneTypeForContactInfoEdit = normalizePhoneTypeForContactInfoEdit;
|
|
9
|
+
exports.normalizePhoneTypeForEdit = normalizePhoneTypeForEdit;
|
|
10
|
+
exports.toSavedHeadingEmailType = toSavedHeadingEmailType;
|
|
11
|
+
exports.toSavedHeadingPhoneType = toSavedHeadingPhoneType;
|
|
12
|
+
var _textUtils = require("../../textUtils");
|
|
13
|
+
function normalizePhoneTypeForEdit(value) {
|
|
14
|
+
const label = (0, _textUtils.toTypeLabel)(value).trim().toLowerCase();
|
|
15
|
+
if (!label) return '';
|
|
16
|
+
if (label === 'cell' || label === 'mobile') return 'Mobile';
|
|
17
|
+
if (label === 'home') return 'Home';
|
|
18
|
+
if (label === 'work' || label === 'office') return 'Work';
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
function normalizePhoneTypeForContactInfoEdit(value) {
|
|
22
|
+
const label = (0, _textUtils.toTypeLabel)(value).trim().toLowerCase();
|
|
23
|
+
if (!label) return '';
|
|
24
|
+
if (label === 'cell' || label === 'mobile') return 'Cell';
|
|
25
|
+
if (label === 'home') return 'Home';
|
|
26
|
+
if (label === 'work' || label === 'office') return 'Work';
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
function normalizeEmailTypeForEdit(value) {
|
|
30
|
+
const label = (0, _textUtils.toTypeLabel)(value).trim().toLowerCase();
|
|
31
|
+
if (!label) return '';
|
|
32
|
+
if (label === 'personal' || label === 'home') return 'Personal';
|
|
33
|
+
if (label === 'office' || label === 'work') return 'Office';
|
|
34
|
+
return '';
|
|
35
|
+
}
|
|
36
|
+
function normalizeEmailTypeForContactInfoEdit(value) {
|
|
37
|
+
const label = (0, _textUtils.toTypeLabel)(value).trim().toLowerCase();
|
|
38
|
+
if (!label) return '';
|
|
39
|
+
if (label === 'personal' || label === 'home') return 'Home';
|
|
40
|
+
if (label === 'office' || label === 'work') return 'Office';
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
function toSavedHeadingEmailType(type) {
|
|
44
|
+
return type === 'Personal' ? 'Home' : type || '';
|
|
45
|
+
}
|
|
46
|
+
function toSavedHeadingPhoneType(type) {
|
|
47
|
+
return type === 'Mobile' ? 'Cell' : type || '';
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idNodeFactory.d.ts","sourceRoot":"","sources":["../../../src/sections/shared/idNodeFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAIvC,wBAAgB,YAAY,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAKtD"}
|