solid-ui 2.4.22-efbe9e52 → 2.4.22-f2d918a8
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/main.js +8347 -8258
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.js +14 -9
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js +15 -10
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js +13 -9
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js +11 -7
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js +18 -13
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/chat/bookmarks.js +21 -18
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +15 -9
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +17 -12
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +37 -29
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +14 -14
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +23 -10
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +9 -4
- package/lib/chat/thread.js.map +1 -1
- package/lib/footer/index.js +10 -8
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.js +17 -9
- package/lib/header/index.js.map +1 -1
- package/lib/iconBase.js +3 -2
- package/lib/iconBase.js.map +1 -1
- package/lib/login/login.d.ts +9 -8
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +303 -313
- package/lib/login/login.js.map +1 -1
- package/lib/media/media-capture.js +20 -4
- package/lib/media/media-capture.js.map +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +21 -18
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js +7 -5
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.d.ts +9 -9
- package/lib/versionInfo.js +14 -14
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/error.d.ts +0 -12
- package/lib/widgets/error.d.ts.map +1 -1
- package/lib/widgets/error.js +5 -0
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +15 -17
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +8 -5
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +19 -21
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +15 -8
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +27 -22
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms.js +335 -28
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +7 -5
package/lib/chat/thread.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread.js","names":["UI","icons","ns","media","pad","style","utils","widgets","thread","dom","kb","subject","messageStore","options","store","doc","WF","$rdf","Namespace","DCT","newestFirst","messageBodyStyle","div","createElement","messageTable","me","updater","anchor","text","term","a","uri","setAttribute","addEventListener","openHrefInOutlineMode","textContent","mention","message","pre","appendChild","createTextNode","announce","log","warn","error","newMessageForm","form","lhs","middle","rhs","AJAR_date","sendMessage","field","disabled","appendMsg","value","dateStamp","sts","sendComplete","success","body","errorMessageBlock","bindings","literal","renderMessage","update","sendButton","turnOnInput","creatorAndDate","innerHTML","rows","e","keyCode","altKey","button","iconBase","buttonStyle","context","login","ensureLoggedIn","then","fieldValue","oldMsg","now","Date","timestamp","getTime","sym","push","Statement","mostRecentVersion","wf","msgBody","nick","sioc","foaf","person","s","any","label","td1","creator","date","nickAnchor","fetcher","nowOrWhenFetched","undefined","_ok","_body","syncMessages","about","displayed","ele","ele2","firstChild","nextSibling","AJAR_subject","messages","each","stored","forEach","m","addMessage","removeChild","msg","statementsMatching","_deleteMessage","connectedStatements","deletions","ok","fresh","content","dateString","tr","done","insertBefore","shortDate","td2","td3","delButton","_event","cancelButton","sureButton","query","Query","v","vs","x","vars","variable","pat","add","dct","doneQuery","refresh"],"sources":["../../src/chat/thread.js"],"sourcesContent":["/**\n * Contains the [[thread]] function\n * @packageDocumentation\n */\n\nimport { icons } from '../iconBase'\nimport { store } from 'solid-logic'\nimport { media } from '../media/index'\nimport * as ns from '../ns'\nimport * as login from '../login/login'\nimport * as pad from '../pad'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as style from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst UI = { icons, ns, media, pad, style, utils, widgets }\n\n/**\n * HTML component for a chat thread\n */\nexport function thread (dom, kb, subject, messageStore, options) {\n kb = kb || store\n messageStore = messageStore.doc() // No hash\n const ns = UI.ns\n const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')\n const DCT = $rdf.Namespace('http://purl.org/dc/terms/')\n\n options = options || {}\n\n const newestFirst = !!options.newestFirst\n\n const messageBodyStyle =\n 'white-space: pre-wrap; width: 90%; font-size:100%; border: 0.07em solid #eee; padding: .2em 0.5em; margin: 0.1em 1em 0.1em 1em;'\n // 'font-size: 100%; margin: 0.1em 1em 0.1em 1em; background-color: white; white-space: pre-wrap; padding: 0.1em;'\n\n const div = dom.createElement('div')\n // eslint-disable-next-line prefer-const\n let messageTable // Shared by initial build and addMessageFromBindings\n\n let me\n\n const updater = store.updater\n\n const anchor = function (text, term) {\n // If there is no link return an element anyway\n const a = dom.createElement('a')\n if (term && term.uri) {\n a.setAttribute('href', term.uri)\n a.addEventListener('click', UI.widgets.openHrefInOutlineMode, true)\n a.setAttribute('style', 'color: #3B5998; text-decoration: none; ') // font-weight: bold\n }\n a.textContent = text\n return a\n }\n\n const mention = function mention (message, style) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', style || 'color: grey')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n return pre\n }\n\n const announce = {\n log: function (message) {\n mention(message, 'color: #111;')\n },\n warn: function (message) {\n mention(message, 'color: #880;')\n },\n error: function (message) {\n mention(message, 'color: #800;')\n }\n }\n\n /**\n * Form for a new message\n */\n const newMessageForm = function () {\n const form = dom.createElement('tr')\n const lhs = dom.createElement('td')\n const middle = dom.createElement('td')\n const rhs = dom.createElement('td')\n form.appendChild(lhs)\n form.appendChild(middle)\n form.appendChild(rhs)\n form.AJAR_date = '9999-01-01T00:00:00Z' // ISO format for field sort\n\n const sendMessage = function () {\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const { message, dateStamp, sts } = appendMsg(field.value)\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n }\n form.appendChild(dom.createElement('br'))\n\n let field, sendButton\n const turnOnInput = function () {\n creatorAndDate(lhs, me, '', null)\n\n field = dom.createElement('textarea')\n middle.innerHTML = ''\n middle.appendChild(field)\n field.rows = 3\n // field.cols = 40\n field.setAttribute('style', messageBodyStyle + 'background-color: #eef;')\n\n field.addEventListener(\n 'keyup',\n function (e) {\n // User preference?\n if (e.keyCode === 13) {\n if (!e.altKey) {\n // Alt-Enter just adds a new line\n sendMessage()\n }\n }\n },\n false\n )\n\n rhs.innerHTML = ''\n sendButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + 'noun_383448.svg',\n 'Send'\n )\n sendButton.setAttribute('style', UI.style.buttonStyle + 'float: right;')\n sendButton.addEventListener('click', sendMessage, false)\n rhs.appendChild(sendButton)\n }\n\n const context = { div: middle, dom }\n login.ensureLoggedIn(context).then(context => {\n me = context.me\n turnOnInput()\n })\n\n return form\n }\n\n /* const sendMessage = function (oldMsg, options) { // alain\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? field.value : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n } */\n\n const appendMsg = function (fieldValue, oldMsg = {}, options = '') { // alain\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? fieldValue : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n return { message, dateStamp, sts }\n }\n\n function nick (person) {\n const s = store.any(person, UI.ns.foaf('nick'))\n if (s) return '' + s.value\n return '' + utils.label(person)\n }\n\n function creatorAndDate (td1, creator, date, message) {\n const nickAnchor = td1.appendChild(anchor(nick(creator), creator))\n if (creator.uri) {\n store.fetcher.nowOrWhenFetched(creator.doc(), undefined, function (\n _ok,\n _body\n ) {\n nickAnchor.textContent = nick(creator)\n })\n }\n td1.appendChild(dom.createElement('br'))\n td1.appendChild(anchor(date, message))\n }\n\n // ///////////////////////////////////////////////////////////////////////\n\n function syncMessages (about, messageTable) {\n const displayed = {}\n let ele, ele2\n for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {\n if (ele.AJAR_subject) {\n displayed[ele.AJAR_subject.uri] = true\n }\n }\n const messages = store.each(about, ns.wf('message'))\n const stored = {}\n messages.forEach(function (m) {\n stored[m.uri] = true\n if (!displayed[m.uri]) {\n addMessage(m)\n }\n })\n\n // eslint-disable-next-line space-in-parens\n for (ele = messageTable.firstChild; ele; ) {\n ele2 = ele.nextSibling\n if (ele.AJAR_subject && !stored[ele.AJAR_subject.uri]) {\n messageTable.removeChild(ele)\n }\n ele = ele2\n }\n }\n\n const mostRecentVersion = function (message) {\n let msg = message\n // const listMsg = []\n while (msg) {\n // listMsg.push(msg)\n msg = store.statementsMatching(message, DCT('isReplacedBy'))\n }\n return msg\n }\n\n const _deleteMessage = async function (message) { // alain: must delete message and all linked with isReplacedBy\n // alain: check that me is not the author and ask for confirmation.\n const deletions = await store.connectedStatements(message, messageStore)\n updater.update(deletions, [], function (uri, ok, body) {\n if (!ok) {\n announce.error('Cant delete messages:' + body)\n } else {\n syncMessages(subject, messageTable)\n }\n })\n }\n\n const addMessage = function (message) {\n const bindings = {\n '?msg': message,\n '?creator': store.any(message, ns.foaf('maker')),\n '?date': store.any(message, DCT('created')),\n '?content': store.any(message, ns.sioc('content'))\n }\n renderMessage(bindings, true) // fresh from elsewhere\n }\n\n const renderMessage = function (bindings, fresh) {\n const creator = bindings['?creator']\n const message = bindings['?msg']\n const date = bindings['?date']\n const content = bindings['?content']\n\n const dateString = date.value\n const tr = dom.createElement('tr')\n tr.AJAR_date = dateString\n tr.AJAR_subject = message\n\n let done = false\n for (let ele = messageTable.firstChild; ; ele = ele.nextSibling) {\n if (!ele) {\n // empty\n break\n }\n if (\n (dateString > ele.AJAR_date && newestFirst) ||\n (dateString < ele.AJAR_date && !newestFirst)\n ) {\n messageTable.insertBefore(tr, ele)\n done = true\n break\n }\n }\n if (!done) {\n messageTable.appendChild(tr)\n }\n\n const td1 = dom.createElement('td')\n tr.appendChild(td1)\n creatorAndDate(td1, creator, UI.widgets.shortDate(dateString), message)\n\n const td2 = dom.createElement('td')\n tr.appendChild(td2)\n const pre = dom.createElement('p')\n pre.setAttribute(\n 'style',\n messageBodyStyle +\n (fresh ? 'background-color: #e8ffe8;' : 'background-color: #white;')\n )\n td2.appendChild(pre)\n pre.textContent = content.value\n\n const td3 = dom.createElement('td')\n tr.appendChild(td3)\n\n const delButton = dom.createElement('button')\n td3.appendChild(delButton)\n delButton.textContent = '-'\n\n tr.setAttribute('class', 'hoverControl') // See tabbedtab.css (sigh global CSS)\n delButton.setAttribute('class', 'hoverControlHide')\n delButton.setAttribute('style', 'color: red;')\n delButton.addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(delButton) // Ask -- are you sure?\n const cancelButton = dom.createElement('button')\n cancelButton.textContent = 'cancel'\n td3.appendChild(cancelButton).addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n td3.appendChild(delButton)\n },\n false\n )\n const sureButton = dom.createElement('button')\n sureButton.textContent = 'Delete message'\n td3.appendChild(sureButton).addEventListener(\n 'click',\n function (_event) { // alain test for delete or edit depending on me = maker\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n // deleteMessage(message) // alain or sendMessage(message, 'delete' or 'edit') //alain\n if (me.value === store.any(message, ns.foaf('maker')).value) {\n const { sts } = appendMsg() // alain\n updater.update([], sts)\n }\n },\n false\n )\n },\n false\n )\n }\n\n // Messages with date, author etc\n\n messageTable = dom.createElement('table')\n messageTable.fresh = false\n div.appendChild(messageTable)\n messageTable.setAttribute('style', 'width: 100%;') // fill that div!\n\n const tr = newMessageForm()\n if (newestFirst) {\n messageTable.insertBefore(tr, messageTable.firstChild) // If newestFirst\n } else {\n messageTable.appendChild(tr) // not newestFirst\n }\n\n let query\n // Do this with a live query to pull in messages from web\n if (options.query) {\n query = options.query\n } else {\n query = new $rdf.Query('Messages')\n const v = {} // semicolon needed\n const vs = ['msg', 'date', 'creator', 'content']\n vs.forEach(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n })\n query.pat.add(subject, WF('message'), v.msg)\n query.pat.add(v.msg, ns.dct('created'), v.date)\n query.pat.add(v.msg, ns.foaf('maker'), v.creator)\n query.pat.add(v.msg, ns.sioc('content'), v.content)\n }\n\n function doneQuery () {\n messageTable.fresh = true // any new are fresh and so will be greenish\n }\n store.query(query, renderMessage, undefined, doneQuery)\n div.refresh = function () {\n syncMessages(subject, messageTable)\n }\n // syncMessages(subject, messageTable) // no the query will do this async\n return div\n}\n"],"mappings":";;;;;;;;;;;;;AAKA;;AACA;;AACA;;AAC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ACO,GAAN,CAAUC,GAAV,CAAcN,CAAC,CAACrB,GAAhB,EAAqB1H,EAAE,CAACsJ,GAAH,CAAO,SAAP,CAArB,EAAwCP,CAAC,CAAC3C,IAA1C;IACAyC,KAAK,CAACO,GAAN,CAAUC,GAAV,CAAcN,CAAC,CAACrB,GAAhB,EAAqB1H,EAAE,CAAC6F,IAAH,CAAQ,OAAR,CAArB,EAAuCkD,CAAC,CAAC5C,OAAzC;IACA0C,KAAK,CAACO,GAAN,CAAUC,GAAV,CAAcN,CAAC,CAACrB,GAAhB,EAAqB1H,EAAE,CAAC4F,IAAH,CAAQ,SAAR,CAArB,EAAyCmD,CAAC,CAACd,OAA3C;EACD;;EAED,SAASsB,SAAT,GAAsB;IACpBjI,YAAY,CAAC0G,KAAb,GAAqB,IAArB,CADoB,CACM;EAC3B;;EACDpH,iBAAA,CAAMiI,KAAN,CAAYA,KAAZ,EAAmB/E,aAAnB,EAAkC0C,SAAlC,EAA6C+C,SAA7C;;EACAnI,GAAG,CAACoI,OAAJ,GAAc,YAAY;IACxB7C,YAAY,CAAClG,OAAD,EAAUa,YAAV,CAAZ;EACD,CAFD,CAjc+D,CAoc/D;;;EACA,OAAOF,GAAP;AACD"}
|
|
1
|
+
{"version":3,"file":"thread.js","names":["UI","icons","ns","media","pad","style","utils","widgets","thread","dom","kb","subject","messageStore","options","store","doc","WF","$rdf","Namespace","DCT","newestFirst","messageBodyStyle","div","createElement","messageTable","me","updater","anchor","text","term","a","uri","setAttribute","addEventListener","openHrefInOutlineMode","textContent","mention","message","pre","appendChild","createTextNode","announce","log","warn","error","newMessageForm","form","lhs","middle","rhs","AJAR_date","sendMessage","field","disabled","appendMsg","value","dateStamp","sts","sendComplete","success","body","errorMessageBlock","bindings","literal","renderMessage","update","sendButton","turnOnInput","creatorAndDate","innerHTML","rows","e","keyCode","altKey","button","iconBase","buttonStyle","context","login","ensureLoggedIn","then","fieldValue","oldMsg","now","Date","timestamp","getTime","sym","push","Statement","mostRecentVersion","wf","msgBody","nick","sioc","foaf","person","s","any","label","td1","creator","date","nickAnchor","fetcher","nowOrWhenFetched","undefined","_ok","_body","syncMessages","about","displayed","ele","ele2","firstChild","nextSibling","AJAR_subject","messages","each","stored","forEach","m","addMessage","removeChild","msg","statementsMatching","_deleteMessage","connectedStatements","deletions","ok","fresh","content","dateString","tr","done","insertBefore","shortDate","td2","td3","delButton","_event","cancelButton","sureButton","query","Query","v","vs","x","vars","variable","pat","add","dct","doneQuery","refresh"],"sources":["../../src/chat/thread.js"],"sourcesContent":["/**\n * Contains the [[thread]] function\n * @packageDocumentation\n */\n\nimport { icons } from '../iconBase'\nimport { store } from 'solid-logic'\nimport { media } from '../media/index'\nimport * as ns from '../ns'\nimport * as login from '../login/login'\nimport * as pad from '../pad'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as style from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst UI = { icons, ns, media, pad, style, utils, widgets }\n\n/**\n * HTML component for a chat thread\n */\nexport function thread (dom, kb, subject, messageStore, options) {\n kb = kb || store\n messageStore = messageStore.doc() // No hash\n const ns = UI.ns\n const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')\n const DCT = $rdf.Namespace('http://purl.org/dc/terms/')\n\n options = options || {}\n\n const newestFirst = !!options.newestFirst\n\n const messageBodyStyle =\n 'white-space: pre-wrap; width: 90%; font-size:100%; border: 0.07em solid #eee; padding: .2em 0.5em; margin: 0.1em 1em 0.1em 1em;'\n // 'font-size: 100%; margin: 0.1em 1em 0.1em 1em; background-color: white; white-space: pre-wrap; padding: 0.1em;'\n\n const div = dom.createElement('div')\n // eslint-disable-next-line prefer-const\n let messageTable // Shared by initial build and addMessageFromBindings\n\n let me\n\n const updater = store.updater\n\n const anchor = function (text, term) {\n // If there is no link return an element anyway\n const a = dom.createElement('a')\n if (term && term.uri) {\n a.setAttribute('href', term.uri)\n a.addEventListener('click', UI.widgets.openHrefInOutlineMode, true)\n a.setAttribute('style', 'color: #3B5998; text-decoration: none; ') // font-weight: bold\n }\n a.textContent = text\n return a\n }\n\n const mention = function mention (message, style) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', style || 'color: grey')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n return pre\n }\n\n const announce = {\n log: function (message) {\n mention(message, 'color: #111;')\n },\n warn: function (message) {\n mention(message, 'color: #880;')\n },\n error: function (message) {\n mention(message, 'color: #800;')\n }\n }\n\n /**\n * Form for a new message\n */\n const newMessageForm = function () {\n const form = dom.createElement('tr')\n const lhs = dom.createElement('td')\n const middle = dom.createElement('td')\n const rhs = dom.createElement('td')\n form.appendChild(lhs)\n form.appendChild(middle)\n form.appendChild(rhs)\n form.AJAR_date = '9999-01-01T00:00:00Z' // ISO format for field sort\n\n const sendMessage = function () {\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const { message, dateStamp, sts } = appendMsg(field.value)\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n }\n form.appendChild(dom.createElement('br'))\n\n let field, sendButton\n const turnOnInput = function () {\n creatorAndDate(lhs, me, '', null)\n\n field = dom.createElement('textarea')\n middle.innerHTML = ''\n middle.appendChild(field)\n field.rows = 3\n // field.cols = 40\n field.setAttribute('style', messageBodyStyle + 'background-color: #eef;')\n\n field.addEventListener(\n 'keyup',\n function (e) {\n // User preference?\n if (e.keyCode === 13) {\n if (!e.altKey) {\n // Alt-Enter just adds a new line\n sendMessage()\n }\n }\n },\n false\n )\n\n rhs.innerHTML = ''\n sendButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + 'noun_383448.svg',\n 'Send'\n )\n sendButton.setAttribute('style', UI.style.buttonStyle + 'float: right;')\n sendButton.addEventListener('click', sendMessage, false)\n rhs.appendChild(sendButton)\n }\n\n const context = { div: middle, dom }\n login.ensureLoggedIn(context).then(context => {\n me = context.me\n turnOnInput()\n })\n\n return form\n }\n\n /* const sendMessage = function (oldMsg, options) { // alain\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? field.value : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n } */\n\n const appendMsg = function (fieldValue, oldMsg = {}, options = '') { // alain\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? fieldValue : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n return { message, dateStamp, sts }\n }\n\n function nick (person) {\n const s = store.any(person, UI.ns.foaf('nick'))\n if (s) return '' + s.value\n return '' + utils.label(person)\n }\n\n function creatorAndDate (td1, creator, date, message) {\n const nickAnchor = td1.appendChild(anchor(nick(creator), creator))\n if (creator.uri) {\n store.fetcher.nowOrWhenFetched(creator.doc(), undefined, function (\n _ok,\n _body\n ) {\n nickAnchor.textContent = nick(creator)\n })\n }\n td1.appendChild(dom.createElement('br'))\n td1.appendChild(anchor(date, message))\n }\n\n // ///////////////////////////////////////////////////////////////////////\n\n function syncMessages (about, messageTable) {\n const displayed = {}\n let ele, ele2\n for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {\n if (ele.AJAR_subject) {\n displayed[ele.AJAR_subject.uri] = true\n }\n }\n const messages = store.each(about, ns.wf('message'))\n const stored = {}\n messages.forEach(function (m) {\n stored[m.uri] = true\n if (!displayed[m.uri]) {\n addMessage(m)\n }\n })\n\n // eslint-disable-next-line space-in-parens\n for (ele = messageTable.firstChild; ele; ) {\n ele2 = ele.nextSibling\n if (ele.AJAR_subject && !stored[ele.AJAR_subject.uri]) {\n messageTable.removeChild(ele)\n }\n ele = ele2\n }\n }\n\n const mostRecentVersion = function (message) {\n let msg = message\n // const listMsg = []\n while (msg) {\n // listMsg.push(msg)\n msg = store.statementsMatching(message, DCT('isReplacedBy'))\n }\n return msg\n }\n\n const _deleteMessage = async function (message) { // alain: must delete message and all linked with isReplacedBy\n // alain: check that me is not the author and ask for confirmation.\n const deletions = await store.connectedStatements(message, messageStore)\n updater.update(deletions, [], function (uri, ok, body) {\n if (!ok) {\n announce.error('Cant delete messages:' + body)\n } else {\n syncMessages(subject, messageTable)\n }\n })\n }\n\n const addMessage = function (message) {\n const bindings = {\n '?msg': message,\n '?creator': store.any(message, ns.foaf('maker')),\n '?date': store.any(message, DCT('created')),\n '?content': store.any(message, ns.sioc('content'))\n }\n renderMessage(bindings, true) // fresh from elsewhere\n }\n\n const renderMessage = function (bindings, fresh) {\n const creator = bindings['?creator']\n const message = bindings['?msg']\n const date = bindings['?date']\n const content = bindings['?content']\n\n const dateString = date.value\n const tr = dom.createElement('tr')\n tr.AJAR_date = dateString\n tr.AJAR_subject = message\n\n let done = false\n for (let ele = messageTable.firstChild; ; ele = ele.nextSibling) {\n if (!ele) {\n // empty\n break\n }\n if (\n (dateString > ele.AJAR_date && newestFirst) ||\n (dateString < ele.AJAR_date && !newestFirst)\n ) {\n messageTable.insertBefore(tr, ele)\n done = true\n break\n }\n }\n if (!done) {\n messageTable.appendChild(tr)\n }\n\n const td1 = dom.createElement('td')\n tr.appendChild(td1)\n creatorAndDate(td1, creator, UI.widgets.shortDate(dateString), message)\n\n const td2 = dom.createElement('td')\n tr.appendChild(td2)\n const pre = dom.createElement('p')\n pre.setAttribute(\n 'style',\n messageBodyStyle +\n (fresh ? 'background-color: #e8ffe8;' : 'background-color: #white;')\n )\n td2.appendChild(pre)\n pre.textContent = content.value\n\n const td3 = dom.createElement('td')\n tr.appendChild(td3)\n\n const delButton = dom.createElement('button')\n td3.appendChild(delButton)\n delButton.textContent = '-'\n\n tr.setAttribute('class', 'hoverControl') // See tabbedtab.css (sigh global CSS)\n delButton.setAttribute('class', 'hoverControlHide')\n delButton.setAttribute('style', 'color: red;')\n delButton.addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(delButton) // Ask -- are you sure?\n const cancelButton = dom.createElement('button')\n cancelButton.textContent = 'cancel'\n td3.appendChild(cancelButton).addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n td3.appendChild(delButton)\n },\n false\n )\n const sureButton = dom.createElement('button')\n sureButton.textContent = 'Delete message'\n td3.appendChild(sureButton).addEventListener(\n 'click',\n function (_event) { // alain test for delete or edit depending on me = maker\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n // deleteMessage(message) // alain or sendMessage(message, 'delete' or 'edit') //alain\n if (me.value === store.any(message, ns.foaf('maker')).value) {\n const { sts } = appendMsg() // alain\n updater.update([], sts)\n }\n },\n false\n )\n },\n false\n )\n }\n\n // Messages with date, author etc\n\n messageTable = dom.createElement('table')\n messageTable.fresh = false\n div.appendChild(messageTable)\n messageTable.setAttribute('style', 'width: 100%;') // fill that div!\n\n const tr = newMessageForm()\n if (newestFirst) {\n messageTable.insertBefore(tr, messageTable.firstChild) // If newestFirst\n } else {\n messageTable.appendChild(tr) // not newestFirst\n }\n\n let query\n // Do this with a live query to pull in messages from web\n if (options.query) {\n query = options.query\n } else {\n query = new $rdf.Query('Messages')\n const v = {} // semicolon needed\n const vs = ['msg', 'date', 'creator', 'content']\n vs.forEach(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n })\n query.pat.add(subject, WF('message'), v.msg)\n query.pat.add(v.msg, ns.dct('created'), v.date)\n query.pat.add(v.msg, ns.foaf('maker'), v.creator)\n query.pat.add(v.msg, ns.sioc('content'), v.content)\n }\n\n function doneQuery () {\n messageTable.fresh = true // any new are fresh and so will be greenish\n }\n store.query(query, renderMessage, undefined, doneQuery)\n div.refresh = function () {\n syncMessages(subject, messageTable)\n }\n // syncMessages(subject, messageTable) // no the query will do this async\n return div\n}\n"],"mappings":";;;;;;;;;;;;;;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAdA;AACA;AACA;AACA;AAQ+B;AAK/B,IAAMA,EAAE,GAAG;EAAEC,KAAK,EAALA,eAAF;EAASC,EAAE,EAAFA,EAAT;EAAaC,KAAK,EAALA,YAAb;EAAoBC,GAAG,EAAHA,GAApB;EAAyBC,KAAK,EAALA,KAAzB;EAAgCC,KAAK,EAALA,KAAhC;EAAuCC,OAAO,EAAPA;AAAvC,CAAX;AAEA;AACA;AACA;;AACO,SAASC,MAAT,CAAiBC,GAAjB,EAAsBC,EAAtB,EAA0BC,OAA1B,EAAmCC,YAAnC,EAAiDC,OAAjD,EAA0D;EAC/DH,EAAE,GAAGA,EAAE,IAAII,iBAAX;EACAF,YAAY,GAAGA,YAAY,CAACG,GAAb,EAAf,CAF+D,CAE7B;;EAClC,IAAMb,EAAE,GAAGF,EAAE,CAACE,EAAd;EACA,IAAMc,EAAE,GAAGC,IAAI,CAACC,SAAL,CAAe,oCAAf,CAAX;EACA,IAAMC,GAAG,GAAGF,IAAI,CAACC,SAAL,CAAe,2BAAf,CAAZ;EAEAL,OAAO,GAAGA,OAAO,IAAI,EAArB;EAEA,IAAMO,WAAW,GAAG,CAAC,CAACP,OAAO,CAACO,WAA9B;EAEA,IAAMC,gBAAgB,GACpB,iIADF,CAX+D,CAa/D;;EAEA,IAAMC,GAAG,GAAGb,GAAG,CAACc,aAAJ,CAAkB,KAAlB,CAAZ,CAf+D,CAgB/D;;EACA,IAAIC,YAAJ,CAjB+D,CAiB9C;;EAEjB,IAAIC,EAAJ;EAEA,IAAMC,OAAO,GAAGZ,iBAAA,CAAMY,OAAtB;;EAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAUC,IAAV,EAAgBC,IAAhB,EAAsB;IACnC;IACA,IAAMC,CAAC,GAAGrB,GAAG,CAACc,a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,CAAUC,GAAV,CAAc5I,OAAd,EAAuBK,EAAE,CAAC,SAAD,CAAzB,EAAsCiI,CAAC,CAACrB,GAAxC;IACAmB,KAAK,CAACO,GAAN,CAAUC,GAAV,CAAcN,CAAC,CAACrB,GAAhB,EAAqB1H,EAAE,CAACsJ,GAAH,CAAO,SAAP,CAArB,EAAwCP,CAAC,CAAC3C,IAA1C;IACAyC,KAAK,CAACO,GAAN,CAAUC,GAAV,CAAcN,CAAC,CAACrB,GAAhB,EAAqB1H,EAAE,CAAC6F,IAAH,CAAQ,OAAR,CAArB,EAAuCkD,CAAC,CAAC5C,OAAzC;IACA0C,KAAK,CAACO,GAAN,CAAUC,GAAV,CAAcN,CAAC,CAACrB,GAAhB,EAAqB1H,EAAE,CAAC4F,IAAH,CAAQ,SAAR,CAArB,EAAyCmD,CAAC,CAACd,OAA3C;EACD;;EAED,SAASsB,SAAT,GAAsB;IACpBjI,YAAY,CAAC0G,KAAb,GAAqB,IAArB,CADoB,CACM;EAC3B;;EACDpH,iBAAA,CAAMiI,KAAN,CAAYA,KAAZ,EAAmB/E,aAAnB,EAAkC0C,SAAlC,EAA6C+C,SAA7C;;EACAnI,GAAG,CAACoI,OAAJ,GAAc,YAAY;IACxB7C,YAAY,CAAClG,OAAD,EAAUa,YAAV,CAAZ;EACD,CAFD,CAjc+D,CAoc/D;;;EACA,OAAOF,GAAP;AACD"}
|
package/lib/footer/index.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -11,14 +9,18 @@ exports.createControllerInfoBlock = createControllerInfoBlock;
|
|
|
11
9
|
exports.initFooter = initFooter;
|
|
12
10
|
exports.rebuildFooter = rebuildFooter;
|
|
13
11
|
|
|
12
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
+
|
|
14
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
15
|
|
|
16
16
|
var _solidLogic = require("solid-logic");
|
|
17
17
|
|
|
18
18
|
var _headerFooterHelpers = require("../utils/headerFooterHelpers");
|
|
19
19
|
|
|
20
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
21
|
-
|
|
20
|
+
/*
|
|
21
|
+
This file was copied from mashlib/src/global/footer.ts file. It is modified to
|
|
22
|
+
work in solid-ui by adjusting where imported functions are found.
|
|
23
|
+
*/
|
|
22
24
|
var DEFAULT_SOLID_PROJECT_URL = 'https://solidproject.org';
|
|
23
25
|
var DEFAULT_SOLID_PROJECT_NAME = 'solidproject.org';
|
|
24
26
|
/*
|
|
@@ -39,9 +41,9 @@ function initFooter(_x, _x2) {
|
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
function _initFooter() {
|
|
42
|
-
_initFooter = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
44
|
+
_initFooter = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(store, options) {
|
|
43
45
|
var footer, pod, podOwner;
|
|
44
|
-
return
|
|
46
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
45
47
|
while (1) {
|
|
46
48
|
switch (_context2.prev = _context2.next) {
|
|
47
49
|
case 0:
|
|
@@ -78,9 +80,9 @@ function _initFooter() {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
function rebuildFooter(footer, store, pod, podOwner, options) {
|
|
81
|
-
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
83
|
+
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
82
84
|
var user;
|
|
83
|
-
return
|
|
85
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
84
86
|
while (1) {
|
|
85
87
|
switch (_context.prev = _context.next) {
|
|
86
88
|
case 0:
|
package/lib/footer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DEFAULT_SOLID_PROJECT_URL","DEFAULT_SOLID_PROJECT_NAME","initFooter","store","options","footer","document","getElementById","pod","getPod","getPodOwner","podOwner","rebuildFooter","authSession","onLogin","onLogout","user","authn","currentUser","innerHTML","createControllerInfoBlock","appendChild","profileLinkContainer","createElement","equals","addStyleClassToElement","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 { addStyleClassToElement, 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 addStyleClassToElement(profileLinkContainer, ['footer-pod-info', 'footer'], '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;;AACA
|
|
1
|
+
{"version":3,"file":"index.js","names":["DEFAULT_SOLID_PROJECT_URL","DEFAULT_SOLID_PROJECT_NAME","initFooter","store","options","footer","document","getElementById","pod","getPod","getPodOwner","podOwner","rebuildFooter","authSession","onLogin","onLogout","user","authn","currentUser","innerHTML","createControllerInfoBlock","appendChild","profileLinkContainer","createElement","equals","addStyleClassToElement","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 { addStyleClassToElement, 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 addStyleClassToElement(profileLinkContainer, ['footer-pod-info', 'footer'], '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;;AACA;;AANA;AACA;AACA;AACA;AAKA,IAAMA,yBAAyB,GAAG,0BAAlC;AACA,IAAMC,0BAA0B,GAAG,kBAAnC;AAEA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;SACsBC,U;;;AAWtB;AACA;AACA;;;;8FAbO,kBAA2BC,KAA3B,EAA6CC,OAA7C;IAAA;IAAA;MAAA;QAAA;UAAA;YACCC,MADD,GACUC,QAAQ,CAACC,cAAT,CAAwB,YAAxB,CADV;;YAAA,IAEAF,MAFA;cAAA;cAAA;YAAA;;YAAA;;UAAA;YAKCG,GALD,GAKO,IAAAC,2BAAA,GALP;YAAA;YAAA,OAMkB,IAAAC,gCAAA,EAAYF,GAAZ,EAAiBL,KAAjB,CANlB;;UAAA;YAMCQ,QAND;YAOLC,aAAa,CAACP,MAAD,EAASF,KAAT,EAAgBK,GAAhB,EAAqBG,QAArB,EAA+BP,OAA/B,CAAb;;YACAS,uBAAA,CAAYC,OAAZ,CAAoBF,aAAa,CAACP,MAAD,EAASF,KAAT,EAAgBK,GAAhB,EAAqBG,QAArB,EAA+BP,OAA/B,CAAjC;;YACAS,uBAAA,CA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,OAAOhB,oBAAP;AACD"}
|
package/lib/header/index.js
CHANGED
|
@@ -18,6 +18,8 @@ exports.getProfileImg = getProfileImg;
|
|
|
18
18
|
exports.initHeader = initHeader;
|
|
19
19
|
exports.rebuildHeader = rebuildHeader;
|
|
20
20
|
|
|
21
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
22
|
+
|
|
21
23
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
22
24
|
|
|
23
25
|
var _index = require("../index");
|
|
@@ -36,7 +38,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
36
38
|
|
|
37
39
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
38
40
|
|
|
39
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
41
|
+
/* global EventListenerOrEventListenerObject */
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
This file was copied from mashlib/src/global/header.ts file. It is modified to
|
|
45
|
+
work in solid-ui by adjusting where imported functions are found.
|
|
46
|
+
*/
|
|
47
|
+
// import { loginStatusBox, authSession, currentUser } from '../authn/authn'
|
|
40
48
|
|
|
41
49
|
/**
|
|
42
50
|
* menu icons
|
|
@@ -60,9 +68,9 @@ function initHeader(_x, _x2, _x3) {
|
|
|
60
68
|
|
|
61
69
|
|
|
62
70
|
function _initHeader() {
|
|
63
|
-
_initHeader = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
71
|
+
_initHeader = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(store, userMenuList, options) {
|
|
64
72
|
var header, pod;
|
|
65
|
-
return
|
|
73
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
66
74
|
while (1) {
|
|
67
75
|
switch (_context2.prev = _context2.next) {
|
|
68
76
|
case 0:
|
|
@@ -94,9 +102,9 @@ function _initHeader() {
|
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
function rebuildHeader(header, store, pod, userMenuList, options) {
|
|
97
|
-
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
105
|
+
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
98
106
|
var user;
|
|
99
|
-
return
|
|
107
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
100
108
|
while (1) {
|
|
101
109
|
switch (_context.prev = _context.next) {
|
|
102
110
|
case 0:
|
|
@@ -133,9 +141,9 @@ function createBanner(_x4, _x5, _x6, _x7, _x8) {
|
|
|
133
141
|
|
|
134
142
|
|
|
135
143
|
function _createBanner() {
|
|
136
|
-
_createBanner = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
144
|
+
_createBanner = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(store, pod, user, userMenuList, options) {
|
|
137
145
|
var podLink, image, userMenu, banner, leftSideOfHeader, helpMenu;
|
|
138
|
-
return
|
|
146
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
139
147
|
while (1) {
|
|
140
148
|
switch (_context3.prev = _context3.next) {
|
|
141
149
|
case 0:
|
|
@@ -291,9 +299,9 @@ function createUserMenu(_x9, _x10, _x11) {
|
|
|
291
299
|
|
|
292
300
|
|
|
293
301
|
function _createUserMenu() {
|
|
294
|
-
_createUserMenu = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
302
|
+
_createUserMenu = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(store, user, userMenuList) {
|
|
295
303
|
var fetcher, loggedInMenuList, loggedInMenu, loggedInMenuTrigger, profileImg, loggedInMenuContainer, throttledMenuToggle, timer;
|
|
296
|
-
return
|
|
304
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
297
305
|
while (1) {
|
|
298
306
|
switch (_context4.prev = _context4.next) {
|
|
299
307
|
case 0:
|
package/lib/header/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","store","userMenuList","options","header","document","getElementById","pod","getPod","rebuildHeader","authSession","onLogout","onLogin","user","authn","currentUser","innerHTML","createBanner","appendChild","podLink","createElement","href","uri","addStyleClassToElement","image","src","logo","createUserMenu","createLoginSignUpButtons","userMenu","banner","leftSideOfHeader","helpMenuList","helpMenu","createHelpMenu","helpMenuItems","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","setAttribute","helpMenuContainer","helpMenuTrigger","type","helpMenuIcon","helpIcon","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","profileLoginButtonPre","loginStatusBox","onClick","button","innerText","link","fetcher","load","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","getProfileImg","loggedInMenuContainer","child","menuProfileItem","profileUrl","widgets","findImage","emptyProfile","profileImage","style","backgroundImage","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 { emptyProfile } from './empty-profile'\nimport { addStyleClassToElement, 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 addStyleClassToElement(podLink, ['header-banner__link'])\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n addStyleClassToElement(image, ['header-banner__icon'])\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 addStyleClassToElement(banner, ['header-banner'])\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n addStyleClassToElement(leftSideOfHeader, ['header-banner__right-menu'])\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 addStyleClassToElement(helpMenuList, ['header-user-menu__list'])\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 addStyleClassToElement(helpMenu, ['header-user-menu__navigation-menu'])\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n addStyleClassToElement(helpMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(helpMenuContainer, ['header-user-menu'])\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n addStyleClassToElement(helpMenuTrigger, ['header-user-menu__trigger'])\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 addStyleClassToElement(helpMenuIcon, ['header-banner__help-icon'])\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 })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\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 addStyleClassToElement(profileLoginButtonPre, ['header-banner__login'])\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 addStyleClassToElement(button, ['header-user-menu__button'])\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 addStyleClassToElement(link, ['header-user-menu__link'])\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 addStyleClassToElement(loggedInMenuList, ['header-user-menu__list'])\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 addStyleClassToElement(loggedInMenu, ['header-user-menu__navigation-menu'])\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n addStyleClassToElement(loggedInMenuTrigger, ['header-user-menu__trigger'])\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 addStyleClassToElement(loggedInMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(loggedInMenuContainer, ['header-user-menu'])\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 })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\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 addStyleClassToElement(menuProfileItem, ['header-user-menu__list-item'])\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 addStyleClassToElement(profileImage, ['header-user-menu__photo'])\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;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;+CAXA,oJ;;AAaA;AACA;AACA;AACA,IAAMA,sBAAsB,GAAGC,YAAA,CAAMC,QAAN,GAAiB,eAAhD;AACA,IAAMC,qBAAqB,GAAG,sDAA9B;;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;SACsBC,U;;;AAWtB;AACA;AACA;;;;4FAbO,kBAA2BC,KAA3B,EAAkDC,YAAlD,EAA6EC,OAA7E;IAAA;IAAA;MAAA;QAAA;UAAA;YACCC,MADD,GACUC,QAAQ,CAACC,cAAT,CAAwB,YAAxB,CADV;;YAAA,IAEAF,MAFA;cAAA;cAAA;YAAA;;YAAA;;UAAA;YAMCG,GAND,GAMO,IAAAC,2BAAA,GANP;YAOLC,aAAa,CAACL,MAAD,EAASH,KAAT,EAAgBM,GAAhB,EAAqBL,YAArB,EAAmCC,OAAnC,CAAb;;YACAO,uBAAA,CAAYC,QAAZ,CAAqBF,aAAa,CAACL,MAAD,EAASH,KAAT,EAAgBM,GAAhB,EAAqBL,YAArB,EAAmCC,OAAnC,CAAlC;;YACAO,uBAAA,CAAYE,OAAZ,CAAoBH,aAAa,CAACL,MAAD,EAASH,KAAT,EAAgBM,GAAhB,EAAqBL,YAArB,EAAmCC,OAAnC,CAAjC;;UATK;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C;;;;AAcA,SAASM,aAA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,eAAnB,iBAA4CN,UAA5C;EACA,OAAOI,YAAP;AACD;AAED;AACA;AACA;;;AACA,SAASzB,UAAT,CAAqBD,KAArB,EAAmC6B,OAAnC,EAA+DC,IAA/D,EAAwF;EACtF,IAAMC,UAAU,GAAGF,OAAO,CAACG,YAAR,CAAqB,eAArB,MAA0C,MAA7D;EACA,IAAMC,MAAM,GAAGjC,KAAK,CAACL,IAAN,KAAe,WAA9B;EACA,IAAMuC,KAAK,GAAGlC,KAAK,CAACL,IAAN,KAAe,UAA7B;;EACA,IAAKoC,UAAU,IAAIE,MAAf,IAA2B,CAACF,UAAD,IAAeG,KAA9C,EAAsD;IACpD;EACD;;EACDL,OAAO,CAACrC,YAAR,CAAqB,eAArB,EAAsC,CAAC,CAACuC,UAAF,EAAcI,QAAd,EAAtC;EACAL,IAAI,CAACtC,YAAL,CAAkB,aAAlB,EAAiCuC,UAAU,CAACI,QAAX,EAAjC;AACD"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","store","userMenuList","options","header","document","getElementById","pod","getPod","rebuildHeader","authSession","onLogout","onLogin","user","authn","currentUser","innerHTML","createBanner","appendChild","podLink","createElement","href","uri","addStyleClassToElement","image","src","logo","createUserMenu","createLoginSignUpButtons","userMenu","banner","leftSideOfHeader","helpMenuList","helpMenu","createHelpMenu","helpMenuItems","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","setAttribute","helpMenuContainer","helpMenuTrigger","type","helpMenuIcon","helpIcon","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","profileLoginButtonPre","loginStatusBox","onClick","button","innerText","link","fetcher","load","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","getProfileImg","loggedInMenuContainer","child","menuProfileItem","profileUrl","widgets","findImage","emptyProfile","profileImage","style","backgroundImage","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 { emptyProfile } from './empty-profile'\nimport { addStyleClassToElement, 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 addStyleClassToElement(podLink, ['header-banner__link'])\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n addStyleClassToElement(image, ['header-banner__icon'])\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 addStyleClassToElement(banner, ['header-banner'])\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n addStyleClassToElement(leftSideOfHeader, ['header-banner__right-menu'])\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 addStyleClassToElement(helpMenuList, ['header-user-menu__list'])\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 addStyleClassToElement(helpMenu, ['header-user-menu__navigation-menu'])\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n addStyleClassToElement(helpMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(helpMenuContainer, ['header-user-menu'])\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n addStyleClassToElement(helpMenuTrigger, ['header-user-menu__trigger'])\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 addStyleClassToElement(helpMenuIcon, ['header-banner__help-icon'])\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 })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\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 addStyleClassToElement(profileLoginButtonPre, ['header-banner__login'])\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 addStyleClassToElement(button, ['header-user-menu__button'])\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 addStyleClassToElement(link, ['header-user-menu__link'])\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 addStyleClassToElement(loggedInMenuList, ['header-user-menu__list'])\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 addStyleClassToElement(loggedInMenu, ['header-user-menu__navigation-menu'])\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n addStyleClassToElement(loggedInMenuTrigger, ['header-user-menu__trigger'])\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 addStyleClassToElement(loggedInMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(loggedInMenuContainer, ['header-user-menu'])\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 })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\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 addStyleClassToElement(menuProfileItem, ['header-user-menu__list-item'])\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 addStyleClassToElement(profileImage, ['header-user-menu__photo'])\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;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAZA;;AACA;AACA;AACA;AACA;AAKA;;AAKA;AACA;AACA;AACA,IAAMA,sBAAsB,GAAGC,YAAA,CAAMC,QAAN,GAAiB,eAAhD;AACA,IAAMC,qBAAqB,GAAG,sDAA9B;;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;SACsBC,U;;;AAWtB;AACA;AACA;;;;8FAbO,kBAA2BC,KAA3B,EAAkDC,YAAlD,EAA6EC,OAA7E;IAAA;IAAA;MAAA;QAAA;UAAA;YACCC,MADD,GACUC,QAAQ,CAACC,cAAT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AAe,CAACzD,WAAhB,CAA4BwD,KAA5B;EACA,OAAOC,eAAP;AACD;AACD;AACA;AACA;;;AACO,SAASH,aAAT,CAAwBvE,KAAxB,EAA+CY,IAA/C,EAAsF;EAC3F,IAAI+D,UAAU,GAAG,IAAjB;;EACA,IAAI;IACFA,UAAU,GAAGC,OAAO,CAACC,SAAR,CAAkBjE,IAAlB,CAAb;;IACA,IAAI,CAAC+D,UAAL,EAAiB;MACf,OAAOG,0BAAP;IACD;EACF,CALD,CAKE,gBAAM;IACN,OAAOA,0BAAP;EACD;;EAED,IAAMC,YAAY,GAAG3E,QAAQ,CAACe,aAAT,CAAuB,KAAvB,CAArB;EACA,IAAAG,2CAAA,EAAuByD,YAAvB,EAAqC,CAAC,yBAAD,CAArC;EACAA,YAAY,CAACC,KAAb,CAAmBC,eAAnB,iBAA4CN,UAA5C;EACA,OAAOI,YAAP;AACD;AAED;AACA;AACA;;;AACA,SAASzB,UAAT,CAAqBD,KAArB,EAAmC6B,OAAnC,EAA+DC,IAA/D,EAAwF;EACtF,IAAMC,UAAU,GAAGF,OAAO,CAACG,YAAR,CAAqB,eAArB,MAA0C,MAA7D;EACA,IAAMC,MAAM,GAAGjC,KAAK,CAACL,IAAN,KAAe,WAA9B;EACA,IAAMuC,KAAK,GAAGlC,KAAK,CAACL,IAAN,KAAe,UAA7B;;EACA,IAAKoC,UAAU,IAAIE,MAAf,IAA2B,CAACF,UAAD,IAAeG,KAA9C,EAAsD;IACpD;EACD;;EACDL,OAAO,CAACrC,YAAR,CAAqB,eAArB,EAAsC,CAAC,CAACuC,UAAF,EAAcI,QAAd,EAAtC;EACAL,IAAI,CAACtC,YAAL,CAAkB,aAAlB,EAAiCuC,UAAU,CAACI,QAAX,EAAjC;AACD"}
|
package/lib/iconBase.js
CHANGED
|
@@ -23,8 +23,9 @@ var _debug = require("./debug");
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/* eslint-disable multiline-ternary */
|
|
26
|
-
// Do not export.
|
|
27
|
-
var iconsOnGithub = 'https://solidos.github.io/solid-ui/src';
|
|
26
|
+
// Do not export. Always us this module to find the icons, as they vary
|
|
27
|
+
var iconsOnGithub = 'https://solidos.github.io/solid-ui/src'; // changed org 2022-05
|
|
28
|
+
|
|
28
29
|
var icons = module.scriptURI // Firefox extension
|
|
29
30
|
? {
|
|
30
31
|
iconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf('/')) + '/icons/',
|
package/lib/iconBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconBase.js","names":["iconsOnGithub","icons","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/* eslint-disable multiline-ternary */\n\nimport { log } from './debug'\n\ndeclare let $SolidTestEnvironment\n\n// Do not export.
|
|
1
|
+
{"version":3,"file":"iconBase.js","names":["iconsOnGithub","icons","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/* eslint-disable multiline-ternary */\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":";;;;;;;AAgBA;;AAhBA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAMA;AACA,IAAMA,aAAa,GAAG,wCAAtB,C,CAA+D;;AAExD,IAAMC,KAAK,GAAIC,MAAD,CAAgBC,SAAhB,CAA0B;AAA1B,EACjB;EACEC,QAAQ,EACLF,MAAD,CAAgBC,SAAhB,CAA0BE,KAA1B,CAAgC,CAAhC,EAAoCH,MAAD,CAAgBC,SAAhB,CAA0BG,WAA1B,CAAsC,GAAtC,CAAnC,IAAiF,SAFrF;EAGEC,gBAAgB,EACbL,MAAD,CAAgBC,SAAhB,CAA0BE,KAA1B,CAAgC,CAAhC,EAAoCH,MAAD,CAAgBC,SAAhB,CAA0BG,WAA1B,CAAsC,GAAtC,CAAnC,IACA;AALJ,CADiB,GAQjB,OAAOE,qBAAP,KAAiC,WAAjC,IAAgDA,qBAAqB,CAACJ,QAAtE,CAA+E;AAA/E,EACE;EACEA,QAAQ,EAAEI,qBAAqB,CAACJ,QADlC;EAEEG,gBAAgB,EAAEC,qBAAqB,CAACD;AAF1C,CADF,GAKE;EACA;EACEH,QAAQ,EAAEJ,aAAa,GAAG,SAF5B;EAGEO,gBAAgB,EAAEP,aAAa,GAAG;AAHpC,CAbC;;AAmBP,IAAAS,UAAA,EAAI,mCAAmCR,KAAK,CAACG,QAA7C,E,CAEA;;AACO,IAAMA,QAAQ,GAAGH,KAAK,CAACG,QAAvB;;AACA,IAAMG,gBAAgB,GAAGN,KAAK,CAACM,gBAA/B"}
|
package/lib/login/login.d.ts
CHANGED
|
@@ -49,20 +49,21 @@ export declare function ensureLoadedPreferences(context: AuthenticationContext):
|
|
|
49
49
|
*/
|
|
50
50
|
export declare function ensureLoadedProfile(context: AuthenticationContext): Promise<AuthenticationContext>;
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*/
|
|
52
|
+
* Returns promise of context with arrays of symbols
|
|
53
|
+
*
|
|
54
|
+
* leaving the `isPublic` param undefined will bring in community index things, too
|
|
55
|
+
*/
|
|
57
56
|
export declare function findAppInstances(context: AuthenticationContext, theClass: NamedNode, isPublic?: boolean): Promise<AuthenticationContext>;
|
|
57
|
+
export declare function scopeLabel(context: any, scope: any): string;
|
|
58
58
|
/**
|
|
59
59
|
* UI to control registration of instance
|
|
60
60
|
*/
|
|
61
61
|
export declare function registrationControl(context: AuthenticationContext, instance: any, theClass: any): Promise<AuthenticationContext | void>;
|
|
62
|
+
export declare function renderScopeHeadingRow(context: any, store: any, scope: any): any;
|
|
62
63
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export declare function registrationList(
|
|
64
|
+
* UI to List at all registered things
|
|
65
|
+
*/
|
|
66
|
+
export declare function registrationList(context: AuthenticationContext, options: {
|
|
66
67
|
private?: boolean;
|
|
67
68
|
public?: boolean;
|
|
68
69
|
type?: NamedNode;
|
package/lib/login/login.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAa,SAAS,
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAa,SAAS,EAAM,MAAM,QAAQ,CAAA;AAGjD,OAAO,EACL,UAAU,EACV,qBAAqB,EAYtB,MAAM,aAAa,CAAA;AAwBpB;;;;GAIG;AAEH,wBAAgB,cAAc,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwB9F;AAED;;;;;;;GAOG;AAEH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAuDhC;AAED;;;;;;GAMG;AAEH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAiBhC;AAED;;;;IAII;AACJ,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,SAAS,EACnB,QAAQ,CAAC,EAAE,OAAO,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAShC;AAED,wBAAgB,UAAU,CAAE,OAAO,KAAA,EAAE,KAAK,KAAA,UAIzC;AACD;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,KAAA,EACR,QAAQ,KAAA,GACP,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAgEvC;AAED,wBAAgB,qBAAqB,CAAE,OAAO,KAAA,EAAE,KAAK,KAAA,EAAE,KAAK,KAAA,OAY3D;AACD;;IAEI;AACJ,wBAAsB,gBAA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