profile-pane 3.1.5 → 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.
Files changed (311) hide show
  1. package/README.md +16 -0
  2. package/lib/04567ff683933c35c465.png +0 -0
  3. package/lib/10163fd9b5a0e00d63a0.png +0 -0
  4. package/lib/1234dcb2eec2e45f252b.png +0 -0
  5. package/lib/20899934157df4db56cb.png +0 -0
  6. package/lib/33760bf79f097f449da5.png +0 -0
  7. package/lib/578d2b6ed32e7624164e.png +0 -0
  8. package/lib/5f62a5b2b7e99b9640c7.png +0 -0
  9. package/lib/6525766ecd288ec60129.png +0 -0
  10. package/lib/7800be6f6c4b5b0f4f20.png +0 -0
  11. package/lib/976473cf5fe24d657d4b.png +0 -0
  12. package/lib/ChatWithMe.d.ts +2 -1
  13. package/lib/ChatWithMe.d.ts.map +1 -1
  14. package/lib/ChatWithMe.js +3 -3
  15. package/lib/ProfileView.d.ts +1 -1
  16. package/lib/ProfileView.d.ts.map +1 -1
  17. package/lib/ProfileView.js +71 -131
  18. package/lib/ProfileViewModelPresenter.d.ts +23 -0
  19. package/lib/ProfileViewModelPresenter.d.ts.map +1 -0
  20. package/lib/ProfileViewModelPresenter.js +37 -0
  21. package/lib/QRCodeCard.d.ts +3 -1
  22. package/lib/QRCodeCard.d.ts.map +1 -1
  23. package/lib/QRCodeCard.js +86 -66
  24. package/lib/addMeToYourFriends.d.ts +3 -3
  25. package/lib/addMeToYourFriends.d.ts.map +1 -1
  26. package/lib/addMeToYourFriends.js +14 -30
  27. package/lib/bda84f59e7216675a208.png +0 -0
  28. package/lib/buttonsHelper.js +1 -1
  29. package/lib/cd68e8f3990ba8b2139e.png +0 -0
  30. package/lib/e7074a7e2cb69e51cfd3.png +0 -0
  31. package/lib/editProfilePane/EditCVCard.d.ts +1 -0
  32. package/lib/editProfilePane/EditCVCard.d.ts.map +1 -1
  33. package/lib/editProfilePane/EditCVCard.js +2 -1
  34. package/lib/editProfilePane/EditCommunitiesCard.d.ts +1 -1
  35. package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -1
  36. package/lib/editProfilePane/EditCommunitiesCard.js +2 -1
  37. package/lib/editProfilePane/EditContactsCard.d.ts +1 -0
  38. package/lib/editProfilePane/EditContactsCard.d.ts.map +1 -1
  39. package/lib/editProfilePane/EditContactsCard.js +2 -0
  40. package/lib/editProfilePane/EditFriendsCard.d.ts +1 -1
  41. package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -1
  42. package/lib/editProfilePane/EditFriendsCard.js +2 -1
  43. package/lib/editProfilePane/EditOtherPreferences.d.ts +1 -0
  44. package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -1
  45. package/lib/editProfilePane/EditOtherPreferences.js +1 -0
  46. package/lib/editProfilePane/EditProfileView.d.ts +1 -1
  47. package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
  48. package/lib/editProfilePane/EditProfileView.js +1 -1
  49. package/lib/editProfilePane/EditSocialCard.d.ts +1 -0
  50. package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -1
  51. package/lib/editProfilePane/EditSocialCard.js +2 -1
  52. package/lib/editProfilePane/editProfilePresenter.d.ts +1 -0
  53. package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
  54. package/lib/editProfilePane/editProfilePresenter.js +2 -0
  55. package/lib/f3772696fb7ee53c23d8.png +0 -0
  56. package/lib/icons-svg/contactIcons.d.ts +3 -0
  57. package/lib/icons-svg/contactIcons.d.ts.map +1 -0
  58. package/lib/icons-svg/contactIcons.js +32 -0
  59. package/lib/icons-svg/profileIcons.d.ts +22 -0
  60. package/lib/icons-svg/profileIcons.d.ts.map +1 -0
  61. package/lib/icons-svg/profileIcons.js +309 -0
  62. package/lib/index.d.ts +1 -3
  63. package/lib/index.d.ts.map +1 -1
  64. package/lib/index.js +42 -19
  65. package/lib/profile-pane.js +15629 -5670
  66. package/lib/profile-pane.js.map +1 -1
  67. package/lib/profile-pane.min.js +2171 -230
  68. package/lib/profile-pane.min.js.map +1 -1
  69. package/lib/rdfFormsHelper.d.ts +1 -0
  70. package/lib/rdfFormsHelper.d.ts.map +1 -1
  71. package/lib/rdfFormsHelper.js +2 -0
  72. package/lib/sections/bio/BioEditDialog.d.ts +6 -0
  73. package/lib/sections/bio/BioEditDialog.d.ts.map +1 -0
  74. package/lib/sections/bio/BioEditDialog.js +119 -0
  75. package/lib/sections/bio/BioSection.d.ts +7 -0
  76. package/lib/sections/bio/BioSection.d.ts.map +1 -0
  77. package/lib/sections/bio/BioSection.js +131 -0
  78. package/lib/sections/bio/mutations.d.ts +4 -0
  79. package/lib/sections/bio/mutations.d.ts.map +1 -0
  80. package/lib/sections/bio/mutations.js +43 -0
  81. package/lib/sections/bio/selectors.d.ts +4 -0
  82. package/lib/sections/bio/selectors.d.ts.map +1 -0
  83. package/lib/sections/bio/selectors.js +15 -0
  84. package/lib/sections/bio/types.d.ts +15 -0
  85. package/lib/sections/bio/types.d.ts.map +1 -0
  86. package/lib/sections/bio/types.js +5 -0
  87. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +7 -0
  88. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -0
  89. package/lib/sections/contactInfo/ContactInfoEditDialog.js +658 -0
  90. package/lib/sections/contactInfo/ContactInfoSection.d.ts +5 -0
  91. package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -0
  92. package/lib/sections/contactInfo/ContactInfoSection.js +229 -0
  93. package/lib/sections/contactInfo/mutations.d.ts +4 -0
  94. package/lib/sections/contactInfo/mutations.d.ts.map +1 -0
  95. package/lib/sections/contactInfo/mutations.js +150 -0
  96. package/lib/sections/contactInfo/selectors.d.ts +4 -0
  97. package/lib/sections/contactInfo/selectors.d.ts.map +1 -0
  98. package/lib/sections/contactInfo/selectors.js +104 -0
  99. package/lib/sections/contactInfo/types.d.ts +44 -0
  100. package/lib/sections/contactInfo/types.d.ts.map +1 -0
  101. package/lib/sections/contactInfo/types.js +5 -0
  102. package/lib/sections/education/EducationEditDialog.d.ts +7 -0
  103. package/lib/sections/education/EducationEditDialog.d.ts.map +1 -0
  104. package/lib/sections/education/EducationEditDialog.js +459 -0
  105. package/lib/sections/education/EducationSection.d.ts +7 -0
  106. package/lib/sections/education/EducationSection.d.ts.map +1 -0
  107. package/lib/sections/education/EducationSection.js +126 -0
  108. package/lib/sections/education/mutations.d.ts +4 -0
  109. package/lib/sections/education/mutations.d.ts.map +1 -0
  110. package/lib/sections/education/mutations.js +60 -0
  111. package/lib/sections/education/selectors.d.ts +4 -0
  112. package/lib/sections/education/selectors.d.ts.map +1 -0
  113. package/lib/sections/education/selectors.js +64 -0
  114. package/lib/sections/education/types.d.ts +20 -0
  115. package/lib/sections/education/types.d.ts.map +1 -0
  116. package/lib/sections/education/types.js +5 -0
  117. package/lib/sections/heading/HeadingEditDialog.d.ts +6 -0
  118. package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -0
  119. package/lib/sections/heading/HeadingEditDialog.js +742 -0
  120. package/lib/sections/heading/HeadingSection.d.ts +9 -0
  121. package/lib/sections/heading/HeadingSection.d.ts.map +1 -0
  122. package/lib/sections/heading/HeadingSection.js +97 -0
  123. package/lib/sections/heading/camera.d.ts +19 -0
  124. package/lib/sections/heading/camera.d.ts.map +1 -0
  125. package/lib/sections/heading/camera.js +199 -0
  126. package/lib/sections/heading/dateHelpers.d.ts +4 -0
  127. package/lib/sections/heading/dateHelpers.d.ts.map +1 -0
  128. package/lib/sections/heading/dateHelpers.js +48 -0
  129. package/lib/sections/heading/imageHelpers.d.ts +4 -0
  130. package/lib/sections/heading/imageHelpers.d.ts.map +1 -0
  131. package/lib/sections/heading/imageHelpers.js +81 -0
  132. package/lib/sections/heading/mutations.d.ts +4 -0
  133. package/lib/sections/heading/mutations.d.ts.map +1 -0
  134. package/lib/sections/heading/mutations.js +190 -0
  135. package/lib/sections/heading/selectors.d.ts +5 -0
  136. package/lib/sections/heading/selectors.d.ts.map +1 -0
  137. package/lib/sections/heading/selectors.js +157 -0
  138. package/lib/sections/heading/types.d.ts +36 -0
  139. package/lib/sections/heading/types.d.ts.map +1 -0
  140. package/lib/sections/heading/types.js +5 -0
  141. package/lib/sections/languages/LanguageEditDialog.d.ts +7 -0
  142. package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -0
  143. package/lib/sections/languages/LanguageEditDialog.js +457 -0
  144. package/lib/sections/languages/LanguageSection.d.ts +5 -0
  145. package/lib/sections/languages/LanguageSection.d.ts.map +1 -0
  146. package/lib/sections/languages/LanguageSection.js +137 -0
  147. package/lib/sections/languages/mutations.d.ts +6 -0
  148. package/lib/sections/languages/mutations.d.ts.map +1 -0
  149. package/lib/sections/languages/mutations.js +296 -0
  150. package/lib/sections/languages/selectors.d.ts +5 -0
  151. package/lib/sections/languages/selectors.d.ts.map +1 -0
  152. package/lib/sections/languages/selectors.js +146 -0
  153. package/lib/sections/languages/types.d.ts +15 -0
  154. package/lib/sections/languages/types.d.ts.map +1 -0
  155. package/lib/sections/languages/types.js +5 -0
  156. package/lib/sections/projects/ProjectEditDialog.d.ts +7 -0
  157. package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -0
  158. package/lib/sections/projects/ProjectEditDialog.js +182 -0
  159. package/lib/sections/projects/ProjectSection.d.ts +6 -0
  160. package/lib/sections/projects/ProjectSection.d.ts.map +1 -0
  161. package/lib/sections/projects/ProjectSection.js +220 -0
  162. package/lib/sections/projects/mutations.d.ts +4 -0
  163. package/lib/sections/projects/mutations.d.ts.map +1 -0
  164. package/lib/sections/projects/mutations.js +188 -0
  165. package/lib/sections/projects/selectors.d.ts +5 -0
  166. package/lib/sections/projects/selectors.d.ts.map +1 -0
  167. package/lib/sections/projects/selectors.js +163 -0
  168. package/lib/sections/projects/types.d.ts +28 -0
  169. package/lib/sections/projects/types.d.ts.map +1 -0
  170. package/lib/sections/projects/types.js +8 -0
  171. package/lib/sections/resume/ResumeEditDialog.d.ts +7 -0
  172. package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -0
  173. package/lib/sections/resume/ResumeEditDialog.js +629 -0
  174. package/lib/sections/resume/ResumeSection.d.ts +7 -0
  175. package/lib/sections/resume/ResumeSection.d.ts.map +1 -0
  176. package/lib/sections/resume/ResumeSection.js +160 -0
  177. package/lib/sections/resume/mutations.d.ts +6 -0
  178. package/lib/sections/resume/mutations.d.ts.map +1 -0
  179. package/lib/sections/resume/mutations.js +172 -0
  180. package/lib/sections/resume/selectors.d.ts +4 -0
  181. package/lib/sections/resume/selectors.d.ts.map +1 -0
  182. package/lib/sections/resume/selectors.js +142 -0
  183. package/lib/sections/resume/types.d.ts +33 -0
  184. package/lib/sections/resume/types.d.ts.map +1 -0
  185. package/lib/sections/resume/types.js +8 -0
  186. package/lib/sections/shared/collapsibleSection.d.ts +2 -0
  187. package/lib/sections/shared/collapsibleSection.d.ts.map +1 -0
  188. package/lib/sections/shared/collapsibleSection.js +24 -0
  189. package/lib/sections/shared/contactTypeUtils.d.ts +7 -0
  190. package/lib/sections/shared/contactTypeUtils.d.ts.map +1 -0
  191. package/lib/sections/shared/contactTypeUtils.js +48 -0
  192. package/lib/sections/shared/idNodeFactory.d.ts +3 -0
  193. package/lib/sections/shared/idNodeFactory.d.ts.map +1 -0
  194. package/lib/sections/shared/idNodeFactory.js +14 -0
  195. package/lib/sections/shared/phoneCountries.d.ts +20 -0
  196. package/lib/sections/shared/phoneCountries.d.ts.map +1 -0
  197. package/lib/sections/shared/phoneCountries.js +1080 -0
  198. package/lib/sections/shared/rdfList.d.ts +3 -0
  199. package/lib/sections/shared/rdfList.d.ts.map +1 -0
  200. package/lib/sections/shared/rdfList.js +34 -0
  201. package/lib/sections/shared/rdfMutationHelpers.d.ts +12 -0
  202. package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
  203. package/lib/sections/shared/rdfMutationHelpers.js +82 -0
  204. package/lib/sections/shared/rowState.d.ts +21 -0
  205. package/lib/sections/shared/rowState.d.ts.map +1 -0
  206. package/lib/sections/shared/rowState.js +52 -0
  207. package/lib/sections/shared/sanitizeUtils.d.ts +5 -0
  208. package/lib/sections/shared/sanitizeUtils.d.ts.map +1 -0
  209. package/lib/sections/shared/sanitizeUtils.js +22 -0
  210. package/lib/sections/shared/sectionCardHelpers.d.ts +11 -0
  211. package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -0
  212. package/lib/sections/shared/sectionCardHelpers.js +105 -0
  213. package/lib/sections/shared/types.d.ts +7 -0
  214. package/lib/sections/shared/types.d.ts.map +1 -0
  215. package/lib/sections/shared/types.js +5 -0
  216. package/lib/sections/skills/SkillsEditDialog.d.ts +7 -0
  217. package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -0
  218. package/lib/sections/skills/SkillsEditDialog.js +340 -0
  219. package/lib/sections/skills/SkillsSection.d.ts +5 -0
  220. package/lib/sections/skills/SkillsSection.d.ts.map +1 -0
  221. package/lib/sections/skills/SkillsSection.js +169 -0
  222. package/lib/sections/skills/mutations.d.ts +6 -0
  223. package/lib/sections/skills/mutations.d.ts.map +1 -0
  224. package/lib/sections/skills/mutations.js +110 -0
  225. package/lib/sections/skills/selectors.d.ts +6 -0
  226. package/lib/sections/skills/selectors.d.ts.map +1 -0
  227. package/lib/sections/skills/selectors.js +37 -0
  228. package/lib/sections/skills/types.d.ts +14 -0
  229. package/lib/sections/skills/types.d.ts.map +1 -0
  230. package/lib/sections/skills/types.js +5 -0
  231. package/lib/sections/social/SocialEditDialog.d.ts +7 -0
  232. package/lib/sections/social/SocialEditDialog.d.ts.map +1 -0
  233. package/lib/sections/social/SocialEditDialog.js +362 -0
  234. package/lib/sections/social/SocialSection.d.ts +8 -0
  235. package/lib/sections/social/SocialSection.d.ts.map +1 -0
  236. package/lib/sections/social/SocialSection.js +201 -0
  237. package/lib/sections/social/constants.d.ts +3 -0
  238. package/lib/sections/social/constants.d.ts.map +1 -0
  239. package/lib/sections/social/constants.js +16 -0
  240. package/lib/sections/social/helpers.d.ts +15 -0
  241. package/lib/sections/social/helpers.d.ts.map +1 -0
  242. package/lib/sections/social/helpers.js +316 -0
  243. package/lib/sections/social/mutations.d.ts +4 -0
  244. package/lib/sections/social/mutations.d.ts.map +1 -0
  245. package/lib/sections/social/mutations.js +298 -0
  246. package/lib/sections/social/selectors.d.ts +4 -0
  247. package/lib/sections/social/selectors.d.ts.map +1 -0
  248. package/lib/sections/social/selectors.js +43 -0
  249. package/lib/sections/social/types.d.ts +19 -0
  250. package/lib/sections/social/types.d.ts.map +1 -0
  251. package/lib/sections/social/types.js +5 -0
  252. package/lib/styles/BioSection.css +77 -0
  253. package/lib/styles/CVCard.css +107 -2
  254. package/lib/styles/ContactInfoEditDialog.css +153 -0
  255. package/lib/styles/EditDialogs.css +1028 -0
  256. package/lib/styles/EducationCard.css +103 -0
  257. package/lib/styles/HeadingSection.css +309 -0
  258. package/lib/styles/ProfileCard.css +10 -42
  259. package/lib/styles/ProfileView.css +53 -8
  260. package/lib/styles/ProjectsCard.css +206 -0
  261. package/lib/styles/QRCodeCard.css +29 -10
  262. package/lib/styles/SocialCard.css +41 -13
  263. package/lib/styles/dialog.css +209 -0
  264. package/lib/styles/utilities.css +638 -256
  265. package/lib/textUtils.d.ts +6 -0
  266. package/lib/textUtils.d.ts.map +1 -0
  267. package/lib/textUtils.js +44 -0
  268. package/lib/texts.d.ts +45 -4
  269. package/lib/texts.d.ts.map +1 -1
  270. package/lib/texts.js +46 -5
  271. package/lib/types.d.ts +2 -0
  272. package/lib/types.d.ts.map +1 -0
  273. package/lib/types.js +5 -0
  274. package/lib/ui/dialog.d.ts +29 -0
  275. package/lib/ui/dialog.d.ts.map +1 -0
  276. package/lib/ui/dialog.js +269 -0
  277. package/lib/ui/errors.d.ts +2 -0
  278. package/lib/ui/errors.d.ts.map +1 -0
  279. package/lib/ui/errors.js +10 -0
  280. package/package.json +6 -4
  281. package/lib/CVCard.d.ts +0 -4
  282. package/lib/CVCard.d.ts.map +0 -1
  283. package/lib/CVCard.js +0 -114
  284. package/lib/CVPresenter.d.ts +0 -25
  285. package/lib/CVPresenter.d.ts.map +0 -1
  286. package/lib/CVPresenter.js +0 -119
  287. package/lib/FriendList.d.ts +0 -6
  288. package/lib/FriendList.d.ts.map +0 -1
  289. package/lib/FriendList.js +0 -27
  290. package/lib/ProfileCard.d.ts +0 -6
  291. package/lib/ProfileCard.d.ts.map +0 -1
  292. package/lib/ProfileCard.js +0 -62
  293. package/lib/SocialCard.d.ts +0 -5
  294. package/lib/SocialCard.d.ts.map +0 -1
  295. package/lib/SocialCard.js +0 -51
  296. package/lib/SocialPresenter.d.ts +0 -11
  297. package/lib/SocialPresenter.d.ts.map +0 -1
  298. package/lib/SocialPresenter.js +0 -117
  299. package/lib/StuffCard.d.ts +0 -10
  300. package/lib/StuffCard.d.ts.map +0 -1
  301. package/lib/StuffCard.js +0 -52
  302. package/lib/StuffPresenter.d.ts +0 -14
  303. package/lib/StuffPresenter.d.ts.map +0 -1
  304. package/lib/StuffPresenter.js +0 -53
  305. package/lib/presenter.d.ts +0 -14
  306. package/lib/presenter.d.ts.map +0 -1
  307. package/lib/presenter.js +0 -68
  308. package/lib/styles/FriendList.css +0 -12
  309. package/lib/styles/StuffCard.css +0 -23
  310. package/lib/styles/editProfile.css +0 -62
  311. package/lib/styles/profileRDFFormsEnforced.css +0 -431
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
- }
@@ -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"}
@@ -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
- }
@@ -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
@@ -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
- }
@@ -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
- }