profile-pane 3.1.5 → 3.2.1

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 (326) hide show
  1. package/README.md +16 -0
  2. package/icons-png/discord.png +0 -0
  3. package/icons-png/dribbble.png +0 -0
  4. package/icons-png/facebook.png +0 -0
  5. package/icons-png/instagram.png +0 -0
  6. package/icons-png/linkedin.png +0 -0
  7. package/icons-png/pinterest.png +0 -0
  8. package/icons-png/sharechat.png +0 -0
  9. package/icons-png/signup.png +0 -0
  10. package/icons-png/snapchat.png +0 -0
  11. package/icons-png/spotify.png +0 -0
  12. package/icons-png/telegram.png +0 -0
  13. package/icons-png/tiktok.png +0 -0
  14. package/icons-png/whatsapp.png +0 -0
  15. package/icons-png/x.png +0 -0
  16. package/icons-png/youtube.png +0 -0
  17. package/lib/04567ff683933c35c465.png +0 -0
  18. package/lib/10163fd9b5a0e00d63a0.png +0 -0
  19. package/lib/1234dcb2eec2e45f252b.png +0 -0
  20. package/lib/20899934157df4db56cb.png +0 -0
  21. package/lib/33760bf79f097f449da5.png +0 -0
  22. package/lib/578d2b6ed32e7624164e.png +0 -0
  23. package/lib/5f62a5b2b7e99b9640c7.png +0 -0
  24. package/lib/6525766ecd288ec60129.png +0 -0
  25. package/lib/7800be6f6c4b5b0f4f20.png +0 -0
  26. package/lib/976473cf5fe24d657d4b.png +0 -0
  27. package/lib/ChatWithMe.d.ts +2 -1
  28. package/lib/ChatWithMe.d.ts.map +1 -1
  29. package/lib/ChatWithMe.js +3 -3
  30. package/lib/ProfileView.d.ts +1 -1
  31. package/lib/ProfileView.d.ts.map +1 -1
  32. package/lib/ProfileView.js +71 -131
  33. package/lib/ProfileViewModelPresenter.d.ts +23 -0
  34. package/lib/ProfileViewModelPresenter.d.ts.map +1 -0
  35. package/lib/ProfileViewModelPresenter.js +37 -0
  36. package/lib/QRCodeCard.d.ts +3 -1
  37. package/lib/QRCodeCard.d.ts.map +1 -1
  38. package/lib/QRCodeCard.js +86 -66
  39. package/lib/addMeToYourFriends.d.ts +3 -3
  40. package/lib/addMeToYourFriends.d.ts.map +1 -1
  41. package/lib/addMeToYourFriends.js +14 -30
  42. package/lib/bda84f59e7216675a208.png +0 -0
  43. package/lib/buttonsHelper.js +1 -1
  44. package/lib/cd68e8f3990ba8b2139e.png +0 -0
  45. package/lib/e7074a7e2cb69e51cfd3.png +0 -0
  46. package/lib/editProfilePane/EditCVCard.d.ts +1 -0
  47. package/lib/editProfilePane/EditCVCard.d.ts.map +1 -1
  48. package/lib/editProfilePane/EditCVCard.js +2 -1
  49. package/lib/editProfilePane/EditCommunitiesCard.d.ts +1 -1
  50. package/lib/editProfilePane/EditCommunitiesCard.d.ts.map +1 -1
  51. package/lib/editProfilePane/EditCommunitiesCard.js +2 -1
  52. package/lib/editProfilePane/EditContactsCard.d.ts +1 -0
  53. package/lib/editProfilePane/EditContactsCard.d.ts.map +1 -1
  54. package/lib/editProfilePane/EditContactsCard.js +2 -0
  55. package/lib/editProfilePane/EditFriendsCard.d.ts +1 -1
  56. package/lib/editProfilePane/EditFriendsCard.d.ts.map +1 -1
  57. package/lib/editProfilePane/EditFriendsCard.js +2 -1
  58. package/lib/editProfilePane/EditOtherPreferences.d.ts +1 -0
  59. package/lib/editProfilePane/EditOtherPreferences.d.ts.map +1 -1
  60. package/lib/editProfilePane/EditOtherPreferences.js +1 -0
  61. package/lib/editProfilePane/EditProfileView.d.ts +1 -1
  62. package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
  63. package/lib/editProfilePane/EditProfileView.js +1 -1
  64. package/lib/editProfilePane/EditSocialCard.d.ts +1 -0
  65. package/lib/editProfilePane/EditSocialCard.d.ts.map +1 -1
  66. package/lib/editProfilePane/EditSocialCard.js +2 -1
  67. package/lib/editProfilePane/editProfilePresenter.d.ts +1 -0
  68. package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
  69. package/lib/editProfilePane/editProfilePresenter.js +2 -0
  70. package/lib/f3772696fb7ee53c23d8.png +0 -0
  71. package/lib/icons-svg/contactIcons.d.ts +3 -0
  72. package/lib/icons-svg/contactIcons.d.ts.map +1 -0
  73. package/lib/icons-svg/contactIcons.js +32 -0
  74. package/lib/icons-svg/profileIcons.d.ts +22 -0
  75. package/lib/icons-svg/profileIcons.d.ts.map +1 -0
  76. package/lib/icons-svg/profileIcons.js +309 -0
  77. package/lib/index.d.ts +1 -3
  78. package/lib/index.d.ts.map +1 -1
  79. package/lib/index.js +42 -19
  80. package/lib/profile-pane.js +15629 -5670
  81. package/lib/profile-pane.js.map +1 -1
  82. package/lib/profile-pane.min.js +2171 -230
  83. package/lib/profile-pane.min.js.map +1 -1
  84. package/lib/rdfFormsHelper.d.ts +1 -0
  85. package/lib/rdfFormsHelper.d.ts.map +1 -1
  86. package/lib/rdfFormsHelper.js +2 -0
  87. package/lib/sections/bio/BioEditDialog.d.ts +6 -0
  88. package/lib/sections/bio/BioEditDialog.d.ts.map +1 -0
  89. package/lib/sections/bio/BioEditDialog.js +119 -0
  90. package/lib/sections/bio/BioSection.d.ts +7 -0
  91. package/lib/sections/bio/BioSection.d.ts.map +1 -0
  92. package/lib/sections/bio/BioSection.js +131 -0
  93. package/lib/sections/bio/mutations.d.ts +4 -0
  94. package/lib/sections/bio/mutations.d.ts.map +1 -0
  95. package/lib/sections/bio/mutations.js +43 -0
  96. package/lib/sections/bio/selectors.d.ts +4 -0
  97. package/lib/sections/bio/selectors.d.ts.map +1 -0
  98. package/lib/sections/bio/selectors.js +15 -0
  99. package/lib/sections/bio/types.d.ts +15 -0
  100. package/lib/sections/bio/types.d.ts.map +1 -0
  101. package/lib/sections/bio/types.js +5 -0
  102. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +7 -0
  103. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -0
  104. package/lib/sections/contactInfo/ContactInfoEditDialog.js +658 -0
  105. package/lib/sections/contactInfo/ContactInfoSection.d.ts +5 -0
  106. package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -0
  107. package/lib/sections/contactInfo/ContactInfoSection.js +229 -0
  108. package/lib/sections/contactInfo/mutations.d.ts +4 -0
  109. package/lib/sections/contactInfo/mutations.d.ts.map +1 -0
  110. package/lib/sections/contactInfo/mutations.js +150 -0
  111. package/lib/sections/contactInfo/selectors.d.ts +4 -0
  112. package/lib/sections/contactInfo/selectors.d.ts.map +1 -0
  113. package/lib/sections/contactInfo/selectors.js +104 -0
  114. package/lib/sections/contactInfo/types.d.ts +44 -0
  115. package/lib/sections/contactInfo/types.d.ts.map +1 -0
  116. package/lib/sections/contactInfo/types.js +5 -0
  117. package/lib/sections/education/EducationEditDialog.d.ts +7 -0
  118. package/lib/sections/education/EducationEditDialog.d.ts.map +1 -0
  119. package/lib/sections/education/EducationEditDialog.js +459 -0
  120. package/lib/sections/education/EducationSection.d.ts +7 -0
  121. package/lib/sections/education/EducationSection.d.ts.map +1 -0
  122. package/lib/sections/education/EducationSection.js +126 -0
  123. package/lib/sections/education/mutations.d.ts +4 -0
  124. package/lib/sections/education/mutations.d.ts.map +1 -0
  125. package/lib/sections/education/mutations.js +60 -0
  126. package/lib/sections/education/selectors.d.ts +4 -0
  127. package/lib/sections/education/selectors.d.ts.map +1 -0
  128. package/lib/sections/education/selectors.js +64 -0
  129. package/lib/sections/education/types.d.ts +20 -0
  130. package/lib/sections/education/types.d.ts.map +1 -0
  131. package/lib/sections/education/types.js +5 -0
  132. package/lib/sections/heading/HeadingEditDialog.d.ts +6 -0
  133. package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -0
  134. package/lib/sections/heading/HeadingEditDialog.js +742 -0
  135. package/lib/sections/heading/HeadingSection.d.ts +9 -0
  136. package/lib/sections/heading/HeadingSection.d.ts.map +1 -0
  137. package/lib/sections/heading/HeadingSection.js +97 -0
  138. package/lib/sections/heading/camera.d.ts +19 -0
  139. package/lib/sections/heading/camera.d.ts.map +1 -0
  140. package/lib/sections/heading/camera.js +199 -0
  141. package/lib/sections/heading/dateHelpers.d.ts +4 -0
  142. package/lib/sections/heading/dateHelpers.d.ts.map +1 -0
  143. package/lib/sections/heading/dateHelpers.js +48 -0
  144. package/lib/sections/heading/imageHelpers.d.ts +4 -0
  145. package/lib/sections/heading/imageHelpers.d.ts.map +1 -0
  146. package/lib/sections/heading/imageHelpers.js +81 -0
  147. package/lib/sections/heading/mutations.d.ts +4 -0
  148. package/lib/sections/heading/mutations.d.ts.map +1 -0
  149. package/lib/sections/heading/mutations.js +190 -0
  150. package/lib/sections/heading/selectors.d.ts +5 -0
  151. package/lib/sections/heading/selectors.d.ts.map +1 -0
  152. package/lib/sections/heading/selectors.js +157 -0
  153. package/lib/sections/heading/types.d.ts +36 -0
  154. package/lib/sections/heading/types.d.ts.map +1 -0
  155. package/lib/sections/heading/types.js +5 -0
  156. package/lib/sections/languages/LanguageEditDialog.d.ts +7 -0
  157. package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -0
  158. package/lib/sections/languages/LanguageEditDialog.js +457 -0
  159. package/lib/sections/languages/LanguageSection.d.ts +5 -0
  160. package/lib/sections/languages/LanguageSection.d.ts.map +1 -0
  161. package/lib/sections/languages/LanguageSection.js +137 -0
  162. package/lib/sections/languages/mutations.d.ts +6 -0
  163. package/lib/sections/languages/mutations.d.ts.map +1 -0
  164. package/lib/sections/languages/mutations.js +296 -0
  165. package/lib/sections/languages/selectors.d.ts +5 -0
  166. package/lib/sections/languages/selectors.d.ts.map +1 -0
  167. package/lib/sections/languages/selectors.js +146 -0
  168. package/lib/sections/languages/types.d.ts +15 -0
  169. package/lib/sections/languages/types.d.ts.map +1 -0
  170. package/lib/sections/languages/types.js +5 -0
  171. package/lib/sections/projects/ProjectEditDialog.d.ts +7 -0
  172. package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -0
  173. package/lib/sections/projects/ProjectEditDialog.js +182 -0
  174. package/lib/sections/projects/ProjectSection.d.ts +6 -0
  175. package/lib/sections/projects/ProjectSection.d.ts.map +1 -0
  176. package/lib/sections/projects/ProjectSection.js +220 -0
  177. package/lib/sections/projects/mutations.d.ts +4 -0
  178. package/lib/sections/projects/mutations.d.ts.map +1 -0
  179. package/lib/sections/projects/mutations.js +188 -0
  180. package/lib/sections/projects/selectors.d.ts +5 -0
  181. package/lib/sections/projects/selectors.d.ts.map +1 -0
  182. package/lib/sections/projects/selectors.js +163 -0
  183. package/lib/sections/projects/types.d.ts +28 -0
  184. package/lib/sections/projects/types.d.ts.map +1 -0
  185. package/lib/sections/projects/types.js +8 -0
  186. package/lib/sections/resume/ResumeEditDialog.d.ts +7 -0
  187. package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -0
  188. package/lib/sections/resume/ResumeEditDialog.js +629 -0
  189. package/lib/sections/resume/ResumeSection.d.ts +7 -0
  190. package/lib/sections/resume/ResumeSection.d.ts.map +1 -0
  191. package/lib/sections/resume/ResumeSection.js +160 -0
  192. package/lib/sections/resume/mutations.d.ts +6 -0
  193. package/lib/sections/resume/mutations.d.ts.map +1 -0
  194. package/lib/sections/resume/mutations.js +172 -0
  195. package/lib/sections/resume/selectors.d.ts +4 -0
  196. package/lib/sections/resume/selectors.d.ts.map +1 -0
  197. package/lib/sections/resume/selectors.js +142 -0
  198. package/lib/sections/resume/types.d.ts +33 -0
  199. package/lib/sections/resume/types.d.ts.map +1 -0
  200. package/lib/sections/resume/types.js +8 -0
  201. package/lib/sections/shared/collapsibleSection.d.ts +2 -0
  202. package/lib/sections/shared/collapsibleSection.d.ts.map +1 -0
  203. package/lib/sections/shared/collapsibleSection.js +24 -0
  204. package/lib/sections/shared/contactTypeUtils.d.ts +7 -0
  205. package/lib/sections/shared/contactTypeUtils.d.ts.map +1 -0
  206. package/lib/sections/shared/contactTypeUtils.js +48 -0
  207. package/lib/sections/shared/idNodeFactory.d.ts +3 -0
  208. package/lib/sections/shared/idNodeFactory.d.ts.map +1 -0
  209. package/lib/sections/shared/idNodeFactory.js +14 -0
  210. package/lib/sections/shared/phoneCountries.d.ts +20 -0
  211. package/lib/sections/shared/phoneCountries.d.ts.map +1 -0
  212. package/lib/sections/shared/phoneCountries.js +1080 -0
  213. package/lib/sections/shared/rdfList.d.ts +3 -0
  214. package/lib/sections/shared/rdfList.d.ts.map +1 -0
  215. package/lib/sections/shared/rdfList.js +34 -0
  216. package/lib/sections/shared/rdfMutationHelpers.d.ts +12 -0
  217. package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
  218. package/lib/sections/shared/rdfMutationHelpers.js +82 -0
  219. package/lib/sections/shared/rowState.d.ts +21 -0
  220. package/lib/sections/shared/rowState.d.ts.map +1 -0
  221. package/lib/sections/shared/rowState.js +52 -0
  222. package/lib/sections/shared/sanitizeUtils.d.ts +5 -0
  223. package/lib/sections/shared/sanitizeUtils.d.ts.map +1 -0
  224. package/lib/sections/shared/sanitizeUtils.js +22 -0
  225. package/lib/sections/shared/sectionCardHelpers.d.ts +11 -0
  226. package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -0
  227. package/lib/sections/shared/sectionCardHelpers.js +105 -0
  228. package/lib/sections/shared/types.d.ts +7 -0
  229. package/lib/sections/shared/types.d.ts.map +1 -0
  230. package/lib/sections/shared/types.js +5 -0
  231. package/lib/sections/skills/SkillsEditDialog.d.ts +7 -0
  232. package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -0
  233. package/lib/sections/skills/SkillsEditDialog.js +340 -0
  234. package/lib/sections/skills/SkillsSection.d.ts +5 -0
  235. package/lib/sections/skills/SkillsSection.d.ts.map +1 -0
  236. package/lib/sections/skills/SkillsSection.js +169 -0
  237. package/lib/sections/skills/mutations.d.ts +6 -0
  238. package/lib/sections/skills/mutations.d.ts.map +1 -0
  239. package/lib/sections/skills/mutations.js +110 -0
  240. package/lib/sections/skills/selectors.d.ts +6 -0
  241. package/lib/sections/skills/selectors.d.ts.map +1 -0
  242. package/lib/sections/skills/selectors.js +37 -0
  243. package/lib/sections/skills/types.d.ts +14 -0
  244. package/lib/sections/skills/types.d.ts.map +1 -0
  245. package/lib/sections/skills/types.js +5 -0
  246. package/lib/sections/social/SocialEditDialog.d.ts +7 -0
  247. package/lib/sections/social/SocialEditDialog.d.ts.map +1 -0
  248. package/lib/sections/social/SocialEditDialog.js +362 -0
  249. package/lib/sections/social/SocialSection.d.ts +8 -0
  250. package/lib/sections/social/SocialSection.d.ts.map +1 -0
  251. package/lib/sections/social/SocialSection.js +201 -0
  252. package/lib/sections/social/constants.d.ts +3 -0
  253. package/lib/sections/social/constants.d.ts.map +1 -0
  254. package/lib/sections/social/constants.js +16 -0
  255. package/lib/sections/social/helpers.d.ts +15 -0
  256. package/lib/sections/social/helpers.d.ts.map +1 -0
  257. package/lib/sections/social/helpers.js +316 -0
  258. package/lib/sections/social/mutations.d.ts +4 -0
  259. package/lib/sections/social/mutations.d.ts.map +1 -0
  260. package/lib/sections/social/mutations.js +298 -0
  261. package/lib/sections/social/selectors.d.ts +4 -0
  262. package/lib/sections/social/selectors.d.ts.map +1 -0
  263. package/lib/sections/social/selectors.js +43 -0
  264. package/lib/sections/social/types.d.ts +19 -0
  265. package/lib/sections/social/types.d.ts.map +1 -0
  266. package/lib/sections/social/types.js +5 -0
  267. package/lib/styles/BioSection.css +77 -0
  268. package/lib/styles/CVCard.css +107 -2
  269. package/lib/styles/ContactInfoEditDialog.css +153 -0
  270. package/lib/styles/EditDialogs.css +1028 -0
  271. package/lib/styles/EducationCard.css +103 -0
  272. package/lib/styles/HeadingSection.css +309 -0
  273. package/lib/styles/ProfileCard.css +10 -42
  274. package/lib/styles/ProfileView.css +53 -8
  275. package/lib/styles/ProjectsCard.css +206 -0
  276. package/lib/styles/QRCodeCard.css +29 -10
  277. package/lib/styles/SocialCard.css +41 -13
  278. package/lib/styles/dialog.css +209 -0
  279. package/lib/styles/utilities.css +638 -256
  280. package/lib/textUtils.d.ts +6 -0
  281. package/lib/textUtils.d.ts.map +1 -0
  282. package/lib/textUtils.js +44 -0
  283. package/lib/texts.d.ts +45 -4
  284. package/lib/texts.d.ts.map +1 -1
  285. package/lib/texts.js +46 -5
  286. package/lib/types.d.ts +2 -0
  287. package/lib/types.d.ts.map +1 -0
  288. package/lib/types.js +5 -0
  289. package/lib/ui/dialog.d.ts +29 -0
  290. package/lib/ui/dialog.d.ts.map +1 -0
  291. package/lib/ui/dialog.js +269 -0
  292. package/lib/ui/errors.d.ts +2 -0
  293. package/lib/ui/errors.d.ts.map +1 -0
  294. package/lib/ui/errors.js +10 -0
  295. package/package.json +8 -5
  296. package/lib/CVCard.d.ts +0 -4
  297. package/lib/CVCard.d.ts.map +0 -1
  298. package/lib/CVCard.js +0 -114
  299. package/lib/CVPresenter.d.ts +0 -25
  300. package/lib/CVPresenter.d.ts.map +0 -1
  301. package/lib/CVPresenter.js +0 -119
  302. package/lib/FriendList.d.ts +0 -6
  303. package/lib/FriendList.d.ts.map +0 -1
  304. package/lib/FriendList.js +0 -27
  305. package/lib/ProfileCard.d.ts +0 -6
  306. package/lib/ProfileCard.d.ts.map +0 -1
  307. package/lib/ProfileCard.js +0 -62
  308. package/lib/SocialCard.d.ts +0 -5
  309. package/lib/SocialCard.d.ts.map +0 -1
  310. package/lib/SocialCard.js +0 -51
  311. package/lib/SocialPresenter.d.ts +0 -11
  312. package/lib/SocialPresenter.d.ts.map +0 -1
  313. package/lib/SocialPresenter.js +0 -117
  314. package/lib/StuffCard.d.ts +0 -10
  315. package/lib/StuffCard.d.ts.map +0 -1
  316. package/lib/StuffCard.js +0 -52
  317. package/lib/StuffPresenter.d.ts +0 -14
  318. package/lib/StuffPresenter.d.ts.map +0 -1
  319. package/lib/StuffPresenter.js +0 -53
  320. package/lib/presenter.d.ts +0 -14
  321. package/lib/presenter.d.ts.map +0 -1
  322. package/lib/presenter.js +0 -68
  323. package/lib/styles/FriendList.css +0 -12
  324. package/lib/styles/StuffCard.css +0 -23
  325. package/lib/styles/editProfile.css +0 -62
  326. package/lib/styles/profileRDFFormsEnforced.css +0 -431
