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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectSection.d.ts","sourceRoot":"","sources":["../../../src/sections/projects/ProjectSection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAAc,MAAM,SAAS,CAAA;AAMpD,OAAO,+BAA+B,CAAA;AAmRtC,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,6CAYrC"}
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderProjectSection = renderProjectSection;
7
+ var _litHtml = require("lit-html");
8
+ var _texts = require("../../texts");
9
+ var _ProjectEditDialog = require("./ProjectEditDialog");
10
+ var _mutations = require("./mutations");
11
+ var _profileIcons = require("../../icons-svg/profileIcons");
12
+ require("../../styles/ProjectsCard.css");
13
+ var _collapsibleSection = require("../shared/collapsibleSection");
14
+ const MAX_VISIBLE_PROJECTS_MOBILE = 2;
15
+ function toggleProjectsMobileList(event) {
16
+ const button = event.currentTarget;
17
+ const section = button?.closest('.profile-section-collapsible');
18
+ if (!button || !section) return;
19
+ const nextExpanded = section.getAttribute('data-mobile-expanded') !== 'true';
20
+ section.setAttribute('data-mobile-expanded', String(nextExpanded));
21
+ button.setAttribute('aria-expanded', String(nextExpanded));
22
+ button.setAttribute('data-mobile-expanded', String(nextExpanded));
23
+ const label = button.querySelector('.project-card__more-label');
24
+ if (label) {
25
+ label.textContent = nextExpanded ? 'View Less' : 'View More';
26
+ }
27
+ }
28
+ function renderProjectImage(src, altText) {
29
+ return src ? (0, _litHtml.html)`
30
+ <img
31
+ class="project-card__thumb-image"
32
+ src=${src}
33
+ alt=${altText}
34
+ loading="lazy"
35
+ />
36
+ ` : (0, _litHtml.html)`
37
+ <div class="project-card__thumb-fallback flex-center" role="img" aria-label=${altText} tabindex="0">
38
+ ${altText}
39
+ </div>
40
+ `;
41
+ }
42
+ function toProjectRow(project, status) {
43
+ return {
44
+ url: project.url,
45
+ title: project.title,
46
+ imageUrl: project.imageUrl,
47
+ category: project.category,
48
+ name: project.name,
49
+ orgName: project.orgName,
50
+ entryNode: project.entryNode?.value || '',
51
+ status
52
+ };
53
+ }
54
+ function renderProject(project, store, subject, viewerMode, onSaved) {
55
+ if (!project) return (0, _litHtml.html)``;
56
+ const handleUnfollow = async event => {
57
+ event.preventDefault();
58
+ if (viewerMode !== 'owner') return;
59
+ const removePlan = {
60
+ create: [],
61
+ update: [],
62
+ remove: [toProjectRow(project, 'deleted')]
63
+ };
64
+ await (0, _mutations.processProjectsMutations)(store, subject, removePlan);
65
+ if (onSaved) {
66
+ await onSaved();
67
+ }
68
+ };
69
+ const normalizedCategory = (project.category || '').trim().toLowerCase();
70
+ const categoryModifier = normalizedCategory === 'project' ? 'project' : normalizedCategory === 'community' ? 'community' : 'unknown';
71
+ const categoryLabel = normalizedCategory && normalizedCategory !== 'unknown' ? normalizedCategory.charAt(0).toUpperCase() + normalizedCategory.slice(1) : 'Uncategorized';
72
+ return (0, _litHtml.html)`
73
+ <li class="project-card flex-column" role="listitem">
74
+ <a
75
+ class="project-card__link"
76
+ href=${project.url}
77
+ target="_blank"
78
+ rel="noopener noreferrer"
79
+ aria-label=${project.title ? `Open ${project.title}` : 'Open project link'}
80
+ >
81
+ <div class="project-card__wrapper">
82
+ <div class="project-card__thumb flex-center">
83
+ ${renderProjectImage(project.imageUrl, project.title || 'Project preview')}
84
+ </div>
85
+ <div class="project-card__content">
86
+ <p class="project-card__title"><strong>${project.title || project.url}</strong></p>
87
+ <p class="project-card__organization">${project.orgName || 'Organization unknown'}</p>
88
+ <p class="project-card__category project-card__category--${categoryModifier}">${categoryLabel}</p>
89
+ </div>
90
+ </div>
91
+ </a>
92
+ ${viewerMode === 'owner' ? (0, _litHtml.html)`
93
+ <div class="project-card__footer">
94
+ <button
95
+ type="button"
96
+ class="project-card__follow-button flex-center gap-xxs"
97
+ aria-label="Unfollow project"
98
+ @click=${handleUnfollow}
99
+ >
100
+ <span>${_profileIcons.checkMarkIcon} Following</span>
101
+ </button>
102
+ </div>
103
+ ` : (0, _litHtml.html)``}
104
+ </li>
105
+ `;
106
+ }
107
+ function renderOwnerEmptyProjectsContent(store, subject, projectData, viewerMode, onSaved) {
108
+ const projectDetails = projectData;
109
+ return (0, _litHtml.html)`
110
+ <div class="profile__empty-state-content flex-column-center" role="group" aria-label="Empty projects section">
111
+ <h2 id="projects-heading" tabindex="-1">${_texts.projectsHeadingText}</h2>
112
+ <p class="profile__empty-state-message">
113
+ You haven't added any projects yet. Consider adding a project to boost your profile.
114
+ </p>
115
+ </div>
116
+ <button
117
+ type="button"
118
+ class="profile__action-button--empty"
119
+ aria-label="Add project details"
120
+ @click=${event => {
121
+ return (0, _ProjectEditDialog.createProjectsEditDialog)(event, store, subject, projectDetails, viewerMode, onSaved);
122
+ }}
123
+ >
124
+ <span class="profile__action-icon" aria-hidden="true">${_profileIcons.plusDarkIcon} Add Project</span>
125
+ </button>
126
+
127
+ `;
128
+ }
129
+ function renderOwnerEmptyProjectSection(store, subject, projectData, viewerMode, onSaved) {
130
+ return (0, _litHtml.html)`
131
+ <section
132
+ aria-labelledby="projects-heading"
133
+ data-profile-section="projects"
134
+ class="profile__section--empty border-lighter flex-column-center rounded-md gap-lg"
135
+ role="region"
136
+ tabindex="-1"
137
+ >
138
+ ${renderOwnerEmptyProjectsContent(store, subject, projectData, viewerMode, onSaved)}
139
+ </section>
140
+ `;
141
+ }
142
+ function renderProjectSectionContent(projects, store, subject, viewerMode, onSaved) {
143
+ if (!projects || !projects.length || !projects[0]) return (0, _litHtml.html)``;
144
+ return (0, _litHtml.html)`${renderProject(projects[0], store, subject, viewerMode, onSaved)}${projects.length > 1 ? renderProjectSectionContent(projects.slice(1), store, subject, viewerMode, onSaved) : (0, _litHtml.html)``}`;
145
+ }
146
+ function renderProjectSectionDefault(store, subject, projects, viewerMode, onSaved) {
147
+ const hasProjects = Array.isArray(projects) && projects.length > 0;
148
+ const hiddenProjectsCount = Math.max(0, projects.length - MAX_VISIBLE_PROJECTS_MOBILE);
149
+ const isOwner = viewerMode === 'owner';
150
+ return (0, _litHtml.html)`
151
+ <section
152
+ class="profile__section border-lighter profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
153
+ aria-labelledby="projects-heading"
154
+ role="region"
155
+ tabindex="-1"
156
+ data-expanded="false"
157
+ data-mobile-expanded="${hiddenProjectsCount > 0 ? 'false' : 'true'}"
158
+ >
159
+ <header class="profile__section-header profile-section-collapsible__header">
160
+ <h2 id="projects-heading">${_texts.projectsHeadingText}</h2>
161
+ <div class="profile-section-collapsible__actions flex-column">
162
+ ${isOwner ? (0, _litHtml.html)`
163
+ <button
164
+ type="button"
165
+ class="profile__action-button profile-action-text flex-center profile-section-collapsible__edit-button"
166
+ aria-label="Add or edit projects"
167
+ @click=${event => {
168
+ return (0, _ProjectEditDialog.createProjectsEditDialog)(event, store, subject, projects, viewerMode, onSaved);
169
+ }}
170
+ >
171
+ <span class="profile-section-collapsible__edit-label profile__add-more-content inline-flex-row">
172
+ <span class="profile__add-more-icon inline-flex-row" aria-hidden="true">${_profileIcons.addIcon}</span>
173
+ Add More
174
+ </span>
175
+ <span class="profile-section-collapsible__edit-icon profile-section-collapsible__edit-icon--add profile-section-collapsible__edit-icon--projects" aria-hidden="true">${_profileIcons.plusDarkIcon}</span>
176
+ </button>
177
+ ` : (0, _litHtml.html)``}
178
+ <button
179
+ type="button"
180
+ class="inline-flex-row"
181
+ aria-label="Toggle projects section"
182
+ aria-controls="projects-panel"
183
+ aria-expanded="false"
184
+ @click=${_collapsibleSection.toggleCollapsibleSection}
185
+ >
186
+ <span class="profile-section-collapsible__chevron" aria-hidden="true">⌄</span>
187
+ </button>
188
+ </div>
189
+ </header>
190
+ <div id="projects-panel" class="profile-section-collapsible__content" aria-hidden="true">
191
+ ${hasProjects ? (0, _litHtml.html)`
192
+ <ul id="projects-rail" class="project-card__rail" role="list" aria-label="Known projects">
193
+ ${renderProjectSectionContent(projects, store, subject, viewerMode, onSaved)}
194
+ </ul>
195
+ ${hiddenProjectsCount > 0 ? (0, _litHtml.html)`
196
+ <button
197
+ type="button"
198
+ class="project-card__more-button"
199
+ aria-controls="projects-rail"
200
+ aria-expanded="false"
201
+ data-mobile-expanded="false"
202
+ @click=${toggleProjectsMobileList}
203
+ >
204
+ <span class="project-card__more-icon" aria-hidden="true">${_profileIcons.twoDownArrowsIcon}</span>
205
+ <span class="project-card__more-label">View More</span>
206
+ </button>
207
+ ` : (0, _litHtml.html)``}
208
+ ` : (0, _litHtml.html)`<p>No projects added yet.</p>`}
209
+ </div>
210
+ </section>
211
+ `;
212
+ }
213
+ function renderProjectSection(store, subject, projects, viewerMode, onSaved) {
214
+ const hasProjects = Array.isArray(projects) && projects.length > 0;
215
+ const showOwnerEmptyProject = !hasProjects && viewerMode === 'owner';
216
+ const showSection = true;
217
+ return showSection ? (0, _litHtml.html)`
218
+ ${showOwnerEmptyProject ? renderOwnerEmptyProjectSection(store, subject, projects, viewerMode, onSaved) : renderProjectSectionDefault(store, subject, projects, viewerMode, onSaved)}
219
+ ` : '';
220
+ }
@@ -0,0 +1,4 @@
1
+ import { LiveStore, NamedNode } from 'rdflib';
2
+ import { ProjectMutationPlan } from './types';
3
+ export declare function processProjectsMutations(store: LiveStore, subject: NamedNode, mutationPlan: ProjectMutationPlan): Promise<void>;
4
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/projects/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAW,MAAM,QAAQ,CAAA;AAEtD,OAAO,EAAE,mBAAmB,EAAc,MAAM,SAAS,CAAA;AAiNzD,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,iBAOrH"}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.processProjectsMutations = processProjectsMutations;
7
+ var _rdflib = require("rdflib");
8
+ var _solidUi = require("solid-ui");
9
+ /* This code is AI generated from Model: GPT-5.3-Codex */
10
+ /* Prompt: I need to store Project data only the url of the project how
11
+ should I store it please generate the code. Follow other sections */
12
+ function toProjectUrlNode(project) {
13
+ const value = (project.url || '').trim();
14
+ if (!value) return null;
15
+ try {
16
+ return (0, _rdflib.sym)(new URL(value).href);
17
+ } catch {
18
+ return null;
19
+ }
20
+ }
21
+ function normalizeProjectUrlKey(value) {
22
+ const text = (value || '').trim();
23
+ if (!text) return '';
24
+ try {
25
+ const parsed = new URL(text);
26
+ parsed.hash = '';
27
+ return parsed.href;
28
+ } catch {
29
+ return text;
30
+ }
31
+ }
32
+ function isPatchFailure(message) {
33
+ const text = (message || '').toLowerCase();
34
+ return text.includes(' on patch ') || text.includes('web error: 500') || text.includes('web error: 501') || text.includes('web error: 405') || text.includes('web error: 400');
35
+ }
36
+ function isMissingGetRecordError(message) {
37
+ return (message || '').toLowerCase().includes('no record of our http get request for document');
38
+ }
39
+ function statementKey(statement) {
40
+ return `${statement.subject?.toNT?.() || statement.subject?.value} ${statement.predicate?.toNT?.() || statement.predicate?.value} ${statement.object?.toNT?.() || statement.object?.value} ${statement.why?.toNT?.() || statement.why?.value}`;
41
+ }
42
+ function sanitizePatchStatements(store, deletions, insertions) {
43
+ const safeDeletions = Array.from(new Map((deletions || []).filter(statement => {
44
+ if (!statement || !statement.subject || !statement.predicate || !statement.object) return false;
45
+ return store.holds(statement.subject, statement.predicate, statement.object, statement.why);
46
+ }).map(statement => [statementKey(statement), statement])).values());
47
+ const safeInsertions = Array.from(new Map((insertions || []).filter(statement => Boolean(statement && statement.subject && statement.predicate && statement.object)).map(statement => [statementKey(statement), statement])).values());
48
+ return {
49
+ safeDeletions,
50
+ safeInsertions
51
+ };
52
+ }
53
+ async function runPutFallback(store, doc, deletions, insertions) {
54
+ const updater = store.updater;
55
+ const fetcher = store.fetcher;
56
+ if (!updater || typeof updater.serialize !== 'function' || !fetcher || typeof fetcher.webOperation !== 'function') {
57
+ throw new Error('Project updates are not supported by this store updater.');
58
+ }
59
+ const currentStatements = store.statementsMatching(undefined, undefined, undefined, doc).slice();
60
+ const deletionKeys = new Set((deletions || []).map(statement => statementKey(statement)));
61
+ const nextStatements = currentStatements.filter(statement => !deletionKeys.has(statementKey(statement))).concat(insertions || []);
62
+ const contentType = 'text/turtle';
63
+ const body = updater.serialize(doc.value, nextStatements, contentType);
64
+ const response = await fetcher.webOperation('PUT', doc.value, {
65
+ noMeta: true,
66
+ contentType,
67
+ body
68
+ });
69
+ if (!response || response.ok !== true) {
70
+ const status = response?.status || 'unknown';
71
+ throw new Error(`Web error: ${status} on PUT of <${doc.value}>`);
72
+ }
73
+ store.remove(deletions);
74
+ insertions.forEach(statement => {
75
+ store.add(statement.subject, statement.predicate, statement.object, statement.why);
76
+ });
77
+ }
78
+ async function runUpdateWithDavFallback(store, doc, deletions, insertions) {
79
+ const updater = store.updater;
80
+ if (!updater || typeof updater.update !== 'function') {
81
+ throw new Error('Project updates are not supported by this store updater.');
82
+ }
83
+ const {
84
+ safeDeletions,
85
+ safeInsertions
86
+ } = sanitizePatchStatements(store, deletions, insertions);
87
+ if (safeDeletions.length === 0 && safeInsertions.length === 0) {
88
+ return;
89
+ }
90
+ const tryUpdate = () => new Promise((resolve, reject) => {
91
+ updater.update(safeDeletions, safeInsertions, (_uri, ok, message) => {
92
+ if (ok === true) {
93
+ resolve();
94
+ return;
95
+ }
96
+ reject(new Error(message || 'Failed to save projects'));
97
+ });
98
+ });
99
+ try {
100
+ await tryUpdate();
101
+ return;
102
+ } catch (error) {
103
+ const message = error instanceof Error ? error.message : String(error);
104
+ if (!isPatchFailure(message) || typeof updater.updateDav !== 'function') {
105
+ throw error;
106
+ }
107
+ if (store.fetcher && typeof store.fetcher.load === 'function') {
108
+ try {
109
+ await store.fetcher.load(doc);
110
+ } catch {
111
+ // continue to fallback
112
+ }
113
+ }
114
+ try {
115
+ await new Promise((resolve, reject) => {
116
+ updater.updateDav(doc, safeDeletions, safeInsertions, (_uri, ok, body) => {
117
+ if (ok === true) {
118
+ resolve();
119
+ return;
120
+ }
121
+ reject(new Error(body || message || 'Failed to save projects'));
122
+ });
123
+ });
124
+ } catch (davError) {
125
+ const davMessage = davError instanceof Error ? davError.message : String(davError);
126
+ if (!isMissingGetRecordError(davMessage)) {
127
+ throw davError;
128
+ }
129
+ await runPutFallback(store, doc, safeDeletions, safeInsertions);
130
+ }
131
+ }
132
+ }
133
+ async function mutateProjectEntries(store, subject, projectOps) {
134
+ const doc = subject.doc();
135
+ const existingLinks = store.each(subject, _solidUi.ns.solid('community'), null, doc);
136
+ const existingByUrl = new Map();
137
+ existingLinks.forEach(linkNode => {
138
+ if (!linkNode || linkNode.termType !== 'NamedNode') return;
139
+ const key = normalizeProjectUrlKey(linkNode.value);
140
+ if (key && !existingByUrl.has(key)) {
141
+ existingByUrl.set(key, linkNode);
142
+ }
143
+ });
144
+ const deletions = [];
145
+ const insertions = [];
146
+ const removeLink = link => {
147
+ deletions.push((0, _rdflib.st)(subject, _solidUi.ns.solid('community'), link, doc));
148
+ };
149
+ const addLink = link => {
150
+ insertions.push((0, _rdflib.st)(subject, _solidUi.ns.solid('community'), link, doc));
151
+ };
152
+ projectOps.remove.forEach(project => {
153
+ const entryKey = normalizeProjectUrlKey(project.entryNode || '');
154
+ const urlKey = normalizeProjectUrlKey(project.url);
155
+ const existing = entryKey && existingByUrl.get(entryKey) || urlKey && existingByUrl.get(urlKey);
156
+ if (existing) removeLink(existing);
157
+ });
158
+ projectOps.update.forEach(project => {
159
+ const newLink = toProjectUrlNode(project);
160
+ const urlKey = normalizeProjectUrlKey(project.url);
161
+ const entryKey = normalizeProjectUrlKey(project.entryNode || '');
162
+ const existing = entryKey && existingByUrl.get(entryKey) || urlKey && existingByUrl.get(urlKey);
163
+ if (existing) removeLink(existing);
164
+ if (newLink) addLink(newLink);
165
+ });
166
+ const seenCreateUrlKeys = new Set();
167
+ projectOps.create.forEach(project => {
168
+ const urlKey = normalizeProjectUrlKey(project.url);
169
+ if (urlKey && (existingByUrl.has(urlKey) || seenCreateUrlKeys.has(urlKey))) {
170
+ return;
171
+ }
172
+ const newLink = toProjectUrlNode(project);
173
+ if (!newLink) return;
174
+ addLink(newLink);
175
+ if (urlKey) {
176
+ seenCreateUrlKeys.add(urlKey);
177
+ }
178
+ });
179
+ await runUpdateWithDavFallback(store, doc, deletions, insertions);
180
+ }
181
+ async function processProjectsMutations(store, subject, mutationPlan) {
182
+ try {
183
+ await mutateProjectEntries(store, subject, mutationPlan);
184
+ } catch (error) {
185
+ const message = error instanceof Error ? error.message : String(error);
186
+ throw new Error(`Failed to save projects: ${message}`);
187
+ }
188
+ }
@@ -0,0 +1,5 @@
1
+ import { LiveStore, NamedNode } from 'rdflib';
2
+ import { ProjectDetails } from './types';
3
+ export declare function ensureProjectDocumentsLoaded(subject: NamedNode, store: LiveStore): Promise<void>;
4
+ export declare function presentProjects(subject: NamedNode, store: LiveStore): Promise<ProjectDetails[]>;
5
+ //# sourceMappingURL=selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/sections/projects/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAiGxC,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCtG;AA4BD,wBAAsB,eAAe,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAgErG"}
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ensureProjectDocumentsLoaded = ensureProjectDocumentsLoaded;
7
+ exports.presentProjects = presentProjects;
8
+ var _rdflib = require("rdflib");
9
+ var _solidUi = require("solid-ui");
10
+ var _rdfList = require("../shared/rdfList");
11
+ /* The following functions communityNodesForSubject and ensureProjectDocumentsLoaded
12
+ and a few updates in presentProjects are generated by AI Model: GPT-5.3-Codex */
13
+ /* Prompt: Image and business type are not displaying, could it be that I didn't load
14
+ the document? */
15
+ function communityNodesForSubject(subject, store, doc) {
16
+ const inProfileDoc = store.each(subject, _solidUi.ns.solid('community'), null, doc);
17
+ const inAnyDoc = store.each(subject, _solidUi.ns.solid('community'), null, null);
18
+ const rawNodes = [...inProfileDoc, ...inAnyDoc];
19
+ const expandedNodes = rawNodes.flatMap(node => {
20
+ const hasCollectionElements = Array.isArray(node?.elements);
21
+ const isListByTriples = (node.termType === 'BlankNode' || node.termType === 'NamedNode') && Boolean(store.any(node, _solidUi.ns.rdf('first')));
22
+ return hasCollectionElements || isListByTriples ? (0, _rdfList.expandRdfList)(store, node) : [node];
23
+ });
24
+ const seen = new Set();
25
+ const nodes = [];
26
+ for (const node of expandedNodes) {
27
+ const key = `${node?.termType || ''}:${node?.value || ''}`;
28
+ if (seen.has(key)) continue;
29
+ seen.add(key);
30
+ nodes.push(node);
31
+ }
32
+ return nodes;
33
+ }
34
+ function clearStaleRequestedState(fetcher, docUrl) {
35
+ const requested = fetcher?.requested;
36
+ if (!requested || typeof requested !== 'object') return undefined;
37
+ const previous = requested[docUrl];
38
+ const shouldClear = typeof previous === 'string' && previous !== 'requested' && previous !== 'done' || typeof previous === 'number' && previous >= 400;
39
+ if (shouldClear) {
40
+ delete requested[docUrl];
41
+ }
42
+ return previous;
43
+ }
44
+ function linkedProjectNodeFromCommunityNode(node, store) {
45
+ if (!node) return null;
46
+ if (node.termType === 'NamedNode') return node;
47
+ if (node.termType === 'Literal') {
48
+ try {
49
+ return (0, _rdflib.sym)(node.value);
50
+ } catch {
51
+ return null;
52
+ }
53
+ }
54
+ if (node.termType !== 'BlankNode') return null;
55
+ const candidatePredicates = [_solidUi.ns.solid('publicId'), _solidUi.ns.schema('url'), _solidUi.ns.foaf('homepage'), _solidUi.ns.rdfs('seeAlso'), _solidUi.ns.schema('sameAs'), _solidUi.ns.schema('mainEntityOfPage')];
56
+ for (const predicate of candidatePredicates) {
57
+ const linked = store.any(node, predicate);
58
+ if (!linked?.value) continue;
59
+ if (linked.termType === 'NamedNode') {
60
+ return linked;
61
+ }
62
+ if (linked.termType === 'Literal') {
63
+ try {
64
+ return (0, _rdflib.sym)(linked.value);
65
+ } catch {
66
+ // Keep trying the next predicate.
67
+ }
68
+ }
69
+ }
70
+ const outgoing = store.statementsMatching(node, null, null, null);
71
+ const firstNamedNode = outgoing.find(statement => statement.object.termType === 'NamedNode');
72
+ if (firstNamedNode?.object?.value) {
73
+ return firstNamedNode.object;
74
+ }
75
+ return null;
76
+ }
77
+ async function ensureProjectDocumentsLoaded(subject, store) {
78
+ const profileDoc = subject.doc();
79
+ const fetcher = store?.fetcher;
80
+ if (!fetcher || typeof fetcher.load !== 'function') {
81
+ return;
82
+ }
83
+ const communityNodes = communityNodesForSubject(subject, store, profileDoc);
84
+ const docsToLoad = new Map();
85
+ for (const node of communityNodes) {
86
+ const linkedProjectNode = linkedProjectNodeFromCommunityNode(node, store);
87
+ if (!linkedProjectNode) continue;
88
+ const projectDoc = linkedProjectNode.doc();
89
+ docsToLoad.set(projectDoc.value, projectDoc);
90
+ }
91
+ if (!docsToLoad.size) {
92
+ return;
93
+ }
94
+ await Promise.all(Array.from(docsToLoad.values()).map(async doc => {
95
+ const previousRequested = clearStaleRequestedState(fetcher, doc.value);
96
+ try {
97
+ void previousRequested;
98
+ await fetcher.load(doc);
99
+ } catch {
100
+ // Ignore individual project doc load failures so one bad doc doesn't block others.
101
+ }
102
+ }));
103
+ }
104
+ function projectNodeToUrl(node) {
105
+ if (!node) return '';
106
+ if (node.termType === 'NamedNode') return node.value || '';
107
+ if (node.termType === 'Literal') return node.value || '';
108
+ return '';
109
+ }
110
+ function normalizeUrlKey(value) {
111
+ const text = (value || '').trim();
112
+ if (!text) return '';
113
+ try {
114
+ return new URL(text).href;
115
+ } catch {
116
+ return text;
117
+ }
118
+ }
119
+ function toProjectNamedNode(node, url) {
120
+ if (node && node.termType === 'NamedNode') return node;
121
+ try {
122
+ return (0, _rdflib.sym)(url);
123
+ } catch {
124
+ return null;
125
+ }
126
+ }
127
+ async function presentProjects(subject, store) {
128
+ await ensureProjectDocumentsLoaded(subject, store);
129
+ const doc = subject.doc();
130
+ const seen = new Set();
131
+ const communityNodes = communityNodesForSubject(subject, store, doc);
132
+ const projects = communityNodes.map(communityNode => {
133
+ const linkedProjectNode = linkedProjectNodeFromCommunityNode(communityNode, store);
134
+ const url = linkedProjectNode?.value || projectNodeToUrl(communityNode);
135
+ const key = normalizeUrlKey(url);
136
+ const projectNode = linkedProjectNode || toProjectNamedNode(communityNode, url);
137
+ const projectDoc = projectNode?.doc();
138
+ const name = projectNode ? store.anyValue(projectNode, _solidUi.ns.foaf('name'), null, projectDoc || null) || undefined : undefined;
139
+ const orgName = projectNode ? store.anyValue(projectNode, _solidUi.ns.vcard('organization-name'), null, projectDoc || null) || undefined : undefined;
140
+ const title = name || (projectNode ? _solidUi.utils.label(projectNode) : _solidUi.utils.label(key));
141
+ const imageUrl = projectNode ? _solidUi.widgets.findImage(projectNode) || (_solidUi.widgets.findImageFromURI?.(projectNode) ?? undefined) : undefined;
142
+ let types = [];
143
+ if (projectNode) {
144
+ types = store.each(projectNode, _solidUi.ns.rdf('type'), null, projectDoc || null);
145
+ }
146
+ const category = types.find(t => t.termType === 'NamedNode' && (t.value === _solidUi.ns.schema('Project').value || t.value === _solidUi.ns.schema('Community').value));
147
+ const categoryValue = category?.value === _solidUi.ns.schema('Project').value ? 'project' : category?.value === _solidUi.ns.schema('Community').value ? 'community' : 'unknown';
148
+ if (!url || !key || seen.has(key)) {
149
+ return null;
150
+ }
151
+ seen.add(key);
152
+ return {
153
+ url,
154
+ title,
155
+ name,
156
+ orgName,
157
+ imageUrl,
158
+ category: categoryValue,
159
+ entryNode: communityNode
160
+ };
161
+ }).filter(project => Boolean(project));
162
+ return projects;
163
+ }
@@ -0,0 +1,28 @@
1
+ import { Node } from 'rdflib';
2
+ import { MutationOps } from '../shared/types';
3
+ import { RowStatus } from '../shared/types';
4
+ export declare const projectType: any;
5
+ export interface ProjectFields {
6
+ url: string;
7
+ title?: string;
8
+ name?: string;
9
+ orgName?: string;
10
+ imageUrl?: string;
11
+ category?: 'project' | 'community' | 'unknown';
12
+ }
13
+ export interface ProjectDetails extends ProjectFields {
14
+ entryNode: Node;
15
+ }
16
+ export interface ProjectRow extends ProjectFields {
17
+ entryNode: string;
18
+ status: RowStatus;
19
+ }
20
+ export type ProjectInputRowProps = {
21
+ rows: ProjectRow[];
22
+ index: number;
23
+ displayIndex: number;
24
+ onDelete: () => void;
25
+ onChange: () => void;
26
+ };
27
+ export type ProjectMutationPlan = MutationOps<ProjectRow>;
28
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sections/projects/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,eAAO,MAAM,WAAW,KAAuB,CAAA;AAE/C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;CAC/C;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,SAAS,CAAA;CAClB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,UAAU,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.projectType = void 0;
7
+ var _solidUi = require("solid-ui");
8
+ const projectType = exports.projectType = _solidUi.ns.schema('Project');
@@ -0,0 +1,7 @@
1
+ import { RoleDetails } from './types';
2
+ import '../../styles/EditDialogs.css';
3
+ import '../../styles/ContactInfoEditDialog.css';
4
+ import { LiveStore, NamedNode } from 'rdflib';
5
+ import { ViewerMode } from '../../types';
6
+ export declare function createResumeEditDialog(event: Event, store: LiveStore, subject: NamedNode, resumeData: RoleDetails[], viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): Promise<void>;
7
+ //# sourceMappingURL=ResumeEditDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResumeEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/resume/ResumeEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAa,MAAM,SAAS,CAAA;AAChD,OAAO,8BAA8B,CAAA;AACrC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAW,MAAM,QAAQ,CAAA;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA+nBxC,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,WAAW,EAAE,EACzB,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAoDrC"}