profile-pane 3.2.1 → 3.2.2-test.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 (241) hide show
  1. package/README.md +50 -0
  2. package/lib/303.profile-pane.js +1362 -0
  3. package/lib/303.profile-pane.js.map +1 -0
  4. package/lib/303.profile-pane.min.js +2 -0
  5. package/lib/303.profile-pane.min.js.map +1 -0
  6. package/lib/ProfileView.css +1090 -0
  7. package/lib/ProfileView.d.ts +2 -1
  8. package/lib/ProfileView.d.ts.map +1 -1
  9. package/lib/ProfileView.js +64 -36
  10. package/lib/buttonsHelper.d.ts +1 -1
  11. package/lib/buttonsHelper.d.ts.map +1 -1
  12. package/lib/buttonsHelper.js +2 -1
  13. package/lib/editProfilePane/EditCVCard.js +1 -1
  14. package/lib/editProfilePane/EditCommunitiesCard.js +1 -1
  15. package/lib/editProfilePane/EditFriendsCard.js +1 -1
  16. package/lib/editProfilePane/EditProfileView.d.ts +1 -1
  17. package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
  18. package/lib/editProfilePane/EditProfileView.js +4 -5
  19. package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
  20. package/lib/editProfilePane/editProfilePresenter.js +5 -4
  21. package/lib/icons-svg/profileIcons.d.ts +1 -1
  22. package/lib/icons-svg/profileIcons.d.ts.map +1 -1
  23. package/lib/icons-svg/profileIcons.js +9 -17
  24. package/lib/index.d.ts +1 -8
  25. package/lib/index.d.ts.map +1 -1
  26. package/lib/index.js +74 -40
  27. package/lib/ontology/otherPreferencesForm.ttl +32 -0
  28. package/lib/ontology/resumeForm.ttl +349 -0
  29. package/lib/ontology/socialMedia.ttl +433 -0
  30. package/lib/profile-pane.js +32266 -13247
  31. package/lib/profile-pane.js.map +1 -1
  32. package/lib/profile-pane.min.js +2315 -935
  33. package/lib/profile-pane.min.js.map +1 -1
  34. package/lib/rdfFormsHelper.d.ts +13 -1
  35. package/lib/rdfFormsHelper.d.ts.map +1 -1
  36. package/lib/rdfFormsHelper.js +13 -1
  37. package/lib/sections/bio/BioEditDialog.d.ts.map +1 -1
  38. package/lib/sections/bio/BioEditDialog.js +7 -7
  39. package/lib/sections/bio/BioSection.css +300 -0
  40. package/lib/sections/bio/BioSection.d.ts +3 -2
  41. package/lib/sections/bio/BioSection.d.ts.map +1 -1
  42. package/lib/sections/bio/BioSection.js +26 -19
  43. package/lib/sections/bio/mutations.d.ts.map +1 -1
  44. package/lib/sections/bio/mutations.js +14 -3
  45. package/lib/sections/contactInfo/ContactInfoEditDialog.css +354 -0
  46. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +3 -1
  47. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -1
  48. package/lib/sections/contactInfo/ContactInfoEditDialog.js +183 -98
  49. package/lib/sections/contactInfo/ContactInfoSection.css +125 -0
  50. package/lib/sections/contactInfo/ContactInfoSection.d.ts +2 -0
  51. package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -1
  52. package/lib/sections/contactInfo/ContactInfoSection.js +64 -41
  53. package/lib/sections/contactInfo/mutations.d.ts.map +1 -1
  54. package/lib/sections/contactInfo/mutations.js +51 -16
  55. package/lib/sections/education/EducationEditDialog.d.ts +3 -1
  56. package/lib/sections/education/EducationEditDialog.d.ts.map +1 -1
  57. package/lib/sections/education/EducationEditDialog.js +170 -92
  58. package/lib/sections/education/EducationSection.css +133 -0
  59. package/lib/sections/education/EducationSection.d.ts +3 -2
  60. package/lib/sections/education/EducationSection.d.ts.map +1 -1
  61. package/lib/sections/education/EducationSection.js +32 -25
  62. package/lib/sections/education/mutations.d.ts.map +1 -1
  63. package/lib/sections/education/mutations.js +14 -3
  64. package/lib/sections/heading/HeadingEditDialog.d.ts +4 -1
  65. package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -1
  66. package/lib/sections/heading/HeadingEditDialog.js +287 -162
  67. package/lib/sections/heading/HeadingSection.css +862 -0
  68. package/lib/sections/heading/HeadingSection.d.ts +3 -2
  69. package/lib/sections/heading/HeadingSection.d.ts.map +1 -1
  70. package/lib/sections/heading/HeadingSection.js +63 -32
  71. package/lib/sections/heading/imageHelpers.d.ts +1 -0
  72. package/lib/sections/heading/imageHelpers.d.ts.map +1 -1
  73. package/lib/sections/heading/imageHelpers.js +40 -1
  74. package/lib/sections/heading/mutations.d.ts.map +1 -1
  75. package/lib/sections/heading/mutations.js +86 -23
  76. package/lib/sections/heading/selectors.d.ts.map +1 -1
  77. package/lib/sections/heading/selectors.js +14 -3
  78. package/lib/sections/heading/types.d.ts +1 -2
  79. package/lib/sections/heading/types.d.ts.map +1 -1
  80. package/lib/sections/languages/LanguageEditDialog.d.ts +3 -1
  81. package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -1
  82. package/lib/sections/languages/LanguageEditDialog.js +202 -119
  83. package/lib/sections/languages/LanguageSection.css +53 -0
  84. package/lib/sections/languages/LanguageSection.d.ts +2 -0
  85. package/lib/sections/languages/LanguageSection.d.ts.map +1 -1
  86. package/lib/sections/languages/LanguageSection.js +42 -31
  87. package/lib/sections/languages/mutations.d.ts.map +1 -1
  88. package/lib/sections/languages/mutations.js +60 -161
  89. package/lib/sections/languages/selectors.d.ts.map +1 -1
  90. package/lib/sections/languages/selectors.js +1 -2
  91. package/lib/sections/projects/ProjectEditDialog.d.ts +2 -1
  92. package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -1
  93. package/lib/sections/projects/ProjectEditDialog.js +13 -24
  94. package/lib/sections/projects/ProjectSection.css +368 -0
  95. package/lib/sections/projects/ProjectSection.d.ts +2 -1
  96. package/lib/sections/projects/ProjectSection.d.ts.map +1 -1
  97. package/lib/sections/projects/ProjectSection.js +116 -34
  98. package/lib/sections/projects/mutations.d.ts.map +1 -1
  99. package/lib/sections/projects/mutations.js +109 -132
  100. package/lib/sections/projects/selectors.d.ts.map +1 -1
  101. package/lib/sections/projects/selectors.js +4 -45
  102. package/lib/{QRCodeCard.d.ts → sections/qrcode/QRCodeCard.d.ts} +2 -1
  103. package/lib/sections/qrcode/QRCodeCard.d.ts.map +1 -0
  104. package/lib/{QRCodeCard.js → sections/qrcode/QRCodeCard.js} +59 -11
  105. package/lib/sections/qrcode/QRCodeSection.css +108 -0
  106. package/lib/sections/qrcode/QRCodeSection.d.ts +4 -0
  107. package/lib/sections/qrcode/QRCodeSection.d.ts.map +1 -0
  108. package/lib/sections/qrcode/QRCodeSection.js +17 -0
  109. package/lib/sections/resume/ResumeEditDialog.d.ts +10 -1
  110. package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -1
  111. package/lib/sections/resume/ResumeEditDialog.js +531 -149
  112. package/lib/sections/resume/ResumeSection.css +350 -0
  113. package/lib/sections/resume/ResumeSection.d.ts +3 -2
  114. package/lib/sections/resume/ResumeSection.d.ts.map +1 -1
  115. package/lib/sections/resume/ResumeSection.js +78 -49
  116. package/lib/sections/resume/mutations.d.ts.map +1 -1
  117. package/lib/sections/resume/mutations.js +17 -3
  118. package/lib/sections/resume/selectors.d.ts.map +1 -1
  119. package/lib/sections/resume/selectors.js +1 -0
  120. package/lib/sections/resume/types.d.ts +1 -0
  121. package/lib/sections/resume/types.d.ts.map +1 -1
  122. package/lib/sections/shared/collapsibleSection.d.ts.map +1 -1
  123. package/lib/sections/shared/collapsibleSection.js +1 -0
  124. package/lib/sections/shared/phoneCountries.d.ts +1 -1
  125. package/lib/sections/shared/phoneCountries.d.ts.map +1 -1
  126. package/lib/sections/shared/phoneCountries.js +2 -2
  127. package/lib/sections/shared/projectCommunityNodes.d.ts +6 -0
  128. package/lib/sections/shared/projectCommunityNodes.d.ts.map +1 -0
  129. package/lib/sections/shared/projectCommunityNodes.js +56 -0
  130. package/lib/sections/shared/rdfMutationHelpers.d.ts +35 -2
  131. package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -1
  132. package/lib/sections/shared/rdfMutationHelpers.js +290 -14
  133. package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -1
  134. package/lib/sections/shared/sectionCardHelpers.js +80 -11
  135. package/lib/sections/shared/types.d.ts +24 -0
  136. package/lib/sections/shared/types.d.ts.map +1 -1
  137. package/lib/sections/skills/SkillsEditDialog.d.ts +3 -1
  138. package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -1
  139. package/lib/sections/skills/SkillsEditDialog.js +136 -115
  140. package/lib/sections/skills/SkillsSection.css +173 -0
  141. package/lib/sections/skills/SkillsSection.d.ts +2 -0
  142. package/lib/sections/skills/SkillsSection.d.ts.map +1 -1
  143. package/lib/sections/skills/SkillsSection.js +107 -47
  144. package/lib/sections/skills/mutations.d.ts.map +1 -1
  145. package/lib/sections/skills/mutations.js +25 -21
  146. package/lib/sections/skills/selectors.d.ts.map +1 -1
  147. package/lib/sections/skills/selectors.js +5 -3
  148. package/lib/sections/social/SocialEditDialog.d.ts +3 -1
  149. package/lib/sections/social/SocialEditDialog.d.ts.map +1 -1
  150. package/lib/sections/social/SocialEditDialog.js +170 -62
  151. package/lib/sections/social/SocialSection.css +194 -0
  152. package/lib/sections/social/SocialSection.d.ts +4 -3
  153. package/lib/sections/social/SocialSection.d.ts.map +1 -1
  154. package/lib/sections/social/SocialSection.js +59 -43
  155. package/lib/sections/social/mutations.d.ts.map +1 -1
  156. package/lib/sections/social/mutations.js +23 -132
  157. package/lib/specialButtons/AddMeToYourFriends.css +54 -0
  158. package/lib/specialButtons/addContact/AddMeToYourContacts.css +1118 -0
  159. package/lib/specialButtons/addContact/ContactCreationDialog.d.ts +10 -0
  160. package/lib/specialButtons/addContact/ContactCreationDialog.d.ts.map +1 -0
  161. package/lib/specialButtons/addContact/ContactCreationDialog.js +1123 -0
  162. package/lib/specialButtons/addContact/addMeToYourContacts.d.ts +16 -0
  163. package/lib/specialButtons/addContact/addMeToYourContacts.d.ts.map +1 -0
  164. package/lib/specialButtons/addContact/addMeToYourContacts.js +136 -0
  165. package/lib/specialButtons/addContact/contactsErrors.d.ts +8 -0
  166. package/lib/specialButtons/addContact/contactsErrors.d.ts.map +1 -0
  167. package/lib/specialButtons/addContact/contactsErrors.js +106 -0
  168. package/lib/specialButtons/addContact/contactsTypes.d.ts +43 -0
  169. package/lib/specialButtons/addContact/contactsTypes.d.ts.map +1 -0
  170. package/lib/specialButtons/addContact/contactsTypes.js +5 -0
  171. package/lib/specialButtons/addContact/helpers.d.ts +7 -0
  172. package/lib/specialButtons/addContact/helpers.d.ts.map +1 -0
  173. package/lib/specialButtons/addContact/helpers.js +103 -0
  174. package/lib/specialButtons/addContact/mutations.d.ts +16 -0
  175. package/lib/specialButtons/addContact/mutations.d.ts.map +1 -0
  176. package/lib/specialButtons/addContact/mutations.js +300 -0
  177. package/lib/specialButtons/addContact/selectors.d.ts +10 -0
  178. package/lib/specialButtons/addContact/selectors.d.ts.map +1 -0
  179. package/lib/specialButtons/addContact/selectors.js +163 -0
  180. package/lib/{addMeToYourFriends.d.ts → specialButtons/addMeToYourFriends.d.ts} +6 -4
  181. package/lib/specialButtons/addMeToYourFriends.d.ts.map +1 -0
  182. package/lib/{addMeToYourFriends.js → specialButtons/addMeToYourFriends.js} +46 -11
  183. package/lib/styles/CollapsibleSection.css +519 -0
  184. package/lib/styles/EditDialogs.css +506 -686
  185. package/lib/styles/EditDialogs.responsive.css +989 -0
  186. package/lib/texts/buttonTexts.d.ts +9 -0
  187. package/lib/texts/buttonTexts.d.ts.map +1 -0
  188. package/lib/texts/buttonTexts.js +14 -0
  189. package/lib/texts/dialogTexts.d.ts +14 -0
  190. package/lib/texts/dialogTexts.d.ts.map +1 -0
  191. package/lib/texts/dialogTexts.js +19 -0
  192. package/lib/texts/messageTexts.d.ts +42 -0
  193. package/lib/texts/messageTexts.d.ts.map +1 -0
  194. package/lib/texts/messageTexts.js +47 -0
  195. package/lib/texts/profileTexts.d.ts +14 -0
  196. package/lib/texts/profileTexts.d.ts.map +1 -0
  197. package/lib/texts/profileTexts.js +19 -0
  198. package/lib/texts/qrCodeTexts.d.ts +2 -0
  199. package/lib/texts/qrCodeTexts.d.ts.map +1 -0
  200. package/lib/texts/qrCodeTexts.js +7 -0
  201. package/lib/texts.d.ts +5 -60
  202. package/lib/texts.d.ts.map +1 -1
  203. package/lib/texts.js +55 -70
  204. package/lib/ui/dialog.css +233 -0
  205. package/lib/ui/dialog.d.ts +15 -1
  206. package/lib/ui/dialog.d.ts.map +1 -1
  207. package/lib/ui/dialog.js +245 -45
  208. package/lib/ui/dialog.responsive.css +195 -0
  209. package/lib/ui/errors.d.ts.map +1 -1
  210. package/lib/ui/errors.js +2 -1
  211. package/lib/ui/spinner.d.ts +3 -0
  212. package/lib/ui/spinner.d.ts.map +1 -0
  213. package/lib/ui/spinner.js +13 -0
  214. package/lib/utils/debug.d.ts +5 -0
  215. package/lib/utils/debug.d.ts.map +1 -0
  216. package/lib/utils/debug.js +23 -0
  217. package/lib/utils/errorDisplay.d.ts +2 -0
  218. package/lib/utils/errorDisplay.d.ts.map +1 -0
  219. package/lib/utils/errorDisplay.js +19 -0
  220. package/package.json +32 -25
  221. package/lib/ChatWithMe.d.ts +0 -7
  222. package/lib/ChatWithMe.d.ts.map +0 -1
  223. package/lib/ChatWithMe.js +0 -90
  224. package/lib/QRCodeCard.d.ts.map +0 -1
  225. package/lib/addMeToYourFriends.d.ts.map +0 -1
  226. package/lib/sections/heading/camera.d.ts +0 -19
  227. package/lib/sections/heading/camera.d.ts.map +0 -1
  228. package/lib/sections/heading/camera.js +0 -199
  229. package/lib/styles/BioSection.css +0 -77
  230. package/lib/styles/CVCard.css +0 -142
  231. package/lib/styles/ChatWithMe.css +0 -6
  232. package/lib/styles/ContactInfoEditDialog.css +0 -153
  233. package/lib/styles/EducationCard.css +0 -103
  234. package/lib/styles/HeadingSection.css +0 -309
  235. package/lib/styles/ProfileCard.css +0 -66
  236. package/lib/styles/ProfileView.css +0 -65
  237. package/lib/styles/ProjectsCard.css +0 -206
  238. package/lib/styles/QRCodeCard.css +0 -43
  239. package/lib/styles/SocialCard.css +0 -89
  240. package/lib/styles/dialog.css +0 -209
  241. package/lib/styles/utilities.css +0 -740
