solid-panes 4.4.2-4 → 4.4.2-6
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/README.md +0 -30
- package/dist/_virtual/_rolldown/runtime.cjs.js +1 -1
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/pencil.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/pencil.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/settings-2.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/settings-2.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/settings-2.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/share-2.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/share-2.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/trash-2.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/users.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/users.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/users.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/users.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +14 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +19 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +292 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +7 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +22 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +15 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +266 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +7 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +19 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +19 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +321 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +7 -0
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +13 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +36 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +468 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +2 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +7 -0
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -0
- package/dist/components/file-explorer-header/helper.cjs.js +2 -0
- package/dist/components/file-explorer-header/helper.cjs.js.map +1 -0
- package/dist/components/file-explorer-header/helper.d.ts +15 -0
- package/dist/components/file-explorer-header/helper.d.ts.map +1 -0
- package/dist/components/file-explorer-header/helper.esm.js +64 -0
- package/dist/components/file-explorer-header/helper.esm.js.map +1 -0
- package/dist/components/file-explorer-header/types.d.ts +2 -0
- package/dist/components/file-explorer-header/types.d.ts.map +1 -0
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js +3 -3
- package/dist/components/navbar/Navbar.cjs.js +15 -0
- package/dist/components/navbar/Navbar.cjs.js.map +1 -0
- package/dist/components/navbar/Navbar.d.ts +14 -0
- package/dist/components/navbar/Navbar.d.ts.map +1 -0
- package/dist/components/navbar/Navbar.esm.js +232 -0
- package/dist/components/navbar/Navbar.esm.js.map +1 -0
- package/dist/components/navbar/Navbar.styles.cjs.js +2 -0
- package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -0
- package/dist/components/navbar/Navbar.styles.esm.js +7 -0
- package/dist/components/navbar/Navbar.styles.esm.js.map +1 -0
- package/dist/components/navbar/index.cjs.js +1 -0
- package/dist/components/navbar/index.d.ts +4 -0
- package/dist/components/navbar/index.d.ts.map +1 -0
- package/dist/components/navbar/index.esm.js +1 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +16 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +8 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +1 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +215 -0
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +18 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +16 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +260 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -0
- package/dist/dashboard/homepage.cjs.js +1 -1
- package/dist/dashboard/homepage.cjs.js.map +1 -1
- package/dist/dashboard/homepage.esm.js +2 -2
- package/dist/dashboard/homepage.esm.js.map +1 -1
- package/dist/form/pane.cjs.js +1 -1
- package/dist/form/pane.cjs.js.map +1 -1
- package/dist/form/pane.esm.js +2 -1
- package/dist/form/pane.esm.js.map +1 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/mainPage/header.cjs.js +1 -1
- package/dist/mainPage/header.cjs.js.map +1 -1
- package/dist/mainPage/header.d.ts.map +1 -1
- package/dist/mainPage/header.esm.js +64 -17
- package/dist/mainPage/header.esm.js.map +1 -1
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts +1 -9
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +19 -21
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.cjs.js +2 -0
- package/dist/mainPage/navbar.cjs.js.map +1 -0
- package/dist/mainPage/navbar.d.ts +3 -0
- package/dist/mainPage/navbar.d.ts.map +1 -0
- package/dist/mainPage/navbar.esm.js +66 -0
- package/dist/mainPage/navbar.esm.js.map +1 -0
- package/dist/outline/context.d.ts +1 -1
- package/dist/outline/manager2.cjs.js +1 -2
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +366 -532
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +1 -0
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/sourcePaneIcon.d.ts +2 -0
- package/dist/outline/sourcePaneIcon.d.ts.map +1 -0
- package/dist/outline/userInput.cjs.js +3 -3
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +4 -6
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.cjs.js.map +1 -1
- package/dist/pad/padPane2.esm.js +2 -1
- package/dist/pad/padPane2.esm.js.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js +2 -1
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/social/editProfileDetails.cjs.js +1 -1
- package/dist/social/editProfileDetails.esm.js +1 -1
- package/dist/social/socialPane2.cjs.js +1 -1
- package/dist/social/socialPane2.esm.js +1 -1
- package/dist/social/socialSections.cjs.js.map +1 -1
- package/dist/transaction/pane.cjs.js.map +1 -1
- package/dist/transaction/pane.esm.js.map +1 -1
- package/dist/transaction/period.cjs.js.map +1 -1
- package/dist/transaction/period.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.cjs.js +2 -0
- package/dist/utils/paneUtils.cjs.js.map +1 -0
- package/dist/utils/paneUtils.d.ts +19 -0
- package/dist/utils/paneUtils.d.ts.map +1 -0
- package/dist/utils/paneUtils.esm.js +52 -0
- package/dist/utils/paneUtils.esm.js.map +1 -0
- package/dist/utils/podUtils.cjs.js +2 -0
- package/dist/utils/podUtils.cjs.js.map +1 -0
- package/dist/utils/podUtils.d.ts +4 -0
- package/dist/utils/podUtils.d.ts.map +1 -0
- package/dist/utils/podUtils.esm.js +46 -0
- package/dist/utils/podUtils.esm.js.map +1 -0
- package/dist/utils/webIdUtils.cjs.js +2 -0
- package/dist/utils/webIdUtils.cjs.js.map +1 -0
- package/dist/utils/webIdUtils.d.ts +6 -0
- package/dist/utils/webIdUtils.d.ts.map +1 -0
- package/dist/utils/webIdUtils.esm.js +48 -0
- package/dist/utils/webIdUtils.esm.js.map +1 -0
- 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 +10 -13
- package/dist/icons/dashboard.cjs.js +0 -2
- package/dist/icons/dashboard.cjs.js.map +0 -1
- package/dist/icons/dashboard.esm.js +0 -6
- package/dist/icons/dashboard.esm.js.map +0 -1
- package/dist/icons/iconHelper.cjs.js +0 -2
- package/dist/icons/iconHelper.cjs.js.map +0 -1
- package/dist/icons/iconHelper.esm.js +0 -17
- package/dist/icons/iconHelper.esm.js.map +0 -1
- package/dist/icons/menu.cjs.js +0 -9
- package/dist/icons/menu.cjs.js.map +0 -1
- package/dist/icons/menu.esm.js +0 -6
- package/dist/icons/menu.esm.js.map +0 -1
- package/dist/mainPage/footer.cjs.js +0 -2
- package/dist/mainPage/footer.cjs.js.map +0 -1
- package/dist/mainPage/footer.d.ts +0 -13
- package/dist/mainPage/footer.d.ts.map +0 -1
- package/dist/mainPage/footer.esm.js +0 -18
- package/dist/mainPage/footer.esm.js.map +0 -1
- package/dist/mainPage/menu.d.ts +0 -6
- package/dist/mainPage/menu.d.ts.map +0 -1
- package/dist/mainPage/menu2.cjs.js +0 -2
- package/dist/mainPage/menu2.cjs.js.map +0 -1
- package/dist/mainPage/menu2.esm.js +0 -184
- package/dist/mainPage/menu2.esm.js.map +0 -1
- package/dist/profileUtils/ownerProfile.cjs.js +0 -2
- package/dist/profileUtils/ownerProfile.cjs.js.map +0 -1
- package/dist/profileUtils/ownerProfile.d.ts +0 -5
- package/dist/profileUtils/ownerProfile.d.ts.map +0 -1
- package/dist/profileUtils/ownerProfile.esm.js +0 -50
- package/dist/profileUtils/ownerProfile.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedulePane2.esm.js","names":[],"sources":["../../src/schedule/schedulePane.ts"],"sourcesContent":["/* Scheduler Pane\n **\n **\n */\n/* global alert */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Node as RdflibNode, Statement, Variable } from 'rdflib'\nimport formText from './formsForSchedule.ttl'\nimport './schedulePane.css'\nimport '../styles/utilities.css'\n\nconst ns = UI.ns\n\n// @@ Give other combos too-- see schedule ontology\nconst possibleAvailabilities = [\n ns.sched('No'),\n ns.sched('Maybe'),\n ns.sched('Yes')\n]\n\ntype AgendaTask = () => void\n\ntype CopySpec = {\n local: string\n contentType: string\n}\n\ntype MintOptions = {\n newBase: string\n useExisting?: NamedNode\n noIndexHTML?: boolean\n me?: NamedNode | null\n newInstance?: NamedNode\n thisInstance?: NamedNode\n}\n\ntype MatrixOptionsLike = {\n set_x: RdflibNode[]\n set_y: RdflibNode[]\n cellFunction?: (cell: HTMLElement, x: RdflibNode, y: RdflibNode, value: NamedNode | null) => string\n}\n\ntype ResponseQueryVars = {\n time: Variable\n author: Variable\n value: Variable\n resp: Variable\n cell: Variable\n}\n\ntype LoginStatusBoxLike = {\n refresh: () => void\n}\n\nfunction runNextAgendaItem (agenda: AgendaTask[]): void {\n const nextTask = agenda.shift()\n if (nextTask) {\n nextTask()\n }\n}\n\nexport const schedulePane = {\n icon: UI.icons.iconBase + 'noun_346777.svg', // @@ better?\n\n name: 'schedule',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve an Scheduler pane?\n label: function (subject: NamedNode, context: DataBrowserContext) {\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) {\n return 'Scheduling poll'\n }\n return null // No under other circumstances\n },\n\n // Mint a new Schedule poll\n mintClass: ns.sched('SchedulableEvent'),\n\n mintNew: function (context: DataBrowserContext, options: MintOptions) {\n return new Promise<MintOptions>(function (resolve, reject) {\n const ns = UI.ns\n const kb = context.session.store\n let newBase = options.newBase\n const thisInstance =\n options.useExisting || $rdf.sym(options.newBase + 'index.ttl#this')\n\n const complainIfBad = function (ok: boolean, body: string) {\n if (ok) return\n console.log(\n 'Error in Schedule Pane: Error constructing new scheduler: ' + body\n )\n reject(new Error(body))\n }\n\n // ////////////////////// Accesss control\n\n // Two constiations of ACL for this app, public read and public read/write\n // In all cases owner has read write control\n\n const genACLtext = function (docURI: string, aclURI: string, allWrite: boolean) {\n const g = $rdf.graph()\n const auth = $rdf.Namespace('http://www.w3.org/ns/auth/acl#')\n let a = g.sym(aclURI + '#a1')\n const acl = g.sym(aclURI)\n const doc = g.sym(docURI)\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agent'), me as NamedNode, acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n g.add(a, auth('mode'), auth('Write'), acl)\n g.add(a, auth('mode'), auth('Control'), acl)\n\n a = g.sym(aclURI + '#a2')\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agentClass'), ns.foaf('Agent'), acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n if (allWrite) {\n g.add(a, auth('mode'), auth('Write'), acl)\n }\n return $rdf.serialize(acl, g, aclURI, 'text/turtle')\n }\n\n /*\n const setACL3 = function (docURI, allWrite, callbackFunction) {\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n return UI.acl.setACL(docURI, aclText, callbackFunction)\n }\n */\n\n const setACL2 = function setACL2 (docURI, allWrite, callbackFunction) {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null // @@ check that this get set by web.js\n\n if (aclDoc) {\n // Great we already know where it is\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher\n .webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n .then(_result => callbackFunction(true))\n .catch(err => {\n callbackFunction(false, err.message)\n })\n } else {\n return fetcher\n .load(docURI)\n .catch(err => {\n callbackFunction(false, 'Getting headers for ACL: ' + err)\n })\n .then(() => {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null\n\n if (!aclDoc) {\n // complainIfBad(false, \"No Link rel=ACL header for \" + docURI)\n throw new Error('No Link rel=ACL header for ' + docURI)\n }\n\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher.webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n })\n .then(_result => callbackFunction(true))\n .catch(err => {\n callbackFunction(false, err.message)\n })\n }\n }\n\n // Body of mintNew\n const fetcher = kb.fetcher\n const updater = kb.updater\n\n let me: NamedNode | null = options.me || authn.currentUser()\n if (!me) {\n console.log('MUST BE LOGGED IN')\n alert('NOT LOGGED IN')\n return\n }\n\n const baseDir = thisInstance.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a base directory to mint a new poll')\n }\n const base = baseDir.uri\n let newDetailsDoc: NamedNode\n let newInstance: NamedNode\n\n if (options.useExisting) {\n newInstance = options.useExisting\n const existingBaseDir = thisInstance.dir()\n if (!existingBaseDir) {\n throw new Error('Existing schedule instance needs a containing directory')\n }\n newBase = existingBaseDir.uri\n newDetailsDoc = newInstance.doc()\n // newIndexDoc = null\n if (options.newBase) {\n throw new Error(\n 'mint new scheduler: Illegal - have both new base and existing event'\n )\n }\n } else {\n newDetailsDoc = kb.sym(newBase + 'details.ttl')\n // newIndexDoc = kb.sym(newBase + 'index.html')\n newInstance = kb.sym(newDetailsDoc.uri + '#event')\n }\n\n const newResultsDoc = kb.sym(newBase + 'results.ttl')\n\n const toBeCopied: CopySpec[] = options.noIndexHTML\n ? []\n : [{ local: 'index.html', contentType: 'text/html' }]\n\n const agenda: AgendaTask[] = []\n\n // @@ This needs some form of visible progress bar\n for (let f = 0; f < toBeCopied.length; f++) {\n const item = toBeCopied[f]\n const fun = function copyItem (item: CopySpec) {\n agenda.push(function () {\n const newURI = newBase + item.local\n console.log('Copying ' + base + item.local + ' to ' + newURI)\n\n const setThatACL = function () {\n setACL2(newURI, false, function (ok, message) {\n if (!ok) {\n complainIfBad(\n ok,\n 'FAILED to set ACL ' + newURI + ' : ' + message\n )\n console.log('FAILED to set ACL ' + newURI + ' : ' + message)\n } else {\n runNextAgendaItem(agenda) // beware too much nesting\n }\n })\n }\n\n kb.fetcher\n .webCopy(\n base + item.local,\n newBase + item.local,\n item.contentType\n )\n .then(() => authn.checkUser())\n .then(webId => {\n me = webId as NamedNode | null\n\n setThatACL()\n })\n .catch(err => {\n console.log(\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n complainIfBad(\n false,\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n })\n })\n }\n fun(item)\n }\n\n agenda.push(function createDetailsFile () {\n kb.add(\n newInstance,\n ns.rdf('type'),\n ns.sched('SchedulableEvent'),\n newDetailsDoc\n )\n if (me) {\n kb.add(newInstance, ns.dc('author'), me, newDetailsDoc) // Who is sending the invitation?\n kb.add(newInstance, ns.foaf('maker'), me, newDetailsDoc) // Uneditable - wh is allowed to edit this?\n }\n\n kb.add(\n newInstance,\n ns.dc('created'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n newDetailsDoc\n )\n kb.add(newInstance, ns.sched('resultsDocument'), newDetailsDoc)\n\n updater.put(\n newDetailsDoc,\n kb.statementsMatching(undefined, undefined, undefined, newDetailsDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n runNextAgendaItem(agenda)\n } else {\n complainIfBad(\n ok,\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n }\n }\n )\n })\n\n agenda.push(function () {\n kb.fetcher\n .webOperation('PUT', newResultsDoc.uri, {\n data: '',\n contentType: 'text/turtle'\n })\n .then(() => {\n runNextAgendaItem(agenda)\n })\n .catch(err => {\n complainIfBad(\n false,\n 'Failed to initialize empty results file: ' + err.message\n )\n })\n })\n\n agenda.push(function () {\n setACL2(newResultsDoc.uri, true, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set Read-Write ACL on results file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n setACL2(newDetailsDoc.uri, false, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set read ACL on configuration file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n // give the user links to the new app\n console.log('Finished minting new scheduler')\n options.newInstance = newInstance\n resolve(options)\n })\n\n runNextAgendaItem(agenda)\n // Created new data files.\n }) // promise\n }, // mintNew\n\n // Render one meeting schedule poll\n render: function (subject: NamedNode, context: DataBrowserContext) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n const invitation = subject\n const appPathSegment = 'app-when-can-we.w3.org' // how to allocate this string and connect to\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n // ////////////////////////////////////////////\n\n const fetcher = kb.fetcher\n const updater = kb.updater\n let waitingForLogin = false\n\n const thisInstance = subject\n const detailsDoc = subject.doc()\n const baseDir = detailsDoc.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a containing directory for its details document')\n }\n const base = baseDir.uri\n\n const resultsDoc = $rdf.sym(base + 'results.ttl')\n // const formsURI = base + 'forms.ttl'\n // We can't in fact host stuff from there because of CORS\n const formsURI =\n 'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl'\n\n const form1 = kb.sym(formsURI + '#form1')\n const form2 = kb.sym(formsURI + '#form2')\n const form3 = kb.sym(formsURI + '#form3')\n\n $rdf.parse(formText, kb, formsURI, 'text/turtle') // Load forms directly\n\n // Utility functions\n\n const complainIfBad = function (ok, message) {\n if (!ok) {\n div.appendChild(UI.widgets.errorMessageBlock(dom, message, 'pink'))\n }\n }\n\n const clearElement = function (ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild)\n }\n return ele\n }\n\n const refreshCellColor = function (cell, value) {\n const bg = kb.any(value, UI.ns.ui('backgroundColor'))\n if (bg) {\n cell.classList.add('schedule-pane__cell')\n cell.setAttribute(\n 'style',\n 'background-color: ' + bg + ';'\n )\n }\n }\n\n let me: NamedNode | null = null\n\n authn.checkUser().then(webId => {\n me = (webId as NamedNode | null) ?? null\n\n if (logInOutButton) {\n logInOutButton.refresh()\n }\n if (webId && waitingForLogin) {\n waitingForLogin = false\n showAppropriateDisplay()\n }\n })\n console.log('me: ' + me) // @@ curently not actually used elsewhere\n\n // ////////////////////////////// Reproduction: spawn a new instance\n //\n // Viral growth path: user of app decides to make another instance\n //\n\n const newInstanceButton = function () {\n const b = UI.login.newAppInstance(\n dom,\n { noun: 'scheduler', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n if (b.firstChild instanceof HTMLElement) {\n b.firstChild.classList.add('schedule-pane__button')\n }\n return b\n } // newInstanceButton\n\n // /////////////////////// Create new document files for new instance of app\n\n const initializeNewInstanceInWorkspace = function (ws: NamedNode) {\n const uriPrefix = kb.any(ws, ns.space('uriPrefix'))\n let newBase = ''\n if (!uriPrefix) {\n newBase = ws.uri.split('#')[0]\n } else {\n newBase = uriPrefix.value\n }\n if (newBase.slice(-1) !== '/') {\n $rdf.log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?\n newBase = newBase + '/'\n }\n const now = new Date()\n newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id\n\n initializeNewInstanceAtBase(thisInstance, newBase)\n }\n\n const initializeNewInstanceAtBase = function (thisInstance: NamedNode, newBase: string) {\n const options: MintOptions = { thisInstance, newBase }\n schedulePane.mintNew(context, options)\n .then(function (options) {\n if (!options.newInstance) {\n throw new Error('New scheduler instance was not returned')\n }\n const p = div.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'font-size: 140%;')\n p.innerHTML =\n 'Your <a href=\\'' +\n options.newInstance.uri +\n '\\'><b>new scheduler</b></a> is ready to be set up. ' +\n '<br/><br/><a href=\\'' +\n options.newInstance.uri +\n '\\'>Say when you what days work for you.</a>'\n })\n .catch(function (error) {\n complainIfBad(\n false,\n 'Error createing new scheduler at ' +\n options.newInstance +\n ': ' +\n error\n )\n })\n }\n\n // ///////////////////////\n\n const getForms = function () {\n console.log('getforms()')\n getDetails()\n /*\n fetcher.nowOrWhenFetched(formsURI, undefined, function (ok, body) {\n console.log('getforms() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n getDetails()\n })\n */\n }\n\n const getDetails = function () {\n console.log('getDetails()') // Looking for blank screen hang-up\n fetcher.nowOrWhenFetched(detailsDoc.uri, undefined, function (ok, body) {\n console.log('getDetails() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n showAppropriateDisplay()\n })\n }\n\n const showAppropriateDisplay = function showAppropriateDisplay () {\n console.log('showAppropriateDisplay()')\n\n authn.checkUser().then(webId => {\n if (!webId) {\n return showSignon()\n }\n\n // On gh-pages, the turtle will not load properly (bad mime type)\n // but we can trap it as being a non-editable server.\n\n if (\n !kb.updater.editable(detailsDoc.uri, kb) ||\n kb.holds(subject, ns.rdf('type'), ns.wf('TemplateInstance'))\n ) {\n // This is read-only example e.g. on github pages, etc\n showBootstrap()\n return\n }\n\n const ready = kb.any(subject, ns.sched('ready'))\n\n if (!ready) {\n showForms()\n } else {\n // no editing not author\n getResults()\n }\n })\n }\n\n const showSignon = function showSignon () {\n clearElement(naviMain)\n const signonContext = { div, dom }\n UI.login.ensureLoggedIn(signonContext).then(context => {\n me = context.me ?? null\n waitingForLogin = false // untested\n showAppropriateDisplay()\n })\n }\n\n const showBootstrap = function showBootstrap () {\n const div = clearElement(naviMain)\n div.appendChild(\n UI.login.newAppInstance(\n dom,\n { noun: 'poll', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n )\n\n div.appendChild(dom.createElement('hr')) // @@\n\n const p = div.appendChild(dom.createElement('p'))\n p.textContent =\n 'Where would you like to store the data for the poll? ' +\n 'Give the URL of the directory where you would like the data stored.'\n const baseField = div.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text')\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n\n div.appendChild(dom.createElement('br')) // @@\n\n const button = div.appendChild(dom.createElement('button'))\n button.classList.add('schedule-pane__button')\n button.textContent = 'Start new poll at this URI'\n button.addEventListener('click', function (_e) {\n let newBase = baseField.value\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n initializeNewInstanceAtBase(thisInstance, newBase)\n })\n }\n\n // ///////////// The forms to configure the poll\n\n const doneButton = dom.createElement('button')\n\n const showForms = function () {\n clearElement(naviCenter) // Remove refresh button if nec\n const div = naviMain\n\n // form2 depends on sched:allDay; seed a local default for new polls\n if (!kb.any(subject, ns.sched('allDay'))) {\n kb.add(\n subject,\n ns.sched('allDay'),\n $rdf.literal('true', $rdf.sym('http://www.w3.org/2001/XMLSchema#boolean')),\n detailsDoc\n )\n }\n\n const wizard = true\n let currentSlide = 0\n let gotDoneButton = false\n\n const hasFormControls = function (container) {\n return !!container.querySelector('input, select, textarea, button')\n }\n\n const asBoolean = function (term, fallback) {\n if (!term) return fallback\n const value = (term.value || '').toLowerCase()\n if (value === 'true' || value === '1') return true\n if (value === 'false' || value === '0') return false\n return fallback\n }\n\n const renderTimeProposalFallback = function (slide) {\n const allDayValue = asBoolean(kb.any(subject, ns.sched('allDay')), true)\n const fallbackForm = kb.sym(\n formsURI + (allDayValue ? '#AllDayForm2' : '#NotAllDayForm2')\n )\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n fallbackForm,\n detailsDoc,\n complainIfBad\n )\n }\n\n const annotateRenderedForm = function (\n container: HTMLElement,\n includePrimaryFields: boolean = false\n ) {\n const controls = Array.from(\n container.querySelectorAll('input, select, textarea')\n ) as HTMLElement[]\n controls.forEach(control => {\n control.classList.add('schedule-pane__form-control')\n if (control.tagName.toLowerCase() === 'textarea') {\n control.classList.add('schedule-pane__form-control--textarea')\n }\n })\n\n const borderedPanels = Array.from(\n container.querySelectorAll('div[style*=\"border: 0.05em solid\"]')\n ) as HTMLElement[]\n borderedPanels.forEach(panel => {\n panel.classList.add('schedule-pane__panel')\n })\n\n const headings = Array.from(container.querySelectorAll('h3')) as HTMLElement[]\n headings.forEach(heading => {\n heading.classList.add('schedule-pane__form-heading')\n const headingText = (heading.textContent || '').trim().toLowerCase()\n if (headingText === 'time proposals') {\n heading.classList.add('schedule-pane__form-heading--time-proposals')\n heading.closest('.schedule-pane__panel')?.classList.add(\n 'schedule-pane__panel--time-proposals'\n )\n }\n })\n\n if (!includePrimaryFields) {\n return\n }\n\n const labels = Array.from(container.querySelectorAll('.formFieldName'))\n labels.forEach(labelElement => {\n const row = labelElement.parentElement as HTMLElement | null\n const labelText = (labelElement.textContent || '').trim().toLowerCase()\n if (!row) return\n if (labelText === 'summary' || labelText === 'location') {\n row.classList.add('schedule-pane__field-row--compact')\n }\n if (labelText === 'comment') {\n row.classList.add('schedule-pane__field-row--comment')\n }\n })\n\n const commentField = container.querySelector('textarea') as HTMLTextAreaElement | null\n const commentFieldWrapper = commentField?.parentElement as HTMLElement | null\n const commentValueCell = commentFieldWrapper?.parentElement as HTMLElement | null\n const commentRow = commentValueCell?.parentElement as HTMLElement | null\n if (commentRow) {\n commentRow.classList.add('schedule-pane__field-row--comment')\n }\n if (commentValueCell) {\n commentValueCell.classList.add('schedule-pane__field-value--comment')\n }\n }\n\n const unwrapSlide = function (slide: HTMLElement) {\n const firstElement = slide.firstElementChild as HTMLElement | null\n if (!firstElement || slide.childElementCount !== 1) {\n return slide\n }\n return firstElement\n }\n\n if (wizard) {\n const forms = [form1, form2, form3]\n const slides: HTMLElement[] = []\n currentSlide = 0\n for (let f = 0; f < forms.length; f++) {\n const slide = dom.createElement('div')\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n forms[f],\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(slide, f === 0)\n\n // Some stores end up with form2's ui:Options unresolved; force a usable input form.\n if (f === 1 && !hasFormControls(slide)) {\n renderTimeProposalFallback(slide)\n annotateRenderedForm(slide)\n }\n\n slides.push(unwrapSlide(slide))\n }\n\n const refresh = function () {\n clearElement(naviMain).appendChild(slides[currentSlide])\n\n if (currentSlide === 0) {\n b1.setAttribute('disabled', '')\n } else {\n b1.removeAttribute('disabled')\n }\n if (currentSlide === slides.length - 1) {\n b2.setAttribute('disabled', '')\n if (!gotDoneButton) {\n // Only expose at last slide seen\n naviCenter.appendChild(emailButton) // could also check data shape\n naviCenter.appendChild(doneButton) // could also check data shape\n gotDoneButton = true\n }\n } else {\n b2.removeAttribute('disabled')\n }\n }\n const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'))\n b1.classList.add('schedule-pane__button')\n b1.textContent = '<- go back'\n b1.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide > 0) {\n currentSlide -= 1\n refresh()\n }\n },\n false\n )\n\n const b2 = clearElement(naviRight).appendChild(\n dom.createElement('button')\n )\n b2.classList.add('schedule-pane__button')\n b2.textContent = 'continue ->'\n b2.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide < slides.length - 1) {\n currentSlide += 1\n refresh()\n }\n },\n false\n )\n\n refresh()\n } else {\n // not wizard one big form\n // @@@ create the initial config doc if not exist\n const table = div.appendChild(dom.createElement('table'))\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form1,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table, true)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form2,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form3,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n naviCenter.appendChild(doneButton) // could also check data shape\n }\n // @@@ link config to results\n\n const insertables: Statement[] = []\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('availabilityOptions'),\n ns.sched('YesNoMaybe'),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('ready'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)\n ) // @@ also link in results\n\n doneButton.classList.add('schedule-pane__button')\n doneButton.textContent = 'Go to poll'\n doneButton.addEventListener(\n 'click',\n function (_e) {\n if (kb.any(subject, ns.sched('ready'))) {\n // already done\n getResults()\n naviRight.appendChild(emailButton)\n } else {\n naviRight.appendChild(emailButton)\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n // naviRight.appendChild(emailButton)\n getResults()\n }\n })\n }\n },\n false\n )\n\n const emailButton = dom.createElement('button')\n emailButton.classList.add('schedule-pane__button')\n const emailIcon = emailButton.appendChild(dom.createElement('img'))\n emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg') // noun_480183.svg\n emailIcon.classList.add('schedule-pane__button-icon')\n // emailButton.textContent = 'email invitations'\n emailButton.addEventListener(\n 'click',\n function (_e) {\n const title =\n kb.anyValue(subject, ns.cal('summary')) ||\n kb.anyValue(subject, ns.dc('title')) ||\n ''\n const mailto =\n 'mailto:' +\n kb\n .each(subject, ns.sched('invitee'))\n .map(function (who) {\n const mbox = kb.any(who as NamedNode, ns.foaf('mbox')) as NamedNode | null\n return mbox ? mbox.uri.replace('mailto:', '') : ''\n })\n .join(',') +\n '?subject=' +\n encodeURIComponent(title + '-- When can we meet?') +\n '&body=' +\n encodeURIComponent(\n title + '\\n\\nWhen can you?\\n\\nSee ' + subject + '\\n'\n )\n // @@ assumed there is a data browser\n\n console.log('Mail: ' + mailto)\n window.location.href = mailto\n },\n false\n )\n } // showForms\n\n // Ask for each day, what times .. @@ to be added some time\n /*\n const setTimesOfDay = function () {\n const i, j, x, y, slot, cell, day\n const insertables = []\n const possibleDays = kb.each(invitation, ns.sched('option'))\n .map(function (opt) {return kb.any(opt, ns.cal('dtstart'))})\n const cellLookup = []\n const slots = kb.each(invitation, ns.sched('slot'))\n if (slots.length === 0) {\n for (i = 0; i < 2; i++) {\n slot = UI.widgets.newThing(detailsDoc)\n insertables.push($rdf.st(invitation, ns.sched('slot'), slot))\n insertables.push($rdf.st(slot, ns.rdfs('label'), 'slot ' + (i + 1)))\n for (j = 0; j < possibleDays.length; j++) {\n day - possibleDays[j]\n x = kb.any(slot, ns.rdfs('label'))\n y = kb.any(day, ns.cal('dtstart'))\n cell = UI.widgets.newThing(detailsDoc)\n cellLookup[x.toNT() + y.toNT()] = cell\n insertables.push($rdf.st(slot, ns.sched('cell'), cell))\n insertables.push($rdf.st(cell, ns.sched('day'), possibleDays[j]))\n }\n }\n }\n\n const query = new $rdf.Query('TimesOfDay')\n const v = {}['day', 'label', 'value', 'slot', 'cell'].map(function (x) {\n query.consts.push(v[x] = $rdf.constiable(x)) })\n query.pat.add(invitation, ns.sched('slot'), v.slot)\n query.pat.add(v.slot, ns.rdfs('label'), v.label)\n query.pat.add(v.slot, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('timeOfDay'), v.value)\n query.pat.add(v.cell, ns.sched('day'), v.day)\n\n const options = {}\n options.set_x = kb.each(subject, ns.sched('slot')) // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) { return kb.any(opt, ns.rdfs('label')) })\n\n options.set_y = kb.each(subject, ns.sched('option')); // @@@@@ option -> dtstart in future\n options.set_y = options.set_y.map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const possibleTimes = kb.each(invitation, ns.sched('option'))\n .map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(UI.matrix.matrixForQuery(\n dom, query, v.time, v.author, v.value, options, function () {}))\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.setAttribute('style', inputStyle)\n refreshButton.textContent = 'refresh'\n refreshButton.addEventListener('click', function (e) {\n refreshButton.disabled = true\n store.fetcher.nowOrWhenFetched(subject.doc(), undefined, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n }, false)\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n const dataPointForNT = []\n\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) { return (! z.sameTerm(me)) })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n // const point = cellLookup[x.toNT() + y.toNT()]\n\n if (y.sameTerm(me)) {\n const callbackFunction = function () { refreshCellColor(cell, value); }; // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('timeOfDay')\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(dom, kb, cellSubject, predicate,\n possibleAvailabilities, selectOptions, resultsDoc, callbackFunction)\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n const myResponse = null\n responses.map(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r\n }\n })\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push($rdf.st(invitation, ns.sched('response'), myResponse, doc))\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.map(function (dataPoint) {\n const time = kb.any(dataPoint, ns.cal('dtstart'))\n dataPointForNT[time.toNT()] = dataPoint\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n if (dataPointForNT[possibleTimes[j].toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push($rdf.st(myResponse, ns.sched('cell'), dataPoint, doc))\n insertables.push($rdf.st(dataPoint, ns.cal('dtstart'), possibleTimes[j], doc)) // @@\n dataPointForNT[possibleTimes[j].toNT()] = dataPoint\n }\n if (insertables.length) {\n store.updater.update([], insertables, function (uri, success, errorBody) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else { // no insertables\n displayTheMatrix()\n }\n }\n */\n // end setTimesOfDay\n\n // Read or create empty results file\n function getResults () {\n fetcher.nowOrWhenFetched(resultsDoc.uri, undefined, (ok, body, response) => {\n if (!ok) {\n if (response.status === 404) {\n // / Check explicitly for 404 error\n console.log('Initializing details file ' + resultsDoc)\n updater.put(resultsDoc, [], 'text/turtle', function (\n uri2,\n ok,\n message\n ) {\n if (ok) {\n clearElement(naviMain)\n showResults()\n } else {\n complainIfBad(\n ok,\n 'FAILED to create results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to craete results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n }\n })\n } else {\n // Other error, not 404 -- do not try to overwite the file\n complainIfBad(ok, 'FAILED to read results file: ' + body)\n }\n } else {\n // Happy read\n clearElement(naviMain)\n showResults()\n }\n })\n }\n\n function showResults () {\n // Now the form for responsing to the poll\n //\n\n // div.appendChild(dom.createElement('hr'))\n\n // const invitation = subject\n const title = kb.any(invitation, ns.cal('summary'))\n const comment = kb.any(invitation, ns.cal('comment'))\n const location = kb.any(invitation, ns.cal('location'))\n const div = naviMain\n if (title) div.appendChild(dom.createElement('h3')).textContent = title.value\n if (location) {\n div.appendChild(dom.createElement('address')).textContent =\n location.value\n }\n if (comment) {\n div.appendChild(dom.createElement('p')).textContent = comment.value\n }\n const author = kb.any(invitation, ns.dc('author')) as NamedNode | null\n if (author) {\n const authorName = kb.any(author, ns.foaf('name'))\n if (authorName) {\n div.appendChild(dom.createElement('p')).textContent = authorName.value\n }\n }\n\n const query = new $rdf.Query('Responses', 0)\n const v = {} as ResponseQueryVars\n v.time = $rdf.variable('time')\n v.author = $rdf.variable('author')\n v.value = $rdf.variable('value')\n v.resp = $rdf.variable('resp')\n v.cell = $rdf.variable('cell')\n query.vars.push(v.time, v.author, v.value, v.resp, v.cell)\n query.pat.add(invitation, ns.sched('response'), v.resp)\n query.pat.add(v.resp, ns.dc('author'), v.author)\n query.pat.add(v.resp, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('availabilty'), v.value)\n query.pat.add(v.cell, ns.cal('dtstart'), v.time)\n\n // Sort by by person @@@\n\n const options: MatrixOptionsLike = { set_x: [], set_y: [] }\n options.set_x = kb.each(subject, ns.sched('option')) as RdflibNode[] // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n }).filter(function (time) {\n return !!time\n })\n\n options.set_y = kb.each(subject, ns.sched('response')) as RdflibNode[]\n options.set_y = options.set_y.map(function (resp) {\n return kb.any(resp as NamedNode, ns.dc('author'))\n }).filter(function (author) {\n return !!author\n })\n\n const possibleTimes = kb\n .each(invitation, ns.sched('option'))\n .map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n })\n .filter(function (time) {\n return !!time\n })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(\n UI.matrix.matrixForQuery(\n dom,\n query,\n v.time,\n v.author,\n v.value,\n options,\n function () {}\n )\n )\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.classList.add('schedule-pane__button')\n // refreshButton.textContent = 'refresh' // noun_479395.svg\n const refreshIcon = dom.createElement('img')\n refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg')\n refreshIcon.classList.add('schedule-pane__button-icon')\n refreshButton.appendChild(refreshIcon)\n refreshButton.addEventListener(\n 'click',\n function (_e) {\n refreshButton.disabled = true\n kb.fetcher.refresh(resultsDoc, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n },\n false\n )\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n // @@ Give other combos too-- see schedule ontology\n // const possibleAvailabilities = [ SCHED('No'), SCHED('Maybe'), SCHED('Yes') ]\n\n // const me = authn.currentUser()\n\n const dataPointForNT: Record<string, NamedNode> = {}\n\n const loginContext = { div: naviCenter, dom }\n UI.login.ensureLoggedIn(loginContext).then(context => {\n const me = context.me\n if (!me) {\n return\n }\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) {\n return !z.sameTerm(me)\n })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n if (value !== null) {\n kb.fetcher.nowOrWhenFetched(\n value.uri.split('#')[0],\n undefined,\n function (ok, _error) {\n if (ok) refreshCellColor(cell, value)\n }\n )\n }\n if (y.sameTerm(me)) {\n const callbackFunction = function () {\n refreshCellColor(cell, value)\n return ''\n } // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('availabilty')\n if (!x) return ''\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(\n dom,\n kb,\n cellSubject,\n predicate,\n possibleAvailabilities,\n selectOptions,\n resultsDoc,\n callbackFunction\n )\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n return ''\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n let myResponse: NamedNode | null = null\n responses.forEach(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r as NamedNode\n }\n })\n\n const insertables: Statement[] = [] // list of statements to be stored\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push(\n $rdf.st(invitation, ns.sched('response'), myResponse, doc)\n )\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.forEach(function (dataPoint) {\n const time = kb.any(dataPoint as NamedNode, ns.cal('dtstart'))\n if (!time) return\n dataPointForNT[time.toNT()] = dataPoint as NamedNode\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n const possibleTime = possibleTimes[j]\n if (!possibleTime) continue\n if (dataPointForNT[possibleTime.toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push(\n $rdf.st(myResponse, ns.sched('cell'), dataPoint, doc)\n )\n insertables.push(\n $rdf.st(dataPoint, ns.cal('dtstart'), possibleTime, doc)\n ) // @@\n dataPointForNT[possibleTime.toNT()] = dataPoint\n }\n if (insertables.length) {\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else {\n // no insertables\n displayTheMatrix()\n }\n }) // @@@@ end of .then\n\n // If I made this in the first place, allow me to edit it.\n // @@ optionally -- allows others to if according to original\n const instanceCreator = kb.any(subject, ns.foaf('maker')) // owner?\n if (!instanceCreator || !me || instanceCreator.sameTerm(me)) {\n const editButton = dom.createElement('button')\n editButton.classList.add('schedule-pane__button')\n // editButton.textContent = '(Modify the poll)' // noun_344563.svg\n const editIcon = dom.createElement('img')\n editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg')\n editIcon.classList.add('schedule-pane__button-icon')\n editButton.appendChild(editIcon)\n editButton.addEventListener(\n 'click',\n function (_e) {\n clearElement(div)\n showForms()\n },\n false\n )\n clearElement(naviLeft)\n naviLeft.appendChild(editButton)\n }\n\n // div.appendChild(editButton)\n\n clearElement(naviRight)\n naviRight.appendChild(newInstanceButton())\n } // showResults\n\n const div = dom.createElement('div')\n div.classList.add('schedule-pane')\n applyEnvironmentAttributes(div)\n const structure = div.appendChild(dom.createElement('table')) // @@ make responsive style\n structure.classList.add('schedule-pane__table')\n\n const logInOutButton: LoginStatusBoxLike | null = null\n /*\n const logInOutButton = UI.login.loginStatusBox(dom, setUser)\n // floating divs lead to a mess\n // logInOutButton.setAttribute('style', 'float: right') // float the beginning of the end\n naviLoginout3.appendChild(logInOutButton)\n logInOutButton.setAttribute('style', 'margin-right: 0em;')\n */\n\n const naviTop = structure.appendChild(dom.createElement('tr'))\n const naviMain = naviTop.appendChild(dom.createElement('td'))\n naviMain.classList.add('schedule-pane__main-cell')\n naviMain.setAttribute('colspan', '3')\n\n const naviMenu = structure.appendChild(dom.createElement('tr'))\n naviMenu.classList.add('naviMenu', 'schedule-pane__nav')\n const naviLeft = naviMenu.appendChild(dom.createElement('td'))\n const naviCenter = naviMenu.appendChild(dom.createElement('td'))\n const naviRight = naviMenu.appendChild(dom.createElement('td'))\n\n getForms()\n\n return div\n } // render\n} // property list\n// ends\n"],"mappings":";;;;;;;AAeA,IAAM,IAAK,EAAG,IAGR,IAAyB;CAC7B,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UAAU,IAAI,4BAA4B,GACnD,EAAW,YAAY,CAAQ,GAC/B,EAAW,iBACT,SACA,SAAU,GAAI;KAEZ,AADA,EAAa,CAAG,GAChB,EAAU;IACZ,GACA,EACF,GACA,EAAa,CAAQ,GACrB,EAAS,YAAY,CAAU;GACjC;GAKA,AADA,EAAa,CAAS,GACtB,EAAU,YAAY,EAAkB,CAAC;EAC3C;EAEA,IAAM,IAAM,EAAI,cAAc,KAAK;EAEnC,AADA,EAAI,UAAU,IAAI,eAAe,GACjC,EAA2B,CAAG;EAC9B,IAAM,IAAY,EAAI,YAAY,EAAI,cAAc,OAAO,CAAC;EAC5D,EAAU,UAAU,IAAI,sBAAsB;EAE9C,IAAM,IAA4C,MAU5C,IADU,EAAU,YAAY,EAAI,cAAc,IAAI,CAC3C,CAAA,CAAQ,YAAY,EAAI,cAAc,IAAI,CAAC;EAE5D,AADA,EAAS,UAAU,IAAI,0BAA0B,GACjD,EAAS,aAAa,WAAW,GAAG;EAEpC,IAAM,IAAW,EAAU,YAAY,EAAI,cAAc,IAAI,CAAC;EAC9D,EAAS,UAAU,IAAI,YAAY,oBAAoB;EACvD,IAAM,IAAW,EAAS,YAAY,EAAI,cAAc,IAAI,CAAC,GACvD,IAAa,EAAS,YAAY,EAAI,cAAc,IAAI,CAAC,GACzD,IAAY,EAAS,YAAY,EAAI,cAAc,IAAI,CAAC;EAI9D,OAFA,EAAS,GAEF;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"schedulePane2.esm.js","names":[],"sources":["../../src/schedule/schedulePane.ts"],"sourcesContent":["/* Scheduler Pane\n **\n **\n */\n/* global alert */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Node as RdflibNode, Statement, Variable } from 'rdflib'\nimport formText from './formsForSchedule.ttl'\nimport './schedulePane.css'\nimport '../styles/utilities.css'\n\nconst ns = UI.ns\n\n// @@ Give other combos too-- see schedule ontology\nconst possibleAvailabilities = [\n ns.sched('No'),\n ns.sched('Maybe'),\n ns.sched('Yes')\n]\n\ntype AgendaTask = () => void\n\ntype CopySpec = {\n local: string\n contentType: string\n}\n\ntype MintOptions = {\n newBase: string\n useExisting?: NamedNode\n noIndexHTML?: boolean\n me?: NamedNode | null\n newInstance?: NamedNode\n thisInstance?: NamedNode\n}\n\ntype MatrixOptionsLike = {\n set_x: RdflibNode[]\n set_y: RdflibNode[]\n cellFunction?: (cell: HTMLElement, x: RdflibNode, y: RdflibNode, value: NamedNode | null) => string\n}\n\ntype ResponseQueryVars = {\n time: Variable\n author: Variable\n value: Variable\n resp: Variable\n cell: Variable\n}\n\ntype LoginStatusBoxLike = {\n refresh: () => void\n}\n\nfunction runNextAgendaItem (agenda: AgendaTask[]): void {\n const nextTask = agenda.shift()\n if (nextTask) {\n nextTask()\n }\n}\n\nexport const schedulePane = {\n icon: UI.icons.iconBase + 'noun_346777.svg', // @@ better?\n\n name: 'schedule',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve an Scheduler pane?\n label: function (subject: NamedNode, context: DataBrowserContext) {\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) {\n return 'Scheduling poll'\n }\n return null // No under other circumstances\n },\n\n // Mint a new Schedule poll\n mintClass: ns.sched('SchedulableEvent'),\n\n mintNew: function (context: DataBrowserContext, options: MintOptions) {\n return new Promise<MintOptions>(function (resolve, reject) {\n const ns = UI.ns\n const kb = context.session.store\n let newBase = options.newBase\n const thisInstance =\n options.useExisting || $rdf.sym(options.newBase + 'index.ttl#this')\n\n const complainIfBad = function (ok: boolean, body: string) {\n if (ok) return\n console.log(\n 'Error in Schedule Pane: Error constructing new scheduler: ' + body\n )\n reject(new Error(body))\n }\n\n // ////////////////////// Accesss control\n\n // Two constiations of ACL for this app, public read and public read/write\n // In all cases owner has read write control\n\n const genACLtext = function (docURI: string, aclURI: string, allWrite: boolean) {\n const g = $rdf.graph()\n const auth = $rdf.Namespace('http://www.w3.org/ns/auth/acl#')\n let a = g.sym(aclURI + '#a1')\n const acl = g.sym(aclURI)\n const doc = g.sym(docURI)\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agent'), me as NamedNode, acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n g.add(a, auth('mode'), auth('Write'), acl)\n g.add(a, auth('mode'), auth('Control'), acl)\n\n a = g.sym(aclURI + '#a2')\n g.add(a, UI.ns.rdf('type'), auth('Authorization'), acl)\n g.add(a, auth('accessTo'), doc, acl)\n g.add(a, auth('agentClass'), ns.foaf('Agent'), acl)\n g.add(a, auth('mode'), auth('Read'), acl)\n if (allWrite) {\n g.add(a, auth('mode'), auth('Write'), acl)\n }\n return $rdf.serialize(acl, g, aclURI, 'text/turtle')\n }\n\n /*\n const setACL3 = function (docURI, allWrite, callbackFunction) {\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n return UI.acl.setACL(docURI, aclText, callbackFunction)\n }\n */\n\n const setACL2 = function setACL2 (docURI, allWrite, callbackFunction) {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null // @@ check that this get set by web.js\n\n if (aclDoc) {\n // Great we already know where it is\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher\n .webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n .then(_result => callbackFunction(true))\n .catch(err => {\n callbackFunction(false, err.message)\n })\n } else {\n return fetcher\n .load(docURI)\n .catch(err => {\n callbackFunction(false, 'Getting headers for ACL: ' + err)\n })\n .then(() => {\n const aclDoc = kb.any(\n kb.sym(docURI),\n kb.sym('http://www.iana.org/assignments/link-relations/acl')\n ) as NamedNode | null\n\n if (!aclDoc) {\n // complainIfBad(false, \"No Link rel=ACL header for \" + docURI)\n throw new Error('No Link rel=ACL header for ' + docURI)\n }\n\n const aclText = genACLtext(docURI, aclDoc.uri, allWrite)\n\n return fetcher.webOperation('PUT', aclDoc.uri, {\n data: aclText,\n contentType: 'text/turtle'\n })\n })\n .then(_result => callbackFunction(true))\n .catch(err => {\n callbackFunction(false, err.message)\n })\n }\n }\n\n // Body of mintNew\n const fetcher = kb.fetcher\n const updater = kb.updater\n\n let me: NamedNode | null = options.me || authn.currentUser()\n if (!me) {\n console.log('MUST BE LOGGED IN')\n alert('NOT LOGGED IN')\n return\n }\n\n const baseDir = thisInstance.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a base directory to mint a new poll')\n }\n const base = baseDir.uri\n let newDetailsDoc: NamedNode\n let newInstance: NamedNode\n\n if (options.useExisting) {\n newInstance = options.useExisting\n const existingBaseDir = thisInstance.dir()\n if (!existingBaseDir) {\n throw new Error('Existing schedule instance needs a containing directory')\n }\n newBase = existingBaseDir.uri\n newDetailsDoc = newInstance.doc()\n // newIndexDoc = null\n if (options.newBase) {\n throw new Error(\n 'mint new scheduler: Illegal - have both new base and existing event'\n )\n }\n } else {\n newDetailsDoc = kb.sym(newBase + 'details.ttl')\n // newIndexDoc = kb.sym(newBase + 'index.html')\n newInstance = kb.sym(newDetailsDoc.uri + '#event')\n }\n\n const newResultsDoc = kb.sym(newBase + 'results.ttl')\n\n const toBeCopied: CopySpec[] = options.noIndexHTML\n ? []\n : [{ local: 'index.html', contentType: 'text/html' }]\n\n const agenda: AgendaTask[] = []\n\n // @@ This needs some form of visible progress bar\n for (let f = 0; f < toBeCopied.length; f++) {\n const item = toBeCopied[f]\n const fun = function copyItem (item: CopySpec) {\n agenda.push(function () {\n const newURI = newBase + item.local\n console.log('Copying ' + base + item.local + ' to ' + newURI)\n\n const setThatACL = function () {\n setACL2(newURI, false, function (ok, message) {\n if (!ok) {\n complainIfBad(\n ok,\n 'FAILED to set ACL ' + newURI + ' : ' + message\n )\n console.log('FAILED to set ACL ' + newURI + ' : ' + message)\n } else {\n runNextAgendaItem(agenda) // beware too much nesting\n }\n })\n }\n\n kb.fetcher\n .webCopy(\n base + item.local,\n newBase + item.local,\n item.contentType\n )\n .then(() => authn.checkUser())\n .then(webId => {\n me = webId as NamedNode | null\n\n setThatACL()\n })\n .catch(err => {\n console.log(\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n complainIfBad(\n false,\n 'FAILED to copy ' + base + item.local + ' : ' + err.message\n )\n })\n })\n }\n fun(item)\n }\n\n agenda.push(function createDetailsFile () {\n kb.add(\n newInstance,\n ns.rdf('type'),\n ns.sched('SchedulableEvent'),\n newDetailsDoc\n )\n if (me) {\n kb.add(newInstance, ns.dc('author'), me, newDetailsDoc) // Who is sending the invitation?\n kb.add(newInstance, ns.foaf('maker'), me, newDetailsDoc) // Uneditable - wh is allowed to edit this?\n }\n\n kb.add(\n newInstance,\n ns.dc('created'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n newDetailsDoc\n )\n kb.add(newInstance, ns.sched('resultsDocument'), newDetailsDoc)\n\n updater.put(\n newDetailsDoc,\n kb.statementsMatching(undefined, undefined, undefined, newDetailsDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n runNextAgendaItem(agenda)\n } else {\n complainIfBad(\n ok,\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to save new scheduler at: ' +\n newDetailsDoc +\n ' : ' +\n message\n )\n }\n }\n )\n })\n\n agenda.push(function () {\n kb.fetcher\n .webOperation('PUT', newResultsDoc.uri, {\n data: '',\n contentType: 'text/turtle'\n })\n .then(() => {\n runNextAgendaItem(agenda)\n })\n .catch(err => {\n complainIfBad(\n false,\n 'Failed to initialize empty results file: ' + err.message\n )\n })\n })\n\n agenda.push(function () {\n setACL2(newResultsDoc.uri, true, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set Read-Write ACL on results file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n setACL2(newDetailsDoc.uri, false, function (ok, body) {\n complainIfBad(\n ok,\n 'Failed to set read ACL on configuration file: ' + body\n )\n if (ok) runNextAgendaItem(agenda)\n })\n })\n\n agenda.push(function () {\n // give the user links to the new app\n console.log('Finished minting new scheduler')\n options.newInstance = newInstance\n resolve(options)\n })\n\n runNextAgendaItem(agenda)\n // Created new data files.\n }) // promise\n }, // mintNew\n\n // Render one meeting schedule poll\n render: function (subject: NamedNode, context: DataBrowserContext) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n const invitation = subject\n const appPathSegment = 'app-when-can-we.w3.org' // how to allocate this string and connect to\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n // ////////////////////////////////////////////\n\n const fetcher = kb.fetcher\n const updater = kb.updater\n let waitingForLogin = false\n\n const thisInstance = subject\n const detailsDoc = subject.doc()\n const baseDir = detailsDoc.dir()\n if (!baseDir) {\n throw new Error('Schedule pane needs a containing directory for its details document')\n }\n const base = baseDir.uri\n\n const resultsDoc = $rdf.sym(base + 'results.ttl')\n // const formsURI = base + 'forms.ttl'\n // We can't in fact host stuff from there because of CORS\n const formsURI =\n 'https://solidos.github.io/solid-panes/schedule/formsForSchedule.ttl'\n\n const form1 = kb.sym(formsURI + '#form1')\n const form2 = kb.sym(formsURI + '#form2')\n const form3 = kb.sym(formsURI + '#form3')\n\n $rdf.parse(formText, kb, formsURI, 'text/turtle') // Load forms directly\n\n // Utility functions\n\n const complainIfBad = function (ok, message) {\n if (!ok) {\n div.appendChild(UI.widgets.errorMessageBlock(dom, message, 'pink'))\n }\n }\n\n const clearElement = function (ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild)\n }\n return ele\n }\n\n const refreshCellColor = function (cell, value) {\n const bg = kb.any(value, UI.ns.ui('backgroundColor'))\n if (bg) {\n cell.classList.add('schedule-pane__cell')\n cell.setAttribute(\n 'style',\n 'background-color: ' + bg + ';'\n )\n }\n }\n\n let me: NamedNode | null = null\n\n authn.checkUser().then(webId => {\n me = (webId as NamedNode | null) ?? null\n\n if (logInOutButton) {\n logInOutButton.refresh()\n }\n if (webId && waitingForLogin) {\n waitingForLogin = false\n showAppropriateDisplay()\n }\n })\n console.log('me: ' + me) // @@ curently not actually used elsewhere\n\n // ////////////////////////////// Reproduction: spawn a new instance\n //\n // Viral growth path: user of app decides to make another instance\n //\n\n const newInstanceButton = function () {\n const b = UI.login.newAppInstance(\n dom,\n { noun: 'scheduler', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n if (b.firstChild instanceof HTMLElement) {\n b.firstChild.classList.add('schedule-pane__button')\n }\n return b\n } // newInstanceButton\n\n // /////////////////////// Create new document files for new instance of app\n\n const initializeNewInstanceInWorkspace = function (ws: NamedNode) {\n const uriPrefix = kb.any(ws, ns.space('uriPrefix'))\n let newBase = ''\n if (!uriPrefix) {\n newBase = ws.uri.split('#')[0]\n } else {\n newBase = uriPrefix.value\n }\n if (newBase.slice(-1) !== '/') {\n $rdf.log.error(appPathSegment + ': No / at end of uriPrefix ' + newBase) // @@ paramater?\n newBase = newBase + '/'\n }\n const now = new Date()\n newBase += appPathSegment + '/id' + now.getTime() + '/' // unique id\n\n initializeNewInstanceAtBase(thisInstance, newBase)\n }\n\n const initializeNewInstanceAtBase = function (thisInstance: NamedNode, newBase: string) {\n const options: MintOptions = { thisInstance, newBase }\n schedulePane.mintNew(context, options)\n .then(function (options) {\n if (!options.newInstance) {\n throw new Error('New scheduler instance was not returned')\n }\n const p = div.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'font-size: 140%;')\n p.innerHTML =\n 'Your <a href=\\'' +\n options.newInstance.uri +\n '\\'><b>new scheduler</b></a> is ready to be set up. ' +\n '<br/><br/><a href=\\'' +\n options.newInstance.uri +\n '\\'>Say when you what days work for you.</a>'\n })\n .catch(function (error) {\n complainIfBad(\n false,\n 'Error createing new scheduler at ' +\n options.newInstance +\n ': ' +\n error\n )\n })\n }\n\n // ///////////////////////\n\n const getForms = function () {\n console.log('getforms()')\n getDetails()\n /*\n fetcher.nowOrWhenFetched(formsURI, undefined, function (ok, body) {\n console.log('getforms() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n getDetails()\n })\n */\n }\n\n const getDetails = function () {\n console.log('getDetails()') // Looking for blank screen hang-up\n fetcher.nowOrWhenFetched(detailsDoc.uri, undefined, function (ok, body) {\n console.log('getDetails() ok? ' + ok)\n if (!ok) return complainIfBad(ok, body)\n showAppropriateDisplay()\n })\n }\n\n const showAppropriateDisplay = function showAppropriateDisplay () {\n console.log('showAppropriateDisplay()')\n\n authn.checkUser().then(webId => {\n if (!webId) {\n return showSignon()\n }\n\n // On gh-pages, the turtle will not load properly (bad mime type)\n // but we can trap it as being a non-editable server.\n\n if (\n !kb.updater.editable(detailsDoc.uri, kb) ||\n kb.holds(subject, ns.rdf('type'), ns.wf('TemplateInstance'))\n ) {\n // This is read-only example e.g. on github pages, etc\n showBootstrap()\n return\n }\n\n const ready = kb.any(subject, ns.sched('ready'))\n\n if (!ready) {\n showForms()\n } else {\n // no editing not author\n getResults()\n }\n })\n }\n\n const showSignon = function showSignon () {\n clearElement(naviMain)\n const signonContext = { div, dom }\n UI.login.ensureLoggedIn(signonContext).then(context => {\n me = context.me ?? null\n waitingForLogin = false // untested\n showAppropriateDisplay()\n })\n }\n\n const showBootstrap = function showBootstrap () {\n const div = clearElement(naviMain)\n div.appendChild(\n UI.login.newAppInstance(\n dom,\n { noun: 'poll', appPathSegment },\n function (workspace: string | null, newBase: string) {\n return initializeNewInstanceInWorkspace(\n $rdf.sym(workspace || newBase)\n )\n }\n )\n )\n\n div.appendChild(dom.createElement('hr')) // @@\n\n const p = div.appendChild(dom.createElement('p'))\n p.textContent =\n 'Where would you like to store the data for the poll? ' +\n 'Give the URL of the directory where you would like the data stored.'\n const baseField = div.appendChild(dom.createElement('input'))\n baseField.setAttribute('type', 'text')\n baseField.size = 80 // really a string\n baseField.label = 'base URL'\n baseField.autocomplete = 'on'\n\n div.appendChild(dom.createElement('br')) // @@\n\n const button = div.appendChild(dom.createElement('button'))\n button.classList.add('schedule-pane__button')\n button.textContent = 'Start new poll at this URI'\n button.addEventListener('click', function (_e) {\n let newBase = baseField.value\n if (newBase.slice(-1) !== '/') {\n newBase += '/'\n }\n initializeNewInstanceAtBase(thisInstance, newBase)\n })\n }\n\n // ///////////// The forms to configure the poll\n\n const doneButton = dom.createElement('button')\n\n const showForms = function () {\n clearElement(naviCenter) // Remove refresh button if nec\n const div = naviMain\n\n // form2 depends on sched:allDay; seed a local default for new polls\n if (!kb.any(subject, ns.sched('allDay'))) {\n kb.add(\n subject,\n ns.sched('allDay'),\n $rdf.literal('true', $rdf.sym('http://www.w3.org/2001/XMLSchema#boolean')),\n detailsDoc\n )\n }\n\n const wizard = true\n let currentSlide = 0\n let gotDoneButton = false\n\n const hasFormControls = function (container) {\n return !!container.querySelector('input, select, textarea, button')\n }\n\n const asBoolean = function (term, fallback) {\n if (!term) return fallback\n const value = (term.value || '').toLowerCase()\n if (value === 'true' || value === '1') return true\n if (value === 'false' || value === '0') return false\n return fallback\n }\n\n const renderTimeProposalFallback = function (slide) {\n const allDayValue = asBoolean(kb.any(subject, ns.sched('allDay')), true)\n const fallbackForm = kb.sym(\n formsURI + (allDayValue ? '#AllDayForm2' : '#NotAllDayForm2')\n )\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n fallbackForm,\n detailsDoc,\n complainIfBad\n )\n }\n\n const annotateRenderedForm = function (\n container: HTMLElement,\n includePrimaryFields: boolean = false\n ) {\n const controls = Array.from(\n container.querySelectorAll('input, select, textarea')\n ) as HTMLElement[]\n controls.forEach(control => {\n control.classList.add('schedule-pane__form-control')\n if (control.tagName.toLowerCase() === 'textarea') {\n control.classList.add('schedule-pane__form-control--textarea')\n }\n })\n\n const borderedPanels = Array.from(\n container.querySelectorAll('div[style*=\"border: 0.05em solid\"]')\n ) as HTMLElement[]\n borderedPanels.forEach(panel => {\n panel.classList.add('schedule-pane__panel')\n })\n\n const headings = Array.from(container.querySelectorAll('h3')) as HTMLElement[]\n headings.forEach(heading => {\n heading.classList.add('schedule-pane__form-heading')\n const headingText = (heading.textContent || '').trim().toLowerCase()\n if (headingText === 'time proposals') {\n heading.classList.add('schedule-pane__form-heading--time-proposals')\n heading.closest('.schedule-pane__panel')?.classList.add(\n 'schedule-pane__panel--time-proposals'\n )\n }\n })\n\n if (!includePrimaryFields) {\n return\n }\n\n const labels = Array.from(container.querySelectorAll('.formFieldName'))\n labels.forEach(labelElement => {\n const row = labelElement.parentElement as HTMLElement | null\n const labelText = (labelElement.textContent || '').trim().toLowerCase()\n if (!row) return\n if (labelText === 'summary' || labelText === 'location') {\n row.classList.add('schedule-pane__field-row--compact')\n }\n if (labelText === 'comment') {\n row.classList.add('schedule-pane__field-row--comment')\n }\n })\n\n const commentField = container.querySelector('textarea') as HTMLTextAreaElement | null\n const commentFieldWrapper = commentField?.parentElement as HTMLElement | null\n const commentValueCell = commentFieldWrapper?.parentElement as HTMLElement | null\n const commentRow = commentValueCell?.parentElement as HTMLElement | null\n if (commentRow) {\n commentRow.classList.add('schedule-pane__field-row--comment')\n }\n if (commentValueCell) {\n commentValueCell.classList.add('schedule-pane__field-value--comment')\n }\n }\n\n const unwrapSlide = function (slide: HTMLElement) {\n const firstElement = slide.firstElementChild as HTMLElement | null\n if (!firstElement || slide.childElementCount !== 1) {\n return slide\n }\n return firstElement\n }\n\n if (wizard) {\n const forms = [form1, form2, form3]\n const slides: HTMLElement[] = []\n currentSlide = 0\n for (let f = 0; f < forms.length; f++) {\n const slide = dom.createElement('div')\n UI.widgets.appendForm(\n document,\n slide,\n {},\n subject,\n forms[f],\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(slide, f === 0)\n\n // Some stores end up with form2's ui:Options unresolved; force a usable input form.\n if (f === 1 && !hasFormControls(slide)) {\n renderTimeProposalFallback(slide)\n annotateRenderedForm(slide)\n }\n\n slides.push(unwrapSlide(slide))\n }\n\n const refresh = function () {\n clearElement(naviMain).appendChild(slides[currentSlide])\n\n if (currentSlide === 0) {\n b1.setAttribute('disabled', '')\n } else {\n b1.removeAttribute('disabled')\n }\n if (currentSlide === slides.length - 1) {\n b2.setAttribute('disabled', '')\n if (!gotDoneButton) {\n // Only expose at last slide seen\n naviCenter.appendChild(emailButton) // could also check data shape\n naviCenter.appendChild(doneButton) // could also check data shape\n gotDoneButton = true\n }\n } else {\n b2.removeAttribute('disabled')\n }\n }\n const b1 = clearElement(naviLeft).appendChild(dom.createElement('button'))\n b1.classList.add('schedule-pane__button')\n b1.textContent = '<- go back'\n b1.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide > 0) {\n currentSlide -= 1\n refresh()\n }\n },\n false\n )\n\n const b2 = clearElement(naviRight).appendChild(\n dom.createElement('button')\n )\n b2.classList.add('schedule-pane__button')\n b2.textContent = 'continue ->'\n b2.addEventListener(\n 'click',\n function (_e) {\n if (currentSlide < slides.length - 1) {\n currentSlide += 1\n refresh()\n }\n },\n false\n )\n\n refresh()\n } else {\n // not wizard one big form\n // @@@ create the initial config doc if not exist\n const table = div.appendChild(dom.createElement('table'))\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form1,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table, true)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form2,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n UI.widgets.appendForm(\n document,\n table,\n {},\n subject,\n form3,\n detailsDoc,\n complainIfBad\n )\n annotateRenderedForm(table)\n naviCenter.appendChild(doneButton) // could also check data shape\n }\n // @@@ link config to results\n\n const insertables: Statement[] = []\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('availabilityOptions'),\n ns.sched('YesNoMaybe'),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(\n subject,\n ns.sched('ready'),\n $rdf.literal(\n new Date().toISOString(),\n $rdf.sym('http://www.w3.org/2001/XMLSchema#dateTime')\n ),\n detailsDoc\n )\n )\n insertables.push(\n $rdf.st(subject, ns.sched('results'), resultsDoc, detailsDoc)\n ) // @@ also link in results\n\n doneButton.classList.add('schedule-pane__button')\n doneButton.textContent = 'Go to poll'\n doneButton.addEventListener(\n 'click',\n function (_e) {\n if (kb.any(subject, ns.sched('ready'))) {\n // already done\n getResults()\n naviRight.appendChild(emailButton)\n } else {\n naviRight.appendChild(emailButton)\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n // naviRight.appendChild(emailButton)\n getResults()\n }\n })\n }\n },\n false\n )\n\n const emailButton = dom.createElement('button')\n emailButton.classList.add('schedule-pane__button')\n const emailIcon = emailButton.appendChild(dom.createElement('img'))\n emailIcon.setAttribute('src', UI.icons.iconBase + 'noun_480183.svg') // noun_480183.svg\n emailIcon.classList.add('schedule-pane__button-icon')\n // emailButton.textContent = 'email invitations'\n emailButton.addEventListener(\n 'click',\n function (_e) {\n const title =\n kb.anyValue(subject, ns.cal('summary')) ||\n kb.anyValue(subject, ns.dc('title')) ||\n ''\n const mailto =\n 'mailto:' +\n kb\n .each(subject, ns.sched('invitee'))\n .map(function (who) {\n const mbox = kb.any(who as NamedNode, ns.foaf('mbox')) as NamedNode | null\n return mbox ? mbox.uri.replace('mailto:', '') : ''\n })\n .join(',') +\n '?subject=' +\n encodeURIComponent(title + '-- When can we meet?') +\n '&body=' +\n encodeURIComponent(\n title + '\\n\\nWhen can you?\\n\\nSee ' + subject + '\\n'\n )\n // @@ assumed there is a data browser\n\n console.log('Mail: ' + mailto)\n window.location.href = mailto\n },\n false\n )\n } // showForms\n\n // Ask for each day, what times .. @@ to be added some time\n /*\n const setTimesOfDay = function () {\n const i, j, x, y, slot, cell, day\n const insertables = []\n const possibleDays = kb.each(invitation, ns.sched('option'))\n .map(function (opt) {return kb.any(opt, ns.cal('dtstart'))})\n const cellLookup = []\n const slots = kb.each(invitation, ns.sched('slot'))\n if (slots.length === 0) {\n for (i = 0; i < 2; i++) {\n slot = UI.widgets.newThing(detailsDoc)\n insertables.push($rdf.st(invitation, ns.sched('slot'), slot))\n insertables.push($rdf.st(slot, ns.rdfs('label'), 'slot ' + (i + 1)))\n for (j = 0; j < possibleDays.length; j++) {\n day - possibleDays[j]\n x = kb.any(slot, ns.rdfs('label'))\n y = kb.any(day, ns.cal('dtstart'))\n cell = UI.widgets.newThing(detailsDoc)\n cellLookup[x.toNT() + y.toNT()] = cell\n insertables.push($rdf.st(slot, ns.sched('cell'), cell))\n insertables.push($rdf.st(cell, ns.sched('day'), possibleDays[j]))\n }\n }\n }\n\n const query = new $rdf.Query('TimesOfDay')\n const v = {}['day', 'label', 'value', 'slot', 'cell'].map(function (x) {\n query.consts.push(v[x] = $rdf.constiable(x)) })\n query.pat.add(invitation, ns.sched('slot'), v.slot)\n query.pat.add(v.slot, ns.rdfs('label'), v.label)\n query.pat.add(v.slot, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('timeOfDay'), v.value)\n query.pat.add(v.cell, ns.sched('day'), v.day)\n\n const options = {}\n options.set_x = kb.each(subject, ns.sched('slot')) // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) { return kb.any(opt, ns.rdfs('label')) })\n\n options.set_y = kb.each(subject, ns.sched('option')); // @@@@@ option -> dtstart in future\n options.set_y = options.set_y.map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const possibleTimes = kb.each(invitation, ns.sched('option'))\n .map(function (opt) { return kb.any(opt, ns.cal('dtstart')) })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(UI.matrix.matrixForQuery(\n dom, query, v.time, v.author, v.value, options, function () {}))\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.setAttribute('style', inputStyle)\n refreshButton.textContent = 'refresh'\n refreshButton.addEventListener('click', function (e) {\n refreshButton.disabled = true\n store.fetcher.nowOrWhenFetched(subject.doc(), undefined, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n }, false)\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n const dataPointForNT = []\n\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) { return (! z.sameTerm(me)) })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n // const point = cellLookup[x.toNT() + y.toNT()]\n\n if (y.sameTerm(me)) {\n const callbackFunction = function () { refreshCellColor(cell, value); }; // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('timeOfDay')\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(dom, kb, cellSubject, predicate,\n possibleAvailabilities, selectOptions, resultsDoc, callbackFunction)\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n const myResponse = null\n responses.map(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r\n }\n })\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push($rdf.st(invitation, ns.sched('response'), myResponse, doc))\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.map(function (dataPoint) {\n const time = kb.any(dataPoint, ns.cal('dtstart'))\n dataPointForNT[time.toNT()] = dataPoint\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n if (dataPointForNT[possibleTimes[j].toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push($rdf.st(myResponse, ns.sched('cell'), dataPoint, doc))\n insertables.push($rdf.st(dataPoint, ns.cal('dtstart'), possibleTimes[j], doc)) // @@\n dataPointForNT[possibleTimes[j].toNT()] = dataPoint\n }\n if (insertables.length) {\n store.updater.update([], insertables, function (uri, success, errorBody) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else { // no insertables\n displayTheMatrix()\n }\n }\n */\n // end setTimesOfDay\n\n // Read or create empty results file\n function getResults () {\n fetcher.nowOrWhenFetched(resultsDoc.uri, undefined, (ok, body, response) => {\n if (!ok) {\n if (response.status === 404) {\n // / Check explicitly for 404 error\n console.log('Initializing details file ' + resultsDoc)\n updater.put(resultsDoc, [], 'text/turtle', function (\n uri2,\n ok,\n message\n ) {\n if (ok) {\n clearElement(naviMain)\n showResults()\n } else {\n complainIfBad(\n ok,\n 'FAILED to create results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n console.log(\n 'FAILED to craete results file at: ' +\n resultsDoc.uri +\n ' : ' +\n message\n )\n }\n })\n } else {\n // Other error, not 404 -- do not try to overwite the file\n complainIfBad(ok, 'FAILED to read results file: ' + body)\n }\n } else {\n // Happy read\n clearElement(naviMain)\n showResults()\n }\n })\n }\n\n function showResults () {\n // Now the form for responsing to the poll\n //\n\n // div.appendChild(dom.createElement('hr'))\n\n // const invitation = subject\n const title = kb.any(invitation, ns.cal('summary'))\n const comment = kb.any(invitation, ns.cal('comment'))\n const location = kb.any(invitation, ns.cal('location'))\n const div = naviMain\n if (title) div.appendChild(dom.createElement('h3')).textContent = title.value\n if (location) {\n div.appendChild(dom.createElement('address')).textContent =\n location.value\n }\n if (comment) {\n div.appendChild(dom.createElement('p')).textContent = comment.value\n }\n const author = kb.any(invitation, ns.dc('author')) as NamedNode | null\n if (author) {\n const authorName = kb.any(author, ns.foaf('name'))\n if (authorName) {\n div.appendChild(dom.createElement('p')).textContent = authorName.value\n }\n }\n\n const query = new $rdf.Query('Responses', 0)\n const v = {} as ResponseQueryVars\n v.time = $rdf.variable('time')\n v.author = $rdf.variable('author')\n v.value = $rdf.variable('value')\n v.resp = $rdf.variable('resp')\n v.cell = $rdf.variable('cell')\n query.vars.push(v.time, v.author, v.value, v.resp, v.cell)\n query.pat.add(invitation, ns.sched('response'), v.resp)\n query.pat.add(v.resp, ns.dc('author'), v.author)\n query.pat.add(v.resp, ns.sched('cell'), v.cell)\n query.pat.add(v.cell, ns.sched('availabilty'), v.value)\n query.pat.add(v.cell, ns.cal('dtstart'), v.time)\n\n // Sort by by person @@@\n\n const options: MatrixOptionsLike = { set_x: [], set_y: [] }\n options.set_x = kb.each(subject, ns.sched('option')) as RdflibNode[] // @@@@@ option -> dtstart in future\n options.set_x = options.set_x.map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n }).filter(function (time) {\n return !!time\n })\n\n options.set_y = kb.each(subject, ns.sched('response')) as RdflibNode[]\n options.set_y = options.set_y.map(function (resp) {\n return kb.any(resp as NamedNode, ns.dc('author'))\n }).filter(function (author) {\n return !!author\n })\n\n const possibleTimes = kb\n .each(invitation, ns.sched('option'))\n .map(function (opt) {\n return kb.any(opt as NamedNode, ns.cal('dtstart'))\n })\n .filter(function (time) {\n return !!time\n })\n\n const displayTheMatrix = function () {\n const matrix = div.appendChild(\n UI.matrix.matrixForQuery(\n dom,\n query,\n v.time,\n v.author,\n v.value,\n options,\n function () {}\n )\n )\n\n matrix.setAttribute('class', 'matrix')\n\n const refreshButton = dom.createElement('button')\n refreshButton.classList.add('schedule-pane__button')\n // refreshButton.textContent = 'refresh' // noun_479395.svg\n const refreshIcon = dom.createElement('img')\n refreshIcon.setAttribute('src', UI.icons.iconBase + 'noun_479395.svg')\n refreshIcon.classList.add('schedule-pane__button-icon')\n refreshButton.appendChild(refreshIcon)\n refreshButton.addEventListener(\n 'click',\n function (_e) {\n refreshButton.disabled = true\n kb.fetcher.refresh(resultsDoc, function (ok, body) {\n if (!ok) {\n console.log('Cant refresh matrix' + body)\n } else {\n matrix.refresh()\n refreshButton.disabled = false\n }\n })\n },\n false\n )\n\n clearElement(naviCenter)\n naviCenter.appendChild(refreshButton)\n }\n\n // @@ Give other combos too-- see schedule ontology\n // const possibleAvailabilities = [ SCHED('No'), SCHED('Maybe'), SCHED('Yes') ]\n\n // const me = authn.currentUser()\n\n const dataPointForNT: Record<string, NamedNode> = {}\n\n const loginContext = { div: naviCenter, dom }\n UI.login.ensureLoggedIn(loginContext).then(context => {\n const me = context.me\n if (!me) {\n return\n }\n const doc = resultsDoc\n options.set_y = options.set_y.filter(function (z) {\n return !z.sameTerm(me)\n })\n options.set_y.push(me) // Put me on the end\n\n options.cellFunction = function (cell, x, y, value) {\n if (value !== null) {\n kb.fetcher.nowOrWhenFetched(\n value.uri.split('#')[0],\n undefined,\n function (ok, _error) {\n if (ok) refreshCellColor(cell, value)\n }\n )\n }\n if (y.sameTerm(me)) {\n const callbackFunction = function () {\n refreshCellColor(cell, value)\n return ''\n } // @@ may need that\n const selectOptions = {}\n const predicate = ns.sched('availabilty')\n if (!x) return ''\n const cellSubject = dataPointForNT[x.toNT()]\n const selector = UI.widgets.makeSelectForOptions(\n dom,\n kb,\n cellSubject,\n predicate,\n possibleAvailabilities,\n selectOptions,\n resultsDoc,\n callbackFunction\n )\n cell.appendChild(selector)\n } else if (value !== null) {\n cell.textContent = UI.utils.label(value)\n }\n return ''\n }\n\n const responses = kb.each(invitation, ns.sched('response'))\n let myResponse: NamedNode | null = null\n responses.forEach(function (r) {\n if (kb.holds(r, ns.dc('author'), me)) {\n myResponse = r as NamedNode\n }\n })\n\n const insertables: Statement[] = [] // list of statements to be stored\n\n const id = UI.widgets.newThing(doc).uri\n if (myResponse === null) {\n myResponse = $rdf.sym(id + '_response')\n insertables.push(\n $rdf.st(invitation, ns.sched('response'), myResponse, doc)\n )\n insertables.push($rdf.st(myResponse, ns.dc('author'), me, doc))\n } else {\n const dps = kb.each(myResponse, ns.sched('cell'))\n dps.forEach(function (dataPoint) {\n const time = kb.any(dataPoint as NamedNode, ns.cal('dtstart'))\n if (!time) return\n dataPointForNT[time.toNT()] = dataPoint as NamedNode\n })\n }\n for (let j = 0; j < possibleTimes.length; j++) {\n const possibleTime = possibleTimes[j]\n if (!possibleTime) continue\n if (dataPointForNT[possibleTime.toNT()]) continue\n const dataPoint = $rdf.sym(id + '_' + j)\n insertables.push(\n $rdf.st(myResponse, ns.sched('cell'), dataPoint, doc)\n )\n insertables.push(\n $rdf.st(dataPoint, ns.cal('dtstart'), possibleTime, doc)\n ) // @@\n dataPointForNT[possibleTime.toNT()] = dataPoint\n }\n if (insertables.length) {\n kb.updater.update([], insertables, function (\n uri,\n success,\n errorBody\n ) {\n if (!success) {\n complainIfBad(success, errorBody)\n } else {\n displayTheMatrix()\n }\n })\n } else {\n // no insertables\n displayTheMatrix()\n }\n }) // @@@@ end of .then\n\n // If I made this in the first place, allow me to edit it.\n // @@ optionally -- allows others to if according to original\n const instanceCreator = kb.any(subject, ns.foaf('maker')) // owner?\n if (!instanceCreator || !me || instanceCreator.sameTerm(me)) {\n const editButton = dom.createElement('button')\n editButton.classList.add('schedule-pane__button')\n // editButton.textContent = '(Modify the poll)' // noun_344563.svg\n const editIcon = dom.createElement('img')\n editIcon.setAttribute('src', UI.icons.iconBase + 'noun_344563.svg')\n editIcon.classList.add('schedule-pane__button-icon')\n editButton.appendChild(editIcon)\n editButton.addEventListener(\n 'click',\n function (_e) {\n clearElement(div)\n showForms()\n },\n false\n )\n clearElement(naviLeft)\n naviLeft.appendChild(editButton)\n }\n\n // div.appendChild(editButton)\n\n clearElement(naviRight)\n naviRight.appendChild(newInstanceButton())\n } // showResults\n\n const div = dom.createElement('div')\n div.classList.add('schedule-pane')\n applyEnvironmentAttributes(div)\n const structure = div.appendChild(dom.createElement('table')) // @@ make responsive style\n structure.classList.add('schedule-pane__table')\n\n const logInOutButton: LoginStatusBoxLike | null = null\n /*\n const logInOutButton = UI.login.loginStatusBox(dom, setUser)\n // floating divs lead to a mess\n // logInOutButton.setAttribute('style', 'float: right') // float the beginning of the end\n naviLoginout3.appendChild(logInOutButton)\n logInOutButton.setAttribute('style', 'margin-right: 0em;')\n */\n\n const naviTop = structure.appendChild(dom.createElement('tr'))\n const naviMain = naviTop.appendChild(dom.createElement('td'))\n naviMain.classList.add('schedule-pane__main-cell')\n naviMain.setAttribute('colspan', '3')\n\n const naviMenu = structure.appendChild(dom.createElement('tr'))\n naviMenu.classList.add('naviMenu', 'schedule-pane__nav')\n const naviLeft = naviMenu.appendChild(dom.createElement('td'))\n const naviCenter = naviMenu.appendChild(dom.createElement('td'))\n const naviRight = naviMenu.appendChild(dom.createElement('td'))\n\n getForms()\n\n return div\n } // render\n} // property list\n// ends\n"],"mappings":";;;;;;;AAeA,IAAM,IAAK,EAAG,IAGR,IAAyB;CAC7B,EAAG,MAAM,IAAI;CACb,EAAG,MAAM,OAAO;CAChB,EAAG,MAAM,KAAK;AAChB;AAoCA,SAAS,EAAmB,GAA4B;CACtD,IAAM,IAAW,EAAO,MAAM;CAC9B,AAAI,KACF,EAAS;AAEb;AAEA,IAAa,IAAe;CAC1B,MAAM,EAAG,MAAM,WAAW;CAE1B,MAAM;CAEN,UAAU,CAAC,EAAG,MAAM,WAAW,CAAC;CAGhC,OAAO,SAAU,GAAoB,GAA6B;EAMhE,OALW,EAAQ,QAAQ,MACd,aAAa,CACtB,CAAA,CAAE,wDACG,oBAEF;CACT;CAGA,WAAW,EAAG,MAAM,kBAAkB;CAEtC,SAAS,SAAU,GAA6B,GAAsB;EACpE,OAAO,IAAI,QAAqB,SAAU,GAAS,GAAQ;GACzD,IAAM,IAAK,EAAG,IACR,IAAK,EAAQ,QAAQ,OACvB,IAAU,EAAQ,SAChB,IACJ,EAAQ,eAAe,EAAK,IAAI,EAAQ,UAAU,gBAAgB,GAE9D,IAAgB,SAAU,GAAa,GAAc;IACrD,MACJ,QAAQ,IACN,+DAA+D,CACjE,GACA,EAAW,MAAM,CAAI,CAAC;GACxB,GAOM,IAAa,SAAU,GAAgB,GAAgB,GAAmB;IAC9E,IAAM,IAAI,EAAK,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AAI,cAAc,IAAI,CAAC,GACzD,IAAY,EAAS,YAAY,EAAI,cAAc,IAAI,CAAC;EAI9D,OAFA,EAAS,GAEF;CACT;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("./icons.cjs.js"),require("./spinner.cjs.js");let e=require("solid-ui");require("rdflib"),require("
|
|
1
|
+
require("./icons.cjs.js"),require("./spinner.cjs.js");let e=require("solid-ui");require("rdflib"),require("solid-ui/components/button"),require("lit-html"),e.ns.foaf(`homepage`),e.ns.foaf(`weblog`),e.ns.foaf(`workplaceHomepage`),e.ns.foaf(`schoolHomepage`);function t(e,t,n,r){}exports.appendProfileLinks=t;
|
|
2
2
|
//# sourceMappingURL=editProfileDetails.cjs.js.map
|
|
@@ -2,8 +2,8 @@ import "./icons.esm.js";
|
|
|
2
2
|
import "./spinner.esm.js";
|
|
3
3
|
import { ns as e } from "solid-ui";
|
|
4
4
|
import "rdflib";
|
|
5
|
-
import "lit-html";
|
|
6
5
|
import "solid-ui/components/button";
|
|
6
|
+
import "lit-html";
|
|
7
7
|
e.foaf("homepage"), e.foaf("weblog"), e.foaf("workplaceHomepage"), e.foaf("schoolHomepage");
|
|
8
8
|
function t(e, t, n, r) {}
|
|
9
9
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.social-pane-host,.social-pane{--profile-interactive-cursor:pointer;background:var(--color-background,#f8f9fb);border-radius:var(--border-radius-base,.3125rem);box-sizing:border-box;width:100%;min-width:100%;max-width:none;margin:0;display:block;overflow:visible}.social-pane__header-content{align-items:flex-start;column-gap:var(--spacing-md,1.25rem);row-gap:var(--spacing-xxs,.3125rem);grid-template-columns:auto minmax(0,1fr) auto;width:100%;min-width:0;display:grid}.social-pane__header-media{grid-area:1/1}.social-pane__header-details{flex-direction:column;grid-area:1/2;align-items:flex-start;min-width:0;display:flex}.social-pane__header-actions{place-self:flex-start end;align-items:flex-start;gap:var(--spacing-xs,.5rem);flex-wrap:wrap;grid-area:1/3;margin-left:auto;display:flex}.social-pane__header-actions--friend{justify-content:center}.social-pane__header-actions--friend>solid-ui-button{--button-border-radius:var(--border-radius-md,.5rem);--button-hover-text:var(--color-primary,#7c4dff);--button-hover-border:var(--color-primary,#7c4dff);margin-inline:auto}.social-pane__header-summary{align-items:flex-start;gap:var(--spacing-xxs,.125rem);flex-direction:column;width:100%;max-width:100%;display:flex}.social-pane__header-stats{gap:var(--spacing-xs,.75rem);margin-top:var(--spacing-xxs,.3125rem);flex-wrap:wrap;justify-content:flex-start;align-self:flex-start;display:flex}.social-pane__header-stat{appearance:none;cursor:var(--profile-interactive-cursor,pointer);color:var(--slate-700,#314158);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-bold,600);line-height:var(--line-height-tight,1.4);background:0 0;border:0;padding:0;text-decoration:none}.social-pane__header-stat+.social-pane__header-stat:before{content:"◆";color:var(--gray-400,#99a1af);margin-right:var(--spacing-xs,.75rem);vertical-align:middle;font-size:.5rem}.social-pane__header-stat:hover .social-pane__header-stat-label{text-decoration:underline}.social-pane__header-stat:focus-visible{outline:var(--border-width-medium,2px) solid #111827;outline-offset:2px}.social-pane__edit-button{--button-height-sm:0;--button-padding-sm:var(--spacing-xxs,.3125rem);--button-background:transparent;--button-border:transparent;--button-border-width:0;--button-hover-background:transparent;--button-hover-border:transparent;--button-text:var(--color-primary,#7c4dff);--button-hover-text:var(--color-primary,#7c4dff);--button-font-size-sm:var(--font-size-sm,.875rem);--button-font-weight:var(--font-weight-regular,400);--button-line-height:var(--line-height-base,1.5);--button-icon-size-sm:.875rem;width:auto;min-width:0;max-width:none;display:inline-block;position:static}.social-pane__edit-button::part(button):hover{text-decoration:underline}.social-pane__edit-button::part(button):focus-visible{outline:var(--border-width-medium,2px) solid var(--color-primary,#7c4dff);outline-offset:2px}.social-pane__edit-button-label{align-items:center;gap:var(--spacing-xxs,.3125rem);display:inline-flex}.social-pane__edit-button .profile-section-collapsible__edit-icon,.social-pane__edit-button-icon{line-height:0;display:none}.social-pane__edit-button-label svg,.social-pane__edit-button-icon svg,.social-pane__edit-button .profile-section-collapsible__edit-icon svg{vertical-align:middle;flex:none;width:.875rem;height:.875rem;display:inline-block}.social-pane__edit-button-label svg path,.social-pane__edit-button-icon svg path,.social-pane__edit-button .profile-section-collapsible__edit-icon svg path{fill:var(--color-primary,#7c4dff);stroke:none}.social-pane__dialog-backdrop{z-index:1000;background:#0f172a73;padding:1rem;position:fixed;inset:0}.social-pane__dialog{background:var(--white,#fff);width:min(32rem,100%);max-height:calc(100vh - 2rem);color:var(--color-text,#111827);padding:var(--spacing-md,1.25rem);border-radius:1rem;position:relative;overflow:auto;box-shadow:0 20px 45px #0f172a40}.social-pane__dialog-header{justify-content:space-between;align-items:flex-start;gap:var(--spacing-md,1rem);padding-bottom:var(--spacing-base,.5rem);margin-bottom:var(--spacing-sm,.938rem);border-bottom:var(--border-width-sm,.1rem) solid var(--slate-200,#e2e8f0);display:flex}.social-pane__dialog-title{margin:0 0 var(--spacing-base,.5rem)}.social-pane__dialog-close{--button-background:transparent;--button-border:transparent;--button-border-width:0;--button-hover-background:transparent;--button-hover-border:transparent;color:var(--color-text-subheading,#6b7280);cursor:pointer;flex:none;padding:0;line-height:0}.social-pane__dialog-close:hover{color:var(--color-text-primary,#364153)}.social-pane__dialog-close:focus-visible{outline:var(--border-width-medium,2px) solid var(--color-text-primary,#364153);outline-offset:2px}.social-pane__dialog-close svg{width:var(--icon-xxxs,.75rem);height:var(--icon-xxxs,.75rem)}.social-pane__dialog-close svg path{fill:currentColor}.social-pane__dialog-form{gap:var(--spacing-sm,.938rem)}.social-pane__dialog-fields{gap:var(--spacing-sm,.938rem);flex-direction:column;display:flex}.social-pane__dialog-field{gap:.2rem}.social-pane__dialog-field-header{justify-content:space-between;align-items:center;gap:var(--spacing-xs,.75rem);display:flex}.social-pane__dialog-row-list{flex-direction:column;gap:.2rem;display:flex}.social-pane__dialog-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.45rem;display:grid}.social-pane__dialog-label{color:var(--gray-700,#364153);font-size:var(--font-size-md,1rem);font-weight:var(--font-weight-md,500);margin:0;line-height:normal}.social-pane__dialog-input{box-sizing:border-box;resize:none;width:100%;min-height:auto}.social-pane__dialog-error{min-height:1.25rem;color:var(--color-warning,red);margin:0}.social-pane__dialog-saving-overlay{z-index:10;background:#ffffffc7;place-items:center;display:grid;position:absolute;inset:0}.social-pane__dialog-saving-overlay[hidden]{display:none}.social-pane__dialog.modal--saving .social-pane__dialog-form{opacity:.45;pointer-events:none}.social-pane__dialog .modal__saving-indicator{gap:0}.social-pane__dialog-row-button-icon{flex:none;justify-content:center;align-items:center;line-height:0;display:inline-flex}.social-pane__dialog-row-button-icon svg{display:block}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add{box-sizing:border-box;--button-min-height:auto;--button-padding-sm:var(--spacing-xxs,.3125rem);--button-background:transparent;--button-border:transparent;--button-border-width:0;--button-hover-background:transparent;--button-hover-border:transparent;--button-text:var(--color-primary,#7c4dff);--button-hover-text:var(--color-primary,#7c4dff);--button-height-sm:auto;--button-font-weight:var(--font-weight-md,500);--button-font-size-sm:var(--font-size-sm,.875rem);--button-line-height:var(--line-height-base,1.5);flex:none;justify-self:flex-start;width:auto;min-width:0;max-width:none;margin-left:auto}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add::part(button){min-height:auto;padding:var(--spacing-xxs,.3125rem);color:var(--color-primary,#7c4dff);font-weight:var(--font-weight-md,500);background:0 0;border:none}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add:hover::part(button){text-decoration:underline}.social-pane__add-more-content{display:inline}.social-pane__add-more-inline{white-space:normal;display:inline}.social-pane__add-more-icon{width:var(--icon-xxxs,.75rem);height:var(--icon-xxxs,.75rem);margin-right:var(--spacing-xxs,.3125rem);vertical-align:text-top;line-height:0;display:inline-block}.social-pane__add-more-icon svg{width:100%;height:100%;display:block}.social-pane__dialog-row-list solid-ui-button.social-pane__dialog-row-button--remove{min-height:var(--min-touch-target,44px);min-width:var(--min-touch-target,44px);color:var(--gray-300,#d1d5dc);--button-background:transparent;--button-box-shadow:none;--button-active-box-shadow:none;--button-active-transform:none;--button-border:transparent;--button-border-width:0;--button-border-radius:var(--border-radius-base,.3125rem);--button-hover-background:var(--lavender-300,#e6dcff);--button-hover-border:transparent;--button-hover-text:var(--color-primary,#7c4dff);--button-hover-box-shadow:none;--button-text:currentColor;--button-height-md:var(--min-touch-target,44px);--button-padding-md:0;--button-padding-x-sm:0;--button-icon-size-md:var(--icon-xxs,1rem);--button-icon-size-lg:var(--icon-xxs,1rem)}.social-pane__dialog-row-list solid-ui-button.social-pane__dialog-row-button--remove:hover,.social-pane__dialog-row-list solid-ui-button.social-pane__dialog-row-button--remove:focus-within{color:var(--gray-300,#d1d5dc)}.social-pane__dialog-row-button-icon--remove svg{width:1rem;height:1rem}.social-pane__dialog-row-button-icon--remove svg path{stroke:currentColor}.social-pane__dialog-actions{justify-content:flex-end;gap:var(--spacing-xs,.75rem);padding-top:var(--spacing-base,.5rem);border-top:var(--border-width-sm,.1rem) solid var(--slate-200,#e2e8f0);margin-top:0;display:flex}.social-pane__dialog-actions>solid-ui-button{--button-border-width:1px;--button-border-radius:var(--border-radius-base,.3125rem);--button-box-shadow:none;--button-hover-box-shadow:none;--button-active-box-shadow:none;--button-active-transform:none;width:10.8rem}.social-pane__dialog-actions solid-ui-button.social-pane__dialog-button--save{--button-font-size-md:var(--font-size-lg,1.125rem);--button-background:var(--color-primary,#7c4dff);--button-border:var(--color-primary,#7c4dff);--button-text:var(--white,#fff);--button-hover-background:color-mix(in srgb, var(--color-primary,#7c4dff) 90%, black);--button-hover-border:color-mix(in srgb, var(--color-primary,#7c4dff) 90%, black);--button-hover-text:var(--white,#fff)}.social-pane__dialog-actions solid-ui-button.social-pane__dialog-button--cancel{--button-background:var(--white,#fff);--button-border:var(--gray-300,#d1d5dc);--button-font-weight:var(--font-weight-normal,normal);--button-text:var(--gray-800,#1e2939);--button-hover-background:var(--blue-900,#083575);--button-hover-border:var(--blue-900,#083575);--button-hover-text:var(--white,#fff);--button-font-size-md:var(--font-size-sm,.875rem)}.social-pane__header-name{color:var(--color-text-heading,#000);font-size:var(--font-size-xxl,1.75rem);font-weight:var(--font-weight-bold,600);text-indent:0;text-align:left;overflow-wrap:anywhere;margin:0;padding:0;line-height:1.2;transform:translate(-4px)}.social-pane__header-location{align-items:center;gap:var(--spacing-2xs,.625rem);color:var(--color-text-secondary,#4a5565);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-normal,400);line-height:1.2;display:inline-flex}.social-pane__header-job-org{color:var(--color-text-subheading,#101828);white-space:normal;width:100%;font-size:var(--font-size-lg,1.125rem);font-weight:var(--font-weight-md,500);text-align:left;margin:0;line-height:1.25}.social-pane__header-location-icon{line-height:0}.social-pane__header-location-icon svg{width:var(--icon-xxs,1rem);height:var(--icon-xxs,1rem)}.social-profile-links{grid-template-columns:repeat(2,max-content);align-items:start;gap:.15rem 1rem;display:grid}.social-pane__header-hero{border-radius:var(--border-radius-full,.625rem);border:var(--border-width-sm,.1rem) solid var(--color-primary,#7c4dff);background:var(--gray-200,#e5e7eb) 50% / cover no-repeat;object-fit:cover;object-position:center;background-position:50%;width:140px;height:140px}.social-pane__header-hero-icon{border:var(--border-width-sm,.1rem) solid var(--color-primary,#7c4dff);background:var(--color-card-bg);flex-shrink:0;width:140px;height:140px;line-height:0;border-radius:var(--border-radius-full,.625rem)!important}.social-pane__header-hero-icon svg{width:100%;height:100%;display:block}.social-pane .social-layout{align-items:flex-start;gap:1rem;width:100%;display:flex}.social-pane .social-primary{flex:70%;grid-template-rows:auto minmax(0,auto);grid-template-columns:minmax(0,1fr);align-items:start;gap:0;min-width:0;display:grid}.social-pane .social-primary__tabs{align-items:center;gap:var(--spacing-base,.5rem);z-index:1;background:0 0;grid-area:1/1;width:fit-content;max-width:100%;margin-bottom:0;padding:0;display:flex;position:relative}.social-pane .social-primary__tab{appearance:none;border:0;border-bottom:var(--border-width-sm,.1rem) solid transparent;color:#374151;cursor:pointer;font:inherit;font-weight:var(--font-weight-bold,600);padding:var(--spacing-2xs,.625rem) 1rem;background:0 0;border-radius:0;transition:background-color .12s,color .12s,box-shadow .12s;box-shadow:none!important}.social-pane .social-primary__tab:hover{color:var(--grey-purple-900,#332746);background:var(--lavender-300,#e6dcff)!important;box-shadow:none!important}.social-pane .social-primary__tab[aria-selected=true],.social-pane .social-primary__tab--active{color:var(--grey-purple-900,#332746);border-bottom-color:var(--color-primary,#7c4dff);background:0 0;box-shadow:none!important}.social-pane .social-primary__tab:focus-visible{outline-offset:2px;outline:none;box-shadow:none!important}.social-pane .social-primary__panel{opacity:0;visibility:hidden;pointer-events:none;grid-area:2/1;transition:opacity .16s,transform .16s,visibility 0s linear .16s;display:none;transform:translateY(.35rem)}.social-pane .social-primary__panel--active{opacity:1;visibility:visible;pointer-events:auto;border:0;border-bottom:var(--border-width-sm,.1rem) solid transparent;transition:opacity .18s,transform .18s;display:block;transform:translateY(0)}.social-pane .social-pane__mutual-friends,.social-pane .social-pane__all-friends{padding-top:var(--spacing-xxxs,.2rem);margin-top:0}.social-pane .social-main{background-color:var(--color-card-bg,#fff);color:var(--color-text-primary,#364153);box-sizing:border-box;border-collapse:collapse;border:0;width:100%;padding:0;display:table}.social-pane .social-main--mutual{gap:var(--spacing-xs,.75rem);border-radius:var(--border-radius-lg,.75rem);margin-top:1em;margin-bottom:1em;padding:1rem}.social-pane .social-main--requests{gap:var(--spacing-md,1rem);border-radius:var(--border-radius-lg,.75rem);flex-direction:column;margin-top:.75rem;margin-bottom:1rem;padding:1rem;display:flex}.social-requests__note{color:var(--color-text-subheading,#475467);font-size:var(--font-size-sm,.875rem);margin:0;line-height:1.5}.social-requests__group{gap:var(--spacing-sm,.938rem)}.social-requests__group-header{flex-direction:column;gap:.125rem;display:flex}.social-requests__group-title{color:var(--color-text-heading,#101828);font-size:var(--font-size-lg,1.125rem);margin:0;line-height:1.25}.social-requests__group-description,.social-requests__empty{color:var(--color-text-subheading,#667085);font-size:var(--font-size-sm,.875rem);margin:0;line-height:1.5}.social-requests__table{margin-top:0}.social-pane .social-mutual-summary{gap:var(--spacing-base,.5rem)}.social-pane .social-mutual-summary-line{color:var(--slate-700,#314158);font-size:var(--font-size-sm,.95rem);line-height:var(--line-height-base,1.5);justify-content:flex-start;padding:1rem}.social-pane .social-mutual-summary-line--action{gap:var(--spacing-xxs,.75rem);flex-wrap:wrap}.social-pane .social-mutual-confirm-prompt{align-items:center;gap:var(--spacing-xxxs,.2rem);font-weight:var(--font-weight-semibold,600);flex-wrap:wrap;display:inline-flex}.social-pane .social-pane__friend-action--inline{z-index:auto;align-self:flex-start;position:static;top:auto;right:auto}.social-pane .social-mutual-checkbox-form{margin:0;padding:0 1rem 1rem;display:block}.social-pane .social-mutual-checkbox-form label{align-items:center;gap:var(--spacing-2xs,.65rem);color:var(--slate-700,#374151);font-size:var(--font-size-sm,.875rem);flex-wrap:wrap;line-height:1.4;display:inline-flex}.social-pane .social-mutual-checkbox-form input[type=checkbox]{width:1rem;height:1rem;accent-color:var(--color-primary,#7c4dff);margin:0}.social-pane .social-mutual-checkbox-form input[type=checkbox]:disabled{opacity:.65;cursor:not-allowed}.social-pane .social-friends-list{width:100%;margin-top:0}.social-pane .social-friends-grid{table-layout:fixed;border-collapse:separate;border-spacing:0;align-items:stretch;gap:var(--spacing-xs,.75rem);flex-wrap:wrap;width:100%;display:flex}.social-pane .social-friends-grid>tbody{align-items:stretch;gap:var(--spacing-xs,.75rem);flex-wrap:wrap;width:100%;display:flex}.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr{table-layout:fixed;box-sizing:border-box;width:calc(50% - .375rem);display:inline-table}.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr,.social-pane .social-friend-card{border:1px solid var(--gray-200,#e5e7eb);background:var(--white,#fff);border-radius:var(--border-radius-lg,.75rem);transition:box-shadow .14s,border-color .14s,transform .14s;overflow:visible;box-shadow:0 1px 3px #00000014}.social-pane .social-friends-grid>tr:hover,.social-pane .social-friends-grid>tbody>tr:hover,.social-pane .social-friend-card:hover{border-color:var(--gray-300,#d1d5dc);transform:translateY(-1px);box-shadow:0 6px 18px #0000001a}.social-pane .social-friends-grid>tr td,.social-pane .social-friends-grid>tbody>tr td,.social-pane .social-friend-card td{background:var(--color-background,#f8f9fb);box-sizing:border-box}.social-pane .social-friends-grid>tr>td:nth-child(2),.social-pane .social-friends-grid>tbody>tr>td:nth-child(2){width:auto;min-width:0;padding-left:1.4rem}.social-pane .social-friends-grid>tr>td:nth-child(3),.social-pane .social-friends-grid>tbody>tr>td:nth-child(3){vertical-align:top;width:2.5rem;min-width:2.5rem;padding-left:.25rem}.social-pane .social-friends-grid>tr>td:first-child,.social-pane .social-friends-grid>tbody>tr>td:first-child{padding-right:1.2rem}.social-pane .social-friends-grid td>div>div{overflow-wrap:anywhere;white-space:normal!important;width:100%!important;min-width:0!important;max-width:100%!important}.social-pane .social-friends-grid td>div>div button{white-space:normal!important}.social-pane .social-friends-grid>tr>td:nth-child(2)>div:first-child,.social-pane .social-friends-grid>tbody>tr>td:nth-child(2)>div:first-child{flex-wrap:wrap;align-items:flex-start;gap:.2rem .4rem;min-width:0;display:flex}.social-pane .social-friends-grid>tr>td:nth-child(2)>div:first-child>span:first-of-type,.social-pane .social-friends-grid>tbody>tr>td:nth-child(2)>div:first-child>span:first-of-type{vertical-align:text-top;max-width:100%;font-size:var(--font-size-lg,1.125rem);font-weight:var(--font-weight-bold,600);line-height:var(--line-height-tight);text-overflow:clip;white-space:normal;overflow-wrap:anywhere;margin-top:0;margin-bottom:0;display:inline-block;overflow:visible}.social-pane .social-friend-pronouns{margin-left:var(--spacing-xs,.25rem);color:var(--color-text-secondary,#4a5565);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-regular,400);text-align:left;line-height:1.2;display:inline}.social-pane .social-friend-job-org{white-space:normal;overflow-wrap:anywhere;width:100%;min-width:0;color:var(--color-text-subheading,#101828);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-medium,500);text-align:left;margin:0;line-height:1.25}.social-pane .social-friend-location{color:var(--color-text-secondary,#6b7280);font-size:var(--font-size-xs,.8125rem);overflow-wrap:anywhere;line-height:1.3}@media (width<=960px){.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr{width:100%}}.social-pane .social-friends-header{padding:0 var(--spacing-xs,.75rem) var(--spacing-base,.5rem);background-color:var(--gray-100,#f3f4f6);caption-side:top;justify-content:space-between;align-items:center;margin-top:0;display:flex}.social-pane .social-friends-header-title{font-size:var(--font-size-md,1rem);font-weight:var(--font-weight-bold,600);color:var(--color-text-primary,#364153)}.social-pane .social-friends-header-actions{justify-content:flex-end;align-items:center;display:inline-flex}.social-pane .social-friends-header-actions--standalone{align-items:center;gap:var(--spacing-xs,.75rem);justify-content:flex-start;padding:.7rem 1rem 0;display:flex}.social-pane .social-friends-header-dropzone{border-collapse:collapse}.social-pane .social-friends-header-dropzone-cell{padding:0}.social-pane .social-friends-header-hint{color:var(--color-text-secondary,#4a5565);font-size:var(--font-size-sm,.875rem);line-height:1.4}.social-pane .social-friends-header-actions button{justify-content:center;align-items:center;display:inline-flex;overflow:hidden;border-width:0!important;width:2rem!important;min-width:2rem!important;height:2rem!important;margin:0!important;padding:0!important}.social-pane .social-friends-header-actions button img{object-fit:contain;pointer-events:none;display:block;width:100%!important;height:100%!important}div.social-pane{margin:0;padding-top:0;padding-bottom:0}.social-pane a{color:var(--color-primary,#7c4dff);font-weight:700;text-decoration:none}.social-pane a:hover{color:var(--color-primary,#7c4dff);font-weight:700;text-decoration:underline}.social-pane a:active{color:var(--color-primary,#7c4dff);text-decoration:none}.social-pane__link-button{white-space:nowrap;width:fit-content;max-width:100%;padding:var(--spacing-xxxs,.2rem) var(--spacing-base,.5rem);text-align:left;background-color:#0000;border:none;margin-top:0;margin-bottom:0;display:inline-flex}.social-pane__link-button>a{white-space:normal;overflow-wrap:anywhere;max-width:100%;color:var(--color-primary,#7c4dff);background-color:#0000;display:inline-flex}.social-pane__link-button>a:link,.social-pane__link-button>a:visited,.social-pane__link-button>a:hover{color:var(--color-primary,#7c4dff)}.social-pane__link-button>a:hover{text-decoration:underline}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-content{align-items:start;column-gap:var(--spacing-md,1rem);grid-template-columns:4.375rem minmax(0,1fr) auto;row-gap:.25rem;padding:1rem 1rem 0;display:grid}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-media{display:contents}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-details{flex-direction:column;grid-area:1/2;align-items:flex-start;gap:.125rem;min-width:0;display:flex}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-actions{justify-content:flex-end;justify-self:end;gap:var(--spacing-2xs,.3125rem);grid-area:1/3;width:auto;margin-left:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-actions--friend{grid-area:3/1/auto/-1;justify-content:center;justify-self:stretch;width:100%;margin-top:.125rem;margin-left:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-summary{flex-direction:column;gap:0;width:100%;display:flex}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__header-name,.social-pane__header-job-org,.social-pane__header-location){text-align:left;justify-content:flex-start;width:100%}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-stats{justify-content:flex-start;align-self:flex-start;gap:var(--spacing-xs,.5rem);width:100%;margin-top:-.4375rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-profile-links{row-gap:var(--spacing-xxxs,.2rem);grid-area:2/1/auto/-1;grid-template-columns:1fr;justify-items:start;margin-top:-.375rem;padding-left:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-primary__tabs,:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-primary__tabs{margin-top:-.5rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__link-button{justify-self:start;padding-left:0;padding-right:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__link-button>a{font-size:var(--font-size-sm,.875rem);text-align:left}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-field-header{grid-template-columns:minmax(0,1fr)}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__header-hero,.social-pane__header-hero-icon){aspect-ratio:1;grid-area:1/1;width:5rem;height:5rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-name{font-size:var(--font-size-xl,1.375rem);line-height:1.15}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-job-org{font-size:var(--font-size-md,1rem);line-height:1.25}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friend-pronouns{font-size:.6875rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__header-location,.social-pane__header-stat),:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friend-location{font-size:var(--font-size-xxs,.75rem)}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-label,.social-pane__edit-button .profile-section-collapsible__edit-label){display:none!important}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__edit-button{--button-background:transparent;--button-border-width:0;--button-border:transparent;--button-text:var(--color-text,#1a1a1a);--button-hover-background:var(--lavender-300,#e6dcff);--button-hover-border:transparent;--button-hover-text:var(--color-text,#1a1a1a);--button-font-size-sm:clamp(.9rem, 2.1vw, 1rem);--button-font-weight:var(--font-weight-regular,400);--button-icon-size-sm:.875rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-icon,.social-pane__edit-button .profile-section-collapsible__edit-icon){justify-content:center;align-items:center;width:.875rem;height:.875rem;line-height:0;display:inline-flex}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-icon svg,.social-pane__edit-button .profile-section-collapsible__edit-icon svg){width:.875rem;height:.875rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-icon svg path,.social-pane__edit-button .profile-section-collapsible__edit-icon svg path){fill:var(--color-text,#1a1a1a);stroke:none}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-actions{justify-content:center;align-items:center;gap:var(--spacing-sm,.938rem);padding:var(--spacing-md,1rem) 0 0;margin:var(--spacing-md,1rem) auto 0;box-sizing:border-box;flex-direction:row;width:100%}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-actions>solid-ui-button{flex:none;width:10.8rem;min-width:8.5rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add::part(button){font-size:var(--font-size-sm,.875rem);line-height:var(--line-height-base,1.5)}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friends-header-actions--standalone{gap:var(--spacing-2xs,.625rem);flex-wrap:wrap;padding-top:.35rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane .social-layout,.social-pane .social-primary,.social-layout,.social-primary),:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friends-grid,:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-friends-grid{display:block}:is(.social-pane-host,.social-pane)[data-input-mode=touch]{--profile-interactive-cursor:auto}:is(.social-pane-host,.social-pane)[data-input-mode=pointer]{--profile-interactive-cursor:pointer}@media (width<=600px){.social-pane__header-content{align-items:start;column-gap:var(--spacing-md,1rem);grid-template-columns:4.375rem minmax(0,1fr) auto;row-gap:.25rem;padding:1rem 1rem 0;display:grid}.social-pane__header-media{display:contents}.social-pane__header-details{flex-direction:column;grid-area:1/2;align-items:flex-start;gap:.125rem;min-width:0;display:flex}.social-pane__header-actions{justify-content:flex-end;justify-self:end;gap:var(--spacing-2xs,.3125rem);grid-area:1/3;width:auto;margin-left:0}.social-pane__header-actions--friend{grid-area:3/1/auto/-1;justify-content:center;justify-self:stretch;width:100%;margin-top:.125rem;margin-left:0}.social-pane__header-summary{flex-direction:column;gap:0;width:100%;display:flex}.social-pane__header-name,.social-pane__header-job-org,.social-pane__header-location{text-align:left;justify-content:flex-start;width:100%}.social-pane__header-stats{justify-content:flex-start;align-self:flex-start;gap:var(--spacing-xs,.5rem);width:100%;margin-top:-.4375rem}.social-profile-links{row-gap:var(--spacing-xxxs,.2rem);grid-area:2/1/auto/-1;grid-template-columns:1fr;justify-items:start;margin-top:-.375rem;padding-left:0}.social-pane .social-primary__tabs{margin-top:-.5rem}.social-pane__link-button{justify-self:start;padding-left:0;padding-right:0}.social-pane__link-button>a{font-size:var(--font-size-sm,.875rem);text-align:left}.social-pane__dialog-field-header{grid-template-columns:minmax(0,1fr)}.social-pane__header-hero,.social-pane__header-hero-icon{aspect-ratio:1;grid-area:1/1;width:5rem;height:5rem}.social-pane__header-name{font-size:var(--font-size-xl,1.375rem);line-height:1.15}.social-pane__header-job-org{font-size:var(--font-size-md,1rem);line-height:1.25}.social-pane .social-friend-pronouns{font-size:.6875rem}.social-pane__header-location,.social-pane__header-stat,.social-pane .social-friend-location{font-size:var(--font-size-xxs,.75rem)}.social-pane__friend-action{--button-padding-sm:var(--spacing-xxxs,.2rem) var(--spacing-xxs-old,.3rem);--button-font-size-sm:var(--font-size-xs,.813rem);--button-border-radius-sm:var(--border-radius-base,.3125rem)}.social-pane__edit-button-label,.social-pane__edit-button .profile-section-collapsible__edit-label{display:none!important}.social-pane__edit-button{--button-background:transparent;--button-border-width:0;--button-border:transparent;--button-text:var(--color-text,#1a1a1a);--button-hover-background:var(--lavender-300,#e6dcff);--button-hover-border:transparent;--button-hover-text:var(--color-text,#1a1a1a);--button-font-size-sm:clamp(.9rem, 2.1vw, 1rem);--button-font-weight:var(--font-weight-regular,400);--button-icon-size-sm:.875rem}.social-pane__edit-button-icon,.social-pane__edit-button .profile-section-collapsible__edit-icon{justify-content:center;align-items:center;width:.875rem;height:.875rem;line-height:0;display:inline-flex}.social-pane__edit-button-icon svg,.social-pane__edit-button .profile-section-collapsible__edit-icon svg{width:.875rem;height:.875rem}.social-pane__edit-button-icon svg path,.social-pane__edit-button .profile-section-collapsible__edit-icon svg path{fill:var(--color-text,#1a1a1a);stroke:none}.social-pane__dialog-actions{justify-content:center;align-items:center;gap:var(--spacing-sm,.938rem);padding:var(--spacing-md,1rem) 0 0;margin:var(--spacing-md,1rem) auto 0;box-sizing:border-box;flex-direction:row;width:100%}.social-pane__dialog-actions>solid-ui-button{flex:none;width:10.8rem;min-width:8.5rem}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add::part(button){font-size:var(--font-size-sm,.875rem);line-height:var(--line-height-base,1.5)}.social-pane .social-friends-header-actions--standalone{gap:var(--spacing-2xs,.625rem);flex-wrap:wrap;padding-top:.35rem}.social-pane .social-layout,.social-pane .social-primary,.social-pane .social-friends-grid{display:block}.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr{width:100%;margin-bottom:var(--spacing-xs,.75rem);display:table}.social-pane .social-friends-grid>tr:last-child,.social-pane .social-friends-grid>tbody>tr:last-child{margin-bottom:0}.social-pane .social-main{width:100%}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();;const e=require("./icons.cjs.js"),t=require("./socialSections.cjs.js"),n=require("./triage.cjs.js");let r=require("solid-ui"),i=require("solid-logic");function a(e,t){let n=t.environment?.layout??`desktop`,r=t.environment?.theme??`light`,i=t.environment?.inputMode??`pointer`;e.classList.add(`social-pane-host`),e.dataset.layout=n,e.dataset.theme=r,e.dataset.inputMode=i}var o={icon:r.icons.originalIconBase+`foaf/foafTiny.gif`,name:`social`,label:function(e,t){let n=t.session.store.findTypeURIs(e);return n[r.ns.foaf(`Person`).uri]||n[r.ns.vcard(`Individual`).uri]?`Friends`:null},global:!1,render:function(o,s){let c=s.dom,l=function(e,t){let n=[];for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++)if(t[i].sameTerm(e[r])){n.push(t[i]);break}return n},m=function(e){let t=new Set,n=[];for(let r of e)!r?.value||t.has(r.value)||(t.add(r.value),n.push(r));return n},h=function(e,t){if(!t)return e;let n=c.createElement(`a`);return n.setAttribute(`href`,t),n.appendChild(e),n},ee=function(e){return c.createTextNode(e)},g=function(){},te=function(e,t,n,i={}){let a=c.createElement(`form`),o=c.createElement(`label`),s=c.createElement(`input`),l=c.createElement(`span`);return l.className=`question`,typeof e==`string`?l.textContent=e:l.appendChild(e),s.setAttribute(`type`,`checkbox`),i.disabled&&(s.disabled=!0,i.disabledTitle&&(s.title=i.disabledTitle,s.setAttribute(`aria-label`,i.disabledTitle))),o.appendChild(l),o.appendChild(s),a.appendChild(o),s.checked=n,s.addEventListener(`click`,function(e){if(this.checked)try{_.UserInput.sparqler.insert_statement(t,function(e,n,i){if(l.className=`question`,!n){r.log.alert(`Error occurs while inserting `+t+`
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.social-pane-host,.social-pane{--profile-interactive-cursor:pointer;background:var(--color-background,#f8f9fb);border-radius:var(--border-radius-base,.3125rem);box-sizing:border-box;width:100%;min-width:100%;max-width:none;margin-top:20px;display:block;overflow:visible}.social-pane__header-content{align-items:flex-start;column-gap:var(--spacing-md,1.25rem);row-gap:var(--spacing-xxs,.3125rem);grid-template-columns:auto minmax(0,1fr) auto;width:100%;min-width:0;display:grid}.social-pane__header-media{grid-area:1/1}.social-pane__header-details{flex-direction:column;grid-area:1/2;align-items:flex-start;min-width:0;display:flex}.social-pane__header-actions{place-self:flex-start end;align-items:flex-start;gap:var(--spacing-xs,.5rem);flex-wrap:wrap;grid-area:1/3;margin-left:auto;display:flex}.social-pane__header-actions--friend{justify-content:center}.social-pane__header-actions--friend>solid-ui-button{--button-border-radius:var(--border-radius-md,.5rem);--button-hover-text:var(--color-primary,#7c4dff);--button-hover-border:var(--color-primary,#7c4dff);margin-inline:auto}.social-pane__header-summary{align-items:flex-start;gap:var(--spacing-xxs,.125rem);flex-direction:column;width:100%;max-width:100%;display:flex}.social-pane__header-stats{gap:var(--spacing-xs,.75rem);margin-top:var(--spacing-xxs,.3125rem);flex-wrap:wrap;justify-content:flex-start;align-self:flex-start;display:flex}.social-pane__header-stat{appearance:none;cursor:var(--profile-interactive-cursor,pointer);color:var(--slate-700,#314158);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-bold,600);line-height:var(--line-height-tight,1.4);background:0 0;border:0;padding:0;text-decoration:none}.social-pane__header-stat+.social-pane__header-stat:before{content:"◆";color:var(--gray-400,#99a1af);margin-right:var(--spacing-xs,.75rem);vertical-align:middle;font-size:.5rem}.social-pane__header-stat:hover .social-pane__header-stat-label{text-decoration:underline}.social-pane__header-stat:focus-visible{outline:var(--border-width-medium,2px) solid #111827;outline-offset:2px}.social-pane__edit-button{--button-height-sm:0;--button-padding-sm:var(--spacing-xxs,.3125rem);--button-background:transparent;--button-border:transparent;--button-border-width:0;--button-hover-background:transparent;--button-hover-border:transparent;--button-text:var(--color-primary,#7c4dff);--button-hover-text:var(--color-primary,#7c4dff);--button-font-size-sm:var(--font-size-sm,.875rem);--button-font-weight:var(--font-weight-regular,400);--button-line-height:var(--line-height-base,1.5);--button-icon-size-sm:.875rem;width:auto;min-width:0;max-width:none;display:inline-block;position:static}.social-pane__edit-button::part(button):hover{text-decoration:underline}.social-pane__edit-button::part(button):focus-visible{outline:var(--border-width-medium,2px) solid var(--color-primary,#7c4dff);outline-offset:2px}.social-pane__edit-button-label{align-items:center;gap:var(--spacing-xxs,.3125rem);display:inline-flex}.social-pane__edit-button .profile-section-collapsible__edit-icon,.social-pane__edit-button-icon{line-height:0;display:none}.social-pane__edit-button-label svg,.social-pane__edit-button-icon svg,.social-pane__edit-button .profile-section-collapsible__edit-icon svg{vertical-align:middle;flex:none;width:.875rem;height:.875rem;display:inline-block}.social-pane__edit-button-label svg path,.social-pane__edit-button-icon svg path,.social-pane__edit-button .profile-section-collapsible__edit-icon svg path{fill:var(--color-primary,#7c4dff);stroke:none}.social-pane__dialog-backdrop{z-index:1000;background:#0f172a73;padding:1rem;position:fixed;inset:0}.social-pane__dialog{background:var(--white,#fff);width:min(32rem,100%);max-height:calc(100vh - 2rem);color:var(--color-text,#111827);padding:var(--spacing-md,1.25rem);border-radius:1rem;position:relative;overflow:auto;box-shadow:0 20px 45px #0f172a40}.social-pane__dialog-header{justify-content:space-between;align-items:flex-start;gap:var(--spacing-md,1rem);padding-bottom:var(--spacing-base,.5rem);margin-bottom:var(--spacing-sm,.938rem);border-bottom:var(--border-width-sm,.1rem) solid var(--slate-200,#e2e8f0);display:flex}.social-pane__dialog-title{margin:0 0 var(--spacing-base,.5rem)}.social-pane__dialog-close{--button-background:transparent;--button-border:transparent;--button-border-width:0;--button-hover-background:transparent;--button-hover-border:transparent;color:var(--color-text-subheading,#6b7280);cursor:pointer;flex:none;padding:0;line-height:0}.social-pane__dialog-close:hover{color:var(--color-text-primary,#364153)}.social-pane__dialog-close:focus-visible{outline:var(--border-width-medium,2px) solid var(--color-text-primary,#364153);outline-offset:2px}.social-pane__dialog-close svg{width:var(--icon-xxxs,.75rem);height:var(--icon-xxxs,.75rem)}.social-pane__dialog-close svg path{fill:currentColor}.social-pane__dialog-form{gap:var(--spacing-sm,.938rem)}.social-pane__dialog-fields{gap:var(--spacing-sm,.938rem);flex-direction:column;display:flex}.social-pane__dialog-field{gap:.2rem}.social-pane__dialog-field-header{justify-content:space-between;align-items:center;gap:var(--spacing-xs,.75rem);display:flex}.social-pane__dialog-row-list{flex-direction:column;gap:.2rem;display:flex}.social-pane__dialog-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.45rem;display:grid}.social-pane__dialog-label{color:var(--gray-700,#364153);font-size:var(--font-size-md,1rem);font-weight:var(--font-weight-md,500);margin:0;line-height:normal}.social-pane__dialog-input{box-sizing:border-box;resize:none;width:100%;min-height:auto}.social-pane__dialog-error{min-height:1.25rem;color:var(--color-warning,red);margin:0}.social-pane__dialog-saving-overlay{z-index:10;background:#ffffffc7;place-items:center;display:grid;position:absolute;inset:0}.social-pane__dialog-saving-overlay[hidden]{display:none}.social-pane__dialog.modal--saving .social-pane__dialog-form{opacity:.45;pointer-events:none}.social-pane__dialog .modal__saving-indicator{gap:0}.social-pane__dialog-row-button-icon{flex:none;justify-content:center;align-items:center;line-height:0;display:inline-flex}.social-pane__dialog-row-button-icon svg{display:block}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add{box-sizing:border-box;--button-min-height:auto;--button-padding-sm:var(--spacing-xxs,.3125rem);--button-background:transparent;--button-border:transparent;--button-border-width:0;--button-hover-background:transparent;--button-hover-border:transparent;--button-text:var(--color-primary,#7c4dff);--button-hover-text:var(--color-primary,#7c4dff);--button-height-sm:auto;--button-font-weight:var(--font-weight-md,500);--button-font-size-sm:var(--font-size-sm,.875rem);--button-line-height:var(--line-height-base,1.5);flex:none;justify-self:flex-start;width:auto;min-width:0;max-width:none;margin-left:auto}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add::part(button){min-height:auto;padding:var(--spacing-xxs,.3125rem);color:var(--color-primary,#7c4dff);font-weight:var(--font-weight-md,500);background:0 0;border:none}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add:hover::part(button){text-decoration:underline}.social-pane__add-more-content{display:inline}.social-pane__add-more-inline{white-space:normal;display:inline}.social-pane__add-more-icon{width:var(--icon-xxxs,.75rem);height:var(--icon-xxxs,.75rem);margin-right:var(--spacing-xxs,.3125rem);vertical-align:text-top;line-height:0;display:inline-block}.social-pane__add-more-icon svg{width:100%;height:100%;display:block}.social-pane__dialog-row-list solid-ui-button.social-pane__dialog-row-button--remove{min-height:var(--min-touch-target,44px);min-width:var(--min-touch-target,44px);color:var(--gray-300,#d1d5dc);--button-background:transparent;--button-box-shadow:none;--button-active-box-shadow:none;--button-active-transform:none;--button-border:transparent;--button-border-width:0;--button-border-radius:var(--border-radius-base,.3125rem);--button-hover-background:var(--lavender-300,#e6dcff);--button-hover-border:transparent;--button-hover-text:var(--color-primary,#7c4dff);--button-hover-box-shadow:none;--button-text:currentColor;--button-height-md:var(--min-touch-target,44px);--button-padding-md:0;--button-padding-x-sm:0;--button-icon-size-md:var(--icon-xxs,1rem);--button-icon-size-lg:var(--icon-xxs,1rem)}.social-pane__dialog-row-list solid-ui-button.social-pane__dialog-row-button--remove:hover,.social-pane__dialog-row-list solid-ui-button.social-pane__dialog-row-button--remove:focus-within{color:var(--gray-300,#d1d5dc)}.social-pane__dialog-row-button-icon--remove svg{width:1rem;height:1rem}.social-pane__dialog-row-button-icon--remove svg path{stroke:currentColor}.social-pane__dialog-actions{justify-content:flex-end;gap:var(--spacing-xs,.75rem);padding-top:var(--spacing-base,.5rem);border-top:var(--border-width-sm,.1rem) solid var(--slate-200,#e2e8f0);margin-top:0;display:flex}.social-pane__dialog-actions>solid-ui-button{--button-border-width:1px;--button-border-radius:var(--border-radius-base,.3125rem);--button-box-shadow:none;--button-hover-box-shadow:none;--button-active-box-shadow:none;--button-active-transform:none;width:10.8rem}.social-pane__dialog-actions solid-ui-button.social-pane__dialog-button--save{--button-font-size-md:var(--font-size-lg,1.125rem);--button-background:var(--color-primary,#7c4dff);--button-border:var(--color-primary,#7c4dff);--button-text:var(--white,#fff);--button-hover-background:color-mix(in srgb, var(--color-primary,#7c4dff) 90%, black);--button-hover-border:color-mix(in srgb, var(--color-primary,#7c4dff) 90%, black);--button-hover-text:var(--white,#fff)}.social-pane__dialog-actions solid-ui-button.social-pane__dialog-button--cancel{--button-background:var(--white,#fff);--button-border:var(--gray-300,#d1d5dc);--button-font-weight:var(--font-weight-normal,normal);--button-text:var(--gray-800,#1e2939);--button-hover-background:var(--blue-900,#083575);--button-hover-border:var(--blue-900,#083575);--button-hover-text:var(--white,#fff);--button-font-size-md:var(--font-size-sm,.875rem)}.social-pane__header-name{color:var(--color-text-heading,#000);font-size:var(--font-size-xxl,1.75rem);font-weight:var(--font-weight-bold,600);text-indent:0;text-align:left;overflow-wrap:anywhere;margin:0;padding:0;line-height:1.2;transform:translate(-4px)}.social-pane__header-location{align-items:center;gap:var(--spacing-2xs,.625rem);color:var(--color-text-secondary,#4a5565);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-normal,400);line-height:1.2;display:inline-flex}.social-pane__header-job-org{color:var(--color-text-subheading,#101828);white-space:normal;width:100%;font-size:var(--font-size-lg,1.125rem);font-weight:var(--font-weight-md,500);text-align:left;margin:0;line-height:1.25}.social-pane__header-location-icon{line-height:0}.social-pane__header-location-icon svg{width:var(--icon-xxs,1rem);height:var(--icon-xxs,1rem)}.social-profile-links{grid-template-columns:repeat(2,max-content);align-items:start;gap:.15rem 1rem;display:grid}.social-pane__header-hero{border-radius:var(--border-radius-full,.625rem);border:var(--border-width-sm,.1rem) solid var(--color-primary,#7c4dff);background:var(--gray-200,#e5e7eb) 50% / cover no-repeat;object-fit:cover;object-position:center;background-position:50%;width:140px;height:140px}.social-pane__header-hero-icon{border:var(--border-width-sm,.1rem) solid var(--color-primary,#7c4dff);background:var(--color-card-bg);flex-shrink:0;width:140px;height:140px;line-height:0;border-radius:var(--border-radius-full,.625rem)!important}.social-pane__header-hero-icon svg{width:100%;height:100%;display:block}.social-pane .social-layout{align-items:flex-start;gap:1rem;width:100%;display:flex}.social-pane .social-primary{flex:70%;grid-template-rows:auto minmax(0,auto);grid-template-columns:minmax(0,1fr);align-items:start;gap:0;min-width:0;display:grid}.social-pane .social-primary__tabs{align-items:center;gap:var(--spacing-base,.5rem);z-index:1;background:0 0;grid-area:1/1;width:fit-content;max-width:100%;margin-bottom:0;padding:0;display:flex;position:relative}.social-pane .social-primary__tab{appearance:none;border:0;border-bottom:var(--border-width-sm,.1rem) solid transparent;color:#374151;cursor:pointer;font:inherit;font-weight:var(--font-weight-bold,600);padding:var(--spacing-2xs,.625rem) 1rem;background:0 0;border-radius:0;transition:background-color .12s,color .12s,box-shadow .12s;box-shadow:none!important}.social-pane .social-primary__tab:hover{color:var(--grey-purple-900,#332746);background:var(--lavender-300,#e6dcff)!important;box-shadow:none!important}.social-pane .social-primary__tab[aria-selected=true],.social-pane .social-primary__tab--active{color:var(--grey-purple-900,#332746);border-bottom-color:var(--color-primary,#7c4dff);background:0 0;box-shadow:none!important}.social-pane .social-primary__tab:focus-visible{outline-offset:2px;outline:none;box-shadow:none!important}.social-pane .social-primary__panel{opacity:0;visibility:hidden;pointer-events:none;grid-area:2/1;transition:opacity .16s,transform .16s,visibility 0s linear .16s;display:none;transform:translateY(.35rem)}.social-pane .social-primary__panel--active{opacity:1;visibility:visible;pointer-events:auto;border:0;border-bottom:var(--border-width-sm,.1rem) solid transparent;transition:opacity .18s,transform .18s;display:block;transform:translateY(0)}.social-pane .social-pane__mutual-friends,.social-pane .social-pane__all-friends{padding-top:var(--spacing-xxxs,.2rem);margin-top:0}.social-pane .social-main{background-color:var(--color-card-bg,#fff);color:var(--color-text-primary,#364153);box-sizing:border-box;border-collapse:collapse;border:0;width:100%;padding:0;display:table}.social-pane .social-main--mutual{gap:var(--spacing-xs,.75rem);border-radius:var(--border-radius-lg,.75rem);margin-top:1em;margin-bottom:1em;padding:1rem}.social-pane .social-main--requests{gap:var(--spacing-md,1rem);border-radius:var(--border-radius-lg,.75rem);flex-direction:column;margin-top:.75rem;margin-bottom:1rem;padding:1rem;display:flex}.social-requests__note{color:var(--color-text-subheading,#475467);font-size:var(--font-size-sm,.875rem);margin:0;line-height:1.5}.social-requests__group{gap:var(--spacing-sm,.938rem)}.social-requests__group-header{flex-direction:column;gap:.125rem;display:flex}.social-requests__group-title{color:var(--color-text-heading,#101828);font-size:var(--font-size-lg,1.125rem);margin:0;line-height:1.25}.social-requests__group-description,.social-requests__empty{color:var(--color-text-subheading,#667085);font-size:var(--font-size-sm,.875rem);margin:0;line-height:1.5}.social-requests__table{margin-top:0}.social-pane .social-mutual-summary{gap:var(--spacing-base,.5rem)}.social-pane .social-mutual-summary-line{color:var(--slate-700,#314158);font-size:var(--font-size-sm,.95rem);line-height:var(--line-height-base,1.5);justify-content:flex-start;padding:1rem}.social-pane .social-mutual-summary-line--action{gap:var(--spacing-xxs,.75rem);flex-wrap:wrap}.social-pane .social-mutual-confirm-prompt{align-items:center;gap:var(--spacing-xxxs,.2rem);font-weight:var(--font-weight-semibold,600);flex-wrap:wrap;display:inline-flex}.social-pane .social-pane__friend-action--inline{z-index:auto;align-self:flex-start;position:static;top:auto;right:auto}.social-pane .social-mutual-checkbox-form{margin:0;padding:0 1rem 1rem;display:block}.social-pane .social-mutual-checkbox-form label{align-items:center;gap:var(--spacing-2xs,.65rem);color:var(--slate-700,#374151);font-size:var(--font-size-sm,.875rem);flex-wrap:wrap;line-height:1.4;display:inline-flex}.social-pane .social-mutual-checkbox-form input[type=checkbox]{width:1rem;height:1rem;accent-color:var(--color-primary,#7c4dff);margin:0}.social-pane .social-mutual-checkbox-form input[type=checkbox]:disabled{opacity:.65;cursor:not-allowed}.social-pane .social-friends-list{width:100%;margin-top:0}.social-pane .social-friends-grid{table-layout:fixed;border-collapse:separate;border-spacing:0;align-items:stretch;gap:var(--spacing-xs,.75rem);flex-wrap:wrap;width:100%;display:flex}.social-pane .social-friends-grid>tbody{align-items:stretch;gap:var(--spacing-xs,.75rem);flex-wrap:wrap;width:100%;display:flex}.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr{table-layout:fixed;box-sizing:border-box;width:calc(50% - .375rem);display:inline-table}.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr,.social-pane .social-friend-card{border:1px solid var(--gray-200,#e5e7eb);background:var(--white,#fff);border-radius:var(--border-radius-lg,.75rem);transition:box-shadow .14s,border-color .14s,transform .14s;overflow:visible;box-shadow:0 1px 3px #00000014}.social-pane .social-friends-grid>tr:hover,.social-pane .social-friends-grid>tbody>tr:hover,.social-pane .social-friend-card:hover{border-color:var(--gray-300,#d1d5dc);transform:translateY(-1px);box-shadow:0 6px 18px #0000001a}.social-pane .social-friends-grid>tr td,.social-pane .social-friends-grid>tbody>tr td,.social-pane .social-friend-card td{background:var(--color-background,#f8f9fb);box-sizing:border-box}.social-pane .social-friends-grid>tr>td:nth-child(2),.social-pane .social-friends-grid>tbody>tr>td:nth-child(2){width:auto;min-width:0;padding-left:1.4rem}.social-pane .social-friends-grid>tr>td:nth-child(3),.social-pane .social-friends-grid>tbody>tr>td:nth-child(3){vertical-align:top;width:2.5rem;min-width:2.5rem;padding-left:.25rem}.social-pane .social-friends-grid>tr>td:first-child,.social-pane .social-friends-grid>tbody>tr>td:first-child{padding-right:1.2rem}.social-pane .social-friends-grid td>div>div{overflow-wrap:anywhere;white-space:normal!important;width:100%!important;min-width:0!important;max-width:100%!important}.social-pane .social-friends-grid td>div>div button{white-space:normal!important}.social-pane .social-friends-grid>tr>td:nth-child(2)>div:first-child,.social-pane .social-friends-grid>tbody>tr>td:nth-child(2)>div:first-child{flex-wrap:wrap;align-items:flex-start;gap:.2rem .4rem;min-width:0;display:flex}.social-pane .social-friends-grid>tr>td:nth-child(2)>div:first-child>span:first-of-type,.social-pane .social-friends-grid>tbody>tr>td:nth-child(2)>div:first-child>span:first-of-type{vertical-align:text-top;max-width:100%;font-size:var(--font-size-lg,1.125rem);font-weight:var(--font-weight-bold,600);line-height:var(--line-height-tight);text-overflow:clip;white-space:normal;overflow-wrap:anywhere;margin-top:0;margin-bottom:0;display:inline-block;overflow:visible}.social-pane .social-friend-pronouns{margin-left:var(--spacing-xs,.25rem);color:var(--color-text-secondary,#4a5565);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-regular,400);text-align:left;line-height:1.2;display:inline}.social-pane .social-friend-job-org{white-space:normal;overflow-wrap:anywhere;width:100%;min-width:0;color:var(--color-text-subheading,#101828);font-size:var(--font-size-sm,.875rem);font-weight:var(--font-weight-medium,500);text-align:left;margin:0;line-height:1.25}.social-pane .social-friend-location{color:var(--color-text-secondary,#6b7280);font-size:var(--font-size-xs,.8125rem);overflow-wrap:anywhere;line-height:1.3}@media (width<=960px){.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr{width:100%}}.social-pane .social-friends-header{padding:0 var(--spacing-xs,.75rem) var(--spacing-base,.5rem);background-color:var(--gray-100,#f3f4f6);caption-side:top;justify-content:space-between;align-items:center;margin-top:0;display:flex}.social-pane .social-friends-header-title{font-size:var(--font-size-md,1rem);font-weight:var(--font-weight-bold,600);color:var(--color-text-primary,#364153)}.social-pane .social-friends-header-actions{justify-content:flex-end;align-items:center;display:inline-flex}.social-pane .social-friends-header-actions--standalone{align-items:center;gap:var(--spacing-xs,.75rem);justify-content:flex-start;padding:.7rem 1rem 0;display:flex}.social-pane .social-friends-header-dropzone{border-collapse:collapse}.social-pane .social-friends-header-dropzone-cell{padding:0}.social-pane .social-friends-header-hint{color:var(--color-text-secondary,#4a5565);font-size:var(--font-size-sm,.875rem);line-height:1.4}.social-pane .social-friends-header-actions button{justify-content:center;align-items:center;display:inline-flex;overflow:hidden;border-width:0!important;width:2rem!important;min-width:2rem!important;height:2rem!important;margin:0!important;padding:0!important}.social-pane .social-friends-header-actions button img{object-fit:contain;pointer-events:none;display:block;width:100%!important;height:100%!important}.social-pane a{color:var(--color-primary,#7c4dff);font-weight:700;text-decoration:none}.social-pane a:hover{color:var(--color-primary,#7c4dff);font-weight:700;text-decoration:underline}.social-pane a:active{color:var(--color-primary,#7c4dff);text-decoration:none}.social-pane__link-button{white-space:nowrap;width:fit-content;max-width:100%;padding:var(--spacing-xxxs,.2rem) var(--spacing-base,.5rem);text-align:left;background-color:#0000;border:none;margin-top:0;margin-bottom:0;display:inline-flex}.social-pane__link-button>a{white-space:normal;overflow-wrap:anywhere;max-width:100%;color:var(--color-primary,#7c4dff);background-color:#0000;display:inline-flex}.social-pane__link-button>a:link,.social-pane__link-button>a:visited,.social-pane__link-button>a:hover{color:var(--color-primary,#7c4dff)}.social-pane__link-button>a:hover{text-decoration:underline}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-content{align-items:start;column-gap:var(--spacing-md,1rem);grid-template-columns:4.375rem minmax(0,1fr) auto;row-gap:.25rem;padding:1rem 1rem 0;display:grid}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-media{display:contents}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-details{flex-direction:column;grid-area:1/2;align-items:flex-start;gap:.125rem;min-width:0;display:flex}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-actions{justify-content:flex-end;justify-self:end;gap:var(--spacing-2xs,.3125rem);grid-area:1/3;width:auto;margin-left:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-actions--friend{grid-area:3/1/auto/-1;justify-content:center;justify-self:stretch;width:100%;margin-top:.125rem;margin-left:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-summary{flex-direction:column;gap:0;width:100%;display:flex}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__header-name,.social-pane__header-job-org,.social-pane__header-location){text-align:left;justify-content:flex-start;width:100%}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-stats{justify-content:flex-start;align-self:flex-start;gap:var(--spacing-xs,.5rem);width:100%;margin-top:-.4375rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-profile-links{row-gap:var(--spacing-xxxs,.2rem);grid-area:2/1/auto/-1;grid-template-columns:1fr;justify-items:start;margin-top:-.375rem;padding-left:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-primary__tabs,:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-primary__tabs{margin-top:-.5rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__link-button{justify-self:start;padding-left:0;padding-right:0}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__link-button>a{font-size:var(--font-size-sm,.875rem);text-align:left}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-field-header{grid-template-columns:minmax(0,1fr)}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__header-hero,.social-pane__header-hero-icon){aspect-ratio:1;grid-area:1/1;width:5rem;height:5rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-name{font-size:var(--font-size-xl,1.375rem);line-height:1.15}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__header-job-org{font-size:var(--font-size-md,1rem);line-height:1.25}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friend-pronouns{font-size:.6875rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__header-location,.social-pane__header-stat),:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friend-location{font-size:var(--font-size-xxs,.75rem)}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-label,.social-pane__edit-button .profile-section-collapsible__edit-label){display:none!important}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__edit-button{--button-background:transparent;--button-border-width:0;--button-border:transparent;--button-text:var(--color-text,#1a1a1a);--button-hover-background:var(--lavender-300,#e6dcff);--button-hover-border:transparent;--button-hover-text:var(--color-text,#1a1a1a);--button-font-size-sm:clamp(.9rem, 2.1vw, 1rem);--button-font-weight:var(--font-weight-regular,400);--button-icon-size-sm:.875rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-icon,.social-pane__edit-button .profile-section-collapsible__edit-icon){justify-content:center;align-items:center;width:.875rem;height:.875rem;line-height:0;display:inline-flex}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-icon svg,.social-pane__edit-button .profile-section-collapsible__edit-icon svg){width:.875rem;height:.875rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane__edit-button-icon svg path,.social-pane__edit-button .profile-section-collapsible__edit-icon svg path){fill:var(--color-text,#1a1a1a);stroke:none}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-actions{justify-content:center;align-items:center;gap:var(--spacing-sm,.938rem);padding:var(--spacing-md,1rem) 0 0;margin:var(--spacing-md,1rem) auto 0;box-sizing:border-box;flex-direction:row;width:100%}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-actions>solid-ui-button{flex:none;width:10.8rem;min-width:8.5rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add::part(button){font-size:var(--font-size-sm,.875rem);line-height:var(--line-height-base,1.5)}:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friends-header-actions--standalone{gap:var(--spacing-2xs,.625rem);flex-wrap:wrap;padding-top:.35rem}:is(.social-pane-host,.social-pane)[data-layout=mobile] :is(.social-pane .social-layout,.social-pane .social-primary,.social-layout,.social-primary),:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-pane .social-friends-grid,:is(.social-pane-host,.social-pane)[data-layout=mobile] .social-friends-grid{display:block}:is(.social-pane-host,.social-pane)[data-input-mode=touch]{--profile-interactive-cursor:auto}:is(.social-pane-host,.social-pane)[data-input-mode=pointer]{--profile-interactive-cursor:pointer}@media (width<=600px){.social-pane__header-content{align-items:start;column-gap:var(--spacing-md,1rem);grid-template-columns:4.375rem minmax(0,1fr) auto;row-gap:.25rem;padding:1rem 1rem 0;display:grid}.social-pane__header-media{display:contents}.social-pane__header-details{flex-direction:column;grid-area:1/2;align-items:flex-start;gap:.125rem;min-width:0;display:flex}.social-pane__header-actions{justify-content:flex-end;justify-self:end;gap:var(--spacing-2xs,.3125rem);grid-area:1/3;width:auto;margin-left:0}.social-pane__header-actions--friend{grid-area:3/1/auto/-1;justify-content:center;justify-self:stretch;width:100%;margin-top:.125rem;margin-left:0}.social-pane__header-summary{flex-direction:column;gap:0;width:100%;display:flex}.social-pane__header-name,.social-pane__header-job-org,.social-pane__header-location{text-align:left;justify-content:flex-start;width:100%}.social-pane__header-stats{justify-content:flex-start;align-self:flex-start;gap:var(--spacing-xs,.5rem);width:100%;margin-top:-.4375rem}.social-profile-links{row-gap:var(--spacing-xxxs,.2rem);grid-area:2/1/auto/-1;grid-template-columns:1fr;justify-items:start;margin-top:-.375rem;padding-left:0}.social-pane .social-primary__tabs{margin-top:-.5rem}.social-pane__link-button{justify-self:start;padding-left:0;padding-right:0}.social-pane__link-button>a{font-size:var(--font-size-sm,.875rem);text-align:left}.social-pane__dialog-field-header{grid-template-columns:minmax(0,1fr)}.social-pane__header-hero,.social-pane__header-hero-icon{aspect-ratio:1;grid-area:1/1;width:5rem;height:5rem}.social-pane__header-name{font-size:var(--font-size-xl,1.375rem);line-height:1.15}.social-pane__header-job-org{font-size:var(--font-size-md,1rem);line-height:1.25}.social-pane .social-friend-pronouns{font-size:.6875rem}.social-pane__header-location,.social-pane__header-stat,.social-pane .social-friend-location{font-size:var(--font-size-xxs,.75rem)}.social-pane__friend-action{--button-padding-sm:var(--spacing-xxxs,.2rem) var(--spacing-xxs-old,.3rem);--button-font-size-sm:var(--font-size-xs,.813rem);--button-border-radius-sm:var(--border-radius-base,.3125rem)}.social-pane__edit-button-label,.social-pane__edit-button .profile-section-collapsible__edit-label{display:none!important}.social-pane__edit-button{--button-background:transparent;--button-border-width:0;--button-border:transparent;--button-text:var(--color-text,#1a1a1a);--button-hover-background:var(--lavender-300,#e6dcff);--button-hover-border:transparent;--button-hover-text:var(--color-text,#1a1a1a);--button-font-size-sm:clamp(.9rem, 2.1vw, 1rem);--button-font-weight:var(--font-weight-regular,400);--button-icon-size-sm:.875rem}.social-pane__edit-button-icon,.social-pane__edit-button .profile-section-collapsible__edit-icon{justify-content:center;align-items:center;width:.875rem;height:.875rem;line-height:0;display:inline-flex}.social-pane__edit-button-icon svg,.social-pane__edit-button .profile-section-collapsible__edit-icon svg{width:.875rem;height:.875rem}.social-pane__edit-button-icon svg path,.social-pane__edit-button .profile-section-collapsible__edit-icon svg path{fill:var(--color-text,#1a1a1a);stroke:none}.social-pane__dialog-actions{justify-content:center;align-items:center;gap:var(--spacing-sm,.938rem);padding:var(--spacing-md,1rem) 0 0;margin:var(--spacing-md,1rem) auto 0;box-sizing:border-box;flex-direction:row;width:100%}.social-pane__dialog-actions>solid-ui-button{flex:none;width:10.8rem;min-width:8.5rem}.social-pane__dialog-field-header solid-ui-button.social-pane__dialog-row-button--add::part(button){font-size:var(--font-size-sm,.875rem);line-height:var(--line-height-base,1.5)}.social-pane .social-friends-header-actions--standalone{gap:var(--spacing-2xs,.625rem);flex-wrap:wrap;padding-top:.35rem}.social-pane .social-layout,.social-pane .social-primary,.social-pane .social-friends-grid{display:block}.social-pane .social-friends-grid>tr,.social-pane .social-friends-grid>tbody>tr{width:100%;margin-bottom:var(--spacing-xs,.75rem);display:table}.social-pane .social-friends-grid>tr:last-child,.social-pane .social-friends-grid>tbody>tr:last-child{margin-bottom:0}.social-pane .social-main{width:100%}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();;const e=require("./icons.cjs.js"),t=require("./socialSections.cjs.js"),n=require("./triage.cjs.js");let r=require("solid-ui"),i=require("solid-logic");function a(e,t){let n=t.environment?.layout??`desktop`,r=t.environment?.theme??`light`,i=t.environment?.inputMode??`pointer`;e.classList.add(`social-pane-host`),e.dataset.layout=n,e.dataset.theme=r,e.dataset.inputMode=i}var o={icon:r.icons.originalIconBase+`foaf/foafTiny.gif`,name:`social`,label:function(e,t){let n=t.session.store.findTypeURIs(e);return n[r.ns.foaf(`Person`).uri]||n[r.ns.vcard(`Individual`).uri]?`Friends`:null},global:!1,render:function(o,s){let c=s.dom,l=function(e,t){let n=[];for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++)if(t[i].sameTerm(e[r])){n.push(t[i]);break}return n},m=function(e){let t=new Set,n=[];for(let r of e)!r?.value||t.has(r.value)||(t.add(r.value),n.push(r));return n},h=function(e,t){if(!t)return e;let n=c.createElement(`a`);return n.setAttribute(`href`,t),n.appendChild(e),n},ee=function(e){return c.createTextNode(e)},g=function(){},te=function(e,t,n,i={}){let a=c.createElement(`form`),o=c.createElement(`label`),s=c.createElement(`input`),l=c.createElement(`span`);return l.className=`question`,typeof e==`string`?l.textContent=e:l.appendChild(e),s.setAttribute(`type`,`checkbox`),i.disabled&&(s.disabled=!0,i.disabledTitle&&(s.title=i.disabledTitle,s.setAttribute(`aria-label`,i.disabledTitle))),o.appendChild(l),o.appendChild(s),a.appendChild(o),s.checked=n,s.addEventListener(`click`,function(e){if(this.checked)try{_.UserInput.sparqler.insert_statement(t,function(e,n,i){if(l.className=`question`,!n){r.log.alert(`Error occurs while inserting `+t+`
|
|
2
2
|
|
|
3
3
|
`+i),s.checked=!1;return}v.add(t.subject,t.predicate,t.object,t.why),g()})}catch(e){r.log.error(`Data write fails:`+e),r.log.alert(`Data write fails:`+e),s.checked=!1,l.className=`question`}else try{_.UserInput.sparqler.delete_statement(t,function(e,n,i){l.className=`question`,n?(v.removeMany(t.subject,t.predicate,t.object,t.why),g()):(r.log.alert(`Error occurs while deleting `+t+`
|
|
4
4
|
|