solid-panes 3.5.22-25afa55a → 3.5.23-39e7984e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,7 @@ Currently the panes available include:
33
33
  The solid-app-set panes are built using a set of widgets and utilities in
34
34
  [https://github.com/linkeddata/solid-ui](https://github.com/linkeddata/solid-ui)
35
35
 
36
- To help onboarding, we're using [roles](https://github.com/solid/userguide/#role) to limit the number of panes presented
36
+ To help onboarding, we're using [roles](https://github.com/solidos/userguide/#role) to limit the number of panes presented
37
37
  to new users.
38
38
 
39
39
  ## Goals
@@ -57,7 +57,7 @@ To get started, make sure you have Node.js installed (for instance
57
57
  through https://github.com/nvm-sh/nvm), and:
58
58
  1. run
59
59
  ```sh
60
- git clone https://github.com/solid/solid-panes
60
+ git clone https://github.com/solidos/solid-panes
61
61
  cd solid-panes
62
62
  npm install
63
63
  npm run build-version
package/dev/loader.ts CHANGED
@@ -19,7 +19,7 @@ async function renderPane (uri: string) {
19
19
  store.fetcher.load(doc).then(resolve, reject)
20
20
  })
21
21
  const context = {
22
- // see https://github.com/solid/solid-panes/blob/005f90295d83e499fd626bd84aeb3df10135d5c1/src/index.ts#L30-L34
22
+ // see https://github.com/solidos/solid-panes/blob/005f90295d83e499fd626bd84aeb3df10135d5c1/src/index.ts#L30-L34
23
23
  dom: document,
24
24
  getOutliner,
25
25
  session: {
@@ -115,7 +115,7 @@ function setupUserTypesSection(container, dom) {
115
115
  var description = formContainer.appendChild(dom.createElement('p'));
116
116
  description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.';
117
117
  var userTypesLink = formContainer.appendChild(dom.createElement('a'));
118
- userTypesLink.href = 'https://github.com/solid/userguide/#role';
118
+ userTypesLink.href = 'https://github.com/solidos/userguide/#role';
119
119
  userTypesLink.innerText = 'Read more';
120
120
  var formArea = formContainer.appendChild(dom.createElement('div'));
121
121
  return formArea;
@@ -172,7 +172,7 @@ function generateDeletionLink(_x2, _x3) {
172
172
  *
173
173
  * This function infers the deletion link by assuming the URL structure of Node Solid server.
174
174
  * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:
175
- * https://github.com/solid/data-interoperability-panel/issues/18
175
+ * https://github.com/solidos/data-interoperability-panel/issues/18
176
176
  *
177
177
  * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for
178
178
  * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dashboard/basicPreferences.ts"],"names":["basicPreferencesPane","icon","icons","iconBase","name","label","_subject","render","subject","context","dom","store","session","complainIfBad","ok","mess","container","appendChild","widgets","errorMessageBlock","createElement","formArea","setupUserTypesSection","loadData","doc","turtle","holds","undefined","parse","uri","preferencesForm","sym","preferencesFormText","ontologyExtra","ontologyData","doRender","login","ensureLoadedPreferences","div","renderContext","preferencesFile","console","log","preferencesFileError","appendedForm","appendForm","me","style","borderStyle","trustedApplicationsView","paneRegistry","byName","addDeleteSection","formContainer","createSection","description","innerText","userTypesLink","href","profile","section","podServerNodes","each","ns","space","podServers","map","node","value","list","forEach","server","generateDeletionLink","deletionLink","listItem","podServer","link","textContent","getDeletionUrlForServer","deletionUrl","singleUserUrl","URL","multiUserUrl","pathname","hostnameParts","hostname","split","slice","join","fetch","method","multiUserNssResponse","singleUserNssResponse","title","border","borderRadius","padding","marginTop","titleElement"],"mappings":";;;;;;;AACA;;AACA;;;;;;;;;;;AAIO,IAAMA,oBAAoC,GAAG;AAClDC,EAAAA,IAAI,EAAEC,eAAMC,QAAN,GAAiB,gCAD2B;AAElDC,EAAAA,IAAI,EAAE,kBAF4C;AAGlDC,EAAAA,KAAK,EAAE,eAAAC,QAAQ,EAAI;AACjB,WAAO,IAAP;AACD,GALiD;AAOlD;AACA;AACAC,EAAAA,MAAM,EAAE,gBAACC,OAAD,EAAUC,OAAV,EAAsB;AAC5B,QAAMC,GAAG,GAAGD,OAAO,CAACC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;AAWQC,YAAAA,oBAXR;;AAAA,iBAcMA,oBAAoB,CAAC7E,EAd3B;AAAA;AAAA;AAAA;;AAAA,8CAeWoE,YAAY,CAACxB,IAfxB;;AAAA;AAAA;AAAA,mBAkBsC+B,KAAK,CAACT,aAAa,CAACtB,IAAf,EAAqB;AAC5DgC,cAAAA,MAAM,EAAE;AADoD,aAArB,CAlB3C;;AAAA;AAkBQE,YAAAA,qBAlBR;;AAAA,iBAqBMA,qBAAqB,CAAC9E,EArB5B;AAAA;AAAA;AAAA;;AAAA,8CAsBWkE,aAAa,CAACtB,IAtBzB;;AAAA;AAAA,8CAwBS,IAxBT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AA2BA,SAASJ,aAAT,CACEtC,SADF,EAEEN,GAFF,EAGEmF,KAHF,EAIW;AACT,MAAMjC,OAAO,GAAG5C,SAAS,CAACC,WAAV,CAAsBP,GAAG,CAACU,aAAJ,CAAkB,KAAlB,CAAtB,CAAhB;AACAwC,EAAAA,OAAO,CAACb,KAAR,CAAc+C,MAAd,GAAuB,qBAAvB;AACAlC,EAAAA,OAAO,CAACb,KAAR,CAAcgD,YAAd,GAA6B,OAA7B;AACAnC,EAAAA,OAAO,CAACb,KAAR,CAAciD,OAAd,GAAwB,OAAxB;AACApC,EAAAA,OAAO,CAACb,KAAR,CAAckD,SAAd,GAA0B,OAA1B;AAEA,MAAMC,YAAY,GAAGtC,OAAO,CAAC3C,WAAR,CAAoBP,GAAG,CAACU,aAAJ,CAAkB,IAAlB,CAApB,CAArB;AACA8E,EAAAA,YAAY,CAAC1C,SAAb,GAAyBqC,KAAzB;AAEA,SAAOjC,OAAP;AACD","sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { IndexedFormula, NamedNode, parse, Store } from 'rdflib'\nimport { icons, login, ns, widgets } from 'solid-ui'\nimport ontologyData from './ontologyData.ttl'\nimport preferencesFormText from './preferencesFormText.ttl'\n\nexport const basicPreferencesPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_Sliders_341315_000000.svg',\n name: 'basicPreferences',\n label: _subject => {\n return null\n },\n\n // Render the pane\n // The subject should be the logged in user.\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n const container = dom.createElement('div')\n\n const formArea = setupUserTypesSection(container, dom)\n\n function loadData (doc: NamedNode, turtle: String) {\n doc = doc.doc() // remove # from URI if nec\n if (!store.holds(undefined, undefined, undefined, doc)) {\n // If not loaded already\n ;(parse as any)(turtle, store, doc.uri, 'text/turtle', null) // Load form directly\n }\n }\n\n const preferencesForm = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'\n )\n loadData(preferencesForm, preferencesFormText)\n\n const ontologyExtra = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'\n )\n loadData(ontologyExtra, ontologyData)\n\n async function doRender () {\n const renderContext = await login.ensureLoadedPreferences({\n dom,\n div: container\n })\n if (!renderContext.preferencesFile) {\n // Could be CORS\n console.log(\n 'Not doing private class preferences as no access to preferences file. ' +\n renderContext.preferencesFileError\n )\n return\n }\n const appendedForm = widgets.appendForm(\n dom,\n formArea,\n {},\n renderContext.me,\n preferencesForm,\n renderContext.preferencesFile,\n complainIfBad\n )\n appendedForm.style.borderStyle = 'none'\n\n const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications')\n if (trustedApplicationsView) {\n container.appendChild(trustedApplicationsView.render(null, context))\n }\n\n // @@ TODO Remove need for casting as any and bang (!) syntax\n addDeleteSection(container, store, renderContext.me!, dom)\n }\n\n doRender()\n\n return container\n }\n}\n\nfunction setupUserTypesSection (\n container: Element,\n dom: HTMLDocument\n): Element {\n const formContainer = createSection(container, dom, 'User types')\n\n const description = formContainer.appendChild(dom.createElement('p'))\n description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'\n\n const userTypesLink = formContainer.appendChild(dom.createElement('a'))\n userTypesLink.href = 'https://github.com/solid/userguide/#role'\n userTypesLink.innerText = 'Read more'\n\n const formArea = formContainer.appendChild(dom.createElement('div'))\n\n return formArea\n}\n\nexport default basicPreferencesPane\n\n// ends\n\nfunction addDeleteSection (\n container: HTMLElement,\n store: IndexedFormula,\n profile: NamedNode,\n dom: HTMLDocument\n): void {\n const section = createSection(container, dom, 'Delete account')\n\n const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc())\n const podServers = podServerNodes.map(node => node.value)\n\n const list = section.appendChild(dom.createElement('ul'))\n\n podServers.forEach(async server => {\n const deletionLink = await generateDeletionLink(server, dom)\n if (deletionLink) {\n const listItem = list.appendChild(dom.createElement('li'))\n listItem.appendChild(deletionLink)\n }\n })\n}\n\nasync function generateDeletionLink (\n podServer: string,\n dom: HTMLDocument\n): Promise<HTMLElement | null> {\n const link = dom.createElement('a')\n link.textContent = `Delete your account at ${podServer}`\n const deletionUrl = await getDeletionUrlForServer(podServer)\n if (typeof deletionUrl !== 'string') {\n return null\n }\n link.href = deletionUrl\n return link\n}\n\n/**\n * Hacky way to get the deletion link to a Pod\n *\n * This function infers the deletion link by assuming the URL structure of Node Solid server.\n * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:\n * https://github.com/solid/data-interoperability-panel/issues/18\n *\n * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for\n * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the\n * deletion URL would be at vincent.dev.inrupt.net/account/delete.\n *\n * @param server Pod server containing the user's account.\n * @returns URL of the page that Node Solid Server would offer to delete the account, or null if\n * the URLs we tried give invalid responses.\n */\nasync function getDeletionUrlForServer (\n server: string\n): Promise<string | null> {\n const singleUserUrl = new URL(server)\n const multiUserUrl = new URL(server)\n multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'\n\n const hostnameParts = multiUserUrl.hostname.split('.')\n // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:\n multiUserUrl.hostname = hostnameParts.slice(1).join('.')\n\n const multiUserNssResponse = await fetch(multiUserUrl.href, {\n method: 'HEAD'\n })\n if (multiUserNssResponse.ok) {\n return multiUserUrl.href\n }\n\n const singleUserNssResponse = await fetch(singleUserUrl.href, {\n method: 'HEAD'\n })\n if (singleUserNssResponse.ok) {\n return singleUserUrl.href\n }\n return null\n}\n\nfunction createSection (\n container: Element,\n dom: HTMLDocument,\n title: string\n): Element {\n const section = container.appendChild(dom.createElement('div'))\n section.style.border = '0.3em solid #418d99'\n section.style.borderRadius = '0.5em'\n section.style.padding = '0.7em'\n section.style.marginTop = '0.7em'\n\n const titleElement = section.appendChild(dom.createElement('h3'))\n titleElement.innerText = title\n\n return section\n}\n"],"file":"basicPreferences.js"}
1
+ {"version":3,"sources":["../../src/dashboard/basicPreferences.ts"],"names":["basicPreferencesPane","icon","icons","iconBase","name","label","_subject","render","subject","context","dom","store","session","complainIfBad","ok","mess","container","appendChild","widgets","errorMessageBlock","createElement","formArea","setupUserTypesSection","loadData","doc","turtle","holds","undefined","parse","uri","preferencesForm","sym","preferencesFormText","ontologyExtra","ontologyData","doRender","login","ensureLoadedPreferences","div","renderContext","preferencesFile","console","log","preferencesFileError","appendedForm","appendForm","me","style","borderStyle","trustedApplicationsView","paneRegistry","byName","addDeleteSection","formContainer","createSection","description","innerText","userTypesLink","href","profile","section","podServerNodes","each","ns","space","podServers","map","node","value","list","forEach","server","generateDeletionLink","deletionLink","listItem","podServer","link","textContent","getDeletionUrlForServer","deletionUrl","singleUserUrl","URL","multiUserUrl","pathname","hostnameParts","hostname","split","slice","join","fetch","method","multiUserNssResponse","singleUserNssResponse","title","border","borderRadius","padding","marginTop","titleElement"],"mappings":";;;;;;;AACA;;AACA;;;;;;;;;;;AAIO,IAAMA,oBAAoC,GAAG;AAClDC,EAAAA,IAAI,EAAEC,eAAMC,QAAN,GAAiB,gCAD2B;AAElDC,EAAAA,IAAI,EAAE,kBAF4C;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import { PaneDefinition } from 'pane-registry'\nimport { IndexedFormula, NamedNode, parse, Store } from 'rdflib'\nimport { icons, login, ns, widgets } from 'solid-ui'\nimport ontologyData from './ontologyData.ttl'\nimport preferencesFormText from './preferencesFormText.ttl'\n\nexport const basicPreferencesPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_Sliders_341315_000000.svg',\n name: 'basicPreferences',\n label: _subject => {\n return null\n },\n\n // Render the pane\n // The subject should be the logged in user.\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n const container = dom.createElement('div')\n\n const formArea = setupUserTypesSection(container, dom)\n\n function loadData (doc: NamedNode, turtle: String) {\n doc = doc.doc() // remove # from URI if nec\n if (!store.holds(undefined, undefined, undefined, doc)) {\n // If not loaded already\n ;(parse as any)(turtle, store, doc.uri, 'text/turtle', null) // Load form directly\n }\n }\n\n const preferencesForm = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'\n )\n loadData(preferencesForm, preferencesFormText)\n\n const ontologyExtra = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'\n )\n loadData(ontologyExtra, ontologyData)\n\n async function doRender () {\n const renderContext = await login.ensureLoadedPreferences({\n dom,\n div: container\n })\n if (!renderContext.preferencesFile) {\n // Could be CORS\n console.log(\n 'Not doing private class preferences as no access to preferences file. ' +\n renderContext.preferencesFileError\n )\n return\n }\n const appendedForm = widgets.appendForm(\n dom,\n formArea,\n {},\n renderContext.me,\n preferencesForm,\n renderContext.preferencesFile,\n complainIfBad\n )\n appendedForm.style.borderStyle = 'none'\n\n const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications')\n if (trustedApplicationsView) {\n container.appendChild(trustedApplicationsView.render(null, context))\n }\n\n // @@ TODO Remove need for casting as any and bang (!) syntax\n addDeleteSection(container, store, renderContext.me!, dom)\n }\n\n doRender()\n\n return container\n }\n}\n\nfunction setupUserTypesSection (\n container: Element,\n dom: HTMLDocument\n): Element {\n const formContainer = createSection(container, dom, 'User types')\n\n const description = formContainer.appendChild(dom.createElement('p'))\n description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'\n\n const userTypesLink = formContainer.appendChild(dom.createElement('a'))\n userTypesLink.href = 'https://github.com/solidos/userguide/#role'\n userTypesLink.innerText = 'Read more'\n\n const formArea = formContainer.appendChild(dom.createElement('div'))\n\n return formArea\n}\n\nexport default basicPreferencesPane\n\n// ends\n\nfunction addDeleteSection (\n container: HTMLElement,\n store: IndexedFormula,\n profile: NamedNode,\n dom: HTMLDocument\n): void {\n const section = createSection(container, dom, 'Delete account')\n\n const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc())\n const podServers = podServerNodes.map(node => node.value)\n\n const list = section.appendChild(dom.createElement('ul'))\n\n podServers.forEach(async server => {\n const deletionLink = await generateDeletionLink(server, dom)\n if (deletionLink) {\n const listItem = list.appendChild(dom.createElement('li'))\n listItem.appendChild(deletionLink)\n }\n })\n}\n\nasync function generateDeletionLink (\n podServer: string,\n dom: HTMLDocument\n): Promise<HTMLElement | null> {\n const link = dom.createElement('a')\n link.textContent = `Delete your account at ${podServer}`\n const deletionUrl = await getDeletionUrlForServer(podServer)\n if (typeof deletionUrl !== 'string') {\n return null\n }\n link.href = deletionUrl\n return link\n}\n\n/**\n * Hacky way to get the deletion link to a Pod\n *\n * This function infers the deletion link by assuming the URL structure of Node Solid server.\n * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:\n * https://github.com/solidos/data-interoperability-panel/issues/18\n *\n * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for\n * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the\n * deletion URL would be at vincent.dev.inrupt.net/account/delete.\n *\n * @param server Pod server containing the user's account.\n * @returns URL of the page that Node Solid Server would offer to delete the account, or null if\n * the URLs we tried give invalid responses.\n */\nasync function getDeletionUrlForServer (\n server: string\n): Promise<string | null> {\n const singleUserUrl = new URL(server)\n const multiUserUrl = new URL(server)\n multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'\n\n const hostnameParts = multiUserUrl.hostname.split('.')\n // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:\n multiUserUrl.hostname = hostnameParts.slice(1).join('.')\n\n const multiUserNssResponse = await fetch(multiUserUrl.href, {\n method: 'HEAD'\n })\n if (multiUserNssResponse.ok) {\n return multiUserUrl.href\n }\n\n const singleUserNssResponse = await fetch(singleUserUrl.href, {\n method: 'HEAD'\n })\n if (singleUserNssResponse.ok) {\n return singleUserUrl.href\n }\n return null\n}\n\nfunction createSection (\n container: Element,\n dom: HTMLDocument,\n title: string\n): Element {\n const section = container.appendChild(dom.createElement('div'))\n section.style.border = '0.3em solid #418d99'\n section.style.borderRadius = '0.5em'\n section.style.padding = '0.7em'\n section.style.marginTop = '0.7em'\n\n const titleElement = section.appendChild(dom.createElement('h3'))\n titleElement.innerText = title\n\n return section\n}\n"],"file":"basicPreferences.js"}
package/lib/imagePane.js CHANGED
@@ -10,16 +10,16 @@ module.exports = {
10
10
  icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png',
11
11
  name: 'image',
12
12
  label: function label(subject, context) {
13
- var kb = context.session.store;
13
+ var store = context.session.store;
14
14
 
15
- if (!kb.anyStatementMatching(subject, UI.ns.rdf('type'), kb.sym('http://purl.org/dc/terms/Image'))) {
15
+ if (!store.anyStatementMatching(subject, UI.ns.rdf('type'), store.sym('http://purl.org/dc/terms/Image'))) {
16
16
  // NB: Not dc: namespace!
17
17
  return null;
18
18
  } // See also the source pane, which has lower precedence.
19
19
 
20
20
 
21
- var contentTypeMatch = function contentTypeMatch(kb, x, contentTypes) {
22
- var cts = kb.fetcher.getHeader(x, 'content-type');
21
+ var contentTypeMatch = function contentTypeMatch(store, x, contentTypes) {
22
+ var cts = store.fetcher.getHeader(x, 'content-type');
23
23
 
24
24
  if (cts) {
25
25
  for (var j = 0; j < cts.length; j++) {
@@ -36,7 +36,7 @@ module.exports = {
36
36
 
37
37
  var suppressed = ['application/pdf'];
38
38
 
39
- if (contentTypeMatch(kb, subject, suppressed)) {
39
+ if (contentTypeMatch(store, subject, suppressed)) {
40
40
  return null;
41
41
  }
42
42
 
@@ -44,10 +44,17 @@ module.exports = {
44
44
  },
45
45
  render: function render(subject, context) {
46
46
  var myDocument = context.dom;
47
+ var store = context.session.store;
47
48
  var div = myDocument.createElement('div');
48
49
  div.setAttribute('class', 'imageView');
49
- var img = myDocument.createElement('IMG');
50
- img.setAttribute('src', subject.uri); // w640 h480
50
+ var img = myDocument.createElement('IMG'); // get image with authenticated fetch
51
+
52
+ store.fetcher._fetch(subject.uri).then(function (response) {
53
+ return response.blob();
54
+ }).then(function (myBlob) {
55
+ var objectURL = URL.createObjectURL(myBlob);
56
+ img.setAttribute('src', objectURL); // w640 h480 //
57
+ });
51
58
 
52
59
  img.setAttribute('style', 'max-width: 100%; max-height: 100%;'); // div.style['max-width'] = '640'
53
60
  // div.style['max-height'] = '480'
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/imagePane.js"],"names":["UI","require","module","exports","icon","icons","originalIconBase","name","label","subject","context","kb","session","store","anyStatementMatching","ns","rdf","sym","contentTypeMatch","x","contentTypes","cts","fetcher","getHeader","j","length","k","indexOf","suppressed","render","myDocument","dom","div","createElement","setAttribute","img","uri","tr","appendChild"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,IAAMA,EAAE,GAAGC,OAAO,CAAC,UAAD,CAAlB;;AAEAC,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,IAAI,EAAEJ,EAAE,CAACK,KAAH,CAASC,gBAAT,GAA4B,8BADnB;AAGfC,EAAAA,IAAI,EAAE,OAHS;AAKfC,EAAAA,KAAK,EAAE,eAAUC,OAAV,EAAmBC,OAAnB,EAA4B;AACjC,QAAMC,EAAE,GAAGD,OAAO,CAACE,OAAR,C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;AACA,QAAMC,GAAG,GAAGL,UAAU,CAACG,aAAX,CAAyB,KAAzB,CAAZ;AACAE,IAAAA,GAAG,CAACD,YAAJ,CAAiB,KAAjB,EAAwBzB,OAAO,CAAC2B,GAAhC,EALkC,CAKG;;AACrCD,IAAAA,GAAG,CAACD,YAAJ,CAAiB,OAAjB,EAA0B,oCAA1B,EANkC,CAOlC;AACA;;AACA,QAAMG,EAAE,GAAGP,UAAU,CAACG,aAAX,CAAyB,IAAzB,CAAX,CATkC,CASQ;;AAC1CI,IAAAA,EAAE,CAACC,WAAH,CAAeH,GAAf;AACAH,IAAAA,GAAG,CAACM,WAAJ,CAAgBD,EAAhB;AACA,WAAOL,GAAP;AACD;AAtDc,CAAjB,C,CAyDA","sourcesContent":["/* Image Pane\n **\n ** This outline pane contains the document contents for an Image document\n */\nconst UI = require('solid-ui')\n\nmodule.exports = {\n icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png',\n\n name: 'image',\n\n label: function (subject, context) {\n const kb = context.session.store\n if (\n !kb.anyStatementMatching(\n subject,\n UI.ns.rdf('type'),\n kb.sym('http://purl.org/dc/terms/Image')\n )\n ) {\n // NB: Not dc: namespace!\n return null\n }\n\n // See also the source pane, which has lower precedence.\n\n const contentTypeMatch = function (kb, x, contentTypes) {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < contentTypes.length; k++) {\n if (cts[j].indexOf(contentTypes[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n const suppressed = ['application/pdf']\n if (contentTypeMatch(kb, subject, suppressed)) {\n return null\n }\n return 'view'\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'imageView')\n const img = myDocument.createElement('IMG')\n img.setAttribute('src', subject.uri) // w640 h480\n img.setAttribute('style', 'max-width: 100%; max-height: 100%;')\n // div.style['max-width'] = '640'\n // div.style['max-height'] = '480'\n const tr = myDocument.createElement('TR') // why need tr?\n tr.appendChild(img)\n div.appendChild(tr)\n return div\n }\n}\n\n// ends\n"],"file":"imagePane.js"}
1
+ {"version":3,"sources":["../src/imagePane.js"],"names":["UI","require","module","exports","icon","icons","originalIconBase","name","label","subject","context","store","session","anyStatementMatching","ns","rdf","sym","contentTypeMatch","x","contentTypes","cts","fetcher","getHeader","j","length","k","indexOf","suppressed","render","myDocument","dom","div","createElement","setAttribute","img","_fetch","uri","then","response","blob","myBlob","objectURL","URL","createObjectURL","tr","appendChild"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,IAAMA,EAAE,GAAGC,OAAO,CAAC,UAAD,CAAlB;;AAEAC,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,IAAI,EAAEJ,EAAE,CAACK,KAAH,CAASC,gBAAT,GAA4B,8BADnB;AAGfC,EAAAA,IAAI,EAAE,OAHS;AAKfC,EAAAA,KAAK,EAAE,eAAUC,OAAV,EAAmBC,OAAnB,EAA4B;AACjC,QAAMC,KAAK,GAAGD,OAAO,CAACE,OAAR,CAAgBD,KAA9B;;AACA,QACE,CAACA,KAAK,CAACE,oBAAN,CACCJ,OADD,EAECT,EAAE,CAACc,EAAH,CAAMC,GAAN,CAAU,MAAV,CAFD,EAGCJ,KAAK,CAACK,GAAN,CAAU,gCAAV,CAHD,CADH,EAME;AACA;AACA,aAAO,IAAP;AACD,KAXgC,CAajC;;;AAEA,QAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAAUN,KAAV,EAAiBO,CAAjB,EAAoBC,YAApB,EAAkC;AACzD,UAAMC,GAAG,GAAGT,KAAK,CAACU,OAAN,CAAcC,SAAd,CAAwBJ,CAAxB,EAA2B,cAA3B,CAAZ;;AACA,UAAIE,GAAJ,EAAS;AACP,aAAK,IAAIG,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGH,GAAG,CAACI,MAAxB,EAAgCD,CAAC,EAAjC,EAAqC;AACnC,eAAK,IAAIE,CAAC,GAAG,CAA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C,CAkBlC;AACA;;AACA,QAAMW,EAAE,GAAGf,UAAU,CAACG,aAAX,CAAyB,IAAzB,CAAX,CApBkC,CAoBQ;;AAC1CY,IAAAA,EAAE,CAACC,WAAH,CAAeX,GAAf;AACAH,IAAAA,GAAG,CAACc,WAAJ,CAAgBD,EAAhB;AACA,WAAOb,GAAP;AACD;AAjEc,CAAjB,C,CAoEA","sourcesContent":["/* Image Pane\n **\n ** This outline pane contains the document contents for an Image document\n */\nconst UI = require('solid-ui')\n\nmodule.exports = {\n icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png',\n\n name: 'image',\n\n label: function (subject, context) {\n const store = context.session.store\n if (\n !store.anyStatementMatching(\n subject,\n UI.ns.rdf('type'),\n store.sym('http://purl.org/dc/terms/Image')\n )\n ) {\n // NB: Not dc: namespace!\n return null\n }\n\n // See also the source pane, which has lower precedence.\n\n const contentTypeMatch = function (store, x, contentTypes) {\n const cts = store.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < contentTypes.length; k++) {\n if (cts[j].indexOf(contentTypes[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n const suppressed = ['application/pdf']\n if (contentTypeMatch(store, subject, suppressed)) {\n return null\n }\n return 'view'\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const store = context.session.store\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'imageView')\n const img = myDocument.createElement('IMG')\n\n // get image with authenticated fetch\n store.fetcher._fetch(subject.uri)\n .then(function(response) {\n return response.blob()\n })\n .then(function(myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n img.setAttribute('src', objectURL) // w640 h480 //\n })\n\n img.setAttribute('style', 'max-width: 100%; max-height: 100%;')\n // div.style['max-width'] = '640'\n // div.style['max-height'] = '480'\n const tr = myDocument.createElement('TR') // why need tr?\n tr.appendChild(img)\n div.appendChild(tr)\n return div\n }\n}\n\n// ends\n"],"file":"imagePane.js"}
@@ -31,7 +31,7 @@ var LOG_OUT_MENU_ITEM = 'Log out';
31
31
  */
32
32
 
33
33
  var USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/';
34
- var REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues';
34
+ var REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues';
35
35
 
36
36
  function createHeader(_x, _x2) {
37
37
  return _createHeader.apply(this, arguments);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mainPage/header.ts"],"names":["HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authSession","logout","userMenuList","getMenuItems","concat","push","GotoSubject","authn","currentUser","undefined","location","reload","getDashboardItems","items","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAGC,eAAMC,QAAN,GAAiB,eAAxC;AACA,IAAMC,cAAc,GAAG,sDAAvB;AAEA;AACA;AACA;;AACA,IAAMC,oBAAoB,GAAG,YAA7B;AACA,IAAMC,0BAA0B,GAAG,kBAAnC;AACA,IAAMC,2BAA2B,GAAG,mBAApC;AACA,IAAMC,iBAAiB,GAAG,SAA1B;AACA;AACA;AACA;;AACA,IAAMC,mBAAmB,GAAG,oCAA5B;AACA,IAAMC,yBAAyB,GAAG,yCAAlC;;SAEsBC,Y;;;;;0EAAf,iBAA6BC,KAA7B,EAAoCC,QAApC;AAAA;AAAA;AAAA;AAAA;AAAA,0BACLC,mBADK;AAAA,0BACMF,KADN;AAAA;AAAA,mBACmBG,WAAW,CAACF,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ASJ,eAAT,CAA0Bb,QAA1B,EAAyC;AACvCA,EAAAA,QAAQ,CAACqB,WAAT,CAAqBC,kBAAMC,WAAN,EAArB,EAA0C,IAA1C,EAAgDC,SAAhD,EAA2D,IAA3D,EAAiEA,SAAjE;AACAC,EAAAA,QAAQ,CAACC,MAAT;AACD;;SAEcR,Y;;;;;0EAAf,kBAA6BlB,QAA7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBACsBA,QAAQ,CAAC2B,iBAAT,EADtB;;AAAA;AACQC,YAAAA,KADR;AAAA,8CAESA,KAAK,CAACC,GAAN,CAAU,UAACC,OAAD,EAAa;AAC5B,qBAAO;AACLzB,gBAAAA,KAAK,EAAEyB,OAAO,CAACzB,KADV;AAELO,gBAAAA,OAAO,EAAE;AAAA,yBAAMmB,iBAAiB,CAAC/B,QAAD,EAAW8B,OAAO,CAACE,OAAR,IAAmBF,OAAO,CAACG,QAAtC,CAAvB;AAAA;AAFJ,eAAP;AAID,aALM,CAFT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;SAUeF,iB;;;;;+EAAf,kBAAkC/B,QAAlC,EAAiDkC,IAAjD;AAAA;AAAA;AAAA;AAAA;AACElC,YAAAA,QAAQ,CAACmC,aAAT,CAAuB;AACrBD,cAAAA,IAAI,EAAJA;AADqB,aAAvB;;AADF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["import { authSession, authn } from 'solid-logic'\nimport { icons, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList = [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"file":"header.js"}
1
+ {"version":3,"sources":["../../src/mainPage/header.ts"],"names":["HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authSession","logout","userMenuList","getMenuItems","concat","push","GotoSubject","authn","currentUser","undefined","location","reload","getDashboardItems","items","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAGC,eAAMC,QAAN,GAAiB,eAAxC;AACA,IAAMC,cAAc,GAAG,sDAAvB;AAEA;AACA;AACA;;AACA,IAAMC,oBAAoB,GAAG,YAA7B;AACA,IAAMC,0BAA0B,GAAG,kBAAnC;AACA,IAAMC,2BAA2B,GAAG,mBAApC;AACA,IAAMC,iBAAiB,GAAG,SAA1B;AACA;AACA;AACA;;AACA,IAAMC,mBAAmB,GAAG,oCAA5B;AACA,IAAMC,yBAAyB,GAAG,2CAAlC;;SAEsBC,Y;;;;;0EAAf,iBAA6BC,KAA7B,EAAoCC,QAApC;AAAA;AAAA;AAAA;AAAA;AAAA,0BACLC,mBADK;AAAA,0BACMF,KADN;AAAA;AAAA,mBACmBG,WAAW,CAACF,QAAD,CAD9B;;AAAA;AAAA;AAAA,0BAC0CG,gBAAgB,EAD1D;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAIP,SAASA,gBAAT,GAA6B;AAC3B,MAAMC,YAAY,GAAG,CACnB;AAAEC,IAAAA,KAAK,EAAEb,oBAAT;AAA+Bc,IAAAA,GAAG,EAAEV,mBAApC;AAAyDW,IAAAA,MAAM,EAAE;AAAjE,GADmB,EAEnB;AAAEF,IAAAA,KAAK,EAAEZ,0BAAT;AAAqCa,IAAAA,GAAG,EAAET,yBAA1C;AAAqEU,IAAAA,MAAM,EAAE;AAA7E,GAFmB,CAArB;AAIA,MAAMC,aAAa,GAAG;AAAEC,IAAAA,IAAI,EAAElB,cAAR;AAAwBmB,IAAAA,QAAQ,EAAEtB,cAAlC;AAAkDgB,IAAAA,YAAY,EAAE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,CAACE,OAAR,IAAmBF,OAAO,CAACG,QAAtC,CAAvB;AAAA;AAFJ,eAAP;AAID,aALM,CAFT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;SAUeF,iB;;;;;+EAAf,kBAAkC/B,QAAlC,EAAiDkC,IAAjD;AAAA;AAAA;AAAA;AAAA;AACElC,YAAAA,QAAQ,CAACmC,aAAT,CAAuB;AACrBD,cAAAA,IAAI,EAAJA;AADqB,aAAvB;;AADF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["import { authSession, authn } from 'solid-logic'\nimport { icons, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList = [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"file":"header.js"}
@@ -22,7 +22,7 @@ module.exports = function registerPanes(register) {
22
22
  register(require('./transaction/pane.js'));
23
23
  register(require('./transaction/period.js'));
24
24
 
25
- var chatPanes = require('chat-pane'); // FIXME: https://github.com/solid/chat-pane/issues/40
25
+ var chatPanes = require('chat-pane'); // FIXME: https://github.com/solidos/chat-pane/issues/40
26
26
 
27
27
 
28
28
  if (chatPanes.longChatPane) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/registerPanes.js"],"names":["module","exports","registerPanes","register","require","chatPanes","longChatPane","shortChatPane"],"mappings":";;AAAAA,MAAM,CAACC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,QAAxB,EAAkC;AACjD;AACF;AACA;AACE;AAEAA,EAAAA,QAAQ,CAACC,OAAO,CAAC,cAAD,CAAR,CAAR,CANiD,CAMf;;AAElCD,EAAAA,QAAQ,CAACC,OAAO,CAAC,4BAAD,CAAR,CAAR,CARiD,CAQD;;AAChDD,EAAAA,QAAQ,CAACC,OAAO,CAAC,gDAAD,CAAR,CAAR,CATiD,CASmB;;AACpED,EAAAA,QAAQ,CAACC,OAAO,CAAC,2BAAD,CAAR,CAAR;AACAD,EAAAA,QAAQ,CAACC,OAAO,CAAC,8BAAD,CAAR,CAAR,CAXiD,CAWC;;AAClDD,EAAAA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,QAAQ,CAACC,OAAO,CAAC,iBAAD,CAAR,CAAR,CAlGiD,CAoGjD;AACD,CArGD","sourcesContent":["module.exports = function registerPanes (register) {\n /* Note that the earliest panes have priority. So the most specific ones are first.\n **\n */\n // Developer designed:\n\n register(require('profile-pane')) // View someone's public profile - dominates all other panes.\n\n register(require('./profile/editProfile.view')) // Edit my profile. App. 201900802\n register(require('./trustedApplications/trustedApplications.view')) // must be registered before basicPreferences\n register(require('./dashboard/dashboardPane'))\n register(require('./dashboard/basicPreferences')) // 20190702\n register(require('issue-pane'))\n register(require('contacts-pane'))\n register(require('activitystreams-pane'))\n\n register(require('./pad/padPane'))\n // register(require('./argument/argumentPane.js')) // A position in an argument tree\n\n register(require('./transaction/pane.js'))\n register(require('./transaction/period.js'))\n\n const chatPanes = require('chat-pane')\n // FIXME: https://github.com/solid/chat-pane/issues/40\n if (chatPanes.longChatPane) {\n register(chatPanes.longChatPane) // Long pane must have prio in case short pane tries to do a long pane\n register(chatPanes.shortChatPane) // was './chat/chatPane.js'\n } else {\n register(chatPanes)\n }\n // register(require('./publication/publicationPane.js'))\n register(require('meeting-pane'))\n register(require('./tabbed/tabbedPane'))\n register(require('./schedule/schedulePane.js'))\n\n register(require('./trip/tripPane.js'))\n // register(require('./airPane.js'))\n\n // Content views\n\n register(require('./imagePane.js')) // Basic image view\n register(require('./playlist/playlistPane.js')) // Basic playlist view\n\n register(require('./video/videoPane.js')) // Video clip player\n register(require('./audio/audioPane.js')) // Audio clip player\n\n register(require('./dokieli/dokieliPane.js')) // Should be above dataContentPane\n register(require('folder-pane')) // Should be above dataContentPane\n register(require('./classInstancePane.js')) // Should be above dataContentPane\n // register(require('./dynamic/dynamicPanes.js')) // warp etc warp broken 2017/8\n register(require('./slideshow/slideshowPane.js'))\n\n register(require('./socialPane.js'))\n\n register(require('./humanReadablePane.js')) // A web page as a web page -- how to escape to tabr?\n // register(require('markdown-pane').Pane) // replaced by markdown in humanReadablePane\n\n register(require('./dataContentPane.js')) // Preferred for a data file\n register(require('source-pane')) // edit source\n register(require('./n3Pane.js'))\n register(require('./RDFXMLPane.js'))\n\n // User configured - data driven\n register(require('./form/pane.js'))\n\n // Generic:\n\n register(require('./tableViewPane.js'))\n\n // Fallback totally generic:\n register(require('./defaultPane.js'))\n\n register(require('./ui/pane.js'))\n\n // register(require(\"categoryPane.js\")) // Not useful enough\n // register(require(\"pubsPane.js\")) // not finished\n\n // @@ jambo commented these things out to pare things down temporarily.\n // Note must use // not /* to comment out to make sure expander sees it\n // register(require(\"lawPane.js\"))\n\n // register(require('./microblogPane/microblogPane.js'))\n\n // register(require(\"./social/pane.js\")) // competitor to other social\n // register(require(\"./airPane.js\"))\n // register(require(\"./lawPane.js\"))\n // register(require(\"pushbackPane.js\"))\n // register(require(\"CVPane.js\"))\n // register(require(\"photoPane.js\"))\n // register(require(\"tagPane.js\"))\n // register(require(\"photoImportPane.js\"))\n\n // The sharing pane is fairly generic and administrative 201\n register(require('./sharing/sharingPane'))\n\n // The internals pane is always (almost?) the last as it is the least user-friendly\n register(require('./internal/internalPane'))\n\n register(require('./home/homePane'))\n\n // ENDS\n}\n"],"file":"registerPanes.js"}
1
+ {"version":3,"sources":["../src/registerPanes.js"],"names":["module","exports","registerPanes","register","require","chatPanes","longChatPane","shortChatPane"],"mappings":";;AAAAA,MAAM,CAACC,OAAP,GAAiB,SAASC,aAAT,CAAwBC,QAAxB,EAAkC;AACjD;AACF;AACA;AACE;AAEAA,EAAAA,QAAQ,CAACC,OAAO,CAAC,cAAD,CAAR,CAAR,CANiD,CAMf;;AAElCD,EAAAA,QAAQ,CAACC,OAAO,CAAC,4BAAD,CAAR,CAAR,CARiD,CAQD;;AAChDD,EAAAA,QAAQ,CAACC,OAAO,CAAC,gDAAD,CAAR,CAAR,CATiD,CASmB;;AACpED,EAAAA,QAAQ,CAACC,OAAO,CAAC,2BAAD,CAAR,CAAR;AACAD,EAAAA,QAAQ,CAACC,OAAO,CAAC,8BAAD,CAAR,CAAR,CAXiD,CAW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AR;AAEAD,EAAAA,QAAQ,CAACC,OAAO,CAAC,iBAAD,CAAR,CAAR,CAlGiD,CAoGjD;AACD,CArGD","sourcesContent":["module.exports = function registerPanes (register) {\n /* Note that the earliest panes have priority. So the most specific ones are first.\n **\n */\n // Developer designed:\n\n register(require('profile-pane')) // View someone's public profile - dominates all other panes.\n\n register(require('./profile/editProfile.view')) // Edit my profile. App. 201900802\n register(require('./trustedApplications/trustedApplications.view')) // must be registered before basicPreferences\n register(require('./dashboard/dashboardPane'))\n register(require('./dashboard/basicPreferences')) // 20190702\n register(require('issue-pane'))\n register(require('contacts-pane'))\n register(require('activitystreams-pane'))\n\n register(require('./pad/padPane'))\n // register(require('./argument/argumentPane.js')) // A position in an argument tree\n\n register(require('./transaction/pane.js'))\n register(require('./transaction/period.js'))\n\n const chatPanes = require('chat-pane')\n // FIXME: https://github.com/solidos/chat-pane/issues/40\n if (chatPanes.longChatPane) {\n register(chatPanes.longChatPane) // Long pane must have prio in case short pane tries to do a long pane\n register(chatPanes.shortChatPane) // was './chat/chatPane.js'\n } else {\n register(chatPanes)\n }\n // register(require('./publication/publicationPane.js'))\n register(require('meeting-pane'))\n register(require('./tabbed/tabbedPane'))\n register(require('./schedule/schedulePane.js'))\n\n register(require('./trip/tripPane.js'))\n // register(require('./airPane.js'))\n\n // Content views\n\n register(require('./imagePane.js')) // Basic image view\n register(require('./playlist/playlistPane.js')) // Basic playlist view\n\n register(require('./video/videoPane.js')) // Video clip player\n register(require('./audio/audioPane.js')) // Audio clip player\n\n register(require('./dokieli/dokieliPane.js')) // Should be above dataContentPane\n register(require('folder-pane')) // Should be above dataContentPane\n register(require('./classInstancePane.js')) // Should be above dataContentPane\n // register(require('./dynamic/dynamicPanes.js')) // warp etc warp broken 2017/8\n register(require('./slideshow/slideshowPane.js'))\n\n register(require('./socialPane.js'))\n\n register(require('./humanReadablePane.js')) // A web page as a web page -- how to escape to tabr?\n // register(require('markdown-pane').Pane) // replaced by markdown in humanReadablePane\n\n register(require('./dataContentPane.js')) // Preferred for a data file\n register(require('source-pane')) // edit source\n register(require('./n3Pane.js'))\n register(require('./RDFXMLPane.js'))\n\n // User configured - data driven\n register(require('./form/pane.js'))\n\n // Generic:\n\n register(require('./tableViewPane.js'))\n\n // Fallback totally generic:\n register(require('./defaultPane.js'))\n\n register(require('./ui/pane.js'))\n\n // register(require(\"categoryPane.js\")) // Not useful enough\n // register(require(\"pubsPane.js\")) // not finished\n\n // @@ jambo commented these things out to pare things down temporarily.\n // Note must use // not /* to comment out to make sure expander sees it\n // register(require(\"lawPane.js\"))\n\n // register(require('./microblogPane/microblogPane.js'))\n\n // register(require(\"./social/pane.js\")) // competitor to other social\n // register(require(\"./airPane.js\"))\n // register(require(\"./lawPane.js\"))\n // register(require(\"pushbackPane.js\"))\n // register(require(\"CVPane.js\"))\n // register(require(\"photoPane.js\"))\n // register(require(\"tagPane.js\"))\n // register(require(\"photoImportPane.js\"))\n\n // The sharing pane is fairly generic and administrative 201\n register(require('./sharing/sharingPane'))\n\n // The internals pane is always (almost?) the last as it is the least user-friendly\n register(require('./internal/internalPane'))\n\n register(require('./home/homePane'))\n\n // ENDS\n}\n"],"file":"registerPanes.js"}
@@ -16,12 +16,12 @@ module.exports = {
16
16
  audience: [ns.solid('PowerUser')],
17
17
  // Does the subject deserve an slideshow pane?
18
18
  label: function label(subject, context) {
19
- var kb = context.session.store;
19
+ var store = context.session.store;
20
20
  var ns = UI.ns;
21
- var t = kb.findTypeURIs(subject);
21
+ var t = store.findTypeURIs(subject);
22
22
 
23
23
  if (t[ns.ldp('Container').uri] || t[ns.ldp('BasicContainer').uri]) {
24
- var contents = kb.each(subject, ns.ldp('contains'));
24
+ var contents = store.each(subject, ns.ldp('contains'));
25
25
  var count = 0;
26
26
  contents.forEach(function (file) {
27
27
  if (UI.widgets.isImage(file)) count++;
@@ -37,29 +37,42 @@ module.exports = {
37
37
  var dom = context.dom;
38
38
  var styleSheet = 'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css';
39
39
  UI.widgets.addStyleSheet(dom, styleSheet);
40
- var kb = context.session.store;
40
+ var store = context.session.store;
41
41
  var ns = UI.ns;
42
42
  var div = dom.createElement('div');
43
43
  div.setAttribute('class', 'bss-slides');
44
- var t = kb.findTypeURIs(subject);
44
+ var t = store.findTypeURIs(subject);
45
45
  var predicate;
46
46
 
47
47
  if (t[ns.ldp('BasicContainer').uri] || t[ns.ldp('Container').uri]) {
48
48
  predicate = ns.ldp('contains');
49
49
  }
50
50
 
51
- var images = kb.each(subject, predicate); // @@ random order?
51
+ var images = store.each(subject, predicate); // @@ random order?
52
52
  // @@ Ideally: sort by embedded time of image
53
53
 
54
54
  images.sort(); // Sort for now by URI
55
55
 
56
- for (var i = 0; i < images.length; i++) {
57
- if (!UI.widgets.isImage(images[i])) continue;
56
+ var _loop = function _loop(i) {
57
+ if (!UI.widgets.isImage(images[i])) return "continue";
58
58
  var figure = div.appendChild(dom.createElement('figure'));
59
- var img = figure.appendChild(dom.createElement('img'));
60
- img.setAttribute('src', images[i].uri);
59
+ var img = figure.appendChild(dom.createElement('img')); // get image with authenticated fetch
60
+
61
+ store.fetcher._fetch(images[i].uri).then(function (response) {
62
+ return response.blob();
63
+ }).then(function (myBlob) {
64
+ var objectURL = URL.createObjectURL(myBlob);
65
+ img.setAttribute('src', objectURL); // w640 h480 //
66
+ });
67
+
61
68
  img.setAttribute('width', '100%');
62
69
  figure.appendChild(dom.createElement('figcaption'));
70
+ };
71
+
72
+ for (var i = 0; i < images.length; i++) {
73
+ var _ret = _loop(i);
74
+
75
+ if (_ret === "continue") continue;
63
76
  }
64
77
 
65
78
  var options = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/slideshow/slideshowPane.js"],"names":["UI","require","ns","makeBSS","module","exports","icon","icons","iconBase","name","audience","solid","label","subject","context","kb","session","store","t","findTypeURIs","ldp","uri","contents","each","count","forEach","file","widgets","isImage","render","dom","styleSheet","addStyleSheet","div","createElement","setAttribute","predicate","images","sort","i","length","fig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,CAAf;AACA,UAAMS,GAAG,GAAGF,MAAM,CAACC,WAAP,CAAmBZ,GAAG,CAACI,aAAJ,CAAkB,KAAlB,CAAnB,CAAZ;AACAS,MAAAA,GAAG,CAACR,YAAJ,CAAiB,KAAjB,EAAwBE,MAAM,CAACE,CAAD,CAAN,CAAUlB,GAAlC;AACAsB,MAAAA,GAAG,CAACR,YAAJ,CAAiB,OAAjB,EAA0B,MAA1B;AACAM,MAAAA,MAAM,CAACC,WAAP,CAAmBZ,GAAG,CAACI,aAAJ,CAAkB,YAAlB,CAAnB;AACD;;AACD,QAAMU,OAAO,GAAG;AAAEd,MAAAA,GAAG,EAAEA;AAAP,KAAhB;AAEAe,IAAAA,UAAU,CAAC,YAAY;AACrB1C,MAAAA,OAAO,CAAC,aAAD,EAAgByC,OAAhB,CAAP;AACD,KAFS,EAEP,IAFO,CAAV,CA7BkC,CA+BzB;;AAET,WAAOX,GAAP;AACD;AA3Dc,CAAjB,C,CA8DA","sourcesContent":["/* slideshow Pane\n **\n */\nconst UI = require('solid-ui')\nconst ns = UI.ns\n\n// tabulator.loadScript(\"js/panes/slideshow/better-simple-slideshow/js/better-simple-slideshow.js\")\n\nconst makeBSS = require('@solid/better-simple-slideshow')\n// load also js/panes/slideshow/better-simple-slideshow/css/simple-slideshow-styles.css\n\nmodule.exports = {\n icon: UI.icons.iconBase + 'noun_138712.svg',\n\n name: 'slideshow',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve an slideshow pane?\n label: function (subject, context) {\n const kb = context.session.store\n const ns = UI.ns\n const t = kb.findTypeURIs(subject)\n if (t[ns.ldp('Container').uri] || t[ns.ldp('BasicContainer').uri]) {\n const contents = kb.each(subject, ns.ldp('contains'))\n let count = 0\n contents.forEach(function (file) {\n if (UI.widgets.isImage(file)) count++\n })\n return count > 0 ? 'Slideshow' : null\n }\n return null\n },\n\n // See https://github.com/leemark/better-simple-slideshow\n // and follow instructions there\n render: function (subject, context) {\n const dom = context.dom\n const styleSheet =\n 'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css'\n UI.widgets.addStyleSheet(dom, styleSheet)\n\n const kb = context.session.store\n const ns = UI.ns\n const div = dom.createElement('div')\n div.setAttribute('class', 'bss-slides')\n\n const t = kb.findTypeURIs(subject)\n let predicate\n if (t[ns.ldp('BasicContainer').uri] || t[ns.ldp('Container').uri]) {\n predicate = ns.ldp('contains')\n }\n const images = kb.each(subject, predicate) // @@ random order?\n // @@ Ideally: sort by embedded time of image\n images.sort() // Sort for now by URI\n for (let i = 0; i < images.length; i++) {\n if (!UI.widgets.isImage(images[i])) continue\n const figure = div.appendChild(dom.createElement('figure'))\n const img = figure.appendChild(dom.createElement('img'))\n img.setAttribute('src', images[i].uri)\n img.setAttribute('width', '100%')\n figure.appendChild(dom.createElement('figcaption'))\n }\n const options = { dom: dom }\n\n setTimeout(function () {\n makeBSS('.bss-slides', options)\n }, 1000) // Must run after the code which called this\n\n return div\n }\n}\n\n// ends\n"],"file":"slideshowPane.js"}
1
+ {"version":3,"sources":["../../src/slideshow/slideshowPane.js"],"names":["UI","require","ns","makeBSS","module","exports","icon","icons","iconBase","name","audience","solid","label","subject","context","store","session","t","findTypeURIs","ldp","uri","contents","each","count","forEach","file","widgets","isImage","render","dom","styleSheet","addStyleSheet","div","createElement","setAttribute","predicate","images","sort","i","figure","appendChild","img","fetcher","_fetch","then","response","blob","myBlob","objectURL","URL","createObjectURL","length","options","setTimeout"],"mappings":";;AAAA;AACA;AACA;AACA,IAAMA,EAAE,GAAGC,OAAO,CAAC,UAAD,CAAlB;;AACA,IAAMC,EAAE,GAAGF,EAAE,CAACE,EAAd,C,CAEA;;AAEA,IAAMC,OAAO,GAAGF,OAAO,CAAC,gCAAD,CAAvB,C,CACA;;;AAEAG,MAAM,CAACC,OAAP,GAAiB;AACfC,EAAAA,IAAI,EAAEN,EAAE,CAACO,KAAH,CAASC,QAAT,GAAoB,iBADX;AAGfC,EAAAA,IAAI,EAAE,WAHS;AAKfC,EAAAA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B,KAAjB,EAAwBc,SAAxB,EAFqB,CAEc;AACpC,OAPH;;AAQAP,MAAAA,GAAG,CAACP,YAAJ,CAAiB,OAAjB,EAA0B,MAA1B;AACAK,MAAAA,MAAM,CAACC,WAAP,CAAmBX,GAAG,CAACI,aAAJ,CAAkB,YAAlB,CAAnB;AAlCgC;;AAmBlC,SAAK,IAAIK,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,MAAM,CAACe,MAA3B,EAAmCb,CAAC,EAApC,EAAwC;AAAA,uBAA/BA,CAA+B;;AAAA,+BACF;AAerC;;AACD,QAAMc,OAAO,GAAG;AAAEvB,MAAAA,GAAG,EAAEA;AAAP,KAAhB;AAEAwB,IAAAA,UAAU,CAAC,YAAY;AACrBlD,MAAAA,OAAO,CAAC,aAAD,EAAgBiD,OAAhB,CAAP;AACD,KAFS,EAEP,IAFO,CAAV,CAtCkC,CAwCzB;;AAET,WAAOpB,GAAP;AACD;AApEc,CAAjB,C,CAuEA","sourcesContent":["/* slideshow Pane\n **\n */\nconst UI = require('solid-ui')\nconst ns = UI.ns\n\n// tabulator.loadScript(\"js/panes/slideshow/better-simple-slideshow/js/better-simple-slideshow.js\")\n\nconst makeBSS = require('@solid/better-simple-slideshow')\n// load also js/panes/slideshow/better-simple-slideshow/css/simple-slideshow-styles.css\n\nmodule.exports = {\n icon: UI.icons.iconBase + 'noun_138712.svg',\n\n name: 'slideshow',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve an slideshow pane?\n label: function (subject, context) {\n const store = context.session.store\n const ns = UI.ns\n const t = store.findTypeURIs(subject)\n if (t[ns.ldp('Container').uri] || t[ns.ldp('BasicContainer').uri]) {\n const contents = store.each(subject, ns.ldp('contains'))\n let count = 0\n contents.forEach(function (file) {\n if (UI.widgets.isImage(file)) count++\n })\n return count > 0 ? 'Slideshow' : null\n }\n return null\n },\n\n // See https://github.com/leemark/better-simple-slideshow\n // and follow instructions there\n render: function (subject, context) {\n const dom = context.dom\n const styleSheet =\n 'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css'\n UI.widgets.addStyleSheet(dom, styleSheet)\n\n const store = context.session.store\n const ns = UI.ns\n const div = dom.createElement('div')\n div.setAttribute('class', 'bss-slides')\n\n const t = store.findTypeURIs(subject)\n let predicate\n if (t[ns.ldp('BasicContainer').uri] || t[ns.ldp('Container').uri]) {\n predicate = ns.ldp('contains')\n }\n const images = store.each(subject, predicate) // @@ random order?\n // @@ Ideally: sort by embedded time of image\n images.sort() // Sort for now by URI\n for (let i = 0; i < images.length; i++) {\n if (!UI.widgets.isImage(images[i])) continue\n const figure = div.appendChild(dom.createElement('figure'))\n const img = figure.appendChild(dom.createElement('img'))\n\n // get image with authenticated fetch\n store.fetcher._fetch(images[i].uri)\n .then(function(response) {\n return response.blob()\n })\n .then(function(myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n img.setAttribute('src', objectURL) // w640 h480 //\n })\n img.setAttribute('width', '100%')\n figure.appendChild(dom.createElement('figcaption'))\n }\n const options = { dom: dom }\n\n setTimeout(function () {\n makeBSS('.bss-slides', options)\n }, 1000) // Must run after the code which called this\n\n return div\n }\n}\n\n// ends\n"],"file":"slideshowPane.js"}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- buildTime: "2022-03-31T15:18:20Z",
9
- commit: "25afa55a8a7a354ac27383f1118031db5666869f",
8
+ buildTime: "2022-04-14T12:43:07Z",
9
+ commit: "39e7984e6b8450f46fdc1adf6dbaeee25623fe2e",
10
10
  npmInfo: {
11
- 'solid-panes': '3.5.22',
11
+ 'solid-panes': '3.5.23',
12
12
  npm: '6.14.16',
13
13
  ares: '1.18.1',
14
14
  brotli: '1.0.9',
@@ -18,8 +18,8 @@ var _default = {
18
18
  modules: '83',
19
19
  napi: '8',
20
20
  nghttp2: '1.42.0',
21
- node: '14.19.0',
22
- openssl: '1.1.1m',
21
+ node: '14.19.1',
22
+ openssl: '1.1.1n',
23
23
  tz: '2021a3',
24
24
  unicode: '14.0',
25
25
  uv: '1.42.0',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACfA,EAAAA,SAAS,EAAE,sBADI;AAEfC,EAAAA,MAAM,EAAE,0CAFO;AAGfC,EAAAA,OAAO,EACP;AACE,mBAAe,QADjB;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,QAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\nbuildTime: \"2022-03-31T15:18:20Z\",\ncommit: \"25afa55a8a7a354ac27383f1118031db5666869f\",\nnpmInfo:\n{\n 'solid-panes': '3.5.22',\n npm: '6.14.16',\n ares: '1.18.1',\n brotli: '1.0.9',\n cldr: '40.0',\n icu: '70.1',\n llhttp: '2.1.4',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.19.0',\n openssl: '1.1.1m',\n tz: '2021a3',\n unicode: '14.0',\n uv: '1.42.0',\n v8: '8.4.371.23-node.85',\n zlib: '1.2.11'\n}\n};\n"],"file":"versionInfo.js"}
1
+ {"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACfA,EAAAA,SAAS,EAAE,sBADI;AAEfC,EAAAA,MAAM,EAAE,0CAFO;AAGfC,EAAAA,OAAO,EACP;AACE,mBAAe,QADjB;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,QAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\nbuildTime: \"2022-04-14T12:43:07Z\",\ncommit: \"39e7984e6b8450f46fdc1adf6dbaeee25623fe2e\",\nnpmInfo:\n{\n 'solid-panes': '3.5.23',\n npm: '6.14.16',\n ares: '1.18.1',\n brotli: '1.0.9',\n cldr: '40.0',\n icu: '70.1',\n llhttp: '2.1.4',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.19.1',\n openssl: '1.1.1n',\n tz: '2021a3',\n unicode: '14.0',\n uv: '1.42.0',\n v8: '8.4.371.23-node.85',\n zlib: '1.2.11'\n}\n};\n"],"file":"versionInfo.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-panes",
3
- "version": "3.5.22-25afa55a",
3
+ "version": "3.5.23-39e7984e",
4
4
  "description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "https://github.com/solid/solid-panes"
25
+ "url": "https://github.com/solidos/solid-panes"
26
26
  },
27
27
  "keywords": [
28
28
  "solid",
@@ -40,15 +40,15 @@
40
40
  "author": "Tim Berners-Lee <timbl@mit.edu>",
41
41
  "license": "MIT",
42
42
  "bugs": {
43
- "url": "https://github.com/solid/solid-panes/issues"
43
+ "url": "https://github.com/solidos/solid-panes/issues"
44
44
  },
45
- "homepage": "https://github.com/solid/solid-panes",
45
+ "homepage": "https://github.com/solidos/solid-panes",
46
46
  "dependencies": {
47
47
  "@solid/better-simple-slideshow": "^0.1.0",
48
48
  "activitystreams-pane": "^0.6.5",
49
49
  "chat-pane": "^2.4.17",
50
50
  "contacts-pane": "^2.6.2",
51
- "folder-pane": "^2.4.15",
51
+ "folder-pane": "^2.4.16",
52
52
  "issue-pane": "^2.4.11",
53
53
  "marked": "^4.0.12",
54
54
  "meeting-pane": "^2.3.10",
@@ -58,7 +58,7 @@
58
58
  "rdflib": "^2.2.19",
59
59
  "solid-logic": "^1.3.16",
60
60
  "solid-namespace": "^0.5.2",
61
- "solid-ui": "^2.4.20",
61
+ "solid-ui": "^2.4.21",
62
62
  "source-pane": "^2.2.16"
63
63
  },
64
64
  "devDependencies": {
@@ -93,7 +93,7 @@ function setupUserTypesSection (
93
93
  description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'
94
94
 
95
95
  const userTypesLink = formContainer.appendChild(dom.createElement('a'))
96
- userTypesLink.href = 'https://github.com/solid/userguide/#role'
96
+ userTypesLink.href = 'https://github.com/solidos/userguide/#role'
97
97
  userTypesLink.innerText = 'Read more'
98
98
 
99
99
  const formArea = formContainer.appendChild(dom.createElement('div'))
@@ -146,7 +146,7 @@ async function generateDeletionLink (
146
146
  *
147
147
  * This function infers the deletion link by assuming the URL structure of Node Solid server.
148
148
  * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:
149
- * https://github.com/solid/data-interoperability-panel/issues/18
149
+ * https://github.com/solidos/data-interoperability-panel/issues/18
150
150
  *
151
151
  * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for
152
152
  * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the
package/src/imagePane.js CHANGED
@@ -10,12 +10,12 @@ module.exports = {
10
10
  name: 'image',
11
11
 
12
12
  label: function (subject, context) {
13
- const kb = context.session.store
13
+ const store = context.session.store
14
14
  if (
15
- !kb.anyStatementMatching(
15
+ !store.anyStatementMatching(
16
16
  subject,
17
17
  UI.ns.rdf('type'),
18
- kb.sym('http://purl.org/dc/terms/Image')
18
+ store.sym('http://purl.org/dc/terms/Image')
19
19
  )
20
20
  ) {
21
21
  // NB: Not dc: namespace!
@@ -24,8 +24,8 @@ module.exports = {
24
24
 
25
25
  // See also the source pane, which has lower precedence.
26
26
 
27
- const contentTypeMatch = function (kb, x, contentTypes) {
28
- const cts = kb.fetcher.getHeader(x, 'content-type')
27
+ const contentTypeMatch = function (store, x, contentTypes) {
28
+ const cts = store.fetcher.getHeader(x, 'content-type')
29
29
  if (cts) {
30
30
  for (let j = 0; j < cts.length; j++) {
31
31
  for (let k = 0; k < contentTypes.length; k++) {
@@ -39,7 +39,7 @@ module.exports = {
39
39
  }
40
40
 
41
41
  const suppressed = ['application/pdf']
42
- if (contentTypeMatch(kb, subject, suppressed)) {
42
+ if (contentTypeMatch(store, subject, suppressed)) {
43
43
  return null
44
44
  }
45
45
  return 'view'
@@ -47,10 +47,21 @@ module.exports = {
47
47
 
48
48
  render: function (subject, context) {
49
49
  const myDocument = context.dom
50
+ const store = context.session.store
50
51
  const div = myDocument.createElement('div')
51
52
  div.setAttribute('class', 'imageView')
52
53
  const img = myDocument.createElement('IMG')
53
- img.setAttribute('src', subject.uri) // w640 h480
54
+
55
+ // get image with authenticated fetch
56
+ store.fetcher._fetch(subject.uri)
57
+ .then(function(response) {
58
+ return response.blob()
59
+ })
60
+ .then(function(myBlob) {
61
+ const objectURL = URL.createObjectURL(myBlob)
62
+ img.setAttribute('src', objectURL) // w640 h480 //
63
+ })
64
+
54
65
  img.setAttribute('style', 'max-width: 100%; max-height: 100%;')
55
66
  // div.style['max-width'] = '640'
56
67
  // div.style['max-height'] = '480'
@@ -17,7 +17,7 @@ const LOG_OUT_MENU_ITEM = 'Log out'
17
17
  * URLS
18
18
  */
19
19
  const USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'
20
- const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'
20
+ const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues'
21
21
 
22
22
  export async function createHeader (store, outliner) {
23
23
  initHeader(store, await setUserMenu(outliner), setHeaderOptions())
@@ -21,7 +21,7 @@ module.exports = function registerPanes (register) {
21
21
  register(require('./transaction/period.js'))
22
22
 
23
23
  const chatPanes = require('chat-pane')
24
- // FIXME: https://github.com/solid/chat-pane/issues/40
24
+ // FIXME: https://github.com/solidos/chat-pane/issues/40
25
25
  if (chatPanes.longChatPane) {
26
26
  register(chatPanes.longChatPane) // Long pane must have prio in case short pane tries to do a long pane
27
27
  register(chatPanes.shortChatPane) // was './chat/chatPane.js'
@@ -18,11 +18,11 @@ module.exports = {
18
18
 
19
19
  // Does the subject deserve an slideshow pane?
20
20
  label: function (subject, context) {
21
- const kb = context.session.store
21
+ const store = context.session.store
22
22
  const ns = UI.ns
23
- const t = kb.findTypeURIs(subject)
23
+ const t = store.findTypeURIs(subject)
24
24
  if (t[ns.ldp('Container').uri] || t[ns.ldp('BasicContainer').uri]) {
25
- const contents = kb.each(subject, ns.ldp('contains'))
25
+ const contents = store.each(subject, ns.ldp('contains'))
26
26
  let count = 0
27
27
  contents.forEach(function (file) {
28
28
  if (UI.widgets.isImage(file)) count++
@@ -40,24 +40,33 @@ module.exports = {
40
40
  'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css'
41
41
  UI.widgets.addStyleSheet(dom, styleSheet)
42
42
 
43
- const kb = context.session.store
43
+ const store = context.session.store
44
44
  const ns = UI.ns
45
45
  const div = dom.createElement('div')
46
46
  div.setAttribute('class', 'bss-slides')
47
47
 
48
- const t = kb.findTypeURIs(subject)
48
+ const t = store.findTypeURIs(subject)
49
49
  let predicate
50
50
  if (t[ns.ldp('BasicContainer').uri] || t[ns.ldp('Container').uri]) {
51
51
  predicate = ns.ldp('contains')
52
52
  }
53
- const images = kb.each(subject, predicate) // @@ random order?
53
+ const images = store.each(subject, predicate) // @@ random order?
54
54
  // @@ Ideally: sort by embedded time of image
55
55
  images.sort() // Sort for now by URI
56
56
  for (let i = 0; i < images.length; i++) {
57
57
  if (!UI.widgets.isImage(images[i])) continue
58
58
  const figure = div.appendChild(dom.createElement('figure'))
59
59
  const img = figure.appendChild(dom.createElement('img'))
60
- img.setAttribute('src', images[i].uri)
60
+
61
+ // get image with authenticated fetch
62
+ store.fetcher._fetch(images[i].uri)
63
+ .then(function(response) {
64
+ return response.blob()
65
+ })
66
+ .then(function(myBlob) {
67
+ const objectURL = URL.createObjectURL(myBlob)
68
+ img.setAttribute('src', objectURL) // w640 h480 //
69
+ })
61
70
  img.setAttribute('width', '100%')
62
71
  figure.appendChild(dom.createElement('figcaption'))
63
72
  }
@@ -1,9 +1,9 @@
1
1
  export default {
2
- buildTime: "2022-03-31T15:18:20Z",
3
- commit: "25afa55a8a7a354ac27383f1118031db5666869f",
2
+ buildTime: "2022-04-14T12:43:07Z",
3
+ commit: "39e7984e6b8450f46fdc1adf6dbaeee25623fe2e",
4
4
  npmInfo:
5
5
  {
6
- 'solid-panes': '3.5.22',
6
+ 'solid-panes': '3.5.23',
7
7
  npm: '6.14.16',
8
8
  ares: '1.18.1',
9
9
  brotli: '1.0.9',
@@ -13,8 +13,8 @@ npmInfo:
13
13
  modules: '83',
14
14
  napi: '8',
15
15
  nghttp2: '1.42.0',
16
- node: '14.19.0',
17
- openssl: '1.1.1m',
16
+ node: '14.19.1',
17
+ openssl: '1.1.1n',
18
18
  tz: '2021a3',
19
19
  unicode: '14.0',
20
20
  uv: '1.42.0',