@@ -0,0 +1,6 @@
1
+ export declare function strToUpperCase(str: string): string;
2
+ export declare function toText(value: unknown): string;
3
+ export declare function toTypeLabel(value: unknown): string;
4
+ export declare function sanitizeTextValue(value: string): string;
5
+ export declare function hasNonEmptyText(value: string | undefined): boolean;
6
+ //# sourceMappingURL=textUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textUtils.d.ts","sourceRoot":"","sources":["../src/textUtils.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,UAUzC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ7C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQlD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAElE"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hasNonEmptyText = hasNonEmptyText;
7
+ exports.sanitizeTextValue = sanitizeTextValue;
8
+ exports.strToUpperCase = strToUpperCase;
9
+ exports.toText = toText;
10
+ exports.toTypeLabel = toTypeLabel;
11
+ function strToUpperCase(str) {
12
+ if (str.trim().length > 0) {
13
+ const strCase = str.split(' ');
14
+ for (let i = 0; i < strCase.length; i++) {
15
+ strCase[i] = strCase[i].charAt(0).toUpperCase() + strCase[i].substring(1);
16
+ }
17
+ return strCase.join(' ');
18
+ }
19
+ return '';
20
+ }
21
+ function toText(value) {
22
+ if (!value) return '';
23
+ if (typeof value === 'string') return value;
24
+ if (typeof value === 'object' && 'value' in value) {
25
+ const nested = value.value;
26
+ return typeof nested === 'string' ? nested : '';
27
+ }
28
+ return '';
29
+ }
30
+ function toTypeLabel(value) {
31
+ const raw = toText(value).trim();
32
+ if (!raw) return '';
33
+ const withoutAngles = raw.replace(/^<|>$/g, '');
34
+ const hashParts = withoutAngles.split('#');
35
+ const lastByHash = hashParts[hashParts.length - 1];
36
+ const slashParts = lastByHash.split('/');
37
+ return slashParts[slashParts.length - 1];
38
+ }
39
+ function sanitizeTextValue(value) {
40
+ return value.replace(/[\u0000-\u001F\u007F]/g, ' ').replace(/\s+/g, ' ').trim();
41
+ }
42
+ function hasNonEmptyText(value) {
43
+ return Boolean(value && value.trim() !== '');
44
+ }
package/lib/texts.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare const scanQrToConnectText = "Scan the QR code to connect with me";
1
+ export declare const scanQrToConnectText = "Link to Profile";
2
2
  export declare const userNotLoggedInErrorMessage = "Current user not found! Not logged in?";
