solid-panes 5.1.0-3 → 5.1.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 (174) hide show
  1. package/dist/RDFXMLPane.d.ts.map +1 -1
  2. package/dist/RDFXMLPane2.cjs.js +1 -1
  3. package/dist/RDFXMLPane2.cjs.js.map +1 -1
  4. package/dist/RDFXMLPane2.esm.js +3 -3
  5. package/dist/RDFXMLPane2.esm.js.map +1 -1
  6. package/dist/components/editor-card/EditorCard.cjs.js +2 -2
  7. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  8. package/dist/components/editor-card/EditorCard.d.ts +2 -0
  9. package/dist/components/editor-card/EditorCard.d.ts.map +1 -1
  10. package/dist/components/editor-card/EditorCard.esm.js +68 -43
  11. package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
  12. package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -1
  13. package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -1
  14. package/dist/components/header/Header.cjs.js.map +1 -1
  15. package/dist/components/header/Header.esm.js.map +1 -1
  16. package/dist/components/header/Header.styles.cjs.js.map +1 -1
  17. package/dist/components/header/Header.styles.esm.js.map +1 -1
  18. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  19. package/dist/components/navbar/Navbar.esm.js.map +1 -1
  20. package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
  21. package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
  22. package/dist/components/profile-heading/ProfileHeading.cjs.js +4 -4
  23. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
  24. package/dist/components/profile-heading/ProfileHeading.d.ts +4 -0
  25. package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -1
  26. package/dist/components/profile-heading/ProfileHeading.esm.js +123 -107
  27. package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -1
  28. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -1
  29. package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -1
  30. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +19 -19
  31. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -1
  32. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +86 -86
  33. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -1
  34. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -1
  35. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -1
  36. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -1
  37. package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -1
  38. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +1 -1
  39. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -1
  40. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +61 -61
  41. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -1
  42. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -1
  43. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -1
  44. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -1
  45. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -1
  46. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -1
  47. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -1
  48. package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -1
  49. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -1
  50. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -1
  51. package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -1
  52. package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -1
  53. package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -1
  54. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -1
  55. package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -1
  56. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -1
  57. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +1 -1
  58. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
  59. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +1 -1
  60. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
  61. package/dist/components/profile-heading/friendActions.cjs.js +1 -1
  62. package/dist/components/profile-heading/friendActions.cjs.js.map +1 -1
  63. package/dist/components/profile-heading/friendActions.esm.js +5 -5
  64. package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -1
  65. package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js +33 -0
  66. package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js.map +1 -0
  67. package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts +16 -0
  68. package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts.map +1 -0
  69. package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js +309 -0
  70. package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js.map +1 -0
  71. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js +2 -0
  72. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js.map +1 -0
  73. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js +6 -0
  74. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js.map +1 -0
  75. package/dist/dataContentPane.d.ts.map +1 -1
  76. package/dist/dataContentPane2.cjs.js +1 -1
  77. package/dist/dataContentPane2.cjs.js.map +1 -1
  78. package/dist/dataContentPane2.esm.js +90 -78
  79. package/dist/dataContentPane2.esm.js.map +1 -1
  80. package/dist/humanReadablePane.d.ts +1 -0
  81. package/dist/humanReadablePane.d.ts.map +1 -1
  82. package/dist/humanReadablePane2.cjs.js +147 -15
  83. package/dist/humanReadablePane2.cjs.js.map +1 -1
  84. package/dist/humanReadablePane2.esm.js +281 -114
  85. package/dist/humanReadablePane2.esm.js.map +1 -1
  86. package/dist/imagePane.d.ts.map +1 -1
  87. package/dist/imagePane2.cjs.js +1 -1
  88. package/dist/imagePane2.cjs.js.map +1 -1
  89. package/dist/imagePane2.esm.js +9 -7
  90. package/dist/imagePane2.esm.js.map +1 -1
  91. package/dist/index.cjs.js +1 -1
  92. package/dist/index.cjs.js.map +1 -1
  93. package/dist/index.esm.js +3 -3
  94. package/dist/internal/internalPane.d.ts.map +1 -1
  95. package/dist/internal/internalPane2.cjs.js +1 -1
  96. package/dist/internal/internalPane2.cjs.js.map +1 -1
  97. package/dist/internal/internalPane2.esm.js +55 -60
  98. package/dist/internal/internalPane2.esm.js.map +1 -1
  99. package/dist/mainPage/header.cjs.js +1 -1
  100. package/dist/mainPage/header.esm.js +2 -2
  101. package/dist/mainPage/index.cjs.js +1 -1
  102. package/dist/mainPage/index.cjs.js.map +1 -1
  103. package/dist/mainPage/index.d.ts.map +1 -1
  104. package/dist/mainPage/index.esm.js +35 -26
  105. package/dist/mainPage/index.esm.js.map +1 -1
  106. package/dist/mainPage/navbar.cjs.js +1 -1
  107. package/dist/mainPage/navbar.cjs.js.map +1 -1
  108. package/dist/mainPage/navbar.esm.js +15 -15
  109. package/dist/mainPage/navigation.cjs.js +1 -1
  110. package/dist/mainPage/navigation.cjs.js.map +1 -1
  111. package/dist/mainPage/navigation.esm.js +4 -4
  112. package/dist/mainPage/profileHeading.d.ts.map +1 -1
  113. package/dist/mainPage/profileHeading2.cjs.js +1 -1
  114. package/dist/mainPage/profileHeading2.cjs.js.map +1 -1
  115. package/dist/mainPage/profileHeading2.esm.js +14 -14
  116. package/dist/mainPage/profileHeading2.esm.js.map +1 -1
  117. package/dist/n3Pane.d.ts.map +1 -1
  118. package/dist/n3Pane2.cjs.js +1 -1
  119. package/dist/n3Pane2.cjs.js.map +1 -1
  120. package/dist/n3Pane2.esm.js +1 -1
  121. package/dist/n3Pane2.esm.js.map +1 -1
  122. package/dist/navigation/browserEvents.cjs.js +1 -1
  123. package/dist/navigation/browserEvents.cjs.js.map +1 -1
  124. package/dist/navigation/browserEvents.d.ts.map +1 -1
  125. package/dist/navigation/browserEvents.esm.js +17 -17
  126. package/dist/navigation/browserEvents.esm.js.map +1 -1
  127. package/dist/navigation/chrome.cjs.js +1 -1
  128. package/dist/navigation/chrome.cjs.js.map +1 -1
  129. package/dist/navigation/chrome.d.ts +2 -2
  130. package/dist/navigation/chrome.d.ts.map +1 -1
  131. package/dist/navigation/chrome.esm.js +2 -2
  132. package/dist/navigation/chrome.esm.js.map +1 -1
  133. package/dist/navigation/controller.cjs.js +1 -1
  134. package/dist/navigation/controller.cjs.js.map +1 -1
  135. package/dist/navigation/controller.esm.js +37 -37
  136. package/dist/navigation/podContext.cjs.js +1 -1
  137. package/dist/navigation/podContext.cjs.js.map +1 -1
  138. package/dist/navigation/podContext.esm.js +5 -5
  139. package/dist/navigation/state.cjs.js +1 -1
  140. package/dist/navigation/state.cjs.js.map +1 -1
  141. package/dist/navigation/state.d.ts +4 -0
  142. package/dist/navigation/state.d.ts.map +1 -1
  143. package/dist/navigation/state.esm.js +18 -5
  144. package/dist/navigation/state.esm.js.map +1 -1
  145. package/dist/outline/fileExplorerHelpers.cjs.js +1 -1
  146. package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -1
  147. package/dist/outline/fileExplorerHelpers.d.ts +2 -5
  148. package/dist/outline/fileExplorerHelpers.d.ts.map +1 -1
  149. package/dist/outline/fileExplorerHelpers.esm.js +11 -13
  150. package/dist/outline/fileExplorerHelpers.esm.js.map +1 -1
  151. package/dist/outline/manager2.cjs.js +1 -1
  152. package/dist/outline/manager2.cjs.js.map +1 -1
  153. package/dist/outline/manager2.esm.js +355 -327
  154. package/dist/outline/manager2.esm.js.map +1 -1
  155. package/dist/registerPanes.cjs.js +1 -1
  156. package/dist/registerPanes.cjs.js.map +1 -1
  157. package/dist/registerPanes.esm.js +1 -1
  158. package/dist/registerPanes.esm.js.map +1 -1
  159. package/dist/slideshow/slideshowPane.cjs.js +1 -1
  160. package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
  161. package/dist/slideshow/slideshowPane.esm.js +30 -30
  162. package/dist/slideshow/slideshowPane.esm.js.map +1 -1
  163. package/dist/social/socialPane2.cjs.js +1 -1
  164. package/dist/social/socialPane2.esm.js +1 -1
  165. package/dist/social/socialSections.cjs.js +1 -1
  166. package/dist/social/socialSections.esm.js +1 -1
  167. package/dist/utils/paneUtils.cjs.js +1 -1
  168. package/dist/utils/paneUtils.cjs.js.map +1 -1
  169. package/dist/utils/paneUtils.esm.js +15 -15
  170. package/dist/versionInfo.cjs.js +1 -1
  171. package/dist/versionInfo.cjs.js.map +1 -1
  172. package/dist/versionInfo.esm.js +9 -9
  173. package/dist/versionInfo.esm.js.map +1 -1
  174. package/package.json +11 -12
