profile-pane 3.2.3-0 → 3.2.3-2
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/ProfileView.css +73 -236
- package/lib/ProfileView.d.ts +2 -1
- package/lib/ProfileView.d.ts.map +1 -1
- package/lib/ProfileView.js +19 -18
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +35 -35
- package/lib/profile-pane.js +17229 -25377
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +809 -1579
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/sections/bio/BioSection.css +16 -123
- package/lib/sections/bio/BioSection.d.ts +2 -2
- package/lib/sections/bio/BioSection.d.ts.map +1 -1
- package/lib/sections/bio/BioSection.js +23 -32
- package/lib/sections/contactInfo/ContactInfoEditDialog.css +33 -66
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -1
- package/lib/sections/contactInfo/ContactInfoEditDialog.js +15 -39
- package/lib/sections/contactInfo/ContactInfoSection.css +7 -7
- package/lib/sections/contactInfo/ContactInfoSection.d.ts +2 -2
- package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -1
- package/lib/sections/contactInfo/ContactInfoSection.js +34 -49
- package/lib/sections/education/EducationSection.d.ts +1 -1
- package/lib/sections/education/EducationSection.d.ts.map +1 -1
- package/lib/sections/education/EducationSection.js +2 -3
- package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -1
- package/lib/sections/heading/HeadingEditDialog.js +1 -9
- package/lib/sections/heading/HeadingSection.css +122 -346
- package/lib/sections/heading/HeadingSection.d.ts +2 -3
- package/lib/sections/heading/HeadingSection.d.ts.map +1 -1
- package/lib/sections/heading/HeadingSection.js +13 -19
- package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -1
- package/lib/sections/languages/LanguageEditDialog.js +7 -8
- package/lib/sections/languages/LanguageSection.css +6 -6
- package/lib/sections/languages/LanguageSection.d.ts +2 -2
- package/lib/sections/languages/LanguageSection.d.ts.map +1 -1
- package/lib/sections/languages/LanguageSection.js +33 -49
- package/lib/sections/projects/ProjectEditDialog.d.ts +0 -1
- package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -1
- package/lib/sections/projects/ProjectEditDialog.js +2 -6
- package/lib/sections/projects/ProjectSection.css +36 -94
- package/lib/sections/projects/ProjectSection.d.ts +2 -2
- package/lib/sections/projects/ProjectSection.d.ts.map +1 -1
- package/lib/sections/projects/ProjectSection.js +28 -49
- package/lib/sections/resume/ResumeEditDialog.d.ts +0 -1
- package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -1
- package/lib/sections/resume/ResumeEditDialog.js +20 -40
- package/lib/sections/resume/ResumeSection.css +51 -133
- package/lib/sections/resume/ResumeSection.d.ts +3 -3
- package/lib/sections/resume/ResumeSection.d.ts.map +1 -1
- package/lib/sections/resume/ResumeSection.js +28 -42
- package/lib/sections/shared/sectionCardHelpers.js +15 -15
- package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -1
- package/lib/sections/skills/SkillsEditDialog.js +1 -3
- package/lib/sections/skills/SkillsSection.css +20 -67
- package/lib/sections/skills/SkillsSection.d.ts +2 -2
- package/lib/sections/skills/SkillsSection.d.ts.map +1 -1
- package/lib/sections/skills/SkillsSection.js +36 -55
- package/lib/sections/social/SocialEditDialog.d.ts.map +1 -1
- package/lib/sections/social/SocialEditDialog.js +4 -9
- package/lib/sections/social/SocialSection.css +19 -70
- package/lib/sections/social/SocialSection.d.ts +2 -2
- package/lib/sections/social/SocialSection.d.ts.map +1 -1
- package/lib/sections/social/SocialSection.js +37 -61
- package/lib/specialButtons/addMeToYourFriends.d.ts.map +1 -1
- package/lib/specialButtons/addMeToYourFriends.js +0 -2
- package/lib/styles/CollapsibleSection.css +39 -223
- package/lib/styles/EditDialogs.css +90 -284
- package/lib/styles/EditDialogs.responsive.css +72 -147
- package/lib/types.d.ts +1 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/ui/dialog.css +18 -89
- package/lib/ui/dialog.d.ts.map +1 -1
- package/lib/ui/dialog.js +5 -9
- package/lib/ui/dialog.responsive.css +31 -34
- package/lib/ui/responsiveActionButton.d.ts +19 -0
- package/lib/ui/responsiveActionButton.d.ts.map +1 -0
- package/lib/ui/responsiveActionButton.js +34 -0
- package/lib/utils/resize.d.ts +2 -0
- package/lib/utils/resize.d.ts.map +1 -0
- package/lib/utils/resize.js +40 -0
- package/package.json +19 -19
- package/lib/303.profile-pane.js +0 -1362
- package/lib/303.profile-pane.js.map +0 -1
- package/lib/303.profile-pane.min.js +0 -2
- package/lib/303.profile-pane.min.js.map +0 -1
- package/lib/specialButtons/addContact/AddMeToYourContacts.css +0 -1118
- package/lib/specialButtons/addContact/ContactCreationDialog.d.ts +0 -10
- package/lib/specialButtons/addContact/ContactCreationDialog.d.ts.map +0 -1
- package/lib/specialButtons/addContact/ContactCreationDialog.js +0 -1123
- package/lib/specialButtons/addContact/addMeToYourContacts.d.ts +0 -16
- package/lib/specialButtons/addContact/addMeToYourContacts.d.ts.map +0 -1
- package/lib/specialButtons/addContact/addMeToYourContacts.js +0 -136
- package/lib/specialButtons/addContact/contactsErrors.d.ts +0 -8
- package/lib/specialButtons/addContact/contactsErrors.d.ts.map +0 -1
- package/lib/specialButtons/addContact/contactsErrors.js +0 -106
- package/lib/specialButtons/addContact/contactsTypes.d.ts +0 -43
- package/lib/specialButtons/addContact/contactsTypes.d.ts.map +0 -1
- package/lib/specialButtons/addContact/contactsTypes.js +0 -5
- package/lib/specialButtons/addContact/helpers.d.ts +0 -7
- package/lib/specialButtons/addContact/helpers.d.ts.map +0 -1
- package/lib/specialButtons/addContact/helpers.js +0 -103
- package/lib/specialButtons/addContact/mutations.d.ts +0 -16
- package/lib/specialButtons/addContact/mutations.d.ts.map +0 -1
- package/lib/specialButtons/addContact/mutations.js +0 -300
- package/lib/specialButtons/addContact/selectors.d.ts +0 -10
- package/lib/specialButtons/addContact/selectors.d.ts.map +0 -1
- package/lib/specialButtons/addContact/selectors.js +0 -163
|
@@ -199,15 +199,12 @@ function renderContactPhoneInputRow({
|
|
|
199
199
|
</label>
|
|
200
200
|
<div class="profile-edit-dialog__actions">
|
|
201
201
|
<solid-ui-button
|
|
202
|
-
|
|
203
|
-
variant="icon"
|
|
204
|
-
size="md"
|
|
205
|
-
class="profile-edit-dialog__delete-button"
|
|
202
|
+
variant="ghost"
|
|
206
203
|
aria-label=${`Delete phone number ${displayIndex + 1}`}
|
|
207
204
|
title=${_texts.deleteEntryButtonTitleText}
|
|
208
205
|
@click=${handleDelete}
|
|
209
206
|
>
|
|
210
|
-
<span slot="icon"
|
|
207
|
+
<span slot="icon" aria-hidden="true">${_profileIcons.trashIcon}</span>
|
|
211
208
|
</solid-ui-button>
|
|
212
209
|
</div>
|
|
213
210
|
</div>
|
|
@@ -242,17 +239,12 @@ function renderContactInfoPhoneSection(phones, onAddRow) {
|
|
|
242
239
|
Phone Numbers
|
|
243
240
|
</h3>
|
|
244
241
|
<solid-ui-button
|
|
245
|
-
|
|
246
|
-
variant="secondary"
|
|
247
|
-
size="sm"
|
|
248
|
-
class="profile__action-button profile-action-text profile-edit-dialog__add-button"
|
|
242
|
+
variant="tertiary"
|
|
249
243
|
aria-label="Add another phone number"
|
|
250
244
|
@click=${createNewRow}
|
|
251
245
|
>
|
|
252
|
-
<span class="profile__add-more-
|
|
253
|
-
|
|
254
|
-
<span>Add More</span>
|
|
255
|
-
</span>
|
|
246
|
+
<span slot="left-icon" class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
247
|
+
Add More
|
|
256
248
|
</solid-ui-button>
|
|
257
249
|
</header>
|
|
258
250
|
<fieldset>
|
|
@@ -332,15 +324,12 @@ function renderContactEmailInputRow({
|
|
|
332
324
|
</label>
|
|
333
325
|
<div class="profile-edit-dialog__actions">
|
|
334
326
|
<solid-ui-button
|
|
335
|
-
|
|
336
|
-
variant="icon"
|
|
337
|
-
size="md"
|
|
338
|
-
class="profile-edit-dialog__delete-button"
|
|
327
|
+
variant="ghost"
|
|
339
328
|
aria-label=${`Delete email address ${displayIndex + 1}`}
|
|
340
329
|
title=${_texts.deleteEntryButtonTitleText}
|
|
341
330
|
@click=${handleDelete}
|
|
342
331
|
>
|
|
343
|
-
<span slot="icon"
|
|
332
|
+
<span slot="icon" aria-hidden="true">${_profileIcons.trashIcon}</span>
|
|
344
333
|
</solid-ui-button>
|
|
345
334
|
</div>
|
|
346
335
|
</div>
|
|
@@ -375,17 +364,12 @@ function renderContactInfoEmailSection(emails, onAddRow) {
|
|
|
375
364
|
Email Addresses
|
|
376
365
|
</h3>
|
|
377
366
|
<solid-ui-button
|
|
378
|
-
|
|
379
|
-
variant="secondary"
|
|
380
|
-
size="sm"
|
|
381
|
-
class="profile__action-button profile-action-text profile-edit-dialog__add-button"
|
|
367
|
+
variant="tertiary"
|
|
382
368
|
aria-label="Add another email address"
|
|
383
369
|
@click=${createNewRow}
|
|
384
370
|
>
|
|
385
|
-
<span class="profile__add-more-
|
|
386
|
-
|
|
387
|
-
<span>Add More</span>
|
|
388
|
-
</span>
|
|
371
|
+
<span slot="left-icon" class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
372
|
+
Add More
|
|
389
373
|
</solid-ui-button>
|
|
390
374
|
</header>
|
|
391
375
|
<fieldset>
|
|
@@ -451,15 +435,12 @@ function renderContactAddressInputRow({
|
|
|
451
435
|
</label>
|
|
452
436
|
<div class="profile-edit-dialog__actions profile-edit-dialog__actions--edge">
|
|
453
437
|
<solid-ui-button
|
|
454
|
-
|
|
455
|
-
variant="icon"
|
|
456
|
-
size="md"
|
|
457
|
-
class="profile-edit-dialog__delete-button"
|
|
438
|
+
variant="ghost"
|
|
458
439
|
aria-label=${`Delete address ${displayIndex + 1}`}
|
|
459
440
|
title=${_texts.deleteEntryButtonTitleText}
|
|
460
441
|
@click=${handleDelete}
|
|
461
442
|
>
|
|
462
|
-
<span slot="icon"
|
|
443
|
+
<span slot="icon" aria-hidden="true">${_profileIcons.trashIcon}</span>
|
|
463
444
|
</solid-ui-button>
|
|
464
445
|
</div>
|
|
465
446
|
</div>
|
|
@@ -586,17 +567,12 @@ function renderContactInfoAddressSection(addresses, onAddRow) {
|
|
|
586
567
|
Addresses
|
|
587
568
|
</h3>
|
|
588
569
|
<solid-ui-button
|
|
589
|
-
|
|
590
|
-
variant="secondary"
|
|
591
|
-
size="sm"
|
|
592
|
-
class="profile__action-button profile-action-text profile-edit-dialog__add-button"
|
|
570
|
+
variant="tertiary"
|
|
593
571
|
aria-label="Add another address"
|
|
594
572
|
@click=${createNewRow}
|
|
595
573
|
>
|
|
596
|
-
<span class="profile__add-more-
|
|
597
|
-
|
|
598
|
-
<span>Add More</span>
|
|
599
|
-
</span>
|
|
574
|
+
<span slot="left-icon" class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
575
|
+
Add More
|
|
600
576
|
</solid-ui-button>
|
|
601
577
|
</header>
|
|
602
578
|
<fieldset>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.profile__section[data-profile-section='contact-info'],
|
|
2
2
|
.profile__section--empty[data-profile-section='contact-info'] {
|
|
3
|
-
--contact-info-icon-padding-inline:
|
|
3
|
+
--contact-info-icon-padding-inline: 9.2px;
|
|
4
4
|
--contact-info-icon-size: var(--icon-xxs, 1rem);
|
|
5
5
|
--contact-info-contact-point-value-size: var(--font-size-sm, 0.875rem);
|
|
6
6
|
--contact-info-contact-point-type-size: var(--font-size-xxs, 0.75rem);
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
justify-content: center;
|
|
14
14
|
width: 2.25rem;
|
|
15
15
|
height: 2.25rem;
|
|
16
|
-
padding: 0 var(--contact-info-icon-padding-inline
|
|
16
|
+
padding: 0 var(--contact-info-icon-padding-inline);
|
|
17
17
|
flex-shrink: 0;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.contact-info__item {
|
|
21
21
|
display: flex;
|
|
22
22
|
align-items: flex-start;
|
|
23
|
-
gap:
|
|
23
|
+
gap: 10px;
|
|
24
24
|
margin-inline-start: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
box-sizing: border-box;
|
|
67
67
|
list-style: none;
|
|
68
68
|
margin: 0;
|
|
69
|
-
padding: 0 0
|
|
70
|
-
gap:
|
|
69
|
+
padding: 0 0 10px 0;
|
|
70
|
+
gap: 10px;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.contact-info__list:last-of-type {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.contact-info__list + .contact-info__list {
|
|
78
|
-
margin-top:
|
|
78
|
+
margin-top: 10px;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/* Empty state */
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
text-align: center;
|
|
101
101
|
font-size: var(--font-size-xs, 0.813rem);
|
|
102
102
|
font-weight: var(--font-weight-normal, 400);
|
|
103
|
-
line-height:
|
|
103
|
+
line-height: 1.4;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.contact-info__empty-icon-wrapper {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'solid-ui/components/button';
|
|
2
|
-
import { ViewerMode } from '../../types';
|
|
2
|
+
import { Layout, ViewerMode } from '../../types';
|
|
3
3
|
import { LiveStore, NamedNode } from 'rdflib';
|
|
4
4
|
import './ContactInfoSection.css';
|
|
5
5
|
import { ContactInfo } from './types';
|
|
6
|
-
export declare function renderContactInfoSection(store: LiveStore, subject: NamedNode, contactInfo: ContactInfo, viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): import("lit-html").TemplateResult<1
|
|
6
|
+
export declare function renderContactInfoSection(store: LiveStore, subject: NamedNode, contactInfo: ContactInfo, viewerMode: ViewerMode, layout: Layout, onSaved?: () => Promise<void> | void): import("lit-html").TemplateResult<1>;
|
|
7
7
|
//# sourceMappingURL=ContactInfoSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactInfoSection.d.ts","sourceRoot":"","sources":["../../../src/sections/contactInfo/ContactInfoSection.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"ContactInfoSection.d.ts","sourceRoot":"","sources":["../../../src/sections/contactInfo/ContactInfoSection.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,0BAA0B,CAAA;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAwQrC,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,wCAmBrC"}
|
|
@@ -15,6 +15,7 @@ var _phoneCountries = require("../shared/phoneCountries");
|
|
|
15
15
|
var _contactTypeUtils = require("../shared/contactTypeUtils");
|
|
16
16
|
var _profileIcons = require("../../icons-svg/profileIcons");
|
|
17
17
|
var _contactIcons = require("../../icons-svg/contactIcons");
|
|
18
|
+
var _responsiveActionButton = require("../../ui/responsiveActionButton");
|
|
18
19
|
function toText(value) {
|
|
19
20
|
if (!value) return '';
|
|
20
21
|
if (typeof value === 'string') return value;
|
|
@@ -111,7 +112,7 @@ function renderAddresses(addresses) {
|
|
|
111
112
|
if (!addresses || !addresses.length || !addresses[0]) return (0, _litHtml.html)``;
|
|
112
113
|
return (0, _litHtml.html)`${renderAddress(addresses[0])}${addresses.length > 1 ? renderAddresses(addresses.slice(1)) : (0, _litHtml.html)``}`;
|
|
113
114
|
}
|
|
114
|
-
function renderContactInfoSectionDefault(store, subject, contactInfo, viewerMode, onSaved) {
|
|
115
|
+
function renderContactInfoSectionDefault(store, subject, contactInfo, viewerMode, layout, onSaved) {
|
|
115
116
|
const hasAnyContactInfo = contactInfo?.emails.length > 0 || contactInfo?.phones.length > 0 || contactInfo?.addresses.length > 0;
|
|
116
117
|
const isOwner = viewerMode === 'owner';
|
|
117
118
|
return (0, _litHtml.html)`
|
|
@@ -127,27 +128,18 @@ function renderContactInfoSectionDefault(store, subject, contactInfo, viewerMode
|
|
|
127
128
|
<h3 id="contact-details-heading" tabindex="-1">${_texts.contactInfoHeadingText}</h3>
|
|
128
129
|
<div class="profile-section-collapsible__actions">
|
|
129
130
|
${isOwner ? (0, _litHtml.html)`
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}}
|
|
139
|
-
|
|
140
|
-
<span class="profile-section-collapsible__edit-label profile__add-more-content">
|
|
141
|
-
<span class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
142
|
-
<span>Add More</span>
|
|
143
|
-
</span>
|
|
144
|
-
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
145
|
-
</solid-ui-button>
|
|
146
|
-
` : (0, _litHtml.html)``}
|
|
131
|
+
${(0, _responsiveActionButton.renderResponsiveActionButton)({
|
|
132
|
+
layout,
|
|
133
|
+
className: 'profile-section-collapsible__edit-button',
|
|
134
|
+
ariaLabel: 'Edit contact information',
|
|
135
|
+
onClick: event => (0, _ContactInfoEditDialog.createContactInfoEditDialog)(event, store, subject, contactInfo, viewerMode, onSaved),
|
|
136
|
+
desktopIcon: (0, _litHtml.html)`<span slot="left-icon" class="profile-section-collapsible__action-label profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>`,
|
|
137
|
+
desktopLabel: 'Add More',
|
|
138
|
+
mobileIcon: (0, _litHtml.html)`<span slot="icon" class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>`
|
|
139
|
+
})}
|
|
140
|
+
` : _litHtml.nothing}
|
|
147
141
|
<solid-ui-button
|
|
148
|
-
|
|
149
|
-
variant="icon"
|
|
150
|
-
size="sm"
|
|
142
|
+
variant="ghost"
|
|
151
143
|
class="profile-section-collapsible__toggle-button"
|
|
152
144
|
aria-label="Toggle contact information section"
|
|
153
145
|
aria-controls="contact-details-panel"
|
|
@@ -174,24 +166,21 @@ function renderContactInfoSectionDefault(store, subject, contactInfo, viewerMode
|
|
|
174
166
|
${renderAddresses(contactInfo.addresses)}
|
|
175
167
|
</ul>
|
|
176
168
|
` : (0, _litHtml.html)``}
|
|
177
|
-
${hasAnyContactInfo ?
|
|
169
|
+
${hasAnyContactInfo ? _litHtml.nothing : (0, _litHtml.html)`<p>No contact details added yet.</p>`}
|
|
178
170
|
</div>
|
|
179
171
|
</section>
|
|
180
172
|
`;
|
|
181
173
|
}
|
|
182
|
-
function renderOwnerEmptyContactInfoContent(
|
|
174
|
+
function renderOwnerEmptyContactInfoContent() {
|
|
183
175
|
return (0, _litHtml.html)`
|
|
184
176
|
<div class="profile__empty-state-content" role="group" aria-label="Empty contact information section">
|
|
185
177
|
<div class="contact-info__empty-icon-wrapper">
|
|
186
178
|
<span class="contact-info__empty-icon">${_profileIcons.envelopeIcon}</span>
|
|
187
179
|
</div>
|
|
188
|
-
<p class="profile__empty-state-message contact-info__empty-message">
|
|
189
|
-
No additional contact info added yet.
|
|
190
|
-
</p>
|
|
191
180
|
</div>
|
|
192
181
|
`;
|
|
193
182
|
}
|
|
194
|
-
function renderOwnerEmptyContactInfoSection(store, subject, contactInfo, viewerMode, onSaved) {
|
|
183
|
+
function renderOwnerEmptyContactInfoSection(store, subject, contactInfo, viewerMode, layout, onSaved) {
|
|
195
184
|
return (0, _litHtml.html)`
|
|
196
185
|
<section
|
|
197
186
|
aria-labelledby="contact-details-heading"
|
|
@@ -204,23 +193,19 @@ function renderOwnerEmptyContactInfoSection(store, subject, contactInfo, viewerM
|
|
|
204
193
|
<header class="profile__section-header profile-section-collapsible__header">
|
|
205
194
|
<h3 id="contact-details-heading" tabindex="-1">${_texts.contactInfoEmptyHeadingText}</h3>
|
|
206
195
|
<div class="profile-section-collapsible__actions">
|
|
196
|
+
${(0, _responsiveActionButton.renderResponsiveActionButton)({
|
|
197
|
+
layout,
|
|
198
|
+
className: 'profile-section-collapsible__edit-button',
|
|
199
|
+
ariaLabel: 'Add contact information',
|
|
200
|
+
onClick: event => {
|
|
201
|
+
return (0, _ContactInfoEditDialog.createContactInfoEditDialog)(event, store, subject, contactInfo, viewerMode, onSaved);
|
|
202
|
+
},
|
|
203
|
+
desktopIcon: (0, _litHtml.html)`<span slot="left-icon" class="profile-section-collapsible__action-label profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>`,
|
|
204
|
+
desktopLabel: 'Add More',
|
|
205
|
+
mobileIcon: (0, _litHtml.html)`<span slot="icon" class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>`
|
|
206
|
+
})}
|
|
207
207
|
<solid-ui-button
|
|
208
|
-
|
|
209
|
-
variant="secondary"
|
|
210
|
-
size="sm"
|
|
211
|
-
class="profile__action-button profile-action-text profile-section-collapsible__edit-button"
|
|
212
|
-
aria-label="Add contact information"
|
|
213
|
-
@click=${event => {
|
|
214
|
-
return (0, _ContactInfoEditDialog.createContactInfoEditDialog)(event, store, subject, contactInfo, viewerMode, onSaved);
|
|
215
|
-
}}
|
|
216
|
-
>
|
|
217
|
-
<span class="profile-section-collapsible__edit-label">${_profileIcons.addIcon} Add More</span>
|
|
218
|
-
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
219
|
-
</solid-ui-button>
|
|
220
|
-
<solid-ui-button
|
|
221
|
-
type="button"
|
|
222
|
-
variant="icon"
|
|
223
|
-
size="sm"
|
|
208
|
+
variant="ghost"
|
|
224
209
|
class="profile-section-collapsible__toggle-button"
|
|
225
210
|
aria-label="Toggle contact information section"
|
|
226
211
|
aria-controls="contact-details-panel"
|
|
@@ -232,12 +217,13 @@ function renderOwnerEmptyContactInfoSection(store, subject, contactInfo, viewerM
|
|
|
232
217
|
</div>
|
|
233
218
|
</header>
|
|
234
219
|
<div id="contact-details-panel" class="profile-section-collapsible__content">
|
|
235
|
-
${renderOwnerEmptyContactInfoContent(
|
|
220
|
+
${renderOwnerEmptyContactInfoContent()}
|
|
236
221
|
</div>
|
|
237
222
|
</section>
|
|
238
223
|
`;
|
|
239
224
|
}
|
|
240
|
-
function renderContactInfoSection(store, subject, contactInfo, viewerMode, onSaved) {
|
|
225
|
+
function renderContactInfoSection(store, subject, contactInfo, viewerMode, layout, onSaved) {
|
|
226
|
+
const currentLayout = layout || 'desktop';
|
|
241
227
|
const safeContactInfo = {
|
|
242
228
|
emails: contactInfo?.emails || [],
|
|
243
229
|
phones: contactInfo?.phones || [],
|
|
@@ -245,8 +231,7 @@ function renderContactInfoSection(store, subject, contactInfo, viewerMode, onSav
|
|
|
245
231
|
};
|
|
246
232
|
const hasAnyContactInfo = safeContactInfo.emails.length > 0 || safeContactInfo.phones.length > 0 || safeContactInfo.addresses.length > 0;
|
|
247
233
|
const showOwnerEmptyContactInfo = !hasAnyContactInfo && viewerMode === 'owner';
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
` : '';
|
|
234
|
+
return (0, _litHtml.html)`
|
|
235
|
+
${showOwnerEmptyContactInfo ? renderOwnerEmptyContactInfoSection(store, subject, safeContactInfo, viewerMode, currentLayout, onSaved) : renderContactInfoSectionDefault(store, subject, safeContactInfo, viewerMode, currentLayout, onSaved)}
|
|
236
|
+
`;
|
|
252
237
|
}
|
|
@@ -4,5 +4,5 @@ import { ViewerMode } from '../../types';
|
|
|
4
4
|
import './EducationSection.css';
|
|
5
5
|
import { LiveStore, NamedNode } from 'rdflib';
|
|
6
6
|
export declare const EducationCard: (educationData: EducationDetails[]) => import("lit-html").TemplateResult<1>;
|
|
7
|
-
export declare function renderEducationSection(store: LiveStore, subject: NamedNode, educationData: EducationDetails[], viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): import("lit-html").TemplateResult<1
|
|
7
|
+
export declare function renderEducationSection(store: LiveStore, subject: NamedNode, educationData: EducationDetails[], viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): import("lit-html").TemplateResult<1>;
|
|
8
8
|
//# sourceMappingURL=EducationSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EducationSection.d.ts","sourceRoot":"","sources":["../../../src/sections/education/EducationSection.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AA4E7C,eAAO,MAAM,aAAa,GACxB,eAAe,gBAAgB,EAAE,yCAclC,CAAA;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,gBAAgB,EAAE,EACjC,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"EducationSection.d.ts","sourceRoot":"","sources":["../../../src/sections/education/EducationSection.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AA4E7C,eAAO,MAAM,aAAa,GACxB,eAAe,gBAAgB,EAAE,yCAclC,CAAA;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,gBAAgB,EAAE,EACjC,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,wCAoDrC"}
|
|
@@ -85,9 +85,8 @@ function renderEducationSection(store, subject, educationData, viewerMode, onSav
|
|
|
85
85
|
const educationCard = EducationCard(educationData);
|
|
86
86
|
const educationDetails = educationData || [];
|
|
87
87
|
const hasEducation = educationDetails && educationDetails.length > 0;
|
|
88
|
-
const showSection = true;
|
|
89
88
|
const isOwner = viewerMode === 'owner';
|
|
90
|
-
return
|
|
89
|
+
return (0, _litHtml.html)`
|
|
91
90
|
<section
|
|
92
91
|
aria-labelledby="education-heading"
|
|
93
92
|
class="profile__section profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
|
|
@@ -129,5 +128,5 @@ function renderEducationSection(store, subject, educationData, viewerMode, onSav
|
|
|
129
128
|
${hasEducation ? educationCard : (0, _litHtml.html)`<p>No education details added yet.</p>`}
|
|
130
129
|
</div>
|
|
131
130
|
</section>
|
|
132
|
-
|
|
131
|
+
`;
|
|
133
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/heading/HeadingEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAA;AACnC,OAAO,4BAA4B,CAAA;AACnC,OAAO,mCAAmC,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAwC,MAAM,SAAS,CAAA;AAE9E,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"HeadingEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/heading/HeadingEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAA;AACnC,OAAO,4BAA4B,CAAA;AACnC,OAAO,mCAAmC,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAwC,MAAM,SAAS,CAAA;AAE9E,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAu6BxC,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,cAAc,EAC3B,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBA6ErC"}
|
|
@@ -618,10 +618,8 @@ function renderHeadingInfoInput(formState, rerender) {
|
|
|
618
618
|
<div class="profile-edit-dialog__image-frame">
|
|
619
619
|
${(0, _HeadingSection.Image)(imagePreviewSrc || basicInfo.imageSrc, basicInfo.name)}
|
|
620
620
|
<solid-ui-button
|
|
621
|
-
type="button"
|
|
622
621
|
class="profile-edit-dialog__image-camera-button"
|
|
623
|
-
variant="
|
|
624
|
-
size="md"
|
|
622
|
+
variant="ghost"
|
|
625
623
|
aria-label="Take a photo"
|
|
626
624
|
title="Take a photo"
|
|
627
625
|
@click=${handleCameraClick}
|
|
@@ -637,10 +635,7 @@ function renderHeadingInfoInput(formState, rerender) {
|
|
|
637
635
|
|
|
638
636
|
<div class="profile-edit-dialog__image-preview-actions">
|
|
639
637
|
<solid-ui-button
|
|
640
|
-
type="button"
|
|
641
638
|
variant="secondary"
|
|
642
|
-
size="md"
|
|
643
|
-
label="Upload New"
|
|
644
639
|
class="profile-edit-dialog__image-button profile-edit-dialog__image-upload-button"
|
|
645
640
|
aria-label="Upload new profile photo"
|
|
646
641
|
title="Upload New"
|
|
@@ -649,10 +644,7 @@ function renderHeadingInfoInput(formState, rerender) {
|
|
|
649
644
|
Upload New
|
|
650
645
|
</solid-ui-button>
|
|
651
646
|
<solid-ui-button
|
|
652
|
-
type="button"
|
|
653
647
|
variant="secondary"
|
|
654
|
-
size="md"
|
|
655
|
-
label="Remove"
|
|
656
648
|
class="profile-edit-dialog__image-button profile-edit-dialog__image-remove-button"
|
|
657
649
|
aria-label="Delete profile photo"
|
|
658
650
|
title="Remove"
|