3
3
  export declare const internalErrorMessage = "An internal error occured!";
4
4
  export declare const friendWasAddedSuccesMessage = "Friend was added!";
5
5
  export declare const friendExistsMessage = "Friend already exists";
6
6
  export declare const loadingMessage = "Loading...";
7
- export declare const addMeToYourFriendsButtonText = "Add me to your friends";
8
- export declare const logInAddMeToYourFriendsButtonText = "Login to add me to your friends";
7
+ export declare const addMeToYourFriendsButtonText = "Add as friend";
8
+ export declare const logInAddMeToYourFriendsButtonText = "Log in to add as friend";
9
9
  export declare const logInToChatWithMeButtonText = "Login to chat with me";
10
10
  export declare const friendExistsAlreadyButtonText = "Already part of friends";
11
11
  export declare const chatWithMeButtonText = "Chat with me";
@@ -13,7 +13,48 @@ export declare const yourContactInformationHeading = "Your profile";
13
13
  export declare const otherPreferencesHeadingText = "Other preferences";
14
14
  export declare const communitiesHeadingText = "Your communities";
15
15
  export declare const resumeHeadingText = "Resume";
16
- export declare const socialAccountsHeadingText = "Social accounts";
16
+ export declare const bioHeadingText = "Bio";
17
+ export declare const educationHeadingText = "Education";
18
+ export declare const skillsHeadingText = "Skills";
19
+ export declare const languagesHeadingText = "Languages";
20
+ export declare const projectsHeadingText = "Projects & Communities";
21
+ export declare const contactInfoHeadingText = "More Contacts";
22
+ export declare const contactInfoEmptyHeadingText = "Contact Info";
23
+ export declare const editSkillsDialogTitleText = "Edit Skills";
24
+ export declare const editLanguagesDialogTitleText = "Edit Languages";
25
+ export declare const editContactInfoDialogTitleText = "Edit More Contacts";
26
+ export declare const editResumeDialogTitleText = "Edit Resume";
27
+ export declare const editEducationDialogTitleText = "Edit Education";
28
+ export declare const editProjectsDialogTitleText = "Edit Projects & Communities";
29
+ export declare const editHeadingDialogTitleText = "Edit Heading";
30
+ export declare const editSocialDialogTitleText = "Edit Social Accounts";
31
+ export declare const editBioDialogTitleText = "Edit Bio";
32
+ export declare const dialogSubmitLabelText = "Save Changes";
33
+ export declare const dialogCancelLabelText = "Cancel";
34
+ export declare const pasteEntryButtonTitleText = "Paste";
35
+ export declare const deleteEntryButtonTitleText = "Delete entry";
36
+ export declare const ownerLoginRequiredDialogMessageText = "You need to log in as the profile owner to save contact updates.";
37
+ export declare const loginRequiredDialogTitleText = "Login Required";
38
+ export declare const saveFailedDialogTitleText = "Save Failed";
39
+ export declare const saveContactUpdatesFailedPrefixText = "Could not save contact updates.";
40
+ export declare const saveHeadingUpdatesFailedPrefixText = "Could not save heading updates.";
41
+ export declare const saveLanguageUpdatesFailedPrefixText = "Could not save language updates.";
42
+ export declare const saveResumeUpdatesFailedPrefixText = "Could not save resume updates.";
43
+ export declare const saveEducationUpdatesFailedPrefixText = "Could not save education updates.";
44
+ export declare const saveProjectsUpdatesFailedPrefixText = "Could not save projects updates.";
45
+ export declare const saveSocialUpdatesFailedPrefixText = "Could not save social accounts updates.";
46
+ export declare const saveBioUpdatesFailedPrefixText = "Could not save bio updates.";
47
+ export declare const mutationSaveContactInfoFailedPrefixText = "Failed to save contact info:";
48
+ export declare const mutationSaveLanguagesFailedPrefixText = "Failed to save languages:";
49
+ export declare const mutationSaveSkillsFailedPrefixText = "Failed to save skills:";
50
+ export declare const mutationSaveResumeFailedPrefixText = "Failed to save resume:";
51
+ export declare const mutationEducationFailedPrefixText = "Failed to save education:";
52
+ export declare const mutationBioFailedPrefixText = "Failed to save bio:";
53
+ export declare const resumeUpdateEntryNotFoundErrorMessageText = "Could not find existing resume entry for update. Please reload profile data and try again.";
54
+ export declare const bioUpdateEntryNotFoundErrorMessageText = "Could not find existing bio entry for update. Please reload profile data and try again.";
55
+ export declare const updaterUnsupportedStoreErrorMessageText = "Store does not support updates";
56
+ export declare const fallbackSaveUpdatesErrorMessageText = "Failed to save updates";
57
+ export declare const socialAccountsHeadingText = "Follow me on";
17
58
  export declare const sharedItemsHeadingText = "Shared items";
