solid-panes 5.0.0-0 → 5.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RDFXMLPane.d.ts.map +1 -1
- package/dist/RDFXMLPane2.cjs.js +1 -2
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/RDFXMLPane2.esm.js +15 -42
- package/dist/RDFXMLPane2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/{trash-2.esm.js → folder.esm.js} +4 -4
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -0
- package/dist/components/editor-card/EditorCard.cjs.js +6 -0
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.d.ts +16 -0
- package/dist/components/editor-card/EditorCard.d.ts.map +1 -0
- package/dist/components/editor-card/EditorCard.esm.js +268 -0
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js +2 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js +7 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -0
- package/dist/components/editor-card/index.cjs.js +1 -0
- package/dist/components/editor-card/index.d.ts +4 -0
- package/dist/components/editor-card/index.d.ts.map +1 -0
- package/dist/components/editor-card/index.esm.js +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +1 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +16 -16
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +24 -14
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +7 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +94 -66
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +22 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +3 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +90 -65
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +4 -4
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +17 -16
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
- package/dist/components/file-explorer-header/index.cjs.js +1 -0
- package/dist/components/file-explorer-header/index.d.ts +3 -0
- package/dist/components/file-explorer-header/index.d.ts.map +1 -0
- package/dist/components/file-explorer-header/index.esm.js +2 -0
- package/dist/components/file-explorer-header/types.d.ts +8 -0
- package/dist/components/file-explorer-header/types.d.ts.map +1 -1
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.esm.js +4 -4
- package/dist/components/header/Header.styles.cjs.js +1 -1
- package/dist/components/header/Header.styles.cjs.js.map +1 -1
- package/dist/components/header/Header.styles.esm.js +1 -1
- package/dist/components/header/Header.styles.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.cjs.js +2 -2
- package/dist/components/navbar/Navbar.esm.js +5 -5
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +23 -9
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +7 -4
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +146 -84
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +2 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +7 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -0
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.esm.js +1 -1
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.cjs.js.map +1 -1
- package/dist/defaultPane2.esm.js +2 -2
- package/dist/defaultPane2.esm.js.map +1 -1
- package/dist/home/homePane.cjs.js +1 -1
- package/dist/home/homePane.cjs.js.map +1 -1
- package/dist/home/homePane.esm.js +1 -1
- package/dist/home/homePane.esm.js.map +1 -1
- package/dist/humanReadablePane.d.ts +1 -1
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +1 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +2 -2
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +1 -1
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/internal/internalPane2.esm.js +2 -2
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/n3Pane.d.ts.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -2
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/n3Pane2.esm.js +10 -34
- package/dist/n3Pane2.esm.js.map +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +8 -11
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/queryByExample.cjs.js +1 -1
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +4 -4
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +1 -1
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +2 -2
- 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 +3 -3
- package/dist/pad/padPane2.esm.js.map +1 -1
- package/dist/playlist/playlistPane.cjs.js +1 -1
- package/dist/playlist/playlistPane.cjs.js.map +1 -1
- package/dist/playlist/playlistPane.esm.js +1 -1
- package/dist/playlist/playlistPane.esm.js.map +1 -1
- package/dist/sharing/sharingPane.cjs.js +1 -1
- package/dist/sharing/sharingPane.cjs.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -1
- package/dist/sharing/sharingPane.esm.js.map +1 -1
- package/dist/social/socialPane2.cjs.js +2 -2
- package/dist/social/socialPane2.cjs.js.map +1 -1
- package/dist/social/socialPane2.esm.js +3 -3
- package/dist/social/socialPane2.esm.js.map +1 -1
- package/dist/social/triage.cjs.js +1 -1
- package/dist/social/triage.cjs.js.map +1 -1
- package/dist/social/triage.esm.js +1 -1
- package/dist/social/triage.esm.js.map +1 -1
- package/dist/transaction/period.cjs.js +1 -1
- package/dist/transaction/period.cjs.js.map +1 -1
- package/dist/transaction/period.esm.js +1 -1
- package/dist/transaction/period.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/podUtils.d.ts +6 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +93 -22
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +3 -3
- package/dist/versionInfo.esm.js.map +1 -1
- package/package.json +5 -5
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
- package/dist/components/file-explorer-header/helper.cjs.js +0 -2
- package/dist/components/file-explorer-header/helper.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/helper.d.ts +0 -15
- package/dist/components/file-explorer-header/helper.d.ts.map +0 -1
- package/dist/components/file-explorer-header/helper.esm.js +0 -64
- package/dist/components/file-explorer-header/helper.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +0 -16
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +0 -215
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalPane2.esm.js","names":[],"sources":["../../src/internal/internalPane.ts"],"sourcesContent":["/* Internal Pane\n **\n ** This outline pane contains the properties which are\n ** internal to the user's interaction with the web, and are not normally displayed\n */\n/* global alert confirm */\n\nimport { icons, ns, widgets } from 'solid-ui'\nimport { BlankNode, IndexedFormula, literal, NamedNode, st, sym, Variable, Store } from 'rdflib'\nimport { PaneDefinition } from 'pane-registry'\nimport './internalPane.css'\n\nconst pane: PaneDefinition = {\n icon: icons.originalIconBase + 'tango/22-emblem-system.png',\n\n name: 'internal',\n\n label: function () {\n return 'under the hood' // There is often a URI even of no statements\n },\n\n render: function (subject, context) {\n const dom = context.dom\n // @ts-ignore\n const store = context.session.store as Store\n const canonizedSubject = store.canon(subject) as BlankNode | NamedNode | Variable\n const types = store.findTypeURIs(canonizedSubject)\n\n function filter (pred: NamedNode) {\n if (types['http://www.w3.org/2007/ont/link#ProtocolEvent']) return true // display everything for them\n const view = context.session.paneRegistry.byName('internal')\n return (\n view &&\n view.predicates &&\n !!(typeof view.predicates[pred.uri] !== 'undefined')\n )\n }\n\n const div = dom.createElement('div')\n div.classList.add('internalPane', 'internalPaneContent')\n\n function deleteRecursive (kb: IndexedFormula, folder: NamedNode) {\n const fetcher = (kb as any).fetcher\n if (!fetcher) {\n console.error('No fetcher available')\n return\n }\n return new Promise(function (resolve, reject) {\n fetcher.load(folder).then(function () {\n const promises = kb.each(folder, ns.ldp('contains')).map(file => {\n if (kb.holds(file, ns.rdf('type'), ns.ldp('BasicContainer'))) {\n return deleteRecursive(kb, file as NamedNode)\n } else {\n console.log('deleteRecursive leaf file: ' + file)\n return fetcher.webOperation('DELETE', (file as NamedNode).uri)\n }\n })\n Promise.all(promises).then(\n () => {\n console.log('deleteRecursive empty folder: ' + folder)\n fetcher\n .webOperation('DELETE', folder.uri)\n .then(() => {\n console.log('Deleted Ok: ' + folder)\n resolve(undefined)\n })\n .catch((err: string) => {\n const str = 'Unable to delete ' + folder + ': ' + err\n console.log(str)\n reject(new Error(str))\n })\n resolve(undefined)\n },\n err => {\n alert(err)\n reject(err)\n }\n )\n })\n })\n }\n\n const isDocument = subject.uri && !subject.uri.includes('#')\n if (isDocument) {\n const controls = div.appendChild(dom.createElement('table'))\n controls.classList.add('internalPaneControls')\n const controlRow = controls.appendChild(dom.createElement('tr'))\n\n const deleteCell = controlRow.appendChild(dom.createElement('td'))\n const isFolder =\n (subject.uri && subject.uri.endsWith('/')) ||\n store.holds(subject, ns.rdf('type'), ns.ldp('Container'))\n const noun = isFolder ? 'folder' : 'file'\n if (!isProtectedUri(subject)) {\n console.log(subject)\n const deleteButton = widgets.deleteButtonWithCheck(\n dom,\n deleteCell,\n noun,\n function () {\n if (\n !confirm(\n `Are you sure you want to delete ${subject}? This cannot be undone.`\n )\n ) {\n return\n }\n // @@ TODO Remove casing of store.fetcher\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n const promise = isFolder\n ? (deleteRecursive(store, subject) || Promise.resolve())\n : store.fetcher.webOperation('DELETE', subject.uri) || Promise.resolve()\n promise\n .then(() => {\n const str = 'Deleted: ' + subject\n console.log(str)\n })\n .catch((err: any) => {\n const str = 'Unable to delete ' + subject + ': ' + err\n console.log(str)\n alert(str)\n })\n }\n )\n\n deleteButton.removeAttribute('class') // Remove hover hide\n deleteButton.classList.add('internalPaneDeleteButton')\n deleteCell.appendChild(deleteButton)\n }\n\n const refreshCell = controlRow.appendChild(dom.createElement('td'))\n const refreshButton = widgets.button(\n dom,\n icons.iconBase + 'noun_479395.svg',\n 'refresh'\n )\n refreshCell.appendChild(refreshButton)\n refreshButton.addEventListener('click', () => {\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n store.fetcher.refresh(subject, function (\n ok,\n errm\n ) {\n let str\n if (ok) {\n str = 'Refreshed OK: ' + subject\n } else {\n str = 'Error refreshing: ' + subject + ': ' + errm\n }\n console.log(str)\n alert(str)\n })\n })\n }\n\n let plist = store.statementsMatching(subject)\n let docURI = ''\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n\n if (subject.uri) {\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#uri'),\n subject.uri as any, // @@ TODO Remove casting\n store.fetcher.appNode\n )\n )\n if (subject.uri.indexOf('#') >= 0) {\n docURI = subject.uri.split('#')[0]\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#documentURI'),\n subject.uri.split('#')[0] as any, // @@ TODO Remove casting\n store.fetcher.appNode\n )\n )\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#document'),\n sym(subject.uri.split('#')[0]),\n store.fetcher.appNode\n )\n )\n } else {\n docURI = subject.uri\n }\n }\n if (docURI) {\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n\n const ed = store.updater.editable(docURI)\n if (ed) {\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/ns/rww#editable'),\n literal(ed.toString()),\n store.fetcher.appNode\n )\n )\n }\n }\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(dom)\n outliner.appendPropertyTRs(div, plist, false, filter)\n plist = store.statementsMatching(undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, true, filter)\n return div\n },\n\n predicates: {\n // Predicates used for inner workings. Under the hood\n 'http://www.w3.org/2007/ont/link#request': 1,\n 'http://www.w3.org/2007/ont/link#requestedBy': 1,\n 'http://www.w3.org/2007/ont/link#source': 1,\n 'http://www.w3.org/2007/ont/link#session': 2, // 2= test neg but display\n 'http://www.w3.org/2007/ont/link#uri': 1,\n 'http://www.w3.org/2007/ont/link#documentURI': 1,\n 'http://www.w3.org/2007/ont/link#document': 1,\n 'http://www.w3.org/2007/ont/link#all': 1, // From userinput.js\n 'http://www.w3.org/2007/ont/link#Document': 1,\n 'http://www.w3.org/ns/rww#editable': 1,\n 'http://www.w3.org/2000/01/rdf-schema#seeAlso': 1,\n 'http://www.w3.org/2002/07/owl#': 1\n },\n\n classes: {\n // Things which are inherently already undercover\n 'http://www.w3.org/2007/ont/link#ProtocolEvent': 1\n }\n}\n\nfunction isProtectedUri (subject: NamedNode): boolean {\n // TODO: Could make the code below smarter by removing some of the redundancy by creating a recursive function, but did not bother now\n const siteUri = subject.site().uri\n return (\n subject.uri === siteUri ||\n subject.uri === siteUri + 'profile/' ||\n subject.uri === siteUri + 'profile/card' ||\n subject.uri === siteUri + 'settings/' ||\n subject.uri === siteUri + 'settings/prefs.ttl' ||\n subject.uri === siteUri + 'settings/privateTypeIndex.ttl' ||\n subject.uri === siteUri + 'settings/publicTypeIndex.ttl' ||\n subject.uri === siteUri + 'settings/serverSide.ttl'\n )\n}\n\nexport default pane\n\n// ends\n"],"mappings":";;;;AAYA,IAAM,IAAuB;CAC3B,MAAM,EAAM,mBAAmB;CAE/B,MAAM;CAEN,OAAO,WAAY;EACjB,OAAO;CACT;CAEA,QAAQ,SAAU,GAAS,GAAS;EAClC,IAAM,IAAM,EAAQ,KAEd,IAAQ,EAAQ,QAAQ,OACxB,IAAmB,EAAM,MAAM,CAAO,GACtC,IAAQ,EAAM,aAAa,CAAgB;EAEjD,SAAS,EAAQ,GAAiB;GAChC,IAAI,EAAM,kDAAkD,O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C;EAC5C,uCAAuC;EACvC,4CAA4C;EAC5C,qCAAqC;EACrC,gDAAgD;EAChD,kCAAkC;CACpC;CAEA,SAAS,EAEP,iDAAiD,EACnD;AACF;AAEA,SAAS,EAAgB,GAA6B;CAEpD,IAAM,IAAU,EAAQ,KAAK,CAAC,CAAC;CAC/B,OACE,EAAQ,QAAQ,KAChB,EAAQ,QAAQ,IAAU,cAC1B,EAAQ,QAAQ,IAAU,kBAC1B,EAAQ,QAAQ,IAAU,eAC1B,EAAQ,QAAQ,IAAU,wBAC1B,EAAQ,QAAQ,IAAU,mCAC1B,EAAQ,QAAQ,IAAU,kCAC1B,EAAQ,QAAQ,IAAU;AAE9B"}
|
|
1
|
+
{"version":3,"file":"internalPane2.esm.js","names":[],"sources":["../../src/internal/internalPane.ts"],"sourcesContent":["/* Internal Pane\n **\n ** This outline pane contains the properties which are\n ** internal to the user's interaction with the web, and are not normally displayed\n */\n/* global alert confirm */\n\nimport { icons, ns, widgets } from 'solid-ui'\nimport { BlankNode, IndexedFormula, literal, NamedNode, st, sym, Variable, Store } from 'rdflib'\nimport { PaneDefinition } from 'pane-registry'\nimport './internalPane.css'\n\nconst pane: PaneDefinition = {\n icon: icons.originalIconBase + 'tango/22-emblem-system.png',\n\n name: 'internal',\n\n label: function () {\n return 'Under The Hood' // There is often a URI even of no statements\n },\n\n render: function (subject, context) {\n const dom = context.dom\n // @ts-ignore\n const store = context.session.store as Store\n const canonizedSubject = store.canon(subject) as BlankNode | NamedNode | Variable\n const types = store.findTypeURIs(canonizedSubject)\n\n function filter (pred: NamedNode) {\n if (types['http://www.w3.org/2007/ont/link#ProtocolEvent']) return true // display everything for them\n const view = context.session.paneRegistry.byName('internal')\n return (\n view &&\n view.predicates &&\n !!(typeof view.predicates[pred.uri] !== 'undefined')\n )\n }\n\n const div = dom.createElement('div')\n div.classList.add('internalPane', 'internalPaneContent')\n\n function deleteRecursive (kb: IndexedFormula, folder: NamedNode) {\n const fetcher = (kb as any).fetcher\n if (!fetcher) {\n console.error('No fetcher available')\n return\n }\n return new Promise(function (resolve, reject) {\n fetcher.load(folder).then(function () {\n const promises = kb.each(folder, ns.ldp('contains')).map(file => {\n if (kb.holds(file, ns.rdf('type'), ns.ldp('BasicContainer'))) {\n return deleteRecursive(kb, file as NamedNode)\n } else {\n console.log('deleteRecursive leaf file: ' + file)\n return fetcher.webOperation('DELETE', (file as NamedNode).uri)\n }\n })\n Promise.all(promises).then(\n () => {\n console.log('deleteRecursive empty folder: ' + folder)\n fetcher\n .webOperation('DELETE', folder.uri)\n .then(() => {\n console.log('Deleted Ok: ' + folder)\n resolve(undefined)\n })\n .catch((err: string) => {\n const str = 'Unable to delete ' + folder + ': ' + err\n console.log(str)\n reject(new Error(str))\n })\n resolve(undefined)\n },\n err => {\n alert(err)\n reject(err)\n }\n )\n })\n })\n }\n\n const isDocument = subject.uri && !subject.uri.includes('#')\n if (isDocument) {\n const controls = div.appendChild(dom.createElement('table'))\n controls.classList.add('internalPaneControls')\n const controlRow = controls.appendChild(dom.createElement('tr'))\n\n const deleteCell = controlRow.appendChild(dom.createElement('td'))\n const isFolder =\n (subject.uri && subject.uri.endsWith('/')) ||\n store.holds(subject, ns.rdf('type'), ns.ldp('Container'))\n const noun = isFolder ? 'folder' : 'file'\n if (!isProtectedUri(subject)) {\n console.log(subject)\n const deleteButton = widgets.deleteButtonWithCheck(\n dom,\n deleteCell,\n noun,\n function () {\n if (\n !confirm(\n `Are you sure you want to delete ${subject}? This cannot be undone.`\n )\n ) {\n return\n }\n // @@ TODO Remove casing of store.fetcher\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n const promise = isFolder\n ? (deleteRecursive(store, subject) || Promise.resolve())\n : store.fetcher.webOperation('DELETE', subject.uri) || Promise.resolve()\n promise\n .then(() => {\n const str = 'Deleted: ' + subject\n console.log(str)\n })\n .catch((err: any) => {\n const str = 'Unable to delete ' + subject + ': ' + err\n console.log(str)\n alert(str)\n })\n }\n )\n\n deleteButton.removeAttribute('class') // Remove hover hide\n deleteButton.classList.add('internalPaneDeleteButton')\n deleteCell.appendChild(deleteButton)\n }\n\n const refreshCell = controlRow.appendChild(dom.createElement('td'))\n const refreshButton = widgets.button(\n dom,\n icons.iconBase + 'noun_479395.svg',\n 'refresh'\n )\n refreshCell.appendChild(refreshButton)\n refreshButton.addEventListener('click', () => {\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n store.fetcher.refresh(subject, function (\n ok,\n errm\n ) {\n let str\n if (ok) {\n str = 'Refreshed OK: ' + subject\n } else {\n str = 'Error refreshing: ' + subject + ': ' + errm\n }\n console.log(str)\n alert(str)\n })\n })\n }\n\n let plist = store.statementsMatching(subject)\n let docURI = ''\n if (!store.fetcher) {\n throw new Error('Store has no fetcher')\n }\n\n if (subject.uri) {\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#uri'),\n subject.uri as any, // @@ TODO Remove casting\n store.fetcher.appNode\n )\n )\n if (subject.uri.indexOf('#') >= 0) {\n docURI = subject.uri.split('#')[0]\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#documentURI'),\n subject.uri.split('#')[0] as any, // @@ TODO Remove casting\n store.fetcher.appNode\n )\n )\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/2007/ont/link#document'),\n sym(subject.uri.split('#')[0]),\n store.fetcher.appNode\n )\n )\n } else {\n docURI = subject.uri\n }\n }\n if (docURI) {\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n\n const ed = store.updater.editable(docURI)\n if (ed) {\n plist.push(\n st(\n subject,\n sym('http://www.w3.org/ns/rww#editable'),\n literal(ed.toString()),\n store.fetcher.appNode\n )\n )\n }\n }\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(dom)\n outliner.appendPropertyTRs(div, plist, false, filter)\n plist = store.statementsMatching(undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, true, filter)\n return div\n },\n\n predicates: {\n // Predicates used for inner workings. Under the hood\n 'http://www.w3.org/2007/ont/link#request': 1,\n 'http://www.w3.org/2007/ont/link#requestedBy': 1,\n 'http://www.w3.org/2007/ont/link#source': 1,\n 'http://www.w3.org/2007/ont/link#session': 2, // 2= test neg but display\n 'http://www.w3.org/2007/ont/link#uri': 1,\n 'http://www.w3.org/2007/ont/link#documentURI': 1,\n 'http://www.w3.org/2007/ont/link#document': 1,\n 'http://www.w3.org/2007/ont/link#all': 1, // From userinput.js\n 'http://www.w3.org/2007/ont/link#Document': 1,\n 'http://www.w3.org/ns/rww#editable': 1,\n 'http://www.w3.org/2000/01/rdf-schema#seeAlso': 1,\n 'http://www.w3.org/2002/07/owl#': 1\n },\n\n classes: {\n // Things which are inherently already undercover\n 'http://www.w3.org/2007/ont/link#ProtocolEvent': 1\n }\n}\n\nfunction isProtectedUri (subject: NamedNode): boolean {\n // TODO: Could make the code below smarter by removing some of the redundancy by creating a recursive function, but did not bother now\n const siteUri = subject.site().uri\n return (\n subject.uri === siteUri ||\n subject.uri === siteUri + 'profile/' ||\n subject.uri === siteUri + 'profile/card' ||\n subject.uri === siteUri + 'settings/' ||\n subject.uri === siteUri + 'settings/prefs.ttl' ||\n subject.uri === siteUri + 'settings/privateTypeIndex.ttl' ||\n subject.uri === siteUri + 'settings/publicTypeIndex.ttl' ||\n subject.uri === siteUri + 'settings/serverSide.ttl'\n )\n}\n\nexport default pane\n\n// ends\n"],"mappings":";;;;AAYA,IAAM,IAAuB;CAC3B,MAAM,EAAM,mBAAmB;CAE/B,MAAM;CAEN,OAAO,WAAY;EACjB,OAAO;CACT;CAEA,QAAQ,SAAU,GAAS,GAAS;EAClC,IAAM,IAAM,EAAQ,KAEd,IAAQ,EAAQ,QAAQ,OACxB,IAAmB,EAAM,MAAM,CAAO,GACtC,IAAQ,EAAM,aAAa,CAAgB;EAEjD,SAAS,EAAQ,GAAiB;GAChC,IAAI,EAAM,kDAAkD,OAAO;GACnE,IAAM,IAAO,EAAQ,QAAQ,aAAa,OAAO,UAAU;GAC3D,OACE,KACA,EAAK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CACpC;CAEA,SAAS,EAEP,iDAAiD,EACnD;AACF;AAEA,SAAS,EAAgB,GAA6B;CAEpD,IAAM,IAAU,EAAQ,KAAK,CAAC,CAAC;CAC/B,OACE,EAAQ,QAAQ,KAChB,EAAQ,QAAQ,IAAU,cAC1B,EAAQ,QAAQ,IAAU,kBAC1B,EAAQ,QAAQ,IAAU,eAC1B,EAAQ,QAAQ,IAAU,wBAC1B,EAAQ,QAAQ,IAAU,mCAC1B,EAAQ,QAAQ,IAAU,kCAC1B,EAAQ,QAAQ,IAAU;AAE9B"}
|
package/dist/n3Pane.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"n3Pane.d.ts","sourceRoot":"","sources":["../src/n3Pane.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"n3Pane.d.ts","sourceRoot":"","sources":["../src/n3Pane.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAClD,OAAO,cAAc,CAAA;AACrB,OAAO,0BAA0B,CAAA;AAIjC,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,MAAM,GAAG,IAAI,CAAA;IACzE,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,cAAc,CAAA;CAC5E,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,UAsDpB,CAAA"}
|
package/dist/n3Pane2.cjs.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.n3-pane{border
|
|
2
|
-
`).forEach(e=>{let t=r.createElement(`div`),n=i(e);t.classList.add(`n3-pane__line`),t.style.setProperty(`--n3-indent`,`${n}ch`),t.textContent=e.length>0?e:` `,d.appendChild(t)}),s.appendChild(d),s}};exports.n3Pane=a;
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.n3-pane{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);box-sizing:border-box;width:100%;min-width:0}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("./_virtual/_rolldown/runtime.cjs.js");require("./components/editor-card/index.cjs.js");let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r=t.ns,i={icon:t.icons.originalIconBase+`w3c/n3_smaller.png`,name:`n3`,audience:[r.solid(`Developer`)],label:function(e,t){let n=t.session.store;if(`http://www.w3.org/2007/ont/link#ProtocolEvent`in n.findTypeURIs(e))return null;let r=n.statementsMatching(void 0,void 0,void 0,e).length;return r===0?null:`Data (`+r+`) as N3`},render:function(e,t){let r=t.dom,i=t.session.store,a=r.createElement(`div`);a.setAttribute(`class`,`n3-pane`);let o=i.statementsMatching(void 0,void 0,void 0,e),s=n.Serializer(i);s.suggestNamespaces(i.namespaces),s.setBase(e.uri);let c=s.statementsToN3(o),l=r.createElement(`solid-panes-editor-card`);return l.contentType=`text/n3`,l.content=c,a.appendChild(l),a}};exports.n3Pane=i;
|
|
3
2
|
//# sourceMappingURL=n3Pane2.cjs.js.map
|
package/dist/n3Pane2.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"n3Pane2.cjs.js","names":[],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext
|
|
1
|
+
{"version":3,"file":"n3Pane2.cjs.js","names":[],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './n3Pane.css'\nimport './components/editor-card'\n\nconst ns = UI.ns\n\ntype N3PaneLike = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const n3Pane: N3PaneLike = {\n icon: UI.icons.originalIconBase + 'w3c/n3_smaller.png',\n\n name: 'n3',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'Data (' + n + ') as N3'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'n3-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[] // @@ slow with current store!\n\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToN3(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'text/n3'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":"mNAaA,IAAM,EAAK,EAAG,GAUD,EAAqB,CAChC,KAAM,EAAG,MAAM,iBAAmB,qBAElC,KAAM,KAEN,SAAU,CAAC,EAAG,MAAM,WAAW,CAAC,EAEhC,MAAO,SAAU,EAAoB,EAA4C,CAC/E,IAAM,EAAQ,EAAQ,QAAQ,MAC9B,GACE,kDACA,EAAM,aAAa,CAAO,EAE1B,OAAO,KAET,IAAM,EAAI,EAAM,mBAAmB,IAAA,GAAW,IAAA,GAAW,IAAA,GAAW,CAAO,CAAC,CACzE,OAEH,OADI,IAAM,EAAU,KACb,SAAW,EAAI,SACxB,EAEA,OAAQ,SACN,EACA,EACgB,CAChB,IAAM,EAAa,EAAQ,IACrB,EAAK,EAAQ,QAAQ,MAErB,EAAM,EAAW,cAAc,KAAK,EAC1C,EAAI,aAAa,QAAS,SAAS,EAInC,IAAM,EAAa,EAAG,mBACpB,IAAA,GACA,IAAA,GACA,IAAA,GACA,CACF,EAEM,EAAK,EAAK,WAAW,CAAE,EAC7B,EAAG,kBAAkB,EAAG,UAAU,EAClC,EAAG,QAAQ,EAAQ,GAAG,EACtB,IAAM,EAAoB,EAAG,eAAe,CAAU,EAChD,EAAS,EAAW,cAAc,yBAAyB,EAQjE,MAJA,GAAO,YAAc,UACrB,EAAO,QAAU,EAEjB,EAAI,YAAY,CAAM,EACf,CACT,CACF"}
|
package/dist/n3Pane2.esm.js
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.n3-pane{border
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.n3-pane{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);box-sizing:border-box;width:100%;min-width:0}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
import "./components/editor-card/index.esm.js";
|
|
2
3
|
import * as e from "solid-ui";
|
|
3
4
|
import * as t from "rdflib";
|
|
4
5
|
//#region src/n3Pane.ts
|
|
5
|
-
var n = e.ns
|
|
6
|
-
function r(e) {
|
|
7
|
-
if (e.trim().length === 0) return 0;
|
|
8
|
-
let t = 0;
|
|
9
|
-
for (let n of e) {
|
|
10
|
-
if (n === " ") {
|
|
11
|
-
t += 1;
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
if (n === " ") {
|
|
15
|
-
t += 2;
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
return Math.max(t, 2);
|
|
21
|
-
}
|
|
22
|
-
var i = {
|
|
6
|
+
var n = e.ns, r = {
|
|
23
7
|
icon: e.icons.originalIconBase + "w3c/n3_smaller.png",
|
|
24
8
|
name: "n3",
|
|
25
9
|
audience: [n.solid("Developer")],
|
|
@@ -30,23 +14,15 @@ var i = {
|
|
|
30
14
|
return r === 0 ? null : "Data (" + r + ") as N3";
|
|
31
15
|
},
|
|
32
16
|
render: function(e, n) {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
s.setAttribute("class", "n3-pane"), o(s);
|
|
40
|
-
let c = a.statementsMatching(void 0, void 0, void 0, e), l = t.Serializer(a);
|
|
41
|
-
l.suggestNamespaces(a.namespaces), l.setBase(e.uri);
|
|
42
|
-
let u = l.statementsToN3(c), d = i.createElement("div");
|
|
43
|
-
return d.classList.add("n3-pane__source"), u.split("\n").forEach((e) => {
|
|
44
|
-
let t = i.createElement("div"), n = r(e);
|
|
45
|
-
t.classList.add("n3-pane__line"), t.style.setProperty("--n3-indent", `${n}ch`), t.textContent = e.length > 0 ? e : " ", d.appendChild(t);
|
|
46
|
-
}), s.appendChild(d), s;
|
|
17
|
+
let r = n.dom, i = n.session.store, a = r.createElement("div");
|
|
18
|
+
a.setAttribute("class", "n3-pane");
|
|
19
|
+
let o = i.statementsMatching(void 0, void 0, void 0, e), s = t.Serializer(i);
|
|
20
|
+
s.suggestNamespaces(i.namespaces), s.setBase(e.uri);
|
|
21
|
+
let c = s.statementsToN3(o), l = r.createElement("solid-panes-editor-card");
|
|
22
|
+
return l.contentType = "text/n3", l.content = c, a.appendChild(l), a;
|
|
47
23
|
}
|
|
48
24
|
};
|
|
49
25
|
//#endregion
|
|
50
|
-
export {
|
|
26
|
+
export { r as n3Pane };
|
|
51
27
|
|
|
52
28
|
//# sourceMappingURL=n3Pane2.esm.js.map
|
package/dist/n3Pane2.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"n3Pane2.esm.js","names":[],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext
|
|
1
|
+
{"version":3,"file":"n3Pane2.esm.js","names":[],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './n3Pane.css'\nimport './components/editor-card'\n\nconst ns = UI.ns\n\ntype N3PaneLike = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const n3Pane: N3PaneLike = {\n icon: UI.icons.originalIconBase + 'w3c/n3_smaller.png',\n\n name: 'n3',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'Data (' + n + ') as N3'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'n3-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[] // @@ slow with current store!\n\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToN3(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'text/n3'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":";;;;;AAaA,IAAM,IAAK,EAAG,IAUD,IAAqB;CAChC,MAAM,EAAG,MAAM,mBAAmB;CAElC,MAAM;CAEN,UAAU,CAAC,EAAG,MAAM,WAAW,CAAC;CAEhC,OAAO,SAAU,GAAoB,GAA4C;EAC/E,IAAM,IAAQ,EAAQ,QAAQ;EAC9B,IACE,mDACA,EAAM,aAAa,CAAO,GAE1B,OAAO;EAET,IAAM,IAAI,EAAM,mBAAmB,KAAA,GAAW,KAAA,GAAW,KAAA,GAAW,CAAO,CAAC,CACzE;EAEH,OADI,MAAM,IAAU,OACb,WAAW,IAAI;CACxB;CAEA,QAAQ,SACN,GACA,GACgB;EAChB,IAAM,IAAa,EAAQ,KACrB,IAAK,EAAQ,QAAQ,OAErB,IAAM,EAAW,cAAc,KAAK;EAC1C,EAAI,aAAa,SAAS,SAAS;EAInC,IAAM,IAAa,EAAG,mBACpB,KAAA,GACA,KAAA,GACA,KAAA,GACA,CACF,GAEM,IAAK,EAAK,WAAW,CAAE;EAE7B,AADA,EAAG,kBAAkB,EAAG,UAAU,GAClC,EAAG,QAAQ,EAAQ,GAAG;EACtB,IAAM,IAAoB,EAAG,eAAe,CAAU,GAChD,IAAS,EAAW,cAAc,yBAAyB;EAQjE,OAJA,EAAO,cAAc,WACrB,EAAO,UAAU,GAEjB,EAAI,YAAY,CAAM,GACf;CACT;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.obj{vertical-align:top;border:none;margin:.2em;padding:0}.iconTD{vertical-align:top;border:none;width:0;margin:.2em;padding:0}.labelTD{width:100%}.file-explorer-header{flex-wrap:wrap;justify-content:flex-start;align-items:center;display:flex}.strongHeader{margin:0 .6rem 0 0;padding:.1rem .4rem;font-size:150%}.tableFullWidth{width:100%;background:var(--color-background,#f8f9fb)!important}.placeholderTable{width:100%}.tdFlex{vertical-align:top;border-radius:5px;flex-direction:row;justify-content:space-between;display:flex;overflow:hidden}.paneDiv,.exceptionPane{width:100%;min-width:0;display:block}.objectValue--literal{white-space:pre-wrap}.objectValue--integer,.objectValue--decimal,.objectValue--double{text-align:right;display:block}.objectValueAccessIcon,.objectValueLinkIcon,.phoneIcon{vertical-align:middle;display:inline-block}.objectValueLinkIcon,.phoneIcon{width:12px;height:12px}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;const t=require("./propertyViews.cjs.js"),n=require("./outlineIcons.cjs.js"),r=require("./userInput.cjs.js"),i=require("./queryByExample.cjs.js"),a=require("../utils/webIdUtils.cjs.js"),o=require("../utils/podUtils.cjs.js");require("../components/file-explorer-header/FileExplorerProvider.cjs.js");let s=require("solid-ui");s=e.__toESM(s);let c=require("solid-logic"),l=require("pane-registry");l=e.__toESM(l);let u=require("rdflib");u=e.__toESM(u);function d(e){let d=e.dom;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let f=this,p=this,m=[];this.selection=m,this.ancestor=s.utils.ancestor,this.sparql=u.UpdateManager,this.kb=c.store;let h=c.store,g=c.store.fetcher;d.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let _=this.outlineElement;this.init=function(){let e=b();e.outline=this},this.getLayoutMode=function(){let e=this.context?.environment?.layout;if(e===`mobile`||e===`desktop`)return e;if(typeof window<`u`&&window.matchMedia){let e=Math.round(Math.min(window.innerWidth,window.visualViewport?.width||window.innerWidth)),t=window.matchMedia(`(pointer: coarse)`).matches||navigator.maxTouchPoints>0;return e<=768||t&&e<=1024?`mobile`:`desktop`}return`desktop`},v.lastkbsize=0;function v(e){let t=[];for(let e=arguments.length-1;e>0;e--)t[e-1]=arguments[e];let n=new Date().getTime(),r=e.apply(e,t),i=new Date().getTime();return s.log.info(`BENCHMARK: kb delta: `+(h.statements.length-v.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),v.lastkbsize=h.statements.length,r}function y(e,t,r){let i=s.utils.AJARImage(n.outlineIcons.src.icon_remove_node,`remove`,void 0,d);return i.addEventListener(`click`,K),i.node=r,i.setAttribute(`about`,t.toNT()),i.style.marginLeft=`5px`,i.style.marginRight=`10px`,e.appendChild(i),i}this.appendAccessIcons=function(e,t,n){if(n.termType!==`NamedNode`)return;let r=e.uris(n);r.sort();let i=null;for(let e=0;e<r.length;e++)r[e]!==i&&(i=r[e],p.appendAccessIcon(t,i))},this.appendAccessIcon=function(e,t){if(!t)return``;let r=u.uri.docpart(t);if(r.slice(0,5)!==`http:`)return``;let i=g.getState(r),a,o,c;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,c=G;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,c=U;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,c=W,o=`loaded`;break;case`failed`:a=n.outlineIcons.src.icon_failed,o=`failed`,c=U;break;case`unpermitted`:a=n.outlineIcons.src.icon_failed,c=U,o=`no perm`;break;case`unfetchable`:a=n.outlineIcons.src.icon_failed,c=U,o=`cannot fetch`;break;default:s.log.error(`?? state = `+i)}let l=s.utils.AJARImage(a,o,n.outlineIcons.tooltips[a].replace(/[Tt]his resource/,r),d);return l.classList.add(`objectValueAccessIcon`),l.setAttribute(`uri`,t),l.addEventListener(`click`,c),P(l,r),e.appendChild(l),l},this.outlineObjectTD=function(e,t,n,r){let i=d.createElement(`td`);return i.classList.add(`obj`),i.setAttribute(`notSelectable`,`false`),e?((e.termType===`NamedNode`||e.termType===`BlankNode`||e.termType===`Literal`&&e.value.slice&&(e.value.slice(0,6)===`ftp://`||e.value.slice(0,8)===`https://`||e.value.slice(0,7)===`http://`))&&(i.setAttribute(`about`,e.toNT()),i.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-expand-trans.png`,`expand`,void 0,d)).addEventListener(`click`,V)),i.setAttribute(`class`,`obj`),h.whether(e,s.ns.rdf(`type`),s.ns.link(`Request`))&&(i.className=`undetermined`),t||=ne,i.appendChild(t(e)),n&&y(i,e,n),i.tabulatorSelect=function(){z(this,!0)},i.tabulatorDeselect=function(){z(this,!1)},i.addEventListener(`click`,q),i):(i.textContent=`No object available.`,i)},this.outlinePredicateTD=function(e,t,r,i){let a=d.createElement(`TD`);a.setAttribute(`about`,e.toNT()),a.setAttribute(`class`,i?`pred internal`:`pred`);let o;switch(e.termType){case`BlankNode`:a.className=`undetermined`;break;case`NamedNode`:o=s.utils.predicateLabelForXML(e,r);break;case`Collection`:o=s.utils.predicateLabelForXML(e.elements[0],r)}o=o?o.slice(0,1).toUpperCase()+o.slice(1):`...`;let c=d.createElement(`TD`);c.classList.add(`labelTD`),c.setAttribute(`notSelectable`,`true`),c.appendChild(d.createTextNode(o)),a.appendChild(c),c.style.width=`100%`,a.appendChild(N.construct(d));for(let e in n.outlineIcons.termWidgets){if(!t||!t.AJAR_statement)break;n.outlineIcons.termWidgets[e].filter&&n.outlineIcons.termWidgets[e].filter(t.AJAR_statement,`pred`,r)&&N.addIcon(a,n.outlineIcons.termWidgets[e])}return a.tabulatorSelect=function(){z(this,!0)},a.tabulatorDeselect=function(){z(this,!1)},a.addEventListener(`click`,q),a};function b(){return C(`OutlineView`,`Resource browser`)}function x(){return document.querySelector(`solid-panes-navbar`)}function S(){let e=x();e&&e.classList.remove(`navbar--hidden`)}function C(e){if(document.getElementById(`MainContent`)||document.body,e===`OutlineView`){let e=document.getElementById(`OutlineView`);if(e)return e;let t=document.getElementById(`MainContent`)||document.body;if(t){let e=document.createElement(`table`);return e.id=`OutlineView`,e.classList.add(`outline-view`),e.setAttribute(`aria-label`,`Resource browser`),t.appendChild(e),e}}}async function w(e,t){e.uri.endsWith(`/`)&&await o.loadContainerRepresentation(e);let n=t.session.paneRegistry,r=n.list.filter(n=>n.label(e,t)&&!n.global&&n.name!==`sharing`);if(r.length===0)return[n.byName(`internal`)];let i=await s.login.filterAvailablePanes(r);return i.length===0?[r[0]]:n.list.indexOf(r[0])<n.list.indexOf(i[0])?[r[0]].concat(i):i}function T(e,t){return e.find(e=>e.shouldGetFocus&&e.shouldGetFocus(t))||e[0]}function E(e){let t=d.getElementById(`queryButton`);t&&(e?t.removeAttribute(`style`):t.setAttribute(`style`,`display:none;`))}function D(t,n,r,i){if(!t||!r)return;let a;try{s.log.info(`outline: Rendering pane (menu): `+r.name),a=r.render(n,e,i)}catch(e){a=d.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=d.createElement(`pre`);a.appendChild(t),t.appendChild(d.createTextNode(s.utils.stackString(e)))}a.classList.add(`paneDiv`);let o=t.querySelector(`.paneDiv`);o?o.replaceWith(a):t.appendChild(a)}function O(e,t){let n=d.getElementById(`OutlineView`);if(!n)return;let r=e.toNT(),i=n.querySelector(`td.paneView[about="`+r+`"]`);if(!i)return;let a=i.querySelector(`file-explorer-provider`);if(a){if(!t){s.log.warn(`outline: Unable to open pane in place: pane is undefined.`);return}E(!!t.requireQueryButton),a.openSelectedPane?.(t),D(a,e,t,a.paneRenderOptions)}}async function ee(t,n,r){r||={};let i=d.createElement(`tr`);r.hover&&i.classList.add(`hoverControl`);let o=i.appendChild(d.createElement(`td`));o.classList.add(`paneView`,`tdFlex`),o.setAttribute(`notSelectable`,`true`),o.setAttribute(`about`,t.toNT()),o.setAttribute(`colspan`,`2`);let s=o.appendChild(d.createElement(`file-explorer-provider`));s.context=e,s.subjectUri=t.uri,s.onBack=()=>H({target:s});let c=r.hideList?[]:await w(t,e);return s.relevantPanes=c,s.pane=n||T(c,t),s.showHeader=!(t&&t.uri&&t.site&&t.site().uri===t.uri)&&!a.isWebIdUri(t),s.paneRenderOptions=r,s.soloPane=r.solo,s.openPane=(e,t)=>O(e,l.byName(t)),s.handleSharingClick=()=>O(t,l.byName(`sharing`)),s.pane&&(i.classList.add(`outlinePaneRow`),D(s,t,s.pane,r)),i}function k(e){let t=e.parentNode,n=t.parentNode,r=d.createElement(`table`);r.classList.add(`placeholderTable`),n.replaceChild(r,t),t.removeChild(e),n.replaceChild(t,r)}let A=this.propertyTable=function(e,t,n,r){return s.log.debug(`Property table for: `+e),e=h.canon(e),t?(s.log.info(`Re-expand: `+t),t):(t=d.createElement(`table`),t.classList.add(`tableFullWidth`),ee(e,n,r).then(e=>{t.appendChild(e)}),t)};function j(e,t,n){let r=e.createElement(`TR`);r.AJAR_statement=t,r.AJAR_inverse=n,r.setAttribute(`predTR`,`true`);let i=p.outlinePredicateTD(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=j;function M(e,t,n,r){if(s.log.debug(`Property list length = `+t.length),t.length===0)return``;let i,a,o;n?(i=function(e){return e.subject},t=t.sort(s.utils.RDFComparePredicateSubject)):(i=function(e){return e.object},t=t.sort(s.utils.RDFComparePredicateObject));let c=t.length;for(a=0;a<c;a++){let l=t[a];if(r&&!r(l.predicate,n))continue;let u=j(d,l,n);e.appendChild(u);let m=u.firstChild,g=$.defaults[l.predicate.uri],_=0,v=0,y=0;for(o=0;o+a<c&&t[a+o].predicate.sameTerm(l.predicate);o++)o>0&&i(t[a+o]).sameTerm(i(t[a+o-1]))&&_++,i(t[a+o]).lang&&f.labeller.LanguagePreference&&(v+=1,i(t[a+o]).lang.indexOf(f.labeller.LanguagePreference)>=0&&y++);if(y>0&&v===_+1){for(let e=a;e<=a+_;e++)if(f.labeller.LanguagePreference&&i(t[e]).lang.indexOf(f.labeller.LanguagePreference)>=0){u.appendChild(p.outlineObjectTD(i(t[e]),g,void 0,l));break}a+=_;continue}u.appendChild(p.outlineObjectTD(i(l),g,void 0,l)),u.showNobj=function(r){let c=o-_,u=2*r<c?r:c,f=[];if(c!==1){m.setAttribute(`rowspan`,u===c?c:r+1);let _;u<c&&u===1&&m.setAttribute(`rowspan`,2);let v=0;for(_=1;_<o;_++)if(h.canon(i(t[a+_])).sameTerm(h.canon(i(t[a+_-1]))))s.log.info(`there are duplicates here: %s`,t[a+_-1]);else{v++,l=t[a+_],g=$.defaults[l.predicate.uri];let r=d.createElement(`tr`);r.style.colspan=`1`,r.appendChild(p.outlineObjectTD(i(t[a+_]),g,void 0,l)),r.AJAR_statement=l,r.AJAR_inverse=n,e.appendChild(r),v>=u&&(r.style.display=`none`,f.push(r))}u===c&&m.setAttribute(`rowspan`,v+1)}if(u<c){let t=d.createElement(`tr`),n=t.appendChild(d.createElement(`td`));if(n.setAttribute(`style`,`margin: 0.2em; border: none; padding: 0; vertical-align: top;`),n.setAttribute(`notSelectable`,`false`),c>r){let e=d.createElement(`a`);n.appendChild(e);let t=(function(e){return e(m,o,_,r)})(function(t,n,r,i){return function(n){e.innerHTML=``,n===`none`?(e.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-more-trans.png`,`more`,`See all`,d)),e.appendChild(d.createTextNode(c-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,d)),t.setAttribute(`rowspan`,c+1));for(let e=0;e<f.length;e++){let t=f[e];t.style.display=n}}}),i=`none`,a=function(e){return t(i),i=i===`none`?``:`none`,e&&e.stopPropagation(),!1};a(),e.addEventListener(`click`,a,!1)}e.appendChild(t)}},u.showAllobj=function(){u.showNobj(o-_)},u.showNobj(10),a+=o-1}}this.appendPropertyTRs=M;let N={};globalThis.termWidget=N,N.construct=function(e){e||=document;let t=e.createElement(`TD`);return t.setAttribute(`style`,`margin: 0.2em; border: none; padding: 0; vertical-align: top;`),t.setAttribute(`class`,`iconTD`),t.setAttribute(`notSelectable`,`true`),t.style.width=`0px`,t},N.addIcon=function(e,t,n){let r=e.childNodes[1];if(!r)return;let i=r.style.width,a=s.utils.AJARImage(t.src,t.alt,t.tooltip,d);i=parseInt(i),i+=t.width,r.style.width=i+`px`,r.appendChild(a),n&&a.addEventListener(`click`,n)},N.removeIcon=function(e,t){let n=e.childNodes[1],r;if(!n)return;let i=n.style.width;i=parseInt(i),i-=t.width,n.style.width=i+`px`;for(let e=0;e<n.childNodes.length;e++){let i=n.childNodes[e],a=i.src;try{r=d.location.href.split(`?`)[0]}catch{r=``}a===u.uri.join(t.src,r)&&n.removeChild(i)}},N.replaceIcon=function(e,t,n,r){N.removeIcon(e,t),N.addIcon(e,n,r)};function P(e,t){s.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!f.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};g.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),g.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),g.addCallback(`fail`,r(n.outlineIcons.src.icon_failed))}function F(e){let t=e.getAttribute(`class`);return!!(t&&t.indexOf(`selected`)>=0)}function I(e){let t=p.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,L),t.parentNode.parentNode.removeAttribute(`optional`)}function L(e){let t=p.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOff,n.outlineIcons.termWidgets.optOn,I),t.parentNode.parentNode.setAttribute(`optional`,`true`)}function R(e,t){let r=n.outlineIcons.termWidgets.optOn,i=n.outlineIcons.termWidgets.optOff;for(let n=e;n.parentNode;n=n.parentNode)for(;;)if(n.getAttribute(`predTR`)){let e=n.getAttribute(`parentOfSelected`);e=e?parseInt(e):0,e===0&&t>0&&N.addIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i,n.getAttribute(`optional`)?I:L),e+=t,n.setAttribute(`parentOfSelected`,e),e===0&&(n.removeAttribute(`parentOfSelected`),N.removeIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i));break}else if(n.previousSibling&&n.previousSibling.nodeName===`TR`)n=n.previousSibling;else break}this.statusBarClick=function(e){let t=s.utils.getTarget(e);t.label&&(window.content.location=t.label)},this.showURI=function(e){e&&d.getElementById(`UserURI`)&&(d.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)},this.showSource=function(){if(!(typeof sourceWidget>`u`)){for(let e in sourceWidget.sources)sourceWidget.sources[e].setAttribute(`class`,``);for(let e=0;e<m.length;e++){if(!m[e].parentNode)continue;let t=m[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return m};function z(e,t){if(e.nodeName!==`TD`)throw s.log.debug(`down`+e.nodeName),Error(`Expected TD in setSelected: `+e.nodeName+` : `+e.textContent);s.log.debug(`pass`);let r=e.getAttribute(`class`);if(r||=``,t){r+=` selected`,(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&R(e,1),m.push(e);let t=s.utils.getTerm(e);p.showURI(t);let i=e.AJAR_statement;if(i===void 0&&e.parentNode&&(i=e.parentNode.AJAR_statement),i){let t=i.why;c.store.updater.editable(t.uri,h)&&r.indexOf(`pred`)>=0&&N.addIcon(e,n.outlineIcons.termWidgets.addTri)}}else s.log.debug(`cla=$`+r+`$`),r===`selected`&&(r=``),r=r.replace(` selected`,``),(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&R(e,-1),r.indexOf(`pred`)>=0&&N.removeIcon(e,n.outlineIcons.termWidgets.addTri),m=m.filter(function(t){return t===e}),s.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&p.showSource(),e.setAttribute(`class`,r)}function B(){let e=m.length;for(let t=e-1;t>=0;t--)z(m[t],!1);m=[]}this.targetOf=function(e){let t;if(e||=window.event,e.target)t=e.target;else if(e.srcElement)t=e.srcElement;else return s.log.error(`can't get target for event `+e),!1;return t.nodeType===3&&(t=t.parentNode),t},this.walk=function(e,t){let n=t||m[0],r;switch(e){case`down`:try{r=n.parentNode.nextSibling.lastChild}catch{this.walk(`up`);return}B(),z(r,!0);break;case`up`:try{r=n.parentNode.previousSibling.lastChild}catch{return}B(),z(r,!0);break;case`right`:if(B(),n.nextSibling||n.lastChild.tagName===`strong`)z(n.nextSibling,!0);else{let e=d.evaluate(`table/div/tr/td[2]`,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;z(e,!0)}break;case`left`:if(B(),n.previousSibling&&n.previousSibling.className===`undetermined`)return z(n.previousSibling,!0),!0;z(s.utils.ancestor(n.parentNode,`TD`),!0);break;case`moveTo`:B(),z(t,!0)}(e===`down`||e===`up`)&&(r.tabulatorSelect||this.walk(e))},this.OutlinerKeypressPanel=function(e){s.log.info(`Key `+e.keyCode+` pressed`);function t(e){e&&d.getElementById(`UserURI`)&&(d.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]?!0:(o(`right`,a),t(s.utils.getAbout(h,m[0])),!0)}let r,i;if(s.utils.getTarget(e).tagName===`TEXTAREA`||s.utils.getTarget(e).id===`UserURI`||m.length>1)return;if(m.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,p.focusTd),t(s.utils.getAbout(h,m[0])));return}let a=m[0];switch(g.removeCallback(`done`,`setSelectedAfterward`),g.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(s.utils.getTarget(e).tagName===`HTML`){let e=s.utils.getAbout(h,a);r=a.parentNode.AJAR_statement.why,i=c.store.updater.editable(r.uri,h),e?f.GotoSubject(e,!0):i&&p.UserInput.Enter(a)}else this.UserInput.Keypress(e),this.walk(`down`),e.stopPropagation();return;case 38:this.walk(`up`),e.stopPropagation(),e.preventDefault();break;case 40:this.walk(`down`),e.stopPropagation(),e.preventDefault()}if(s.utils.getTarget(e).tagName===`INPUT`)return;let o;switch(e.keyCode){case 46:case 8:r=a.parentNode.AJAR_statement.why,i=c.store.updater.editable(r.uri,h),i&&(e.preventDefault(),this.UserInput.Delete(a));break;case 37:{if(this.walk(`left`))return;let e=s.utils.ancestor(a.parentNode,`TD`);Z(a,s.utils.getAbout(h,e));break}case 39:{let e=s.utils.getAbout(h,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstChild.tagName!==`TABLE`&&(g.addCallback(`done`,n),g.addCallback(`fail`,n),X(a,e,{pane:l.byName(`defaultPane`)})),n()}}break;case 38:case 40:break;default:switch(e.charCode){case 99:if(e.ctrlKey){p.UserInput.copyToClipboard(p.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){p.UserInput.pasteFromClipboard(p.clipboardAddress,a);break}break;default:s.utils.getTarget(e).tagName}}t(s.utils.getAbout(h,m[0]))},this.OutlinerMouseclickPanel=function(e){switch(p.UserInput._tabulatorMode){case 0:J(e);break;case 1:p.UserInput.Click(e)}};function V(e){let t=p.targetOf(e),n=t.parentNode,r=s.utils.getAbout(h,t),i=e.altKey?l.byName(`internal`):void 0;e.shiftKey?Q(n,r,i):e.altKey?X(n,r,{pane:l.byName(`internal`),immediate:!0}):X(n,r)}function H(e){let t=p.targetOf(e),n=s.utils.getAbout(h,t),r=e.altKey?l.byName(`internal`):void 0,i=t.parentNode.parentNode;Z(i,n,r)}function U(e){let t=p.targetOf(e).getAttribute(`uri`);e.altKey?g.fetch(u.uri.docpart(t),{force:!0}):g.refresh(h.sym(u.uri.docpart(t)))}function W(e){let t=p.targetOf(e).getAttribute(`uri`);e.altKey?g.fetch(u.uri.docpart(t),{force:!0}):g.refresh(h.sym(u.uri.docpart(t)))}function G(e){let t=p.targetOf(e).getAttribute(`uri`);g.fetch(u.uri.docpart(t))}function K(e){let t=p.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),k(n)}function q(e){if(p.UserInput._tabulatorMode)return p.UserInput.Click(e);let t=p.targetOf(e),n;for(n=s.utils.ancestor(t,`TD`);n&&n.getAttribute(`notSelectable`)!==`false`;n=s.utils.ancestor(n.parentNode,`TD`));if(!n)return;let r=F(n);if(s.log.debug(`Was node selected before: `+r),e.altKey)z(n,!F(n));else if(e.shiftKey)z(n,!0);else{if(B(),p.UserInput.clearInputAndSave(e),z(n,!0),e.detail===2){e.stopPropagation();return}let t;if(n.parentNode&&(t=n.parentNode.AJAR_statement),!t)return;let i=t.why,a=c.store.updater.editable(i.uri,h);r&&a&&p.UserInput.Click(e,m[0])}s.log.debug(`Was node selected after: `+F(n)+`, count=`+m.length),e.stopPropagation()}function J(e){s.log.info(`@TabulatorMousedown, dom.location is now `+d.location);let t=p.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(p.UserInput.clearMenu(),p.UserInput.lastModified&&p.UserInput.lastModified.parentNode.nextSibling&&p.UserInput.backOut(),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices&&t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_add_triple)&&p.UserInput.clearInputAndSave(e),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices)&&p.UserInput.clearMenu(),e&&e.stopPropagation())}function Y(e){d.title=s.utils.label(e),d.location.href.startsWith(e.site().uri)}function X(e,t,n){n||={};let r=n.pane,i=!!n.already,a=n.immediate;s.log.info(`@outlineExpand, dom is now `+d.location),g.removeCallback(`done`,`expand`),g.removeCallback(`fail`,`expand`);let o=h.canon(t);function c(){if(o=h.canon(o),!e||!e.parentNode||!e.parentNode.parentNode)return!1;let t;if(s.log.info(`@@ REPAINTING `),!i)t=A(o,void 0,r,n);else{for(s.log.info(` ... p is `+e),t=e.firstChild;t.nextSibling&&(s.log.info(` ... checking node `+t),t.nodeName!==`table`);t=t.nextSibling);t=A(o,t,r,n)}i=!0,s.utils.ancestor(e,`TABLE`)&&s.utils.ancestor(e,`TABLE`).style.backgroundColor===`white`?t.style.backgroundColor=`#eee`:t.style.backgroundColor=`white`,s.utils.emptyNode(e).appendChild(t),p.focusTd=e,s.log.debug(`expand: Node for `+o+` expanded`);let a=h.each(o,s.ns.rdfs(`seeAlso`));for(let e=0;e<a.length;e++)e===25&&s.log.warn(`expand: Warning: many (`+a.length+`) seeAlso links for `+o),g.lookUpThing(a[e],o)}function l(e){if(arguments[3])return!0;let t=h.canon(o);s.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=h.sym(u.uri.docpart(e));if(e.indexOf(`#`)>=0)throw Error(`Internal error: hash in `+e);return!function(){if(!t.uri)return!0;let r=h.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=u.uri.docpart(r[t]);n;n=h.HTTPRedirects[n])if(e===n)return!0;return!!h.anyStatementMatching(t,void 0,void 0,n)}()||(s.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),c(),!1)}n.solo&&Y(o),s.log.debug(`outlineExpand: dereferencing `+o);let f=d.createElement(`span`);e.appendChild(f),g.addCallback(`done`,l),g.addCallback(`fail`,l);let m=[];if(o.uri&&o.uri.split(`:`)[0]===`rdf`){c();return}for(let e=0;e<m.length;e++){let t;if(t===m[e](o)){c(),s.log.debug(`outline 1815`),t[1]&&_.removeChild(_.lastChild);return}}if(o.uri&&!a&&!s.widgets.isAudio(o)&&!s.widgets.isVideo(o)){let t=o.doc()&&o.doc().uri?o.doc().uri:``+o.doc(),r=function(e){let t=!!(o&&o.uri&&o.site&&o.site().uri===o.uri);return e===403?t?`This root resource is not accessible with your current permissions. Try logging in with an authorized account or opening a public profile document.`:`This resource is not accessible with your current permissions.`:t?`This root resource is not publicly readable. Try logging in or opening a profile document.`:`This resource is not publicly readable. Try logging in or opening a different public resource.`},i=function(e,t){let n=typeof e==`string`?e:String(e||``),r=t?.status||t?.response?.status;return r===401||r===403?r:n.includes(`status: 403`)||n.includes(`status 403`)?403:n.includes(`status: 401`)||n.includes(`status 401`)?401:null},a=function(n,a){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let o=i(n,a),c=o?r(o):n,l=s.widgets.errorMessageBlock(d,c,`#fee`,a instanceof Error?a:void 0);t&&l.setAttribute(`data-outline-error-for`,t),e.appendChild(l)},l=!1,u=g.nowOrWhenFetched(o.doc(),void 0,function(e,t){e?(g.lookUpThing(o),c(),n.solo&&Y(o)):(l=!0,a(t,void 0))});u&&typeof u.catch==`function`&&u.catch(function(e){l||(l=!0,a(e,e))})}else c()}function Z(e,t){let n=s.utils.ancestor(e,`TR`);n=s.utils.ancestor(n.parentNode,`TR`);let r;n&&(r=n.AJAR_statement);let i;for(i=e.parentNode;i.tagName!==`TD`;i=i.parentNode)if(i===void 0){alert(`Not enclosed in TD!`);return}s.log.debug(`Collapsing subject `+t);let a;r&&(s.log.debug(`looking up pred `+r.predicate.uri+`in defaults`),a=$.defaults[r.predicate.uri]),s.log.debug(`view= `+a);let o;i.parentNode.parentNode.id===`outline`&&(o=i.parentNode),p.replaceTD(p.outlineObjectTD(t,a,o,r),i)}this.replaceTD=function(e,t){let n;F(t)&&(n=!0);for(let e=m.length-1;e>-1;e--)for(let n=m[e];n.parentNode;n=n.parentNode)n===t&&z(m[e],!1);t.parentNode.replaceChild(e,t),n&&z(e,!0)};function Q(e,t){let n=null;for(let t=e.parentNode;t;t=t.parentNode)s.log.debug(`level `+t.tagName),t.tagName===`TD`&&(n=t);s.utils.emptyNode(n).appendChild(A(t)),Y(t),n.setAttribute(`about`,t.toNT())}f.outlineRefocus=Q,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&f.GotoFormURI(e)},this.GotoFormURI=function(e){te(d.getElementById(`UserURI`).value)};function te(e){let t=h.sym(e);this.GotoSubject(t,!0)}this.GotoURIinit=function(e){let t=h.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o=!0){let c=b();o&&(!a||a===c)&&S(),a||=c,r&&(s.utils.emptyNode(a),a.style.width=`100%`);function l(){let t=d.createElement(`tr`);t.classList.add(`outlineRow1`),t.style.verticalAlign=`top`,a.appendChild(t);let n=p.outlineObjectTD(e,void 0,t);return t.appendChild(n),n}let u=l();if(r&&Y(e),t&&X(u,e,{pane:n,solo:r}),r&&d&&d.defaultView&&d.defaultView.history){let t=d.defaultView.history.state||{},r=n?{paneName:n.name}:{};n&&n.subject&&typeof n.subject.uri==`string`&&(r.paneUri=n.subject.uri);let i={...t,...r};try{let n=new URL(document.location.href),r=new URL(e.uri,document.location.href);n.origin===r.origin&&(document.location.href===e.uri?JSON.stringify(t)!==JSON.stringify(i)&&d.defaultView.history.replaceState(i,e.uri,e.uri):d.defaultView.history.pushState(i,e.uri,e.uri))}catch{}}return e};let $=t.propertyViews(d);function ne(t){let r;if(t.termType===`Literal`){if(r=d.createElement(`span`),r.classList.add(`objectValue`,`objectValue--literal`),r.textContent=t.value,t.datatype&&t.datatype.uri){let e=s.ns.xsd(``).uri;t.datatype.uri.slice(0,e.length)===e&&r.classList.add(`objectValue--`+t.datatype.uri.slice(e.length))}}else if(t.termType===`NamedNode`||t.termType===`BlankNode`){if(r=d.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),p.appendAccessIcons(h,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=d.createElement(`a`);r.appendChild(d.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(s.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,d)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(d.createTextNode(s.utils.label(t)));let e=s.widgets.linkIcon(d,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),s.widgets.makeDraggable(r,t)}}else r.appendChild(d.createTextNode(s.utils.label(t)))}else if(t.termType===`Collection`){r=d.createElement(`table`),r.classList.add(`tableFullWidth`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(d.createElement(`tr`)),a=i.appendChild(d.createElement(`td`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(p.outlineObjectTD(n))}}else t.termType===`Graph`?(r=l.byName(`dataContentPane`).statementsAsTables(t.statements,e),r.setAttribute(`class`,`nestedFormula`)):(s.log.error(`Object `+t+` has unknown term type: `+t.termType),r=d.createTextNode(`[unknownTermType:`+t.termType+`]`));return s.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){d.getElementById(`UserURI`).value=d.URL+`?uri=`+d.getElementById(`UserURI`).value},this.UserInput.setSelected=z,this.UserInput.deselectAll=B,this.UserInput.views=$,this.outlineExpand=X,this}exports.default=d;
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.obj{vertical-align:top;border:none;margin:.2em;padding:0 0 5px}.iconTD{vertical-align:top;border:none;width:0;margin:.2em;padding:0}.labelTD{width:100%}.file-explorer-header{flex-wrap:wrap;justify-content:flex-start;align-items:center;display:flex}.strongHeader{margin:0 .6rem 0 0;padding:.1rem .4rem;font-size:150%}.tableFullWidth{width:100%;background:var(--color-background,#f8f9fb)!important}.placeholderTable{width:100%}.tdFlex{vertical-align:top;border-radius:5px;flex-direction:row;justify-content:space-between;display:flex;overflow:hidden}.paneDiv,.exceptionPane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.objectValue--literal{white-space:pre-wrap}.objectValue--integer,.objectValue--decimal,.objectValue--double{text-align:right;display:block}.objectValueAccessIcon,.objectValueLinkIcon,.phoneIcon{vertical-align:middle;display:inline-block}.objectValueLinkIcon,.phoneIcon{width:12px;height:12px}@media (width<=600px){.obj,.iconTD{vertical-align:top;font-size:100%;margin:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;const t=require("./propertyViews.cjs.js"),n=require("./outlineIcons.cjs.js"),r=require("./userInput.cjs.js"),i=require("./queryByExample.cjs.js"),a=require("../utils/webIdUtils.cjs.js"),o=require("../utils/podUtils.cjs.js");require("../components/file-explorer-header/index.cjs.js");let s=require("solid-ui");s=e.__toESM(s);let c=require("solid-logic"),l=require("pane-registry");l=e.__toESM(l);let u=require("rdflib");u=e.__toESM(u);function d(e){let d=e.dom;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let f=this,p=this,m=[];this.selection=m,this.ancestor=s.utils.ancestor,this.sparql=u.UpdateManager,this.kb=c.store;let h=c.store,g=c.store.fetcher;d.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let _=this.outlineElement;this.init=function(){let e=b();e.outline=this},this.getLayoutMode=function(){let e=this.context?.environment?.layout;if(e===`mobile`||e===`desktop`)return e;if(typeof window<`u`&&window.matchMedia){let e=Math.round(Math.min(window.innerWidth,window.visualViewport?.width||window.innerWidth)),t=window.matchMedia(`(pointer: coarse)`).matches||navigator.maxTouchPoints>0;return e<=768||t&&e<=1024?`mobile`:`desktop`}return`desktop`},v.lastkbsize=0;function v(e){let t=[];for(let e=arguments.length-1;e>0;e--)t[e-1]=arguments[e];let n=new Date().getTime(),r=e.apply(e,t),i=new Date().getTime();return s.log.info(`BENCHMARK: kb delta: `+(h.statements.length-v.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),v.lastkbsize=h.statements.length,r}function y(e,t,r){let i=s.utils.AJARImage(n.outlineIcons.src.icon_remove_node,`remove`,void 0,d);return i.addEventListener(`click`,K),i.node=r,i.setAttribute(`about`,t.toNT()),i.style.marginLeft=`5px`,i.style.marginRight=`10px`,e.appendChild(i),i}this.appendAccessIcons=function(e,t,n){if(n.termType!==`NamedNode`)return;let r=e.uris(n);r.sort();let i=null;for(let e=0;e<r.length;e++)r[e]!==i&&(i=r[e],p.appendAccessIcon(t,i))},this.appendAccessIcon=function(e,t){if(!t)return``;let r=u.uri.docpart(t);if(r.slice(0,5)!==`http:`)return``;let i=g.getState(r),a,o,c;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,c=G;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,c=U;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,c=W,o=`loaded`;break;case`failed`:a=n.outlineIcons.src.icon_failed,o=`failed`,c=U;break;case`unpermitted`:a=n.outlineIcons.src.icon_failed,c=U,o=`no perm`;break;case`unfetchable`:a=n.outlineIcons.src.icon_failed,c=U,o=`cannot fetch`;break;default:s.log.error(`?? state = `+i)}let l=s.utils.AJARImage(a,o,n.outlineIcons.tooltips[a].replace(/[Tt]his resource/,r),d);return l.classList.add(`objectValueAccessIcon`),l.setAttribute(`uri`,t),l.addEventListener(`click`,c),P(l,r),e.appendChild(l),l},this.outlineObjectTD=function(e,t,n,r){let i=d.createElement(`td`);return i.classList.add(`obj`),i.setAttribute(`notSelectable`,`false`),e?((e.termType===`NamedNode`||e.termType===`BlankNode`||e.termType===`Literal`&&e.value.slice&&(e.value.slice(0,6)===`ftp://`||e.value.slice(0,8)===`https://`||e.value.slice(0,7)===`http://`))&&(i.setAttribute(`about`,e.toNT()),i.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-expand-trans.png`,`expand`,void 0,d)).addEventListener(`click`,V)),i.setAttribute(`class`,`obj`),h.whether(e,s.ns.rdf(`type`),s.ns.link(`Request`))&&(i.className=`undetermined`),t||=ne,i.appendChild(t(e)),n&&y(i,e,n),i.tabulatorSelect=function(){z(this,!0)},i.tabulatorDeselect=function(){z(this,!1)},i.addEventListener(`click`,q),i):(i.textContent=`No object available.`,i)},this.outlinePredicateTD=function(e,t,r,i){let a=d.createElement(`TD`);a.setAttribute(`about`,e.toNT()),a.setAttribute(`class`,i?`pred internal`:`pred`);let o;switch(e.termType){case`BlankNode`:a.className=`undetermined`;break;case`NamedNode`:o=s.utils.predicateLabelForXML(e,r);break;case`Collection`:o=s.utils.predicateLabelForXML(e.elements[0],r)}o=o?o.slice(0,1).toUpperCase()+o.slice(1):`...`;let c=d.createElement(`TD`);c.classList.add(`labelTD`),c.setAttribute(`notSelectable`,`true`),c.appendChild(d.createTextNode(o)),a.appendChild(c),c.style.width=`100%`,a.appendChild(N.construct(d));for(let e in n.outlineIcons.termWidgets){if(!t||!t.AJAR_statement)break;n.outlineIcons.termWidgets[e].filter&&n.outlineIcons.termWidgets[e].filter(t.AJAR_statement,`pred`,r)&&N.addIcon(a,n.outlineIcons.termWidgets[e])}return a.tabulatorSelect=function(){z(this,!0)},a.tabulatorDeselect=function(){z(this,!1)},a.addEventListener(`click`,q),a};function b(){return C(`OutlineView`,`Resource browser`)}function x(){return document.querySelector(`solid-panes-navbar`)}function S(){let e=x();e&&e.classList.remove(`navbar--hidden`)}function C(e){if(document.getElementById(`MainContent`)||document.body,e===`OutlineView`){let e=document.getElementById(`OutlineView`);if(e)return e;let t=document.getElementById(`MainContent`)||document.body;if(t){let e=document.createElement(`table`);return e.id=`OutlineView`,e.classList.add(`outline-view`),e.setAttribute(`aria-label`,`Resource browser`),t.appendChild(e),e}}}async function w(e,t){e.uri.endsWith(`/`)&&await o.loadContainerRepresentation(e);let n=t.session.paneRegistry,r=n.list.filter(n=>n.label(e,t)&&!n.global&&n.name!==`sharing`);if(r.length===0)return[n.byName(`internal`)];let i=await s.login.filterAvailablePanes(r);return i.length===0?[r[0]]:n.list.indexOf(r[0])<n.list.indexOf(i[0])?[r[0]].concat(i):i}function T(e,t){return e.find(e=>e.shouldGetFocus&&e.shouldGetFocus(t))||e[0]}function E(e){let t=d.getElementById(`queryButton`);t&&(e?t.removeAttribute(`style`):t.setAttribute(`style`,`display:none;`))}function D(t,n,r,i){if(!t||!r)return;let a;try{s.log.info(`outline: Rendering pane (menu): `+r.name),a=r.render(n,e,i)}catch(e){a=d.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=d.createElement(`pre`);a.appendChild(t),t.appendChild(d.createTextNode(s.utils.stackString(e)))}a.classList.add(`paneDiv`);let o=t.querySelector(`.paneDiv`);o?o.replaceWith(a):t.appendChild(a)}function O(e,t){let n=d.getElementById(`OutlineView`);if(!n)return;let r=e.toNT(),i=n.querySelector(`td.paneView[about="`+r+`"]`);if(!i)return;let a=i.querySelector(`file-explorer-provider`);if(a){if(!t){s.log.warn(`outline: Unable to open pane in place: pane is undefined.`);return}E(!!t.requireQueryButton),a.openSelectedPane?.(t),D(a,e,t,a.paneRenderOptions)}}async function ee(t,n,r){r||={};let i=d.createElement(`tr`);r.hover&&i.classList.add(`hoverControl`);let o=i.appendChild(d.createElement(`td`));o.classList.add(`paneView`,`tdFlex`),o.setAttribute(`notSelectable`,`true`),o.setAttribute(`about`,t.toNT()),o.setAttribute(`colspan`,`2`);let s=o.appendChild(d.createElement(`file-explorer-provider`));s.context=e,s.subjectUri=t.uri,s.onBack=()=>H({target:s});let c=r.hideList?[]:await w(t,e);return s.relevantPanes=c,s.pane=n||T(c,t),s.showHeader=!(t&&t.uri&&t.site&&t.site().uri===t.uri)&&!a.isWebIdUri(t),s.paneRenderOptions=r,s.soloPane=r.solo,s.openPane=(e,t)=>O(e,l.byName(t)),s.handleAccessClick=()=>O(t,l.byName(`sharing`)),s.pane&&(i.classList.add(`outlinePaneRow`),D(s,t,s.pane,r)),i}function k(e){let t=e.parentNode,n=t.parentNode,r=d.createElement(`table`);r.classList.add(`placeholderTable`),n.replaceChild(r,t),t.removeChild(e),n.replaceChild(t,r)}let A=this.propertyTable=function(e,t,n,r){return s.log.debug(`Property table for: `+e),e=h.canon(e),t?(s.log.info(`Re-expand: `+t),t):(t=d.createElement(`table`),t.classList.add(`tableFullWidth`),ee(e,n,r).then(e=>{t.appendChild(e)}),t)};function j(e,t,n){let r=e.createElement(`TR`);r.AJAR_statement=t,r.AJAR_inverse=n,r.setAttribute(`predTR`,`true`);let i=p.outlinePredicateTD(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=j;function M(e,t,n,r){if(s.log.debug(`Property list length = `+t.length),t.length===0)return``;let i,a,o;n?(i=function(e){return e.subject},t=t.sort(s.utils.RDFComparePredicateSubject)):(i=function(e){return e.object},t=t.sort(s.utils.RDFComparePredicateObject));let c=t.length;for(a=0;a<c;a++){let l=t[a];if(r&&!r(l.predicate,n))continue;let u=j(d,l,n);e.appendChild(u);let m=u.firstChild,g=$.defaults[l.predicate.uri],_=0,v=0,y=0;for(o=0;o+a<c&&t[a+o].predicate.sameTerm(l.predicate);o++)o>0&&i(t[a+o]).sameTerm(i(t[a+o-1]))&&_++,i(t[a+o]).lang&&f.labeller.LanguagePreference&&(v+=1,i(t[a+o]).lang.indexOf(f.labeller.LanguagePreference)>=0&&y++);if(y>0&&v===_+1){for(let e=a;e<=a+_;e++)if(f.labeller.LanguagePreference&&i(t[e]).lang.indexOf(f.labeller.LanguagePreference)>=0){u.appendChild(p.outlineObjectTD(i(t[e]),g,void 0,l));break}a+=_;continue}u.appendChild(p.outlineObjectTD(i(l),g,void 0,l)),u.showNobj=function(r){let c=o-_,u=2*r<c?r:c,f=[];if(c!==1){m.setAttribute(`rowspan`,u===c?c:r+1);let _;u<c&&u===1&&m.setAttribute(`rowspan`,2);let v=0;for(_=1;_<o;_++)if(h.canon(i(t[a+_])).sameTerm(h.canon(i(t[a+_-1]))))s.log.info(`there are duplicates here: %s`,t[a+_-1]);else{v++,l=t[a+_],g=$.defaults[l.predicate.uri];let r=d.createElement(`tr`);r.style.colspan=`1`,r.appendChild(p.outlineObjectTD(i(t[a+_]),g,void 0,l)),r.AJAR_statement=l,r.AJAR_inverse=n,e.appendChild(r),v>=u&&(r.style.display=`none`,f.push(r))}u===c&&m.setAttribute(`rowspan`,v+1)}if(u<c){let t=d.createElement(`tr`),n=t.appendChild(d.createElement(`td`));if(n.classList.add(`obj`),n.setAttribute(`notSelectable`,`false`),c>r){let e=d.createElement(`a`);n.appendChild(e);let t=(function(e){return e(m,o,_,r)})(function(t,n,r,i){return function(n){e.innerHTML=``,n===`none`?(e.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-more-trans.png`,`more`,`See all`,d)),e.appendChild(d.createTextNode(c-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(s.utils.AJARImage(s.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,d)),t.setAttribute(`rowspan`,c+1));for(let e=0;e<f.length;e++){let t=f[e];t.style.display=n}}}),i=`none`,a=function(e){return t(i),i=i===`none`?``:`none`,e&&e.stopPropagation(),!1};a(),e.addEventListener(`click`,a,!1)}e.appendChild(t)}},u.showAllobj=function(){u.showNobj(o-_)},u.showNobj(10),a+=o-1}}this.appendPropertyTRs=M;let N={};globalThis.termWidget=N,N.construct=function(e){e||=document;let t=e.createElement(`TD`);return t.setAttribute(`class`,`iconTD`),t.setAttribute(`notSelectable`,`true`),t},N.addIcon=function(e,t,n){let r=e.childNodes[1];if(!r)return;let i=s.utils.AJARImage(t.src,t.alt,t.tooltip,d);r.appendChild(i),n&&i.addEventListener(`click`,n)},N.removeIcon=function(e,t){let n=e.childNodes[1],r;if(n)for(let e=0;e<n.childNodes.length;e++){let i=n.childNodes[e],a=i.src;try{r=d.location.href.split(`?`)[0]}catch{r=``}a===u.uri.join(t.src,r)&&n.removeChild(i)}},N.replaceIcon=function(e,t,n,r){N.removeIcon(e,t),N.addIcon(e,n,r)};function P(e,t){s.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!f.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};g.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),g.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),g.addCallback(`fail`,r(n.outlineIcons.src.icon_failed))}function F(e){let t=e.getAttribute(`class`);return!!(t&&t.indexOf(`selected`)>=0)}function I(e){let t=p.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,L),t.parentNode.parentNode.removeAttribute(`optional`)}function L(e){let t=p.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOff,n.outlineIcons.termWidgets.optOn,I),t.parentNode.parentNode.setAttribute(`optional`,`true`)}function R(e,t){let r=n.outlineIcons.termWidgets.optOn,i=n.outlineIcons.termWidgets.optOff;for(let n=e;n.parentNode;n=n.parentNode)for(;;)if(n.getAttribute(`predTR`)){let e=n.getAttribute(`parentOfSelected`);e=e?parseInt(e):0,e===0&&t>0&&N.addIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i,n.getAttribute(`optional`)?I:L),e+=t,n.setAttribute(`parentOfSelected`,e),e===0&&(n.removeAttribute(`parentOfSelected`),N.removeIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i));break}else if(n.previousSibling&&n.previousSibling.nodeName===`TR`)n=n.previousSibling;else break}this.statusBarClick=function(e){let t=s.utils.getTarget(e);t.label&&(window.content.location=t.label)},this.showURI=function(e){e&&d.getElementById(`UserURI`)&&(d.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)},this.showSource=function(){if(!(typeof sourceWidget>`u`)){for(let e in sourceWidget.sources)sourceWidget.sources[e].setAttribute(`class`,``);for(let e=0;e<m.length;e++){if(!m[e].parentNode)continue;let t=m[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return m};function z(e,t){if(e.nodeName!==`TD`)throw s.log.debug(`down`+e.nodeName),Error(`Expected TD in setSelected: `+e.nodeName+` : `+e.textContent);s.log.debug(`pass`);let r=e.getAttribute(`class`);if(r||=``,t){r+=` selected`,(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&R(e,1),m.push(e);let t=s.utils.getTerm(e);p.showURI(t);let i=e.AJAR_statement;if(i===void 0&&e.parentNode&&(i=e.parentNode.AJAR_statement),i){let t=i.why;c.store.updater.editable(t.uri,h)&&r.indexOf(`pred`)>=0&&N.addIcon(e,n.outlineIcons.termWidgets.addTri)}}else s.log.debug(`cla=$`+r+`$`),r===`selected`&&(r=``),r=r.replace(` selected`,``),(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&R(e,-1),r.indexOf(`pred`)>=0&&N.removeIcon(e,n.outlineIcons.termWidgets.addTri),m=m.filter(function(t){return t===e}),s.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&p.showSource(),e.setAttribute(`class`,r)}function B(){let e=m.length;for(let t=e-1;t>=0;t--)z(m[t],!1);m=[]}this.targetOf=function(e){let t;if(e||=window.event,e.target)t=e.target;else if(e.srcElement)t=e.srcElement;else return s.log.error(`can't get target for event `+e),!1;return t.nodeType===3&&(t=t.parentNode),t},this.walk=function(e,t){let n=t||m[0],r;switch(e){case`down`:try{r=n.parentNode.nextSibling.lastChild}catch{this.walk(`up`);return}B(),z(r,!0);break;case`up`:try{r=n.parentNode.previousSibling.lastChild}catch{return}B(),z(r,!0);break;case`right`:if(B(),n.nextSibling||n.lastChild.tagName===`strong`)z(n.nextSibling,!0);else{let e=d.evaluate(`table/div/tr/td[2]`,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;z(e,!0)}break;case`left`:if(B(),n.previousSibling&&n.previousSibling.className===`undetermined`)return z(n.previousSibling,!0),!0;z(s.utils.ancestor(n.parentNode,`TD`),!0);break;case`moveTo`:B(),z(t,!0)}(e===`down`||e===`up`)&&(r.tabulatorSelect||this.walk(e))},this.OutlinerKeypressPanel=function(e){s.log.info(`Key `+e.keyCode+` pressed`);function t(e){e&&d.getElementById(`UserURI`)&&(d.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]?!0:(o(`right`,a),t(s.utils.getAbout(h,m[0])),!0)}let r,i;if(s.utils.getTarget(e).tagName===`TEXTAREA`||s.utils.getTarget(e).id===`UserURI`||m.length>1)return;if(m.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,p.focusTd),t(s.utils.getAbout(h,m[0])));return}let a=m[0];switch(g.removeCallback(`done`,`setSelectedAfterward`),g.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(s.utils.getTarget(e).tagName===`HTML`){let e=s.utils.getAbout(h,a);r=a.parentNode.AJAR_statement.why,i=c.store.updater.editable(r.uri,h),e?f.GotoSubject(e,!0):i&&p.UserInput.Enter(a)}else this.UserInput.Keypress(e),this.walk(`down`),e.stopPropagation();return;case 38:this.walk(`up`),e.stopPropagation(),e.preventDefault();break;case 40:this.walk(`down`),e.stopPropagation(),e.preventDefault()}if(s.utils.getTarget(e).tagName===`INPUT`)return;let o;switch(e.keyCode){case 46:case 8:r=a.parentNode.AJAR_statement.why,i=c.store.updater.editable(r.uri,h),i&&(e.preventDefault(),this.UserInput.Delete(a));break;case 37:{if(this.walk(`left`))return;let e=s.utils.ancestor(a.parentNode,`TD`);Z(a,s.utils.getAbout(h,e));break}case 39:{let e=s.utils.getAbout(h,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstChild.tagName!==`TABLE`&&(g.addCallback(`done`,n),g.addCallback(`fail`,n),X(a,e,{pane:l.byName(`defaultPane`)})),n()}}break;case 38:case 40:break;default:switch(e.charCode){case 99:if(e.ctrlKey){p.UserInput.copyToClipboard(p.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){p.UserInput.pasteFromClipboard(p.clipboardAddress,a);break}break;default:s.utils.getTarget(e).tagName}}t(s.utils.getAbout(h,m[0]))},this.OutlinerMouseclickPanel=function(e){switch(p.UserInput._tabulatorMode){case 0:J(e);break;case 1:p.UserInput.Click(e)}};function V(e){let t=p.targetOf(e),n=t.parentNode,r=s.utils.getAbout(h,t),i=e.altKey?l.byName(`internal`):void 0;e.shiftKey?Q(n,r,i):e.altKey?X(n,r,{pane:l.byName(`internal`),immediate:!0}):X(n,r)}function H(e){let t=p.targetOf(e),n=s.utils.getAbout(h,t),r=e.altKey?l.byName(`internal`):void 0,i=t.parentNode.parentNode;Z(i,n,r)}function U(e){let t=p.targetOf(e).getAttribute(`uri`);e.altKey?g.fetch(u.uri.docpart(t),{force:!0}):g.refresh(h.sym(u.uri.docpart(t)))}function W(e){let t=p.targetOf(e).getAttribute(`uri`);e.altKey?g.fetch(u.uri.docpart(t),{force:!0}):g.refresh(h.sym(u.uri.docpart(t)))}function G(e){let t=p.targetOf(e).getAttribute(`uri`);g.fetch(u.uri.docpart(t))}function K(e){let t=p.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),k(n)}function q(e){if(p.UserInput._tabulatorMode)return p.UserInput.Click(e);let t=p.targetOf(e),n;for(n=s.utils.ancestor(t,`TD`);n&&n.getAttribute(`notSelectable`)!==`false`;n=s.utils.ancestor(n.parentNode,`TD`));if(!n)return;let r=F(n);if(s.log.debug(`Was node selected before: `+r),e.altKey)z(n,!F(n));else if(e.shiftKey)z(n,!0);else{if(B(),p.UserInput.clearInputAndSave(e),z(n,!0),e.detail===2){e.stopPropagation();return}let t;if(n.parentNode&&(t=n.parentNode.AJAR_statement),!t)return;let i=t.why,a=c.store.updater.editable(i.uri,h);r&&a&&p.UserInput.Click(e,m[0])}s.log.debug(`Was node selected after: `+F(n)+`, count=`+m.length),e.stopPropagation()}function J(e){s.log.info(`@TabulatorMousedown, dom.location is now `+d.location);let t=p.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(p.UserInput.clearMenu(),p.UserInput.lastModified&&p.UserInput.lastModified.parentNode.nextSibling&&p.UserInput.backOut(),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices&&t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_add_triple)&&p.UserInput.clearInputAndSave(e),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices)&&p.UserInput.clearMenu(),e&&e.stopPropagation())}function Y(e){d.title=s.utils.label(e),d.location.href.startsWith(e.site().uri)}function X(e,t,n){n||={};let r=n.pane,i=!!n.already,a=n.immediate;s.log.info(`@outlineExpand, dom is now `+d.location),g.removeCallback(`done`,`expand`),g.removeCallback(`fail`,`expand`);let o=h.canon(t);function c(){if(o=h.canon(o),!e||!e.parentNode||!e.parentNode.parentNode)return!1;let t;if(s.log.info(`@@ REPAINTING `),!i)t=A(o,void 0,r,n);else{for(s.log.info(` ... p is `+e),t=e.firstChild;t.nextSibling&&(s.log.info(` ... checking node `+t),t.nodeName!==`table`);t=t.nextSibling);t=A(o,t,r,n)}i=!0,s.utils.ancestor(e,`TABLE`)&&s.utils.ancestor(e,`TABLE`).style.backgroundColor===`white`?t.style.backgroundColor=`#eee`:t.style.backgroundColor=`white`,s.utils.emptyNode(e).appendChild(t),p.focusTd=e,s.log.debug(`expand: Node for `+o+` expanded`);let a=h.each(o,s.ns.rdfs(`seeAlso`));for(let e=0;e<a.length;e++)e===25&&s.log.warn(`expand: Warning: many (`+a.length+`) seeAlso links for `+o),g.lookUpThing(a[e],o)}function l(e){if(arguments[3])return!0;let t=h.canon(o);s.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=h.sym(u.uri.docpart(e));if(e.indexOf(`#`)>=0)throw Error(`Internal error: hash in `+e);return!function(){if(!t.uri)return!0;let r=h.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=u.uri.docpart(r[t]);n;n=h.HTTPRedirects[n])if(e===n)return!0;return!!h.anyStatementMatching(t,void 0,void 0,n)}()||(s.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),c(),!1)}n.solo&&Y(o),s.log.debug(`outlineExpand: dereferencing `+o);let f=d.createElement(`span`);e.appendChild(f),g.addCallback(`done`,l),g.addCallback(`fail`,l);let m=[];if(o.uri&&o.uri.split(`:`)[0]===`rdf`){c();return}for(let e=0;e<m.length;e++){let t;if(t===m[e](o)){c(),s.log.debug(`outline 1815`),t[1]&&_.removeChild(_.lastChild);return}}if(o.uri&&!a&&!s.widgets.isAudio(o)&&!s.widgets.isVideo(o)){let t=o.doc()&&o.doc().uri?o.doc().uri:``+o.doc(),r=function(e){let t=!!(o&&o.uri&&o.site&&o.site().uri===o.uri);return e===403?t?`This root resource is not accessible with your current permissions. Try logging in with an authorized account or opening a public profile document.`:`This resource is not accessible with your current permissions.`:t?`This root resource is not publicly readable. Try logging in or opening a profile document.`:`This resource is not publicly readable. Try logging in or opening a different public resource.`},i=function(e,t){let n=typeof e==`string`?e:String(e||``),r=t?.status||t?.response?.status;return r===401||r===403?r:n.includes(`status: 403`)||n.includes(`status 403`)?403:n.includes(`status: 401`)||n.includes(`status 401`)?401:null},a=function(n,a){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let o=i(n,a),c=o?r(o):n,l=s.widgets.errorMessageBlock(d,c,`#fee`,a instanceof Error?a:void 0);t&&l.setAttribute(`data-outline-error-for`,t),e.appendChild(l)},l=!1,u=g.nowOrWhenFetched(o.doc(),void 0,function(e,t){e?(g.lookUpThing(o),c(),n.solo&&Y(o)):(l=!0,a(t,void 0))});u&&typeof u.catch==`function`&&u.catch(function(e){l||(l=!0,a(e,e))})}else c()}function Z(e,t){let n=s.utils.ancestor(e,`TR`);n=s.utils.ancestor(n.parentNode,`TR`);let r;n&&(r=n.AJAR_statement);let i;for(i=e.parentNode;i.tagName!==`TD`;i=i.parentNode)if(i===void 0){alert(`Not enclosed in TD!`);return}s.log.debug(`Collapsing subject `+t);let a;r&&(s.log.debug(`looking up pred `+r.predicate.uri+`in defaults`),a=$.defaults[r.predicate.uri]),s.log.debug(`view= `+a);let o;i.parentNode.parentNode.id===`outline`&&(o=i.parentNode),p.replaceTD(p.outlineObjectTD(t,a,o,r),i)}this.replaceTD=function(e,t){let n;F(t)&&(n=!0);for(let e=m.length-1;e>-1;e--)for(let n=m[e];n.parentNode;n=n.parentNode)n===t&&z(m[e],!1);t.parentNode.replaceChild(e,t),n&&z(e,!0)};function Q(e,t){let n=null;for(let t=e.parentNode;t;t=t.parentNode)s.log.debug(`level `+t.tagName),t.tagName===`TD`&&(n=t);s.utils.emptyNode(n).appendChild(A(t)),Y(t),n.setAttribute(`about`,t.toNT())}f.outlineRefocus=Q,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&f.GotoFormURI(e)},this.GotoFormURI=function(e){te(d.getElementById(`UserURI`).value)};function te(e){let t=h.sym(e);this.GotoSubject(t,!0)}this.GotoURIinit=function(e){let t=h.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o=!0){let c=b();o&&(!a||a===c)&&S(),a||=c,r&&(s.utils.emptyNode(a),a.style.width=`100%`);function l(){let t=d.createElement(`tr`);t.classList.add(`outlineRow1`),t.style.verticalAlign=`top`,a.appendChild(t);let n=p.outlineObjectTD(e,void 0,t);return t.appendChild(n),n}let u=l();if(r&&Y(e),t&&X(u,e,{pane:n,solo:r}),r&&d&&d.defaultView&&d.defaultView.history){let t=d.defaultView.history.state||{},r=n?{paneName:n.name}:{};n&&n.subject&&typeof n.subject.uri==`string`&&(r.paneUri=n.subject.uri);let i={...t,...r};try{let n=new URL(document.location.href),r=new URL(e.uri,document.location.href);n.origin===r.origin&&(document.location.href===e.uri?JSON.stringify(t)!==JSON.stringify(i)&&d.defaultView.history.replaceState(i,e.uri,e.uri):d.defaultView.history.pushState(i,e.uri,e.uri))}catch{}}return e};let $=t.propertyViews(d);function ne(t){let r;if(t.termType===`Literal`){if(r=d.createElement(`span`),r.classList.add(`objectValue`,`objectValue--literal`),r.textContent=t.value,t.datatype&&t.datatype.uri){let e=s.ns.xsd(``).uri;t.datatype.uri.slice(0,e.length)===e&&r.classList.add(`objectValue--`+t.datatype.uri.slice(e.length))}}else if(t.termType===`NamedNode`||t.termType===`BlankNode`){if(r=d.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),p.appendAccessIcons(h,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=d.createElement(`a`);r.appendChild(d.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(s.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,d)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(d.createTextNode(s.utils.label(t)));let e=s.widgets.linkIcon(d,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),s.widgets.makeDraggable(r,t)}}else r.appendChild(d.createTextNode(s.utils.label(t)))}else if(t.termType===`Collection`){r=d.createElement(`table`),r.classList.add(`tableFullWidth`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(d.createElement(`tr`)),a=i.appendChild(d.createElement(`td`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(p.outlineObjectTD(n))}}else t.termType===`Graph`?(r=l.byName(`dataContentPane`).statementsAsTables(t.statements,e),r.setAttribute(`class`,`nestedFormula`)):(s.log.error(`Object `+t+` has unknown term type: `+t.termType),r=d.createTextNode(`[unknownTermType:`+t.termType+`]`));return s.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){d.getElementById(`UserURI`).value=d.URL+`?uri=`+d.getElementById(`UserURI`).value},this.UserInput.setSelected=z,this.UserInput.deselectAll=B,this.UserInput.views=$,this.outlineExpand=X,this}exports.default=d;
|
|
2
2
|
//# sourceMappingURL=manager2.cjs.js.map
|