@@ -5,10 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.renderContactInfoSection = renderContactInfoSection;
7
7
  var _litHtml = require("lit-html");
8
+ require("solid-ui/components/actions/button");
8
9
  var _ContactInfoEditDialog = require("./ContactInfoEditDialog");
9
10
  var _solidUi = require("solid-ui");
11
+ require("./ContactInfoSection.css");
10
12
  var _texts = require("../../texts");
11
13
  var _collapsibleSection = require("../shared/collapsibleSection");
14
+ var _phoneCountries = require("../shared/phoneCountries");
12
15
  var _contactTypeUtils = require("../shared/contactTypeUtils");
13
16
  var _profileIcons = require("../../icons-svg/profileIcons");
14
17
  var _contactIcons = require("../../icons-svg/contactIcons");
@@ -23,7 +26,14 @@ function toText(value) {
23
26
  }
24
27
  function normalizeContactValue(rawValue, kind) {
25
28
  if (!rawValue) return '';
26
- return kind === 'email' ? rawValue.replace(/^mailto:/i, '') : rawValue.replace(/^tel:/i, '');
29
+ if (kind === 'email') {
30
+ return rawValue.replace(/^mailto:/i, '');
31
+ }
32
+ const normalizedPhone = rawValue.replace(/^tel:/i, '');
33
+ const {
34
+ localNumber
35
+ } = (0, _phoneCountries.splitPhoneValue)(normalizedPhone);
36
+ return localNumber || normalizedPhone;
27
37
  }