@@ -1,4 +1,4 @@
1
- const e=require("./editor/utils/errorDisplay.cjs.js");require("../../_virtual/~icons/lucide/circle-user-round.cjs.js");const t=require("./editor/sections/heading/HeadingEditDialog.cjs.js"),n=require("./friendActions.cjs.js");require("../../_virtual/~icons/lucide/cake.cjs.js"),require("../../_virtual/~icons/lucide/mail.cjs.js"),require("../../_virtual/~icons/lucide/map-pin.cjs.js"),require("../../_virtual/~icons/lucide/pencil.cjs.js"),require("../../_virtual/~icons/lucide/phone.cjs.js"),require("../../_virtual/~icons/lucide/user-round-plus.cjs.js");const r=require("./ProfileHeading.styles.cjs.js");let i=require("solid-ui"),a=require("solid-logic");require("solid-ui/components/button");let o=require("lit"),s=require("lit/decorators.js");var c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R;function z(e,t,n){B(e,t),t.set(e,n)}function B(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function V(e,t,n){return e.set(U(e,t),n),n}function H(e,t){return e.get(U(e,t))}function U(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function W(e,t,n){return(t=K(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:J(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||J(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return Y(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:K(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function K(e){var t=q(e,`string`);return typeof t==`symbol`?t:t+``}function q(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function J(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function Y(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function X(e){return e}b=[(0,i.customElement)(`solid-panes-profile-heading`)];var Z;new(L=(u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,R=(x=(0,s.property)({attribute:!1}),C=(0,s.property)({attribute:!1}),T=(0,s.property)({attribute:!1}),D=(0,s.property)({type:Boolean,reflect:!0}),k=(0,s.state)(),j=(0,s.state)(),N=(0,s.state)(),F=(0,s.state)(),`profileData`),l=class extends i.WebComponent{constructor(...e){super(...e),z(this,u,(v(this),S(this,void 0))),z(this,d,w(this,void 0)),z(this,f,E(this,void 0)),z(this,p,O(this,!1)),z(this,m,A(this,void 0)),z(this,h,M(this,`loading`)),z(this,g,P(this,``)),z(this,_,I(this,!1)),W(this,`friendRequest`,0),W(this,`friendRequestInterrupted`,!1),W(this,`friendMessageTimer`,void 0),W(this,`handleAddFriend`,async e=>{if(e.preventDefault(),this.friendState!==`available`&&this.friendState!==`error`)return;let t=this.friendSubject;if(!t)return;let r=this.friendRequest;this.friendState=`saving`,this.clearFriendMessage();try{let e=a.authn.currentUser();if(!e)throw Error(n.friendTexts.loginRequired);if(await n.addFriend(e,t),r!==this.friendRequest||this.friendSubject!==t)return;this.friendState=`exists`,await this.showFriendMessage(n.friendTexts.success,!1)}catch(e){if(r!==this.friendRequest||this.friendSubject!==t)return;this.friendState=`error`,await this.showFriendMessage(e,!0)}}),W(this,`handleEdit`,e=>{let n=this.editContext;n&&t.createHeadingEditDialog(e,a.store,n.subject,n.profileData,n.viewerMode,async()=>{this.dispatchEvent(new CustomEvent(`profile-heading-saved`,{bubbles:!0,composed:!0,detail:{subjectUri:n.subject.value}})),await n.onSaved()}).catch(e=>{console.error(`Failed to edit profile heading.`,e)})}),W(this,`handleImageError`,e=>{this.failedImageSrc=e.currentTarget.getAttribute(`src`)??void 0})}get[R](){return H(u,this)}set profileData(e){V(u,this,e)}get editContext(){return H(d,this)}set editContext(e){V(d,this,e)}get friendSubject(){return H(f,this)}set friendSubject(e){V(f,this,e)}get compact(){return H(p,this)}set compact(e){V(p,this,e)}get failedImageSrc(){return H(m,this)}set failedImageSrc(e){V(m,this,e)}get friendState(){return H(h,this)}set friendState(e){V(h,this,e)}get friendMessage(){return H(g,this)}set friendMessage(e){V(g,this,e)}get friendError(){return H(_,this)}set friendError(e){V(_,this,e)}connectedCallback(){super.connectedCallback(),this.friendRequestInterrupted&&(this.friendRequestInterrupted=!1,this.startFriendCheck())}disconnectedCallback(){super.disconnectedCallback(),this.friendRequest++,(this.friendState===`loading`||this.friendState===`saving`)&&(this.friendRequestInterrupted=!0),this.clearFriendMessage()}clearFriendMessage(){clearTimeout(this.friendMessageTimer),this.friendMessageTimer=void 0,this.friendMessage=``}willUpdate(e){super.willUpdate(e),e.has(`profileData`)&&e.get(`profileData`)?.imageSrc!==this.profileData?.imageSrc&&(this.failedImageSrc=void 0),e.has(`friendSubject`)&&(this.friendRequestInterrupted=!1,this.startFriendCheck())}startFriendCheck(){let e=++this.friendRequest;this.friendState=`loading`,this.clearFriendMessage(),this.friendError=!1;let t=this.friendSubject,r=a.authn.currentUser();t&&r&&!r.sameTerm(t)&&n.checkFriend(r,t).then(n=>{e===this.friendRequest&&this.friendSubject===t&&(this.friendState=n?`exists`:`available`)}).catch(n=>{e===this.friendRequest&&this.friendSubject===t&&(this.friendState=`error`,this.showFriendMessage(n,!0))})}async showFriendMessage(t,n){this.clearFriendMessage(),this.friendMessage=e.formatDisplayError(t),this.friendError=n,this.friendMessageTimer=setTimeout(()=>{this.clearFriendMessage()},1e4),await this.updateComplete,this.shadowRoot?.querySelector(`.friend-message`)?.focus()}render(){let e=this.profileData;if(!e)return o.html``;let t=Q(e.primaryPhone?.valueNode).replace(/^tel:/i,``),r=Q(e.primaryEmail?.valueNode).replace(/^mailto:/i,``),i=$(e.dateOfBirth),s=!!(e.imageSrc&&this.failedImageSrc!==e.imageSrc),c=a.authn.currentUser(),l=!!(this.friendSubject&&c&&!c.sameTerm(this.friendSubject));return o.html`
1
+ const e=require("./editor/sections/heading/HeadingEditDialog.cjs.js"),t=require("./friendActions.cjs.js"),n=require("./editor/utils/errorDisplay.cjs.js");require("../../_virtual/~icons/lucide/cake.cjs.js"),require("../../_virtual/~icons/lucide/circle-user-round.cjs.js"),require("../../_virtual/~icons/lucide/mail.cjs.js"),require("../../_virtual/~icons/lucide/map-pin.cjs.js"),require("../../_virtual/~icons/lucide/pencil.cjs.js"),require("../../_virtual/~icons/lucide/phone.cjs.js"),require("../../_virtual/~icons/lucide/user-round-plus.cjs.js");const r=require("./ProfileHeading.styles.cjs.js");let i=require("solid-ui"),a=require("solid-logic");require("solid-ui/components/button");let o=require("lit"),s=require("lit/decorators.js");var c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V;function H(e,t,n){U(e,t),t.set(e,n)}function U(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function W(e,t,n){return e.set(K(e,t),n),n}function G(e,t){return e.get(K(e,t))}function K(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function q(e,t,n){return(t=Y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:Z(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||Z(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return ee(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:Y(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function Y(e){var t=X(e,`string`);return typeof t==`symbol`?t:t+``}function X(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Z(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function ee(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function te(e){return e}x=[(0,i.customElement)(`solid-panes-profile-heading`)];var Q;new(B=(u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,V=(S=(0,s.property)({attribute:!1}),w=(0,s.property)({attribute:!1}),E=(0,s.property)({attribute:!1}),O=(0,s.property)({attribute:!1}),A=(0,s.property)({type:Boolean,reflect:!0}),M=(0,s.state)(),P=(0,s.state)(),I=(0,s.state)(),R=(0,s.state)(),`profileData`),l=class extends i.WebComponent{constructor(...n){super(...n),H(this,u,(y(this),C(this,void 0))),H(this,d,T(this,void 0)),H(this,f,D(this,void 0)),H(this,p,k(this,void 0)),H(this,m,j(this,!1)),H(this,h,N(this,void 0)),H(this,g,F(this,`loading`)),H(this,_,L(this,``)),H(this,v,z(this,!1)),q(this,`friendRequest`,0),q(this,`friendRequestInterrupted`,!1),q(this,`friendMessageTimer`,void 0),q(this,`draggableSubject`,{uri:``}),q(this,`draggableElementsAttached`,!1),q(this,`handleAddFriend`,async e=>{if(e.preventDefault(),this.friendState!==`available`&&this.friendState!==`error`)return;let n=this.friendSubject;if(!n)return;let r=this.friendRequest;this.friendState=`saving`,this.clearFriendMessage();try{let e=a.authn.currentUser();if(!e)throw Error(t.friendTexts.loginRequired);if(await t.addFriend(e,n),r!==this.friendRequest||this.friendSubject!==n)return;this.friendState=`exists`,await this.showFriendMessage(t.friendTexts.success,!1)}catch(e){if(r!==this.friendRequest||this.friendSubject!==n)return;this.friendState=`error`,await this.showFriendMessage(e,!0)}}),q(this,`handleEdit`,t=>{let n=this.editContext;n&&e.createHeadingEditDialog(t,a.store,n.subject,n.profileData,n.viewerMode,async()=>{this.dispatchEvent(new CustomEvent(`profile-heading-saved`,{bubbles:!0,composed:!0,detail:{subjectUri:n.subject.value}})),await n.onSaved()}).catch(e=>{console.error(`Failed to edit profile heading.`,e)})}),q(this,`handleImageError`,e=>{this.failedImageSrc=e.currentTarget.getAttribute(`src`)??void 0})}get[V](){return G(u,this)}set profileData(e){W(u,this,e)}get subject(){return G(d,this)}set subject(e){W(d,this,e)}get editContext(){return G(f,this)}set editContext(e){W(f,this,e)}get friendSubject(){return G(p,this)}set friendSubject(e){W(p,this,e)}get compact(){return G(m,this)}set compact(e){W(m,this,e)}get failedImageSrc(){return G(h,this)}set failedImageSrc(e){W(h,this,e)}get friendState(){return G(g,this)}set friendState(e){W(g,this,e)}get friendMessage(){return G(_,this)}set friendMessage(e){W(_,this,e)}get friendError(){return G(v,this)}set friendError(e){W(v,this,e)}connectedCallback(){super.connectedCallback(),this.friendRequestInterrupted&&(this.friendRequestInterrupted=!1,this.startFriendCheck())}disconnectedCallback(){super.disconnectedCallback(),this.friendRequest++,(this.friendState===`loading`||this.friendState===`saving`)&&(this.friendRequestInterrupted=!0),this.clearFriendMessage()}clearFriendMessage(){clearTimeout(this.friendMessageTimer),this.friendMessageTimer=void 0,this.friendMessage=``}willUpdate(e){super.willUpdate(e),e.has(`profileData`)&&e.get(`profileData`)?.imageSrc!==this.profileData?.imageSrc&&(this.failedImageSrc=void 0),e.has(`friendSubject`)&&(this.friendRequestInterrupted=!1,this.startFriendCheck())}updated(){if(this.subject&&(this.draggableSubject.uri=this.subject.value),this.draggableElementsAttached||!this.subject)return;let e=this.shadowRoot?.querySelector(`.profile-heading`),t=this.shadowRoot?.querySelector(`.name`);e&&t&&(i.widgets.makeDraggable(e,this.draggableSubject),i.widgets.makeDraggable(t,this.draggableSubject),this.draggableElementsAttached=!0)}startFriendCheck(){let e=++this.friendRequest;this.friendState=`loading`,this.clearFriendMessage(),this.friendError=!1;let n=this.friendSubject,r=a.authn.currentUser();n&&r&&!r.sameTerm(n)&&t.checkFriend(r,n).then(t=>{e===this.friendRequest&&this.friendSubject===n&&(this.friendState=t?`exists`:`available`)}).catch(t=>{e===this.friendRequest&&this.friendSubject===n&&(this.friendState=`error`,this.showFriendMessage(t,!0))})}async showFriendMessage(e,t){this.clearFriendMessage(),this.friendMessage=n.formatDisplayError(e),this.friendError=t,this.friendMessageTimer=setTimeout(()=>{this.clearFriendMessage()},1e4),await this.updateComplete,this.shadowRoot?.querySelector(`.friend-message`)?.focus()}render(){let e=this.profileData;if(!e)return o.html``;let n=$(e.primaryPhone?.valueNode).replace(/^tel:/i,``),r=$(e.primaryEmail?.valueNode).replace(/^mailto:/i,``),i=ne(e.dateOfBirth),s=!!(e.imageSrc&&this.failedImageSrc!==e.imageSrc),c=a.authn.currentUser(),l=!!(this.friendSubject&&c&&!c.sameTerm(this.friendSubject));return o.html`
2
2
  <section class="profile-heading" aria-labelledby="profile-heading-name">
3
3
  <div class="avatar">
4
4
  <div class="image-frame ${s?``:`image-frame--fallback`}">
@@ -37,7 +37,7 @@ const e=require("./editor/utils/errorDisplay.cjs.js");require("../../_virtual/~i
37
37
  ?disabled=${this.friendState===`loading`||this.friendState===`saving`||this.friendState===`exists`}
38
38
  aria-busy=${this.friendState===`loading`||this.friendState===`saving`?`true`:`false`}
39
39
  @click=${this.handleAddFriend}
40
- >${this.friendState===`exists`?o.nothing:o.html`<icon-lucide-user-round-plus slot="icon" class="profile__btn-friends-icon" aria-hidden="true"></icon-lucide-user-round-plus>`}${this.friendState===`exists`?n.friendTexts.exists:n.friendTexts.add}</solid-ui-button>
40
+ >${this.friendState===`exists`?o.nothing:o.html`<icon-lucide-user-round-plus slot="icon" class="profile__btn-friends-icon" aria-hidden="true"></icon-lucide-user-round-plus>`}${this.friendState===`exists`?t.friendTexts.exists:t.friendTexts.add}</solid-ui-button>
41
41
  ${this.friendMessage?o.html`
42
42
  <div class="friend-message" role=${this.friendError?`alert`:`status`}
43
43
  aria-live=${this.friendError?`assertive`:`polite`} tabindex="0">
@@ -78,7 +78,7 @@ const e=require("./editor/utils/errorDisplay.cjs.js");require("../../_virtual/~i
78
78
  ${this.renderLine(e.location,`location`)}
79
79
  </div>
80
80
  <div class="detail-row" role="group" aria-label="Contact information">
81
- ${this.renderLine(t,`phone`)}
81
+ ${this.renderLine(n,`phone`)}
82
82
  ${this.renderLine(r,`email`)}
83
83
  </div>
84
84
  </div>
@@ -91,5 +91,5 @@ const e=require("./editor/utils/errorDisplay.cjs.js");require("../../_virtual/~i
91
91
  </span>
92
92
  <span class="detail-value">${e}</span>
93
93
  </div>
94
- `:o.nothing}renderIcon(e){switch(e){case`birthday`:return o.html`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;case`location`:return o.html`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;case`phone`:return o.html`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;case`email`:return o.html`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`}}renderEditIcon(){return o.html`<icon-lucide-pencil aria-hidden="true"></icon-lucide-pencil>`}},{e:[S,w,E,O,A,M,P,I,v],c:[Z,y]}=G(l,[[x,1,`profileData`],[C,1,`editContext`],[T,1,`friendSubject`],[D,1,`compact`],[k,1,`failedImageSrc`],[j,1,`friendState`],[N,1,`friendMessage`],[F,1,`friendError`]],b,0,void 0,i.WebComponent),l),c=class extends X{constructor(){super(Z),W(this,`styles`,r.default),y()}},W(c,L,void 0),c);function Q(e){return e?.value??``}function $(e){let t=(e||``).trim(),n=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n){let[,e,t,r]=n;return`${r}-${t}-${e}`}let r=t.match(/^(\d{2})[/-](\d{2})[/-](\d{4})$/);if(r){let[,e,t,n]=r;return`${e}-${t}-${n}`}return t}Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return Z}});
94
+ `:o.nothing}renderIcon(e){switch(e){case`birthday`:return o.html`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;case`location`:return o.html`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;case`phone`:return o.html`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;case`email`:return o.html`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`}}renderEditIcon(){return o.html`<icon-lucide-pencil aria-hidden="true"></icon-lucide-pencil>`}},{e:[C,T,D,k,j,N,F,L,z,y],c:[Q,b]}=J(l,[[S,1,`profileData`],[w,1,`subject`],[E,1,`editContext`],[O,1,`friendSubject`],[A,1,`compact`],[M,1,`failedImageSrc`],[P,1,`friendState`],[I,1,`friendMessage`],[R,1,`friendError`]],x,0,void 0,i.WebComponent),l),c=class extends te{constructor(){super(Q),q(this,`styles`,r.default),b()}},q(c,B,void 0),c);function $(e){return e?.value??``}function ne(e){let t=(e||``).trim(),n=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n){let[,e,t,r]=n;return`${r}-${t}-${e}`}let r=t.match(/^(\d{2})[/-](\d{2})[/-](\d{4})$/);if(r){let[,e,t,n]=r;return`${e}-${t}-${n}`}return t}Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return Q}});
95
95
  //# sourceMappingURL=ProfileHeading.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileHeading.cjs.js","names":["authn","store","customElement","WebComponent","html","nothing","property","state","createHeadingEditDialog","addFriend","checkFriend","friendTexts","formatDisplayError","styles","_classDecs","_ProfileHeading","_ProfileHeading2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_profileDataDecs","attribute","_editContextDecs","_friendSubjectDecs","_compactDecs","type","Boolean","reflect","_failedImageSrcDecs","_friendStateDecs","_friendMessageDecs","_friendErrorDecs","_ProfileHeading3","ProfileHeading","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_profileData","undefined","_init_editContext","_init_friendSubject","_init_compact","_init_failedImageSrc","_init_friendState","_init_friendMessage","_init_friendError","_defineProperty","event","preventDefault","friendState","subject","friendSubject","request","friendRequest","clearFriendMessage","viewer","currentUser","Error","loginRequired","showFriendMessage","success","error","context","editContext","profileData","viewerMode","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","value","onSaved","catch","console","failedImageSrc","currentTarget","getAttribute","_classPrivateFieldGet","v","_classPrivateFieldSet","compact","friendMessage","friendError","connectedCallback","friendRequestInterrupted","startFriendCheck","disconnectedCallback","clearTimeout","friendMessageTimer","willUpdate","changed","has","get","imageSrc","sameTerm","then","exists","message","setTimeout","updateComplete","shadowRoot","querySelector","focus","render","profile","phone","textValue","primaryPhone","valueNode","replace","email","primaryEmail","dateOfBirth","displayDate","showImage","showFriend","name","handleImageError","pronouns","jobTitle","handleAddFriend","add","handleEdit","renderEditIcon","renderLine","location","icon","renderIcon","e","c","_initClass","_applyDecs","_Class","_identity","default","raw","trim","isoDate","match","year","month","day","dmyDate","customElement","property","state","WebComponent","authn","friendTexts","addFriend","store","formatDisplayError","nothing","styles","require_errorDisplay","require_HeadingEditDialog","require_friendActions","require_ProfileHeading_styles","solid_ui","solid_logic","lit","lit_decorators_js","_Class","_ProfileHeading3","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_profileDataDecs","_init_profileData","_editContextDecs","_init_editContext","_friendSubjectDecs","_init_friendSubject","_compactDecs","_init_compact","_failedImageSrcDecs","_init_failedImageSrc","_friendStateDecs","_init_friendState","_friendMessageDecs","_init_friendMessage","_friendErrorDecs","_init_friendError","_ProfileHeading2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_ProfileHeading","args","event","subject","request","viewer","error","context","changed","exists","message","profile","phone","textValue","email","dateOfBirth","displayDate","showImage","showFriend","value","icon","raw","isoDate","year","month","day","dmyDate"],"sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport type { NamedNode, Node } from 'rdflib'\nimport { customElement, WebComponent } from 'solid-ui'\nimport { html, nothing, type PropertyValues, type TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { createHeadingEditDialog } from './editor/sections/heading/HeadingEditDialog'\nimport type { ProfileDetails, ProfilePresentation } from './editor/sections/heading/types'\nimport type { PointDetails } from './editor/sections/contactInfo/types'\nimport type { ViewerMode } from '../../types'\nimport { addFriend, checkFriend, friendTexts } from './friendActions'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/cake'\nimport '~icons/lucide/circle-user-round'\nimport '~icons/lucide/mail'\nimport '~icons/lucide/map-pin'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/phone'\nimport '~icons/lucide/user-round-plus'\nimport styles from './ProfileHeading.styles.css'\n\nexport type ProfileHeadingPoint = Pick<PointDetails, 'valueNode'>\n\n// The heading renders a subset of the shared presentation model used by the editor.\nexport type ProfileHeadingData =\n Pick<ProfilePresentation, 'name' | 'imageSrc' | 'location' | 'pronouns' | 'dateOfBirth' | 'jobTitle'> & {\n primaryPhone?: ProfileHeadingPoint\n primaryEmail?: ProfileHeadingPoint\n }\n\nexport interface ProfileHeadingEditContext {\n subject: NamedNode\n profileData: ProfileDetails\n viewerMode: ViewerMode\n onSaved: () => Promise<void> | void\n}\n\n@customElement('solid-panes-profile-heading')\nexport default class ProfileHeading extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor profileData: ProfileHeadingData | undefined = undefined\n\n @property({ attribute: false })\n accessor editContext: ProfileHeadingEditContext | undefined = undefined\n\n @property({ attribute: false })\n accessor friendSubject: NamedNode | undefined = undefined\n\n @property({ type: Boolean, reflect: true })\n accessor compact = false\n\n @state()\n accessor failedImageSrc: string | undefined = undefined\n\n @state()\n accessor friendState: 'loading' | 'available' | 'exists' | 'saving' | 'error' = 'loading'\n\n @state()\n accessor friendMessage = ''\n\n @state()\n accessor friendError = false\n\n private friendRequest = 0\n private friendRequestInterrupted = false\n private friendMessageTimer: ReturnType<typeof setTimeout> | undefined\n\n connectedCallback (): void {\n super.connectedCallback()\n if (this.friendRequestInterrupted) {\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n }\n\n disconnectedCallback (): void {\n super.disconnectedCallback()\n this.friendRequest++\n if (this.friendState === 'loading' || this.friendState === 'saving') {\n this.friendRequestInterrupted = true\n }\n this.clearFriendMessage()\n }\n\n private clearFriendMessage (): void {\n clearTimeout(this.friendMessageTimer)\n this.friendMessageTimer = undefined\n this.friendMessage = ''\n }\n\n protected willUpdate (changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (changed.has('profileData') && changed.get('profileData')?.imageSrc !== this.profileData?.imageSrc) {\n this.failedImageSrc = undefined\n }\n if (!changed.has('friendSubject')) return\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n\n private startFriendCheck (): void {\n const request = ++this.friendRequest\n this.friendState = 'loading'\n this.clearFriendMessage()\n this.friendError = false\n const subject = this.friendSubject\n const viewer = authn.currentUser()\n if (!subject || !viewer || viewer.sameTerm(subject)) return\n\n checkFriend(viewer, subject).then((exists) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = exists ? 'exists' : 'available'\n }).catch((error: unknown) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n this.showFriendMessage(error, true)\n })\n }\n\n private async showFriendMessage (message: unknown, error: boolean): Promise<void> {\n this.clearFriendMessage()\n this.friendMessage = formatDisplayError(message)\n this.friendError = error\n this.friendMessageTimer = setTimeout(() => {\n this.clearFriendMessage()\n }, 10000)\n await this.updateComplete\n this.shadowRoot?.querySelector<HTMLElement>('.friend-message')?.focus()\n }\n\n private handleAddFriend = async (event: Event): Promise<void> => {\n event.preventDefault()\n if (this.friendState !== 'available' && this.friendState !== 'error') return\n const subject = this.friendSubject\n if (!subject) return\n const request = this.friendRequest\n this.friendState = 'saving'\n this.clearFriendMessage()\n try {\n const viewer = authn.currentUser()\n if (!viewer) throw new Error(friendTexts.loginRequired)\n await addFriend(viewer, subject)\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'exists'\n await this.showFriendMessage(friendTexts.success, false)\n } catch (error: unknown) {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n await this.showFriendMessage(error, true)\n }\n }\n\n private handleEdit = (event: Event) => {\n const context = this.editContext\n if (!context) return\n\n createHeadingEditDialog(\n event,\n store,\n context.subject,\n context.profileData,\n context.viewerMode,\n async () => {\n this.dispatchEvent(new CustomEvent('profile-heading-saved', {\n bubbles: true,\n composed: true,\n detail: { subjectUri: context.subject.value }\n }))\n await context.onSaved()\n }\n ).catch((error: unknown) => {\n console.error('Failed to edit profile heading.', error)\n })\n }\n\n private handleImageError = (event: Event) => {\n this.failedImageSrc = (event.currentTarget as HTMLImageElement).getAttribute('src') ?? undefined\n }\n\n render (): TemplateResult<1> {\n const profile = this.profileData\n if (!profile) return html``\n\n const phone = textValue(profile.primaryPhone?.valueNode).replace(/^tel:/i, '')\n const email = textValue(profile.primaryEmail?.valueNode).replace(/^mailto:/i, '')\n const dateOfBirth = displayDate(profile.dateOfBirth)\n const showImage = Boolean(profile.imageSrc && this.failedImageSrc !== profile.imageSrc)\n const viewer = authn.currentUser()\n const showFriend = Boolean(this.friendSubject && viewer && !viewer.sameTerm(this.friendSubject))\n\n return html`\n <section class=\"profile-heading\" aria-labelledby=\"profile-heading-name\">\n <div class=\"avatar\">\n <div class=\"image-frame ${showImage ? '' : 'image-frame--fallback'}\">\n ${showImage\n ? html`<img\n class=\"hero\"\n src=${profile.imageSrc}\n alt=${profile.name}\n width=\"140\"\n height=\"140\"\n loading=\"eager\"\n @error=${this.handleImageError}\n />`\n : nothing}\n <div class=\"hero-fallback\" role=\"img\" aria-label=${profile.name}>\n <icon-lucide-circle-user-round aria-hidden=\"true\"></icon-lucide-circle-user-round>\n </div>\n </div>\n </div>\n\n <div class=\"info\">\n <header class=\"header-bar\">\n <div class=\"identity\" role=\"group\" aria-label=${this.compact ? 'Name' : 'Name and pronouns'}>\n <h1 id=\"profile-heading-name\" class=\"name\">${profile.name}</h1>\n ${profile.pronouns ? html`<span class=\"pronouns\" ?hidden=${this.compact}>(${profile.pronouns})</span>` : nothing}\n </div>\n ${profile.jobTitle ? html`<div class=\"role\">${profile.jobTitle}</div>` : nothing}\n </header>\n </div>\n\n ${(this.editContext && !this.compact) || showFriend\n ? html`\n <div class=\"profile__actions profile__heading-edit-action\">\n ${showFriend\n ? html`\n <div class=\"profile-friends-button__section\" role=\"group\" aria-label=\"Friend relationship actions\">\n <solid-ui-button\n variant=\"secondary\"\n class=\"profile__btn-friends\"\n ?disabled=${this.friendState === 'loading' || this.friendState === 'saving' || this.friendState === 'exists'}\n aria-busy=${this.friendState === 'loading' || this.friendState === 'saving' ? 'true' : 'false'}\n @click=${this.handleAddFriend}\n >${this.friendState === 'exists'\n ? nothing\n : html`<icon-lucide-user-round-plus slot=\"icon\" class=\"profile__btn-friends-icon\" aria-hidden=\"true\"></icon-lucide-user-round-plus>`}${this.friendState === 'exists' ? friendTexts.exists : friendTexts.add}</solid-ui-button>\n ${this.friendMessage\n ? html`\n <div class=\"friend-message\" role=${this.friendError ? 'alert' : 'status'}\n aria-live=${this.friendError ? 'assertive' : 'polite'} tabindex=\"0\">\n ${this.friendMessage}\n </div>`\n : nothing}\n </div>\n `\n : nothing}\n ${this.editContext && !this.compact\n ? html`\n <solid-ui-button\n variant=\"tertiary\"\n class=\"profile-section-collapsible__edit-button desktop-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"left-icon\" class=\"profile-section-collapsible__action-label profile__add-more-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n <span class=\"profile-section-collapsible__action-label edit-label\">Edit</span>\n </solid-ui-button>\n <solid-ui-button\n variant=\"ghost\"\n class=\"profile-section-collapsible__edit-button mobile-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"icon\" class=\"profile-section-collapsible__edit-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n </solid-ui-button>\n `\n : nothing}\n </div>\n `\n : nothing}\n\n <div class=\"details-collapse\" aria-hidden=${this.compact ? 'true' : 'false'} ?inert=${this.compact}>\n <div class=\"details\">\n <div class=\"detail-row\" role=\"group\" aria-label=\"Additional profile information\">\n ${this.renderLine(dateOfBirth, 'birthday')}\n ${this.renderLine(profile.location, 'location')}\n </div>\n <div class=\"detail-row\" role=\"group\" aria-label=\"Contact information\">\n ${this.renderLine(phone, 'phone')}\n ${this.renderLine(email, 'email')}\n </div>\n </div>\n </div>\n </section>\n `\n }\n\n private renderLine (value: string | undefined, icon: 'birthday' | 'location' | 'phone' | 'email') {\n if (!value) return nothing\n\n return html`\n <div class=\"detail-item\">\n <span class=\"detail-icon\" aria-hidden=\"true\">\n ${this.renderIcon(icon)}\n </span>\n <span class=\"detail-value\">${value}</span>\n </div>\n `\n }\n\n private renderIcon (icon: 'birthday' | 'location' | 'phone' | 'email'): TemplateResult {\n switch (icon) {\n case 'birthday':\n return html`<icon-lucide-cake aria-hidden=\"true\"></icon-lucide-cake>`\n case 'location':\n return html`<icon-lucide-map-pin aria-hidden=\"true\"></icon-lucide-map-pin>`\n case 'phone':\n return html`<icon-lucide-phone aria-hidden=\"true\"></icon-lucide-phone>`\n case 'email':\n return html`<icon-lucide-mail aria-hidden=\"true\"></icon-lucide-mail>`\n }\n }\n\n private renderEditIcon (): TemplateResult {\n return html`<icon-lucide-pencil aria-hidden=\"true\"></icon-lucide-pencil>`\n }\n}\n\nfunction textValue (value: Node | undefined): string {\n return value?.value ?? ''\n}\n\nfunction displayDate (value?: string): string {\n const raw = (value || '').trim()\n const isoDate = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})/)\n if (isoDate) {\n const [, year, month, day] = isoDate\n return `${day}-${month}-${year}`\n }\n\n const dmyDate = raw.match(/^(\\d{2})[/-](\\d{2})[/-](\\d{4})$/)\n if (dmyDate) {\n const [, day, month, year] = dmyDate\n return `${day}-${month}-${year}`\n }\n\n return raw\n}\n"],"mappings":"A,o3JAuBAc,EAAA,EAAA,EAcCZ,EAAAA,cAAAA,CAAc,6BAA6B,CAAC,EAAA,IAAAa,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,E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AAtG,EAAA,CAAA,CAAAZ,EAAA,EAAA,aAAA,EAAA,CAAAE,EAAA,EAAA,aAAA,EAAA,CAAAC,EAAA,EAAA,eAAA,EAAA,CAAAC,EAAA,EAAA,SAAA,EAAA,CAAAI,EAAA,EAAA,gBAAA,EAAA,CAAAC,EAAA,EAAA,aAAA,EAAA,CAAAC,EAAA,EAAA,eAAA,EAAA,CAAAC,EAAA,EAAA,aAAA,CAAA,EAAAxB,EAAA,EAAA,IAAA,GA5R2CX,EAAAA,YAAY,EAAAoC,GAAAuG,EAAA,cAAAC,CAAA,CAAAtG,aAAA,CAAA,MAAA1B,CAAA,EAAAuC,EAAA,KAAA,SACtCzC,EAAAA,OAAM,EAAA+H,EAAA,CAAA,CAAA,EAAAtF,EAAAwF,EAAA9H,EAAA,IAAA,EAAA,EAAA8H,GA6RxB,SAAS1B,EAAWpC,EAAiC,CACnD,OAAOA,GAAOA,OAAS,EACzB,CAEA,SAAS2C,EAAa3C,EAAwB,CAC5C,IAAMiE,GAAOjE,GAAS,GAAA,CAAIkE,KAAK,EACzBC,EAAUF,EAAIG,MAAM,0BAA0B,EACpD,GAAID,EAAS,CACX,GAAM,EAAGE,EAAMC,EAAOC,GAAOJ,EAC7B,MAAO,GAAGI,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,IAAMG,EAAUP,EAAIG,MAAM,iCAAiC,EAC3D,GAAII,EAAS,CACX,GAAM,EAAGD,EAAKD,EAAOD,GAAQG,EAC7B,MAAO,GAAGD,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,OAAOJ,CACT,C"}
1
+ {"version":3,"file":"ProfileHeading.cjs.js","names":["authn","store","customElement","WebComponent","widgets","html","nothing","property","state","createHeadingEditDialog","addFriend","checkFriend","friendTexts","formatDisplayError","styles","_classDecs","_ProfileHeading","_ProfileHeading2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_ref","_profileDataDecs","attribute","_subjectDecs","_editContextDecs","_friendSubjectDecs","_compactDecs","type","Boolean","reflect","_failedImageSrcDecs","_friendStateDecs","_friendMessageDecs","_friendErrorDecs","_ProfileHeading3","ProfileHeading","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_profileData","undefined","_init_subject","_init_editContext","_init_friendSubject","_init_compact","_init_failedImageSrc","_init_friendState","_init_friendMessage","_init_friendError","_defineProperty","uri","event","preventDefault","friendState","subject","friendSubject","request","friendRequest","clearFriendMessage","viewer","currentUser","Error","loginRequired","showFriendMessage","success","error","context","editContext","profileData","viewerMode","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","value","onSaved","catch","console","failedImageSrc","currentTarget","getAttribute","_classPrivateFieldGet","v","_classPrivateFieldSet","compact","friendMessage","friendError","connectedCallback","friendRequestInterrupted","startFriendCheck","disconnectedCallback","clearTimeout","friendMessageTimer","willUpdate","changed","has","get","imageSrc","updated","draggableSubject","draggableElementsAttached","heading","shadowRoot","querySelector","name","makeDraggable","sameTerm","then","exists","message","setTimeout","updateComplete","focus","render","profile","phone","textValue","primaryPhone","valueNode","replace","email","primaryEmail","dateOfBirth","displayDate","showImage","showFriend","handleImageError","pronouns","jobTitle","handleAddFriend","add","handleEdit","renderEditIcon","renderLine","location","icon","renderIcon","e","c","_initClass","_applyDecs","_Class","_identity","raw","trim","isoDate","match","year","month","day","dmyDate","require_HeadingEditDialog","require_friendActions","require_errorDisplay","require_ProfileHeading_styles","solid_ui","solid_logic","lit","lit_decorators_js","_Class","_ProfileHeading3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_initProto","_initClass","_classDecs","_profileDataDecs","_init_profileData","_subjectDecs","_init_subject","_editContextDecs","_init_editContext","_friendSubjectDecs","_init_friendSubject","_compactDecs","_init_compact","_failedImageSrcDecs","_init_failedImageSrc","_friendStateDecs","_init_friendState","_friendMessageDecs","_init_friendMessage","_friendErrorDecs","_init_friendError","_ProfileHeading2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_ProfileHeading","args","event","subject","request","viewer","error","context","changed","heading","name","exists","message","profile","phone","textValue","email","dateOfBirth","displayDate","showImage","showFriend","value","icon","raw","isoDate","year","month","day","dmyDate"],"sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport type { NamedNode, Node } from 'rdflib'\nimport { customElement, WebComponent, widgets } from 'solid-ui'\nimport { html, nothing, type PropertyValues, type TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { createHeadingEditDialog } from './editor/sections/heading/HeadingEditDialog'\nimport type { ProfileDetails, ProfilePresentation } from './editor/sections/heading/types'\nimport type { PointDetails } from './editor/sections/contactInfo/types'\nimport type { ViewerMode } from '../../types'\nimport { addFriend, checkFriend, friendTexts } from './friendActions'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/cake'\nimport '~icons/lucide/circle-user-round'\nimport '~icons/lucide/mail'\nimport '~icons/lucide/map-pin'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/phone'\nimport '~icons/lucide/user-round-plus'\nimport styles from './ProfileHeading.styles.css'\n\nexport type ProfileHeadingPoint = Pick<PointDetails, 'valueNode'>\n\n// The heading renders a subset of the shared presentation model used by the editor.\nexport type ProfileHeadingData =\n Pick<ProfilePresentation, 'name' | 'imageSrc' | 'location' | 'pronouns' | 'dateOfBirth' | 'jobTitle'> & {\n primaryPhone?: ProfileHeadingPoint\n primaryEmail?: ProfileHeadingPoint\n }\n\nexport interface ProfileHeadingEditContext {\n subject: NamedNode\n profileData: ProfileDetails\n viewerMode: ViewerMode\n onSaved: () => Promise<void> | void\n}\n\n@customElement('solid-panes-profile-heading')\nexport default class ProfileHeading extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor profileData: ProfileHeadingData | undefined = undefined\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor editContext: ProfileHeadingEditContext | undefined = undefined\n\n @property({ attribute: false })\n accessor friendSubject: NamedNode | undefined = undefined\n\n @property({ type: Boolean, reflect: true })\n accessor compact = false\n\n @state()\n accessor failedImageSrc: string | undefined = undefined\n\n @state()\n accessor friendState: 'loading' | 'available' | 'exists' | 'saving' | 'error' = 'loading'\n\n @state()\n accessor friendMessage = ''\n\n @state()\n accessor friendError = false\n\n private friendRequest = 0\n private friendRequestInterrupted = false\n private friendMessageTimer: ReturnType<typeof setTimeout> | undefined\n private readonly draggableSubject = { uri: '' }\n private draggableElementsAttached = false\n\n connectedCallback (): void {\n super.connectedCallback()\n if (this.friendRequestInterrupted) {\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n }\n\n disconnectedCallback (): void {\n super.disconnectedCallback()\n this.friendRequest++\n if (this.friendState === 'loading' || this.friendState === 'saving') {\n this.friendRequestInterrupted = true\n }\n this.clearFriendMessage()\n }\n\n private clearFriendMessage (): void {\n clearTimeout(this.friendMessageTimer)\n this.friendMessageTimer = undefined\n this.friendMessage = ''\n }\n\n protected willUpdate (changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (changed.has('profileData') && changed.get('profileData')?.imageSrc !== this.profileData?.imageSrc) {\n this.failedImageSrc = undefined\n }\n if (!changed.has('friendSubject')) return\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n\n protected updated (): void {\n if (this.subject) this.draggableSubject.uri = this.subject.value\n if (this.draggableElementsAttached || !this.subject) return\n\n const heading = this.shadowRoot?.querySelector<HTMLElement>('.profile-heading')\n const name = this.shadowRoot?.querySelector<HTMLElement>('.name')\n if (!heading || !name) return\n\n widgets.makeDraggable(heading, this.draggableSubject)\n widgets.makeDraggable(name, this.draggableSubject)\n this.draggableElementsAttached = true\n }\n\n private startFriendCheck (): void {\n const request = ++this.friendRequest\n this.friendState = 'loading'\n this.clearFriendMessage()\n this.friendError = false\n const subject = this.friendSubject\n const viewer = authn.currentUser()\n if (!subject || !viewer || viewer.sameTerm(subject)) return\n\n checkFriend(viewer, subject).then((exists) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = exists ? 'exists' : 'available'\n }).catch((error: unknown) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n this.showFriendMessage(error, true)\n })\n }\n\n private async showFriendMessage (message: unknown, error: boolean): Promise<void> {\n this.clearFriendMessage()\n this.friendMessage = formatDisplayError(message)\n this.friendError = error\n this.friendMessageTimer = setTimeout(() => {\n this.clearFriendMessage()\n }, 10000)\n await this.updateComplete\n this.shadowRoot?.querySelector<HTMLElement>('.friend-message')?.focus()\n }\n\n private handleAddFriend = async (event: Event): Promise<void> => {\n event.preventDefault()\n if (this.friendState !== 'available' && this.friendState !== 'error') return\n const subject = this.friendSubject\n if (!subject) return\n const request = this.friendRequest\n this.friendState = 'saving'\n this.clearFriendMessage()\n try {\n const viewer = authn.currentUser()\n if (!viewer) throw new Error(friendTexts.loginRequired)\n await addFriend(viewer, subject)\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'exists'\n await this.showFriendMessage(friendTexts.success, false)\n } catch (error: unknown) {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n await this.showFriendMessage(error, true)\n }\n }\n\n private handleEdit = (event: Event) => {\n const context = this.editContext\n if (!context) return\n\n createHeadingEditDialog(\n event,\n store,\n context.subject,\n context.profileData,\n context.viewerMode,\n async () => {\n this.dispatchEvent(new CustomEvent('profile-heading-saved', {\n bubbles: true,\n composed: true,\n detail: { subjectUri: context.subject.value }\n }))\n await context.onSaved()\n }\n ).catch((error: unknown) => {\n console.error('Failed to edit profile heading.', error)\n })\n }\n\n private handleImageError = (event: Event) => {\n this.failedImageSrc = (event.currentTarget as HTMLImageElement).getAttribute('src') ?? undefined\n }\n\n render (): TemplateResult<1> {\n const profile = this.profileData\n if (!profile) return html``\n\n const phone = textValue(profile.primaryPhone?.valueNode).replace(/^tel:/i, '')\n const email = textValue(profile.primaryEmail?.valueNode).replace(/^mailto:/i, '')\n const dateOfBirth = displayDate(profile.dateOfBirth)\n const showImage = Boolean(profile.imageSrc && this.failedImageSrc !== profile.imageSrc)\n const viewer = authn.currentUser()\n const showFriend = Boolean(this.friendSubject && viewer && !viewer.sameTerm(this.friendSubject))\n\n return html`\n <section class=\"profile-heading\" aria-labelledby=\"profile-heading-name\">\n <div class=\"avatar\">\n <div class=\"image-frame ${showImage ? '' : 'image-frame--fallback'}\">\n ${showImage\n ? html`<img\n class=\"hero\"\n src=${profile.imageSrc}\n alt=${profile.name}\n width=\"140\"\n height=\"140\"\n loading=\"eager\"\n @error=${this.handleImageError}\n />`\n : nothing}\n <div class=\"hero-fallback\" role=\"img\" aria-label=${profile.name}>\n <icon-lucide-circle-user-round aria-hidden=\"true\"></icon-lucide-circle-user-round>\n </div>\n </div>\n </div>\n\n <div class=\"info\">\n <header class=\"header-bar\">\n <div class=\"identity\" role=\"group\" aria-label=${this.compact ? 'Name' : 'Name and pronouns'}>\n <h1 id=\"profile-heading-name\" class=\"name\">${profile.name}</h1>\n ${profile.pronouns ? html`<span class=\"pronouns\" ?hidden=${this.compact}>(${profile.pronouns})</span>` : nothing}\n </div>\n ${profile.jobTitle ? html`<div class=\"role\">${profile.jobTitle}</div>` : nothing}\n </header>\n </div>\n\n ${(this.editContext && !this.compact) || showFriend\n ? html`\n <div class=\"profile__actions profile__heading-edit-action\">\n ${showFriend\n ? html`\n <div class=\"profile-friends-button__section\" role=\"group\" aria-label=\"Friend relationship actions\">\n <solid-ui-button\n variant=\"secondary\"\n class=\"profile__btn-friends\"\n ?disabled=${this.friendState === 'loading' || this.friendState === 'saving' || this.friendState === 'exists'}\n aria-busy=${this.friendState === 'loading' || this.friendState === 'saving' ? 'true' : 'false'}\n @click=${this.handleAddFriend}\n >${this.friendState === 'exists'\n ? nothing\n : html`<icon-lucide-user-round-plus slot=\"icon\" class=\"profile__btn-friends-icon\" aria-hidden=\"true\"></icon-lucide-user-round-plus>`}${this.friendState === 'exists' ? friendTexts.exists : friendTexts.add}</solid-ui-button>\n ${this.friendMessage\n ? html`\n <div class=\"friend-message\" role=${this.friendError ? 'alert' : 'status'}\n aria-live=${this.friendError ? 'assertive' : 'polite'} tabindex=\"0\">\n ${this.friendMessage}\n </div>`\n : nothing}\n </div>\n `\n : nothing}\n ${this.editContext && !this.compact\n ? html`\n <solid-ui-button\n variant=\"tertiary\"\n class=\"profile-section-collapsible__edit-button desktop-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"left-icon\" class=\"profile-section-collapsible__action-label profile__add-more-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n <span class=\"profile-section-collapsible__action-label edit-label\">Edit</span>\n </solid-ui-button>\n <solid-ui-button\n variant=\"ghost\"\n class=\"profile-section-collapsible__edit-button mobile-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"icon\" class=\"profile-section-collapsible__edit-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n </solid-ui-button>\n `\n : nothing}\n </div>\n `\n : nothing}\n\n <div class=\"details-collapse\" aria-hidden=${this.compact ? 'true' : 'false'} ?inert=${this.compact}>\n <div class=\"details\">\n <div class=\"detail-row\" role=\"group\" aria-label=\"Additional profile information\">\n ${this.renderLine(dateOfBirth, 'birthday')}\n ${this.renderLine(profile.location, 'location')}\n </div>\n <div class=\"detail-row\" role=\"group\" aria-label=\"Contact information\">\n ${this.renderLine(phone, 'phone')}\n ${this.renderLine(email, 'email')}\n </div>\n </div>\n </div>\n </section>\n `\n }\n\n private renderLine (value: string | undefined, icon: 'birthday' | 'location' | 'phone' | 'email') {\n if (!value) return nothing\n\n return html`\n <div class=\"detail-item\">\n <span class=\"detail-icon\" aria-hidden=\"true\">\n ${this.renderIcon(icon)}\n </span>\n <span class=\"detail-value\">${value}</span>\n </div>\n `\n }\n\n private renderIcon (icon: 'birthday' | 'location' | 'phone' | 'email'): TemplateResult {\n switch (icon) {\n case 'birthday':\n return html`<icon-lucide-cake aria-hidden=\"true\"></icon-lucide-cake>`\n case 'location':\n return html`<icon-lucide-map-pin aria-hidden=\"true\"></icon-lucide-map-pin>`\n case 'phone':\n return html`<icon-lucide-phone aria-hidden=\"true\"></icon-lucide-phone>`\n case 'email':\n return html`<icon-lucide-mail aria-hidden=\"true\"></icon-lucide-mail>`\n }\n }\n\n private renderEditIcon (): TemplateResult {\n return html`<icon-lucide-pencil aria-hidden=\"true\"></icon-lucide-pencil>`\n }\n}\n\nfunction textValue (value: Node | undefined): string {\n return value?.value ?? ''\n}\n\nfunction displayDate (value?: string): string {\n const raw = (value || '').trim()\n const isoDate = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})/)\n if (isoDate) {\n const [, year, month, day] = isoDate\n return `${day}-${month}-${year}`\n }\n\n const dmyDate = raw.match(/^(\\d{2})[/-](\\d{2})[/-](\\d{4})$/)\n if (dmyDate) {\n const [, day, month, year] = dmyDate\n return `${day}-${month}-${year}`\n }\n\n return raw\n}\n"],"mappings":"A,u3JAuBAe,EAAA,EAAA,EAcCb,EAAAA,cAAAA,CAAc,6BAA6B,CAAC,EAAA,IAAAc,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,EAAA,IAAAP,QAAAQ,EAAA,IAAAR,QAAAS,GAAAC,GAAAA,EAI1CtB,EAAAA,SAAAA,CAAS,CAAEuB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BxB,EAAAA,SAAAA,CAAS,CAAEuB,UAAW,EAAM,CAAC,EAACE,GAAAA,EAG9B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EAAUF,EAAIG,MAAM,0BAA0B,EACpD,GAAID,EAAS,CACX,GAAM,EAAGE,EAAMC,EAAOC,GAAOJ,EAC7B,MAAO,GAAGI,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,IAAMG,EAAUP,EAAIG,MAAM,iCAAiC,EAC3D,GAAII,EAAS,CACX,GAAM,EAAGD,EAAKD,EAAOD,GAAQG,EAC7B,MAAO,GAAGD,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,OAAOJ,CACT,C"}
@@ -18,6 +18,7 @@ export interface ProfileHeadingEditContext {
18
18
  export default class ProfileHeading extends WebComponent {
19
19
  static styles: any;
20
20
  accessor profileData: ProfileHeadingData | undefined;
21
+ accessor subject: NamedNode | undefined;
21
22
  accessor editContext: ProfileHeadingEditContext | undefined;
22
23
  accessor friendSubject: NamedNode | undefined;
23
24
  accessor compact: boolean;
@@ -28,10 +29,13 @@ export default class ProfileHeading extends WebComponent {
28
29
  private friendRequest;
29
30
  private friendRequestInterrupted;
30
31
  private friendMessageTimer;
32
+ private readonly draggableSubject;
33
+ private draggableElementsAttached;
31
34
  connectedCallback(): void;
32
35
  disconnectedCallback(): void;
33
36
  private clearFriendMessage;
34
37
  protected willUpdate(changed: PropertyValues<this>): void;
38
+ protected updated(): void;
35
39
  private startFriendCheck;
36
40
  private showFriendMessage;
37
41
  private handleAddFriend;
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileHeading.d.ts","sourceRoot":"","sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAiB,YAAY,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAG7E,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC1F,OAAO,KAAK,EAAE,YAAY,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