18
59
  export declare const friendsHeadingText = "Friends";
19
60
  export declare const contactHeadingText = "Contact";
@@ -1 +1 @@
1
- {"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,wCAAwC,CAAA;AAGxE,eAAO,MAAM,2BAA2B,2CAA2C,CAAA;AACnF,eAAO,MAAM,oBAAoB,+BAA+B,CAAA;AAChE,eAAO,MAAM,2BAA2B,sBAAsB,CAAA;AAG9D,eAAO,MAAM,mBAAmB,0BAA0B,CAAA;AAC1D,eAAO,MAAM,cAAc,eAAe,CAAA;AAG1C,eAAO,MAAM,4BAA4B,2BAA2B,CAAA;AACpE,eAAO,MAAM,iCAAiC,oCAAoC,CAAA;AAClF,eAAO,MAAM,2BAA2B,0BAA0B,CAAA;AAClE,eAAO,MAAM,6BAA6B,4BAA4B,CAAA;AACtE,eAAO,MAAM,oBAAoB,iBAAiB,CAAA;AAGlD,eAAO,MAAM,6BAA6B,iBAAiB,CAAA;AAC3D,eAAO,MAAM,2BAA2B,sBAAsB,CAAA;AAC9D,eAAO,MAAM,sBAAsB,qBAAqB,CAAA;AACxD,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,yBAAyB,oBAAoB,CAAA;AAC1D,eAAO,MAAM,sBAAsB,iBAAiB,CAAA;AACpD,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAC3C,eAAO,MAAM,kBAAkB,YAAY,CAAA"}
1
+ {"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,oBAAoB,CAAA;AAGpD,eAAO,MAAM,2BAA2B,2CAA2C,CAAA;AACnF,eAAO,MAAM,oBAAoB,+BAA+B,CAAA;AAChE,eAAO,MAAM,2BAA2B,sBAAsB,CAAA;AAG9D,eAAO,MAAM,mBAAmB,0BAA0B,CAAA;AAC1D,eAAO,MAAM,cAAc,eAAe,CAAA;AAG1C,eAAO,MAAM,4BAA4B,kBAAkB,CAAA;AAC3D,eAAO,MAAM,iCAAiC,4BAA4B,CAAA;AAC1E,eAAO,MAAM,2BAA2B,0BAA0B,CAAA;AAClE,eAAO,MAAM,6BAA6B,4BAA4B,CAAA;AACtE,eAAO,MAAM,oBAAoB,iBAAiB,CAAA;AAGlD,eAAO,MAAM,6BAA6B,iBAAiB,CAAA;AAC3D,eAAO,MAAM,2BAA2B,sBAAsB,CAAA;AAC9D,eAAO,MAAM,sBAAsB,qBAAqB,CAAA;AACxD,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,cAAc,QAAQ,CAAA;AACnC,eAAO,MAAM,oBAAoB,cAAc,CAAA;AAC/C,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,oBAAoB,cAAc,CAAA;AAC/C,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAC3D,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AACrD,eAAO,MAAM,2BAA2B,iBAAiB,CAAA;AACzD,eAAO,MAAM,yBAAyB,gBAAgB,CAAA;AACtD,eAAO,MAAM,4BAA4B,mBAAmB,CAAA;AAC5D,eAAO,MAAM,8BAA8B,uBAAuB,CAAA;AAClE,eAAO,MAAM,yBAAyB,gBAAgB,CAAA;AACtD,eAAO,MAAM,4BAA4B,mBAAmB,CAAA;AAC5D,eAAO,MAAM,2BAA2B,gCAAgC,CAAA;AACxE,eAAO,MAAM,0BAA0B,iBAAiB,CAAA;AACxD,eAAO,MAAM,yBAAyB,yBAAyB,CAAA;AAC/D,eAAO,MAAM,sBAAsB,aAAa,CAAA;AAChD,eAAO,MAAM,qBAAqB,iBAAiB,CAAA;AACnD,eAAO,MAAM,qBAAqB,WAAW,CAAA;AAC7C,eAAO,MAAM,yBAAyB,UAAU,CAAA;AAChD,eAAO,MAAM,0BAA0B,iBAAiB,CAAA;AACxD,eAAO,MAAM,mCAAmC,qEAAqE,CAAA;AACrH,eAAO,MAAM,4BAA4B,mBAAmB,CAAA;AAC5D,eAAO,MAAM,yBAAyB,gBAAgB,CAAA;AACtD,eAAO,MAAM,kCAAkC,oCAAoC,CAAA;AACnF,eAAO,MAAM,kCAAkC,oCAAoC,CAAA;AACnF,eAAO,MAAM,mCAAmC,qCAAqC,CAAA;AACrF,eAAO,MAAM,iCAAiC,mCAAmC,CAAA;AACjF,eAAO,MAAM,oCAAoC,sCAAsC,CAAA;AACvF,eAAO,MAAM,mCAAmC,qCAAqC,CAAA;AACrF,eAAO,MAAM,iCAAiC,4CAA4C,CAAA;AAC1F,eAAO,MAAM,8BAA8B,gCAAgC,CAAA;AAC3E,eAAO,MAAM,uCAAuC,iCAAiC,CAAA;AACrF,eAAO,MAAM,qCAAqC,8BAA8B,CAAA;AAChF,eAAO,MAAM,kCAAkC,2BAA2B,CAAA;AAC1E,eAAO,MAAM,kCAAkC,2BAA2B,CAAA;AAC1E,eAAO,MAAM,iCAAiC,8BAA8B,CAAA;AAC5E,eAAO,MAAM,2BAA2B,wBAAwB,CAAA;AAChE,eAAO,MAAM,yCAAyC,+FAA+F,CAAA;AACrJ,eAAO,MAAM,sCAAsC,4FAA4F,CAAA;AAC/I,eAAO,MAAM,uCAAuC,mCAAmC,CAAA;AACvF,eAAO,MAAM,mCAAmC,2BAA2B,CAAA;AAC3E,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AACvD,eAAO,MAAM,sBAAsB,iBAAiB,CAAA;AACpD,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAC3C,eAAO,MAAM,kBAAkB,YAAY,CAAA"}
package/lib/texts.js CHANGED
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.yourContactInformationHeading = exports.userNotLoggedInErrorMessage = exports.socialAccountsHeadingText = exports.sharedItemsHeadingText = exports.scanQrToConnectText = exports.resumeHeadingText = exports.otherPreferencesHeadingText = exports.logInToChatWithMeButtonText = exports.logInAddMeToYourFriendsButtonText = exports.loadingMessage = exports.internalErrorMessage = exports.friendsHeadingText = exports.friendWasAddedSuccesMessage = exports.friendExistsMessage = exports.friendExistsAlreadyButtonText = exports.contactHeadingText = exports.communitiesHeadingText = exports.chatWithMeButtonText = exports.addMeToYourFriendsButtonText = void 0;
6
+ exports.yourContactInformationHeading = exports.userNotLoggedInErrorMessage = exports.updaterUnsupportedStoreErrorMessageText = exports.socialAccountsHeadingText = exports.skillsHeadingText = exports.sharedItemsHeadingText = exports.scanQrToConnectText = exports.saveSocialUpdatesFailedPrefixText = exports.saveResumeUpdatesFailedPrefixText = exports.saveProjectsUpdatesFailedPrefixText = exports.saveLanguageUpdatesFailedPrefixText = exports.saveHeadingUpdatesFailedPrefixText = exports.saveFailedDialogTitleText = exports.saveEducationUpdatesFailedPrefixText = exports.saveContactUpdatesFailedPrefixText = exports.saveBioUpdatesFailedPrefixText = exports.resumeUpdateEntryNotFoundErrorMessageText = exports.resumeHeadingText = exports.projectsHeadingText = exports.pasteEntryButtonTitleText = exports.ownerLoginRequiredDialogMessageText = exports.otherPreferencesHeadingText = exports.mutationSaveSkillsFailedPrefixText = exports.mutationSaveResumeFailedPrefixText = exports.mutationSaveLanguagesFailedPrefixText = exports.mutationSaveContactInfoFailedPrefixText = exports.mutationEducationFailedPrefixText = exports.mutationBioFailedPrefixText = exports.loginRequiredDialogTitleText = exports.logInToChatWithMeButtonText = exports.logInAddMeToYourFriendsButtonText = exports.loadingMessage = exports.languagesHeadingText = exports.internalErrorMessage = exports.friendsHeadingText = exports.friendWasAddedSuccesMessage = exports.friendExistsMessage = exports.friendExistsAlreadyButtonText = exports.fallbackSaveUpdatesErrorMessageText = exports.educationHeadingText = exports.editSocialDialogTitleText = exports.editSkillsDialogTitleText = exports.editResumeDialogTitleText = exports.editProjectsDialogTitleText = exports.editLanguagesDialogTitleText = exports.editHeadingDialogTitleText = exports.editEducationDialogTitleText = exports.editContactInfoDialogTitleText = exports.editBioDialogTitleText = exports.dialogSubmitLabelText = exports.dialogCancelLabelText = exports.deleteEntryButtonTitleText = exports.contactInfoHeadingText = exports.contactInfoEmptyHeadingText = exports.contactHeadingText = exports.communitiesHeadingText = exports.chatWithMeButtonText = exports.bioUpdateEntryNotFoundErrorMessageText = exports.bioHeadingText = exports.addMeToYourFriendsButtonText = void 0;
7
7
  // QR CODE
