profile-pane 3.1.1-0a928621 → 3.1.1-3ff4c1ff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/SocialPresenter.js +1 -1
- package/lib/editProfilePane/EditCVCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCVCard.js +2 -1
- package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.js +12 -3
- package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditFriendsCard.js +12 -3
- package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -1
- package/lib/editProfilePane/EditOtherPreferences.js +2 -1
- package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
- package/lib/editProfilePane/EditProfileView.js +22 -5
- package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditSocialCard.js +2 -1
- package/lib/profile-pane.js +170 -34
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +14 -14
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/rdfFormsHelper.d.ts +3 -3
- package/lib/rdfFormsHelper.d.ts.map +1 -1
- package/lib/rdfFormsHelper.js +10 -10
- package/lib/styles/rdfFormsEnforced.css +97 -3
- package/lib/styles/utilities.css +5 -0
- package/lib/texts.d.ts +5 -5
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +5 -5
- package/package.json +2 -1
package/lib/SocialPresenter.js
CHANGED
|
@@ -78,7 +78,7 @@ function presentSocial(subject, store) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// we need to load the social media accounts ontology to be able to query all data needed
|
|
81
|
-
(0, _rdfFormsHelper.loadDocument)(
|
|
81
|
+
(0, _rdfFormsHelper.loadDocument)(store, socialMediaForm, socialMediaFormName);
|
|
82
82
|
const accountNodes = store.each(subject, _solidUi.ns.foaf('account'));
|
|
83
83
|
const accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
|
|
84
84
|
if (!accountThings.length) return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditCVCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCVCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"EditCVCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCVCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAgCxH"}
|
|
@@ -13,8 +13,9 @@ const resumeFormName = 'resumeForm.ttl'; // The name of the form file
|
|
|
13
13
|
|
|
14
14
|
function EditCVSection(context, me, editableProfile, store) {
|
|
15
15
|
const section = context.dom.createElement('section');
|
|
16
|
+
section.setAttribute('data-testid', 'edit-cv-section');
|
|
16
17
|
section.setAttribute('aria-labelledby', 'edit-profile-cv-heading');
|
|
17
|
-
section.classList.add('profileSection', 'section-bg');
|
|
18
|
+
section.classList.add('profileSection', 'section-bg', 'profile-form');
|
|
18
19
|
const header = context.dom.createElement('header');
|
|
19
20
|
header.classList.add('text-center', 'mb-md');
|
|
20
21
|
const heading = context.dom.createElement('h2');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditCommunitiesCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCommunitiesCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"EditCommunitiesCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditCommunitiesCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eA6C9I"}
|
|
@@ -19,20 +19,29 @@ function EditProfileCommunitiesSection(context, me, editableProfile, profile) {
|
|
|
19
19
|
header.appendChild(heading);
|
|
20
20
|
section.appendChild(header);
|
|
21
21
|
const comment1 = context.dom.createElement('p');
|
|
22
|
+
comment1.id = 'edit-profile-communities-description';
|
|
22
23
|
comment1.classList.add('p-md');
|
|
23
24
|
comment1.textContent = 'These are organizations and projects whose stuff you share';
|
|
24
25
|
section.appendChild(comment1);
|
|
26
|
+
let comment2 = null;
|
|
25
27
|
if (editableProfile) {
|
|
26
|
-
|
|
28
|
+
comment2 = context.dom.createElement('p');
|
|
29
|
+
comment2.id = 'edit-profile-communities-help';
|
|
27
30
|
comment2.classList.add('p-md');
|
|
28
31
|
comment2.textContent = 'Drag organizations onto the target below to add organizations.';
|
|
29
32
|
section.appendChild(comment2);
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
const attachmentList = _solidUi.widgets.attachmentList(context.dom, me, section, {
|
|
32
35
|
doc: profile,
|
|
33
36
|
modify: !!editableProfile,
|
|
34
37
|
predicate: _solidUi.ns.solid('community'),
|
|
35
38
|
noun: 'community'
|
|
36
|
-
})
|
|
39
|
+
});
|
|
40
|
+
const descriptions = [comment1.id];
|
|
41
|
+
if (comment2?.id) {
|
|
42
|
+
descriptions.push(comment2.id);
|
|
43
|
+
}
|
|
44
|
+
attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
|
|
45
|
+
section.appendChild(attachmentList);
|
|
37
46
|
return section;
|
|
38
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditFriendsCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditFriendsCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"EditFriendsCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditFriendsCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,eA8CnI"}
|
|
@@ -19,20 +19,29 @@ function EditFriendsSection(context, me, editableProfile, profile) {
|
|
|
19
19
|
header.appendChild(heading);
|
|
20
20
|
section.appendChild(header);
|
|
21
21
|
const comment1 = context.dom.createElement('p');
|
|
22
|
+
comment1.id = 'edit-profile-friends-description';
|
|
22
23
|
comment1.classList.add('p-md');
|
|
23
24
|
comment1.textContent = 'This is your public social network. Only put people here to whom you are happy to be publicly connected. (You can always keep private track of friends and family in your contacts.)';
|
|
24
25
|
section.appendChild(comment1);
|
|
26
|
+
let comment2 = null;
|
|
25
27
|
if (editableProfile) {
|
|
26
|
-
|
|
28
|
+
comment2 = context.dom.createElement('p');
|
|
29
|
+
comment2.id = 'edit-profile-friends-help';
|
|
27
30
|
comment2.classList.add('p-md');
|
|
28
31
|
comment2.textContent = 'Drag people onto the target below to add people.';
|
|
29
32
|
section.appendChild(comment2);
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
const attachmentList = _solidUi.widgets.attachmentList(context.dom, me, section, {
|
|
32
35
|
doc: profile,
|
|
33
36
|
modify: !!editableProfile,
|
|
34
37
|
predicate: _solidUi.ns.foaf('knows'),
|
|
35
38
|
noun: 'friend'
|
|
36
|
-
})
|
|
39
|
+
});
|
|
40
|
+
const descriptions = [comment1.id];
|
|
41
|
+
if (comment2?.id) {
|
|
42
|
+
descriptions.push(comment2.id);
|
|
43
|
+
}
|
|
44
|
+
attachmentList.setAttribute('aria-describedby', descriptions.join(' '));
|
|
45
|
+
section.appendChild(attachmentList);
|
|
37
46
|
return section;
|
|
38
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditOtherPreferences.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditOtherPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"EditOtherPreferences.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditOtherPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAoBtI"}
|
|
@@ -13,8 +13,9 @@ const otherPreferencesFormName = 'otherPreferencesForm.ttl'; // The name of the
|
|
|
13
13
|
|
|
14
14
|
function EditOtherPreferencesSection(context, me, editableProfile, store) {
|
|
15
15
|
const section = context.dom.createElement('section');
|
|
16
|
+
section.setAttribute('data-testid', 'edit-other-preferences-section');
|
|
16
17
|
section.setAttribute('aria-labelledby', 'edit-profile-other-preferences-heading');
|
|
17
|
-
section.classList.add('profileSection', 'section-bg');
|
|
18
|
+
section.classList.add('profileSection', 'section-bg', 'profile-form');
|
|
18
19
|
const header = context.dom.createElement('header');
|
|
19
20
|
header.classList.add('text-center', 'mb-md');
|
|
20
21
|
const heading = context.dom.createElement('h2');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditProfileView.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditProfileView.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,yBAAyB,CAAA;AAChC,OAAO,gCAAgC,CAAA;AAIvC,QAAA,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"EditProfileView.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditProfileView.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAO9C,OAAO,yBAAyB,CAAA;AAChC,OAAO,gCAAgC,CAAA;AAIvC,QAAA,MAAM,eAAe,EAAE,cAoGtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -45,14 +45,26 @@ const editProfileView = {
|
|
|
45
45
|
// Use <main> for the main content area, styled as a grid like ProfileView
|
|
46
46
|
const main = dom.createElement('main');
|
|
47
47
|
main.setAttribute('id', 'profile-edit-main-content');
|
|
48
|
-
main.
|
|
48
|
+
main.setAttribute('aria-busy', 'true');
|
|
49
|
+
main.setAttribute('tabindex', '-1');
|
|
50
|
+
main.classList.add('profile-grid', 'no-focus-ring');
|
|
51
|
+
const mainHeading = dom.createElement('h1');
|
|
52
|
+
mainHeading.classList.add('visually-hidden');
|
|
53
|
+
mainHeading.textContent = 'Edit Profile';
|
|
54
|
+
main.appendChild(mainHeading);
|
|
49
55
|
div.appendChild(main);
|
|
50
56
|
|
|
51
57
|
// Use <aside> for the status area
|
|
52
58
|
const statusArea = dom.createElement('aside');
|
|
53
59
|
statusArea.classList.add('p-sm');
|
|
60
|
+
statusArea.setAttribute('role', 'status');
|
|
54
61
|
statusArea.setAttribute('aria-live', 'polite');
|
|
55
|
-
|
|
62
|
+
statusArea.setAttribute('aria-atomic', 'true');
|
|
63
|
+
const ensureStatusArea = () => {
|
|
64
|
+
if (!statusArea.isConnected) {
|
|
65
|
+
div.appendChild(statusArea);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
56
68
|
const profileContext = {
|
|
57
69
|
dom: dom,
|
|
58
70
|
div: main,
|
|
@@ -70,6 +82,7 @@ const editProfileView = {
|
|
|
70
82
|
} else if (store.updater.editable(profile.uri, store)) {
|
|
71
83
|
editableProfile = profile;
|
|
72
84
|
} else {
|
|
85
|
+
ensureStatusArea();
|
|
73
86
|
statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, `⚠️ Your profile ${profile} is not editable, so we cannot do much here.`, 'straw'));
|
|
74
87
|
return;
|
|
75
88
|
}
|
|
@@ -78,12 +91,12 @@ const editProfileView = {
|
|
|
78
91
|
// Your contact information Section
|
|
79
92
|
main.appendChild((0, _EditContactsCard.EditContactsSection)(context, me));
|
|
80
93
|
|
|
81
|
-
// Social Accounts Section
|
|
82
|
-
main.appendChild((0, _EditSocialCard.EditSocialSection)(context, me, editableProfile, store));
|
|
83
|
-
|
|
84
94
|
// Resume Section
|
|
85
95
|
main.appendChild((0, _EditCVCard.EditCVSection)(context, me, editableProfile, store));
|
|
86
96
|
|
|
97
|
+
// Social Accounts Section
|
|
98
|
+
main.appendChild((0, _EditSocialCard.EditSocialSection)(context, me, editableProfile, store));
|
|
99
|
+
|
|
87
100
|
// Other preferences Section
|
|
88
101
|
main.appendChild((0, _EditOtherPreferences.EditOtherPreferencesSection)(context, me, editableProfile, store));
|
|
89
102
|
|
|
@@ -92,8 +105,12 @@ const editProfileView = {
|
|
|
92
105
|
|
|
93
106
|
// Communities you participate in Section
|
|
94
107
|
main.appendChild((0, _EditCommunitiesCard.EditProfileCommunitiesSection)(context, me, editableProfile, profile));
|
|
108
|
+
main.setAttribute('aria-busy', 'false');
|
|
109
|
+
main.focus();
|
|
95
110
|
}).catch(error => {
|
|
111
|
+
ensureStatusArea();
|
|
96
112
|
statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, error, '#fee'));
|
|
113
|
+
main.setAttribute('aria-busy', 'false');
|
|
97
114
|
});
|
|
98
115
|
return div;
|
|
99
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditSocialCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditSocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"EditSocialCard.d.ts","sourceRoot":"","sources":["../../src/editProfilePane/EditSocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAA;AAOxC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,eAgC5H"}
|
|
@@ -13,8 +13,9 @@ const socialMediaFormName = 'socialMedia.ttl'; // The name of the form file
|
|
|
13
13
|
|
|
14
14
|
function EditSocialSection(context, me, editableProfile, store) {
|
|
15
15
|
const section = context.dom.createElement('section');
|
|
16
|
+
section.setAttribute('data-testid', 'edit-social-section');
|
|
16
17
|
section.setAttribute('aria-labelledby', 'edit-profile-social-heading');
|
|
17
|
-
section.classList.add('profileSection', 'section-bg');
|
|
18
|
+
section.classList.add('profileSection', 'section-bg', 'profile-form');
|
|
18
19
|
const header = context.dom.createElement('header');
|
|
19
20
|
header.classList.add('text-center', 'mb-md');
|
|
20
21
|
const heading = context.dom.createElement('h2');
|