solid-panes 4.4.2-6 → 4.4.2-7
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.
- package/dist/RDFXMLPane2.cjs.js +1 -1
- package/dist/RDFXMLPane2.esm.js +1 -1
- package/dist/audio/audioPane.cjs.js +1 -1
- package/dist/audio/audioPane.cjs.js.map +1 -1
- package/dist/audio/audioPane.esm.js +13 -10
- package/dist/audio/audioPane.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -1
- package/dist/n3Pane2.esm.js +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +12 -10
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +1 -1
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +6 -4
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/social/socialSections.cjs.js +1 -1
- package/dist/social/socialSections.cjs.js.map +1 -1
- package/dist/social/socialSections.esm.js +7 -6
- package/dist/social/socialSections.esm.js.map +1 -1
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +3 -3
- package/dist/versionInfo.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./icons.cjs.js");require("./editProfileDetails.cjs.js");let t=require("solid-ui"),n=require("rdflib"),r=require("profile-pane");function i(n,i,o,s,c){let l=n.dom;n.session.store;let u=l.createElement(`header`);u.className=`social-pane__header`;let d=o,f=function(){u.replaceChildren();let o=c(),f=l.createElement(`div`);f.className=`social-pane__header-content`;let p=l.createElement(`div`);if(p.className=`social-pane__header-actions profile__actions profile__heading-actions`,!d.canEdit&&d.viewerMode===`authenticated`&&d.showAddFriendAction){p.classList.add(`social-pane__header-actions--friend`);let e=(0,r.createAddMeToYourFriendsButton)(i,n);e.classList.add(`flex-center`),p.appendChild(e)}u.appendChild(f);let m=l.createElement(`div`);m.className=`social-pane__header-media`,f.appendChild(m),o&&m.appendChild(a(l,o.imageUrl,o.name));let h=l.createElement(`div`);h.className=`social-pane__header-details`,f.appendChild(h),p.childNodes.length>0&&f.appendChild(p);let g=l.createElement(`div`);g.classList.add(`social-pane__header-summary`,`flex-column`),h.appendChild(g);let _=o?.name||t.utils.label(i),v=l.createElement(`h1`);v.classList.add(`social-pane__header-name`),v.appendChild(l.createTextNode(_)),g.appendChild(v);let y=[o?.jobTitle,o?.organization].filter(Boolean).join(` | `);if(y){let e=l.createElement(`div`);e.className=`social-pane__header-job-org`,e.textContent=y,g.appendChild(e)}if(o?.location){let t=l.createElement(`div`);t.className=`social-pane__header-location`;let n=l.createElement(`span`);n.classList.add(`social-pane__header-location-icon`,`inline-flex-row`),n.innerHTML=e.locationIcon,t.appendChild(n),t.appendChild(l.createTextNode(o.location)),g.appendChild(t)}let b=l.createElement(`div`);b.className=`social-pane__header-stats`;let x=l.createElement(`button`);x.className=`social-pane__header-stat`,x.type=`button`;let S=l.createElement(`span`);if(S.className=`social-pane__header-stat-label`,S.textContent=`${s.friendCount} friend${s.friendCount===1?``:`s`}`,x.appendChild(S),s.onSelectFriends&&x.addEventListener(`click`,s.onSelectFriends),b.appendChild(x),typeof s.mutualFriendCount==`number`){let e=l.createElement(`button`);e.className=`social-pane__header-stat`,e.type=`button`;let t=l.createElement(`span`);t.className=`social-pane__header-stat-label`,t.textContent=`${s.mutualFriendCount} mutual friend${s.mutualFriendCount===1?``:`s`}`,e.appendChild(t),s.onSelectMutual&&e.addEventListener(`click`,s.onSelectMutual),b.appendChild(e)}g.appendChild(b)};return u.refreshSocialHeader=function(e){d=e,f()},f(),u}function a(t,n,r=``){if(n){let e=t.createElement(`img`);return e.className=`social-pane__header-hero`,e.src=n,e.alt=r,e.width=180,e.height=180,e.loading=`eager`,e}let i=t.createElement(`div`);i.className=`social-pane__header-hero-alt flex-center`,i.setAttribute(`role`,`img`),i.setAttribute(`aria-label`,r),i.tabIndex=0;let a=t.createElement(`span`);return a.classList.add(`social-pane__header-hero-icon`,`inline-flex-row`),a.innerHTML=e.personInCircleIcon,i.appendChild(a),i}function o(e){let{dom:r,subject:i,familiar:a,me:o,meUri:s,incoming:c,outgoing:l,editable:u,profile:d,knows:f,mutualConnections:p,link:m,text:h,buildCheckboxForm:g,renderSupportingInfo:_,renderNameSuffix:v}=e,y=function(){},b=r.createElement(`section`);b.className=`social-pane__mutual-friends social-primary__panel`,b.id=`social-panel-mutual`,b.setAttribute(`role`,`tabpanel`),b.setAttribute(`aria-labelledby`,`social-tab-mutual`);let x=b.appendChild(r.createElement(`div`));x.classList.add(`social-main`,`social-main--mutual`,`flex-column`);let S=r.createElement(`div`);S.classList.add(`social-mutual-summary`,`flex-column`),x.appendChild(S);let C=function(){let e=S.appendChild(r.createElement(`div`));return e.classList.add(`social-mutual-summary-line`),e},w=function(){let e=C();return e.appendChild(m(h(`You`),s)),e.appendChild(h(` and `)),e.appendChild(m(h(a),i.uri)),e};if(!c)if(!l)w().appendChild(h(` have not said you know each other.`));else{let e=C();e.appendChild(m(h(`You`),s)),e.appendChild(h(` know `)),e.appendChild(m(h(a),i.uri)),e.appendChild(h(` (unconfirmed).`))}else if(l)w().appendChild(h(` say you know each other.`));else{S.classList.add(`social-mutual-summary--confirm`);let e=S.appendChild(r.createElement(`div`));e.classList.add(`social-mutual-summary-line`),e.appendChild(m(h(a),i.uri)),e.appendChild(h(` knows `)),e.appendChild(m(h(`you`),s)),e.appendChild(h(` (unconfirmed).`))}if(c&&!l){let e=r.createElement(`span`);e.className=`social-mutual-confirm-prompt`,e.appendChild(h(`Confirm you know `)),e.appendChild(m(h(a),i.uri));let t=g(e,new n.Statement(o,f,i,d??void 0),!!l,{disabled:!u,disabledTitle:u?void 0:`Your profile is not editable`});t.classList.add(`social-mutual-checkbox-form`),x.appendChild(t)}if(p.length){let e=x.appendChild(r.createElement(`table`));e.className=`social-main social-friends-list social-friends-grid`;let n=function(e){return t.widgets.personTR(r,t.ns.foaf(`knows`),e,{renderSupportingInfo:_,renderNameSuffix:v})};y=function(){let r=[...p].sort((e,n)=>{let r=t.utils.label(e)||e.value,i=t.utils.label(n)||n.value;return r.localeCompare(i)});t.utils.syncTableToArray(e,r,n,function(e,t){return n(t)})},y()}return{section:b,content:x,refreshMutualFriends:y}}function s(e){let{dom:n,subject:r,profile:i,editable:a,renderSupportingInfo:o,renderNameSuffix:s}=e,c=n.createElement(`section`);c.className=`social-pane__all-friends social-primary__panel`,c.id=`social-panel-all-friends`,c.setAttribute(`role`,`tabpanel`),c.setAttribute(`aria-labelledby`,`social-tab-all-friends`);let l=c.appendChild(n.createElement(`table`));l.className=`social-main`;let u=t.widgets.attachmentList(n,r,l,{doc:i,modify:!!a,predicate:t.ns.foaf(`knows`),noun:`friend`,refreshOnDocumentLoad:!1,renderSupportingInfo:o,renderNameSuffix:s});u.classList.add(`social-friends-list`),u.style.marginTop=`0`;let d=u.querySelector(`tr`),f=d?.children?.[0],p=d?.children?.[1],m=n.createElement(`div`);if(m.classList.add(`social-friends-header-actions`),f instanceof HTMLTableCellElement){f.classList.add(`social-friends-header-dropzone-cell`);let e=n.createElement(`table`);e.className=`social-friends-header-dropzone`,e.setAttribute(`role`,`presentation`),e.appendChild(n.createElement(`tbody`)).appendChild(n.createElement(`tr`)).appendChild(f),m.appendChild(e)}else if(f instanceof HTMLElement){for(;f.firstChild;)m.appendChild(f.firstChild);f.remove()}let h=m.querySelectorAll(`button`);if(a&&h.length>0){h.forEach(e=>{e.setAttribute(`title`,`Drop friend here`),e.setAttribute(`aria-label`,`Drop friend here`),e.querySelectorAll(`img`).forEach(e=>{e.setAttribute(`title`,`Drop friend here`),e.setAttribute(`alt`,`Drop friend here`)})});let e=n.createElement(`div`);e.className=`social-friends-header-actions social-friends-header-actions--standalone`,e.appendChild(m);let t=n.createElement(`span`);t.className=`social-friends-header-hint`,t.textContent=`Drag a WebId on the target to add a friend.`,e.appendChild(t),c.prepend(e)}p instanceof HTMLTableCellElement&&(p.colSpan=2);let g=u.querySelector(`td table`);return g instanceof HTMLTableElement&&g.classList.add(`social-friends-grid`),{section:c,mainTable:l,friendsList:u}}function c(e){let{dom:n,triage:r,renderSupportingInfo:i,renderNameSuffix:a}=e,o=n.createElement(`section`);o.className=`social-pane__requests social-primary__panel`,o.id=`social-panel-requests`,o.setAttribute(`role`,`tabpanel`),o.setAttribute(`aria-labelledby`,`social-tab-requests`);let s=o.appendChild(n.createElement(`div`));s.classList.add(`social-main`,`social-main--requests`,`flex-column`);let c=s.appendChild(n.createElement(`p`));c.className=`social-requests__note`,c.textContent=`Best effort preview: this view only reflects profile documents that are currently loaded. A dedicated inbox would still be needed for complete request discovery.`;let l=function(e,t,r){let i=s.appendChild(n.createElement(`section`));i.classList.add(`social-requests__group`,`flex-column`);let a=i.appendChild(n.createElement(`div`));a.className=`social-requests__group-header`;let o=a.appendChild(n.createElement(`h2`));o.className=`social-requests__group-title`,o.textContent=e;let c=a.appendChild(n.createElement(`p`));c.className=`social-requests__group-description`,c.textContent=t;let l=i.appendChild(n.createElement(`p`));l.className=`social-requests__empty`,l.textContent=r;let u=i.appendChild(n.createElement(`table`));return u.className=`social-main social-friends-list social-friends-grid social-requests__table`,{empty:l,table:u}},u=l(`Incoming requests`,`People who say they know this profile, but have not been confirmed yet.`,`No incoming requests are visible from the currently loaded data.`),d=l(`Awaiting confirmation`,`People this profile knows who have not linked back yet.`,`Nothing is waiting for confirmation right now.`),f=function(e){return t.widgets.personTR(n,t.ns.foaf(`knows`),e,{renderSupportingInfo:i,renderNameSuffix:a})},p=function(e){return[...e].sort((e,n)=>{let r=t.utils.label(e)||e.value,i=t.utils.label(n)||n.value;return r.localeCompare(i)})},m=function(e,n){let r=p(n);e.empty.hidden=r.length>0,e.table.hidden=r.length===0,t.utils.syncTableToArray(e.table,r,f,function(e,t){return f(t)})},h=function(e){m(u,e.requests),m(d,e.unconfirmed)};return h(r),{section:o,refreshRequests:h}}exports.createAllFriendsSection=s,exports.createHeaderSection=i,exports.createMutualSection=o,exports.createRequestsSection=c;
|
|
1
|
+
const e=require("./icons.cjs.js");require("./editProfileDetails.cjs.js");let t=require("solid-ui"),n=require("rdflib"),r=require("profile-pane");function i(n,i,o,s,c){let l=n.dom;n.session.store;let u=l.createElement(`header`);u.className=`social-pane__header`;let d=o,f=function(){u.replaceChildren();let o=c(),f=l.createElement(`div`);f.className=`social-pane__header-content`;let p=l.createElement(`div`);if(p.className=`social-pane__header-actions profile__actions profile__heading-actions`,!d.canEdit&&d.viewerMode===`authenticated`&&d.showAddFriendAction){p.classList.add(`social-pane__header-actions--friend`);let e=(0,r.createAddMeToYourFriendsButton)(i,n);e.classList.add(`flex-center`),p.appendChild(e)}u.appendChild(f);let m=l.createElement(`div`);m.className=`social-pane__header-media`,f.appendChild(m),o&&m.appendChild(a(l,o.imageUrl,o.name));let h=l.createElement(`div`);h.className=`social-pane__header-details`,f.appendChild(h),p.childNodes.length>0&&f.appendChild(p);let g=l.createElement(`div`);g.classList.add(`social-pane__header-summary`,`flex-column`),h.appendChild(g);let _=o?.name||t.utils.label(i),v=l.createElement(`h1`);v.classList.add(`social-pane__header-name`),v.appendChild(l.createTextNode(_)),g.appendChild(v);let y=[o?.jobTitle,o?.organization].filter(Boolean).join(` | `);if(y){let e=l.createElement(`div`);e.className=`social-pane__header-job-org`,e.textContent=y,g.appendChild(e)}if(o?.location){let t=l.createElement(`div`);t.className=`social-pane__header-location`;let n=l.createElement(`span`);n.classList.add(`social-pane__header-location-icon`,`inline-flex-row`),n.innerHTML=e.locationIcon,t.appendChild(n),t.appendChild(l.createTextNode(o.location)),g.appendChild(t)}let b=l.createElement(`div`);b.className=`social-pane__header-stats`;let x=l.createElement(`button`);x.className=`social-pane__header-stat`,x.type=`button`;let S=l.createElement(`span`);if(S.className=`social-pane__header-stat-label`,S.textContent=`${s.friendCount} friend${s.friendCount===1?``:`s`}`,x.appendChild(S),s.onSelectFriends&&x.addEventListener(`click`,s.onSelectFriends),b.appendChild(x),typeof s.mutualFriendCount==`number`){let e=l.createElement(`button`);e.className=`social-pane__header-stat`,e.type=`button`;let t=l.createElement(`span`);t.className=`social-pane__header-stat-label`,t.textContent=`${s.mutualFriendCount} mutual friend${s.mutualFriendCount===1?``:`s`}`,e.appendChild(t),s.onSelectMutual&&e.addEventListener(`click`,s.onSelectMutual),b.appendChild(e)}g.appendChild(b)};return u.refreshSocialHeader=function(e){d=e,f()},f(),u}function a(t,n,r=``){if(n){let e=t.createElement(`img`);return e.className=`social-pane__header-hero`,e.src=n,e.alt=r,e.width=180,e.height=180,e.loading=`eager`,e}let i=t.createElement(`div`);i.className=`social-pane__header-hero-alt flex-center`,i.setAttribute(`role`,`img`),i.setAttribute(`aria-label`,r),i.tabIndex=0;let a=t.createElement(`span`);return a.classList.add(`social-pane__header-hero-icon`,`inline-flex-row`),a.innerHTML=e.personInCircleIcon,i.appendChild(a),i}function o(e){let{dom:r,subject:i,familiar:a,me:o,meUri:s,incoming:c,outgoing:l,editable:u,profile:d,knows:f,mutualConnections:p,link:m,text:h,buildCheckboxForm:g,renderSupportingInfo:_,renderNameSuffix:v}=e,y=function(){},b=r.createElement(`section`);b.className=`social-pane__mutual-friends social-primary__panel`,b.id=`social-panel-mutual`,b.setAttribute(`role`,`tabpanel`),b.setAttribute(`aria-labelledby`,`social-tab-mutual`);let x=b.appendChild(r.createElement(`div`));x.classList.add(`social-main`,`social-main--mutual`,`flex-column`);let S=r.createElement(`div`);S.classList.add(`social-mutual-summary`,`flex-column`),x.appendChild(S);let C=function(){let e=S.appendChild(r.createElement(`div`));return e.classList.add(`social-mutual-summary-line`),e},w=function(){let e=C();return e.appendChild(m(h(`You`),s)),e.appendChild(h(` and `)),e.appendChild(m(h(a),i.uri)),e};if(!c){if(!l)w().appendChild(h(` have not said you know each other.`));else{let e=C();e.appendChild(m(h(`You`),s)),e.appendChild(h(` know `)),e.appendChild(m(h(a),i.uri)),e.appendChild(h(` (unconfirmed).`))}}else if(l)w().appendChild(h(` say you know each other.`));else{S.classList.add(`social-mutual-summary--confirm`);let e=S.appendChild(r.createElement(`div`));e.classList.add(`social-mutual-summary-line`),e.appendChild(m(h(a),i.uri)),e.appendChild(h(` knows `)),e.appendChild(m(h(`you`),s)),e.appendChild(h(` (unconfirmed).`))}if(c&&!l){let e=r.createElement(`span`);e.className=`social-mutual-confirm-prompt`,e.appendChild(h(`Confirm you know `)),e.appendChild(m(h(a),i.uri));let t=g(e,new n.Statement(o,f,i,d??void 0),!!l,{disabled:!u,disabledTitle:u?void 0:`Your profile is not editable`});t.classList.add(`social-mutual-checkbox-form`),x.appendChild(t)}if(p.length){let e=x.appendChild(r.createElement(`table`));e.className=`social-main social-friends-list social-friends-grid`;let n=function(e){return t.widgets.personTR(r,t.ns.foaf(`knows`),e,{renderSupportingInfo:_,renderNameSuffix:v})};y=function(){let r=[...p].sort((e,n)=>{let r=t.utils.label(e)||e.value,i=t.utils.label(n)||n.value;return r.localeCompare(i)});t.utils.syncTableToArray(e,r,n,function(e,t){return n(t)})},y()}return{section:b,content:x,refreshMutualFriends:y}}function s(e){let{dom:n,subject:r,profile:i,editable:a,renderSupportingInfo:o,renderNameSuffix:s}=e,c=n.createElement(`section`);c.className=`social-pane__all-friends social-primary__panel`,c.id=`social-panel-all-friends`,c.setAttribute(`role`,`tabpanel`),c.setAttribute(`aria-labelledby`,`social-tab-all-friends`);let l=c.appendChild(n.createElement(`table`));l.className=`social-main`;let u=t.widgets.attachmentList(n,r,l,{doc:i,modify:!!a,predicate:t.ns.foaf(`knows`),noun:`friend`,refreshOnDocumentLoad:!1,renderSupportingInfo:o,renderNameSuffix:s});u.classList.add(`social-friends-list`),u.style.marginTop=`0`;let d=u.querySelector(`tr`),f=d?.children?.[0],p=d?.children?.[1],m=n.createElement(`div`);if(m.classList.add(`social-friends-header-actions`),f instanceof HTMLTableCellElement){f.classList.add(`social-friends-header-dropzone-cell`);let e=n.createElement(`table`);e.className=`social-friends-header-dropzone`,e.setAttribute(`role`,`presentation`),e.appendChild(n.createElement(`tbody`)).appendChild(n.createElement(`tr`)).appendChild(f),m.appendChild(e)}else if(f instanceof HTMLElement){for(;f.firstChild;)m.appendChild(f.firstChild);f.remove()}let h=m.querySelectorAll(`button`);if(a&&h.length>0){h.forEach(e=>{e.setAttribute(`title`,`Drop friend here`),e.setAttribute(`aria-label`,`Drop friend here`),e.querySelectorAll(`img`).forEach(e=>{e.setAttribute(`title`,`Drop friend here`),e.setAttribute(`alt`,`Drop friend here`)})});let e=n.createElement(`div`);e.className=`social-friends-header-actions social-friends-header-actions--standalone`,e.appendChild(m);let t=n.createElement(`span`);t.className=`social-friends-header-hint`,t.textContent=`Drag a WebId on the target to add a friend.`,e.appendChild(t),c.prepend(e)}p instanceof HTMLTableCellElement&&(p.colSpan=2);let g=u.querySelector(`td table`);return g instanceof HTMLTableElement&&g.classList.add(`social-friends-grid`),{section:c,mainTable:l,friendsList:u}}function c(e){let{dom:n,triage:r,renderSupportingInfo:i,renderNameSuffix:a}=e,o=n.createElement(`section`);o.className=`social-pane__requests social-primary__panel`,o.id=`social-panel-requests`,o.setAttribute(`role`,`tabpanel`),o.setAttribute(`aria-labelledby`,`social-tab-requests`);let s=o.appendChild(n.createElement(`div`));s.classList.add(`social-main`,`social-main--requests`,`flex-column`);let c=s.appendChild(n.createElement(`p`));c.className=`social-requests__note`,c.textContent=`Best effort preview: this view only reflects profile documents that are currently loaded. A dedicated inbox would still be needed for complete request discovery.`;let l=function(e,t,r){let i=s.appendChild(n.createElement(`section`));i.classList.add(`social-requests__group`,`flex-column`);let a=i.appendChild(n.createElement(`div`));a.className=`social-requests__group-header`;let o=a.appendChild(n.createElement(`h2`));o.className=`social-requests__group-title`,o.textContent=e;let c=a.appendChild(n.createElement(`p`));c.className=`social-requests__group-description`,c.textContent=t;let l=i.appendChild(n.createElement(`p`));l.className=`social-requests__empty`,l.textContent=r;let u=i.appendChild(n.createElement(`table`));return u.className=`social-main social-friends-list social-friends-grid social-requests__table`,{empty:l,table:u}},u=l(`Incoming requests`,`People who say they know this profile, but have not been confirmed yet.`,`No incoming requests are visible from the currently loaded data.`),d=l(`Awaiting confirmation`,`People this profile knows who have not linked back yet.`,`Nothing is waiting for confirmation right now.`),f=function(e){return t.widgets.personTR(n,t.ns.foaf(`knows`),e,{renderSupportingInfo:i,renderNameSuffix:a})},p=function(e){return[...e].sort((e,n)=>{let r=t.utils.label(e)||e.value,i=t.utils.label(n)||n.value;return r.localeCompare(i)})},m=function(e,n){let r=p(n);e.empty.hidden=r.length>0,e.table.hidden=r.length===0,t.utils.syncTableToArray(e.table,r,f,function(e,t){return f(t)})},h=function(e){m(u,e.requests),m(d,e.unconfirmed)};return h(r),{section:o,refreshRequests:h}}exports.createAllFriendsSection=s,exports.createHeaderSection=i,exports.createMutualSection=o,exports.createRequestsSection=c;
|
|
2
2
|
//# sourceMappingURL=socialSections.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socialSections.cjs.js","names":[],"sources":["../../src/social/socialSections.ts"],"sourcesContent":["import { DataBrowserContext } from 'pane-registry'\nimport { createAddMeToYourFriendsButton } from 'profile-pane'\nimport { Statement, NamedNode } from 'rdflib'\nimport { ns, utils, widgets } from 'solid-ui'\nimport { appendProfileLinks } from './editProfileDetails'\nimport { locationIcon, personInCircleIcon as personInCircleIconSvg } from './icons'\nimport { FriendshipTriage } from './triage'\n\nexport type ViewerMode = 'owner' | 'authenticated' | 'anonymous'\n\nexport type HeaderControls = {\n canEdit: boolean,\n viewerMode: ViewerMode,\n showAddFriendAction?: boolean\n}\n\nexport type SocialHeaderElement = HTMLElement & {\n refreshSocialHeader?: (controls: HeaderControls) => void\n}\n\nexport type HeaderStats = {\n friendCount: number,\n mutualFriendCount: number | null,\n onSelectFriends?: () => void,\n onSelectMutual?: () => void\n}\n\nexport type HeaderProfileData = {\n imageUrl?: string,\n name?: string,\n jobTitle?: string,\n organization?: string,\n location?: string | null\n} | null\n\nexport type FriendRowRenderers = {\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}\n\nexport function createHeaderSection (\n context: DataBrowserContext,\n subject: NamedNode,\n controls: HeaderControls,\n stats: HeaderStats,\n getProfileData: () => HeaderProfileData\n): SocialHeaderElement {\n const dom = context.dom\n const kb = context.session.store\n const header = dom.createElement('header') as SocialHeaderElement\n header.className = 'social-pane__header'\n let headerControls = controls\n\n const renderHeader = function () {\n header.replaceChildren()\n const profileData = getProfileData()\n\n const headerContent = dom.createElement('div')\n headerContent.className = 'social-pane__header-content'\n\n const headerActions = dom.createElement('div')\n headerActions.className = 'social-pane__header-actions profile__actions profile__heading-actions'\n\n if (headerControls.canEdit) {\n // Hidden for now because the social pane header edit control does not match the new design.\n // Revisit later if we decide to restore profile-link editing here.\n } else if (headerControls.viewerMode === 'authenticated' && headerControls.showAddFriendAction) {\n headerActions.classList.add('social-pane__header-actions--friend')\n const addToFriendsButton = createAddMeToYourFriendsButton(subject, context)\n addToFriendsButton.classList.add('flex-center')\n headerActions.appendChild(addToFriendsButton)\n }\n\n header.appendChild(headerContent)\n\n const headerMedia = dom.createElement('div')\n headerMedia.className = 'social-pane__header-media'\n headerContent.appendChild(headerMedia)\n\n if (profileData) {\n headerMedia.appendChild(createImage(dom, profileData.imageUrl, profileData.name))\n }\n\n const headerDetails = dom.createElement('div')\n headerDetails.className = 'social-pane__header-details'\n headerContent.appendChild(headerDetails)\n\n if (headerActions.childNodes.length > 0) {\n headerContent.appendChild(headerActions)\n }\n\n const headerSummary = dom.createElement('div')\n headerSummary.classList.add('social-pane__header-summary', 'flex-column')\n headerDetails.appendChild(headerSummary)\n\n const name = profileData?.name || utils.label(subject)\n const h1 = dom.createElement('h1')\n h1.classList.add('social-pane__header-name')\n h1.appendChild(dom.createTextNode(name))\n headerSummary.appendChild(h1)\n\n const jobAndOrganization = [profileData?.jobTitle, profileData?.organization].filter(Boolean).join(' | ')\n if (jobAndOrganization) {\n const jobLine = dom.createElement('div')\n jobLine.className = 'social-pane__header-job-org'\n jobLine.textContent = jobAndOrganization\n headerSummary.appendChild(jobLine)\n }\n\n if (profileData?.location) {\n const locationLine = dom.createElement('div')\n locationLine.className = 'social-pane__header-location'\n\n const locationIconSpan = dom.createElement('span')\n locationIconSpan.classList.add('social-pane__header-location-icon', 'inline-flex-row')\n locationIconSpan.innerHTML = locationIcon\n locationLine.appendChild(locationIconSpan)\n locationLine.appendChild(dom.createTextNode(profileData.location))\n\n headerSummary.appendChild(locationLine)\n }\n\n const statsRow = dom.createElement('div')\n statsRow.className = 'social-pane__header-stats'\n\n const friendCount = dom.createElement('button')\n friendCount.className = 'social-pane__header-stat'\n friendCount.type = 'button'\n const friendCountLabel = dom.createElement('span')\n friendCountLabel.className = 'social-pane__header-stat-label'\n friendCountLabel.textContent = `${stats.friendCount} friend${stats.friendCount === 1 ? '' : 's'}`\n friendCount.appendChild(friendCountLabel)\n if (stats.onSelectFriends) {\n friendCount.addEventListener('click', stats.onSelectFriends)\n }\n statsRow.appendChild(friendCount)\n\n if (typeof stats.mutualFriendCount === 'number') {\n const mutualCount = dom.createElement('button')\n mutualCount.className = 'social-pane__header-stat'\n mutualCount.type = 'button'\n const mutualCountLabel = dom.createElement('span')\n mutualCountLabel.className = 'social-pane__header-stat-label'\n mutualCountLabel.textContent = `${stats.mutualFriendCount} mutual friend${stats.mutualFriendCount === 1 ? '' : 's'}`\n mutualCount.appendChild(mutualCountLabel)\n if (stats.onSelectMutual) {\n mutualCount.addEventListener('click', stats.onSelectMutual)\n }\n statsRow.appendChild(mutualCount)\n }\n\n headerSummary.appendChild(statsRow)\n appendProfileLinks(headerMedia, dom, kb, subject)\n }\n\n header.refreshSocialHeader = function (nextControls: HeaderControls) {\n headerControls = nextControls\n renderHeader()\n }\n\n renderHeader()\n\n return header\n}\n\nfunction createImage (dom: HTMLDocument, src: string | null | undefined, alt = ''): HTMLElement {\n if (src) {\n const img = dom.createElement('img')\n img.className = 'social-pane__header-hero'\n img.src = src\n img.alt = alt\n img.width = 180\n img.height = 180\n img.loading = 'eager'\n return img\n }\n\n const fallback = dom.createElement('div')\n fallback.className = 'social-pane__header-hero-alt flex-center'\n fallback.setAttribute('role', 'img')\n fallback.setAttribute('aria-label', alt)\n fallback.tabIndex = 0\n\n const icon = dom.createElement('span')\n icon.classList.add('social-pane__header-hero-icon', 'inline-flex-row')\n icon.innerHTML = personInCircleIconSvg\n fallback.appendChild(icon)\n\n return fallback\n}\n\nexport function createMutualSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n familiar: string,\n me: NamedNode,\n meUri: string | null,\n incoming: boolean | NamedNode[] | undefined,\n outgoing: boolean | NamedNode[] | undefined,\n editable: boolean,\n profile: NamedNode | null,\n knows: NamedNode,\n mutualConnections: NamedNode[],\n link: (contents: Node, uri: string | null | undefined) => Node,\n text: (value: string) => Text,\n buildCheckboxForm: (\n label: string | Node,\n statement: Statement,\n state: boolean,\n options?: { disabled?: boolean, disabledTitle?: string }\n ) => HTMLElement,\n renderSupportingInfo: FriendRowRenderers['renderSupportingInfo'],\n renderNameSuffix: FriendRowRenderers['renderNameSuffix']\n}): { section: HTMLElement, content: HTMLElement, refreshMutualFriends: () => void } {\n const {\n dom,\n subject,\n familiar,\n me,\n meUri,\n incoming,\n outgoing,\n editable,\n profile,\n knows,\n mutualConnections,\n link,\n text,\n buildCheckboxForm,\n renderSupportingInfo,\n renderNameSuffix\n } = options\n\n let refreshMutualFriends = function () {}\n\n const mutualSection = dom.createElement('section')\n mutualSection.className = 'social-pane__mutual-friends social-primary__panel'\n mutualSection.id = 'social-panel-mutual'\n mutualSection.setAttribute('role', 'tabpanel')\n mutualSection.setAttribute('aria-labelledby', 'social-tab-mutual')\n\n const mutualContent = mutualSection.appendChild(dom.createElement('div'))\n mutualContent.classList.add('social-main', 'social-main--mutual', 'flex-column')\n\n const relationshipSummary = dom.createElement('div')\n relationshipSummary.classList.add('social-mutual-summary', 'flex-column')\n mutualContent.appendChild(relationshipSummary)\n\n const createRelationshipLine = function () {\n const line = relationshipSummary.appendChild(dom.createElement('div'))\n line.classList.add('social-mutual-summary-line')\n return line\n }\n\n const youAndThem = function () {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' and '))\n line.appendChild(link(text(familiar), subject.uri))\n return line\n }\n\n if (!incoming) {\n if (!outgoing) {\n const line = youAndThem()\n line.appendChild(text(' have not said you know each other.'))\n } else {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' know '))\n line.appendChild(link(text(familiar), subject.uri))\n line.appendChild(text(' (unconfirmed).'))\n }\n } else if (!outgoing) {\n relationshipSummary.classList.add('social-mutual-summary--confirm')\n\n const incomingLine = relationshipSummary.appendChild(dom.createElement('div'))\n incomingLine.classList.add('social-mutual-summary-line')\n incomingLine.appendChild(link(text(familiar), subject.uri))\n incomingLine.appendChild(text(' knows '))\n incomingLine.appendChild(link(text('you'), meUri))\n incomingLine.appendChild(text(' (unconfirmed).'))\n } else {\n const line = youAndThem()\n line.appendChild(text(' say you know each other.'))\n }\n\n const shouldShowCheckboxPreview = Boolean(incoming) && !outgoing\n if (shouldShowCheckboxPreview) {\n const confirmLabel = dom.createElement('span')\n confirmLabel.className = 'social-mutual-confirm-prompt'\n confirmLabel.appendChild(text('Confirm you know '))\n confirmLabel.appendChild(link(text(familiar), subject.uri))\n\n const relationshipForm = buildCheckboxForm(\n confirmLabel,\n new Statement(me, knows, subject, profile ?? undefined),\n Boolean(outgoing),\n {\n disabled: !editable,\n disabledTitle: !editable ? 'Your profile is not editable' : undefined\n }\n )\n relationshipForm.classList.add('social-mutual-checkbox-form')\n\n mutualContent.appendChild(relationshipForm)\n }\n\n if (mutualConnections.length) {\n const mutualFriendsTable = mutualContent.appendChild(dom.createElement('table'))\n mutualFriendsTable.className = 'social-main social-friends-list social-friends-grid'\n\n const createMutualRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n refreshMutualFriends = function () {\n const sortedMutualConnections = [...mutualConnections].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n\n utils.syncTableToArray(\n mutualFriendsTable,\n sortedMutualConnections,\n createMutualRow,\n function (row, thing) {\n const replacement = createMutualRow(thing)\n return replacement\n }\n )\n }\n\n refreshMutualFriends()\n }\n\n return { section: mutualSection, content: mutualContent, refreshMutualFriends }\n}\n\nexport function createAllFriendsSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n profile: NamedNode | null,\n editable: boolean,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, mainTable: HTMLTableElement, friendsList: HTMLElement } {\n const { dom, subject, profile, editable, renderSupportingInfo, renderNameSuffix } = options\n\n const allFriends = dom.createElement('section')\n allFriends.className = 'social-pane__all-friends social-primary__panel'\n allFriends.id = 'social-panel-all-friends'\n allFriends.setAttribute('role', 'tabpanel')\n allFriends.setAttribute('aria-labelledby', 'social-tab-all-friends')\n\n const mainTable = allFriends.appendChild(dom.createElement('table'))\n mainTable.className = 'social-main'\n\n const friendsList = widgets.attachmentList(dom, subject, mainTable, {\n doc: profile,\n modify: !!editable,\n predicate: ns.foaf('knows'),\n noun: 'friend',\n // Social pane already owns the async refresh cycle for friend data in\n // socialPane.ts. Leave attachmentList's generic follow-up rerender disabled\n // here or each fetched friend profile will trigger an extra whole-table refresh\n // on top of the pane's own batched updates.\n refreshOnDocumentLoad: false,\n renderSupportingInfo,\n renderNameSuffix\n })\n friendsList.classList.add('social-friends-list')\n friendsList.style.marginTop = '0'\n\n const friendsListRow = friendsList.querySelector('tr')\n const friendsListPromptCell = friendsListRow?.children?.[0]\n const friendsListRightCell = friendsListRow?.children?.[1]\n const friendsHeaderActions = dom.createElement('div')\n friendsHeaderActions.classList.add('social-friends-header-actions')\n\n if (friendsListPromptCell instanceof HTMLTableCellElement) {\n friendsListPromptCell.classList.add('social-friends-header-dropzone-cell')\n const friendsHeaderDropzone = dom.createElement('table')\n friendsHeaderDropzone.className = 'social-friends-header-dropzone'\n friendsHeaderDropzone.setAttribute('role', 'presentation')\n const friendsHeaderDropzoneBody = friendsHeaderDropzone.appendChild(dom.createElement('tbody'))\n const friendsHeaderDropzoneRow = friendsHeaderDropzoneBody.appendChild(dom.createElement('tr'))\n friendsHeaderDropzoneRow.appendChild(friendsListPromptCell)\n friendsHeaderActions.appendChild(friendsHeaderDropzone)\n } else if (friendsListPromptCell instanceof HTMLElement) {\n while (friendsListPromptCell.firstChild) {\n friendsHeaderActions.appendChild(friendsListPromptCell.firstChild)\n }\n friendsListPromptCell.remove()\n }\n\n const friendDropButtons = friendsHeaderActions.querySelectorAll('button')\n if (editable && friendDropButtons.length > 0) {\n friendDropButtons.forEach((button) => {\n button.setAttribute('title', 'Drop friend here')\n button.setAttribute('aria-label', 'Drop friend here')\n const buttonImages = button.querySelectorAll('img')\n buttonImages.forEach((image) => {\n image.setAttribute('title', 'Drop friend here')\n image.setAttribute('alt', 'Drop friend here')\n })\n })\n\n const friendsActionsRow = dom.createElement('div')\n friendsActionsRow.className = 'social-friends-header-actions social-friends-header-actions--standalone'\n friendsActionsRow.appendChild(friendsHeaderActions)\n const dropHint = dom.createElement('span')\n dropHint.className = 'social-friends-header-hint'\n dropHint.textContent = 'Drag a WebId on the target to add a friend.'\n friendsActionsRow.appendChild(dropHint)\n allFriends.prepend(friendsActionsRow)\n }\n\n if (friendsListRightCell instanceof HTMLTableCellElement) {\n friendsListRightCell.colSpan = 2\n }\n\n const friendsItemsTable = friendsList.querySelector('td table')\n if (friendsItemsTable instanceof HTMLTableElement) {\n friendsItemsTable.classList.add('social-friends-grid')\n }\n\n return { section: allFriends, mainTable, friendsList }\n}\n\nexport function createRequestsSection (options: {\n dom: HTMLDocument,\n triage: FriendshipTriage,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, refreshRequests: (triage: FriendshipTriage) => void } {\n const { dom, triage, renderSupportingInfo, renderNameSuffix } = options\n\n const requestsSection = dom.createElement('section')\n requestsSection.className = 'social-pane__requests social-primary__panel'\n requestsSection.id = 'social-panel-requests'\n requestsSection.setAttribute('role', 'tabpanel')\n requestsSection.setAttribute('aria-labelledby', 'social-tab-requests')\n\n const requestsContent = requestsSection.appendChild(dom.createElement('div'))\n requestsContent.classList.add('social-main', 'social-main--requests', 'flex-column')\n\n const note = requestsContent.appendChild(dom.createElement('p'))\n note.className = 'social-requests__note'\n note.textContent = 'Best effort preview: this view only reflects profile documents that are currently loaded. A dedicated inbox would still be needed for complete request discovery.'\n\n const createRequestGroup = function (title: string, description: string, emptyText: string) {\n const group = requestsContent.appendChild(dom.createElement('section'))\n group.classList.add('social-requests__group', 'flex-column')\n\n const header = group.appendChild(dom.createElement('div'))\n header.className = 'social-requests__group-header'\n\n const heading = header.appendChild(dom.createElement('h2'))\n heading.className = 'social-requests__group-title'\n heading.textContent = title\n\n const blurb = header.appendChild(dom.createElement('p'))\n blurb.className = 'social-requests__group-description'\n blurb.textContent = description\n\n const empty = group.appendChild(dom.createElement('p'))\n empty.className = 'social-requests__empty'\n empty.textContent = emptyText\n\n const table = group.appendChild(dom.createElement('table'))\n table.className = 'social-main social-friends-list social-friends-grid social-requests__table'\n\n return { empty, table }\n }\n\n const incomingGroup = createRequestGroup(\n 'Incoming requests',\n 'People who say they know this profile, but have not been confirmed yet.',\n 'No incoming requests are visible from the currently loaded data.'\n )\n const pendingGroup = createRequestGroup(\n 'Awaiting confirmation',\n 'People this profile knows who have not linked back yet.',\n 'Nothing is waiting for confirmation right now.'\n )\n\n const createPersonRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n const sortNodes = function (nodes: NamedNode[]) {\n return [...nodes].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n }\n\n const syncRequestGroup = function (\n group: { empty: HTMLElement, table: HTMLTableElement },\n nodes: NamedNode[]\n ) {\n const sortedNodes = sortNodes(nodes)\n group.empty.hidden = sortedNodes.length > 0\n group.table.hidden = sortedNodes.length === 0\n\n utils.syncTableToArray(\n group.table,\n sortedNodes,\n createPersonRow,\n function (_row, thing) {\n return createPersonRow(thing)\n }\n )\n }\n\n const refreshRequests = function (nextTriage: FriendshipTriage) {\n syncRequestGroup(incomingGroup, nextTriage.requests)\n syncRequestGroup(pendingGroup, nextTriage.unconfirmed)\n }\n\n refreshRequests(triage)\n\n return { section: requestsSection, refreshRequests }\n}\n"],"mappings":"iJAwCA,SAAgB,EACd,EACA,EACA,EACA,EACA,EACqB,CACrB,IAAM,EAAM,EAAQ,IACT,EAAQ,QAAQ,MAD3B,IAEM,EAAS,EAAI,cAAc,QAAQ,EACzC,EAAO,UAAY,sBACnB,IAAI,EAAiB,EAEf,EAAe,UAAY,CAC/B,EAAO,gBAAgB,EACvB,IAAM,EAAc,EAAe,EAE7B,EAAgB,EAAI,cAAc,KAAK,EAC7C,EAAc,UAAY,8BAE1B,IAAM,EAAgB,EAAI,cAAc,KAAK,EAG7C,GAFA,EAAc,UAAY,wEAEtB,GAAe,SAGR,EAAe,aAAe,iBAAmB,EAAe,oBAAqB,CAC9F,EAAc,UAAU,I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EAAY,SAAW,EAE5C,EAAA,MAAM,iBACJ,EAAM,MACN,EACA,EACA,SAAU,EAAM,EAAO,CACrB,OAAO,EAAgB,CAAK,CAC9B,CACF,CACF,EAEM,EAAkB,SAAU,EAA8B,CAC9D,EAAiB,EAAe,EAAW,QAAQ,EACnD,EAAiB,EAAc,EAAW,WAAW,CACvD,EAIA,OAFA,EAAgB,CAAM,EAEf,CAAE,QAAS,EAAiB,iBAAgB,CACrD"}
|
|
1
|
+
{"version":3,"file":"socialSections.cjs.js","names":[],"sources":["../../src/social/socialSections.ts"],"sourcesContent":["import { DataBrowserContext } from 'pane-registry'\nimport { createAddMeToYourFriendsButton } from 'profile-pane'\nimport { Statement, NamedNode } from 'rdflib'\nimport { ns, utils, widgets } from 'solid-ui'\nimport { appendProfileLinks } from './editProfileDetails'\nimport { locationIcon, personInCircleIcon as personInCircleIconSvg } from './icons'\nimport { FriendshipTriage } from './triage'\n\nexport type ViewerMode = 'owner' | 'authenticated' | 'anonymous'\n\nexport type HeaderControls = {\n canEdit: boolean,\n viewerMode: ViewerMode,\n showAddFriendAction?: boolean\n}\n\nexport type SocialHeaderElement = HTMLElement & {\n refreshSocialHeader?: (controls: HeaderControls) => void\n}\n\nexport type HeaderStats = {\n friendCount: number,\n mutualFriendCount: number | null,\n onSelectFriends?: () => void,\n onSelectMutual?: () => void\n}\n\nexport type HeaderProfileData = {\n imageUrl?: string,\n name?: string,\n jobTitle?: string,\n organization?: string,\n location?: string | null\n} | null\n\nexport type FriendRowRenderers = {\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}\n\nexport function createHeaderSection (\n context: DataBrowserContext,\n subject: NamedNode,\n controls: HeaderControls,\n stats: HeaderStats,\n getProfileData: () => HeaderProfileData\n): SocialHeaderElement {\n const dom = context.dom\n const kb = context.session.store\n const header = dom.createElement('header') as SocialHeaderElement\n header.className = 'social-pane__header'\n let headerControls = controls\n\n const renderHeader = function () {\n header.replaceChildren()\n const profileData = getProfileData()\n\n const headerContent = dom.createElement('div')\n headerContent.className = 'social-pane__header-content'\n\n const headerActions = dom.createElement('div')\n headerActions.className = 'social-pane__header-actions profile__actions profile__heading-actions'\n\n if (headerControls.canEdit) {\n // Hidden for now because the social pane header edit control does not match the new design.\n // Revisit later if we decide to restore profile-link editing here.\n } else if (headerControls.viewerMode === 'authenticated' && headerControls.showAddFriendAction) {\n headerActions.classList.add('social-pane__header-actions--friend')\n const addToFriendsButton = createAddMeToYourFriendsButton(subject, context)\n addToFriendsButton.classList.add('flex-center')\n headerActions.appendChild(addToFriendsButton)\n }\n\n header.appendChild(headerContent)\n\n const headerMedia = dom.createElement('div')\n headerMedia.className = 'social-pane__header-media'\n headerContent.appendChild(headerMedia)\n\n if (profileData) {\n headerMedia.appendChild(createImage(dom, profileData.imageUrl, profileData.name))\n }\n\n const headerDetails = dom.createElement('div')\n headerDetails.className = 'social-pane__header-details'\n headerContent.appendChild(headerDetails)\n\n if (headerActions.childNodes.length > 0) {\n headerContent.appendChild(headerActions)\n }\n\n const headerSummary = dom.createElement('div')\n headerSummary.classList.add('social-pane__header-summary', 'flex-column')\n headerDetails.appendChild(headerSummary)\n\n const name = profileData?.name || utils.label(subject)\n const h1 = dom.createElement('h1')\n h1.classList.add('social-pane__header-name')\n h1.appendChild(dom.createTextNode(name))\n headerSummary.appendChild(h1)\n\n const jobAndOrganization = [profileData?.jobTitle, profileData?.organization].filter(Boolean).join(' | ')\n if (jobAndOrganization) {\n const jobLine = dom.createElement('div')\n jobLine.className = 'social-pane__header-job-org'\n jobLine.textContent = jobAndOrganization\n headerSummary.appendChild(jobLine)\n }\n\n if (profileData?.location) {\n const locationLine = dom.createElement('div')\n locationLine.className = 'social-pane__header-location'\n\n const locationIconSpan = dom.createElement('span')\n locationIconSpan.classList.add('social-pane__header-location-icon', 'inline-flex-row')\n locationIconSpan.innerHTML = locationIcon\n locationLine.appendChild(locationIconSpan)\n locationLine.appendChild(dom.createTextNode(profileData.location))\n\n headerSummary.appendChild(locationLine)\n }\n\n const statsRow = dom.createElement('div')\n statsRow.className = 'social-pane__header-stats'\n\n const friendCount = dom.createElement('button')\n friendCount.className = 'social-pane__header-stat'\n friendCount.type = 'button'\n const friendCountLabel = dom.createElement('span')\n friendCountLabel.className = 'social-pane__header-stat-label'\n friendCountLabel.textContent = `${stats.friendCount} friend${stats.friendCount === 1 ? '' : 's'}`\n friendCount.appendChild(friendCountLabel)\n if (stats.onSelectFriends) {\n friendCount.addEventListener('click', stats.onSelectFriends)\n }\n statsRow.appendChild(friendCount)\n\n if (typeof stats.mutualFriendCount === 'number') {\n const mutualCount = dom.createElement('button')\n mutualCount.className = 'social-pane__header-stat'\n mutualCount.type = 'button'\n const mutualCountLabel = dom.createElement('span')\n mutualCountLabel.className = 'social-pane__header-stat-label'\n mutualCountLabel.textContent = `${stats.mutualFriendCount} mutual friend${stats.mutualFriendCount === 1 ? '' : 's'}`\n mutualCount.appendChild(mutualCountLabel)\n if (stats.onSelectMutual) {\n mutualCount.addEventListener('click', stats.onSelectMutual)\n }\n statsRow.appendChild(mutualCount)\n }\n\n headerSummary.appendChild(statsRow)\n appendProfileLinks(headerMedia, dom, kb, subject)\n }\n\n header.refreshSocialHeader = function (nextControls: HeaderControls) {\n headerControls = nextControls\n renderHeader()\n }\n\n renderHeader()\n\n return header\n}\n\nfunction createImage (dom: HTMLDocument, src: string | null | undefined, alt = ''): HTMLElement {\n if (src) {\n const img = dom.createElement('img')\n img.className = 'social-pane__header-hero'\n img.src = src\n img.alt = alt\n img.width = 180\n img.height = 180\n img.loading = 'eager'\n return img\n }\n\n const fallback = dom.createElement('div')\n fallback.className = 'social-pane__header-hero-alt flex-center'\n fallback.setAttribute('role', 'img')\n fallback.setAttribute('aria-label', alt)\n fallback.tabIndex = 0\n\n const icon = dom.createElement('span')\n icon.classList.add('social-pane__header-hero-icon', 'inline-flex-row')\n icon.innerHTML = personInCircleIconSvg\n fallback.appendChild(icon)\n\n return fallback\n}\n\nexport function createMutualSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n familiar: string,\n me: NamedNode,\n meUri: string | null,\n incoming: boolean | NamedNode[] | undefined,\n outgoing: boolean | NamedNode[] | undefined,\n editable: boolean,\n profile: NamedNode | null,\n knows: NamedNode,\n mutualConnections: NamedNode[],\n link: (contents: Node, uri: string | null | undefined) => Node,\n text: (value: string) => Text,\n buildCheckboxForm: (\n label: string | Node,\n statement: Statement,\n state: boolean,\n options?: { disabled?: boolean, disabledTitle?: string }\n ) => HTMLElement,\n renderSupportingInfo: FriendRowRenderers['renderSupportingInfo'],\n renderNameSuffix: FriendRowRenderers['renderNameSuffix']\n}): { section: HTMLElement, content: HTMLElement, refreshMutualFriends: () => void } {\n const {\n dom,\n subject,\n familiar,\n me,\n meUri,\n incoming,\n outgoing,\n editable,\n profile,\n knows,\n mutualConnections,\n link,\n text,\n buildCheckboxForm,\n renderSupportingInfo,\n renderNameSuffix\n } = options\n\n let refreshMutualFriends = function () {}\n\n const mutualSection = dom.createElement('section')\n mutualSection.className = 'social-pane__mutual-friends social-primary__panel'\n mutualSection.id = 'social-panel-mutual'\n mutualSection.setAttribute('role', 'tabpanel')\n mutualSection.setAttribute('aria-labelledby', 'social-tab-mutual')\n\n const mutualContent = mutualSection.appendChild(dom.createElement('div'))\n mutualContent.classList.add('social-main', 'social-main--mutual', 'flex-column')\n\n const relationshipSummary = dom.createElement('div')\n relationshipSummary.classList.add('social-mutual-summary', 'flex-column')\n mutualContent.appendChild(relationshipSummary)\n\n const createRelationshipLine = function () {\n const line = relationshipSummary.appendChild(dom.createElement('div'))\n line.classList.add('social-mutual-summary-line')\n return line\n }\n\n const youAndThem = function () {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' and '))\n line.appendChild(link(text(familiar), subject.uri))\n return line\n }\n\n if (!incoming) {\n if (!outgoing) {\n const line = youAndThem()\n line.appendChild(text(' have not said you know each other.'))\n } else {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' know '))\n line.appendChild(link(text(familiar), subject.uri))\n line.appendChild(text(' (unconfirmed).'))\n }\n } else if (!outgoing) {\n relationshipSummary.classList.add('social-mutual-summary--confirm')\n\n const incomingLine = relationshipSummary.appendChild(dom.createElement('div'))\n incomingLine.classList.add('social-mutual-summary-line')\n incomingLine.appendChild(link(text(familiar), subject.uri))\n incomingLine.appendChild(text(' knows '))\n incomingLine.appendChild(link(text('you'), meUri))\n incomingLine.appendChild(text(' (unconfirmed).'))\n } else {\n const line = youAndThem()\n line.appendChild(text(' say you know each other.'))\n }\n\n const shouldShowCheckboxPreview = Boolean(incoming) && !outgoing\n if (shouldShowCheckboxPreview) {\n const confirmLabel = dom.createElement('span')\n confirmLabel.className = 'social-mutual-confirm-prompt'\n confirmLabel.appendChild(text('Confirm you know '))\n confirmLabel.appendChild(link(text(familiar), subject.uri))\n\n const relationshipForm = buildCheckboxForm(\n confirmLabel,\n new Statement(me, knows, subject, profile ?? undefined),\n Boolean(outgoing),\n {\n disabled: !editable,\n disabledTitle: !editable ? 'Your profile is not editable' : undefined\n }\n )\n relationshipForm.classList.add('social-mutual-checkbox-form')\n\n mutualContent.appendChild(relationshipForm)\n }\n\n if (mutualConnections.length) {\n const mutualFriendsTable = mutualContent.appendChild(dom.createElement('table'))\n mutualFriendsTable.className = 'social-main social-friends-list social-friends-grid'\n\n const createMutualRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n refreshMutualFriends = function () {\n const sortedMutualConnections = [...mutualConnections].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n\n utils.syncTableToArray(\n mutualFriendsTable,\n sortedMutualConnections,\n createMutualRow,\n function (row, thing) {\n const replacement = createMutualRow(thing)\n return replacement\n }\n )\n }\n\n refreshMutualFriends()\n }\n\n return { section: mutualSection, content: mutualContent, refreshMutualFriends }\n}\n\nexport function createAllFriendsSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n profile: NamedNode | null,\n editable: boolean,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, mainTable: HTMLTableElement, friendsList: HTMLElement } {\n const { dom, subject, profile, editable, renderSupportingInfo, renderNameSuffix } = options\n\n const allFriends = dom.createElement('section')\n allFriends.className = 'social-pane__all-friends social-primary__panel'\n allFriends.id = 'social-panel-all-friends'\n allFriends.setAttribute('role', 'tabpanel')\n allFriends.setAttribute('aria-labelledby', 'social-tab-all-friends')\n\n const mainTable = allFriends.appendChild(dom.createElement('table'))\n mainTable.className = 'social-main'\n\n const friendsList = widgets.attachmentList(dom, subject, mainTable, {\n doc: profile,\n modify: !!editable,\n predicate: ns.foaf('knows'),\n noun: 'friend',\n // Social pane already owns the async refresh cycle for friend data in\n // socialPane.ts. Leave attachmentList's generic follow-up rerender disabled\n // here or each fetched friend profile will trigger an extra whole-table refresh\n // on top of the pane's own batched updates.\n refreshOnDocumentLoad: false,\n renderSupportingInfo,\n renderNameSuffix\n })\n friendsList.classList.add('social-friends-list')\n friendsList.style.marginTop = '0'\n\n const friendsListRow = friendsList.querySelector('tr')\n const friendsListPromptCell = friendsListRow?.children?.[0]\n const friendsListRightCell = friendsListRow?.children?.[1]\n const friendsHeaderActions = dom.createElement('div')\n friendsHeaderActions.classList.add('social-friends-header-actions')\n\n if (friendsListPromptCell instanceof HTMLTableCellElement) {\n friendsListPromptCell.classList.add('social-friends-header-dropzone-cell')\n const friendsHeaderDropzone = dom.createElement('table')\n friendsHeaderDropzone.className = 'social-friends-header-dropzone'\n friendsHeaderDropzone.setAttribute('role', 'presentation')\n const friendsHeaderDropzoneBody = friendsHeaderDropzone.appendChild(dom.createElement('tbody'))\n const friendsHeaderDropzoneRow = friendsHeaderDropzoneBody.appendChild(dom.createElement('tr'))\n friendsHeaderDropzoneRow.appendChild(friendsListPromptCell)\n friendsHeaderActions.appendChild(friendsHeaderDropzone)\n } else if (friendsListPromptCell instanceof HTMLElement) {\n while (friendsListPromptCell.firstChild) {\n friendsHeaderActions.appendChild(friendsListPromptCell.firstChild)\n }\n friendsListPromptCell.remove()\n }\n\n const friendDropButtons = friendsHeaderActions.querySelectorAll('button')\n if (editable && friendDropButtons.length > 0) {\n friendDropButtons.forEach((button) => {\n button.setAttribute('title', 'Drop friend here')\n button.setAttribute('aria-label', 'Drop friend here')\n const buttonImages = button.querySelectorAll('img')\n buttonImages.forEach((image) => {\n image.setAttribute('title', 'Drop friend here')\n image.setAttribute('alt', 'Drop friend here')\n })\n })\n\n const friendsActionsRow = dom.createElement('div')\n friendsActionsRow.className = 'social-friends-header-actions social-friends-header-actions--standalone'\n friendsActionsRow.appendChild(friendsHeaderActions)\n const dropHint = dom.createElement('span')\n dropHint.className = 'social-friends-header-hint'\n dropHint.textContent = 'Drag a WebId on the target to add a friend.'\n friendsActionsRow.appendChild(dropHint)\n allFriends.prepend(friendsActionsRow)\n }\n\n if (friendsListRightCell instanceof HTMLTableCellElement) {\n friendsListRightCell.colSpan = 2\n }\n\n const friendsItemsTable = friendsList.querySelector('td table')\n if (friendsItemsTable instanceof HTMLTableElement) {\n friendsItemsTable.classList.add('social-friends-grid')\n }\n\n return { section: allFriends, mainTable, friendsList }\n}\n\nexport function createRequestsSection (options: {\n dom: HTMLDocument,\n triage: FriendshipTriage,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, refreshRequests: (triage: FriendshipTriage) => void } {\n const { dom, triage, renderSupportingInfo, renderNameSuffix } = options\n\n const requestsSection = dom.createElement('section')\n requestsSection.className = 'social-pane__requests social-primary__panel'\n requestsSection.id = 'social-panel-requests'\n requestsSection.setAttribute('role', 'tabpanel')\n requestsSection.setAttribute('aria-labelledby', 'social-tab-requests')\n\n const requestsContent = requestsSection.appendChild(dom.createElement('div'))\n requestsContent.classList.add('social-main', 'social-main--requests', 'flex-column')\n\n const note = requestsContent.appendChild(dom.createElement('p'))\n note.className = 'social-requests__note'\n note.textContent = 'Best effort preview: this view only reflects profile documents that are currently loaded. A dedicated inbox would still be needed for complete request discovery.'\n\n const createRequestGroup = function (title: string, description: string, emptyText: string) {\n const group = requestsContent.appendChild(dom.createElement('section'))\n group.classList.add('social-requests__group', 'flex-column')\n\n const header = group.appendChild(dom.createElement('div'))\n header.className = 'social-requests__group-header'\n\n const heading = header.appendChild(dom.createElement('h2'))\n heading.className = 'social-requests__group-title'\n heading.textContent = title\n\n const blurb = header.appendChild(dom.createElement('p'))\n blurb.className = 'social-requests__group-description'\n blurb.textContent = description\n\n const empty = group.appendChild(dom.createElement('p'))\n empty.className = 'social-requests__empty'\n empty.textContent = emptyText\n\n const table = group.appendChild(dom.createElement('table'))\n table.className = 'social-main social-friends-list social-friends-grid social-requests__table'\n\n return { empty, table }\n }\n\n const incomingGroup = createRequestGroup(\n 'Incoming requests',\n 'People who say they know this profile, but have not been confirmed yet.',\n 'No incoming requests are visible from the currently loaded data.'\n )\n const pendingGroup = createRequestGroup(\n 'Awaiting confirmation',\n 'People this profile knows who have not linked back yet.',\n 'Nothing is waiting for confirmation right now.'\n )\n\n const createPersonRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n const sortNodes = function (nodes: NamedNode[]) {\n return [...nodes].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n }\n\n const syncRequestGroup = function (\n group: { empty: HTMLElement, table: HTMLTableElement },\n nodes: NamedNode[]\n ) {\n const sortedNodes = sortNodes(nodes)\n group.empty.hidden = sortedNodes.length > 0\n group.table.hidden = sortedNodes.length === 0\n\n utils.syncTableToArray(\n group.table,\n sortedNodes,\n createPersonRow,\n function (_row, thing) {\n return createPersonRow(thing)\n }\n )\n }\n\n const refreshRequests = function (nextTriage: FriendshipTriage) {\n syncRequestGroup(incomingGroup, nextTriage.requests)\n syncRequestGroup(pendingGroup, nextTriage.unconfirmed)\n }\n\n refreshRequests(triage)\n\n return { section: requestsSection, refreshRequests }\n}\n"],"mappings":"iJAwCA,SAAgB,EACd,EACA,EACA,EACA,EACA,EACqB,CACrB,IAAM,EAAM,EAAQ,IACT,EAAQ,QAAQ,MAD3B,IAEM,EAAS,EAAI,cAAc,QAAQ,EACzC,EAAO,UAAY,sBACnB,IAAI,EAAiB,EAEf,EAAe,UAAY,CAC/B,EAAO,gBAAgB,EACvB,IAAM,EAAc,EAAe,EAE7B,EAAgB,EAAI,cAAc,KAAK,EAC7C,EAAc,UAAY,8BAE1B,IAAM,EAAgB,EAAI,cAAc,KAAK,EAG7C,GAFA,EAAc,UAAY,wEAEtB,GAAe,SAGR,EAAe,aAAe,iBAAmB,EAAe,oBAAqB,CAC9F,EAAc,UAAU,IAAI,qCAAqC,EACjE,IAAM,GAAA,EAAqB,EAAA,+BAAA,CAA+B,EAAS,CAAO,EAC1E,EAAmB,UAAU,IAAI,aAAa,EAC9C,EAAc,YAAY,CAAkB,CAC9C,CAEA,EAAO,YAAY,CAAa,EAEhC,IAAM,EAAc,EAAI,cAAc,KAAK,EAC3C,EAAY,UAAY,4BACxB,EAAc,YAAY,CAAW,EAEjC,GACF,EAAY,YAAY,EAAY,EAAK,EAAY,SAAU,EAAY,IAAI,CAAC,EAGlF,IAAM,EAAgB,EAAI,cAAc,KAAK,EAC7C,EAAc,UAAY,8BAC1B,EAAc,YAAY,CAAa,EAEnC,EAAc,WAAW,OAAS,GACpC,EAAc,YAAY,CAAa,EAGzC,IAAM,EAAgB,EAAI,cAAc,KAAK,EAC7C,EAAc,UAAU,IAAI,8BAA+B,aA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AAc,GAAG,CAAC,EACtD,EAAM,UAAY,yBAClB,EAAM,YAAc,EAEpB,IAAM,EAAQ,EAAM,YAAY,EAAI,cAAc,OAAO,CAAC,EAG1D,MAFA,GAAM,UAAY,6EAEX,CAAE,QAAO,OAAM,CACxB,EAEM,EAAgB,EACpB,oBACA,0EACA,kEACF,EACM,EAAe,EACnB,wBACA,0DACA,gDACF,EAEM,EAAkB,SAAU,EAAmB,CACnD,OAAO,EAAA,QAAQ,SAAS,EAAK,EAAA,GAAG,KAAK,OAAO,EAAG,EAAQ,CACrD,uBACA,kBACF,CAAC,CACH,EAEM,EAAY,SAAU,EAAoB,CAC9C,MAAO,CAAC,GAAG,CAAK,CAAC,CAAC,MAAM,EAAM,IAAU,CACtC,IAAM,EAAY,EAAA,MAAM,MAAM,CAAI,GAAK,EAAK,MACtC,EAAa,EAAA,MAAM,MAAM,CAAK,GAAK,EAAM,MAC/C,OAAO,EAAU,cAAc,CAAU,CAC3C,CAAC,CACH,EAEM,EAAmB,SACvB,EACA,EACA,CACA,IAAM,EAAc,EAAU,CAAK,EACnC,EAAM,MAAM,OAAS,EAAY,OAAS,EAC1C,EAAM,MAAM,OAAS,EAAY,SAAW,EAE5C,EAAA,MAAM,iBACJ,EAAM,MACN,EACA,EACA,SAAU,EAAM,EAAO,CACrB,OAAO,EAAgB,CAAK,CAC9B,CACF,CACF,EAEM,EAAkB,SAAU,EAA8B,CAC9D,EAAiB,EAAe,EAAW,QAAQ,EACnD,EAAiB,EAAc,EAAW,WAAW,CACvD,EAIA,OAFA,EAAgB,CAAM,EAEf,CAAE,QAAS,EAAiB,iBAAgB,CACrD"}
|
|
@@ -80,12 +80,13 @@ function l(e) {
|
|
|
80
80
|
let e = T();
|
|
81
81
|
return e.appendChild(g(_("You"), l)), e.appendChild(_(" and ")), e.appendChild(g(_(s), o.uri)), e;
|
|
82
82
|
};
|
|
83
|
-
if (!u)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
if (!u) {
|
|
84
|
+
if (!d) E().appendChild(_(" have not said you know each other."));
|
|
85
|
+
else {
|
|
86
|
+
let e = T();
|
|
87
|
+
e.appendChild(g(_("You"), l)), e.appendChild(_(" know ")), e.appendChild(g(_(s), o.uri)), e.appendChild(_(" (unconfirmed)."));
|
|
88
|
+
}
|
|
89
|
+
} else if (d) E().appendChild(_(" say you know each other."));
|
|
89
90
|
else {
|
|
90
91
|
w.classList.add("social-mutual-summary--confirm");
|
|
91
92
|
let e = w.appendChild(t.createElement("div"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socialSections.esm.js","names":[],"sources":["../../src/social/socialSections.ts"],"sourcesContent":["import { DataBrowserContext } from 'pane-registry'\nimport { createAddMeToYourFriendsButton } from 'profile-pane'\nimport { Statement, NamedNode } from 'rdflib'\nimport { ns, utils, widgets } from 'solid-ui'\nimport { appendProfileLinks } from './editProfileDetails'\nimport { locationIcon, personInCircleIcon as personInCircleIconSvg } from './icons'\nimport { FriendshipTriage } from './triage'\n\nexport type ViewerMode = 'owner' | 'authenticated' | 'anonymous'\n\nexport type HeaderControls = {\n canEdit: boolean,\n viewerMode: ViewerMode,\n showAddFriendAction?: boolean\n}\n\nexport type SocialHeaderElement = HTMLElement & {\n refreshSocialHeader?: (controls: HeaderControls) => void\n}\n\nexport type HeaderStats = {\n friendCount: number,\n mutualFriendCount: number | null,\n onSelectFriends?: () => void,\n onSelectMutual?: () => void\n}\n\nexport type HeaderProfileData = {\n imageUrl?: string,\n name?: string,\n jobTitle?: string,\n organization?: string,\n location?: string | null\n} | null\n\nexport type FriendRowRenderers = {\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}\n\nexport function createHeaderSection (\n context: DataBrowserContext,\n subject: NamedNode,\n controls: HeaderControls,\n stats: HeaderStats,\n getProfileData: () => HeaderProfileData\n): SocialHeaderElement {\n const dom = context.dom\n const kb = context.session.store\n const header = dom.createElement('header') as SocialHeaderElement\n header.className = 'social-pane__header'\n let headerControls = controls\n\n const renderHeader = function () {\n header.replaceChildren()\n const profileData = getProfileData()\n\n const headerContent = dom.createElement('div')\n headerContent.className = 'social-pane__header-content'\n\n const headerActions = dom.createElement('div')\n headerActions.className = 'social-pane__header-actions profile__actions profile__heading-actions'\n\n if (headerControls.canEdit) {\n // Hidden for now because the social pane header edit control does not match the new design.\n // Revisit later if we decide to restore profile-link editing here.\n } else if (headerControls.viewerMode === 'authenticated' && headerControls.showAddFriendAction) {\n headerActions.classList.add('social-pane__header-actions--friend')\n const addToFriendsButton = createAddMeToYourFriendsButton(subject, context)\n addToFriendsButton.classList.add('flex-center')\n headerActions.appendChild(addToFriendsButton)\n }\n\n header.appendChild(headerContent)\n\n const headerMedia = dom.createElement('div')\n headerMedia.className = 'social-pane__header-media'\n headerContent.appendChild(headerMedia)\n\n if (profileData) {\n headerMedia.appendChild(createImage(dom, profileData.imageUrl, profileData.name))\n }\n\n const headerDetails = dom.createElement('div')\n headerDetails.className = 'social-pane__header-details'\n headerContent.appendChild(headerDetails)\n\n if (headerActions.childNodes.length > 0) {\n headerContent.appendChild(headerActions)\n }\n\n const headerSummary = dom.createElement('div')\n headerSummary.classList.add('social-pane__header-summary', 'flex-column')\n headerDetails.appendChild(headerSummary)\n\n const name = profileData?.name || utils.label(subject)\n const h1 = dom.createElement('h1')\n h1.classList.add('social-pane__header-name')\n h1.appendChild(dom.createTextNode(name))\n headerSummary.appendChild(h1)\n\n const jobAndOrganization = [profileData?.jobTitle, profileData?.organization].filter(Boolean).join(' | ')\n if (jobAndOrganization) {\n const jobLine = dom.createElement('div')\n jobLine.className = 'social-pane__header-job-org'\n jobLine.textContent = jobAndOrganization\n headerSummary.appendChild(jobLine)\n }\n\n if (profileData?.location) {\n const locationLine = dom.createElement('div')\n locationLine.className = 'social-pane__header-location'\n\n const locationIconSpan = dom.createElement('span')\n locationIconSpan.classList.add('social-pane__header-location-icon', 'inline-flex-row')\n locationIconSpan.innerHTML = locationIcon\n locationLine.appendChild(locationIconSpan)\n locationLine.appendChild(dom.createTextNode(profileData.location))\n\n headerSummary.appendChild(locationLine)\n }\n\n const statsRow = dom.createElement('div')\n statsRow.className = 'social-pane__header-stats'\n\n const friendCount = dom.createElement('button')\n friendCount.className = 'social-pane__header-stat'\n friendCount.type = 'button'\n const friendCountLabel = dom.createElement('span')\n friendCountLabel.className = 'social-pane__header-stat-label'\n friendCountLabel.textContent = `${stats.friendCount} friend${stats.friendCount === 1 ? '' : 's'}`\n friendCount.appendChild(friendCountLabel)\n if (stats.onSelectFriends) {\n friendCount.addEventListener('click', stats.onSelectFriends)\n }\n statsRow.appendChild(friendCount)\n\n if (typeof stats.mutualFriendCount === 'number') {\n const mutualCount = dom.createElement('button')\n mutualCount.className = 'social-pane__header-stat'\n mutualCount.type = 'button'\n const mutualCountLabel = dom.createElement('span')\n mutualCountLabel.className = 'social-pane__header-stat-label'\n mutualCountLabel.textContent = `${stats.mutualFriendCount} mutual friend${stats.mutualFriendCount === 1 ? '' : 's'}`\n mutualCount.appendChild(mutualCountLabel)\n if (stats.onSelectMutual) {\n mutualCount.addEventListener('click', stats.onSelectMutual)\n }\n statsRow.appendChild(mutualCount)\n }\n\n headerSummary.appendChild(statsRow)\n appendProfileLinks(headerMedia, dom, kb, subject)\n }\n\n header.refreshSocialHeader = function (nextControls: HeaderControls) {\n headerControls = nextControls\n renderHeader()\n }\n\n renderHeader()\n\n return header\n}\n\nfunction createImage (dom: HTMLDocument, src: string | null | undefined, alt = ''): HTMLElement {\n if (src) {\n const img = dom.createElement('img')\n img.className = 'social-pane__header-hero'\n img.src = src\n img.alt = alt\n img.width = 180\n img.height = 180\n img.loading = 'eager'\n return img\n }\n\n const fallback = dom.createElement('div')\n fallback.className = 'social-pane__header-hero-alt flex-center'\n fallback.setAttribute('role', 'img')\n fallback.setAttribute('aria-label', alt)\n fallback.tabIndex = 0\n\n const icon = dom.createElement('span')\n icon.classList.add('social-pane__header-hero-icon', 'inline-flex-row')\n icon.innerHTML = personInCircleIconSvg\n fallback.appendChild(icon)\n\n return fallback\n}\n\nexport function createMutualSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n familiar: string,\n me: NamedNode,\n meUri: string | null,\n incoming: boolean | NamedNode[] | undefined,\n outgoing: boolean | NamedNode[] | undefined,\n editable: boolean,\n profile: NamedNode | null,\n knows: NamedNode,\n mutualConnections: NamedNode[],\n link: (contents: Node, uri: string | null | undefined) => Node,\n text: (value: string) => Text,\n buildCheckboxForm: (\n label: string | Node,\n statement: Statement,\n state: boolean,\n options?: { disabled?: boolean, disabledTitle?: string }\n ) => HTMLElement,\n renderSupportingInfo: FriendRowRenderers['renderSupportingInfo'],\n renderNameSuffix: FriendRowRenderers['renderNameSuffix']\n}): { section: HTMLElement, content: HTMLElement, refreshMutualFriends: () => void } {\n const {\n dom,\n subject,\n familiar,\n me,\n meUri,\n incoming,\n outgoing,\n editable,\n profile,\n knows,\n mutualConnections,\n link,\n text,\n buildCheckboxForm,\n renderSupportingInfo,\n renderNameSuffix\n } = options\n\n let refreshMutualFriends = function () {}\n\n const mutualSection = dom.createElement('section')\n mutualSection.className = 'social-pane__mutual-friends social-primary__panel'\n mutualSection.id = 'social-panel-mutual'\n mutualSection.setAttribute('role', 'tabpanel')\n mutualSection.setAttribute('aria-labelledby', 'social-tab-mutual')\n\n const mutualContent = mutualSection.appendChild(dom.createElement('div'))\n mutualContent.classList.add('social-main', 'social-main--mutual', 'flex-column')\n\n const relationshipSummary = dom.createElement('div')\n relationshipSummary.classList.add('social-mutual-summary', 'flex-column')\n mutualContent.appendChild(relationshipSummary)\n\n const createRelationshipLine = function () {\n const line = relationshipSummary.appendChild(dom.createElement('div'))\n line.classList.add('social-mutual-summary-line')\n return line\n }\n\n const youAndThem = function () {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' and '))\n line.appendChild(link(text(familiar), subject.uri))\n return line\n }\n\n if (!incoming) {\n if (!outgoing) {\n const line = youAndThem()\n line.appendChild(text(' have not said you know each other.'))\n } else {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' know '))\n line.appendChild(link(text(familiar), subject.uri))\n line.appendChild(text(' (unconfirmed).'))\n }\n } else if (!outgoing) {\n relationshipSummary.classList.add('social-mutual-summary--confirm')\n\n const incomingLine = relationshipSummary.appendChild(dom.createElement('div'))\n incomingLine.classList.add('social-mutual-summary-line')\n incomingLine.appendChild(link(text(familiar), subject.uri))\n incomingLine.appendChild(text(' knows '))\n incomingLine.appendChild(link(text('you'), meUri))\n incomingLine.appendChild(text(' (unconfirmed).'))\n } else {\n const line = youAndThem()\n line.appendChild(text(' say you know each other.'))\n }\n\n const shouldShowCheckboxPreview = Boolean(incoming) && !outgoing\n if (shouldShowCheckboxPreview) {\n const confirmLabel = dom.createElement('span')\n confirmLabel.className = 'social-mutual-confirm-prompt'\n confirmLabel.appendChild(text('Confirm you know '))\n confirmLabel.appendChild(link(text(familiar), subject.uri))\n\n const relationshipForm = buildCheckboxForm(\n confirmLabel,\n new Statement(me, knows, subject, profile ?? undefined),\n Boolean(outgoing),\n {\n disabled: !editable,\n disabledTitle: !editable ? 'Your profile is not editable' : undefined\n }\n )\n relationshipForm.classList.add('social-mutual-checkbox-form')\n\n mutualContent.appendChild(relationshipForm)\n }\n\n if (mutualConnections.length) {\n const mutualFriendsTable = mutualContent.appendChild(dom.createElement('table'))\n mutualFriendsTable.className = 'social-main social-friends-list social-friends-grid'\n\n const createMutualRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n refreshMutualFriends = function () {\n const sortedMutualConnections = [...mutualConnections].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n\n utils.syncTableToArray(\n mutualFriendsTable,\n sortedMutualConnections,\n createMutualRow,\n function (row, thing) {\n const replacement = createMutualRow(thing)\n return replacement\n }\n )\n }\n\n refreshMutualFriends()\n }\n\n return { section: mutualSection, content: mutualContent, refreshMutualFriends }\n}\n\nexport function createAllFriendsSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n profile: NamedNode | null,\n editable: boolean,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, mainTable: HTMLTableElement, friendsList: HTMLElement } {\n const { dom, subject, profile, editable, renderSupportingInfo, renderNameSuffix } = options\n\n const allFriends = dom.createElement('section')\n allFriends.className = 'social-pane__all-friends social-primary__panel'\n allFriends.id = 'social-panel-all-friends'\n allFriends.setAttribute('role', 'tabpanel')\n allFriends.setAttribute('aria-labelledby', 'social-tab-all-friends')\n\n const mainTable = allFriends.appendChild(dom.createElement('table'))\n mainTable.className = 'social-main'\n\n const friendsList = widgets.attachmentList(dom, subject, mainTable, {\n doc: profile,\n modify: !!editable,\n predicate: ns.foaf('knows'),\n noun: 'friend',\n // Social pane already owns the async refresh cycle for friend data in\n // socialPane.ts. Leave attachmentList's generic follow-up rerender disabled\n // here or each fetched friend profile will trigger an extra whole-table refresh\n // on top of the pane's own batched updates.\n refreshOnDocumentLoad: false,\n renderSupportingInfo,\n renderNameSuffix\n })\n friendsList.classList.add('social-friends-list')\n friendsList.style.marginTop = '0'\n\n const friendsListRow = friendsList.querySelector('tr')\n const friendsListPromptCell = friendsListRow?.children?.[0]\n const friendsListRightCell = friendsListRow?.children?.[1]\n const friendsHeaderActions = dom.createElement('div')\n friendsHeaderActions.classList.add('social-friends-header-actions')\n\n if (friendsListPromptCell instanceof HTMLTableCellElement) {\n friendsListPromptCell.classList.add('social-friends-header-dropzone-cell')\n const friendsHeaderDropzone = dom.createElement('table')\n friendsHeaderDropzone.className = 'social-friends-header-dropzone'\n friendsHeaderDropzone.setAttribute('role', 'presentation')\n const friendsHeaderDropzoneBody = friendsHeaderDropzone.appendChild(dom.createElement('tbody'))\n const friendsHeaderDropzoneRow = friendsHeaderDropzoneBody.appendChild(dom.createElement('tr'))\n friendsHeaderDropzoneRow.appendChild(friendsListPromptCell)\n friendsHeaderActions.appendChild(friendsHeaderDropzone)\n } else if (friendsListPromptCell instanceof HTMLElement) {\n while (friendsListPromptCell.firstChild) {\n friendsHeaderActions.appendChild(friendsListPromptCell.firstChild)\n }\n friendsListPromptCell.remove()\n }\n\n const friendDropButtons = friendsHeaderActions.querySelectorAll('button')\n if (editable && friendDropButtons.length > 0) {\n friendDropButtons.forEach((button) => {\n button.setAttribute('title', 'Drop friend here')\n button.setAttribute('aria-label', 'Drop friend here')\n const buttonImages = button.querySelectorAll('img')\n buttonImages.forEach((image) => {\n image.setAttribute('title', 'Drop friend here')\n image.setAttribute('alt', 'Drop friend here')\n })\n })\n\n const friendsActionsRow = dom.createElement('div')\n friendsActionsRow.className = 'social-friends-header-actions social-friends-header-actions--standalone'\n friendsActionsRow.appendChild(friendsHeaderActions)\n const dropHint = dom.createElement('span')\n dropHint.className = 'social-friends-header-hint'\n dropHint.textContent = 'Drag a WebId on the target to add a friend.'\n friendsActionsRow.appendChild(dropHint)\n allFriends.prepend(friendsActionsRow)\n }\n\n if (friendsListRightCell instanceof HTMLTableCellElement) {\n friendsListRightCell.colSpan = 2\n }\n\n const friendsItemsTable = friendsList.querySelector('td table')\n if (friendsItemsTable instanceof HTMLTableElement) {\n friendsItemsTable.classList.add('social-friends-grid')\n }\n\n return { section: allFriends, mainTable, friendsList }\n}\n\nexport function createRequestsSection (options: {\n dom: HTMLDocument,\n triage: FriendshipTriage,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, refreshRequests: (triage: FriendshipTriage) => void } {\n const { dom, triage, renderSupportingInfo, renderNameSuffix } = options\n\n const requestsSection = dom.createElement('section')\n requestsSection.className = 'social-pane__requests social-primary__panel'\n requestsSection.id = 'social-panel-requests'\n requestsSection.setAttribute('role', 'tabpanel')\n requestsSection.setAttribute('aria-labelledby', 'social-tab-requests')\n\n const requestsContent = requestsSection.appendChild(dom.createElement('div'))\n requestsContent.classList.add('social-main', 'social-main--requests', 'flex-column')\n\n const note = requestsContent.appendChild(dom.createElement('p'))\n note.className = 'social-requests__note'\n note.textContent = 'Best effort preview: this view only reflects profile documents that are currently loaded. A dedicated inbox would still be needed for complete request discovery.'\n\n const createRequestGroup = function (title: string, description: string, emptyText: string) {\n const group = requestsContent.appendChild(dom.createElement('section'))\n group.classList.add('social-requests__group', 'flex-column')\n\n const header = group.appendChild(dom.createElement('div'))\n header.className = 'social-requests__group-header'\n\n const heading = header.appendChild(dom.createElement('h2'))\n heading.className = 'social-requests__group-title'\n heading.textContent = title\n\n const blurb = header.appendChild(dom.createElement('p'))\n blurb.className = 'social-requests__group-description'\n blurb.textContent = description\n\n const empty = group.appendChild(dom.createElement('p'))\n empty.className = 'social-requests__empty'\n empty.textContent = emptyText\n\n const table = group.appendChild(dom.createElement('table'))\n table.className = 'social-main social-friends-list social-friends-grid social-requests__table'\n\n return { empty, table }\n }\n\n const incomingGroup = createRequestGroup(\n 'Incoming requests',\n 'People who say they know this profile, but have not been confirmed yet.',\n 'No incoming requests are visible from the currently loaded data.'\n )\n const pendingGroup = createRequestGroup(\n 'Awaiting confirmation',\n 'People this profile knows who have not linked back yet.',\n 'Nothing is waiting for confirmation right now.'\n )\n\n const createPersonRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n const sortNodes = function (nodes: NamedNode[]) {\n return [...nodes].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n }\n\n const syncRequestGroup = function (\n group: { empty: HTMLElement, table: HTMLTableElement },\n nodes: NamedNode[]\n ) {\n const sortedNodes = sortNodes(nodes)\n group.empty.hidden = sortedNodes.length > 0\n group.table.hidden = sortedNodes.length === 0\n\n utils.syncTableToArray(\n group.table,\n sortedNodes,\n createPersonRow,\n function (_row, thing) {\n return createPersonRow(thing)\n }\n )\n }\n\n const refreshRequests = function (nextTriage: FriendshipTriage) {\n syncRequestGroup(incomingGroup, nextTriage.requests)\n syncRequestGroup(pendingGroup, nextTriage.unconfirmed)\n }\n\n refreshRequests(triage)\n\n return { section: requestsSection, refreshRequests }\n}\n"],"mappings":";;;;;;AAwCA,SAAgB,EACd,GACA,GACA,GACA,GACA,GACqB;CACrB,IAAM,IAAM,EAAQ;CACT,EAAQ,QAAQ;CAD3B,IAEM,IAAS,EAAI,cAAc,QAAQ;CACzC,EAAO,YAAY;CACnB,IAAI,IAAiB,GAEf,IAAe,WAAY;EAC/B,EAAO,gBAAgB;EACvB,IAAM,IAAc,EAAe,GAE7B,IAAgB,EAAI,cAAc,KAAK;EAC7C,EAAc,YAAY;EAE1B,IAAM,IAAgB,EAAI,cAAc,KAAK;EAG7C,IAFA,EAAc,YAAY,yEAEtB,GAAe,WAGR,EAAe,eAAe,mBAAmB,EAAe,qBAAqB;GAC9F,EAAc,UAAU,IAAI,qCAAqC;GACjE,IAAM,IAAqB,EAA+B,GAAS,CAAO;GAE1E,AADA,EAAmB,UAAU,IAAI,aAAa,GAC9C,EAAc,YAAY,CAAkB;EAC9C;EAEA,EAAO,YAAY,CAAa;EAEhC,IAAM,IAAc,EAAI,cAAc,KAAK;EAI3C,AAHA,EAAY,YAAY,6BACxB,EAAc,YAAY,CAAW,GAEjC,KACF,EAAY,YAAY,EAAY,GAAK,EAAY,UAAU,EAAY,IAAI,CAAC;EAGlF,IAAM,IAAgB,EAAI,cAAc,KAAK;EAI7C,AAHA,EAAc,YAAY,+BAC1B,EAAc,YAAY,CAAa,GAEnC,EAAc,WAAW,SAAS,KACpC,EAAc,YAAY,C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gCACpB,EAAQ,cAAc;EAEtB,IAAM,IAAQ,EAAO,YAAY,EAAI,cAAc,GAAG,CAAC;EAEvD,AADA,EAAM,YAAY,sCAClB,EAAM,cAAc;EAEpB,IAAM,IAAQ,EAAM,YAAY,EAAI,cAAc,GAAG,CAAC;EAEtD,AADA,EAAM,YAAY,0BAClB,EAAM,cAAc;EAEpB,IAAM,IAAQ,EAAM,YAAY,EAAI,cAAc,OAAO,CAAC;EAG1D,OAFA,EAAM,YAAY,8EAEX;GAAE;GAAO;EAAM;CACxB,GAEM,IAAgB,EACpB,qBACA,2EACA,kEACF,GACM,IAAe,EACnB,yBACA,2DACA,gDACF,GAEM,IAAkB,SAAU,GAAmB;EACnD,OAAO,EAAQ,SAAS,GAAK,EAAG,KAAK,OAAO,GAAG,GAAQ;GACrD;GACA;EACF,CAAC;CACH,GAEM,IAAY,SAAU,GAAoB;EAC9C,OAAO,CAAC,GAAG,CAAK,CAAC,CAAC,MAAM,GAAM,MAAU;GACtC,IAAM,IAAY,EAAM,MAAM,CAAI,KAAK,EAAK,OACtC,IAAa,EAAM,MAAM,CAAK,KAAK,EAAM;GAC/C,OAAO,EAAU,cAAc,CAAU;EAC3C,CAAC;CACH,GAEM,IAAmB,SACvB,GACA,GACA;EACA,IAAM,IAAc,EAAU,CAAK;EAInC,AAHA,EAAM,MAAM,SAAS,EAAY,SAAS,GAC1C,EAAM,MAAM,SAAS,EAAY,WAAW,GAE5C,EAAM,iBACJ,EAAM,OACN,GACA,GACA,SAAU,GAAM,GAAO;GACrB,OAAO,EAAgB,CAAK;EAC9B,CACF;CACF,GAEM,IAAkB,SAAU,GAA8B;EAE9D,AADA,EAAiB,GAAe,EAAW,QAAQ,GACnD,EAAiB,GAAc,EAAW,WAAW;CACvD;CAIA,OAFA,EAAgB,CAAM,GAEf;EAAE,SAAS;EAAiB;CAAgB;AACrD"}
|
|
1
|
+
{"version":3,"file":"socialSections.esm.js","names":[],"sources":["../../src/social/socialSections.ts"],"sourcesContent":["import { DataBrowserContext } from 'pane-registry'\nimport { createAddMeToYourFriendsButton } from 'profile-pane'\nimport { Statement, NamedNode } from 'rdflib'\nimport { ns, utils, widgets } from 'solid-ui'\nimport { appendProfileLinks } from './editProfileDetails'\nimport { locationIcon, personInCircleIcon as personInCircleIconSvg } from './icons'\nimport { FriendshipTriage } from './triage'\n\nexport type ViewerMode = 'owner' | 'authenticated' | 'anonymous'\n\nexport type HeaderControls = {\n canEdit: boolean,\n viewerMode: ViewerMode,\n showAddFriendAction?: boolean\n}\n\nexport type SocialHeaderElement = HTMLElement & {\n refreshSocialHeader?: (controls: HeaderControls) => void\n}\n\nexport type HeaderStats = {\n friendCount: number,\n mutualFriendCount: number | null,\n onSelectFriends?: () => void,\n onSelectMutual?: () => void\n}\n\nexport type HeaderProfileData = {\n imageUrl?: string,\n name?: string,\n jobTitle?: string,\n organization?: string,\n location?: string | null\n} | null\n\nexport type FriendRowRenderers = {\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}\n\nexport function createHeaderSection (\n context: DataBrowserContext,\n subject: NamedNode,\n controls: HeaderControls,\n stats: HeaderStats,\n getProfileData: () => HeaderProfileData\n): SocialHeaderElement {\n const dom = context.dom\n const kb = context.session.store\n const header = dom.createElement('header') as SocialHeaderElement\n header.className = 'social-pane__header'\n let headerControls = controls\n\n const renderHeader = function () {\n header.replaceChildren()\n const profileData = getProfileData()\n\n const headerContent = dom.createElement('div')\n headerContent.className = 'social-pane__header-content'\n\n const headerActions = dom.createElement('div')\n headerActions.className = 'social-pane__header-actions profile__actions profile__heading-actions'\n\n if (headerControls.canEdit) {\n // Hidden for now because the social pane header edit control does not match the new design.\n // Revisit later if we decide to restore profile-link editing here.\n } else if (headerControls.viewerMode === 'authenticated' && headerControls.showAddFriendAction) {\n headerActions.classList.add('social-pane__header-actions--friend')\n const addToFriendsButton = createAddMeToYourFriendsButton(subject, context)\n addToFriendsButton.classList.add('flex-center')\n headerActions.appendChild(addToFriendsButton)\n }\n\n header.appendChild(headerContent)\n\n const headerMedia = dom.createElement('div')\n headerMedia.className = 'social-pane__header-media'\n headerContent.appendChild(headerMedia)\n\n if (profileData) {\n headerMedia.appendChild(createImage(dom, profileData.imageUrl, profileData.name))\n }\n\n const headerDetails = dom.createElement('div')\n headerDetails.className = 'social-pane__header-details'\n headerContent.appendChild(headerDetails)\n\n if (headerActions.childNodes.length > 0) {\n headerContent.appendChild(headerActions)\n }\n\n const headerSummary = dom.createElement('div')\n headerSummary.classList.add('social-pane__header-summary', 'flex-column')\n headerDetails.appendChild(headerSummary)\n\n const name = profileData?.name || utils.label(subject)\n const h1 = dom.createElement('h1')\n h1.classList.add('social-pane__header-name')\n h1.appendChild(dom.createTextNode(name))\n headerSummary.appendChild(h1)\n\n const jobAndOrganization = [profileData?.jobTitle, profileData?.organization].filter(Boolean).join(' | ')\n if (jobAndOrganization) {\n const jobLine = dom.createElement('div')\n jobLine.className = 'social-pane__header-job-org'\n jobLine.textContent = jobAndOrganization\n headerSummary.appendChild(jobLine)\n }\n\n if (profileData?.location) {\n const locationLine = dom.createElement('div')\n locationLine.className = 'social-pane__header-location'\n\n const locationIconSpan = dom.createElement('span')\n locationIconSpan.classList.add('social-pane__header-location-icon', 'inline-flex-row')\n locationIconSpan.innerHTML = locationIcon\n locationLine.appendChild(locationIconSpan)\n locationLine.appendChild(dom.createTextNode(profileData.location))\n\n headerSummary.appendChild(locationLine)\n }\n\n const statsRow = dom.createElement('div')\n statsRow.className = 'social-pane__header-stats'\n\n const friendCount = dom.createElement('button')\n friendCount.className = 'social-pane__header-stat'\n friendCount.type = 'button'\n const friendCountLabel = dom.createElement('span')\n friendCountLabel.className = 'social-pane__header-stat-label'\n friendCountLabel.textContent = `${stats.friendCount} friend${stats.friendCount === 1 ? '' : 's'}`\n friendCount.appendChild(friendCountLabel)\n if (stats.onSelectFriends) {\n friendCount.addEventListener('click', stats.onSelectFriends)\n }\n statsRow.appendChild(friendCount)\n\n if (typeof stats.mutualFriendCount === 'number') {\n const mutualCount = dom.createElement('button')\n mutualCount.className = 'social-pane__header-stat'\n mutualCount.type = 'button'\n const mutualCountLabel = dom.createElement('span')\n mutualCountLabel.className = 'social-pane__header-stat-label'\n mutualCountLabel.textContent = `${stats.mutualFriendCount} mutual friend${stats.mutualFriendCount === 1 ? '' : 's'}`\n mutualCount.appendChild(mutualCountLabel)\n if (stats.onSelectMutual) {\n mutualCount.addEventListener('click', stats.onSelectMutual)\n }\n statsRow.appendChild(mutualCount)\n }\n\n headerSummary.appendChild(statsRow)\n appendProfileLinks(headerMedia, dom, kb, subject)\n }\n\n header.refreshSocialHeader = function (nextControls: HeaderControls) {\n headerControls = nextControls\n renderHeader()\n }\n\n renderHeader()\n\n return header\n}\n\nfunction createImage (dom: HTMLDocument, src: string | null | undefined, alt = ''): HTMLElement {\n if (src) {\n const img = dom.createElement('img')\n img.className = 'social-pane__header-hero'\n img.src = src\n img.alt = alt\n img.width = 180\n img.height = 180\n img.loading = 'eager'\n return img\n }\n\n const fallback = dom.createElement('div')\n fallback.className = 'social-pane__header-hero-alt flex-center'\n fallback.setAttribute('role', 'img')\n fallback.setAttribute('aria-label', alt)\n fallback.tabIndex = 0\n\n const icon = dom.createElement('span')\n icon.classList.add('social-pane__header-hero-icon', 'inline-flex-row')\n icon.innerHTML = personInCircleIconSvg\n fallback.appendChild(icon)\n\n return fallback\n}\n\nexport function createMutualSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n familiar: string,\n me: NamedNode,\n meUri: string | null,\n incoming: boolean | NamedNode[] | undefined,\n outgoing: boolean | NamedNode[] | undefined,\n editable: boolean,\n profile: NamedNode | null,\n knows: NamedNode,\n mutualConnections: NamedNode[],\n link: (contents: Node, uri: string | null | undefined) => Node,\n text: (value: string) => Text,\n buildCheckboxForm: (\n label: string | Node,\n statement: Statement,\n state: boolean,\n options?: { disabled?: boolean, disabledTitle?: string }\n ) => HTMLElement,\n renderSupportingInfo: FriendRowRenderers['renderSupportingInfo'],\n renderNameSuffix: FriendRowRenderers['renderNameSuffix']\n}): { section: HTMLElement, content: HTMLElement, refreshMutualFriends: () => void } {\n const {\n dom,\n subject,\n familiar,\n me,\n meUri,\n incoming,\n outgoing,\n editable,\n profile,\n knows,\n mutualConnections,\n link,\n text,\n buildCheckboxForm,\n renderSupportingInfo,\n renderNameSuffix\n } = options\n\n let refreshMutualFriends = function () {}\n\n const mutualSection = dom.createElement('section')\n mutualSection.className = 'social-pane__mutual-friends social-primary__panel'\n mutualSection.id = 'social-panel-mutual'\n mutualSection.setAttribute('role', 'tabpanel')\n mutualSection.setAttribute('aria-labelledby', 'social-tab-mutual')\n\n const mutualContent = mutualSection.appendChild(dom.createElement('div'))\n mutualContent.classList.add('social-main', 'social-main--mutual', 'flex-column')\n\n const relationshipSummary = dom.createElement('div')\n relationshipSummary.classList.add('social-mutual-summary', 'flex-column')\n mutualContent.appendChild(relationshipSummary)\n\n const createRelationshipLine = function () {\n const line = relationshipSummary.appendChild(dom.createElement('div'))\n line.classList.add('social-mutual-summary-line')\n return line\n }\n\n const youAndThem = function () {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' and '))\n line.appendChild(link(text(familiar), subject.uri))\n return line\n }\n\n if (!incoming) {\n if (!outgoing) {\n const line = youAndThem()\n line.appendChild(text(' have not said you know each other.'))\n } else {\n const line = createRelationshipLine()\n line.appendChild(link(text('You'), meUri))\n line.appendChild(text(' know '))\n line.appendChild(link(text(familiar), subject.uri))\n line.appendChild(text(' (unconfirmed).'))\n }\n } else if (!outgoing) {\n relationshipSummary.classList.add('social-mutual-summary--confirm')\n\n const incomingLine = relationshipSummary.appendChild(dom.createElement('div'))\n incomingLine.classList.add('social-mutual-summary-line')\n incomingLine.appendChild(link(text(familiar), subject.uri))\n incomingLine.appendChild(text(' knows '))\n incomingLine.appendChild(link(text('you'), meUri))\n incomingLine.appendChild(text(' (unconfirmed).'))\n } else {\n const line = youAndThem()\n line.appendChild(text(' say you know each other.'))\n }\n\n const shouldShowCheckboxPreview = Boolean(incoming) && !outgoing\n if (shouldShowCheckboxPreview) {\n const confirmLabel = dom.createElement('span')\n confirmLabel.className = 'social-mutual-confirm-prompt'\n confirmLabel.appendChild(text('Confirm you know '))\n confirmLabel.appendChild(link(text(familiar), subject.uri))\n\n const relationshipForm = buildCheckboxForm(\n confirmLabel,\n new Statement(me, knows, subject, profile ?? undefined),\n Boolean(outgoing),\n {\n disabled: !editable,\n disabledTitle: !editable ? 'Your profile is not editable' : undefined\n }\n )\n relationshipForm.classList.add('social-mutual-checkbox-form')\n\n mutualContent.appendChild(relationshipForm)\n }\n\n if (mutualConnections.length) {\n const mutualFriendsTable = mutualContent.appendChild(dom.createElement('table'))\n mutualFriendsTable.className = 'social-main social-friends-list social-friends-grid'\n\n const createMutualRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n refreshMutualFriends = function () {\n const sortedMutualConnections = [...mutualConnections].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n\n utils.syncTableToArray(\n mutualFriendsTable,\n sortedMutualConnections,\n createMutualRow,\n function (row, thing) {\n const replacement = createMutualRow(thing)\n return replacement\n }\n )\n }\n\n refreshMutualFriends()\n }\n\n return { section: mutualSection, content: mutualContent, refreshMutualFriends }\n}\n\nexport function createAllFriendsSection (options: {\n dom: HTMLDocument,\n subject: NamedNode,\n profile: NamedNode | null,\n editable: boolean,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, mainTable: HTMLTableElement, friendsList: HTMLElement } {\n const { dom, subject, profile, editable, renderSupportingInfo, renderNameSuffix } = options\n\n const allFriends = dom.createElement('section')\n allFriends.className = 'social-pane__all-friends social-primary__panel'\n allFriends.id = 'social-panel-all-friends'\n allFriends.setAttribute('role', 'tabpanel')\n allFriends.setAttribute('aria-labelledby', 'social-tab-all-friends')\n\n const mainTable = allFriends.appendChild(dom.createElement('table'))\n mainTable.className = 'social-main'\n\n const friendsList = widgets.attachmentList(dom, subject, mainTable, {\n doc: profile,\n modify: !!editable,\n predicate: ns.foaf('knows'),\n noun: 'friend',\n // Social pane already owns the async refresh cycle for friend data in\n // socialPane.ts. Leave attachmentList's generic follow-up rerender disabled\n // here or each fetched friend profile will trigger an extra whole-table refresh\n // on top of the pane's own batched updates.\n refreshOnDocumentLoad: false,\n renderSupportingInfo,\n renderNameSuffix\n })\n friendsList.classList.add('social-friends-list')\n friendsList.style.marginTop = '0'\n\n const friendsListRow = friendsList.querySelector('tr')\n const friendsListPromptCell = friendsListRow?.children?.[0]\n const friendsListRightCell = friendsListRow?.children?.[1]\n const friendsHeaderActions = dom.createElement('div')\n friendsHeaderActions.classList.add('social-friends-header-actions')\n\n if (friendsListPromptCell instanceof HTMLTableCellElement) {\n friendsListPromptCell.classList.add('social-friends-header-dropzone-cell')\n const friendsHeaderDropzone = dom.createElement('table')\n friendsHeaderDropzone.className = 'social-friends-header-dropzone'\n friendsHeaderDropzone.setAttribute('role', 'presentation')\n const friendsHeaderDropzoneBody = friendsHeaderDropzone.appendChild(dom.createElement('tbody'))\n const friendsHeaderDropzoneRow = friendsHeaderDropzoneBody.appendChild(dom.createElement('tr'))\n friendsHeaderDropzoneRow.appendChild(friendsListPromptCell)\n friendsHeaderActions.appendChild(friendsHeaderDropzone)\n } else if (friendsListPromptCell instanceof HTMLElement) {\n while (friendsListPromptCell.firstChild) {\n friendsHeaderActions.appendChild(friendsListPromptCell.firstChild)\n }\n friendsListPromptCell.remove()\n }\n\n const friendDropButtons = friendsHeaderActions.querySelectorAll('button')\n if (editable && friendDropButtons.length > 0) {\n friendDropButtons.forEach((button) => {\n button.setAttribute('title', 'Drop friend here')\n button.setAttribute('aria-label', 'Drop friend here')\n const buttonImages = button.querySelectorAll('img')\n buttonImages.forEach((image) => {\n image.setAttribute('title', 'Drop friend here')\n image.setAttribute('alt', 'Drop friend here')\n })\n })\n\n const friendsActionsRow = dom.createElement('div')\n friendsActionsRow.className = 'social-friends-header-actions social-friends-header-actions--standalone'\n friendsActionsRow.appendChild(friendsHeaderActions)\n const dropHint = dom.createElement('span')\n dropHint.className = 'social-friends-header-hint'\n dropHint.textContent = 'Drag a WebId on the target to add a friend.'\n friendsActionsRow.appendChild(dropHint)\n allFriends.prepend(friendsActionsRow)\n }\n\n if (friendsListRightCell instanceof HTMLTableCellElement) {\n friendsListRightCell.colSpan = 2\n }\n\n const friendsItemsTable = friendsList.querySelector('td table')\n if (friendsItemsTable instanceof HTMLTableElement) {\n friendsItemsTable.classList.add('social-friends-grid')\n }\n\n return { section: allFriends, mainTable, friendsList }\n}\n\nexport function createRequestsSection (options: {\n dom: HTMLDocument,\n triage: FriendshipTriage,\n renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null,\n renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null\n}): { section: HTMLElement, refreshRequests: (triage: FriendshipTriage) => void } {\n const { dom, triage, renderSupportingInfo, renderNameSuffix } = options\n\n const requestsSection = dom.createElement('section')\n requestsSection.className = 'social-pane__requests social-primary__panel'\n requestsSection.id = 'social-panel-requests'\n requestsSection.setAttribute('role', 'tabpanel')\n requestsSection.setAttribute('aria-labelledby', 'social-tab-requests')\n\n const requestsContent = requestsSection.appendChild(dom.createElement('div'))\n requestsContent.classList.add('social-main', 'social-main--requests', 'flex-column')\n\n const note = requestsContent.appendChild(dom.createElement('p'))\n note.className = 'social-requests__note'\n note.textContent = 'Best effort preview: this view only reflects profile documents that are currently loaded. A dedicated inbox would still be needed for complete request discovery.'\n\n const createRequestGroup = function (title: string, description: string, emptyText: string) {\n const group = requestsContent.appendChild(dom.createElement('section'))\n group.classList.add('social-requests__group', 'flex-column')\n\n const header = group.appendChild(dom.createElement('div'))\n header.className = 'social-requests__group-header'\n\n const heading = header.appendChild(dom.createElement('h2'))\n heading.className = 'social-requests__group-title'\n heading.textContent = title\n\n const blurb = header.appendChild(dom.createElement('p'))\n blurb.className = 'social-requests__group-description'\n blurb.textContent = description\n\n const empty = group.appendChild(dom.createElement('p'))\n empty.className = 'social-requests__empty'\n empty.textContent = emptyText\n\n const table = group.appendChild(dom.createElement('table'))\n table.className = 'social-main social-friends-list social-friends-grid social-requests__table'\n\n return { empty, table }\n }\n\n const incomingGroup = createRequestGroup(\n 'Incoming requests',\n 'People who say they know this profile, but have not been confirmed yet.',\n 'No incoming requests are visible from the currently loaded data.'\n )\n const pendingGroup = createRequestGroup(\n 'Awaiting confirmation',\n 'People this profile knows who have not linked back yet.',\n 'Nothing is waiting for confirmation right now.'\n )\n\n const createPersonRow = function (target: NamedNode) {\n return widgets.personTR(dom, ns.foaf('knows'), target, {\n renderSupportingInfo,\n renderNameSuffix\n })\n }\n\n const sortNodes = function (nodes: NamedNode[]) {\n return [...nodes].sort((left, right) => {\n const leftLabel = utils.label(left) || left.value\n const rightLabel = utils.label(right) || right.value\n return leftLabel.localeCompare(rightLabel)\n })\n }\n\n const syncRequestGroup = function (\n group: { empty: HTMLElement, table: HTMLTableElement },\n nodes: NamedNode[]\n ) {\n const sortedNodes = sortNodes(nodes)\n group.empty.hidden = sortedNodes.length > 0\n group.table.hidden = sortedNodes.length === 0\n\n utils.syncTableToArray(\n group.table,\n sortedNodes,\n createPersonRow,\n function (_row, thing) {\n return createPersonRow(thing)\n }\n )\n }\n\n const refreshRequests = function (nextTriage: FriendshipTriage) {\n syncRequestGroup(incomingGroup, nextTriage.requests)\n syncRequestGroup(pendingGroup, nextTriage.unconfirmed)\n }\n\n refreshRequests(triage)\n\n return { section: requestsSection, refreshRequests }\n}\n"],"mappings":";;;;;;AAwCA,SAAgB,EACd,GACA,GACA,GACA,GACA,GACqB;CACrB,IAAM,IAAM,EAA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;EACnD,OAAO,EAAQ,SAAS,GAAK,EAAG,KAAK,OAAO,GAAG,GAAQ;GACrD;GACA;EACF,CAAC;CACH,GAEM,IAAY,SAAU,GAAoB;EAC9C,OAAO,CAAC,GAAG,CAAK,CAAC,CAAC,MAAM,GAAM,MAAU;GACtC,IAAM,IAAY,EAAM,MAAM,CAAI,KAAK,EAAK,OACtC,IAAa,EAAM,MAAM,CAAK,KAAK,EAAM;GAC/C,OAAO,EAAU,cAAc,CAAU;EAC3C,CAAC;CACH,GAEM,IAAmB,SACvB,GACA,GACA;EACA,IAAM,IAAc,EAAU,CAAK;EAInC,AAHA,EAAM,MAAM,SAAS,EAAY,SAAS,GAC1C,EAAM,MAAM,SAAS,EAAY,WAAW,GAE5C,EAAM,iBACJ,EAAM,OACN,GACA,GACA,SAAU,GAAM,GAAO;GACrB,OAAO,EAAgB,CAAK;EAC9B,CACF;CACF,GAEM,IAAkB,SAAU,GAA8B;EAE9D,AADA,EAAiB,GAAe,EAAW,QAAQ,GACnD,EAAiB,GAAc,EAAW,WAAW;CACvD;CAIA,OAFA,EAAgB,CAAM,GAEf;EAAE,SAAS;EAAiB;CAAgB;AACrD"}
|
package/dist/versionInfo.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={buildTime:`2026-08-
|
|
1
|
+
var e={buildTime:`2026-08-05T23:37:01Z`,commit:`7ea89eb3d89a65bbe38346af484b42c4ef4954a6`,npmInfo:{"solid-panes":`4.4.2-7`,npm:`10.9.8`,node:`22.23.1`,acorn:`8.16.0`,ada:`2.9.2`,amaro:`1.1.8`,ares:`1.34.6`,brotli:`1.1.0`,cjs_module_lexer:`2.2.0`,cldr:`48.0`,icu:`78.2`,llhttp:`9.4.2`,modules:`127`,napi:`10`,nbytes:`0.1.3`,ncrypto:`0.0.1`,nghttp2:`1.69.0`,openssl:`3.5.7`,simdjson:`4.5.0`,simdutf:`6.4.2`,sqlite:`3.51.3`,tz:`2026a`,undici:`6.27.0`,unicode:`17.0`,uv:`1.51.0`,uvwasi:`0.0.23`,v8:`12.4.254.21-node.56`,zlib:`1.3.1-e00f703`,zstd:`1.5.7`}};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=versionInfo.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.cjs.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-08-
|
|
1
|
+
{"version":3,"file":"versionInfo.cjs.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-08-05T23:37:01Z',\n commit: '7ea89eb3d89a65bbe38346af484b42c4ef4954a6',\n npmInfo: {\n 'solid-panes': '4.4.2-7',\n npm: '10.9.8',\n node: '22.23.1',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.6',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.2',\n llhttp: '9.4.2',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.7',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026a',\n undici: '6.27.0',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.56',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":"AAAA,IAAA,EAAe,CACb,UAAW,uBACX,OAAQ,2CACR,QAAS,CACP,cAAe,UACf,IAAK,SACL,KAAM,UACN,MAAO,SACP,IAAK,QACL,MAAO,QACP,KAAM,SACN,OAAQ,QACR,iBAAkB,QAClB,KAAM,OACN,IAAK,OACL,OAAQ,QACR,QAAS,MACT,KAAM,KACN,OAAQ,QACR,QAAS,QACT,QAAS,SACT,QAAS,QACT,SAAU,QACV,QAAS,QACT,OAAQ,SACR,GAAI,QACJ,OAAQ,SACR,QAAS,OACT,GAAI,SACJ,OAAQ,SACR,GAAI,sBACJ,KAAM,gBACN,KAAM,OACR,CACF"}
|
package/dist/versionInfo.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/versionInfo.ts
|
|
2
2
|
var e = {
|
|
3
|
-
buildTime: "2026-08-
|
|
4
|
-
commit: "
|
|
3
|
+
buildTime: "2026-08-05T23:37:01Z",
|
|
4
|
+
commit: "7ea89eb3d89a65bbe38346af484b42c4ef4954a6",
|
|
5
5
|
npmInfo: {
|
|
6
|
-
"solid-panes": "4.4.2-
|
|
6
|
+
"solid-panes": "4.4.2-7",
|
|
7
7
|
npm: "10.9.8",
|
|
8
8
|
node: "22.23.1",
|
|
9
9
|
acorn: "8.16.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.esm.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-08-
|
|
1
|
+
{"version":3,"file":"versionInfo.esm.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-08-05T23:37:01Z',\n commit: '7ea89eb3d89a65bbe38346af484b42c4ef4954a6',\n npmInfo: {\n 'solid-panes': '4.4.2-7',\n npm: '10.9.8',\n node: '22.23.1',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.6',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.2',\n llhttp: '9.4.2',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.7',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026a',\n undici: '6.27.0',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.56',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":";AAAA,IAAA,IAAe;CACb,WAAW;CACX,QAAQ;CACR,SAAS;EACP,eAAe;EACf,KAAK;EACL,MAAM;EACN,OAAO;EACP,KAAK;EACL,OAAO;EACP,MAAM;EACN,QAAQ;EACR,kBAAkB;EAClB,MAAM;EACN,KAAK;EACL,QAAQ;EACR,SAAS;EACT,MAAM;EACN,QAAQ;EACR,SAAS;EACT,SAAS;EACT,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,IAAI;EACJ,QAAQ;EACR,SAAS;EACT,IAAI;EACJ,QAAQ;EACR,IAAI;EACJ,MAAM;EACN,MAAM;CACR;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "4.4.2-
|
|
3
|
+
"version": "4.4.2-7",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"solid-logic": "4.0.8-2",
|
|
74
74
|
"solid-namespace": "^0.5.4",
|
|
75
75
|
"solid-ui": "3.1.3-15",
|
|
76
|
-
"source-pane": "3.1.1-
|
|
76
|
+
"source-pane": "3.1.1-6"
|
|
77
77
|
},
|
|
78
78
|
"overrides": {
|
|
79
79
|
"rdflib": "$rdflib"
|