8
- const scanQrToConnectText = exports.scanQrToConnectText = 'Scan the QR code to connect with me';
8
+ const scanQrToConnectText = exports.scanQrToConnectText = 'Link to Profile';
9
9
  //ERRORS & SUCCESS
10
10
  //Same 'not logged in' error message like on 'Chat with me' button
11
11
  const userNotLoggedInErrorMessage = exports.userNotLoggedInErrorMessage = 'Current user not found! Not logged in?';
@@ -17,8 +17,8 @@ const friendExistsMessage = exports.friendExistsMessage = 'Friend already exists
17
17
  const loadingMessage = exports.loadingMessage = 'Loading...';
18
18
 
19
19
  //BUTTONS
20
- const addMeToYourFriendsButtonText = exports.addMeToYourFriendsButtonText = 'Add me to your friends';
21
- const logInAddMeToYourFriendsButtonText = exports.logInAddMeToYourFriendsButtonText = 'Login to add me to your friends';
20
+ const addMeToYourFriendsButtonText = exports.addMeToYourFriendsButtonText = 'Add as friend';
21
+ const logInAddMeToYourFriendsButtonText = exports.logInAddMeToYourFriendsButtonText = 'Log in to add as friend';
22
22
  const logInToChatWithMeButtonText = exports.logInToChatWithMeButtonText = 'Login to chat with me';
