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
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
|
2
|
-
import 'solid-ui/components/button';
|
|
3
2
|
import './HeadingSection.css';
|
|
4
3
|
import { ProfileDetails } from './types';
|
|
5
4
|
import { DataBrowserContext } from 'pane-registry';
|
|
6
5
|
import { NamedNode } from 'rdflib';
|
|
7
|
-
import { ViewerMode } from '../../types';
|
|
8
|
-
export declare const renderHeadingSection: (context: DataBrowserContext, subject: NamedNode, profileData: ProfileDetails, viewerMode: ViewerMode, onSaved?: () => Promise<void> | void) => Promise<TemplateResult<1>>;
|
|
6
|
+
import { Layout, ViewerMode } from '../../types';
|
|
7
|
+
export declare const renderHeadingSection: (context: DataBrowserContext, subject: NamedNode, profileData: ProfileDetails, viewerMode: ViewerMode, layout: Layout, onSaved?: () => Promise<void> | void) => Promise<TemplateResult<1>>;
|
|
9
8
|
export declare const Image: (src: any, alt: any) => TemplateResult<1>;
|
|
10
9
|
//# sourceMappingURL=HeadingSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingSection.d.ts","sourceRoot":"","sources":["../../../src/sections/heading/HeadingSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"HeadingSection.d.ts","sourceRoot":"","sources":["../../../src/sections/heading/HeadingSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAqBhD,eAAO,MAAM,oBAAoB,GAC/B,SAAS,kBAAkB,EAC3B,SAAS,SAAS,EAClB,aAAa,cAAc,EAC3B,YAAY,UAAU,EACtB,QAAQ,MAAM,EACd,UAAU,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,+BA6DrC,CAAA;AAaD,eAAO,MAAM,KAAK,GAAI,QAAG,EAAE,QAAG,sBAmB7B,CAAA"}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.renderHeadingSection = exports.Image = void 0;
|
|
7
7
|
var _litHtml = require("lit-html");
|
|
8
|
-
require("solid-ui/components/button");
|
|
9
8
|
require("./HeadingSection.css");
|
|
10
9
|
var _HeadingEditDialog = require("./HeadingEditDialog");
|
|
11
10
|
var _textUtils = require("../../textUtils");
|
|
@@ -13,8 +12,8 @@ var _dateHelpers = require("./dateHelpers");
|
|
|
13
12
|
var _profileIcons = require("../../icons-svg/profileIcons");
|
|
14
13
|
var _contactIcons = require("../../icons-svg/contactIcons");
|
|
15
14
|
var _addMeToYourFriends = require("../../specialButtons/addMeToYourFriends");
|
|
16
|
-
var _addMeToYourContacts = require("../../specialButtons/addContact/addMeToYourContacts");
|
|
17
15
|
var _imageHelpers = require("./imageHelpers");
|
|
16
|
+
var _responsiveActionButton = require("../../ui/responsiveActionButton");
|
|
18
17
|
const showHeadingImageFallback = event => {
|
|
19
18
|
const image = event.currentTarget;
|
|
20
19
|
const frame = image?.parentElement;
|
|
@@ -24,7 +23,8 @@ const showHeadingImageFallback = event => {
|
|
|
24
23
|
image.hidden = true;
|
|
25
24
|
frame.classList.add('profile__image-frame--fallback');
|
|
26
25
|
};
|
|
27
|
-
const renderHeadingSection = async (context, subject, profileData, viewerMode, onSaved) => {
|
|
26
|
+
const renderHeadingSection = async (context, subject, profileData, viewerMode, layout, onSaved) => {
|
|
27
|
+
const currentLayout = layout || 'desktop';
|
|
28
28
|
const {
|
|
29
29
|
name,
|
|
30
30
|
pronouns,
|
|
@@ -38,7 +38,6 @@ const renderHeadingSection = async (context, subject, profileData, viewerMode, o
|
|
|
38
38
|
const resolvedImageSrc = await (0, _imageHelpers.resolvePhotoDisplaySrc)(context.session.store, imageSrc);
|
|
39
39
|
const isOwner = viewerMode === 'owner';
|
|
40
40
|
const isAuthenticatedViewer = viewerMode === 'authenticated';
|
|
41
|
-
const contactsButton = isAuthenticatedViewer ? await (0, _addMeToYourContacts.addMeToYourContactsDiv)(subject, context) : _litHtml.nothing;
|
|
42
41
|
const friendsButton = isAuthenticatedViewer ? (0, _addMeToYourFriends.addMeToYourFriendsDiv)(subject, context, viewerMode) : _litHtml.nothing;
|
|
43
42
|
const phoneValue = (0, _textUtils.toText)(primaryPhone?.valueNode).replace(/^tel:/i, '');
|
|
44
43
|
const emailValue = (0, _textUtils.toText)(primaryEmail?.valueNode).replace(/^mailto:/i, '');
|
|
@@ -61,26 +60,21 @@ const renderHeadingSection = async (context, subject, profileData, viewerMode, o
|
|
|
61
60
|
${isOwner || isAuthenticatedViewer ? (0, _litHtml.html)`
|
|
62
61
|
${isAuthenticatedViewer ? (0, _litHtml.html)`
|
|
63
62
|
<div class="profile__actions profile__heading-actions">
|
|
64
|
-
${contactsButton}
|
|
65
63
|
${friendsButton}
|
|
66
64
|
</div>
|
|
67
65
|
` : _litHtml.nothing}
|
|
68
66
|
${isOwner ? (0, _litHtml.html)`
|
|
69
67
|
<div class="profile__actions profile__heading-edit-action">
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}}
|
|
79
|
-
|
|
80
|
-
<span class="profile-section-collapsible__edit-label">${_profileIcons.editIcon} Edit</span>
|
|
81
|
-
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
82
|
-
</solid-ui-button>
|
|
83
|
-
</div>
|
|
68
|
+
${(0, _responsiveActionButton.renderResponsiveActionButton)({
|
|
69
|
+
layout: currentLayout,
|
|
70
|
+
className: 'profile-section-collapsible__edit-button',
|
|
71
|
+
ariaLabel: 'Add or edit heading information',
|
|
72
|
+
onClick: event => (0, _HeadingEditDialog.createHeadingEditDialog)(event, context.session.store, subject, profileData, viewerMode, onSaved),
|
|
73
|
+
desktopIcon: (0, _litHtml.html)`<span slot="left-icon" class="profile-section-collapsible__action-label profile__add-more-icon" aria-hidden="true">${_profileIcons.editIcon}</span>`,
|
|
74
|
+
desktopLabel: 'Edit',
|
|
75
|
+
mobileIcon: (0, _litHtml.html)`<span slot="icon" class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>`
|
|
76
|
+
})}
|
|
77
|
+
</div>
|
|
84
78
|
` : _litHtml.nothing}
|
|
85
79
|
` : _litHtml.nothing}
|
|
86
80
|
<div class="profile__details">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/languages/LanguageEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAe,MAAM,SAAS,CAAA;AACtD,OAAO,8BAA8B,CAAA;AACrC,OAAO,0CAA0C,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"LanguageEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/languages/LanguageEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAe,MAAM,SAAS,CAAA;AACtD,OAAO,8BAA8B,CAAA;AACrC,OAAO,0CAA0C,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAsmBxC,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,eAAe,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAgDrC"}
|
|
@@ -15,6 +15,9 @@ var _textUtils = require("../../textUtils");
|
|
|
15
15
|
var _mutations = require("./mutations");
|
|
16
16
|
var _profileIcons = require("../../icons-svg/profileIcons");
|
|
17
17
|
var _texts = require("../../texts");
|
|
18
|
+
/* combobox isn't working because the design system
|
|
19
|
+
one doesn't work with search data */
|
|
20
|
+
|
|
18
21
|
const WIKIDATA_LANGUAGE_ENDPOINT = 'https://query.wikidata.org/sparql';
|
|
19
22
|
const LANGUAGE_OBJECT_URI_BASE = 'https://www.w3.org/ns/iana/language-code/';
|
|
20
23
|
function sanitizeLanguageFieldValue(value) {
|
|
@@ -280,10 +283,8 @@ function renderLanguageInputRow({
|
|
|
280
283
|
@drop=${event => onDrop(event, index)}
|
|
281
284
|
>
|
|
282
285
|
<solid-ui-button
|
|
283
|
-
type="button"
|
|
284
286
|
class="profile-edit-dialog__drag-handle"
|
|
285
|
-
variant="
|
|
286
|
-
size="md"
|
|
287
|
+
variant="ghost"
|
|
287
288
|
aria-label=${`Reorder language ${displayIndex + 1}`}
|
|
288
289
|
title="Drag to reorder"
|
|
289
290
|
draggable="true"
|
|
@@ -294,7 +295,7 @@ function renderLanguageInputRow({
|
|
|
294
295
|
@pointerup=${event => onPointerUp(event)}
|
|
295
296
|
@pointercancel=${event => onPointerCancel(event)}
|
|
296
297
|
>
|
|
297
|
-
<span slot="icon"
|
|
298
|
+
<span slot="icon" aria-hidden="true">${_profileIcons.bentoIcon}</span>
|
|
298
299
|
</solid-ui-button>
|
|
299
300
|
<label aria-label=${`${label} Language`} class="label profile-edit-dialog__field profile-edit-dialog__field--language-name">
|
|
300
301
|
<solid-ui-combobox
|
|
@@ -306,7 +307,7 @@ function renderLanguageInputRow({
|
|
|
306
307
|
></solid-ui-combobox>
|
|
307
308
|
<small class="profile-edit-dialog__input-help-text">Type to search and select one language suggestion.</small>
|
|
308
309
|
</label>
|
|
309
|
-
<label aria-label=${proficiencyLabel} class="label" hidden>
|
|
310
|
+
<label aria-label=${proficiencyLabel} class="label profile-edit-dialog__field-type profile-edit-dialog__field-type--language-proficiency" hidden>
|
|
310
311
|
<select name=${proficiencyInputName} id=${proficiencySelectId} @change=${handleProficiencyInput} .value=${row?.proficiency || ''}>
|
|
311
312
|
<option value="Basic">Basic</option>
|
|
312
313
|
<option value="Intermediate">Intermediate</option>
|
|
@@ -315,9 +316,7 @@ function renderLanguageInputRow({
|
|
|
315
316
|
</label>
|
|
316
317
|
<div class="profile-edit-dialog__actions profile-edit-dialog__actions--edge profile-edit-dialog__actions--language">
|
|
317
318
|
<solid-ui-button
|
|
318
|
-
|
|
319
|
-
variant="icon"
|
|
320
|
-
size="md"
|
|
319
|
+
variant="ghost"
|
|
321
320
|
class="profile-edit-dialog__delete-button"
|
|
322
321
|
aria-label=${`Delete language ${displayIndex + 1}`}
|
|
323
322
|
title=${_texts.deleteEntryButtonTitleText}
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
margin: 0;
|
|
11
11
|
padding: 0;
|
|
12
12
|
align-items: flex-start;
|
|
13
|
-
gap:
|
|
13
|
+
gap: 15px;
|
|
14
14
|
align-self: stretch;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.languages__item-label {
|
|
18
18
|
color: var(--color-text-subheading, var(--gray-900, #101828));
|
|
19
|
-
font-size: var(--font-size-md, 1rem);
|
|
20
|
-
font-weight:
|
|
19
|
+
font-size: var(--solid-ui-font-size-md, 1rem);
|
|
20
|
+
font-weight: 500;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/* Empty state */
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
:is(.profile-pane-host, .profile-pane-root)[data-layout='mobile'] .languages__item-label {
|
|
40
|
-
font-size: var(--font-size-sm, 0.875rem);
|
|
40
|
+
font-size: var(--solid-ui-font-size-sm, 0.875rem);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
@media (max-width: 576px) {
|
|
44
44
|
.languages__item-label {
|
|
45
|
-
font-size: var(--font-size-sm, 0.875rem);
|
|
45
|
+
font-size: var(--solid-ui-font-size-sm, 0.875rem);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
@container profile-pane (max-width: 576px) {
|
|
50
50
|
.languages__item-label {
|
|
51
|
-
font-size: var(--font-size-sm, 0.875rem);
|
|
51
|
+
font-size: var(--solid-ui-font-size-sm, 0.875rem);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'solid-ui/components/button';
|
|
2
2
|
import { LiveStore, NamedNode } from 'rdflib';
|
|
3
|
-
import { ViewerMode } from '../../types';
|
|
3
|
+
import { Layout, ViewerMode } from '../../types';
|
|
4
4
|
import './LanguageSection.css';
|
|
5
5
|
import { LanguageDetails } from './types';
|
|
6
|
-
export declare function renderLanguageSection(store: LiveStore, subject: NamedNode, languages: LanguageDetails[], viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): import("lit-html").TemplateResult<1
|
|
6
|
+
export declare function renderLanguageSection(store: LiveStore, subject: NamedNode, languages: LanguageDetails[], viewerMode: ViewerMode, layout: Layout, onSaved?: () => Promise<void> | void): import("lit-html").TemplateResult<1>;
|
|
7
7
|
//# sourceMappingURL=LanguageSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSection.d.ts","sourceRoot":"","sources":["../../../src/sections/languages/LanguageSection.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"LanguageSection.d.ts","sourceRoot":"","sources":["../../../src/sections/languages/LanguageSection.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAkJzC,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,eAAe,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,wCAarC"}
|
|
@@ -12,6 +12,7 @@ var _LanguageEditDialog = require("./LanguageEditDialog");
|
|
|
12
12
|
var _profileIcons = require("../../icons-svg/profileIcons");
|
|
13
13
|
var _texts = require("../../texts");
|
|
14
14
|
var _collapsibleSection = require("../shared/collapsibleSection");
|
|
15
|
+
var _responsiveActionButton = require("../../ui/responsiveActionButton");
|
|
15
16
|
function renderLan(language, asList = false) {
|
|
16
17
|
if (!language) return (0, _litHtml.html)``;
|
|
17
18
|
return asList ? (0, _litHtml.html)`<li class="languages__item-label" role="listitem">${language.name}</li>` : (0, _litHtml.html)``;
|
|
@@ -20,7 +21,7 @@ function renderLanguages(languages, asList = false) {
|
|
|
20
21
|
if (!languages || !languages.length || !languages[0]) return (0, _litHtml.html)``;
|
|
21
22
|
return (0, _litHtml.html)`${renderLan(languages[0], asList)}${languages.length > 1 ? renderLanguages(languages.slice(1), asList) : (0, _litHtml.html)``}`;
|
|
22
23
|
}
|
|
23
|
-
function renderLanguagesSectionDefault(store, subject, languages, viewerMode, onSaved) {
|
|
24
|
+
function renderLanguagesSectionDefault(store, subject, languages, viewerMode, layout, onSaved) {
|
|
24
25
|
const hasLanguages = Array.isArray(languages) && languages.length > 0;
|
|
25
26
|
const hasLanguageLinks = store.each(subject, _solidUi.ns.schema('knowsLanguage')).length > 0;
|
|
26
27
|
const isOwner = viewerMode === 'owner';
|
|
@@ -37,25 +38,18 @@ function renderLanguagesSectionDefault(store, subject, languages, viewerMode, on
|
|
|
37
38
|
<h3 id="languages-heading">${_texts.languagesHeadingText}</h3>
|
|
38
39
|
<div class="profile-section-collapsible__actions">
|
|
39
40
|
${isOwner ? (0, _litHtml.html)`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<span>Add More</span>
|
|
51
|
-
</span>
|
|
52
|
-
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
53
|
-
</solid-ui-button>
|
|
54
|
-
` : (0, _litHtml.html)``}
|
|
41
|
+
${(0, _responsiveActionButton.renderResponsiveActionButton)({
|
|
42
|
+
layout,
|
|
43
|
+
className: 'profile-section-collapsible__edit-button',
|
|
44
|
+
ariaLabel: 'Add or edit languages',
|
|
45
|
+
onClick: event => (0, _LanguageEditDialog.createLanguageEditDialog)(event, store, subject, languages, viewerMode, onSaved),
|
|
46
|
+
desktopIcon: (0, _litHtml.html)`<span slot="left-icon" class="profile-section-collapsible__action-label profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>`,
|
|
47
|
+
desktopLabel: 'Add More',
|
|
48
|
+
mobileIcon: (0, _litHtml.html)`<span slot="icon" class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>`
|
|
49
|
+
})}
|
|
50
|
+
` : _litHtml.nothing}
|
|
55
51
|
<solid-ui-button
|
|
56
|
-
|
|
57
|
-
variant="icon"
|
|
58
|
-
size="sm"
|
|
52
|
+
variant="ghost"
|
|
59
53
|
class="profile-section-collapsible__toggle-button"
|
|
60
54
|
aria-label="Toggle languages section"
|
|
61
55
|
aria-controls="languages-panel"
|
|
@@ -76,19 +70,16 @@ function renderLanguagesSectionDefault(store, subject, languages, viewerMode, on
|
|
|
76
70
|
</section>
|
|
77
71
|
`;
|
|
78
72
|
}
|
|
79
|
-
function renderOwnerEmptyLanguagesContent(
|
|
73
|
+
function renderOwnerEmptyLanguagesContent() {
|
|
80
74
|
return (0, _litHtml.html)`
|
|
81
75
|
<div class="profile__empty-state-content" role="group" aria-label="Empty languages section">
|
|
82
76
|
<div class="languages__empty-icon-wrapper">
|
|
83
77
|
<span class="languages__empty-icon">${_profileIcons.commentIcon}</span>
|
|
84
78
|
</div>
|
|
85
|
-
<p class="profile__empty-state-message languages__empty-message">
|
|
86
|
-
No languages added yet.
|
|
87
|
-
</p>
|
|
88
79
|
</div>
|
|
89
80
|
`;
|
|
90
81
|
}
|
|
91
|
-
function renderOwnerEmptyLanguagesSection(store, subject, languages, viewerMode, onSaved) {
|
|
82
|
+
function renderOwnerEmptyLanguagesSection(store, subject, languages, viewerMode, layout, onSaved) {
|
|
92
83
|
return (0, _litHtml.html)`
|
|
93
84
|
<section
|
|
94
85
|
aria-labelledby="languages-heading"
|
|
@@ -101,26 +92,19 @@ function renderOwnerEmptyLanguagesSection(store, subject, languages, viewerMode,
|
|
|
101
92
|
<header class="profile__section-header profile-section-collapsible__header">
|
|
102
93
|
<h3 id="languages-heading" tabindex="-1">${_texts.languagesHeadingText}</h3>
|
|
103
94
|
<div class="profile-section-collapsible__actions">
|
|
95
|
+
${(0, _responsiveActionButton.renderResponsiveActionButton)({
|
|
96
|
+
layout,
|
|
97
|
+
className: 'profile-section-collapsible__edit-button',
|
|
98
|
+
ariaLabel: 'Add languages',
|
|
99
|
+
onClick: event => {
|
|
100
|
+
return (0, _LanguageEditDialog.createLanguageEditDialog)(event, store, subject, languages, viewerMode, onSaved);
|
|
101
|
+
},
|
|
102
|
+
desktopIcon: (0, _litHtml.html)`<span slot="left-icon" class="profile-section-collapsible__action-label profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>`,
|
|
103
|
+
desktopLabel: 'Add More',
|
|
104
|
+
mobileIcon: (0, _litHtml.html)`<span slot="icon" class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>`
|
|
105
|
+
})}
|
|
104
106
|
<solid-ui-button
|
|
105
|
-
|
|
106
|
-
variant="secondary"
|
|
107
|
-
size="sm"
|
|
108
|
-
class="profile__action-button profile-action-text profile-section-collapsible__edit-button"
|
|
109
|
-
aria-label="Add languages"
|
|
110
|
-
@click=${event => {
|
|
111
|
-
return (0, _LanguageEditDialog.createLanguageEditDialog)(event, store, subject, languages, viewerMode, onSaved);
|
|
112
|
-
}}
|
|
113
|
-
>
|
|
114
|
-
<span class="profile-section-collapsible__edit-label profile__add-more-content">
|
|
115
|
-
<span class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
|
|
116
|
-
<span>Add More</span>
|
|
117
|
-
</span>
|
|
118
|
-
<span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
|
|
119
|
-
</solid-ui-button>
|
|
120
|
-
<solid-ui-button
|
|
121
|
-
type="button"
|
|
122
|
-
variant="icon"
|
|
123
|
-
size="sm"
|
|
107
|
+
variant="ghost"
|
|
124
108
|
class="profile-section-collapsible__toggle-button"
|
|
125
109
|
aria-label="Toggle languages section"
|
|
126
110
|
aria-controls="languages-panel"
|
|
@@ -132,17 +116,17 @@ function renderOwnerEmptyLanguagesSection(store, subject, languages, viewerMode,
|
|
|
132
116
|
</div>
|
|
133
117
|
</header>
|
|
134
118
|
<div id="languages-panel" class="profile-section-collapsible__content">
|
|
135
|
-
${renderOwnerEmptyLanguagesContent(
|
|
119
|
+
${renderOwnerEmptyLanguagesContent()}
|
|
136
120
|
</div>
|
|
137
121
|
</section>
|
|
138
122
|
`;
|
|
139
123
|
}
|
|
140
|
-
function renderLanguageSection(store, subject, languages, viewerMode, onSaved) {
|
|
124
|
+
function renderLanguageSection(store, subject, languages, viewerMode, layout, onSaved) {
|
|
125
|
+
const currentLayout = layout || 'desktop';
|
|
141
126
|
const safeLanguages = languages || [];
|
|
142
127
|
const hasLanguages = Array.isArray(safeLanguages) && safeLanguages.length > 0;
|
|
143
128
|
const showOwnerEmptyLanguages = !hasLanguages && viewerMode === 'owner';
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
` : '';
|
|
129
|
+
return (0, _litHtml.html)`
|
|
130
|
+
${showOwnerEmptyLanguages ? renderOwnerEmptyLanguagesSection(store, subject, safeLanguages, viewerMode, currentLayout, onSaved) : renderLanguagesSectionDefault(store, subject, safeLanguages, viewerMode, currentLayout, onSaved)}
|
|
131
|
+
`;
|
|
148
132
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import 'solid-ui/components/button';
|
|
2
2
|
import { ProjectDetails } from './types';
|
|
3
3
|
import '../../styles/EditDialogs.css';
|
|
4
|
-
import '../contactInfo/ContactInfoEditDialog.css';
|
|
5
4
|
import { LiveStore, NamedNode } from 'rdflib';
|
|
6
5
|
import { ViewerMode } from '../../types';
|
|
7
6
|
export declare function createProjectsEditDialog(event: Event, store: LiveStore, subject: NamedNode, projects: ProjectDetails[], viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/projects/ProjectEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,cAAc,EAAc,MAAM,SAAS,CAAA;AACpD,OAAO,8BAA8B,CAAA;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"ProjectEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/projects/ProjectEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,cAAc,EAAc,MAAM,SAAS,CAAA;AACpD,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAqJxC,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAuCrC"}
|
|
@@ -8,7 +8,6 @@ var _dialog = require("../../ui/dialog");
|
|
|
8
8
|
var _litHtml = require("lit-html");
|
|
9
9
|
require("solid-ui/components/button");
|
|
10
10
|
require("../../styles/EditDialogs.css");
|
|
11
|
-
require("../contactInfo/ContactInfoEditDialog.css");
|
|
12
11
|
var _rowState = require("../shared/rowState");
|
|
13
12
|
var _textUtils = require("../../textUtils");
|
|
14
13
|
var _mutations = require("./mutations");
|
|
@@ -94,16 +93,13 @@ function renderProjectInputRow(row, onChange) {
|
|
|
94
93
|
@input=${handleUrlInput}
|
|
95
94
|
/>
|
|
96
95
|
<solid-ui-button
|
|
97
|
-
|
|
98
|
-
variant="secondary"
|
|
99
|
-
size="md"
|
|
100
|
-
label="Paste"
|
|
96
|
+
variant="tertiary"
|
|
101
97
|
class="profile-edit-dialog__paste-button"
|
|
102
98
|
aria-label="Paste project or community URL from clipboard"
|
|
103
99
|
title=${_texts.pasteEntryButtonTitleText}
|
|
104
100
|
@click=${handlePaste}
|
|
105
101
|
>
|
|
106
|
-
<span slot="icon" class="profile-edit-dialog__paste-icon" aria-hidden="true">${_profileIcons.pasteIcon}</span>
|
|
102
|
+
<span slot="left-icon" class="profile-edit-dialog__paste-icon" aria-hidden="true">${_profileIcons.pasteIcon}</span>
|
|
107
103
|
Paste
|
|
108
104
|
</solid-ui-button>
|
|
109
105
|
</div>
|