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
@@ -0,0 +1,15 @@
1
+ import { LiveStore } from 'rdflib';
2
+ export type SocialAccountOption = {
3
+ classUri: string;
4
+ label: string;
5
+ icon: string;
6
+ homepage?: string;
7
+ userProfilePrefix?: string;
8
+ };
9
+ export declare function findSocialAccountOption(options: SocialAccountOption[], value: string): SocialAccountOption | undefined;
10
+ export declare function ensureSocialOntologyLoaded(store: LiveStore): void;
11
+ export declare function getSocialAccountOptions(store: LiveStore): SocialAccountOption[];
12
+ export declare function nameForAccount(store: LiveStore, accountNode: any): string;
13
+ export declare function iconForAccount(store: LiveStore, accountNode: any): string;
14
+ export declare function homepageForAccount(store: LiveStore, accountNode: any): string;
15
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/sections/social/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAAyB,MAAM,QAAQ,CAAA;AA0HhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAWD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAkBtH;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAEjE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS,GAAG,mBAAmB,EAAE,CAiE/E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAYzE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAsBzE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAmB7E"}
@@ -0,0 +1,316 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ensureSocialOntologyLoaded = ensureSocialOntologyLoaded;
7
+ exports.findSocialAccountOption = findSocialAccountOption;
8
+ exports.getSocialAccountOptions = getSocialAccountOptions;
9
+ exports.homepageForAccount = homepageForAccount;
10
+ exports.iconForAccount = iconForAccount;
11
+ exports.nameForAccount = nameForAccount;
12
+ var _rdflib = require("rdflib");
13
+ var _solidUi = require("solid-ui");
14
+ var _profileIcons = require("../../icons-svg/profileIcons");
15
+ var _rdfFormsHelper = require("../../rdfFormsHelper");
16
+ var _rdfList = require("../shared/rdfList");
17
+ var _constants = require("./constants");
18
+ var _discord = _interopRequireDefault(require("../../../icons-png/discord.png"));
19
+ var _dribbble = _interopRequireDefault(require("../../../icons-png/dribbble.png"));
20
+ var _facebook = _interopRequireDefault(require("../../../icons-png/facebook.png"));
21
+ var _instagram = _interopRequireDefault(require("../../../icons-png/instagram.png"));
22
+ var _linkedin = _interopRequireDefault(require("../../../icons-png/linkedin.png"));
23
+ var _pinterest = _interopRequireDefault(require("../../../icons-png/pinterest.png"));
24
+ var _sharechat = _interopRequireDefault(require("../../../icons-png/sharechat.png"));
25
+ var _snapchat = _interopRequireDefault(require("../../../icons-png/snapchat.png"));
26
+ var _spotify = _interopRequireDefault(require("../../../icons-png/spotify.png"));
27
+ var _telegram = _interopRequireDefault(require("../../../icons-png/telegram.png"));
28
+ var _tiktok = _interopRequireDefault(require("../../../icons-png/tiktok.png"));
29
+ var _whatsapp = _interopRequireDefault(require("../../../icons-png/whatsapp.png"));
30
+ var _x = _interopRequireDefault(require("../../../icons-png/x.png"));
31
+ var _youtube = _interopRequireDefault(require("../../../icons-png/youtube.png"));
32
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
33
+ /* babel-plugin-inline-import '../../ontology/socialMedia.ttl' */
34
+ 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# NOTE: Temporary icon strategy.\n# We currently use URNs like <urn:profile-pane:icon:<key>> for bundled local icons.\n# These icons are planned to move to a dedicated icons project in the future.\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 :DribbleAccount :DiggAccount :DiscordAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount \n :OrcidAccount :PinterestAccount :RedditAccount :SharechatAccount :SnapchatAccount :SpotifyAccount :StravaAccount \n :TelegramAccount :TiktokAccount :TumblrAccount :TwitterAccount :WhatsAppAccount :YouTubeAccount :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 :DribbleAccount; ui:use :DribbleIdField ],\n [ ui:for :DiggAccount; ui:use :DiggIdField],\n [ ui:for :FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for :DiscordAccount; ui:use :DiscordIdField ],\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 :SharechatAccount; ui:use :SharechatIdField ],\n [ ui:for :SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for :SpotifyAccount; ui:use :SpotifyIdField ],\n [ ui:for :TelegramAccount; ui:use :TelegramIdField ],\n [ ui:for :TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for :TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for :TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for :WhatsAppAccount; ui:use :WhatsAppIdField ],\n [ ui:for :YouTubeAccount; ui:use :YouTubeIdField ],\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:DribbleAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Dribble\";\n foaf:userProfilePrefix \"https://dribbble.com/\";\n foaf:icon <urn:profile-pane:icon:dribbble>;\n foaf:homepage <https://dribbble.com/> .\n\n\n:DiscordAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Discord\";\n foaf:userProfilePrefix \"https://discord.com/users/\";\n foaf:icon <urn:profile-pane:icon:discord>;\n foaf:homepage <https://discord.com/> .\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 <urn:profile-pane:icon:facebook>;\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 <urn:profile-pane:icon:instagram>;\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 <urn:profile-pane:icon:linkedin>;\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 <urn:profile-pane:icon:pinterest>;\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:SharechatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"ShareChat\";\n foaf:userProfilePrefix \"https://www.sharechat.com/user/\";\n foaf:icon <urn:profile-pane:icon:sharechat>;\n foaf:homepage <https://sharechat.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Snapchat\";\n foaf:userProfilePrefix \"https://www.snapchat.com/add/\";\n foaf:icon <urn:profile-pane:icon:snapchat>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:SpotifyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Spotify\";\n foaf:userProfilePrefix \"https://www.spotify.com/user/\";\n foaf:icon <urn:profile-pane:icon:spotify>;\n foaf:homepage <https://www.spotify.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:TelegramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Telegram\";\n foaf:userProfilePrefix \"https://t.me/\";\n foaf:icon <urn:profile-pane:icon:telegram>;\n foaf:homepage <https://telegram.org/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"TikTok\";\n foaf:userProfilePrefix \"https://www.tiktok.com/@\";\n foaf:icon <urn:profile-pane:icon:tiktok>;\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 <urn:profile-pane:icon:x>;\n foaf:homepage <https://x.com/> .\n\n:WhatsAppAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"WhatsApp\";\n foaf:userProfilePrefix \"https://wa.me/\";\n foaf:icon <urn:profile-pane:icon:whatsapp>;\n foaf:homepage <https://www.whatsapp.com/> .\n\n:YouTubeAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"YouTube\";\n foaf:userProfilePrefix \"https://www.youtube.com/\";\n foaf:icon <urn:profile-pane:icon:youtube>;\n foaf:homepage <https://www.youtube.com/> .\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label \"Other\" ;\n foaf:icon <urn:profile-pane:starIcon> .\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:DiscordIdField\n a ui:SingleLineTextField ;\n ui:label \"Username\";\n ui:property foaf:accountName ; \n ui:pattern \"[a-z0-9A-Z_-]*\".\n\n:DribbleIdField\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:SpotifyIdField\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:TelegramIdField\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:WhatsAppIdField\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:YouTubeIdField\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";
35
+ const OWL_DISJOINT_UNION_OF = (0, _rdflib.sym)('http://www.w3.org/2002/07/owl#disjointUnionOf');
36
+ const STAR_ICON_REF = 'urn:profile-pane:starIcon';
37
+ const ICON_KEY_REF_PREFIX = 'urn:profile-pane:icon:';
38
+ const SOCIAL_ONTOLOGY_URI = 'https://solidos.github.io/profile-pane/src/ontology/socialMedia.ttl';
39
+ const SOCIAL_CLASS_BASE = `${SOCIAL_ONTOLOGY_URI}#`;
40
+ const STAR_ICON_URI = (() => {
41
+ const svgMarkup = _profileIcons.starIcon?.strings?.join('') || '';
42
+ return svgMarkup ? `data:image/svg+xml;utf8,${encodeURIComponent(svgMarkup)}` : _constants.DEFAULT_ICON_URI;
43
+ })();
44
+ let cachedSocialOntologyStore = null;
45
+ const FALLBACK_SOCIAL_OPTIONS = [{
46
+ classUri: `${SOCIAL_CLASS_BASE}FacebookAccount`,
47
+ label: 'Facebook',
48
+ icon: _facebook.default,
49
+ userProfilePrefix: 'https://www.facebook.com/',
50
+ homepage: 'https://www.facebook.com/'
51
+ }, {
52
+ classUri: `${SOCIAL_CLASS_BASE}InstagramAccount`,
53
+ label: 'Instagram',
54
+ icon: _instagram.default,
55
+ userProfilePrefix: 'https://www.instagram.com/',
56
+ homepage: 'https://www.instagram.com/'
57
+ }, {
58
+ classUri: `${SOCIAL_CLASS_BASE}LinkedInAccount`,
59
+ label: 'LinkedIn',
60
+ icon: _linkedin.default,
61
+ userProfilePrefix: 'https://www.linkedin.com/in/',
62
+ homepage: 'https://linkedin.com/'
63
+ }, {
64
+ classUri: `${SOCIAL_CLASS_BASE}TiktokAccount`,
65
+ label: 'TikTok',
66
+ icon: _tiktok.default,
67
+ userProfilePrefix: 'https://www.tiktok.com/@',
68
+ homepage: 'https://www.tiktok.com/'
69
+ }, {
70
+ classUri: `${SOCIAL_CLASS_BASE}TwitterAccount`,
71
+ label: 'X',
72
+ icon: _x.default,
73
+ userProfilePrefix: 'https://x.com/',
74
+ homepage: 'https://x.com/'
75
+ }, {
76
+ classUri: `${SOCIAL_CLASS_BASE}YouTubeAccount`,
77
+ label: 'YouTube',
78
+ icon: _youtube.default,
79
+ userProfilePrefix: 'https://www.youtube.com/',
80
+ homepage: 'https://www.youtube.com/'
81
+ }, {
82
+ classUri: `${SOCIAL_CLASS_BASE}DiscordAccount`,
83
+ label: 'Discord',
84
+ icon: _discord.default,
85
+ userProfilePrefix: 'https://discord.com/users/',
86
+ homepage: 'https://discord.com/'
87
+ }, {
88
+ classUri: `${SOCIAL_CLASS_BASE}SnapchatAccount`,
89
+ label: 'Snapchat',
90
+ icon: _snapchat.default,
91
+ userProfilePrefix: 'https://www.snapchat.com/add/',
92
+ homepage: 'https://www.snapchat.com/'
93
+ }, {
94
+ classUri: `${SOCIAL_CLASS_BASE}PinterestAccount`,
95
+ label: 'Pinterest',
96
+ icon: _pinterest.default,
97
+ userProfilePrefix: 'https://pin.it/',
98
+ homepage: 'https://pinterest.com/'
99
+ }, {
100
+ classUri: `${SOCIAL_CLASS_BASE}SpotifyAccount`,
101
+ label: 'Spotify',
102
+ icon: _spotify.default,
103
+ userProfilePrefix: 'https://www.spotify.com/user/',
104
+ homepage: 'https://www.spotify.com/'
105
+ }, {
106
+ classUri: `${SOCIAL_CLASS_BASE}TelegramAccount`,
107
+ label: 'Telegram',
108
+ icon: _telegram.default,
109
+ userProfilePrefix: 'https://t.me/',
110
+ homepage: 'https://telegram.org/'
111
+ }, {
112
+ classUri: `${SOCIAL_CLASS_BASE}DribbleAccount`,
113
+ label: 'Dribble',
114
+ icon: _dribbble.default,
115
+ userProfilePrefix: 'https://dribbble.com/',
116
+ homepage: 'https://dribbble.com/'
117
+ }, {
118
+ classUri: `${SOCIAL_CLASS_BASE}SharechatAccount`,
119
+ label: 'ShareChat',
120
+ icon: _sharechat.default,
121
+ userProfilePrefix: 'https://www.sharechat.com/user/',
122
+ homepage: 'https://sharechat.com/'
123
+ }, {
124
+ classUri: `${SOCIAL_CLASS_BASE}WhatsAppAccount`,
125
+ label: 'WhatsApp',
126
+ icon: _whatsapp.default,
127
+ userProfilePrefix: 'https://wa.me/',
128
+ homepage: 'https://www.whatsapp.com/'
129
+ }];
130
+
131
+ // Temporary icon mapping for locally bundled social PNG assets.
132
+ // These icon assets are intended to move to a dedicated icons project later.
133
+ const ONTOLOGY_ICON_ASSETS = {
134
+ // New key-based references used in socialMedia.ttl.
135
+ 'discord': _discord.default,
136
+ 'dribbble': _dribbble.default,
137
+ 'facebook': _facebook.default,
138
+ 'instagram': _instagram.default,
139
+ 'linkedin': _linkedin.default,
140
+ 'pinterest': _pinterest.default,
141
+ 'sharechat': _sharechat.default,
142
+ 'snapchat': _snapchat.default,
143
+ 'spotify': _spotify.default,
144
+ 'telegram': _telegram.default,
145
+ 'tiktok': _tiktok.default,
146
+ 'whatsapp': _whatsapp.default,
147
+ 'x': _x.default,
148
+ 'youtube': _youtube.default,
149
+ // Backward compatibility for older path-based ontology values.
150
+ 'discord.png': _discord.default,
151
+ 'dribbble.png': _dribbble.default,
152
+ 'facebook.png': _facebook.default,
153
+ 'instagram.png': _instagram.default,
154
+ 'linkedin.png': _linkedin.default,
155
+ 'pinterest.png': _pinterest.default,
156
+ 'sharechat.png': _sharechat.default,
157
+ 'snapchat.png': _snapchat.default,
158
+ 'spotify.png': _spotify.default,
159
+ 'telegram.png': _telegram.default,
160
+ 'tiktok.png': _tiktok.default,
161
+ 'whatsapp.png': _whatsapp.default,
162
+ 'x.png': _x.default,
163
+ 'youtube.png': _youtube.default
164
+ };
165
+ function resolveBundledIconAsset(iconValue) {
166
+ if (!iconValue) return '';
167
+ const normalized = iconValue.trim().toLowerCase();
168
+ if (normalized.startsWith(ICON_KEY_REF_PREFIX)) {
169
+ const key = normalized.slice(ICON_KEY_REF_PREFIX.length);
170
+ return ONTOLOGY_ICON_ASSETS[key] || '';
171
+ }
172
+ const marker = 'icons-png/';
173
+ const markerIndex = normalized.lastIndexOf(marker);
174
+ if (markerIndex === -1) return '';
175
+ const fileName = normalized.slice(markerIndex + marker.length);
176
+ return ONTOLOGY_ICON_ASSETS[fileName] || '';
177
+ }
178
+ function resolveSocialIcon(classUri, iconValue) {
179
+ if (classUri.endsWith('#OtherAccount') || iconValue === STAR_ICON_REF) {
180
+ return STAR_ICON_URI;
181
+ }
182
+ const bundledIcon = resolveBundledIconAsset(iconValue);
183
+ if (bundledIcon) return bundledIcon;
184
+ return iconValue || _constants.DEFAULT_ICON_URI;
185
+ }
186
+ function getSocialOntologyStore() {
187
+ if (cachedSocialOntologyStore) return cachedSocialOntologyStore;
188
+ const ontologyStore = (0, _rdflib.graph)();
189
+ (0, _rdflib.parse)(socialMediaForm, ontologyStore, SOCIAL_ONTOLOGY_URI, 'text/turtle', () => null);
190
+ cachedSocialOntologyStore = ontologyStore;
191
+ return ontologyStore;
192
+ }
193
+ function normalizeSocialOptionKey(value) {
194
+ return (value || '').trim().toLowerCase().replace(/[#:/]/g, ' ').replace(/account\b/g, '').replace(/[^a-z0-9]/g, '');
195
+ }
196
+ function findSocialAccountOption(options, value) {
197
+ const rawValue = (value || '').trim();
198
+ if (!rawValue) return undefined;
199
+ const lowerValue = rawValue.toLowerCase();
200
+ const direct = options.find(option => {
201
+ return option.classUri.toLowerCase() === lowerValue || option.label.toLowerCase() === lowerValue;
202
+ });
203
+ if (direct) return direct;
204
+ const key = normalizeSocialOptionKey(rawValue);
205
+ if (!key) return undefined;
206
+ return options.find(option => {
207
+ const optionLabelKey = normalizeSocialOptionKey(option.label);
208
+ const optionClassKey = normalizeSocialOptionKey(option.classUri);
209
+ return optionLabelKey === key || optionClassKey === key;
210
+ });
211
+ }
212
+ function ensureSocialOntologyLoaded(store) {
213
+ (0, _rdfFormsHelper.loadDocument)(store, socialMediaForm, _constants.socialMediaFormName);
214
+ }
215
+ function getSocialAccountOptions(store) {
216
+ ensureSocialOntologyLoaded(store);
217
+ const ontologyStore = getSocialOntologyStore();
218
+ const classNodeMap = new Map();
219
+ const unionNode = ontologyStore.any(_solidUi.ns.foaf('Account'), OWL_DISJOINT_UNION_OF);
220
+ if (unionNode) {
221
+ const unionClassNodes = (0, _rdfList.expandRdfList)(ontologyStore, unionNode).filter(node => node.termType === 'NamedNode');
222
+ for (const classNode of unionClassNodes) {
223
+ classNodeMap.set(classNode.value, classNode);
224
+ }
225
+ }
226
+
227
+ // Fallback/augmentation: include any class declared as a foaf:Account subclass.
228
+ const subclassStatements = ontologyStore.statementsMatching(undefined, _solidUi.ns.rdfs('subClassOf'), _solidUi.ns.foaf('Account'));
229
+ for (const statement of subclassStatements) {
230
+ const classNode = statement.subject;
231
+ if (classNode?.termType === 'NamedNode') {
232
+ classNodeMap.set(classNode.value, classNode);
233
+ }
234
+ }
235
+ const classNodes = Array.from(classNodeMap.values());
236
+ if (!classNodes.length) return [];
237
+ const options = classNodes.map(classNode => {
238
+ const label = ontologyStore.any(classNode, _solidUi.ns.rdfs('label'))?.value || _solidUi.utils.label(classNode) || classNode.value;
239
+ const iconValue = ontologyStore.any(classNode, _solidUi.ns.foaf('icon'))?.value || '';
240
+ const icon = resolveSocialIcon(classNode.value, iconValue);
241
+ const homepage = ontologyStore.any(classNode, _solidUi.ns.foaf('homepage'))?.value || '';
242
+ const userProfilePrefix = ontologyStore.any(classNode, _solidUi.ns.foaf('userProfilePrefix'))?.value || '';
243
+ return {
244
+ classUri: classNode.value,
245
+ label,
246
+ icon,
247
+ homepage: homepage || undefined,
248
+ userProfilePrefix: userProfilePrefix || undefined
249
+ };
250
+ });
251
+
252
+ // Keep labels stable and avoid duplicates if ontology data repeats.
253
+ const seen = new Set();
254
+ const normalizedOptions = options.filter(option => {
255
+ const key = option.label.toLowerCase().trim();
256
+ if (!key || seen.has(key)) return false;
257
+ seen.add(key);
258
+ return true;
259
+ });
260
+ for (const fallbackOption of FALLBACK_SOCIAL_OPTIONS) {
261
+ const key = fallbackOption.label.toLowerCase().trim();
262
+ if (!seen.has(key)) {
263
+ normalizedOptions.push(fallbackOption);
264
+ seen.add(key);
265
+ }
266
+ }
267
+ return normalizedOptions;
268
+ }
269
+ function nameForAccount(store, accountNode) {
270
+ const accountName = store.any(accountNode, _solidUi.ns.foaf('name')) || store.any(accountNode, _solidUi.ns.rdfs('label'));
271
+ if (accountName) return accountName.value;
272
+ const classes = store.each(accountNode, _solidUi.ns.rdf('type'));
273
+ for (const classNode of classes) {
274
+ const classLabel = store.any(classNode, _solidUi.ns.rdfs('label'));
275
+ if (classLabel) return classLabel.value;
276
+ return _solidUi.utils.label(classNode);
277
+ }
278
+ return 'Unknown Account';
279
+ }
280
+ function iconForAccount(store, accountNode) {
281
+ const accountIcon = store.any(accountNode, _solidUi.ns.foaf('icon'));
282
+ if (accountIcon?.value === STAR_ICON_REF) return STAR_ICON_URI;
283
+ if (accountIcon) {
284
+ const bundledIcon = resolveBundledIconAsset(accountIcon.value);
285
+ if (bundledIcon) return bundledIcon;
286
+ return accountIcon.value;
287
+ }
288
+ const classes = store.each(accountNode, _solidUi.ns.rdf('type'));
289
+ for (const classNode of classes) {
290
+ if (classNode?.value?.endsWith('#OtherAccount')) return STAR_ICON_URI;
291
+ const classIcon = store.any(classNode, _solidUi.ns.foaf('icon'));
292
+ if (classIcon?.value === STAR_ICON_REF) return STAR_ICON_URI;
293
+ if (classIcon) {
294
+ const bundledIcon = resolveBundledIconAsset(classIcon.value);
295
+ if (bundledIcon) return bundledIcon;
296
+ return classIcon.value;
297
+ }
298
+ }
299
+ return _constants.DEFAULT_ICON_URI;
300
+ }
301
+ function homepageForAccount(store, accountNode) {
302
+ const accountHomepage = store.any(accountNode, _solidUi.ns.foaf('homepage'));
303
+ if (accountHomepage) return accountHomepage.value;
304
+ const id = String(store.anyJS(accountNode, _solidUi.ns.foaf('accountName'), null, accountNode.doc()) || 'No_account_Name').trim();
305
+ if (/^https?:\/\//i.test(id)) return id;
306
+ const classes = store.each(accountNode, _solidUi.ns.rdf('type'));
307
+ for (const classNode of classes) {
308
+ if (classNode.termType === 'NamedNode') {
309
+ const userProfilePrefix = store.any(classNode, _solidUi.ns.foaf('userProfilePrefix'));
310
+ if (userProfilePrefix) {
311
+ return userProfilePrefix.value + String(id).trim();
312
+ }
313
+ }
314
+ }
315
+ return store.anyJS(accountNode, _solidUi.ns.foaf('homepage'), null, accountNode.doc()) || '';
316
+ }
@@ -0,0 +1,4 @@
1
+ import { LiveStore, NamedNode } from 'rdflib';
2
+ import { SocialMutationPlan, SocialRow } from './types';
3
+ export declare function processSocialMutations(store: LiveStore, subject: NamedNode, mutationPlan: SocialMutationPlan, orderedRows?: SocialRow[]): Promise<void>;
4
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/social/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,SAAS,EAA0B,MAAM,QAAQ,CAAA;AAEhF,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAoYvD,wBAAsB,sBAAsB,CAC3C,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,YAAY,EAAE,kBAAkB,EAChC,WAAW,CAAC,EAAE,SAAS,EAAE,iBAQzB"}