23
23
  const friendExistsAlreadyButtonText = exports.friendExistsAlreadyButtonText = 'Already part of friends';
24
24
  const chatWithMeButtonText = exports.chatWithMeButtonText = 'Chat with me';
@@ -28,7 +28,48 @@ const yourContactInformationHeading = exports.yourContactInformationHeading = 'Y
28
28
  const otherPreferencesHeadingText = exports.otherPreferencesHeadingText = 'Other preferences';
29
29
  const communitiesHeadingText = exports.communitiesHeadingText = 'Your communities';
30
30
  const resumeHeadingText = exports.resumeHeadingText = 'Resume';
31
- const socialAccountsHeadingText = exports.socialAccountsHeadingText = 'Social accounts';
31
+ const bioHeadingText = exports.bioHeadingText = 'Bio';
32
+ const educationHeadingText = exports.educationHeadingText = 'Education';
33
+ const skillsHeadingText = exports.skillsHeadingText = 'Skills';
34
+ const languagesHeadingText = exports.languagesHeadingText = 'Languages';
35
+ const projectsHeadingText = exports.projectsHeadingText = 'Projects & Communities';
36
+ const contactInfoHeadingText = exports.contactInfoHeadingText = 'More Contacts';
37
+ const contactInfoEmptyHeadingText = exports.contactInfoEmptyHeadingText = 'Contact Info';
38
+ const editSkillsDialogTitleText = exports.editSkillsDialogTitleText = 'Edit Skills';
39
+ const editLanguagesDialogTitleText = exports.editLanguagesDialogTitleText = 'Edit Languages';
40
+ const editContactInfoDialogTitleText = exports.editContactInfoDialogTitleText = 'Edit More Contacts';
41
+ const editResumeDialogTitleText = exports.editResumeDialogTitleText = 'Edit Resume';
42
+ const editEducationDialogTitleText = exports.editEducationDialogTitleText = 'Edit Education';
43
+ const editProjectsDialogTitleText = exports.editProjectsDialogTitleText = 'Edit Projects & Communities';
44
+ const editHeadingDialogTitleText = exports.editHeadingDialogTitleText = 'Edit Heading';
45
+ const editSocialDialogTitleText = exports.editSocialDialogTitleText = 'Edit Social Accounts';
46
+ const editBioDialogTitleText = exports.editBioDialogTitleText = 'Edit Bio';
47
+ const dialogSubmitLabelText = exports.dialogSubmitLabelText = 'Save Changes';
48
+ const dialogCancelLabelText = exports.dialogCancelLabelText = 'Cancel';
49
+ const pasteEntryButtonTitleText = exports.pasteEntryButtonTitleText = 'Paste';
50
+ const deleteEntryButtonTitleText = exports.deleteEntryButtonTitleText = 'Delete entry';
51
+ const ownerLoginRequiredDialogMessageText = exports.ownerLoginRequiredDialogMessageText = 'You need to log in as the profile owner to save contact updates.';
52
+ const loginRequiredDialogTitleText = exports.loginRequiredDialogTitleText = 'Login Required';
53
+ const saveFailedDialogTitleText = exports.saveFailedDialogTitleText = 'Save Failed';
54
+ const saveContactUpdatesFailedPrefixText = exports.saveContactUpdatesFailedPrefixText = 'Could not save contact updates.';
55
+ const saveHeadingUpdatesFailedPrefixText = exports.saveHeadingUpdatesFailedPrefixText = 'Could not save heading updates.';
56
+ const saveLanguageUpdatesFailedPrefixText = exports.saveLanguageUpdatesFailedPrefixText = 'Could not save language updates.';
57
+ const saveResumeUpdatesFailedPrefixText = exports.saveResumeUpdatesFailedPrefixText = 'Could not save resume updates.';
58
+ const saveEducationUpdatesFailedPrefixText = exports.saveEducationUpdatesFailedPrefixText = 'Could not save education updates.';
59
+ const saveProjectsUpdatesFailedPrefixText = exports.saveProjectsUpdatesFailedPrefixText = 'Could not save projects updates.';
60
+ const saveSocialUpdatesFailedPrefixText = exports.saveSocialUpdatesFailedPrefixText = 'Could not save social accounts updates.';
61
+ const saveBioUpdatesFailedPrefixText = exports.saveBioUpdatesFailedPrefixText = 'Could not save bio updates.';
62
+ const mutationSaveContactInfoFailedPrefixText = exports.mutationSaveContactInfoFailedPrefixText = 'Failed to save contact info:';
63
+ const mutationSaveLanguagesFailedPrefixText = exports.mutationSaveLanguagesFailedPrefixText = 'Failed to save languages:';
64
+ const mutationSaveSkillsFailedPrefixText = exports.mutationSaveSkillsFailedPrefixText = 'Failed to save skills:';
65
+ const mutationSaveResumeFailedPrefixText = exports.mutationSaveResumeFailedPrefixText = 'Failed to save resume:';
66
+ const mutationEducationFailedPrefixText = exports.mutationEducationFailedPrefixText = 'Failed to save education:';
67
+ const mutationBioFailedPrefixText = exports.mutationBioFailedPrefixText = 'Failed to save bio:';
68
+ const resumeUpdateEntryNotFoundErrorMessageText = exports.resumeUpdateEntryNotFoundErrorMessageText = 'Could not find existing resume entry for update. Please reload profile data and try again.';
69
+ const bioUpdateEntryNotFoundErrorMessageText = exports.bioUpdateEntryNotFoundErrorMessageText = 'Could not find existing bio entry for update. Please reload profile data and try again.';
70
+ const updaterUnsupportedStoreErrorMessageText = exports.updaterUnsupportedStoreErrorMessageText = 'Store does not support updates';
71
+ const fallbackSaveUpdatesErrorMessageText = exports.fallbackSaveUpdatesErrorMessageText = 'Failed to save updates';
72
+ const socialAccountsHeadingText = exports.socialAccountsHeadingText = 'Follow me on';
32
73
  const sharedItemsHeadingText = exports.sharedItemsHeadingText = 'Shared items';
33
74
  const friendsHeadingText = exports.friendsHeadingText = 'Friends';
34
75
  const contactHeadingText = exports.contactHeadingText = 'Contact';
