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.
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 -5666
  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 +8 -6
  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 -427
package/lib/CVCard.js DELETED
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CVCard = void 0;
7
- var _litHtml = require("lit-html");
8
- require("./styles/CVCard.css");
9
- const CVCard = cvData => {
10
- const {
11
- rolesByType,
12
- skills,
13
- languages
14
- } = cvData;
15
- const futureRolesArr = rolesByType['FutureRole'] || [];
16
- const currentRolesArr = rolesByType['CurrentRole'] || [];
17
- const pastRolesArr = rolesByType['PastRole'] || [];
18
- const skillsArr = skills || [];
19
- const languagesArr = languages || [];
20
- const hasFutureRole = Array.isArray(futureRolesArr) && futureRolesArr.length > 0;
21
- const hasCurrentRole = Array.isArray(currentRolesArr) && currentRolesArr.length > 0;
22
- const hasPastRole = Array.isArray(pastRolesArr) && pastRolesArr.length > 0;
23
- const hasSkills = Array.isArray(skillsArr) && skillsArr.length > 0;
24
- const hasLanguages = Array.isArray(languagesArr) && languagesArr.length > 0;
25
- if (!(hasFutureRole || hasCurrentRole || hasPastRole || hasSkills || hasLanguages)) return (0, _litHtml.html)``;
26
- return (0, _litHtml.html)`
27
- <article class="cvCard" aria-label="Resume" data-testid="curriculum-vitae">
28
- ${hasFutureRole ? (0, _litHtml.html)`
29
- <section class="cvSection" aria-labelledby="cv-future-heading">
30
- <h3 id="cv-future-heading">Future Roles</h3>
31
- <ul role="list" aria-label="Upcoming work experience">
32
- ${renderRoles(futureRolesArr, true)}
33
- </ul>
34
- </section>
35
- ` : ''}
36
-
37
- ${hasCurrentRole ? (0, _litHtml.html)`
38
- <section class="cvSection" aria-labelledby="cv-current-heading">
39
- <h3 id="cv-current-heading">Current Roles</h3>
40
- <ul role="list" aria-label="Current work experience">
41
- ${renderRoles(currentRolesArr, true)}
42
- </ul>
43
- </section>
44
- ` : ''}
45
-
46
- ${hasPastRole ? (0, _litHtml.html)`
47
- <section class="cvSection" aria-labelledby="cv-past-heading">
48
- <h3 id="cv-past-heading">Past Roles</h3>
49
- <ul role="list" aria-label="Previous work experience">
50
- ${renderRoles(pastRolesArr, true)}
51
- </ul>
52
- </section>
53
- ` : ''}
54
-
55
- ${hasSkills ? (0, _litHtml.html)`
56
- <section class="cvSection" aria-labelledby="cv-skills-heading">
57
- <h3 id="cv-skills-heading">Skills</h3>
58
- <ul role="list" aria-label="Professional skills and competencies">
59
- ${renderSkills(skillsArr, true)}
60
- </ul>
61
- </section>
62
- ` : ''}
63
-
64
- ${hasLanguages ? (0, _litHtml.html)`
65
- <section class="cvSection" aria-labelledby="cv-languages-heading">
66
- <h3 id="cv-languages-heading">Languages</h3>
67
- <ul role="list" aria-label="Known languages">
68
- ${renderLanguages(languagesArr, true)}
69
- </ul>
70
- </section>
71
- ` : ''}
72
- </article>
73
- `;
74
- };
75
- exports.CVCard = CVCard;
76
- function renderRole(role, asList = false) {
77
- if (!role) return (0, _litHtml.html)``;
78
- return asList ? (0, _litHtml.html)`
79
- <li class="cvRole" role="listitem">
80
- <strong class="cvOrg" aria-label="Organization">${role.orgName}</strong>
81
- <span aria-label="Role title">${strToUpperCase(role.roleText)}</span>
82
- <time aria-label="Employment period">${role.dates}</time>
83
- </li>` : (0, _litHtml.html)``;
84
- }
85
- function renderRoles(roles, asList = false) {
86
- if (!roles || !roles.length || !roles[0]) return (0, _litHtml.html)``;
87
- return (0, _litHtml.html)`${renderRole(roles[0], asList)}${roles.length > 1 ? renderRoles(roles.slice(1), asList) : (0, _litHtml.html)``}`;
88
- }
89
- function renderSkill(skill, asList = false) {
90
- if (!skill) return (0, _litHtml.html)``;
91
- return asList ? (0, _litHtml.html)`<li class="cvSkill">${strToUpperCase(skill)}</li>` : (0, _litHtml.html)``;
92
- }
93
- function renderSkills(skills, asList = false) {
94
- if (!skills || !skills.length || !skills[0]) return (0, _litHtml.html)``;
95
- return (0, _litHtml.html)`${renderSkill(skills[0], asList)}${skills.length > 1 ? renderSkills(skills.slice(1), asList) : (0, _litHtml.html)``}`;
96
- }
97
- function renderLan(language, asList = false) {
98
- if (!language) return (0, _litHtml.html)``;
99
- return asList ? (0, _litHtml.html)`<li class="cvLanguage">${language}</li>` : (0, _litHtml.html)``;
100
- }
101
- function renderLanguages(languages, asList = false) {
102
- if (!languages || !languages.length || !languages[0]) return (0, _litHtml.html)``;
103
- return (0, _litHtml.html)`${renderLan(languages[0], asList)}${languages.length > 1 ? renderLanguages(languages.slice(1), asList) : (0, _litHtml.html)``}`;
104
- }
105
- function strToUpperCase(str) {
106
- if (str && str[0] > '') {
107
- const strCase = str.split(' ');
108
- for (let i = 0; i < strCase.length; i++) {
109
- strCase[i] = strCase[i].charAt(0).toUpperCase() + strCase[i].substring(1);
110
- }
111
- return strCase.join(' ');
112
- }
113
- return '';
114
- }
@@ -1,25 +0,0 @@
1
- import { LiveStore, NamedNode, Literal, Node, Store } from 'rdflib';
2
- export interface Role {
3
- startDate?: Literal;
4
- endDate: Literal;
5
- dates: string;
6
- orgName: string;
7
- roleText: string;
8
- orgHomePage?: string;
9
- }
10
- export interface CVPresentation {
11
- rolesByType: RolesByType;
12
- skills: string[];
13
- languages: string[];
14
- }
15
- export interface RolesByType {
16
- PastRole: Role[];
17
- CurrentRole: Role[];
18
- FutureRole: Role[];
19
- }
20
- export declare const typesOfRole: string[];
21
- export declare function skillAsText(store: Store, sk: Node): string;
22
- export declare function languageAsText(store: Store, lan: Node): string;
23
- export declare function datesAsText(startDate?: Literal, endDate?: Literal): string;
24
- export declare function presentCV(subject: NamedNode, store: LiveStore): CVPresentation;
25
- //# sourceMappingURL=CVPresenter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CVPresenter.d.ts","sourceRoot":"","sources":["../src/CVPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAa,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9E,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,EAAE,CAAC;CACpB;AAID,eAAO,MAAM,WAAW,UAA4C,CAAA;AAEpE,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,GAAE,MAAM,CAW1D;AAED,wBAAgB,cAAc,CAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,GAAE,MAAM,CAM9D;AAED,wBAAgB,WAAW,CAAE,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,OAAO,GAAE,MAAM,CAIxE;AAsED,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,cAAc,CA0BhB"}
@@ -1,119 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.datesAsText = datesAsText;
7
- exports.languageAsText = languageAsText;
8
- exports.presentCV = presentCV;
9
- exports.skillAsText = skillAsText;
10
- exports.typesOfRole = void 0;
11
- var _rdflib = require("rdflib");
12
- var _solidUi = require("solid-ui");
13
- const ORG = (0, _rdflib.Namespace)('http://www.w3.org/ns/org#');
14
- const typesOfRole = exports.typesOfRole = ['PastRole', 'CurrentRole', 'FutureRole'];
15
- function skillAsText(store, sk) {
16
- if (sk.termType === 'Literal') return sk.value; // Not normal but allow this
17
- const publicId = store.anyJS(sk, _solidUi.ns.solid('publicId'));
18
- if (publicId) {
19
- const name = store.anyJS(publicId, _solidUi.ns.schema('name'));
20
- if (name) return name; // @@ check language and get name in diff language if necessary
21
- }
22
- const manual = store.anyJS(sk, _solidUi.ns.vcard('role'));
23
- if (manual && manual[0] > '') return manual;
24
- return '';
25
- }
26
- function languageAsText(store, lan) {
27
- if (lan.termType === 'Literal') return lan.value; // Not normal but allow this
28
- const publicId = store.anyJS(lan, _solidUi.ns.solid('publicId'));
29
- if (publicId) return _solidUi.utils.label(publicId, true); // @@ check language and get name in diff language if necessary
30
- return '';
31
- }
32
- function datesAsText(startDate, endDate) {
33
- return startDate ? '(' + startDate.value.slice(0, 10) + ' to ' + (endDate ? endDate.value.slice(0, 10) : '') + ')' : '';
34
- }
35
- function expandRdfList(store, node) {
36
- const collectionElements = node.elements;
37
- if (Array.isArray(collectionElements)) {
38
- return collectionElements.flatMap(element => expandRdfList(store, element));
39
- }
40
- const first = store.any(node, _solidUi.ns.rdf('first'));
41
- if (!first) return [node];
42
- const items = [];
43
- let current = node;
44
- while (current) {
45
- const value = store.any(current, _solidUi.ns.rdf('first'));
46
- if (value) items.push(...expandRdfList(store, value));
47
- const rest = store.any(current, _solidUi.ns.rdf('rest'));
48
- if (!rest || rest.termType === 'NamedNode' && rest.value === _solidUi.ns.rdf('nil').value) break;
49
- current = rest;
50
- }
51
- return items;
52
- }
53
- function getRolesByType(store, subject) {
54
- const memberships = store.each(null, ORG('member'), subject, null);
55
- const rolesByType = {
56
- PastRole: [],
57
- CurrentRole: [],
58
- FutureRole: []
59
- };
60
- for (const membership of memberships) {
61
- let orgHomePage, orgNameGiven, publicIdName, roleName, publicId;
62
- // Things should have start dates but we will be very lenient in this view
63
- const startDate = store.any(membership, _solidUi.ns.schema('startDate'));
64
- const endDate = store.any(membership, _solidUi.ns.schema('endDate'));
65
- const dates = datesAsText(startDate, endDate);
66
- const organization = store.any(membership, ORG('organization'));
67
- if (organization) {
68
- orgNameGiven = store.anyJS(organization, _solidUi.ns.schema('name'));
69
- orgHomePage = store.any(organization, _solidUi.ns.schema('uri'));
70
- publicId = store.any(organization, _solidUi.ns.solid('publicId'));
71
- }
72
- if (publicId) {
73
- publicIdName = store.anyJS(publicId, _solidUi.ns.schema('name'));
74
- }
75
- const orgName = publicIdName || orgNameGiven;
76
- const escoRole = store.any(membership, ORG('role'));
77
- if (escoRole) {
78
- roleName = store.anyJS(escoRole, _solidUi.ns.schema('name'));
79
- }
80
- const roleText0 = store.anyJS(membership, _solidUi.ns.vcard('role'));
81
- const roleText = roleText0 && roleName ? roleName + ' - ' + roleText0 : roleText0 || roleName;
82
- const item = {
83
- startDate: startDate,
84
- endDate,
85
- orgName,
86
- roleText,
87
- dates,
88
- orgHomePage
89
- };
90
- for (const t of typesOfRole) {
91
- if (store.holds(membership, _solidUi.ns.rdf('type'), _solidUi.ns.solid(t))) {
92
- rolesByType[t].push(item);
93
- }
94
- }
95
- }
96
- return rolesByType;
97
- }
98
- function presentCV(subject, store) {
99
- const rolesByType = getRolesByType(store, subject);
100
- // Most recent thing most relevant -> sort by end date
101
- for (const t of typesOfRole) {
102
- rolesByType[t].sort(function (x, y) {
103
- if (x.endDate && y.endDate) {
104
- return x.endDate > y.endDate ? -1 : 1;
105
- }
106
- return x.startDate > y.startDate ? -1 : 1;
107
- });
108
- }
109
- const skills = store.each(subject, _solidUi.ns.schema('skills')).map(sk => skillAsText(store, sk)).filter(skill => skill !== '');
110
- const languageNodes = store.each(subject, _solidUi.ns.schema('knowsLanguage'));
111
- const languages = languageNodes.flatMap(node => expandRdfList(store, node)).map(lan => languageAsText(store, lan));
112
- // Deduplicate languages
113
- const uniqueLanguages = Array.from(new Set(languages));
114
- return {
115
- rolesByType,
116
- skills,
117
- languages: uniqueLanguages
118
- };
119
- }
@@ -1,6 +0,0 @@
1
- import { DataBrowserContext } from 'pane-registry';
2
- import { NamedNode } from 'rdflib';
3
- import { TemplateResult } from 'lit-html';
4
- import './styles/FriendList.css';
5
- export declare const FriendList: (subject: NamedNode, context: DataBrowserContext) => TemplateResult | null;
6
- //# sourceMappingURL=FriendList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FriendList.d.ts","sourceRoot":"","sources":["../src/FriendList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,yBAAyB,CAAA;AAIhC,eAAO,MAAM,UAAU,GACrB,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,cAAc,GAAG,IAiBnB,CAAA"}
package/lib/FriendList.js DELETED
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.FriendList = void 0;
7
- var _litHtml = require("lit-html");
8
- require("./styles/FriendList.css");
9
- var _addMeToYourFriends = require("./addMeToYourFriends");
10
- const FriendList = (subject, context) => {
11
- const friends = (0, _addMeToYourFriends.extractFriends)(false, subject, context);
12
- if (!friends || !friends.textContent?.trim()) return null;
13
- return (0, _litHtml.html)`
14
- <section
15
- class="friendListSection"
16
- data-testid="friend-list"
17
- >
18
- <h2 id="friends-section-title" class="sr-only">Friends</h2>
19
- <nav aria-label="Friend profiles">
20
- <ul class="list-reset zebra-stripe" role="list">
21
- ${friends}
22
- </ul>
23
- </nav>
24
- </section>
25
- `;
26
- };
27
- exports.FriendList = FriendList;
@@ -1,6 +0,0 @@
1
- import './styles/ProfileCard.css';
2
- import { ProfilePresentation } from './presenter';
3
- import { DataBrowserContext } from 'pane-registry';
4
- import { NamedNode } from 'rdflib';
5
- export declare const ProfileCard: ({ name, imageSrc, introduction, location, pronouns, highlightColor, backgroundColor }: ProfilePresentation, context: DataBrowserContext, subject: NamedNode) => import("lit-html").TemplateResult<1>;
6
- //# sourceMappingURL=ProfileCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileCard.d.ts","sourceRoot":"","sources":["../src/ProfileCard.ts"],"names":[],"mappings":"AACA,OAAO,0BAA0B,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,eAAO,MAAM,WAAW,GAAI,uFAEzB,mBAAmB,EAAE,SAAS,kBAAkB,EAAE,SAAS,SAAS,yCAwBtE,CAAA"}
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ProfileCard = void 0;
7
- var _litHtml = require("lit-html");
8
- require("./styles/ProfileCard.css");
9
- var _addMeToYourFriends = require("./addMeToYourFriends");
10
- var _QRCodeCard = require("./QRCodeCard");
11
- const ProfileCard = ({
12
- name,
13
- imageSrc,
14
- introduction,
15
- location,
16
- pronouns,
17
- highlightColor,
18
- backgroundColor
19
- }, context, subject) => {
20
- return (0, _litHtml.html)`
21
- <article class="profileCard" aria-labelledby="profile-name">
22
- <h2 id="profile-name" class="sr-only">${name}</h2>
23
- <header class="header flex-column-center mb-md" aria-label="Profile information">
24
- ${Image(imageSrc, name)}
25
- </header>
26
-
27
- <section class="intro text-center" aria-label="About">
28
- ${Line(introduction, '', 'About')}
29
- ${Line(location, '🌐', 'Location')}
30
- ${Line(pronouns, '', 'Pronouns')}
31
- </section>
32
-
33
- <section class="buttonSection text-center" aria-label="Actions">
34
- ${(0, _addMeToYourFriends.addMeToYourFriendsDiv)(subject, context)}
35
- </section>
36
-
37
- <div class="qrCodeSection section-centered">
38
- ${(0, _QRCodeCard.QRCodeCard)(highlightColor, backgroundColor, subject)}
39
- </div>
40
- </article>
41
- `;
42
- };
43
- exports.ProfileCard = ProfileCard;
44
- const Line = (value, prefix = _litHtml.nothing, label = '') => value ? (0, _litHtml.html)`
45
- <div class="details" role="text" ${label ? `aria-label="${label}: ${value}"` : ''}>
46
- ${prefix} ${value}
47
- </div>
48
- ` : _litHtml.nothing;
49
- const Image = (src, alt) => src ? (0, _litHtml.html)`
50
- <img
51
- class="image"
52
- src=${src}
53
- alt="Profile photo of ${alt}"
54
- width="160"
55
- height="160"
56
- loading="eager"
57
- />
58
- ` : (0, _litHtml.html)`
59
- <div class="image-alt" role="img" aria-label="${alt}" tabindex="0">
60
- ${alt}
61
- </div>
62
- `;
@@ -1,5 +0,0 @@
1
- import { TemplateResult } from 'lit-html';
2
- import { SocialPresentation } from './SocialPresenter';
3
- import './styles/SocialCard.css';
4
- export declare const SocialCard: (SocialData: SocialPresentation) => TemplateResult;
5
- //# sourceMappingURL=SocialCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SocialCard.d.ts","sourceRoot":"","sources":["../src/SocialCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,yBAAyB,CAAA;AAGhC,eAAO,MAAM,UAAU,GACrB,YAAY,kBAAkB,KAC7B,cA8CF,CAAA"}
package/lib/SocialCard.js DELETED
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SocialCard = void 0;
7
- var _litHtml = require("lit-html");
8
- require("./styles/SocialCard.css");
9
- const SocialCard = SocialData => {
10
- const {
11
- accounts
12
- } = SocialData;
13
- if (accounts.length) {
14
- return (0, _litHtml.html)`
15
- <section
16
- class="socialCard"
17
- aria-labelledby="social-card-title"
18
- data-testid="social-media"
19
- >
20
- <nav aria-label="Social media profiles">
21
- <ul class="socialList list-reset" role="list">
22
- ${accounts.map(account => renderAccount(account))}
23
- </ul>
24
- </nav>
25
- </section>
26
- `;
27
- }
28
- function renderAccount(account) {
29
- return account.homepage && account.name && account.icon ? (0, _litHtml.html)`
30
- <li class="socialItem" role="listitem">
31
- <a
32
- href="${account.homepage}"
33
- target="_blank"
34
- rel="noopener noreferrer"
35
- aria-label="Visit ${account.name} profile (opens in new tab)"
36
- >
37
- <img
38
- class="socialIcon"
39
- src="${account.icon}"
40
- alt="${account.name} icon"
41
- width="40"
42
- height="40"
43
- loading="lazy"
44
- />
45
- <span class="text-wrap-anywhere">${account.name}</span>
46
- </a>
47
- </li>
48
- ` : (0, _litHtml.html)``;
49
- }
50
- };
51
- exports.SocialCard = SocialCard;
@@ -1,11 +0,0 @@
1
- import { LiveStore, NamedNode } from 'rdflib';
2
- export interface Account {
3
- name: string;
4
- icon: string;
5
- homepage: string;
6
- }
7
- export interface SocialPresentation {
8
- accounts: Account[];
9
- }
10
- export declare function presentSocial(subject: NamedNode, store: LiveStore): SocialPresentation;
11
- //# sourceMappingURL=SocialPresenter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SocialPresenter.d.ts","sourceRoot":"","sources":["../src/SocialPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAQ,MAAM,QAAQ,CAAA;AAQnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAiCD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GACf,kBAAkB,CA+EpB"}
@@ -1,117 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.presentSocial = presentSocial;
7
- var _solidUi = require("solid-ui");
8
- var _rdfFormsHelper = require("./rdfFormsHelper");
9
- /* babel-plugin-inline-import './ontology/socialMedia.ttl' */
10
- const socialMediaForm = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix : <#>.\n\n########### ATTENTION - we cannot rename this ontology file name without migrating existing data on existing accounts\n\n########### Social Media - other accounts\n#\n# Twitter, linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:this\n <http://purl.org/dc/elements/1.1/title> \"Social media form\" ;\n a ui:Form ;\n ui:parts (\n :SocialsForm\n ).\n\n:SocialsForm a ui:Multiple;\n ui:label \"online account\";\n ui:property foaf:account; # the triple is created with the foaf:acccounts predicate\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :AccountField \n :AccountIdField ).\n\n:AccountField a ui:Classifier; \n ui:label \"Account\"@en;\n ui:multiple false ; \n ui:category foaf:Account. # the accounts are described by the foaf:Account predicate\n\n# this is what is needed to make a dropdown box\nfoaf:Account a rdfs:Class;\n rdfs:label \"Online Account Provider\";\n owl:disjointUnionOf ( \n :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount \n :OrcidAccount :PinterestAccount :RedditAccount :SnapchatAccount :StravaAccount \n :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:AccountIdField a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for :BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for :DiggAccount; ui:use :DiggIdField],\n [ ui:for :FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for :GithubAccount; ui:use :GithubIdField ],\n [ ui:for :InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for :LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for :MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for :MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for :MediumAccount; ui:use :MediumIdField ],\n [ ui:for :NostrAccount; ui:use :NostrIdField ],\n [ ui:for :OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for :PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for :RedditAccount; ui:use :RedditIdField ],\n [ ui:for :StravaAccount; ui:use :StravaIdField ],\n [ ui:for :SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for :TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for :TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for :TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for :OtherAccount; ui:use :OtherIdForm ] .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Bluesky\";\n foaf:userProfilePrefix \"https://bsky.app/profile/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Digg\";\n foaf:userProfilePrefix \"https://www.digg.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Facebook\";\n foaf:userProfilePrefix \"https://www.facebook.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Github\";\n foaf:userProfilePrefix \"https://www.github.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Instagram\";\n foaf:userProfilePrefix \"https://www.instagram.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"LinkedIn\";\n foaf:userProfilePrefix \"https://www.linkedin.com/in/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Mastodon\" ;\n foaf:userProfilePrefix \"https://mastodon.social/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Matrix\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix \"https://matrix.to/#/\" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Medium\";\n foaf:userProfilePrefix \"https://medium.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Nostr\";\n foaf:userProfilePrefix \"https://primal.net/p/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ORCiD\";\n foaf:userProfilePrefix \"https://orcid.org/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Pinterest\";\n foaf:userProfilePrefix \"https://pin.it/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Reddit\";\n foaf:userProfilePrefix \"https://www.reddit.com/user/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Strava\";\n foaf:userProfilePrefix \"https://www.strava.com/athletes/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Tumblr\";\n foaf:userProfilePrefix \"https://www.tumblr.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"X\";\n foaf:userProfilePrefix \"https://x.com/\";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n:BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\".\n\n:DiggIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*\".\n\n:FacebookIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:GithubIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:InstagramIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MastodonIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MatrixIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:MediumIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:NostrIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*\".\n\n:OrcidIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:PinterestIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:RedditIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:StravaIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TiktokIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TumblrIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n:TwitterIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:maxLength \"200\" ;\n ui:property foaf:accountName ; \n ui:pattern \"@[a-z0-9A-Z_-]*\".\n\n# an unknown online account needs more info\n\n:OtherIdForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :OtherIdField \n :OtherIconField \n :OtherLabelField ).\n\n:OtherIdField\n a ui:NamedNodeURIField ;\n ui:label \"Account link\";\n ui:maxLength \"200\" ;\n ui:property foaf:homepage.\n\n:OtherIconField\n a ui:NamedNodeURIField ;\n ui:label \"Icon link\";\n ui:maxLength \"200\" ;\n ui:property foaf:icon.\n\n:OtherLabelField\n a ui:SingleLineTextField ;\n ui:label \"Name\";\n ui:maxLength \"200\" ;\n ui:property rdfs:label.\n\n# ends\n";
11
- const socialMediaFormName = 'socialMedia.ttl'; // The name of the file to upload
12
-
13
- const DEFAULT_ICON_URI = _solidUi.icons.iconBase + 'noun_10636_grey.svg'; // grey disc
14
-
15
- function expandRdfList(store, node) {
16
- const visited = new Set();
17
- function inner(node) {
18
- const termType = node.termType || typeof node;
19
- const value = node.value || String(node);
20
- const key = `${termType}:${value}`;
21
- if (visited.has(key)) return [];
22
- visited.add(key);
23
- const collectionElements = node.elements;
24
- if (Array.isArray(collectionElements)) {
25
- return collectionElements.flatMap(element => inner(element));
26
- }
27
- const first = store.any(node, _solidUi.ns.rdf('first'));
28
- if (!first) return [node];
29
- const items = [];
30
- let current = node;
31
- while (current) {
32
- const value = store.any(current, _solidUi.ns.rdf('first'));
33
- if (value) items.push(...inner(value));
34
- const rest = store.any(current, _solidUi.ns.rdf('rest'));
35
- if (!rest || rest.termType === 'NamedNode' && rest.value === _solidUi.ns.rdf('nil').value) break;
36
- current = rest;
37
- }
38
- return items;
39
- }
40
- return inner(node);
41
- }
42
- function presentSocial(subject, store) {
43
- function nameForAccount(subject) {
44
- const acName = store.any(subject, _solidUi.ns.foaf('name')) || store.any(subject, _solidUi.ns.rdfs('label')); // on the account itself?
45
- if (acName) return acName.value;
46
- const classes = store.each(subject, _solidUi.ns.rdf('type'));
47
- for (const k of classes) {
48
- const classIcon = store.any(k, _solidUi.ns.rdfs('label'));
49
- if (classIcon) {
50
- return classIcon.value;
51
- }
52
- return _solidUi.utils.label(k);
53
- }
54
- return 'Unknown Account';
55
- }
56
- function iconForAccount(subject) {
57
- const acIcon = store.any(subject, _solidUi.ns.foaf('icon')); // on the account itself?
58
- if (acIcon) return acIcon.value;
59
- const classes = store.each(subject, _solidUi.ns.rdf('type'));
60
- if (classes.length > 0) {
61
- for (const k of classes) {
62
- const classIcon = store.any(k, _solidUi.ns.foaf('icon'));
63
- if (classIcon !== null) {
64
- return classIcon.value;
65
- }
66
- }
67
- }
68
- return DEFAULT_ICON_URI;
69
- }
70
- function homepageForAccount(subject) {
71
- const acHomepage = store.any(subject, _solidUi.ns.foaf('homepage')); // on the account itself?
72
- if (acHomepage) return acHomepage.value;
73
- const id = store.anyJS(subject, _solidUi.ns.foaf('accountName'), null, subject.doc()) || 'No_account_Name';
74
- const classes = store.each(subject, _solidUi.ns.rdf('type'));
75
- for (const k of classes) {
76
- // Fix: ensure k is a NamedNode for store.any
77
- if (k.termType === 'NamedNode') {
78
- const userProfilePrefix = store.any(k, _solidUi.ns.foaf('userProfilePrefix'));
79
- if (userProfilePrefix) {
80
- return userProfilePrefix.value + id.trim();
81
- }
82
- }
83
- }
84
- return store.anyJS(subject, _solidUi.ns.foaf('homepage'), null, subject.doc()) || '';
85
- }
86
- function accountAsObject(ac) {
87
- return {
88
- name: nameForAccount(ac),
89
- icon: iconForAccount(ac),
90
- homepage: homepageForAccount(ac)
91
- };
92
- }
93
-
94
- // we need to load the social media accounts ontology to be able to query all data needed
95
- (0, _rdfFormsHelper.loadDocument)(store, socialMediaForm, socialMediaFormName);
96
- const accountNodes = store.each(subject, _solidUi.ns.foaf('account'));
97
- let accountThings = accountNodes.flatMap(node => expandRdfList(store, node));
98
- // Deduplicate by foaf:accountName value
99
- const accountNameSet = new Set();
100
- const accounts = [];
101
- for (const ac of accountThings) {
102
- if (ac.termType === 'NamedNode') {
103
- const accountNameNode = store.any(ac, _solidUi.ns.foaf('accountName'));
104
- const accountName = accountNameNode ? accountNameNode.value : '';
105
- if (!accountNameSet.has(accountName)) {
106
- accountNameSet.add(accountName);
107
- accounts.push(accountAsObject(ac));
108
- }
109
- }
110
- }
111
- if (!accounts.length) return {
112
- accounts: []
113
- };
114
- return {
115
- accounts
116
- };
117
- }
@@ -1,10 +0,0 @@
1
- import { TemplateResult } from 'lit-html';
2
- import { NamedNode } from 'rdflib';
3
- import { DataBrowserContext } from 'pane-registry';
4
- import './styles/StuffCard.css';
5
- import { ProfilePresentation } from './presenter';
6
- export declare const StuffCard: (profileBasics: ProfilePresentation, context: DataBrowserContext, subject: NamedNode, stuffData: any) => TemplateResult;
7
- export declare function renderThingAsDOM(thing: any, dom: any): any;
8
- export declare function renderThing(thing: any, dom: any): any;
9
- export declare function renderThings(things: any, dom: any): any;
10
- //# sourceMappingURL=StuffCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StuffCard.d.ts","sourceRoot":"","sources":["../src/StuffCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,wBAAwB,CAAA;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGjD,eAAO,MAAM,SAAS,GAAI,eAAe,mBAAmB,EAC1D,SAAS,kBAAkB,EAC3B,SAAS,SAAS,EAAE,cAAS,KAAG,cAuBjC,CAAA;AAED,wBAAgB,gBAAgB,CAAE,KAAK,KAAA,EAAE,GAAG,KAAA,OAK3C;AAED,wBAAgB,WAAW,CAAE,KAAK,KAAA,EAAE,GAAG,KAAA,OAEtC;AAED,wBAAgB,YAAY,CAAC,MAAM,KAAA,EAAE,GAAG,KAAA,OAGvC"}