28
38
  function resolveContactValue(store, point, kind) {
29
39
  if (!point) return '';
@@ -44,11 +54,11 @@ function renderPhone(phone, store) {
44
54
  if (!phone) return (0, _litHtml.html)``;
45
55
  const phoneValue = resolveContactValue(store, phone, 'phone');
46
56
  const phoneType = (0, _contactTypeUtils.normalizePhoneTypeForEdit)(phone.type);
47
- return (0, _litHtml.html)`<li class="contact-info__item flex gap-2xs" role="listitem">
48
- <div class="contact-info__icon-wrapper flex-center">
57
+ return (0, _litHtml.html)`<li class="contact-info__item" role="listitem">
58
+ <div class="contact-info__icon-wrapper">
49
59
  <span class="contact-info__icon" aria-hidden="true">${_contactIcons.phoneIcon}</span>
50
60
  </div>
51
- <div class="flex-column">
61
+ <div class="contact-info__item-body">
52
62
  <span class="contact-info__contact-point-value">${phoneValue}</span>
53
63
  ${phoneType ? (0, _litHtml.html)`<span class="contact-info__contact-point-type"> ${phoneType}</span>` : (0, _litHtml.html)``}
54
64
  </div>
@@ -62,11 +72,11 @@ function renderEmail(email, store) {
62
72
  if (!email) return (0, _litHtml.html)``;
63
73
  const emailValue = resolveContactValue(store, email, 'email');
64
74
  const emailType = (0, _contactTypeUtils.normalizeEmailTypeForEdit)(email.type);
65
- return (0, _litHtml.html)`<li class="contact-info__item flex gap-2xs" role="listitem">
66
- <div class="contact-info__icon-wrapper flex-center">
75
+ return (0, _litHtml.html)`<li class="contact-info__item" role="listitem">
76
+ <div class="contact-info__icon-wrapper">
67
77
  <span class="contact-info__icon" aria-hidden="true">${_contactIcons.emailIcon}</span>
68
78
  </div>
69
- <div class="flex-column">
79
+ <div class="contact-info__item-body">
70
80
  <span class="contact-info__contact-point-value">${emailValue}</span>
71
81
  ${emailType ? (0, _litHtml.html)`<span class="contact-info__contact-point-type">${emailType}</span>` : (0, _litHtml.html)``}
72
82
  </div>
@@ -86,8 +96,8 @@ function renderAddress(address) {
86
96
  const localityRegion = [locality, region].filter(Boolean).join(', ');
87
97
  const localityRegionPostal = [localityRegion, postalCode].filter(Boolean).join(' ');
88
98
  return (0, _litHtml.html)`
89
- <li class="contact-info__item flex gap-2xs" role="listitem">
90
- <div class="contact-info__icon-wrapper flex-center">
99
+ <li class="contact-info__item" role="listitem">
100
+ <div class="contact-info__icon-wrapper">
91
101
  <span class="contact-info__icon" aria-hidden="true">${_profileIcons.locationIcon}</span>
92
102
  </div>
93
103
  <span class="contact-info__address">
@@ -107,51 +117,60 @@ function renderContactInfoSectionDefault(store, subject, contactInfo, viewerMode
107
117
  return (0, _litHtml.html)`
108
118
  <section
109
119
  aria-labelledby="contact-details-heading"
110
- class="profile__section border-lighter profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
120
+ data-profile-section="contact-info"
121
+ class="profile__section profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
111
122
  role="region"
112
123
  tabindex="-1"
113
124
  data-expanded="false"
114
125
  >
115
126
  <header class="profile__section-header profile-section-collapsible__header">
116
- <h2 id="contact-details-heading" tabindex="-1">${_texts.contactInfoHeadingText}</h2>
117
- <div class="profile-section-collapsible__actions flex-column">
127
+ <h3 id="contact-details-heading" tabindex="-1">${_texts.contactInfoHeadingText}</h3>
128
+ <div class="profile-section-collapsible__actions">
118
129
  ${isOwner ? (0, _litHtml.html)`
119
- <button
120
- type="button"
121
- class="profile__action-button profile-action-text flex-center profile-section-collapsible__edit-button"
130
+ <solid-ui-button
131
+ type="button"
132
+ variant="secondary"
133
+ size="sm"
134
+ class="profile__action-button profile-action-text profile-section-collapsible__edit-button"
122
135
  aria-label="Edit contact information"
123
136
  @click=${event => {
124
137
  return (0, _ContactInfoEditDialog.createContactInfoEditDialog)(event, store, subject, contactInfo, viewerMode, onSaved);
125
- }}>
126
- <span class="profile-section-collapsible__edit-label">${_profileIcons.editIcon} Edit</span>
138
+ }}
139
+ >
140
+ <span class="profile-section-collapsible__edit-label profile__add-more-content">
141
+ <span class="profile__add-more-icon" aria-hidden="true">${_profileIcons.addIcon}</span>
142
+ <span>Add More</span>
143
+ </span>
127
144
  <span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
128
- </button>
145
+ </solid-ui-button>
129
146
  ` : (0, _litHtml.html)``}
130
- <button
147
+ <solid-ui-button
131
148
  type="button"
132
- class="inline-flex-row"
149
+ variant="icon"
150
+ size="sm"
151
+ class="profile-section-collapsible__toggle-button"
133
152
  aria-label="Toggle contact information section"
134
153
  aria-controls="contact-details-panel"
135
154
  aria-expanded="false"
136
155
  @click=${_collapsibleSection.toggleCollapsibleSection}
137
156
  >
138
- <span class="profile-section-collapsible__chevron" aria-hidden="true">⌄</span>
139
- </button>
157
+ <span slot="icon" class="profile-section-collapsible__chevron" aria-hidden="true">${_profileIcons.chevronDownIcon}</span>
158
+ </solid-ui-button>
140
159
  </div>
141
160
  </header>
142
- <div id="contact-details-panel" class="profile-section-collapsible__content" aria-hidden="true">
161
+ <div id="contact-details-panel" class="profile-section-collapsible__content">
143
162
  ${contactInfo.phones.length > 0 ? (0, _litHtml.html)`
144
- <ul class="contact-info__list flex-column" role="list" aria-label="Phone numbers">
163
+ <ul class="contact-info__list" role="list" aria-label="Phone numbers">
145
164
  ${renderPhones(contactInfo.phones, store)}
146
165
  </ul>
147
166
  ` : (0, _litHtml.html)``}
148
167
  ${contactInfo.emails.length > 0 ? (0, _litHtml.html)`
149
- <ul class="contact-info__list flex-column" role="list" aria-label="Email addresses">
168
+ <ul class="contact-info__list" role="list" aria-label="Email addresses">
150
169
  ${renderEmails(contactInfo.emails, store)}
151
170
  </ul>
152
171
  ` : (0, _litHtml.html)``}
153
172
  ${contactInfo.addresses.length > 0 ? (0, _litHtml.html)`
154
- <ul class="contact-info__list flex-column" role="list" aria-label="Postal addresses">
173
+ <ul class="contact-info__list" role="list" aria-label="Postal addresses">
155
174
  ${renderAddresses(contactInfo.addresses)}
156
175
  </ul>
157
176
  ` : (0, _litHtml.html)``}
@@ -162,9 +181,9 @@ function renderContactInfoSectionDefault(store, subject, contactInfo, viewerMode
162
181
  }
163
182
  function renderOwnerEmptyContactInfoContent(_store, _subject, _contactInfo, _viewerMode, _onSaved) {
164
183
  return (0, _litHtml.html)`
165
- <div class="profile__empty-state-content flex-column-center" role="group" aria-label="Empty contact information section">
184
+ <div class="profile__empty-state-content" role="group" aria-label="Empty contact information section">
166
185
  <div class="contact-info__empty-icon-wrapper">
167
- <span class="contact-info__empty-icon inline-flex-row">${_profileIcons.envelopeIcon}</span>
186
+ <span class="contact-info__empty-icon">${_profileIcons.envelopeIcon}</span>
168
187
  </div>
169
188
  <p class="profile__empty-state-message contact-info__empty-message">
170
189
  No additional contact info added yet.
@@ -177,38 +196,42 @@ function renderOwnerEmptyContactInfoSection(store, subject, contactInfo, viewerM
177
196
  <section
178
197
  aria-labelledby="contact-details-heading"
179
198
  data-profile-section="contact-info"
180
- class="profile__section--empty border-lighter rounded-md gap-lg profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
199
+ class="profile__section--empty profile__section--empty-sidebar profile-section-collapsible profile-section-collapsible--inline-mobile-actions"
181
200
  role="region"
182
201
  tabindex="-1"
183
202
  data-expanded="false"
184
203
  >
185
204
  <header class="profile__section-header profile-section-collapsible__header">
186
- <h2 id="contact-details-heading" tabindex="-1">${_texts.contactInfoEmptyHeadingText}</h2>
187
- <div class="profile-section-collapsible__actions flex-column">
188
- <button
205
+ <h3 id="contact-details-heading" tabindex="-1">${_texts.contactInfoEmptyHeadingText}</h3>
206
+ <div class="profile-section-collapsible__actions">
207
+ <solid-ui-button
189
208
  type="button"
190
- class="profile__action-button profile-action-text flex-center profile-section-collapsible__edit-button"
209
+ variant="secondary"
210
+ size="sm"
211
+ class="profile__action-button profile-action-text profile-section-collapsible__edit-button"
191
212
  aria-label="Add contact information"
192
213
  @click=${event => {
193
214
  return (0, _ContactInfoEditDialog.createContactInfoEditDialog)(event, store, subject, contactInfo, viewerMode, onSaved);
194
215
  }}
195
216
  >
196
- <span class="profile-section-collapsible__edit-label">${_profileIcons.addIcon} Add Contact</span>
197
- <span class="profile-section-collapsible__edit-icon profile-section-collapsible__edit-icon--add" aria-hidden="true">${_profileIcons.plusIcon}</span>
198
- </button>
199
- <button
217
+ <span class="profile-section-collapsible__edit-label">${_profileIcons.addIcon} Add More</span>
218
+ <span class="profile-section-collapsible__edit-icon" aria-hidden="true">${_profileIcons.editIcon}</span>
219
+ </solid-ui-button>
220
+ <solid-ui-button
200
221
  type="button"
201
- class="inline-flex-row"
222
+ variant="icon"
223
+ size="sm"
224
+ class="profile-section-collapsible__toggle-button"
202
225
  aria-label="Toggle contact information section"
203
226
  aria-controls="contact-details-panel"
204
227
  aria-expanded="false"
205
228
  @click=${_collapsibleSection.toggleCollapsibleSection}
206
229
  >
207
- <span class="profile-section-collapsible__chevron" aria-hidden="true">⌄</span>
208
- </button>
230
+ <span slot="icon" class="profile-section-collapsible__chevron" aria-hidden="true">${_profileIcons.chevronDownIcon}</span>
231
+ </solid-ui-button>
209
232
  </div>
210
233
  </header>
211
- <div id="contact-details-panel" class="profile-section-collapsible__content" aria-hidden="true">
234
+ <div id="contact-details-panel" class="profile-section-collapsible__content">
212
235
  ${renderOwnerEmptyContactInfoContent(store, subject, contactInfo, viewerMode, onSaved)}
213
236
  </div>
214
237
  </section>
@@ -1 +1 @@
1
- {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/contactInfo/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAiB,MAAM,QAAQ,CAAA;AAE5D,OAAO,EAAqB,mBAAmB,EAAmB,MAAM,SAAS,CAAA;AAqKjF,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,iBASxH"}
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/sections/contactInfo/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0B,MAAM,QAAQ,CAAA;AAErE,OAAO,EAAqB,mBAAmB,EAAmB,MAAM,SAAS,CAAA;AAiMjF,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,iBAWxH"}
@@ -9,6 +9,7 @@ var _solidUi = require("solid-ui");
9
9
  var _rdfMutationHelpers = require("../shared/rdfMutationHelpers");
10
10
  var _idNodeFactory = require("../shared/idNodeFactory");
11
11
  var _texts = require("../../texts");
12
+ var _debug = require("../../utils/debug");
12
13
  function buildPhoneStatements(subject, doc, node, phone) {
13
14
  const normalizedValue = phone.value.startsWith('tel:') ? phone.value : `tel:${phone.value}`;
14
15
  const valueNode = (0, _rdflib.sym)(normalizedValue);
@@ -30,14 +31,14 @@ function buildEmailStatements(subject, doc, node, email) {
30
31
  function buildAddressStatements(subject, doc, node, address) {
31
32
  const inserts = [(0, _rdflib.st)(subject, _solidUi.ns.vcard('hasAddress'), node, doc)];
32
33
  if (address.type) inserts.push((0, _rdflib.st)(node, _solidUi.ns.rdf('type'), _solidUi.ns.vcard(address.type), doc));
33
- if (address.streetAddress) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('street-address'), address.streetAddress, doc));
34
- if (address.locality) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('locality'), address.locality, doc));
35
- if (address.region) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('region'), address.region, doc));
36
- if (address.postalCode) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('postal-code'), address.postalCode, doc));
37
- if (address.countryName) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('country-name'), address.countryName, doc));
34
+ if (address.streetAddress) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('street-address'), (0, _rdflib.literal)(address.streetAddress), doc));
35
+ if (address.locality) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('locality'), (0, _rdflib.literal)(address.locality), doc));
36
+ if (address.region) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('region'), (0, _rdflib.literal)(address.region), doc));
37
+ if (address.postalCode) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('postal-code'), (0, _rdflib.literal)(address.postalCode), doc));
38
+ if (address.countryName) inserts.push((0, _rdflib.st)(node, _solidUi.ns.vcard('country-name'), (0, _rdflib.literal)(address.countryName), doc));
38
39
  return inserts;
39
40
  }
40
- async function mutatePhoneEntries(store, subject, phoneOps) {
41
+ async function mutatePhoneEntries(store, subject, phoneOps, documentTextCache) {
41
42
  const doc = subject.doc();
42
43
  const existingPhoneNodes = store.each(subject, _solidUi.ns.vcard('hasTelephone'), null, doc);
43
44
  const deletions = [];
@@ -72,9 +73,19 @@ async function mutatePhoneEntries(store, subject, phoneOps) {
72
73
  phoneOps.create.forEach(phone => {
73
74
  insertions.push(...buildPhoneStatements(subject, doc, (0, _idNodeFactory.createIdNode)(doc), phone));
74
75
  });
75
- await (0, _rdfMutationHelpers.applyUpdaterPatch)(store, deletions, insertions);
76
+ const shouldSerializeDocument = await (0, _rdfMutationHelpers.shouldForceDocumentPutForStatements)(store, doc, insertions, undefined, {
77
+ documentTextCache
78
+ });
79
+ await (0, _rdfMutationHelpers.runUpdateTransport)(store, doc, deletions, insertions, {
80
+ unsupportedMessage: _texts.updaterUnsupportedStoreErrorMessageText,
81
+ failureMessage: 'Failed to save contact info updates',
82
+ documentTextCache,
83
+ useDavFallback: false,
84
+ usePutFallback: shouldSerializeDocument,
85
+ forcePut: shouldSerializeDocument
86
+ });
76
87
  }
77
- async function mutateEmailEntries(store, subject, emailOps) {
88
+ async function mutateEmailEntries(store, subject, emailOps, documentTextCache) {
78
89
  const doc = subject.doc();
79
90
  const existingEmailNodes = store.each(subject, _solidUi.ns.vcard('hasEmail'), null, doc);
80
91
  const deletions = [];
@@ -104,9 +115,19 @@ async function mutateEmailEntries(store, subject, emailOps) {
104
115
  emailOps.create.forEach(email => {
105
116
  insertions.push(...buildEmailStatements(subject, doc, (0, _idNodeFactory.createIdNode)(doc), email));
106
117
  });
107
- await (0, _rdfMutationHelpers.applyUpdaterPatch)(store, deletions, insertions);
118
+ const shouldSerializeDocument = await (0, _rdfMutationHelpers.shouldForceDocumentPutForStatements)(store, doc, insertions, undefined, {
119
+ documentTextCache
120
+ });
121
+ await (0, _rdfMutationHelpers.runUpdateTransport)(store, doc, deletions, insertions, {
122
+ unsupportedMessage: _texts.updaterUnsupportedStoreErrorMessageText,
123
+ failureMessage: 'Failed to save contact info updates',
124
+ documentTextCache,
125
+ useDavFallback: false,
126
+ usePutFallback: shouldSerializeDocument,
127
+ forcePut: shouldSerializeDocument
128
+ });
108
129
  }
109
- async function mutateAddressEntries(store, subject, addressOps) {
130
+ async function mutateAddressEntries(store, subject, addressOps, documentTextCache) {
110
131
  const doc = subject.doc();
111
132
  const existingAddressNodes = store.each(subject, _solidUi.ns.vcard('hasAddress'), null, doc);
112
133
  const deletions = [];
@@ -136,15 +157,29 @@ async function mutateAddressEntries(store, subject, addressOps) {
136
157
  addressOps.create.forEach(address => {
137
158
  insertions.push(...buildAddressStatements(subject, doc, (0, _idNodeFactory.createIdNode)(doc), address));
138
159
  });
139
- await (0, _rdfMutationHelpers.applyUpdaterPatch)(store, deletions, insertions);
160
+ const shouldSerializeDocument = await (0, _rdfMutationHelpers.shouldForceDocumentPutForStatements)(store, doc, insertions, undefined, {
161
+ documentTextCache
162
+ });
163
+ await (0, _rdfMutationHelpers.runUpdateTransport)(store, doc, deletions, insertions, {
164
+ unsupportedMessage: _texts.updaterUnsupportedStoreErrorMessageText,
165
+ failureMessage: 'Failed to save contact info updates',
166
+ documentTextCache,
167
+ useDavFallback: false,
168
+ usePutFallback: shouldSerializeDocument,
169
+ forcePut: shouldSerializeDocument
170
+ });
140
171
  }
141
172
  async function processContactInfoMutations(store, subject, mutationPlan) {
142
173
  try {
143
- await mutatePhoneEntries(store, subject, mutationPlan.phoneOps);
144
- await mutateEmailEntries(store, subject, mutationPlan.emailOps);
145
- await mutateAddressEntries(store, subject, mutationPlan.addressOps);
174
+ const documentTextCache = new Map();
175
+ await mutatePhoneEntries(store, subject, mutationPlan.phoneOps, documentTextCache);
176
+ await mutateEmailEntries(store, subject, mutationPlan.emailOps, documentTextCache);
177
+ await mutateAddressEntries(store, subject, mutationPlan.addressOps, documentTextCache);
146
178
  } catch (error) {
147
- const message = error instanceof Error ? error.message : String(error);
148
- throw new Error(`${_texts.mutationSaveContactInfoFailedPrefixText} ${message}`);
179
+ const rootError = error instanceof Error ? error : new Error(String(error));
180
+ (0, _debug.error)(_texts.contactInfoMutationSaveFailedDebugText, rootError);
181
+ throw new Error(_texts.saveContactUpdatesFailedMessageText, {
182
+ cause: rootError
183
+ });
149
184
  }
150
185
  }
@@ -1,6 +1,8 @@
1
+ import 'solid-ui/components/actions/button';
2
+ import 'solid-ui/components/forms/select';
1
3
  import { EducationDetails } from './types';
2
4
  import '../../styles/EditDialogs.css';
3
- import '../../styles/ContactInfoEditDialog.css';
5
+ import '../contactInfo/ContactInfoEditDialog.css';
4
6
  import { LiveStore, NamedNode } from 'rdflib';
5
7
  import { ViewerMode } from '../../types';
6
8
  export declare function createEducationEditDialog(event: Event, store: LiveStore, subject: NamedNode, educationData: EducationDetails[], viewerMode: ViewerMode, onSaved?: () => Promise<void> | void): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"EducationEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/education/EducationEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,8BAA8B,CAAA;AACrC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA4bxC,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,gBAAgB,EAAE,EACjC,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAwDrC"}
1
+ {"version":3,"file":"EducationEditDialog.d.ts","sourceRoot":"","sources":["../../../src/sections/education/EducationEditDialog.ts"],"names":[],"mappings":"AAEA,OAAO,oCAAoC,CAAA;AAC3C,OAAO,kCAAkC,CAAA;AACzC,OAAO,EAAgB,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,8BAA8B,CAAA;AACrC,OAAO,0CAA0C,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAgiBxC,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,gBAAgB,EAAE,EACjC,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAqDrC"}