solid-ui 2.5.1-f1fa48a2 → 2.6.0-157bdf24
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 +4 -0
- package/dist/solid-ui.js +426 -312
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.map +1 -1
- package/lib/acl/access-groups.js +2 -2
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl.js +2 -2
- package/lib/acl/acl.js.map +1 -1
- package/lib/chat/infinite.js +0 -1
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +3 -4
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/signature.d.ts.map +1 -1
- package/lib/chat/signature.js +0 -1
- package/lib/chat/signature.js.map +1 -1
- package/lib/chat/thread.js +3 -6
- package/lib/chat/thread.js.map +1 -1
- package/lib/folders.js +0 -2
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js +3 -4
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.js +11 -12
- package/lib/header/index.js.map +1 -1
- package/lib/iconBase.d.ts.map +1 -1
- package/lib/iconBase.js +0 -1
- package/lib/iconBase.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/log.d.ts +7 -7
- package/lib/log.d.ts.map +1 -1
- package/lib/log.js +2 -2
- package/lib/log.js.map +1 -1
- package/lib/login/login.js +35 -38
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/types.js.map +1 -1
- package/lib/messageArea.js +0 -2
- package/lib/messageArea.js.map +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/keyHelpers/accessData.d.ts.map +1 -1
- package/lib/utils/keyHelpers/acl.d.ts.map +1 -1
- package/lib/utils/keyHelpers/acl.js +1 -1
- package/lib/utils/keyHelpers/acl.js.map +1 -1
- package/lib/utils/keyHelpers/otherHelpers.d.ts.map +1 -1
- package/lib/versionInfo.d.ts +4 -2
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +30 -29
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.d.ts.map +1 -1
- package/lib/widgets/buttons/iconLinks.js +2 -2
- package/lib/widgets/buttons/iconLinks.js.map +1 -1
- package/lib/widgets/buttons.d.ts.map +1 -1
- package/lib/widgets/buttons.js +0 -1
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +6 -7
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +0 -1
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.js +1 -1
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms.js +1 -2
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js.map +1 -1
- package/lib/widgets/widgetHelpers.d.ts.map +1 -1
- package/lib/widgets/widgetHelpers.js +3 -3
- package/lib/widgets/widgetHelpers.js.map +1 -1
- package/package.json +57 -57
package/lib/folders.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 = '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E,CAACrB,OAAO,CAACkE,YAAY,CAAChB,GAAG,CAAC,CAAC;EACnEe,MAAM,CAACE,gBAAgB,CACrB,OAAO,EACP,UAAUC,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":[]}
|
|
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 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 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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,CAAChB,GAAG,CAAC,CAAC;EACnEe,MAAM,CAACE,gBAAgB,CACrB,OAAO,EACP,UAAUC,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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/footer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAW7C,MAAM,MAAM,aAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/footer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAW7C,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,iBAU1E;AACD;;GAEG;AACH,wBAAgB,aAAa,CAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,uBAM/I;AACD;;GAEG;AACH,wBAAgB,yBAAyB,CAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW,CAyC5K"}
|
package/lib/footer/index.js
CHANGED
|
@@ -13,7 +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 _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
|
|
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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
17
17
|
/*
|
|
18
18
|
This file was copied from mashlib/src/global/footer.ts file. It is modified to
|
|
19
19
|
work in solid-ui by adjusting where imported functions are found.
|
|
@@ -67,7 +67,7 @@ function _initFooter() {
|
|
|
67
67
|
}
|
|
68
68
|
function rebuildFooter(footer, store, pod, podOwner, options) {
|
|
69
69
|
return /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
70
|
-
var user, _t
|
|
70
|
+
var user, _t;
|
|
71
71
|
return _regenerator["default"].wrap(function (_context) {
|
|
72
72
|
while (1) switch (_context.prev = _context.next) {
|
|
73
73
|
case 0:
|
|
@@ -77,8 +77,7 @@ function rebuildFooter(footer, store, pod, podOwner, options) {
|
|
|
77
77
|
_context.next = 1;
|
|
78
78
|
return createControllerInfoBlock(store, user, pod, podOwner, options);
|
|
79
79
|
case 1:
|
|
80
|
-
|
|
81
|
-
_t.appendChild.call(_t, _t2);
|
|
80
|
+
_t.appendChild.call(_t, _context.sent);
|
|
82
81
|
case 2:
|
|
83
82
|
case "end":
|
|
84
83
|
return _context.stop();
|
package/lib/footer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","
|
|
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","_t2","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","_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(solidPro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ACa,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,7 +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 _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
|
|
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 _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); }
|
|
28
28
|
/* global EventListenerOrEventListenerObject */
|
|
29
29
|
/*
|
|
30
30
|
This file was copied from mashlib/src/global/header.ts file. It is modified to
|
|
@@ -83,7 +83,7 @@ function _initHeader() {
|
|
|
83
83
|
}
|
|
84
84
|
function rebuildHeader(header, store, pod, userMenuList, options) {
|
|
85
85
|
return /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
86
|
-
var user, _t
|
|
86
|
+
var user, _t;
|
|
87
87
|
return _regenerator["default"].wrap(function (_context) {
|
|
88
88
|
while (1) switch (_context.prev = _context.next) {
|
|
89
89
|
case 0:
|
|
@@ -93,8 +93,7 @@ function rebuildHeader(header, store, pod, userMenuList, options) {
|
|
|
93
93
|
_context.next = 1;
|
|
94
94
|
return createBanner(store, pod, user, userMenuList, options);
|
|
95
95
|
case 1:
|
|
96
|
-
|
|
97
|
-
_t.appendChild.call(_t, _t2);
|
|
96
|
+
_t.appendChild.call(_t, _context.sent);
|
|
98
97
|
case 2:
|
|
99
98
|
case "end":
|
|
100
99
|
return _context.stop();
|
|
@@ -113,7 +112,7 @@ function createBanner(_x4, _x5, _x6, _x7, _x8) {
|
|
|
113
112
|
*/
|
|
114
113
|
function _createBanner() {
|
|
115
114
|
_createBanner = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(store, pod, user, userMenuList, options) {
|
|
116
|
-
var podLink, image, userMenu, banner, leftSideOfHeader, helpMenu,
|
|
115
|
+
var podLink, image, userMenu, banner, leftSideOfHeader, helpMenu, _t2;
|
|
117
116
|
return _regenerator["default"].wrap(function (_context3) {
|
|
118
117
|
while (1) switch (_context3.prev = _context3.next) {
|
|
119
118
|
case 0:
|
|
@@ -133,13 +132,13 @@ function _createBanner() {
|
|
|
133
132
|
_context3.next = 1;
|
|
134
133
|
return createUserMenu(store, user, userMenuList);
|
|
135
134
|
case 1:
|
|
136
|
-
|
|
135
|
+
_t2 = _context3.sent;
|
|
137
136
|
_context3.next = 3;
|
|
138
137
|
break;
|
|
139
138
|
case 2:
|
|
140
|
-
|
|
139
|
+
_t2 = createLoginSignUpButtons();
|
|
141
140
|
case 3:
|
|
142
|
-
userMenu =
|
|
141
|
+
userMenu = _t2;
|
|
143
142
|
banner = document.createElement('div');
|
|
144
143
|
banner.setAttribute('style', style.headerBanner);
|
|
145
144
|
banner.appendChild(podLink);
|
|
@@ -199,14 +198,14 @@ function createHelpMenu(options, helpMenuItems) {
|
|
|
199
198
|
clearTimeout(timer);
|
|
200
199
|
throttledMenuToggle(event);
|
|
201
200
|
var nav = document.getElementById('helperNav');
|
|
202
|
-
nav === null || nav === void 0
|
|
201
|
+
nav === null || nav === void 0 || nav.setAttribute('style', style.headerUserMenuNavigationMenu);
|
|
203
202
|
});
|
|
204
203
|
helpMenuContainer.addEventListener('mouseout', function (event) {
|
|
205
204
|
timer = setTimeout(function () {
|
|
206
205
|
return throttledMenuToggle(event);
|
|
207
206
|
}, 200);
|
|
208
207
|
var nav = document.getElementById('helperNav');
|
|
209
|
-
nav === null || nav === void 0
|
|
208
|
+
nav === null || nav === void 0 || nav.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed);
|
|
210
209
|
});
|
|
211
210
|
return helpMenuContainer;
|
|
212
211
|
}
|
|
@@ -317,14 +316,14 @@ function _createUserMenu() {
|
|
|
317
316
|
clearTimeout(timer);
|
|
318
317
|
throttledMenuToggle(event);
|
|
319
318
|
var nav = document.getElementById('loggedInNav');
|
|
320
|
-
nav === null || nav === void 0
|
|
319
|
+
nav === null || nav === void 0 || nav.setAttribute('style', style.headerUserMenuNavigationMenu);
|
|
321
320
|
});
|
|
322
321
|
loggedInMenuContainer.addEventListener('mouseout', function (event) {
|
|
323
322
|
timer = setTimeout(function () {
|
|
324
323
|
return throttledMenuToggle(event);
|
|
325
324
|
}, 200);
|
|
326
325
|
var nav = document.getElementById('loggedInNav');
|
|
327
|
-
nav === null || nav === void 0
|
|
326
|
+
nav === null || nav === void 0 || nav.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed);
|
|
328
327
|
});
|
|
329
328
|
return _context4.abrupt("return", loggedInMenuContainer);
|
|
330
329
|
case 2:
|
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","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":";;;;;;;;;;;;;;;;;;;AAM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AOC,eAAe;AACxB;AACA;AACA;AACA;AACO,SAASH,aAAaA,CAAEnH,KAAqB,EAAEmB,IAAe,EAAwB;EAC3F,IAAIqG,UAAU,GAAG,IAAI;EACrB,IAAI;IACFA,UAAU,GAAGhK,OAAO,CAACiK,SAAS,CAACtG,IAAI,CAAC;IACpC,IAAI,CAACqG,UAAU,EAAE;MACf,OAAOE,0BAAY;IACrB;EACF,CAAC,CAAC,OAAAC,OAAA,EAAM;IACN,OAAOD,0BAAY;EACrB;EAEA,IAAME,YAAY,GAAGnH,QAAQ,CAACmC,aAAa,CAAC,KAAK,CAAC;EAClDgF,YAAY,CAAC7E,YAAY,CAAC,OAAO,EAAErF,KAAK,CAACmK,mBAAmB,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":[]}
|
|
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","_t3","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","_context","authn","currentUser","innerHTML","createBanner","appendChild","sent","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_t2","_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,OAA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Ae,EAAwB;EAC3F,IAAIoG,UAAU,GAAG,IAAI;EACrB,IAAI;IACFA,UAAU,GAAG/J,OAAO,CAACgK,SAAS,CAACrG,IAAI,CAAC;IACpC,IAAI,CAACoG,UAAU,EAAE;MACf,OAAOE,0BAAY;IACrB;EACF,CAAC,CAAC,OAAAC,OAAA,EAAM;IACN,OAAOD,0BAAY;EACrB;EAEA,IAAME,YAAY,GAAGlH,QAAQ,CAACkC,aAAa,CAAC,KAAK,CAAC;EAClDgF,YAAY,CAAC7E,YAAY,CAAC,OAAO,EAAEpF,KAAK,CAACkK,mBAAmB,CAAC;EAC7DD,YAAY,CAACjK,KAAK,CAACmK,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/iconBase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconBase.d.ts","sourceRoot":"","sources":["../src/iconBase.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"iconBase.d.ts","sourceRoot":"","sources":["../src/iconBase.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,KAAK;;;CAiBX,CAAA;AAKP,eAAO,MAAM,QAAQ,KAAiB,CAAA;AACtC,eAAO,MAAM,gBAAgB,KAAyB,CAAA"}
|
package/lib/iconBase.js
CHANGED
|
@@ -19,7 +19,6 @@ var _debug = require("./debug");
|
|
|
19
19
|
* You can also use it if you want to just run a mashlib whhich takes its
|
|
20
20
|
* icons seved by other than github.
|
|
21
21
|
*/
|
|
22
|
-
/* eslint-disable multiline-ternary */
|
|
23
22
|
|
|
24
23
|
// Do not export. Always us this module to find the icons, as they vary
|
|
25
24
|
var iconsOnGithub = 'https://solidos.github.io/solid-ui/src'; // changed org 2022-05
|
package/lib/iconBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconBase.js","names":["_debug","require","iconsOnGithub","icons","exports","module","scriptURI","iconBase","slice","lastIndexOf","originalIconBase","$SolidTestEnvironment","log"],"sources":["../src/iconBase.ts"],"sourcesContent":["// Works in FF extension - what about browserify??\n// 2021-04-08 Convert to TS\n\n/* The Firefox case is left for historical record, as we don't currenly\n * have a FF extension for mashlib, but we could. This is sthepoint to\n * hack the place it can find its icons internally\n *\n * The $SolidTestEnvironment is important and is used for\n * example when testing on localhost to specify a place the icons be found\n * in your test set up.\n *\n * You can also use it if you want to just run a mashlib whhich takes its\n * icons seved by other than github.\n */\n
|
|
1
|
+
{"version":3,"file":"iconBase.js","names":["_debug","require","iconsOnGithub","icons","exports","module","scriptURI","iconBase","slice","lastIndexOf","originalIconBase","$SolidTestEnvironment","log"],"sources":["../src/iconBase.ts"],"sourcesContent":["// Works in FF extension - what about browserify??\n// 2021-04-08 Convert to TS\n\n/* The Firefox case is left for historical record, as we don't currenly\n * have a FF extension for mashlib, but we could. This is sthepoint to\n * hack the place it can find its icons internally\n *\n * The $SolidTestEnvironment is important and is used for\n * example when testing on localhost to specify a place the icons be found\n * in your test set up.\n *\n * You can also use it if you want to just run a mashlib whhich takes its\n * icons seved by other than github.\n */\n\nimport { log } from './debug'\n\ndeclare let $SolidTestEnvironment\n\n// Do not export. Always us this module to find the icons, as they vary\nconst iconsOnGithub = 'https://solidos.github.io/solid-ui/src' // changed org 2022-05\n\nexport const icons = (module as any).scriptURI // Firefox extension\n ? {\n iconBase:\n (module as any).scriptURI.slice(0, (module as any).scriptURI.lastIndexOf('/')) + '/icons/',\n originalIconBase:\n (module as any).scriptURI.slice(0, (module as any).scriptURI.lastIndexOf('/')) +\n '/originalIcons/'\n }\n : typeof $SolidTestEnvironment !== 'undefined' && $SolidTestEnvironment.iconBase // Test environemnt\n ? {\n iconBase: $SolidTestEnvironment.iconBase,\n originalIconBase: $SolidTestEnvironment.originalIconBase\n }\n : {\n // Normal case:\n iconBase: iconsOnGithub + '/icons/',\n originalIconBase: iconsOnGithub + '/originalIcons/'\n }\n\nlog(' icons.iconBase is set to : ' + icons.iconBase)\n\n// allow tests etc named-import this directly from this module\nexport const iconBase = icons.iconBase\nexport const originalIconBase = icons.originalIconBase\n"],"mappings":";;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA;AAfA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA,IAAMC,aAAa,GAAG,wCAAwC,EAAC;;AAExD,IAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAIE,MAAM,CAASC,SAAS,CAAC;AAAA,EAC3C;EACEC,QAAQ,EACLF,MAAM,CAASC,SAAS,CAACE,KAAK,CAAC,CAAC,EAAGH,MAAM,CAASC,SAAS,CAACG,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;EAC5FC,gBAAgB,EACbL,MAAM,CAASC,SAAS,CAACE,KAAK,CAAC,CAAC,EAAGH,MAAM,CAASC,SAAS,CAACG,WAAW,CAAC,GAAG,CAAC,CAAC,GAC9E;AACJ,CAAC,GACD,OAAOE,qBAAqB,KAAK,WAAW,IAAIA,qBAAqB,CAACJ,QAAQ,CAAC;AAAA,EAC7E;EACEA,QAAQ,EAAEI,qBAAqB,CAACJ,QAAQ;EACxCG,gBAAgB,EAAEC,qBAAqB,CAACD;AAC1C,CAAC,GACD;EACA;EACEH,QAAQ,EAAEL,aAAa,GAAG,SAAS;EACnCQ,gBAAgB,EAAER,aAAa,GAAG;AACpC,CAAC;AAEP,IAAAU,UAAG,EAAC,gCAAgC,GAAGT,KAAK,CAACI,QAAQ,CAAC;;AAEtD;AACO,IAAMA,QAAQ,GAAAH,OAAA,CAAAG,QAAA,GAAGJ,KAAK,CAACI,QAAQ;AAC/B,IAAMG,gBAAgB,GAAAN,OAAA,CAAAM,gBAAA,GAAGP,KAAK,CAACO,gBAAgB","ignoreList":[]}
|
package/lib/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ import * as tabs from './tabs';
|
|
|
27
27
|
import * as utils from './utils';
|
|
28
28
|
import * as login from './login/login';
|
|
29
29
|
import * as widgets from './widgets/index';
|
|
30
|
-
import
|
|
30
|
+
import versionInfo from './versionInfo';
|
|
31
31
|
import { initHeader } from './header';
|
|
32
32
|
import { initFooter } from './footer';
|
|
33
33
|
import * as createTypes from './create/types';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AAEH;;;GAGG;AAGH,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAE7B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAA;AACjE,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,gBA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ErD,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAE5B,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAA;AAEhD,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAEhC,OAAO,EAAE,mBAAmB,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAE9B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE1C,QAAA,MAAM,GAAG,iBAAkC,CAAA;AAoC3C,OAAO,EACL,KAAK,EACL,KAAK,EACL,EAAE,EACF,GAAG,EACH,GAAG,EACH,UAAU,EACV,MAAM,EACN,WAAW,EACX,GAAG,EACH,KAAK,EACL,QAAQ,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,KAAK,EACL,WAAW,EACX,mBAAmB,EACnB,GAAG,EACH,aAAa,EACb,WAAW,EACX,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,OAAO,EACP,WAAW,EACX,UAAU,EACV,UAAU,EACX,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -38,6 +38,7 @@ https://github.com/solidos/solid
|
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
40
|
// REMOVE @ts-ignore as you migrate files to TypeScript
|
|
41
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
41
42
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
42
43
|
Object.defineProperty(exports, "__esModule", {
|
|
43
44
|
value: true
|
|
@@ -128,7 +129,7 @@ exports.utils = exports.tabs = void 0;
|
|
|
128
129
|
Object.defineProperty(exports, "versionInfo", {
|
|
129
130
|
enumerable: true,
|
|
130
131
|
get: function get() {
|
|
131
|
-
return _versionInfo
|
|
132
|
+
return _versionInfo["default"];
|
|
132
133
|
}
|
|
133
134
|
});
|
|
134
135
|
exports.widgets = void 0;
|
|
@@ -164,7 +165,7 @@ var login = _interopRequireWildcard(require("./login/login"));
|
|
|
164
165
|
exports.login = login;
|
|
165
166
|
var widgets = _interopRequireWildcard(require("./widgets/index"));
|
|
166
167
|
exports.widgets = widgets;
|
|
167
|
-
var _versionInfo = require("./versionInfo");
|
|
168
|
+
var _versionInfo = _interopRequireDefault(require("./versionInfo"));
|
|
168
169
|
var _header = require("./header");
|
|
169
170
|
var _footer = require("./footer");
|
|
170
171
|
var createTypes = _interopRequireWildcard(require("./create/types"));
|
|
@@ -212,7 +213,7 @@ if (typeof window !== 'undefined') {
|
|
|
212
213
|
tabs: tabs,
|
|
213
214
|
utils: utils,
|
|
214
215
|
widgets: widgets,
|
|
215
|
-
versionInfo: _versionInfo
|
|
216
|
+
versionInfo: _versionInfo["default"],
|
|
216
217
|
initHeader: _header.initHeader,
|
|
217
218
|
initFooter: _footer.initFooter
|
|
218
219
|
}; // Simpler access by non-node scripts
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_interopRequireDefault","require","_typeof","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","widgets","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","has","set","_t","hasOwnProperty","call","getOwnPropertyDescriptor","window","document","UI","table","versionInfo"],"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,sBAAA,GAAAC,OAAA;AAAA,IAAAC,OAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAH,MAAA,CAAAC,cAAA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AEE,EAAE,GAAG;IAClBtD,KAAK,EAALA,iBAAK;IACL2B,KAAK,EAALA,iBAAK;IACLD,EAAE,EAAFA,EAAE;IACFJ,GAAG,EAAHA,GAAG;IACHzB,GAAG,EAAHA,UAAG;IACHC,UAAU,EAAVA,iBAAU;IACVI,MAAM,EAANA,cAAM;IACNE,WAAW,EAAXA,WAAW;IACXD,GAAG,EAAHA,GAAG;IACHG,KAAK,EAALA,eAAK;IACLS,QAAQ,EAARA,QAAQ;IACRD,GAAG,EAAHA,GAAG;IACHD,KAAK,EAALA,KAAK;IACLI,MAAM,EAANA,cAAM;IACNE,KAAK,EAALA,aAAK;IACLE,WAAW,EAAXA,wBAAW;IACXb,mBAAmB,EAAnBA,6BAAmB;IACnBiB,GAAG,EAAHA,GAAG;IACHD,aAAa,EAAbA,aAAa;IACbD,WAAW,EAAXA,WAAW;IACXK,KAAK,EAALA,KAAK;IACL2B,KAAK,EAALA,0BAAK;IACLvB,IAAI,EAAJA,IAAI;IACJD,KAAK,EAALA,KAAK;IACLG,OAAO,EAAPA,OAAO;IACPsB,WAAW,EAAXA,uBAAW;IACX5C,UAAU,EAAVA,kBAAU;IACVF,UAAU,EAAVA;EACF,CAAC,EAAC;AACJ;;AAEA","ignoreList":[]}
|
package/lib/log.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** @internal */
|
|
2
2
|
export declare enum LogLevel {
|
|
3
|
-
Error,
|
|
4
|
-
Warning,
|
|
5
|
-
Message,
|
|
6
|
-
Success,
|
|
7
|
-
Info,
|
|
8
|
-
Debug,
|
|
9
|
-
All
|
|
3
|
+
Error = 1,
|
|
4
|
+
Warning = 2,
|
|
5
|
+
Message = 4,
|
|
6
|
+
Success = 8,
|
|
7
|
+
Info = 16,
|
|
8
|
+
Debug = 32,
|
|
9
|
+
All = 63
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Adds a message to the element with id "status". The messages are prepended with
|
package/lib/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAmBA,gBAAgB;AAChB,oBAAY,QAAQ;IAClB,
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAmBA,gBAAgB;AAChB,oBAAY,QAAQ;IAClB,KAAK,IAAS;IACd,OAAO,IAAQ;IACf,OAAO,IAAQ;IACf,OAAO,IAAW;IAClB,IAAI,KAAQ;IACZ,KAAK,KAAS;IACd,GAAG,KAAO;CACX;AAkCD;;;GAGG;AACH,wBAAgB,GAAG,CAAE,OAAO,EAAE,MAAM,QAEnC;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE5C;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE5C;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAM5C;AAED;;GAEG;AACH,wBAAgB,KAAK,IAAK,IAAI,CAI7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAI7C;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAK,IAAI,CAMhC;AAED;;GAEG;AACH,wBAAgB,YAAY,SAE3B;AAED;;;GAGG;AACH,wBAAgB,aAAa,SAE5B;AAED,gBAAgB;AAChB,wBAAgB,YAAY,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,gBAAgB;AAChB,wBAAgB,YAAY,CAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,QAG7C"}
|
package/lib/log.js
CHANGED
|
@@ -176,11 +176,11 @@ function setLevel(level) {
|
|
|
176
176
|
* Will dump the current HTML using the [[debug]] method.
|
|
177
177
|
*/
|
|
178
178
|
function dumpHTML() {
|
|
179
|
-
var _dom3
|
|
179
|
+
var _dom3;
|
|
180
180
|
if (!_dom) return;
|
|
181
181
|
var level = _level;
|
|
182
182
|
_level = TALL;
|
|
183
|
-
debug(((_dom3 = _dom) === null || _dom3 === void 0
|
|
183
|
+
debug(((_dom3 = _dom) === null || _dom3 === void 0 || (_dom3 = _dom3.body) === null || _dom3 === void 0 ? void 0 : _dom3.innerHTML) || '');
|
|
184
184
|
_level = level;
|
|
185
185
|
}
|
|
186
186
|
|