solid-ui 2.5.0 → 2.5.1-1d1fdc21
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/841.solid-ui.min.js +1 -1
- package/dist/841.solid-ui.min.js.map +1 -1
- package/dist/_2b19.solid-ui.js.map +1 -1
- package/dist/solid-ui.js +42503 -46520
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.LICENSE.txt +1 -5
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +4 -2
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -1
- package/lib/acl/access-controller.js +48 -49
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js +39 -39
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js +18 -19
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js +2 -3
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js +51 -52
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/chat/bookmarks.js +76 -77
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +74 -75
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +66 -67
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +218 -219
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/keys.js +62 -63
- package/lib/chat/keys.js.map +1 -1
- package/lib/chat/message.js +99 -100
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +99 -100
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +58 -59
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.js +1 -2
- package/lib/create/create.js.map +1 -1
- package/lib/folders.js +1 -2
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.js +15 -16
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.js +31 -32
- package/lib/header/index.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/login/login.js +216 -218
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/matrix.js +1 -2
- package/lib/matrix/matrix.js.map +1 -1
- package/lib/media/media-capture.js +3 -4
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js +1 -2
- package/lib/messageArea.js.map +1 -1
- package/lib/ns.js +1 -2
- package/lib/ns.js.map +1 -1
- package/lib/pad.js +1 -2
- package/lib/pad.js.map +1 -1
- package/lib/participation.js +1 -2
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js +1 -2
- package/lib/preferences.js.map +1 -1
- package/lib/table.js +1 -2
- package/lib/table.js.map +1 -1
- package/lib/tabs.js +1 -2
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js +36 -36
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/index.js +1 -2
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/keyHelpers/accessData.js +33 -34
- package/lib/utils/keyHelpers/accessData.js.map +1 -1
- package/lib/utils/keyHelpers/acl.js +21 -22
- package/lib/utils/keyHelpers/acl.js.map +1 -1
- package/lib/utils/keyHelpers/otherHelpers.js +1 -2
- package/lib/utils/keyHelpers/otherHelpers.js.map +1 -1
- package/lib/utils/label.js +1 -2
- package/lib/utils/label.js.map +1 -1
- package/lib/versionInfo.d.ts +0 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +17 -18
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.d.ts +1 -1
- package/lib/widgets/buttons.js +1 -2
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +1 -2
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.js +1 -2
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +48 -48
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +37 -38
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +44 -45
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +23 -24
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +91 -92
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.js +1 -2
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/comment.js +1 -2
- package/lib/widgets/forms/comment.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js +1 -2
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms/formStyle.js +1 -2
- package/lib/widgets/forms/formStyle.js.map +1 -1
- package/lib/widgets/forms.js +78 -78
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js +1 -2
- package/lib/widgets/index.js.map +1 -1
- package/lib/widgets/multiSelect.js +1 -2
- package/lib/widgets/multiSelect.js.map +1 -1
- package/lib/widgets/peoplePicker.js +1 -2
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/package.json +24 -24
package/lib/folders.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folders.js","names":["debug","_interopRequireWildcard","require","_iconBase","_solidLogic","ns","rdf","style","widgets","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UI","icons","deleteRecursive","kb","folder","Promise","resolve","_reject","fetcher","load","then","promises","each","ldp","map","file","holds","log","confirm","Error","webOperation","uri","push","all","_res","forAllFiles","action","deleteFolder","store","dom","solidLogicSingleton","docuent","document","div","createElement","table","appendChild","mainTR","p","textContent","concat","buttonsTR","buttonsTD1","buttonsTD3","cancel","cancelButton","addEventListener","_event","parentNode","removeChild","doit","button","iconBase","deleteThem","count","msg"],"sources":["../src/folders.js"],"sourcesContent":["/** UI To Delete Folder and content\n *\n */\n/* global confirm */\n\nimport * as debug from './debug'\nimport { icons } from './iconBase'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as ns from './ns'\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as style from './style'\nimport * as widgets from './widgets'\n\nconst UI = { icons, ns, rdf, style, widgets }\n\nexport function deleteRecursive (kb, folder) {\n // eslint-disable-next-line promise/param-names\n return new Promise(function (resolve, _reject) {\n kb.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)\n } else {\n debug.log('deleteRecirsive file: ' + file)\n if (!confirm(' Really DELETE File ' + file)) {\n throw new Error('User aborted delete file')\n }\n return kb.fetcher.webOperation('DELETE', file.uri)\n }\n })\n debug.log('deleteRecirsive folder: ' + folder)\n if (!confirm(' Really DELETE folder ' + folder)) {\n throw new Error('User aborted delete file')\n }\n promises.push(kb.fetcher.webOperation('DELETE', folder.uri))\n Promise.all(promises).then(_res => {\n resolve()\n })\n })\n })\n}\n\n/** Iterate over files depth first\n *\n * @param folder - The folder whose contents we iterate over\n * @param store - The quadstore\n * @param action - returns a promise. All the promises must be resolved\n */\nfunction forAllFiles (folder, kb, action) {\n // eslint-disable-next-line promise/param-names\n return new Promise(function (resolve, _reject) {\n kb.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 forAllFiles(file, kb, action)\n } else {\n return action(file)\n }\n })\n promises.push(action(folder))\n Promise.all(promises).then(_res => {\n resolve()\n })\n })\n })\n}\n\n/** Delete Folder and contents\n *\n * @param {NamedNode} folder - The LDP container to be deleted\n * @param {DOMElement} containingElement - Where to put the user interface\n * @param {IndexedForumula} store - Quadstore (optional)\n * @param {Document} dom - The browser 'document' gloabl or equivalent (or iuse global)\n * @returns {DOMElement} - The control which has eben inserted in the\n */\n/* global document */\nexport function deleteFolder (folder, store, dom) {\n store = store || solidLogicSingleton.store\n if (typeof docuent !== 'undefined') {\n dom = dom || document\n }\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const mainTR = table.appendChild(dom.createElement('tr'))\n mainTR.appendChild(dom.createElement('td')) // mainTD\n\n const p = mainTR.appendChild(dom.createElement('p'))\n p.textContent = `Are you sure you want to delete the folder ${folder}? This cannot be undone.`\n const buttonsTR = table.appendChild(dom.createElement('tr'))\n const buttonsTD1 = buttonsTR.appendChild(dom.createElement('td'))\n buttonsTR.appendChild(dom.createElement('td')) // buttonsTD2\n const buttonsTD3 = buttonsTR.appendChild(dom.createElement('td'))\n\n const cancel = buttonsTD1.appendChild(UI.widgets.cancelButton(dom))\n cancel.addEventListener(\n 'click',\n function (_event) {\n div.parentNode.removeChild(div)\n },\n false\n )\n\n const doit = buttonsTD3.appendChild(\n UI.widgets.button(dom, UI.icons.iconBase + 'noun_925021.svg', 'Yes, delete')\n )\n doit.addEventListener(\n 'click',\n function (_event) {\n deleteThem(folder).then(() => {\n debug.log('All deleted.')\n })\n },\n false\n )\n\n function deleteThem (folder) {\n return forAllFiles(folder, file =>\n store.fetcher.webOperation('DELETE', file.uri)\n )\n }\n let count = 0\n forAllFiles(folder, store, () => {\n count += 1\n }) // Count files\n .then(() => {\n const msg = ' Files to delete: ' + count\n debug.log(msg)\n p.textContent += msg\n })\n\n return div\n}\n"],"mappings":";;;;;;;;AAKA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,EAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI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G,CAACe,UAAU,CAACC,WAAW,CAAChB,GAAG,CAAC;EACjC,CAAC,EACD,KACF,CAAC;EAED,IAAMiB,IAAI,GAAGP,UAAU,CAACP,WAAW,CACjCpC,EAAE,CAACrB,OAAO,CAACwE,MAAM,CAACtB,GAAG,EAAE7B,EAAE,CAACC,KAAK,CAACmD,QAAQ,GAAG,iBAAiB,EAAE,aAAa,CAC7E,CAAC;EACDF,IAAI,CAACJ,gBAAgB,CACnB,OAAO,EACP,UAAUC,MAAM,EAAE;IAChBM,UAAU,CAACjD,MAAM,CAAC,CAACM,IAAI,CAAC,YAAM;MAC5BvC,KAAK,CAAC8C,GAAG,CAAC,cAAc,CAAC;IAC3B,CAAC,CAAC;EACJ,CAAC,EACD,KACF,CAAC;EAED,SAASoC,UAAUA,CAAEjD,MAAM,EAAE;IAC3B,OAAOqB,WAAW,CAACrB,MAAM,EAAE,UAAAW,IAAI;MAAA,OAC7Ba,KAAK,CAACpB,OAAO,CAACY,YAAY,CAAC,QAAQ,EAAEL,IAAI,CAACM,GAAG,CAAC;IAAA,CAChD,CAAC;EACH;EACA,IAAIiC,KAAK,GAAG,CAAC;EACb7B,WAAW,CAACrB,MAAM,EAAEwB,KAAK,EAAE,YAAM;IAC/B0B,KAAK,IAAI,CAAC;EACZ,CAAC,CAAC,CAAC;EAAA,CACA5C,IAAI,CAAC,YAAM;IACV,IAAM6C,GAAG,GAAG,oBAAoB,GAAGD,KAAK;IACxCnF,KAAK,CAAC8C,GAAG,CAACsC,GAAG,CAAC;IACdjB,CAAC,CAACC,WAAW,IAAIgB,GAAG;EACtB,CAAC,CAAC;EAEJ,OAAOtB,GAAG;AACZ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"folders.js","names":["debug","_interopRequireWildcard","require","_iconBase","_solidLogic","ns","rdf","style","widgets","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UI","icons","deleteRecursive","kb","folder","Promise","resolve","_reject","fetcher","load","then","promises","each","ldp","map","file","holds","log","confirm","Error","webOperation","uri","push","all","_res","forAllFiles","action","deleteFolder","store","dom","solidLogicSingleton","docuent","document","div","createElement","table","appendChild","mainTR","p","textContent","concat","buttonsTR","buttonsTD1","buttonsTD3","cancel","cancelButton","addEventListener","_event","parentNode","removeChild","doit","button","iconBase","deleteThem","count","msg"],"sources":["../src/folders.js"],"sourcesContent":["/** UI To Delete Folder and content\n *\n */\n/* global confirm */\n\nimport * as debug from './debug'\nimport { icons } from './iconBase'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as ns from './ns'\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as style from './style'\nimport * as widgets from './widgets'\n\nconst UI = { icons, ns, rdf, style, widgets }\n\nexport function deleteRecursive (kb, folder) {\n // eslint-disable-next-line promise/param-names\n return new Promise(function (resolve, _reject) {\n kb.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)\n } else {\n debug.log('deleteRecirsive file: ' + file)\n if (!confirm(' Really DELETE File ' + file)) {\n throw new Error('User aborted delete file')\n }\n return kb.fetcher.webOperation('DELETE', file.uri)\n }\n })\n debug.log('deleteRecirsive folder: ' + folder)\n if (!confirm(' Really DELETE folder ' + folder)) {\n throw new Error('User aborted delete file')\n }\n promises.push(kb.fetcher.webOperation('DELETE', folder.uri))\n Promise.all(promises).then(_res => {\n resolve()\n })\n })\n })\n}\n\n/** Iterate over files depth first\n *\n * @param folder - The folder whose contents we iterate over\n * @param store - The quadstore\n * @param action - returns a promise. All the promises must be resolved\n */\nfunction forAllFiles (folder, kb, action) {\n // eslint-disable-next-line promise/param-names\n return new Promise(function (resolve, _reject) {\n kb.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 forAllFiles(file, kb, action)\n } else {\n return action(file)\n }\n })\n promises.push(action(folder))\n Promise.all(promises).then(_res => {\n resolve()\n })\n })\n })\n}\n\n/** Delete Folder and contents\n *\n * @param {NamedNode} folder - The LDP container to be deleted\n * @param {DOMElement} containingElement - Where to put the user interface\n * @param {IndexedForumula} store - Quadstore (optional)\n * @param {Document} dom - The browser 'document' gloabl or equivalent (or iuse global)\n * @returns {DOMElement} - The control which has eben inserted in the\n */\n/* global document */\nexport function deleteFolder (folder, store, dom) {\n store = store || solidLogicSingleton.store\n if (typeof docuent !== 'undefined') {\n dom = dom || document\n }\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const mainTR = table.appendChild(dom.createElement('tr'))\n mainTR.appendChild(dom.createElement('td')) // mainTD\n\n const p = mainTR.appendChild(dom.createElement('p'))\n p.textContent = `Are you sure you want to delete the folder ${folder}? This cannot be undone.`\n const buttonsTR = table.appendChild(dom.createElement('tr'))\n const buttonsTD1 = buttonsTR.appendChild(dom.createElement('td'))\n buttonsTR.appendChild(dom.createElement('td')) // buttonsTD2\n const buttonsTD3 = buttonsTR.appendChild(dom.createElement('td'))\n\n const cancel = buttonsTD1.appendChild(UI.widgets.cancelButton(dom))\n cancel.addEventListener(\n 'click',\n function (_event) {\n div.parentNode.removeChild(div)\n },\n false\n )\n\n const doit = buttonsTD3.appendChild(\n UI.widgets.button(dom, UI.icons.iconBase + 'noun_925021.svg', 'Yes, delete')\n )\n doit.addEventListener(\n 'click',\n function (_event) {\n deleteThem(folder).then(() => {\n debug.log('All deleted.')\n })\n },\n false\n )\n\n function deleteThem (folder) {\n return forAllFiles(folder, file =>\n store.fetcher.webOperation('DELETE', file.uri)\n )\n }\n let count = 0\n forAllFiles(folder, store, () => {\n count += 1\n }) // Count files\n .then(() => {\n const msg = ' Files to delete: ' + count\n debug.log(msg)\n p.textContent += msg\n })\n\n return div\n}\n"],"mappings":";;;;;;;;AAKA,IAAAA,KAAA,GAAAC,uBAA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AUC,MAAM,EAAE;IAChBd,GAAG,CAACe,UAAU,CAACC,WAAW,CAAChB,GAAG,CAAC;EACjC,CAAC,EACD,KACF,CAAC;EAED,IAAMiB,IAAI,GAAGP,UAAU,CAACP,WAAW,CACjCpC,EAAE,CAACrB,OAAO,CAACwE,MAAM,CAACtB,GAAG,EAAE7B,EAAE,CAACC,KAAK,CAACmD,QAAQ,GAAG,iBAAiB,EAAE,aAAa,CAC7E,CAAC;EACDF,IAAI,CAACJ,gBAAgB,CACnB,OAAO,EACP,UAAUC,MAAM,EAAE;IAChBM,UAAU,CAACjD,MAAM,CAAC,CAACM,IAAI,CAAC,YAAM;MAC5BvC,KAAK,CAAC8C,GAAG,CAAC,cAAc,CAAC;IAC3B,CAAC,CAAC;EACJ,CAAC,EACD,KACF,CAAC;EAED,SAASoC,UAAUA,CAAEjD,MAAM,EAAE;IAC3B,OAAOqB,WAAW,CAACrB,MAAM,EAAE,UAAAW,IAAI;MAAA,OAC7Ba,KAAK,CAACpB,OAAO,CAACY,YAAY,CAAC,QAAQ,EAAEL,IAAI,CAACM,GAAG,CAAC;IAAA,CAChD,CAAC;EACH;EACA,IAAIiC,KAAK,GAAG,CAAC;EACb7B,WAAW,CAACrB,MAAM,EAAEwB,KAAK,EAAE,YAAM;IAC/B0B,KAAK,IAAI,CAAC;EACZ,CAAC,CAAC,CAAC;EAAA,CACA5C,IAAI,CAAC,YAAM;IACV,IAAM6C,GAAG,GAAG,oBAAoB,GAAGD,KAAK;IACxCnF,KAAK,CAAC8C,GAAG,CAACsC,GAAG,CAAC;IACdjB,CAAC,CAACC,WAAW,IAAIgB,GAAG;EACtB,CAAC,CAAC;EAEJ,OAAOtB,GAAG;AACZ","ignoreList":[]}
|
package/lib/footer/index.js
CHANGED
|
@@ -13,8 +13,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
13
13
|
var _solidLogic = require("solid-logic");
|
|
14
14
|
var style = _interopRequireWildcard(require("../style"));
|
|
15
15
|
var _headerFooterHelpers = require("../utils/headerFooterHelpers");
|
|
16
|
-
function
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); }
|
|
18
17
|
/*
|
|
19
18
|
This file was copied from mashlib/src/global/footer.ts file. It is modified to
|
|
20
19
|
work in solid-ui by adjusting where imported functions are found.
|
|
@@ -40,25 +39,25 @@ function initFooter(_x, _x2) {
|
|
|
40
39
|
function _initFooter() {
|
|
41
40
|
_initFooter = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(store, options) {
|
|
42
41
|
var footer, pod, podOwner;
|
|
43
|
-
return _regenerator["default"].wrap(function
|
|
42
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
44
43
|
while (1) switch (_context2.prev = _context2.next) {
|
|
45
44
|
case 0:
|
|
46
45
|
footer = document.getElementById('PageFooter');
|
|
47
46
|
if (footer) {
|
|
48
|
-
_context2.next =
|
|
47
|
+
_context2.next = 1;
|
|
49
48
|
break;
|
|
50
49
|
}
|
|
51
50
|
return _context2.abrupt("return");
|
|
52
|
-
case
|
|
51
|
+
case 1:
|
|
53
52
|
pod = (0, _headerFooterHelpers.getPod)();
|
|
54
|
-
_context2.next =
|
|
53
|
+
_context2.next = 2;
|
|
55
54
|
return (0, _headerFooterHelpers.getPodOwner)(pod, store);
|
|
56
|
-
case
|
|
55
|
+
case 2:
|
|
57
56
|
podOwner = _context2.sent;
|
|
58
57
|
rebuildFooter(footer, store, pod, podOwner, options)();
|
|
59
58
|
_solidLogic.authSession.onLogin(rebuildFooter(footer, store, pod, podOwner, options));
|
|
60
59
|
_solidLogic.authSession.onLogout(rebuildFooter(footer, store, pod, podOwner, options));
|
|
61
|
-
case
|
|
60
|
+
case 3:
|
|
62
61
|
case "end":
|
|
63
62
|
return _context2.stop();
|
|
64
63
|
}
|
|
@@ -68,19 +67,19 @@ function _initFooter() {
|
|
|
68
67
|
}
|
|
69
68
|
function rebuildFooter(footer, store, pod, podOwner, options) {
|
|
70
69
|
return /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
71
|
-
var user;
|
|
72
|
-
return _regenerator["default"].wrap(function
|
|
70
|
+
var user, _t, _t2;
|
|
71
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
73
72
|
while (1) switch (_context.prev = _context.next) {
|
|
74
73
|
case 0:
|
|
75
74
|
user = _solidLogic.authn.currentUser();
|
|
76
75
|
footer.innerHTML = '';
|
|
77
|
-
|
|
78
|
-
_context.next =
|
|
76
|
+
_t = footer;
|
|
77
|
+
_context.next = 1;
|
|
79
78
|
return createControllerInfoBlock(store, user, pod, podOwner, options);
|
|
80
|
-
case
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
case
|
|
79
|
+
case 1:
|
|
80
|
+
_t2 = _context.sent;
|
|
81
|
+
_t.appendChild.call(_t, _t2);
|
|
82
|
+
case 2:
|
|
84
83
|
case "end":
|
|
85
84
|
return _context.stop();
|
|
86
85
|
}
|
package/lib/footer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_solidLogic","require","style","_interopRequireWildcard","_headerFooterHelpers","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_solidLogic","require","style","_interopRequireWildcard","_headerFooterHelpers","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t3","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_SOLID_PROJECT_URL","DEFAULT_SOLID_PROJECT_NAME","initFooter","_x","_x2","_initFooter","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","options","footer","pod","podOwner","wrap","_context2","prev","next","document","getElementById","abrupt","getPod","getPodOwner","sent","rebuildFooter","authSession","onLogin","onLogout","stop","_callee","user","_t","_t2","_context","authn","currentUser","innerHTML","createControllerInfoBlock","appendChild","profileLinkContainer","createElement","equals","setAttribute","podLinkPre","innerText","podLink","href","uri","profileLinkPre","profileLink","getName","solidProjectLinkPre","solidProjectLink","solidProjectUrl","solidProjectName","solidProjectLinkPost"],"sources":["../../src/footer/index.ts"],"sourcesContent":["/*\n This file was copied from mashlib/src/global/footer.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { LiveStore, NamedNode } from 'rdflib'\nimport { authn, authSession } from 'solid-logic'\nimport * as style from '../style'\nimport { getName, getPod, getPodOwner } from '../utils/headerFooterHelpers'\n\nconst DEFAULT_SOLID_PROJECT_URL = 'https://solidproject.org'\nconst DEFAULT_SOLID_PROJECT_NAME = 'solidproject.org'\n\n/*\n FooterOptions allow for customizing the link and name of the link part of the footer.\n */\nexport type FooterOptions = {\n solidProjectUrl?: string,\n solidProjectName?: string\n }\n\n/**\n * Initialize footer component, the footer object returned depends on whether the user is authenticated.\n * @param store the data store\n * @returns the footer\n */\nexport async function initFooter (store: LiveStore, options?: FooterOptions) {\n const footer = document.getElementById('PageFooter')\n if (!footer) {\n return\n }\n const pod = getPod()\n const podOwner = await getPodOwner(pod, store)\n rebuildFooter(footer, store, pod, podOwner, options)()\n authSession.onLogin(rebuildFooter(footer, store, pod, podOwner, options))\n authSession.onLogout(rebuildFooter(footer, store, pod, podOwner, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildFooter (footer: HTMLElement, store: LiveStore, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions) {\n return async () => {\n const user = authn.currentUser()\n footer.innerHTML = ''\n footer.appendChild(await createControllerInfoBlock(store, user, pod, podOwner, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createControllerInfoBlock (store: LiveStore, user: NamedNode | null, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): HTMLElement {\n const profileLinkContainer = document.createElement('div')\n if (!pod || !podOwner || (user && user.equals(podOwner))) {\n return profileLinkContainer\n }\n\n profileLinkContainer.setAttribute('style', style.footer)\n\n const podLinkPre = document.createElement('span')\n podLinkPre.innerText = \"You're visiting \"\n\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.innerText = 'the Pod'\n\n const profileLinkPre = document.createElement('span')\n profileLinkPre.innerText = ' controlled by '\n\n const profileLink = document.createElement('a')\n profileLink.href = podOwner.uri\n profileLink.innerText = getName(store, podOwner)\n\n const solidProjectLinkPre = document.createElement('span')\n solidProjectLinkPre.innerText = '. For more info, check out '\n\n const solidProjectLink = document.createElement('a')\n solidProjectLink.href = options && options.solidProjectUrl ? options.solidProjectUrl : DEFAULT_SOLID_PROJECT_URL\n solidProjectLink.innerText = options && options.solidProjectName ? options.solidProjectName : DEFAULT_SOLID_PROJECT_NAME\n\n const solidProjectLinkPost = document.createElement('span')\n solidProjectLinkPost.innerText = '.'\n\n profileLinkContainer.appendChild(podLinkPre)\n profileLinkContainer.appendChild(podLink)\n profileLinkContainer.appendChild(profileLinkPre)\n profileLinkContainer.appendChild(profileLink)\n profileLinkContainer.appendChild(solidProjectLinkPre)\n profileLinkContainer.appendChild(solidProjectLink)\n profileLinkContainer.appendChild(solidProjectLinkPost)\n\n return profileLinkContainer\n}\n"],"mappings":";;;;;;;;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AAA2E,SAAAE,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,wBAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,GAAA,IAAAd,CAAA,gBAAAc,GAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,GAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,GAAA,OAAAP,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAM,GAAA,EAAAP,CAAA,IAAAC,CAAA,CAAAM,GAAA,IAAAd,CAAA,CAAAc,GAAA,WAAAN,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAP3E;AACA;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W,CAACO,OAAO,CAAC;EACzCN,oBAAoB,CAACD,WAAW,CAACU,cAAc,CAAC;EAChDT,oBAAoB,CAACD,WAAW,CAACW,WAAW,CAAC;EAC7CV,oBAAoB,CAACD,WAAW,CAACa,mBAAmB,CAAC;EACrDZ,oBAAoB,CAACD,WAAW,CAACc,gBAAgB,CAAC;EAClDb,oBAAoB,CAACD,WAAW,CAACiB,oBAAoB,CAAC;EAEtD,OAAOhB,oBAAoB;AAC7B","ignoreList":[]}
|
package/lib/header/index.js
CHANGED
|
@@ -24,8 +24,7 @@ var widgets = _interopRequireWildcard(require("../widgets"));
|
|
|
24
24
|
var style = _interopRequireWildcard(require("../style"));
|
|
25
25
|
var _emptyProfile = require("./empty-profile");
|
|
26
26
|
var _headerFooterHelpers = require("../utils/headerFooterHelpers");
|
|
27
|
-
function
|
|
28
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t4 in e) "default" !== _t4 && {}.hasOwnProperty.call(e, _t4) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t4)) && (i.get || i.set) ? o(f, _t4, i) : f[_t4] = e[_t4]); return f; })(e, t); }
|
|
29
28
|
/* global EventListenerOrEventListenerObject */
|
|
30
29
|
/*
|
|
31
30
|
This file was copied from mashlib/src/global/header.ts file. It is modified to
|
|
@@ -60,21 +59,21 @@ function initHeader(_x, _x2, _x3) {
|
|
|
60
59
|
function _initHeader() {
|
|
61
60
|
_initHeader = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(store, userMenuList, options) {
|
|
62
61
|
var header, pod;
|
|
63
|
-
return _regenerator["default"].wrap(function
|
|
62
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
64
63
|
while (1) switch (_context2.prev = _context2.next) {
|
|
65
64
|
case 0:
|
|
66
65
|
header = document.getElementById('PageHeader');
|
|
67
66
|
if (header) {
|
|
68
|
-
_context2.next =
|
|
67
|
+
_context2.next = 1;
|
|
69
68
|
break;
|
|
70
69
|
}
|
|
71
70
|
return _context2.abrupt("return");
|
|
72
|
-
case
|
|
71
|
+
case 1:
|
|
73
72
|
pod = (0, _headerFooterHelpers.getPod)();
|
|
74
73
|
rebuildHeader(header, store, pod, userMenuList, options)();
|
|
75
74
|
_solidLogic.authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options));
|
|
76
75
|
_solidLogic.authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options));
|
|
77
|
-
case
|
|
76
|
+
case 2:
|
|
78
77
|
case "end":
|
|
79
78
|
return _context2.stop();
|
|
80
79
|
}
|
|
@@ -84,19 +83,19 @@ function _initHeader() {
|
|
|
84
83
|
}
|
|
85
84
|
function rebuildHeader(header, store, pod, userMenuList, options) {
|
|
86
85
|
return /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
87
|
-
var user;
|
|
88
|
-
return _regenerator["default"].wrap(function
|
|
86
|
+
var user, _t, _t2;
|
|
87
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
89
88
|
while (1) switch (_context.prev = _context.next) {
|
|
90
89
|
case 0:
|
|
91
90
|
user = _solidLogic.authn.currentUser();
|
|
92
91
|
header.innerHTML = '';
|
|
93
|
-
|
|
94
|
-
_context.next =
|
|
92
|
+
_t = header;
|
|
93
|
+
_context.next = 1;
|
|
95
94
|
return createBanner(store, pod, user, userMenuList, options);
|
|
96
|
-
case
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
case
|
|
95
|
+
case 1:
|
|
96
|
+
_t2 = _context.sent;
|
|
97
|
+
_t.appendChild.call(_t, _t2);
|
|
98
|
+
case 2:
|
|
100
99
|
case "end":
|
|
101
100
|
return _context.stop();
|
|
102
101
|
}
|
|
@@ -114,8 +113,8 @@ function createBanner(_x4, _x5, _x6, _x7, _x8) {
|
|
|
114
113
|
*/
|
|
115
114
|
function _createBanner() {
|
|
116
115
|
_createBanner = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(store, pod, user, userMenuList, options) {
|
|
117
|
-
var podLink, image, userMenu, banner, leftSideOfHeader, helpMenu;
|
|
118
|
-
return _regenerator["default"].wrap(function
|
|
116
|
+
var podLink, image, userMenu, banner, leftSideOfHeader, helpMenu, _t3;
|
|
117
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
119
118
|
while (1) switch (_context3.prev = _context3.next) {
|
|
120
119
|
case 0:
|
|
121
120
|
podLink = document.createElement('a');
|
|
@@ -128,19 +127,19 @@ function _createBanner() {
|
|
|
128
127
|
image.setAttribute('style', style.headerBannerIcon);
|
|
129
128
|
podLink.appendChild(image);
|
|
130
129
|
if (!user) {
|
|
131
|
-
_context3.next =
|
|
130
|
+
_context3.next = 2;
|
|
132
131
|
break;
|
|
133
132
|
}
|
|
134
|
-
_context3.next =
|
|
133
|
+
_context3.next = 1;
|
|
135
134
|
return createUserMenu(store, user, userMenuList);
|
|
136
|
-
case
|
|
137
|
-
|
|
138
|
-
_context3.next =
|
|
135
|
+
case 1:
|
|
136
|
+
_t3 = _context3.sent;
|
|
137
|
+
_context3.next = 3;
|
|
139
138
|
break;
|
|
140
|
-
case
|
|
141
|
-
|
|
142
|
-
case
|
|
143
|
-
userMenu =
|
|
139
|
+
case 2:
|
|
140
|
+
_t3 = createLoginSignUpButtons();
|
|
141
|
+
case 3:
|
|
142
|
+
userMenu = _t3;
|
|
144
143
|
banner = document.createElement('div');
|
|
145
144
|
banner.setAttribute('style', style.headerBanner);
|
|
146
145
|
banner.appendChild(podLink);
|
|
@@ -153,7 +152,7 @@ function _createBanner() {
|
|
|
153
152
|
}
|
|
154
153
|
banner.appendChild(leftSideOfHeader);
|
|
155
154
|
return _context3.abrupt("return", banner);
|
|
156
|
-
case
|
|
155
|
+
case 4:
|
|
157
156
|
case "end":
|
|
158
157
|
return _context3.stop();
|
|
159
158
|
}
|
|
@@ -257,7 +256,7 @@ function createUserMenuLink(label, href, target) {
|
|
|
257
256
|
/**
|
|
258
257
|
* @ignore exporting this only for the unit test
|
|
259
258
|
*/
|
|
260
|
-
function createUserMenu(_x9,
|
|
259
|
+
function createUserMenu(_x9, _x0, _x1) {
|
|
261
260
|
return _createUserMenu.apply(this, arguments);
|
|
262
261
|
}
|
|
263
262
|
/**
|
|
@@ -266,17 +265,17 @@ function createUserMenu(_x9, _x10, _x11) {
|
|
|
266
265
|
function _createUserMenu() {
|
|
267
266
|
_createUserMenu = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(store, user, userMenuList) {
|
|
268
267
|
var fetcher, loggedInMenuList, loggedInMenu, loggedInMenuTrigger, profileImg, loggedInMenuContainer, throttledMenuToggle, timer;
|
|
269
|
-
return _regenerator["default"].wrap(function
|
|
268
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
270
269
|
while (1) switch (_context4.prev = _context4.next) {
|
|
271
270
|
case 0:
|
|
272
271
|
fetcher = store.fetcher;
|
|
273
272
|
if (!fetcher) {
|
|
274
|
-
_context4.next =
|
|
273
|
+
_context4.next = 1;
|
|
275
274
|
break;
|
|
276
275
|
}
|
|
277
|
-
_context4.next =
|
|
276
|
+
_context4.next = 1;
|
|
278
277
|
return fetcher.load(user);
|
|
279
|
-
case
|
|
278
|
+
case 1:
|
|
280
279
|
loggedInMenuList = document.createElement('ul');
|
|
281
280
|
loggedInMenuList.setAttribute('style', style.headerUserMenuList);
|
|
282
281
|
if (userMenuList) {
|
|
@@ -328,7 +327,7 @@ function _createUserMenu() {
|
|
|
328
327
|
nav === null || nav === void 0 ? void 0 : nav.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed);
|
|
329
328
|
});
|
|
330
329
|
return _context4.abrupt("return", loggedInMenuContainer);
|
|
331
|
-
case
|
|
330
|
+
case 2:
|
|
332
331
|
case "end":
|
|
333
332
|
return _context4.stop();
|
|
334
333
|
}
|
package/lib/header/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_index","require","_solidLogic","_login","widgets","_interopRequireWildcard","style","_emptyProfile","_headerFooterHelpers","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","_x","_x2","_x3","_initHeader","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","userMenuList","options","header","pod","wrap","_callee2$","_context2","prev","next","document","getElementById","abrupt","getPod","rebuildHeader","authSession","onLogout","onLogin","stop","_callee","user","_callee$","_context","authn","currentUser","innerHTML","t0","createBanner","t1","sent","appendChild","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_callee3$","_context3","createElement","href","uri","setAttribute","headerBannerLink","src","logo","headerBannerIcon","createUserMenu","createLoginSignUpButtons","headerBanner","headerBannerRightMenu","helpMenuList","createHelpMenu","helpMenuItems","headerUserMenuList","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","headerUserMenuNavigationMenuNotDisplayed","helpMenuContainer","headerBannerUserMenu","helpMenuTrigger","headerUserMenuTrigger","type","helpMenuIcon","helpIcon","headerUserMenuTriggerImg","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","nav","headerUserMenuNavigationMenu","profileLoginButtonPre","headerBannerLogin","loginStatusBox","onClick","button","headerUserMenuButton","onmouseover","headerUserMenuButtonHover","onmouseout","innerText","link","headerUserMenuLink","headerUserMenuLinkHover","_x9","_x10","_x11","_createUserMenu","_callee4","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","loggedInMenuContainer","_callee4$","_context4","load","getProfileImg","headerBannerUserMenuNotDisplayed","child","menuProfileItem","headerUserMenuListItem","profileUrl","findImage","emptyProfile","_unused","profileImage","headerUserMenuPhoto","backgroundImage","concat","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../index'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport * as style from '../style'\nimport { emptyProfile } from './empty-profile'\nimport { getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))\n authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.setAttribute('style', style.headerBannerLink)\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n image.setAttribute('style', style.headerBannerIcon)\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n banner.setAttribute('style', style.headerBanner)\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n leftSideOfHeader.setAttribute('style', style.headerBannerRightMenu)\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n helpMenuList.setAttribute('style', style.headerUserMenuList)\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n helpMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.setAttribute('id', 'helperNav')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n helpMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n helpMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n helpMenuIcon.setAttribute('style', style.headerUserMenuTriggerImg)\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n profileLoginButtonPre.setAttribute('style', style.headerBannerLogin)\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n button.setAttribute('style', style.headerUserMenuButton)\n button.onmouseover = function () {\n button.setAttribute('style', style.headerUserMenuButtonHover)\n }\n button.onmouseout = function () {\n button.setAttribute('style', style.headerUserMenuButton)\n }\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n link.setAttribute('style', style.headerUserMenuLink)\n link.onmouseover = function () {\n link.setAttribute('style', style.headerUserMenuLinkHover)\n }\n link.onmouseout = function () {\n link.setAttribute('style', style.headerUserMenuLink)\n }\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n loggedInMenuList.setAttribute('style', style.headerUserMenuList)\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n loggedInMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.setAttribute('id', 'loggedInNav')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n loggedInMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n loggedInMenuContainer.setAttribute('style', style.headerBannerUserMenuNotDisplayed)\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n menuProfileItem.setAttribute('style', style.headerUserMenuListItem)\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n profileImage.setAttribute('style', style.headerUserMenuPhoto)\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAA+D,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAA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AC9E,YAAY,CAAC,OAAO,EAAEvF,KAAK,CAACsK,mBAAmB,CAAC;EAC7DD,YAAY,CAACrK,KAAK,CAACuK,eAAe,UAAAC,MAAA,CAAUP,UAAU,MAAG;EACzD,OAAOI,YAAY;AACrB;;AAEA;AACA;AACA;AACA,SAAS3C,UAAUA,CAAED,KAAY,EAAEgD,OAA0B,EAAEC,IAAiB,EAAQ;EACtF,IAAMC,UAAU,GAAGF,OAAO,CAACG,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;EACnE,IAAMC,MAAM,GAAGpD,KAAK,CAACN,IAAI,KAAK,WAAW;EACzC,IAAM2D,KAAK,GAAGrD,KAAK,CAACN,IAAI,KAAK,UAAU;EACvC,IAAKwD,UAAU,IAAIE,MAAM,IAAM,CAACF,UAAU,IAAIG,KAAM,EAAE;IACpD;EACF;EACAL,OAAO,CAAClF,YAAY,CAAC,eAAe,EAAE,CAAC,CAACoF,UAAU,EAAEI,QAAQ,CAAC,CAAC,CAAC;EAC/DL,IAAI,CAACnF,YAAY,CAAC,aAAa,EAAEoF,UAAU,CAACI,QAAQ,CAAC,CAAC,CAAC;AACzD","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_index","require","_solidLogic","_login","widgets","_interopRequireWildcard","style","_emptyProfile","_headerFooterHelpers","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t4","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","_x","_x2","_x3","_initHeader","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","userMenuList","options","header","pod","wrap","_context2","prev","next","document","getElementById","abrupt","getPod","rebuildHeader","authSession","onLogout","onLogin","stop","_callee","user","_t","_t2","_context","authn","currentUser","innerHTML","createBanner","sent","appendChild","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_t3","_context3","createElement","href","uri","setAttribute","headerBannerLink","src","logo","headerBannerIcon","createUserMenu","createLoginSignUpButtons","headerBanner","headerBannerRightMenu","helpMenuList","createHelpMenu","helpMenuItems","headerUserMenuList","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","headerUserMenuNavigationMenuNotDisplayed","helpMenuContainer","headerBannerUserMenu","helpMenuTrigger","headerUserMenuTrigger","type","helpMenuIcon","helpIcon","headerUserMenuTriggerImg","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","nav","headerUserMenuNavigationMenu","profileLoginButtonPre","headerBannerLogin","loginStatusBox","onClick","button","headerUserMenuButton","onmouseover","headerUserMenuButtonHover","onmouseout","innerText","link","headerUserMenuLink","headerUserMenuLinkHover","_x9","_x0","_x1","_createUserMenu","_callee4","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","loggedInMenuContainer","_context4","load","getProfileImg","headerBannerUserMenuNotDisplayed","child","menuProfileItem","headerUserMenuListItem","profileUrl","findImage","emptyProfile","_unused","profileImage","headerUserMenuPhoto","backgroundImage","concat","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../index'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport * as style from '../style'\nimport { emptyProfile } from './empty-profile'\nimport { getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))\n authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.setAttribute('style', style.headerBannerLink)\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n image.setAttribute('style', style.headerBannerIcon)\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n banner.setAttribute('style', style.headerBanner)\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n leftSideOfHeader.setAttribute('style', style.headerBannerRightMenu)\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n helpMenuList.setAttribute('style', style.headerUserMenuList)\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n helpMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.setAttribute('id', 'helperNav')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n helpMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n helpMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n helpMenuIcon.setAttribute('style', style.headerUserMenuTriggerImg)\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n profileLoginButtonPre.setAttribute('style', style.headerBannerLogin)\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n button.setAttribute('style', style.headerUserMenuButton)\n button.onmouseover = function () {\n button.setAttribute('style', style.headerUserMenuButtonHover)\n }\n button.onmouseout = function () {\n button.setAttribute('style', style.headerUserMenuButton)\n }\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n link.setAttribute('style', style.headerUserMenuLink)\n link.onmouseover = function () {\n link.setAttribute('style', style.headerUserMenuLinkHover)\n }\n link.onmouseout = function () {\n link.setAttribute('style', style.headerUserMenuLink)\n }\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n loggedInMenuList.setAttribute('style', style.headerUserMenuList)\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n loggedInMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.setAttribute('id', 'loggedInNav')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n loggedInMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n loggedInMenuContainer.setAttribute('style', style.headerBannerUserMenuNotDisplayed)\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n menuProfileItem.setAttribute('style', style.headerUserMenuListItem)\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n profileImage.setAttribute('style', style.headerUserMenuPhoto)\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAA+D,SAAAI,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,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,CAAC;EAC7DD,YAAY,CAAClK,KAAK,CAACoK,eAAe,UAAAC,MAAA,CAAUP,UAAU,MAAG;EACzD,OAAOI,YAAY;AACrB;;AAEA;AACA;AACA;AACA,SAAS1C,UAAUA,CAAED,KAAY,EAAE+C,OAA0B,EAAEC,IAAiB,EAAQ;EACtF,IAAMC,UAAU,GAAGF,OAAO,CAACG,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;EACnE,IAAMC,MAAM,GAAGnD,KAAK,CAACN,IAAI,KAAK,WAAW;EACzC,IAAM0D,KAAK,GAAGpD,KAAK,CAACN,IAAI,KAAK,UAAU;EACvC,IAAKuD,UAAU,IAAIE,MAAM,IAAM,CAACF,UAAU,IAAIG,KAAM,EAAE;IACpD;EACF;EACAL,OAAO,CAACjF,YAAY,CAAC,eAAe,EAAE,CAAC,CAACmF,UAAU,EAAEI,QAAQ,CAAC,CAAC,CAAC;EAC/DL,IAAI,CAAClF,YAAY,CAAC,aAAa,EAAEmF,UAAU,CAACI,QAAQ,CAAC,CAAC,CAAC;AACzD","ignoreList":[]}
|
package/lib/index.js
CHANGED
|
@@ -170,8 +170,7 @@ var _footer = require("./footer");
|
|
|
170
170
|
var createTypes = _interopRequireWildcard(require("./create/types"));
|
|
171
171
|
exports.createTypes = createTypes;
|
|
172
172
|
var _solidLogic = require("solid-logic");
|
|
173
|
-
function
|
|
174
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
173
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
175
174
|
// pull in first avoid cross-refs
|
|
176
175
|
// @ts-ignore
|
|
177
176
|
// @ts-ignore
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_typeof","require","Object","defineProperty","exports","value","enumerable","get","_index","acl","aclControl","_solidLogic","authn","_index2","create","dom","createTypes","_iconBase","icons","_infinite","infiniteMessageArea","_footer","initFooter","_header","initHeader","login","log","language","_index3","matrix","_index4","media","_messageArea","messageArea","rdf","preferences","participation","pad","ns","store","style","_table","renderTableViewPane","utils","tabs","_versionInfo","versionInfo","widgets","_interopRequireWildcard","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_typeof","require","Object","defineProperty","exports","value","enumerable","get","_index","acl","aclControl","_solidLogic","authn","_index2","create","dom","createTypes","_iconBase","icons","_infinite","infiniteMessageArea","_footer","initFooter","_header","initHeader","login","log","language","_index3","matrix","_index4","media","_messageArea","messageArea","rdf","preferences","participation","pad","ns","store","style","_table","renderTableViewPane","utils","tabs","_versionInfo","versionInfo","widgets","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","has","set","_t","hasOwnProperty","call","getOwnPropertyDescriptor","window","document","UI","table"],"sources":["../src/index.ts"],"sourcesContent":["/*\nThe MIT License (MIT)\n\nCopyright (c) 2015-2016 Solid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIf you would like to know more about the solid Solid project, please see\nhttps://github.com/solidos/solid\n*/\n'use strict'\n/**\n * Provides a Solid client helper object (which exposes various static modules).\n * @module solidUi.js\n * @main solidUi.js\n */\n\n/**\n * @class SolidUi\n * @static\n */\n\n// REMOVE @ts-ignore as you migrate files to TypeScript\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// @ts-ignore\nimport * as ns from './ns'\nimport { acl, aclControl } from './acl/index'\nimport { create } from './create/index'\n// @ts-ignore\nimport { icons } from './iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './pad'\n// @ts-ignore\nimport * as participation from './participation'\n// @ts-ignore\nimport * as preferences from './preferences'\n// @ts-ignore\nimport * as style from './style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './table'\nimport * as tabs from './tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as login from './login/login'\nimport * as widgets from './widgets/index'\nimport { versionInfo } from './versionInfo'\nimport { initHeader } from './header'\nimport { initFooter } from './footer'\nimport * as createTypes from './create/types'\nimport { authn, store } from 'solid-logic'\n\nconst dom = window ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\n\nif (typeof window !== 'undefined') {\n ;(<any>window).UI = {\n authn,\n store,\n ns,\n rdf,\n acl,\n aclControl,\n create,\n createTypes,\n dom,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n } // Simpler access by non-node scripts\n}\n\n// this variables are directly used in the storybook\nexport {\n authn,\n store,\n ns,\n rdf,\n acl,\n aclControl,\n create,\n createTypes,\n dom,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAH,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;EAAAC,GAAA,WAAAA,IAAA;IAAA,OAAAC,MAAA,CAAAC,GAAA;EAAA;AAAA;AAAAP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;EAAAC,GAAA,WAAAA,IAAA;IAAA,OAAAC,MAAA,CAAAE,UAAA;EAAA;AAAA;AAAAR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAE,UAAA;E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