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
|
@@ -5,44 +5,87 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.renderSkillsSection = renderSkillsSection;
|
|
7
7
|
var _litHtml = require("lit-html");
|
|
8
|
+
require("solid-ui/components/actions/button");
|
|
8
9
|
var _textUtils = require("../../textUtils");
|
|
10
|
+
require("./SkillsSection.css");
|
|
9
11
|
var _SkillsEditDialog = require("./SkillsEditDialog");
|
|
10
12
|
var _profileIcons = require("../../icons-svg/profileIcons");
|
|
11
13
|
var _texts = require("../../texts");
|
|
12
14
|
var _collapsibleSection = require("../shared/collapsibleSection");
|
|
13
15
|
var _mutations = require("./mutations");
|
|
16
|
+
var _errorDisplay = require("../../utils/errorDisplay");
|
|
17
|
+
const removeSkillFailedMessageText = 'Unable to remove your skill.';
|
|
18
|
+
function setSkillsSectionError(section, message) {
|
|
19
|
+
const errorBox = section.querySelector('.profile-section-inline-error');
|
|
20
|
+
if (!errorBox) return;
|
|
21
|
+
if (!message) {
|
|
22
|
+
errorBox.textContent = '';
|
|
23
|
+
errorBox.hidden = true;
|
|
24
|
+
errorBox.setAttribute('aria-hidden', 'true');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
errorBox.textContent = message;
|
|
28
|
+
errorBox.hidden = false;
|
|
29
|
+
errorBox.setAttribute('aria-hidden', 'false');
|
|
30
|
+
errorBox.focus();
|
|
31
|
+
}
|
|
14
32
|
function renderSkillItem(detail, store, subject, viewerMode, onSaved) {
|
|
15
33
|
if (!detail) return (0, _litHtml.html)``;
|
|
16
34
|
const handleRemove = async event => {
|
|
17
35
|
event.preventDefault();
|
|
18
36
|
if (viewerMode !== 'owner') return;
|
|
37
|
+
const removeButton = event.currentTarget;
|
|
38
|
+
const skillRow = removeButton?.closest('.skills__item');
|
|
39
|
+
const section = event.currentTarget?.closest('[data-profile-section="skills"]');
|
|
19
40
|
const removeRow = {
|
|
20
41
|
name: detail.name,
|
|
21
42
|
publicId: detail.publicId,
|
|
22
43
|
entryNode: detail.entryNode.value,
|
|
23
44
|
status: 'deleted'
|
|
24
45
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
try {
|
|
47
|
+
removeButton?.setAttribute('disabled', '');
|
|
48
|
+
removeButton?.setAttribute('aria-busy', 'true');
|
|
49
|
+
removeButton?.setAttribute('data-loading', 'true');
|
|
50
|
+
skillRow?.setAttribute('data-pending', 'true');
|
|
51
|
+
await (0, _mutations.processSkillsMutations)(store, subject, {
|
|
52
|
+
create: [],
|
|
53
|
+
update: [],
|
|
54
|
+
remove: [removeRow]
|
|
55
|
+
});
|
|
56
|
+
if (section) {
|
|
57
|
+
setSkillsSectionError(section, null);
|
|
58
|
+
}
|
|
59
|
+
if (onSaved) {
|
|
60
|
+
await onSaved();
|
|
61
|
+
}
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (section) {
|
|
64
|
+
setSkillsSectionError(section, (0, _errorDisplay.formatDisplayError)(error, removeSkillFailedMessageText));
|
|
65
|
+
}
|
|
66
|
+
} finally {
|
|
67
|
+
removeButton?.removeAttribute('disabled');
|
|
68
|
+
removeButton?.setAttribute('aria-busy', 'false');
|
|
69
|
+
removeButton?.removeAttribute('data-loading');
|
|
70
|
+
skillRow?.removeAttribute('data-pending');
|
|
32
71
|
}
|
|
33
72
|
};
|
|
34
73
|
return (0, _litHtml.html)`
|
|
35
|
-
<li class="skills__item
|
|
74
|
+
<li class="skills__item" role="listitem">
|
|
36
75
|
<span class="skills__item-label">${(0, _textUtils.strToUpperCase)(detail.name)}</span>
|
|
37
76
|
${viewerMode === 'owner' ? (0, _litHtml.html)`
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
77
|
+
<span class="skills__item-tail">
|
|
78
|
+
<solid-ui-button
|
|
79
|
+
type="button"
|
|
80
|
+
variant="icon"
|
|
81
|
+
size="sm"
|
|
82
|
+
class="skills__remove-button"
|
|
83
|
+
aria-label=${`Remove ${detail.name} skill`}
|
|
84
|
+
@click=${handleRemove}
|
|
85
|
+
>
|
|
86
|
+
<span slot="icon" aria-hidden="true">${_profileIcons.deleteIcon}</span>
|
|
87
|
+
</solid-ui-button>
|
|
88
|
+
</span>
|
|
46
89
|
` : ''}
|
|
47
90
|
</li>
|
|
48
91
|
`;
|
|
@@ -52,50 +95,63 @@ function renderSkillsSectionDefault(store, subject, skills, viewerMode, onSaved)
|
|
|
52
95
|
const isOwner = viewerMode === 'owner';
|
|
53
96
|
return (0, _litHtml.html)`
|
|
54
97
|
<section
|
|
55
|
-
class="profile__section
|
|
98
|
+
class="profile__section profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
|
|
99
|
+
data-profile-section="skills"
|
|
56
100
|
aria-labelledby="skills-heading"
|
|
57
101
|
role="region"
|
|
58
102
|
tabindex="-1"
|
|
59
103
|
data-expanded="false"
|
|
60
104
|
>
|
|
61
105
|
<header class="profile__section-header profile-section-collapsible__header">
|
|
62
|
-
<
|
|
63
|
-
<div class="profile-section-collapsible__actions
|
|
106
|
+
<h3 id="skills-heading">${_texts.skillsHeadingText}</h3>
|
|
107
|
+
<div class="profile-section-collapsible__actions">
|
|
64
108
|
${isOwner ? (0, _litHtml.html)`
|
|
65
|
-
<button
|
|
109
|
+
<solid-ui-button
|
|
66
110
|
type="button"
|
|
67
|
-
|
|
111
|
+
variant="secondary"
|
|
112
|
+
size="sm"
|
|
113
|
+
class="profile__action-button profile-action-text profile-section-collapsible__edit-button"
|
|
68
114
|
aria-label="Add or edit skills"
|
|
69
115
|
@click=${event => (0, _SkillsEditDialog.createSkillsEditDialog)(event, store, subject, skills, viewerMode, onSaved)}
|
|
70
116
|
>
|
|
71
|
-
<span class="profile-section-collapsible__edit-label profile__add-more-content
|
|
72
|
-
<span class="profile__add-more-icon
|
|
73
|
-
Add More
|
|
117
|
+
<span class="profile-section-collapsible__edit-label profile__add-more-content">
|
|
118
|
+
<span class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
119
|
+
<span>Add More</span>
|
|
74
120
|
</span>
|
|
75
121
|
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
76
|
-
</button>
|
|
122
|
+
</solid-ui-button>
|
|
77
123
|
` : (0, _litHtml.html)``}
|
|
78
|
-
<button
|
|
124
|
+
<solid-ui-button
|
|
79
125
|
type="button"
|
|
80
|
-
|
|
126
|
+
variant="icon"
|
|
127
|
+
size="sm"
|
|
128
|
+
class="profile-section-collapsible__toggle-button"
|
|
81
129
|
aria-label="Toggle skills section"
|
|
82
130
|
aria-controls="skills-panel"
|
|
83
131
|
aria-expanded="false"
|
|
84
132
|
@click=${_collapsibleSection.toggleCollapsibleSection}
|
|
85
133
|
>
|
|
86
|
-
<span class="profile-section-collapsible__chevron" aria-hidden="true"
|
|
87
|
-
</button>
|
|
134
|
+
<span slot="icon" class="profile-section-collapsible__chevron" aria-hidden="true">${_profileIcons.chevronDownIcon}</span>
|
|
135
|
+
</solid-ui-button>
|
|
88
136
|
</div>
|
|
89
137
|
</header>
|
|
90
138
|
<div
|
|
91
139
|
id="skills-panel"
|
|
92
140
|
class="profile-section-collapsible__content"
|
|
93
|
-
aria-hidden="true"
|
|
94
141
|
>
|
|
95
142
|
${hasSkills ? (0, _litHtml.html)`
|
|
96
|
-
<ul class="skills__list
|
|
143
|
+
<ul class="skills__list" role="list" aria-label="Professional skills and competencies">
|
|
97
144
|
${skills.map(detail => renderSkillItem(detail, store, subject, viewerMode, onSaved))}
|
|
98
145
|
</ul>
|
|
146
|
+
<div
|
|
147
|
+
class="profile-section-inline-error"
|
|
148
|
+
role="alert"
|
|
149
|
+
aria-live="assertive"
|
|
150
|
+
aria-atomic="true"
|
|
151
|
+
aria-hidden="true"
|
|
152
|
+
tabindex="-1"
|
|
153
|
+
hidden
|
|
154
|
+
></div>
|
|
99
155
|
` : (0, _litHtml.html)`<p>No skills added yet.</p>`}
|
|
100
156
|
</div>
|
|
101
157
|
</section>
|
|
@@ -103,9 +159,9 @@ function renderSkillsSectionDefault(store, subject, skills, viewerMode, onSaved)
|
|
|
103
159
|
}
|
|
104
160
|
function renderOwnerEmptySkillsContent(_store, _subject, _skills, _viewerMode, _onSaved) {
|
|
105
161
|
return (0, _litHtml.html)`
|
|
106
|
-
<div class="profile__empty-state-content
|
|
162
|
+
<div class="profile__empty-state-content" role="group" aria-label="Empty skills section">
|
|
107
163
|
<div class="skills__empty-icon-wrapper">
|
|
108
|
-
<span class="skills__empty-icon
|
|
164
|
+
<span class="skills__empty-icon">${_profileIcons.lighteningIcon}</span>
|
|
109
165
|
</div>
|
|
110
166
|
<p class="profile__empty-state-message skills__empty-message">
|
|
111
167
|
No skills added yet.
|
|
@@ -118,41 +174,45 @@ function renderOwnerEmptySkillsSection(store, subject, skills, viewerMode, onSav
|
|
|
118
174
|
<section
|
|
119
175
|
aria-labelledby="skills-heading"
|
|
120
176
|
data-profile-section="skills"
|
|
121
|
-
class="profile__section--empty
|
|
177
|
+
class="profile__section--empty profile__section--empty-sidebar profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
|
|
122
178
|
role="region"
|
|
123
179
|
tabindex="-1"
|
|
124
180
|
data-expanded="false"
|
|
125
181
|
>
|
|
126
182
|
<header class="profile__section-header profile-section-collapsible__header">
|
|
127
|
-
<
|
|
128
|
-
<div class="profile-section-collapsible__actions
|
|
129
|
-
<button
|
|
183
|
+
<h3 id="skills-heading" tabindex="-1">${_texts.skillsHeadingText}</h3>
|
|
184
|
+
<div class="profile-section-collapsible__actions">
|
|
185
|
+
<solid-ui-button
|
|
130
186
|
type="button"
|
|
131
|
-
|
|
187
|
+
variant="secondary"
|
|
188
|
+
size="sm"
|
|
189
|
+
class="profile__action-button profile-action-text profile-section-collapsible__edit-button"
|
|
132
190
|
aria-label="Add skills"
|
|
133
191
|
@click=${event => {
|
|
134
192
|
return (0, _SkillsEditDialog.createSkillsEditDialog)(event, store, subject, skills, viewerMode, onSaved);
|
|
135
193
|
}}
|
|
136
194
|
>
|
|
137
|
-
<span class="profile-section-collapsible__edit-label profile__add-more-content
|
|
138
|
-
<span class="profile__add-more-icon
|
|
139
|
-
Add
|
|
195
|
+
<span class="profile-section-collapsible__edit-label profile__add-more-content">
|
|
196
|
+
<span class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
197
|
+
<span>Add More</span>
|
|
140
198
|
</span>
|
|
141
199
|
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
142
|
-
</button>
|
|
143
|
-
<button
|
|
200
|
+
</solid-ui-button>
|
|
201
|
+
<solid-ui-button
|
|
144
202
|
type="button"
|
|
145
|
-
|
|
203
|
+
variant="icon"
|
|
204
|
+
size="sm"
|
|
205
|
+
class="profile-section-collapsible__toggle-button"
|
|
146
206
|
aria-label="Toggle skills section"
|
|
147
207
|
aria-controls="skills-panel"
|
|
148
208
|
aria-expanded="false"
|
|
149
209
|
@click=${_collapsibleSection.toggleCollapsibleSection}
|
|
150
210
|
>
|
|
151
|
-
<span class="profile-section-collapsible__chevron" aria-hidden="true"
|
|
152
|
-
</button>
|
|
211
|
+
<span slot="icon" class="profile-section-collapsible__chevron" aria-hidden="true">${_profileIcons.chevronDownIcon}</span>
|
|
212
|
+
</solid-ui-button>
|
|
153
213
|
</div>
|
|
154
214
|
</header>
|
|
155
|
-
<div id="skills-panel" class="profile-section-collapsible__content"
|
|
215
|
+
<div id="skills-panel" class="profile-section-collapsible__content">
|
|
156
216
|
${renderOwnerEmptySkillsContent(store, subject, skills, viewerMode, onSaved)}
|
|
157
217
|
</div>
|
|
158
218
|
</section>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/skills/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/skills/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,SAAS,EAA0B,MAAM,QAAQ,CAAA;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,WAAW,EAAgB,MAAM,iBAAiB,CAAA;AAM3D,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAA;AAsHrD,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,iBASjH"}
|
|
@@ -9,30 +9,29 @@ var _solidUi = require("solid-ui");
|
|
|
9
9
|
var _rdfMutationHelpers = require("../shared/rdfMutationHelpers");
|
|
10
10
|
var _idNodeFactory = require("../shared/idNodeFactory");
|
|
11
11
|
var _texts = require("../../texts");
|
|
12
|
+
var _debug = require("../../utils/debug");
|
|
12
13
|
const ESCO_SKILL_BASE_URI = 'http://data.europa.eu/esco/skill/';
|
|
13
14
|
const SKILL_PREFIX_BASE_URI = 'skill:';
|
|
14
15
|
function ensureSkillPrefix(store) {
|
|
15
|
-
|
|
16
|
-
if (typeof anyStore.setPrefixForURI === 'function') {
|
|
17
|
-
anyStore.setPrefixForURI('skill', SKILL_PREFIX_BASE_URI);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (!anyStore.namespaces) {
|
|
21
|
-
anyStore.namespaces = {};
|
|
22
|
-
}
|
|
23
|
-
anyStore.namespaces.skill = SKILL_PREFIX_BASE_URI;
|
|
16
|
+
(0, _rdfMutationHelpers.registerStorePrefix)(store, 'skill', SKILL_PREFIX_BASE_URI);
|
|
24
17
|
}
|
|
25
|
-
function
|
|
18
|
+
function buildSkillPublicIdNode(publicId) {
|
|
26
19
|
const normalized = publicId.trim();
|
|
27
|
-
if (!normalized) return
|
|
20
|
+
if (!normalized) return (0, _rdflib.blankNode)();
|
|
21
|
+
if (normalized.startsWith('_:')) {
|
|
22
|
+
return (0, _rdflib.blankNode)(normalized.slice(2));
|
|
23
|
+
}
|
|
28
24
|
if (normalized.startsWith('skill:')) {
|
|
29
|
-
return normalized;
|
|
25
|
+
return (0, _rdflib.sym)(normalized);
|
|
30
26
|
}
|
|
31
27
|
if (normalized.startsWith(ESCO_SKILL_BASE_URI)) {
|
|
32
28
|
const suffix = normalized.slice(ESCO_SKILL_BASE_URI.length);
|
|
33
|
-
return suffix ? `skill:${suffix}` : normalized;
|
|
29
|
+
return (0, _rdflib.sym)(suffix ? `skill:${suffix}` : normalized);
|
|
34
30
|
}
|
|
35
|
-
|
|
31
|
+
if (!normalized.includes(':')) {
|
|
32
|
+
return (0, _rdflib.blankNode)(normalized);
|
|
33
|
+
}
|
|
34
|
+
return (0, _rdflib.sym)(normalized);
|
|
36
35
|
}
|
|
37
36
|
function normalizeNodeId(value) {
|
|
38
37
|
return value.startsWith('_:') ? value.slice(2) : value;
|
|
@@ -46,10 +45,7 @@ function collectSkillLinkStatementsByEntryValue(store, subject, doc, entryNode)
|
|
|
46
45
|
}
|
|
47
46
|
function buildSkillsStatements(subject, doc, node, skill) {
|
|
48
47
|
if (!skill.name) return [];
|
|
49
|
-
|
|
50
|
-
throw new Error(`Missing skill publicId for skill: ${skill.name}`);
|
|
51
|
-
}
|
|
52
|
-
const publicIdNode = (0, _rdflib.sym)(normalizeSkillPublicIdUri(skill.publicId));
|
|
48
|
+
const publicIdNode = buildSkillPublicIdNode(skill.publicId);
|
|
53
49
|
return [(0, _rdflib.st)(subject, _solidUi.ns.schema('skills'), node, doc), (0, _rdflib.st)(node, _solidUi.ns.solid('publicId'), publicIdNode, doc), (0, _rdflib.st)(publicIdNode, _solidUi.ns.schema('name'), (0, _rdflib.literal)(skill.name), doc)];
|
|
54
50
|
}
|
|
55
51
|
async function mutateSkillsEntries(store, subject, skillOps) {
|
|
@@ -98,13 +94,21 @@ async function mutateSkillsEntries(store, subject, skillOps) {
|
|
|
98
94
|
skillOps.create.forEach(skill => {
|
|
99
95
|
insertions.push(...buildSkillsStatements(subject, doc, (0, _idNodeFactory.createIdNode)(doc), skill));
|
|
100
96
|
});
|
|
101
|
-
await (0, _rdfMutationHelpers.
|
|
97
|
+
await (0, _rdfMutationHelpers.runUpdateTransport)(store, doc, deletions, insertions, {
|
|
98
|
+
unsupportedMessage: 'Skill updates are not supported by this store updater.',
|
|
99
|
+
failureMessage: 'Failed to save skills',
|
|
100
|
+
useDavFallback: true,
|
|
101
|
+
usePutFallback: true
|
|
102
|
+
});
|
|
102
103
|
}
|
|
103
104
|
async function processSkillsMutations(store, subject, mutationPlan) {
|
|
104
105
|
try {
|
|
105
106
|
await mutateSkillsEntries(store, subject, mutationPlan);
|
|
106
107
|
} catch (error) {
|
|
107
|
-
const
|
|
108
|
-
|
|
108
|
+
const rootError = error instanceof Error ? error : new Error(String(error));
|
|
109
|
+
(0, _debug.error)(_texts.skillsMutationSaveFailedDebugText, rootError);
|
|
110
|
+
throw new Error(_texts.saveSkillsUpdatesFailedMessageText, {
|
|
111
|
+
cause: rootError
|
|
112
|
+
});
|
|
109
113
|
}
|
|
110
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/sections/skills/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/sections/skills/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAiB1D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,YAAY,EAAE,CAgBxF;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAE5E"}
|
|
@@ -14,17 +14,19 @@ function skillAsText(store, sk) {
|
|
|
14
14
|
|
|
15
15
|
// Canonical shape: entry node -> solid:publicId -> schema:name.
|
|
16
16
|
const publicId = store.any(sk, _solidUi.ns.solid('publicId'));
|
|
17
|
-
if (publicId && publicId.termType === 'NamedNode') {
|
|
17
|
+
if (publicId && (publicId.termType === 'NamedNode' || publicId.termType === 'BlankNode')) {
|
|
18
18
|
const name = store.anyJS(publicId, _solidUi.ns.schema('name'));
|
|
19
19
|
if (name) return name;
|
|
20
|
-
|
|
20
|
+
if (publicId.termType === 'NamedNode') {
|
|
21
|
+
return _solidUi.utils.label(publicId, true);
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
return '';
|
|
23
25
|
}
|
|
24
26
|
function presentSkillDetails(subject, store) {
|
|
25
27
|
return store.each(subject, _solidUi.ns.schema('skills')).filter(sk => sk.termType !== 'Literal').map(sk => {
|
|
26
28
|
const publicId = store.any(sk, _solidUi.ns.solid('publicId'));
|
|
27
|
-
const publicIdUri = publicId ? publicId.value : '';
|
|
29
|
+
const publicIdUri = publicId ? publicId.termType === 'BlankNode' ? `_:${publicId.value}` : publicId.value : '';
|
|
28
30
|
return {
|
|
29
31
|
name: skillAsText(store, sk),
|
|
30
32
|
publicId: publicIdUri,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import 'solid-ui/components/actions/button';
|
|
2
|
+
import 'solid-ui/components/forms/select';
|
|
1
3
|
import type { Account } from './types';
|
|
2
|
-
import '
|
|
4
|
+
import '../contactInfo/ContactInfoEditDialog.css';
|
|
3
5
|
import '../../styles/EditDialogs.css';
|
|
4
6
|
import { LiveStore, NamedNode } from 'rdflib';
|
|
5
7
|
import { ViewerMode } from '../../types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/social/SocialEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,SAAS,CAAA;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"SocialEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/social/SocialEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,oCAAoC,CAAA;AAC3C,OAAO,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,SAAS,CAAA;AACjD,OAAO,0CAA0C,CAAA;AACjD,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA4hBxC,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,OAAO,EAAE,EACzB,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAgDrC"}
|