package/lib/types.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type ViewerMode = 'owner' | 'authenticated' | 'anonymous';
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,eAAe,GAAG,WAAW,CAAA"}
package/lib/types.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,29 @@
1
+ import '../styles/dialog.css';
2
+ type DialogButtonValue = boolean | 'save' | null;
3
+ type DialogHeaderAction = {
4
+ type: 'close';
5
+ } | {
6
+ type: 'none';
7
+ } | {
8
+ type: 'button';
9
+ label: string;
10
+ ariaLabel?: string;
11
+ className?: string;
12
+ onClick?: () => Promise<void> | void;
13
+ };
14
+ export declare function alertDialog(message: string, title: string, dom: Document): Promise<DialogButtonValue>;
15
+ type OpenInputDialogCustom = {
16
+ title: string;
17
+ dom: Document;
18
+ form: HTMLFormElement;
19
+ submitLabel?: string;
20
+ cancelLabel?: string;
21
+ headerAction?: DialogHeaderAction;
22
+ validate?: () => Promise<string | null> | string | null;
23
+ onSave?: () => Promise<void> | void;
24
+ formatSaveError?: (error: unknown) => string;
25
+ };
26
+ type InputDialogValues = Record<string, string>;
27
+ export declare function openInputDialog(options: OpenInputDialogCustom): Promise<InputDialogValues | null>;
28
+ export {};
29
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAS7B,KAAK,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAShD,KAAK,kBAAkB,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CACrC,CAAA;AAmOL,wBAAgB,WAAW,CAAE,OAAO,EAAE,MAAM,EAAE,KAAK,QAAgB,EAAE,GAAG,EAAE,QAAQ,8BAOjF;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;CAC7C,CAAA;AAED,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAK/C,wBAAgB,eAAe,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAgElG"}
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.alertDialog = alertDialog;
7
+ exports.openInputDialog = openInputDialog;
8
+ require("../styles/dialog.css");
9
+ var _litHtml = require("lit-html");
10
+ var _profileIcons = require("../icons-svg/profileIcons");
11
+ /* Copied from issue-pane, minor typescript adjustments */
12
+ /* Changed modal from div to dialog element */
13
+ let modalDialog = null;
14
+ let previousFocus = null;
15
+ function ensureModalDialog(dom) {
16
+ // if we previously created a dialog but it was removed from the document
17
+ // (tests clear body), rebuild it. Checking presence ensures our reference
18
+ // doesn't point at a detached element.
19
+ if (modalDialog && dom.body.contains(modalDialog)) return modalDialog;
20
+ modalDialog = null;
21
+ modalDialog = dom.createElement('dialog');
22
+ modalDialog.id = 'profile-modal';
23
+ modalDialog.setAttribute('aria-modal', 'true');
24
+ modalDialog.setAttribute('aria-labelledby', 'modal-title');
25
+ modalDialog.setAttribute('aria-describedby', 'modal-desc');
26
+ modalDialog.innerHTML = `
27
+ <div class="modal">
28
+ <div class="modal-header">
29
+ <h2 id="modal-title"></h2>
30
+ <div id="modal-header-action"></div>
31
+ </div>
32
+ <div id="modal-desc"></div>
33
+ <section id="modal-error" class="modal__error-section" aria-live="assertive" role="alert" hidden></section>
34
+ <div id="modal-buttons"></div>
35
+ </div>
36
+ `;
37
+ dom.body.appendChild(modalDialog);
38
+ return modalDialog;
39
+ }
40
+ function getDialogElements(dialog) {
41
+ return {
42
+ dialog,
43
+ title: dialog.querySelector('#modal-title'),
44
+ headerAction: dialog.querySelector('#modal-header-action'),
45
+ description: dialog.querySelector('#modal-desc'),
46
+ error: dialog.querySelector('#modal-error'),
47
+ buttons: dialog.querySelector('#modal-buttons')
48
+ };
49
+ }
50
+ function clearModalError(elements) {
51
+ elements.error.textContent = '';
52
+ elements.error.hidden = true;
53
+ }
54
+ function setModalError(elements, message) {
55
+ elements.error.textContent = message;
56
+ elements.error.hidden = false;
57
+ }
58
+ function openDialogElement(dialog) {
59
+ if (typeof dialog.showModal === 'function') {
60
+ try {
61
+ if (!dialog.open) dialog.showModal();
62
+ return;
63
+ } catch {
64
+ // Fall back for jsdom or partial dialog implementations.
65
+ }
66
+ }
67
+ dialog.setAttribute('open', '');
68
+ }
69
+ function closeDialogElement(dialog) {
70
+ if (typeof dialog.close === 'function' && dialog.open) {
71
+ dialog.close();
72
+ return;
73
+ }
74
+ dialog.removeAttribute('open');
75
+ }
76
+ function findInitialContentFocusTarget(container) {
77
+ const focusable = Array.from(container.querySelectorAll('input, select, textarea, [contenteditable="true"], [tabindex]:not([tabindex="-1"])'));
78
+ for (const el of focusable) {
79
+ const isDisabled = el.hasAttribute('disabled') || el.getAttribute('aria-disabled') === 'true';
80
+ const hiddenByAttr = el.hasAttribute('hidden') || el.getAttribute('aria-hidden') === 'true';
81
+ if (!isDisabled && !hiddenByAttr) return el;
82
+ }
83
+ return null;
84
+ }
85
+ function focusInitialDialogTarget(description, buttons) {
86
+ const initialInput = findInitialContentFocusTarget(description);
87
+ if (initialInput) {
88
+ initialInput.focus();
89
+ if (initialInput instanceof HTMLInputElement || initialInput instanceof HTMLTextAreaElement) {
90
+ initialInput.select();
91
+ }
92
+ return;
93
+ }
94
+ const firstButton = buttons.querySelector('button');
95
+ if (firstButton) firstButton.focus();
96
+ }
97
+ function collectFormValues(form) {
98
+ const data = new FormData(form);
99
+ const values = {};
100
+ data.forEach((value, key) => {
101
+ values[key] = String(value);
102
+ });
103
+ return values;
104
+ }
105
+ function openModal({
106
+ title,
107
+ message,
108
+ buttons,
109
+ headerAction,
110
+ dom
111
+ }) {
112
+ const dialog = ensureModalDialog(dom);
113
+ const elements = getDialogElements(dialog);
114
+ previousFocus = dom.activeElement;
115
+ openDialogElement(dialog);
116
+ elements.title.textContent = title || '';
117
+ elements.description.innerHTML = '';
118
+ if (typeof message === 'string') {
119
+ elements.description.textContent = message;
120
+ } else {
121
+ elements.description.appendChild(message);
122
+ }
123
+ elements.buttons.innerHTML = '';
124
+ clearModalError(elements);
125
+ return new Promise(resolve => {
126
+ const finish = value => {
127
+ closeModal(value);
128
+ resolve(value);
129
+ };
130
+ const requestCancel = () => {
131
+ const cancelBtn = dialog.querySelector('button[data-cancel]');
132
+ if (cancelBtn) {
133
+ cancelBtn.click();
134
+ return;
135
+ }
136
+ finish(false);
137
+ };
138
+ dialog.oncancel = event => {
139
+ event.preventDefault();
140
+ requestCancel();
141
+ };
142
+ elements.headerAction.innerHTML = '';
143
+ const resolvedHeaderAction = headerAction || {
144
+ type: 'close'
145
+ };
146
+ if (resolvedHeaderAction.type === 'close') {
147
+ const closeButton = dom.createElement('button');
148
+ closeButton.setAttribute('type', 'button');
149
+ closeButton.setAttribute('aria-label', 'Close dialog');
150
+ (0, _litHtml.render)(_profileIcons.closeIcon, closeButton);
151
+ closeButton.onclick = () => requestCancel();
152
+ elements.headerAction.appendChild(closeButton);
153
+ } else if (resolvedHeaderAction.type === 'button') {
154
+ const actionButton = dom.createElement('button');
155
+ actionButton.setAttribute('type', 'button');
156
+ actionButton.className = resolvedHeaderAction.className || 'modal__header-action-button profile__action-button profile-action-text flex-center';
157
+ actionButton.textContent = resolvedHeaderAction.label;
158
+ actionButton.setAttribute('aria-label', resolvedHeaderAction.ariaLabel || resolvedHeaderAction.label);
159
+ actionButton.onclick = async () => {
160
+ if (resolvedHeaderAction.onClick) {
161
+ await resolvedHeaderAction.onClick();
162
+ }
163
+ };
164
+ elements.headerAction.appendChild(actionButton);
165
+ }
166
+ buttons.forEach(btn => {
167
+ const b = dom.createElement('button');
168
+ b.setAttribute('type', 'button');
169
+ b.textContent = btn.label;
170
+ if (btn.primary) b.classList.add('btn-primary');
171
+ if (btn.cancel) {
172
+ b.classList.add('btn-light');
173
+ b.setAttribute('data-cancel', 'true');
174
+ }
175
+ b.addEventListener('click', async () => {
176
+ if (btn.beforeClose) {
177
+ const shouldClose = await btn.beforeClose();
178
+ if (!shouldClose) return;
179
+ }
180
+ finish(btn.value);
181
+ });
182
+ elements.buttons.appendChild(b);
183
+ });
184
+ focusInitialDialogTarget(elements.description, elements.buttons);
185
+ });
186
+ }
187
+ function closeModal(_result) {
188
+ if (modalDialog) {
189
+ closeDialogElement(modalDialog);
190
+ modalDialog.oncancel = null;
191
+ const headerActionButton = modalDialog.querySelector('#modal-header-action button');
192
+ if (headerActionButton) headerActionButton.onclick = null;
193
+ if (previousFocus && 'focus' in previousFocus) previousFocus.focus();
194
+ }
195
+ }
196
+ function alertDialog(message, title = 'Information', dom) {
197
+ return openModal({
198
+ title,
199
+ message,
200
+ buttons: [{
201
+ label: 'OK',
202
+ value: true,
203
+ primary: true
204
+ }],
205
+ dom
206
+ });
207
+ }
208
+ /* Function below generated by AI Model: GPT-5.3-Codex */
209
+ /* Prompt: write me a reusable function to open a dialog with a form and return the form values on submit.
210
+ The function should also support validation and display error messages in the dialog.
211
+ It should reuse the OpenModal function for consistency. Done in 2 passes */
212
+ function openInputDialog(options) {
213
+ const submitLabel = options.submitLabel || 'Save Changes';
214
+ const cancelLabel = options.cancelLabel || 'Cancel';
215
+ const dialog = ensureModalDialog(options.dom);
216
+ const elements = getDialogElements(dialog);
217
+ const submitProxy = options.dom.createElement('button');
218
+ submitProxy.type = 'submit';
219
+ submitProxy.hidden = true;
220
+ submitProxy.tabIndex = -1;
221
+ options.form.appendChild(submitProxy);
222
+ const handleSubmit = event => {
223
+ event.preventDefault();
224
+ const saveButton = dialog.querySelector('#modal-buttons .btn-primary');
225
+ saveButton?.click();
226
+ };
227
+ options.form.addEventListener('submit', handleSubmit);
228
+ return openModal({
229
+ title: options.title,
230
+ message: options.form,
231
+ headerAction: options.headerAction,
232
+ buttons: [{
233
+ label: cancelLabel,
234
+ value: null,
235
+ cancel: true
236
+ }, {
237
+ label: submitLabel,
238
+ value: 'save',
239
+ primary: true,
240
+ beforeClose: async () => {
241
+ clearModalError(elements);
242
+ if (options.validate) {
243
+ const validationMessage = await options.validate();
244
+ if (validationMessage) {
245
+ setModalError(elements, validationMessage);
246
+ return false;
247
+ }
248
+ }
249
+ if (!options.onSave) return true;
250
+ try {
251
+ await options.onSave();
252
+ return true;
253
+ } catch (error) {
254
+ const fallback = error instanceof Error ? error.message : String(error);
255
+ const message = options.formatSaveError ? options.formatSaveError(error) : fallback;
256
+ setModalError(elements, message);
257
+ return false;
258
+ }
259
+ }
260
+ }],
261
+ dom: options.dom
262
+ }).then(result => {
263
+ if (result !== 'save') return null;
264
+ return collectFormValues(options.form);
265
+ }).finally(() => {
266
+ options.form.removeEventListener('submit', handleSubmit);
267
+ submitProxy.remove();
268
+ });
269
+ }
@@ -0,0 +1,2 @@
1
+ export declare function complain(div: HTMLElement, d: Document, message: unknown): void;
2
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/ui/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAE,GAAG,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAE/E"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.complain = complain;
7
+ var _solidUi = require("solid-ui");
8
+ function complain(div, d, message) {
9
+ div.appendChild(_solidUi.widgets.errorMessageBlock(d, message, 'pink'));
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profile-pane",
3
- "version": "3.1.5",
3
+ "version": "3.2.1",
4
4
  "description": "A SolidOS compatible pane to display a personal profile page",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -13,6 +13,7 @@
13
13
  "types": "lib/index.d.ts",
14
14
  "files": [
15
15
  "/lib",
16
+ "/icons-png",
16
17
  "README.md",
17
18
  "LICENSE"
18
19
  ],
@@ -21,6 +22,8 @@
21
22
  "build": "npm run clean && npm run typecheck && npm run build-dist && npm run build-js",
22
23
  "build-js": "babel src --out-dir lib --extensions '.ts' && tsc --emitDeclarationOnly",
23
24
  "build-dist": "webpack --progress",
25
+ "watch-js": "babel src --out-dir lib --extensions '.ts' --watch",
26
+ "watch-dist": "webpack --watch",
24
27
  "lint": "eslint",
25
28
  "lint-fix": "eslint --fix",
26
29
  "test": "jest --no-coverage",
@@ -54,7 +57,7 @@
54
57
  "peerDependencies": {
55
58
  "rdflib": "^2.3.6",
56
59
  "solid-logic": "^4.0.6",
57
- "solid-ui": "^3.0.5"
60
+ "solid-ui": "^3.1.0"
58
61
  },
59
62
  "overrides": {
60
63
  "solid-ui": "$solid-ui"
@@ -74,7 +77,7 @@
74
77
  "babel-loader": "^10.0.0",
75
78
  "babel-plugin-inline-import": "^3.0.0",
76
79
  "chat-pane": "^3.0.3",
77
- "contacts-pane": "^3.1.0",
80
+ "contacts-pane": "^3.2.0",
78
81
  "copy-webpack-plugin": "^14.0.0",
79
82
  "css-loader": "^7.1.4",
80
83
  "eslint": "^9.39.2",
@@ -86,11 +89,11 @@
86
89
  "node-polyfill-webpack-plugin": "^4.1.0",
87
90
  "rdflib": "^2.3.6",
88
91
  "solid-logic": "^4.0.6",
89
- "solid-ui": "^3.0.6",
92
+ "solid-ui": "^3.1.0",
90
93
  "style-loader": "^4.0.0",
91
94
  "terser-webpack-plugin": "^5.3.16",
92
95
  "ts-loader": "^9.5.4",
93
- "typescript": "^5.9.3",
96
+ "typescript": "^6.0.3",
94
97
  "webpack": "^5.105.2",
95
98
  "webpack-cli": "^7.0.2",
96
99
  "webpack-dev-server": "^5.2.3"
package/lib/CVCard.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { CVPresentation } from './CVPresenter';
2
- import './styles/CVCard.css';
3
- export declare const CVCard: (cvData: CVPresentation) => import("lit-html").TemplateResult<1>;
4
- //# sourceMappingURL=CVCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CVCard.d.ts","sourceRoot":"","sources":["../src/CVCard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,qBAAqB,CAAA;AAE5B,eAAO,MAAM,MAAM,GACjB,QAAQ,cAAc,yCAkEvB,CAAA"}