profile-pane 3.1.4 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/lib/04567ff683933c35c465.png +0 -0
- package/lib/10163fd9b5a0e00d63a0.png +0 -0
- package/lib/1234dcb2eec2e45f252b.png +0 -0
- package/lib/20899934157df4db56cb.png +0 -0
- package/lib/33760bf79f097f449da5.png +0 -0
- package/lib/578d2b6ed32e7624164e.png +0 -0
- package/lib/5f62a5b2b7e99b9640c7.png +0 -0
- package/lib/6525766ecd288ec60129.png +0 -0
- package/lib/7800be6f6c4b5b0f4f20.png +0 -0
- package/lib/976473cf5fe24d657d4b.png +0 -0
- package/lib/ChatWithMe.d.ts +2 -1
- package/lib/ChatWithMe.d.ts.map +1 -1
- package/lib/ChatWithMe.js +3 -3
- package/lib/ProfileView.d.ts +1 -1
- package/lib/ProfileView.d.ts.map +1 -1
- package/lib/ProfileView.js +71 -131
- package/lib/ProfileViewModelPresenter.d.ts +23 -0
- package/lib/ProfileViewModelPresenter.d.ts.map +1 -0
- package/lib/ProfileViewModelPresenter.js +37 -0
- package/lib/QRCodeCard.d.ts +3 -1
- package/lib/QRCodeCard.d.ts.map +1 -1
- package/lib/QRCodeCard.js +86 -66
- package/lib/addMeToYourFriends.d.ts +3 -3
- package/lib/addMeToYourFriends.d.ts.map +1 -1
- package/lib/addMeToYourFriends.js +14 -30
- package/lib/bda84f59e7216675a208.png +0 -0
- package/lib/buttonsHelper.js +1 -1
- package/lib/cd68e8f3990ba8b2139e.png +0 -0
- package/lib/e7074a7e2cb69e51cfd3.png +0 -0
- package/lib/editProfilePane/EditCVCard.d.ts +1 -0
- package/lib/editProfilePane/EditCVCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCVCard.js +2 -1
- package/lib/editProfilePane/EditCommunitiesCard.d.ts +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditCommunitiesCard.js +2 -1
- package/lib/editProfilePane/EditContactsCard.d.ts +1 -0
- package/lib/editProfilePane/EditContactsCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditContactsCard.js +2 -0
- package/lib/editProfilePane/EditFriendsCard.d.ts +1 -1
- package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditFriendsCard.js +2 -1
- package/lib/editProfilePane/EditOtherPreferences.d.ts +1 -0
- package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -1
- package/lib/editProfilePane/EditOtherPreferences.js +1 -0
- package/lib/editProfilePane/EditProfileView.d.ts +1 -1
- package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
- package/lib/editProfilePane/EditProfileView.js +1 -1
- package/lib/editProfilePane/EditSocialCard.d.ts +1 -0
- package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -1
- package/lib/editProfilePane/EditSocialCard.js +2 -1
- package/lib/editProfilePane/editProfilePresenter.d.ts +1 -0
- package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
- package/lib/editProfilePane/editProfilePresenter.js +2 -0
- package/lib/f3772696fb7ee53c23d8.png +0 -0
- package/lib/icons-svg/contactIcons.d.ts +3 -0
- package/lib/icons-svg/contactIcons.d.ts.map +1 -0
- package/lib/icons-svg/contactIcons.js +32 -0
- package/lib/icons-svg/profileIcons.d.ts +22 -0
- package/lib/icons-svg/profileIcons.d.ts.map +1 -0
- package/lib/icons-svg/profileIcons.js +309 -0
- package/lib/index.d.ts +1 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +42 -19
- package/lib/profile-pane.js +15629 -5666
- package/lib/profile-pane.js.map +1 -1
- package/lib/profile-pane.min.js +2171 -230
- package/lib/profile-pane.min.js.map +1 -1
- package/lib/rdfFormsHelper.d.ts +1 -0
- package/lib/rdfFormsHelper.d.ts.map +1 -1
- package/lib/rdfFormsHelper.js +2 -0
- package/lib/sections/bio/BioEditDialog.d.ts +6 -0
- package/lib/sections/bio/BioEditDialog.d.ts.map +1 -0
- package/lib/sections/bio/BioEditDialog.js +119 -0
- package/lib/sections/bio/BioSection.d.ts +7 -0
- package/lib/sections/bio/BioSection.d.ts.map +1 -0
- package/lib/sections/bio/BioSection.js +131 -0
- package/lib/sections/bio/mutations.d.ts +4 -0
- package/lib/sections/bio/mutations.d.ts.map +1 -0
- package/lib/sections/bio/mutations.js +43 -0
- package/lib/sections/bio/selectors.d.ts +4 -0
- package/lib/sections/bio/selectors.d.ts.map +1 -0
- package/lib/sections/bio/selectors.js +15 -0
- package/lib/sections/bio/types.d.ts +15 -0
- package/lib/sections/bio/types.d.ts.map +1 -0
- package/lib/sections/bio/types.js +5 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +7 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -0
- package/lib/sections/contactInfo/ContactInfoEditDialog.js +658 -0
- package/lib/sections/contactInfo/ContactInfoSection.d.ts +5 -0
- package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -0
- package/lib/sections/contactInfo/ContactInfoSection.js +229 -0
- package/lib/sections/contactInfo/mutations.d.ts +4 -0
- package/lib/sections/contactInfo/mutations.d.ts.map +1 -0
- package/lib/sections/contactInfo/mutations.js +150 -0
- package/lib/sections/contactInfo/selectors.d.ts +4 -0
- package/lib/sections/contactInfo/selectors.d.ts.map +1 -0
- package/lib/sections/contactInfo/selectors.js +104 -0
- package/lib/sections/contactInfo/types.d.ts +44 -0
- package/lib/sections/contactInfo/types.d.ts.map +1 -0
- package/lib/sections/contactInfo/types.js +5 -0
- package/lib/sections/education/EducationEditDialog.d.ts +7 -0
- package/lib/sections/education/EducationEditDialog.d.ts.map +1 -0
- package/lib/sections/education/EducationEditDialog.js +459 -0
- package/lib/sections/education/EducationSection.d.ts +7 -0
- package/lib/sections/education/EducationSection.d.ts.map +1 -0
- package/lib/sections/education/EducationSection.js +126 -0
- package/lib/sections/education/mutations.d.ts +4 -0
- package/lib/sections/education/mutations.d.ts.map +1 -0
- package/lib/sections/education/mutations.js +60 -0
- package/lib/sections/education/selectors.d.ts +4 -0
- package/lib/sections/education/selectors.d.ts.map +1 -0
- package/lib/sections/education/selectors.js +64 -0
- package/lib/sections/education/types.d.ts +20 -0
- package/lib/sections/education/types.d.ts.map +1 -0
- package/lib/sections/education/types.js +5 -0
- package/lib/sections/heading/HeadingEditDialog.d.ts +6 -0
- package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -0
- package/lib/sections/heading/HeadingEditDialog.js +742 -0
- package/lib/sections/heading/HeadingSection.d.ts +9 -0
- package/lib/sections/heading/HeadingSection.d.ts.map +1 -0
- package/lib/sections/heading/HeadingSection.js +97 -0
- package/lib/sections/heading/camera.d.ts +19 -0
- package/lib/sections/heading/camera.d.ts.map +1 -0
- package/lib/sections/heading/camera.js +199 -0
- package/lib/sections/heading/dateHelpers.d.ts +4 -0
- package/lib/sections/heading/dateHelpers.d.ts.map +1 -0
- package/lib/sections/heading/dateHelpers.js +48 -0
- package/lib/sections/heading/imageHelpers.d.ts +4 -0
- package/lib/sections/heading/imageHelpers.d.ts.map +1 -0
- package/lib/sections/heading/imageHelpers.js +81 -0
- package/lib/sections/heading/mutations.d.ts +4 -0
- package/lib/sections/heading/mutations.d.ts.map +1 -0
- package/lib/sections/heading/mutations.js +190 -0
- package/lib/sections/heading/selectors.d.ts +5 -0
- package/lib/sections/heading/selectors.d.ts.map +1 -0
- package/lib/sections/heading/selectors.js +157 -0
- package/lib/sections/heading/types.d.ts +36 -0
- package/lib/sections/heading/types.d.ts.map +1 -0
- package/lib/sections/heading/types.js +5 -0
- package/lib/sections/languages/LanguageEditDialog.d.ts +7 -0
- package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -0
- package/lib/sections/languages/LanguageEditDialog.js +457 -0
- package/lib/sections/languages/LanguageSection.d.ts +5 -0
- package/lib/sections/languages/LanguageSection.d.ts.map +1 -0
- package/lib/sections/languages/LanguageSection.js +137 -0
- package/lib/sections/languages/mutations.d.ts +6 -0
- package/lib/sections/languages/mutations.d.ts.map +1 -0
- package/lib/sections/languages/mutations.js +296 -0
- package/lib/sections/languages/selectors.d.ts +5 -0
- package/lib/sections/languages/selectors.d.ts.map +1 -0
- package/lib/sections/languages/selectors.js +146 -0
- package/lib/sections/languages/types.d.ts +15 -0
- package/lib/sections/languages/types.d.ts.map +1 -0
- package/lib/sections/languages/types.js +5 -0
- package/lib/sections/projects/ProjectEditDialog.d.ts +7 -0
- package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -0
- package/lib/sections/projects/ProjectEditDialog.js +182 -0
- package/lib/sections/projects/ProjectSection.d.ts +6 -0
- package/lib/sections/projects/ProjectSection.d.ts.map +1 -0
- package/lib/sections/projects/ProjectSection.js +220 -0
- package/lib/sections/projects/mutations.d.ts +4 -0
- package/lib/sections/projects/mutations.d.ts.map +1 -0
- package/lib/sections/projects/mutations.js +188 -0
- package/lib/sections/projects/selectors.d.ts +5 -0
- package/lib/sections/projects/selectors.d.ts.map +1 -0
- package/lib/sections/projects/selectors.js +163 -0
- package/lib/sections/projects/types.d.ts +28 -0
- package/lib/sections/projects/types.d.ts.map +1 -0
- package/lib/sections/projects/types.js +8 -0
- package/lib/sections/resume/ResumeEditDialog.d.ts +7 -0
- package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -0
- package/lib/sections/resume/ResumeEditDialog.js +629 -0
- package/lib/sections/resume/ResumeSection.d.ts +7 -0
- package/lib/sections/resume/ResumeSection.d.ts.map +1 -0
- package/lib/sections/resume/ResumeSection.js +160 -0
- package/lib/sections/resume/mutations.d.ts +6 -0
- package/lib/sections/resume/mutations.d.ts.map +1 -0
- package/lib/sections/resume/mutations.js +172 -0
- package/lib/sections/resume/selectors.d.ts +4 -0
- package/lib/sections/resume/selectors.d.ts.map +1 -0
- package/lib/sections/resume/selectors.js +142 -0
- package/lib/sections/resume/types.d.ts +33 -0
- package/lib/sections/resume/types.d.ts.map +1 -0
- package/lib/sections/resume/types.js +8 -0
- package/lib/sections/shared/collapsibleSection.d.ts +2 -0
- package/lib/sections/shared/collapsibleSection.d.ts.map +1 -0
- package/lib/sections/shared/collapsibleSection.js +24 -0
- package/lib/sections/shared/contactTypeUtils.d.ts +7 -0
- package/lib/sections/shared/contactTypeUtils.d.ts.map +1 -0
- package/lib/sections/shared/contactTypeUtils.js +48 -0
- package/lib/sections/shared/idNodeFactory.d.ts +3 -0
- package/lib/sections/shared/idNodeFactory.d.ts.map +1 -0
- package/lib/sections/shared/idNodeFactory.js +14 -0
- package/lib/sections/shared/phoneCountries.d.ts +20 -0
- package/lib/sections/shared/phoneCountries.d.ts.map +1 -0
- package/lib/sections/shared/phoneCountries.js +1080 -0
- package/lib/sections/shared/rdfList.d.ts +3 -0
- package/lib/sections/shared/rdfList.d.ts.map +1 -0
- package/lib/sections/shared/rdfList.js +34 -0
- package/lib/sections/shared/rdfMutationHelpers.d.ts +12 -0
- package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
- package/lib/sections/shared/rdfMutationHelpers.js +82 -0
- package/lib/sections/shared/rowState.d.ts +21 -0
- package/lib/sections/shared/rowState.d.ts.map +1 -0
- package/lib/sections/shared/rowState.js +52 -0
- package/lib/sections/shared/sanitizeUtils.d.ts +5 -0
- package/lib/sections/shared/sanitizeUtils.d.ts.map +1 -0
- package/lib/sections/shared/sanitizeUtils.js +22 -0
- package/lib/sections/shared/sectionCardHelpers.d.ts +11 -0
- package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -0
- package/lib/sections/shared/sectionCardHelpers.js +105 -0
- package/lib/sections/shared/types.d.ts +7 -0
- package/lib/sections/shared/types.d.ts.map +1 -0
- package/lib/sections/shared/types.js +5 -0
- package/lib/sections/skills/SkillsEditDialog.d.ts +7 -0
- package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -0
- package/lib/sections/skills/SkillsEditDialog.js +340 -0
- package/lib/sections/skills/SkillsSection.d.ts +5 -0
- package/lib/sections/skills/SkillsSection.d.ts.map +1 -0
- package/lib/sections/skills/SkillsSection.js +169 -0
- package/lib/sections/skills/mutations.d.ts +6 -0
- package/lib/sections/skills/mutations.d.ts.map +1 -0
- package/lib/sections/skills/mutations.js +110 -0
- package/lib/sections/skills/selectors.d.ts +6 -0
- package/lib/sections/skills/selectors.d.ts.map +1 -0
- package/lib/sections/skills/selectors.js +37 -0
- package/lib/sections/skills/types.d.ts +14 -0
- package/lib/sections/skills/types.d.ts.map +1 -0
- package/lib/sections/skills/types.js +5 -0
- package/lib/sections/social/SocialEditDialog.d.ts +7 -0
- package/lib/sections/social/SocialEditDialog.d.ts.map +1 -0
- package/lib/sections/social/SocialEditDialog.js +362 -0
- package/lib/sections/social/SocialSection.d.ts +8 -0
- package/lib/sections/social/SocialSection.d.ts.map +1 -0
- package/lib/sections/social/SocialSection.js +201 -0
- package/lib/sections/social/constants.d.ts +3 -0
- package/lib/sections/social/constants.d.ts.map +1 -0
- package/lib/sections/social/constants.js +16 -0
- package/lib/sections/social/helpers.d.ts +15 -0
- package/lib/sections/social/helpers.d.ts.map +1 -0
- package/lib/sections/social/helpers.js +316 -0
- package/lib/sections/social/mutations.d.ts +4 -0
- package/lib/sections/social/mutations.d.ts.map +1 -0
- package/lib/sections/social/mutations.js +298 -0
- package/lib/sections/social/selectors.d.ts +4 -0
- package/lib/sections/social/selectors.d.ts.map +1 -0
- package/lib/sections/social/selectors.js +43 -0
- package/lib/sections/social/types.d.ts +19 -0
- package/lib/sections/social/types.d.ts.map +1 -0
- package/lib/sections/social/types.js +5 -0
- package/lib/styles/BioSection.css +77 -0
- package/lib/styles/CVCard.css +107 -2
- package/lib/styles/ContactInfoEditDialog.css +153 -0
- package/lib/styles/EditDialogs.css +1028 -0
- package/lib/styles/EducationCard.css +103 -0
- package/lib/styles/HeadingSection.css +309 -0
- package/lib/styles/ProfileCard.css +10 -42
- package/lib/styles/ProfileView.css +53 -8
- package/lib/styles/ProjectsCard.css +206 -0
- package/lib/styles/QRCodeCard.css +29 -10
- package/lib/styles/SocialCard.css +41 -13
- package/lib/styles/dialog.css +209 -0
- package/lib/styles/utilities.css +638 -256
- package/lib/textUtils.d.ts +6 -0
- package/lib/textUtils.d.ts.map +1 -0
- package/lib/textUtils.js +44 -0
- package/lib/texts.d.ts +45 -4
- package/lib/texts.d.ts.map +1 -1
- package/lib/texts.js +46 -5
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +5 -0
- package/lib/ui/dialog.d.ts +29 -0
- package/lib/ui/dialog.d.ts.map +1 -0
- package/lib/ui/dialog.js +269 -0
- package/lib/ui/errors.d.ts +2 -0
- package/lib/ui/errors.d.ts.map +1 -0
- package/lib/ui/errors.js +10 -0
- package/package.json +8 -6
- package/lib/CVCard.d.ts +0 -4
- package/lib/CVCard.d.ts.map +0 -1
- package/lib/CVCard.js +0 -114
- package/lib/CVPresenter.d.ts +0 -25
- package/lib/CVPresenter.d.ts.map +0 -1
- package/lib/CVPresenter.js +0 -119
- package/lib/FriendList.d.ts +0 -6
- package/lib/FriendList.d.ts.map +0 -1
- package/lib/FriendList.js +0 -27
- package/lib/ProfileCard.d.ts +0 -6
- package/lib/ProfileCard.d.ts.map +0 -1
- package/lib/ProfileCard.js +0 -62
- package/lib/SocialCard.d.ts +0 -5
- package/lib/SocialCard.d.ts.map +0 -1
- package/lib/SocialCard.js +0 -51
- package/lib/SocialPresenter.d.ts +0 -11
- package/lib/SocialPresenter.d.ts.map +0 -1
- package/lib/SocialPresenter.js +0 -117
- package/lib/StuffCard.d.ts +0 -10
- package/lib/StuffCard.d.ts.map +0 -1
- package/lib/StuffCard.js +0 -52
- package/lib/StuffPresenter.d.ts +0 -14
- package/lib/StuffPresenter.d.ts.map +0 -1
- package/lib/StuffPresenter.js +0 -53
- package/lib/presenter.d.ts +0 -14
- package/lib/presenter.d.ts.map +0 -1
- package/lib/presenter.js +0 -68
- package/lib/styles/FriendList.css +0 -12
- package/lib/styles/StuffCard.css +0 -23
- package/lib/styles/editProfile.css +0 -62
- package/lib/styles/profileRDFFormsEnforced.css +0 -427
package/lib/StuffCard.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StuffCard = void 0;
|
|
7
|
-
exports.renderThing = renderThing;
|
|
8
|
-
exports.renderThingAsDOM = renderThingAsDOM;
|
|
9
|
-
exports.renderThings = renderThings;
|
|
10
|
-
var _litHtml = require("lit-html");
|
|
11
|
-
var _solidUi = require("solid-ui");
|
|
12
|
-
require("./styles/StuffCard.css");
|
|
13
|
-
const StuffCard = (profileBasics, context, subject, stuffData) => {
|
|
14
|
-
const {
|
|
15
|
-
stuff
|
|
16
|
-
} = stuffData;
|
|
17
|
-
const dom = context.dom || document;
|
|
18
|
-
return (0, _litHtml.html)`
|
|
19
|
-
<section
|
|
20
|
-
class="stuffCard"
|
|
21
|
-
aria-labelledby="stuff-card-title"
|
|
22
|
-
role="region"
|
|
23
|
-
data-testid="stuff"
|
|
24
|
-
>
|
|
25
|
-
<header>
|
|
26
|
-
<h3 id="stuff-card-title" class="sr-only">Shared Resources</h3>
|
|
27
|
-
</header>
|
|
28
|
-
<div>
|
|
29
|
-
<table class="stuffTable" data-testid="stuffTable">
|
|
30
|
-
<caption class="sr-only">Files and resources shared by ${profileBasics.name}</caption>
|
|
31
|
-
<tbody class="zebra-stripe">
|
|
32
|
-
${renderThings(stuff, dom)}
|
|
33
|
-
</tbody>
|
|
34
|
-
</table>
|
|
35
|
-
</div>
|
|
36
|
-
</section>
|
|
37
|
-
`;
|
|
38
|
-
};
|
|
39
|
-
exports.StuffCard = StuffCard;
|
|
40
|
-
function renderThingAsDOM(thing, dom) {
|
|
41
|
-
const options = {};
|
|
42
|
-
// widgets.personTR returns a DOM node, so we need to convert it to HTML string
|
|
43
|
-
const row = _solidUi.widgets.personTR(dom, null, thing.instance, options);
|
|
44
|
-
return row;
|
|
45
|
-
}
|
|
46
|
-
function renderThing(thing, dom) {
|
|
47
|
-
return renderThingAsDOM(thing, dom);
|
|
48
|
-
}
|
|
49
|
-
function renderThings(things, dom) {
|
|
50
|
-
if (things.length === 0) return (0, _litHtml.html)``;
|
|
51
|
-
return (0, _litHtml.html)`${renderThing(things[0], dom)}${things.length > 1 ? renderThings(things.slice(1), dom) : (0, _litHtml.html)``}`;
|
|
52
|
-
}
|
package/lib/StuffPresenter.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NamedNode } from 'rdflib';
|
|
2
|
-
export interface Item {
|
|
3
|
-
href: string;
|
|
4
|
-
name: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
instance: NamedNode;
|
|
7
|
-
}
|
|
8
|
-
export interface StuffPresentation {
|
|
9
|
-
stuff: Item[];
|
|
10
|
-
}
|
|
11
|
-
export declare const iconForClassMap: {};
|
|
12
|
-
export declare function getIconForClass(klass: NamedNode): any;
|
|
13
|
-
export declare function presentStuff(subject: NamedNode): Promise<StuffPresentation>;
|
|
14
|
-
//# sourceMappingURL=StuffPresenter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StuffPresenter.d.ts","sourceRoot":"","sources":["../src/StuffPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AASvC,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,eAAO,MAAM,eAAe,IAAK,CAAA;AAQjC,wBAAgB,eAAe,CAAE,KAAK,EAAC,SAAS,OAG/C;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,iBAAiB,CAAC,CAe5B"}
|
package/lib/StuffPresenter.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getIconForClass = getIconForClass;
|
|
7
|
-
exports.iconForClassMap = void 0;
|
|
8
|
-
exports.presentStuff = presentStuff;
|
|
9
|
-
var _rdflib = require("rdflib");
|
|
10
|
-
var _solidUi = require("solid-ui");
|
|
11
|
-
var _solidLogic = require("solid-logic");
|
|
12
|
-
const {
|
|
13
|
-
iconForClass
|
|
14
|
-
} = _solidUi.widgets;
|
|
15
|
-
const {
|
|
16
|
-
typeIndex
|
|
17
|
-
} = _solidLogic.solidLogicSingleton;
|
|
18
|
-
const {
|
|
19
|
-
getScopedAppInstances
|
|
20
|
-
} = typeIndex;
|
|
21
|
-
const iconForClassMap = exports.iconForClassMap = {}; // @@ move to buttons in solid-ui
|
|
22
|
-
for (const k in iconForClass) {
|
|
23
|
-
const pref = k.split(':')[0];
|
|
24
|
-
const id = k.split(':')[1];
|
|
25
|
-
const theClass = _solidUi.ns[pref](id);
|
|
26
|
-
iconForClassMap[theClass.uri] = _rdflib.uri.join(iconForClass[k], _solidUi.icons.iconBase);
|
|
27
|
-
}
|
|
28
|
-
function getIconForClass(klass) {
|
|
29
|
-
const icon0 = iconForClassMap[klass.uri];
|
|
30
|
-
return icon0 || _solidUi.icons.iconBase + 'noun_10636.svg'; // fall back to black disk
|
|
31
|
-
}
|
|
32
|
-
async function presentStuff(subject) {
|
|
33
|
-
const scopedItems = await getScopedAppInstances(null, subject);
|
|
34
|
-
// console.log('scopedItems', scopedItems)
|
|
35
|
-
|
|
36
|
-
const stuff = scopedItems.map(item => {
|
|
37
|
-
// work with old or new solid-logic
|
|
38
|
-
const icon = getIconForClass(item.type || _solidUi.ns.rdf('Resource'));
|
|
39
|
-
const href = item.instance.uri;
|
|
40
|
-
const name = _solidUi.utils.label(item.instance);
|
|
41
|
-
const instance = item.instance;
|
|
42
|
-
// console.log(` href=${href} name=${name} icon=${icon}`)
|
|
43
|
-
return {
|
|
44
|
-
href,
|
|
45
|
-
name,
|
|
46
|
-
icon,
|
|
47
|
-
instance
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
return {
|
|
51
|
-
stuff
|
|
52
|
-
};
|
|
53
|
-
}
|
package/lib/presenter.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NamedNode, LiveStore } from 'rdflib';
|
|
2
|
-
export interface ProfilePresentation {
|
|
3
|
-
name: string;
|
|
4
|
-
imageSrc?: string;
|
|
5
|
-
introduction?: string;
|
|
6
|
-
languages?: string;
|
|
7
|
-
location?: string;
|
|
8
|
-
pronouns?: string;
|
|
9
|
-
backgroundColor: string;
|
|
10
|
-
highlightColor: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function pronounsAsText(subject: NamedNode): string;
|
|
13
|
-
export declare const presentProfile: (subject: NamedNode, store: LiveStore) => ProfilePresentation;
|
|
14
|
-
//# sourceMappingURL=presenter.d.ts.map
|
package/lib/presenter.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presenter.d.ts","sourceRoot":"","sources":["../src/presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAM7C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAE,OAAO,EAAC,SAAS,GAAG,MAAM,CAczD;AAED,eAAO,MAAM,cAAc,GACzB,SAAS,SAAS,EAClB,OAAO,SAAS,KACf,mBA0BF,CAAA"}
|
package/lib/presenter.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.presentProfile = void 0;
|
|
7
|
-
exports.pronounsAsText = pronounsAsText;
|
|
8
|
-
var _solidUi = require("solid-ui");
|
|
9
|
-
var _solidLogic = require("solid-logic");
|
|
10
|
-
var _validateColor = require("validate-color");
|
|
11
|
-
function pronounsAsText(subject) {
|
|
12
|
-
let pronouns = _solidLogic.store.anyJS(subject, _solidUi.ns.solid('preferredSubjectPronoun')) || '';
|
|
13
|
-
if (pronouns) {
|
|
14
|
-
const them = _solidLogic.store.anyJS(subject, _solidUi.ns.solid('preferredObjectPronoun'));
|
|
15
|
-
if (them) {
|
|
16
|
-
pronouns += '/' + them;
|
|
17
|
-
const their = _solidLogic.store.anyJS(subject, _solidUi.ns.solid('preferredRelativePronoun'));
|
|
18
|
-
if (their) {
|
|
19
|
-
pronouns += '/' + their;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
pronouns = ' (' + pronouns + ') ';
|
|
23
|
-
}
|
|
24
|
-
return pronouns || '';
|
|
25
|
-
}
|
|
26
|
-
const presentProfile = (subject, store) => {
|
|
27
|
-
const name = _solidUi.utils.label(subject);
|
|
28
|
-
const imageSrc = _solidUi.widgets.findImage(subject);
|
|
29
|
-
const role = store.anyValue(subject, _solidUi.ns.vcard('role'));
|
|
30
|
-
const orgName = store.anyValue(subject, _solidUi.ns.vcard('organization-name')); // @@ Search whole store
|
|
31
|
-
|
|
32
|
-
const address = store.any(subject, _solidUi.ns.vcard('hasAddress'));
|
|
33
|
-
const countryName = address != null ? store.anyValue(address, _solidUi.ns.vcard('country-name')) : null;
|
|
34
|
-
const locality = address != null ? store.anyValue(address, _solidUi.ns.vcard('locality')) : null;
|
|
35
|
-
const {
|
|
36
|
-
backgroundColor,
|
|
37
|
-
highlightColor
|
|
38
|
-
} = getColors(subject, store);
|
|
39
|
-
const pronouns = pronounsAsText(subject);
|
|
40
|
-
return {
|
|
41
|
-
name,
|
|
42
|
-
imageSrc,
|
|
43
|
-
introduction: formatIntroduction(role, orgName),
|
|
44
|
-
location: formatLocation(countryName, locality),
|
|
45
|
-
backgroundColor,
|
|
46
|
-
pronouns,
|
|
47
|
-
highlightColor
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
exports.presentProfile = presentProfile;
|
|
51
|
-
function formatLocation(countryName, locality) {
|
|
52
|
-
return countryName && locality ? `${locality}, ${countryName}` : countryName || locality || null;
|
|
53
|
-
}
|
|
54
|
-
function formatIntroduction(role, orgName) {
|
|
55
|
-
return role && orgName ? `${role} at ${orgName}` : orgName || role || null;
|
|
56
|
-
}
|
|
57
|
-
function getColors(subject, store) {
|
|
58
|
-
const backgroundColor = store.anyValue(subject, _solidUi.ns.solid('profileBackgroundColor'), null, subject.doc());
|
|
59
|
-
const highlightColor = store.anyValue(subject, _solidUi.ns.solid('profileHighlightColor'), null, subject.doc());
|
|
60
|
-
return {
|
|
61
|
-
// default colors are coming from the SolidOS theme, so we only want to set them here if they're valid colors
|
|
62
|
-
backgroundColor: validColorOrDefault(backgroundColor, ''),
|
|
63
|
-
highlightColor: validColorOrDefault(highlightColor, '')
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function validColorOrDefault(color, fallback) {
|
|
67
|
-
return color && (0, _validateColor.validateHTMLColorHex)(color) ? color : fallback;
|
|
68
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* FriendList.css */
|
|
2
|
-
/* Uses utilities: .list-reset, .section-title, .zebra-stripe, .flex, .gap-xs, .mb-md */
|
|
3
|
-
|
|
4
|
-
.friendItem {
|
|
5
|
-
padding: var(--spacing-xs) 0;
|
|
6
|
-
font-size: 1em;
|
|
7
|
-
color: var(--color-text-muted);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.friendItem:last-child {
|
|
11
|
-
border-bottom: none;
|
|
12
|
-
}
|
package/lib/styles/StuffCard.css
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* StuffCard.css */
|
|
2
|
-
/* Uses utilities: .zebra-stripe */
|
|
3
|
-
|
|
4
|
-
.stuffTable {
|
|
5
|
-
width: 100%;
|
|
6
|
-
border-collapse: collapse;
|
|
7
|
-
margin-bottom: var(--spacing-md);
|
|
8
|
-
caption-side: top;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.stuffTable caption {
|
|
12
|
-
font-weight: 600;
|
|
13
|
-
padding: var(--spacing-sm);
|
|
14
|
-
text-align: left;
|
|
15
|
-
color: var(--color-text);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.stuffTable th,
|
|
19
|
-
.stuffTable td {
|
|
20
|
-
padding: var(--spacing-sm) var(--spacing-md);
|
|
21
|
-
text-align: left;
|
|
22
|
-
line-height: 1.4;
|
|
23
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
.profile-grid .add-friend-button-container,
|
|
2
|
-
.profile-grid .add-community-button-container {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: var(--spacing-xxs);
|
|
6
|
-
flex-wrap: wrap;
|
|
7
|
-
justify-content: flex-start;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Ensure the button container can shrink properly in narrow layouts */
|
|
11
|
-
.profile-grid .add-community-button-container {
|
|
12
|
-
min-width: 0;
|
|
13
|
-
max-width: 100%;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Allow any direct children to shrink so no element forces overflow */
|
|
17
|
-
.profile-grid .add-community-button-container > * {
|
|
18
|
-
min-width: 0;
|
|
19
|
-
max-width: 100%;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.profile-grid table {
|
|
23
|
-
margin: 0 !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.profile-grid td {
|
|
27
|
-
padding: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.profile-grid .add-friend-button-container .span,
|
|
31
|
-
.profile-grid .add-community-button-container .span {
|
|
32
|
-
display: inline-flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.profile-grid .add-friend-button-container > div,
|
|
37
|
-
.profile-grid .add-community-button-container > div {
|
|
38
|
-
flex-basis: 100%;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Prevent the add-community input from overflowing its flex container */
|
|
42
|
-
.profile-grid .add-community-button-container input {
|
|
43
|
-
min-width: 0;
|
|
44
|
-
max-width: 96%;
|
|
45
|
-
flex: 1 1 0;
|
|
46
|
-
word-break: break-word;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.profile-grid .profile-image {
|
|
50
|
-
width: var( --profile-image-size);
|
|
51
|
-
height: var( --profile-image-size);
|
|
52
|
-
margin: var(--spacing-xxxs);
|
|
53
|
-
border-radius: var(--spacing-lg);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.profile-grid .default-profile-image {
|
|
57
|
-
width: 140%;
|
|
58
|
-
height: 140%;
|
|
59
|
-
object-fit: cover;
|
|
60
|
-
margin-left: -0.6em;
|
|
61
|
-
border-radius: var(--spacing-lg);
|
|
62
|
-
}
|