solid-ui 2.4.27-d81bf225 → 2.4.27-eede06e9
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/solid-ui.js +144 -142
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.map +1 -1
- package/lib/chat/bookmarks.js +2 -2
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +1 -1
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +128 -124
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +12 -11
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/messageTools.js +2 -2
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +1 -1
- package/lib/chat/thread.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/package.json +2 -2
package/lib/chat/infinite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infinite.js","names":["$rdf","_interopRequireWildcard","require","_solidLogic","debug","_iconBase","ns","widgets","_chatLogic","_message","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e2","f","TypeError","normalCompletion","didErr","err","step","next","_e3","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","desktopNotification","str","window","warn","Notification","permission","requestPermission","then","insertMessageIntoTable","_x","_x2","_x3","_x4","_x5","_x6","_insertMessageIntoTable","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","channelObject","messageTable","message","fresh","options","userContext","messageRow","ele","newestFirst","dateString","wrap","_callee$","_context","prev","renderMessageRow","sent","selectedMessage","sameTerm","style","backgroundColor","selectedElement","firstChild","abrupt","newestfirst","AJAR_date","insertBefore","nextSibling","appendChild","stop","infiniteMessageArea","_x7","_x8","_x9","_x10","_infiniteMessageArea","_callee15","dom","wasStore","chatChannel","syncMessages","_syncMessages","addMessage","_addMessage","insertPreviousMessages","_insertPreviousMessages","removePreviousMessages","createMessageTable","_createMessageTable","renderMessageTable","_renderMessageTable","addNewChatDocumentIfNewDay","_addNewChatDocumentIfNewDay","appendCurrentMessages","_appendCurrentMessages","loadMoreWhereNeeded","_loadMoreWhereNeeded","loadInitialContent","_loadInitialContent","dateFolder","div","statusArea","liveMessageTable","threadRootMessage","earliest","latest","thread","threadTime","lock","_callee15$","_context15","_loadInitialContent3","_callee14","yank","fixScroll","live","selectedDocument","threadRootDocument","initialDocment","now","todayDocument","selectedMessageTable","selectedDate","_callee14$","_context14","_fixScroll","scrollIntoView","block","inputRow","_yank","doc","Date","leafDocumentFromDate","dateFromLeafDocument","setTimeout","addEventListener","solo","document","body","_loadInitialContent2","_loadMoreWhereNeeded3","_callee13","event","freeze","magicZone","scrollBottom","scrollTop","_callee13$","_context13","initial","extendBackwards","scrollHeight","log","clientHeight","extendForwards","_loadMoreWhereNeeded2","_x20","_x21","_appendCurrentMessage2","_callee12","chatDocument","_callee12$","_context12","refresh","_callee11","_callee11$","_context11","store","updater","addDownstreamChangeListener","_appendCurrentMessage","_addNewChatDocumentIf2","_callee10","newChatDocument","oldChatDocument","sts","_callee10$","_context10","removeChild","holds","rdfs","st","update","alert","_addNewChatDocumentIf","_renderMessageTable3","_callee9","date","scrollBackbutton","scrollForwardButton","_extendBackwards","setScrollBackbuttonIcon","_extendForwards","setScrollForwardButtonIcon","scrollForwardButtonHandler","_scrollForwardButtonHandler","tr","titleTR","scrollBackbuttonCell","dateCell","scrollForwardButtonCell","_iterator2","_step2","_callee9$","_context9","_scrollForwardButtonH2","_callee8","_event","_callee8$","_context8","extendedForwards","_scrollForwardButtonH","_x22","_setScrollForwardButt","sense","scrollForwardIcon","getScrollForwardButtonIcon","setAttribute","icons","iconBase","_extendForwards3","_callee7","_callee7$","_context7","_extendForwards2","_setScrollBackbuttonI","extendedBack","scrollBackIcon","getScrollbackIcon","_extendBackwards3","_callee6","_callee6$","_context6","disabled","_extendBackwards2","createElement","width","renderMessageEditor","textContent","shortDate","toISOString","includeRemoveButton","cancelButton","_e","parentNode","statementsMatching","wf","object","t0","finish","_renderMessageTable2","_x18","_x19","_createMessageTable3","_callee5","statusTR","_callee5$","_context5","fetcher","load","response","status","errorMessageBlock","_createMessageTable2","_x16","_x17","_removePreviousMessag","backwards","previousSibling","extr","_insertPreviousMessag2","_callee4","extremity","todayDoc","newMessageTable","_callee4$","_context4","limit","loadPrevious","concat","_insertPreviousMessag","_x15","_addMessage3","_callee3","id","_callee3$","_context3","isDeleted","showDeletedMessages","isReplaced","any","sioc","uri","_addMessage2","_x13","_x14","_syncMessages3","_callee2","displayed","ele2","messages","stored","_iterator","_step","m","_callee2$","_context2","AJAR_subject","each","refreshTree","_syncMessages2","_x11","_x12","authorDateOnLeft","ChatChannel","dct"],"sources":["../../src/chat/infinite.js"],"sourcesContent":["/**\n * Contains the [[infiniteMessageArea]] class\n * @packageDocumentation\n */\n// import { findBookmarkDocument } from './bookmarks'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport { store } from 'solid-logic'\nimport * as debug from '../debug'\nimport { icons } from '../iconBase'\nimport * as ns from '../ns'\n// import * as style from '../style'\n// import * as utils from '../utils'\nimport * as widgets from '../widgets'\n// import * as pad from '../pad'\n// import { DateFolder } from './dateFolder'\nimport { ChatChannel, isDeleted, isReplaced, mostRecentVersion } from './chatLogic'\nimport { renderMessageEditor, renderMessageRow } from './message'\n\n// const UI = { authn, icons, ns, media, pad, $rdf, store, style, utils, widgets }\n\nexport function desktopNotification (str) {\n // Let's check if the browser supports notifications\n if (!('Notification' in window)) {\n debug.warn('This browser does no t support desktop notification')\n } else if (Notification.permission === 'granted') {\n // Let's check whether notificatio n permissions have already been granted\n // eslint-disable-next-line no-new\n new Notification(str)\n } else if (Notification.permission !== 'denied') {\n // Otherwise, we need to ask the user for permission\n Notification.requestPermission().then(function (permission) {\n // If the user accepts, let's create a notification\n if (permission === 'granted') {\n // eslint-disable-next-line no-new\n new Notification(str)\n }\n })\n }\n // At last, if the user has denied notifications, and you\n // want to be respectful there is no need to bother them any more.\n}\n\n/**\n * Renders a chat message inside a `messageTable`\n */\nexport async function insertMessageIntoTable (channelObject, messageTable, message, fresh, options, userContext) {\n const messageRow = await renderMessageRow(channelObject,\n message,\n fresh,\n options,\n userContext\n )\n\n // const message = messageRow.AJAR_subject\n if (options.selectedMessage && options.selectedMessage.sameTerm(message)) {\n messageRow.style.backgroundColor = 'yellow'\n options.selectedElement = messageRow\n messageTable.selectedElement = messageRow\n }\n\n let done = false\n for (let ele = messageTable.firstChild; ; ele = ele.nextSibling) {\n if (!ele) {\n // empty\n break\n }\n const newestFirst = options.newestfirst === true\n const dateString = messageRow.AJAR_date\n if (\n (dateString > ele.AJAR_date && newestFirst) ||\n (dateString < ele.AJAR_date && !newestFirst)\n ) {\n messageTable.insertBefore(messageRow, ele)\n done = true\n break\n }\n }\n if (!done) {\n messageTable.appendChild(messageRow)\n }\n}\n\n/**\n * Common code for a chat (discussion area of messages about something)\n * This version runs over a series of files for different time periods\n *\n * Parameters for the whole chat like its title are stored on\n * index.ttl#this and the chats messages are stored in YYYY/MM/DD/chat.ttl\n *\n * Use to import store as param 2, now ignores it and uses the UI main store\n *\n * Options include:\n\n - shiftEnterSendsMessage: Use shift/enter to send message, Enter to add newline, instead of the reverse.\n - authorDateOnLeft: Display the author's anme and date of the message in the left column instead of first above the content\n - selectedMessage: Display one message highlighted with the chat around it\n - solo: By itelf on a webpage, so user scroll anywhere in the web page scan scroll the chat.\n - newestFirst: Arrange the chat messages chronologically newest at the top insted of at the bottom\n - infinite: Use infinite scroll\n - showDeletedMessages: Show messages which have been delted as \"deleted message\". Otherwise hide them.\n - expandImagesInline: If a URI by itself in a message looks like an image URI, replace it with the image\n - inlineImageHeightEms: The height (in ems) of images expaned from their URIs in the chat.\n\n */\nexport async function infiniteMessageArea (dom, wasStore, chatChannel, options) {\n // ///////////////////////////////////////////////////////////////////////\n\n async function syncMessages (chatChannel, 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\n const messages = store.each(chatChannel, ns.wf('message'), null, messageTable.chatDocument)\n const stored = {}\n for (const m of messages) {\n stored[m.uri] = true\n if (!displayed[m.uri]) {\n await addMessage(m, messageTable)\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 for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {\n if (ele.AJAR_subject) {\n // Refresh thumbs up etc\n widgets.refreshTree(ele) // Things inside may have changed too\n }\n }\n } // syncMessages\n\n // Called once per original message displayed\n async function addMessage (message, messageTable) {\n // const latest = await mostRecentVersion(message)\n // const content = store.any(latest, ns.sioc('content'))\n if (isDeleted(message) && !options.showDeletedMessages) {\n return // ignore deleted messaged -- @@ could also leave a placeholder\n }\n if (isReplaced(message)) { //\n return // this is old version\n }\n let thread = store.any(null, ns.sioc('has_member'), message, message.doc())\n const id = store.any(message, ns.sioc('id'), null, message.doc())\n if (id && !thread) {\n thread = store.any(null, ns.sioc('has_member'), id, message.doc())\n }\n\n if (options.thread) { // only show things in thread\n if (store.holds(message, ns.sioc('has_reply'), options.thread)) { // root of thread\n debug.log(' addMessage: displaying root of thread ' + thread)\n } else if (thread && thread.sameTerm(options.thread)) {\n debug.log(' addMessage: Displaying body of thread ' + message.uri.slice(-10))\n } else {\n debug.log(' addMessage: Suppress non-thread message in thread table ' + message.uri.slice(-10))\n return // suppress message not in thread\n }\n } else { // Not threads\n if (thread) {\n debug.log(' addMessage: Suppress thread message in non-thread table ' + message.uri.slice(-10))\n return // supress thread messages in body\n } else {\n debug.log(' addMessage: Normal non-thread message in non-thread table ' + message.uri.slice(-10))\n }\n }\n\n await insertMessageIntoTable(channelObject,\n messageTable,\n message,\n messageTable.fresh,\n options,\n userContext\n ) // fresh from elsewhere\n }\n\n /* Add a new messageTable at the top/bottom\n\n */\n async function insertPreviousMessages (backwards) {\n const extremity = backwards ? earliest : latest\n let date = extremity.messageTable.date // day in mssecs\n\n // Are we at the top of a thread?\n if (backwards && earliest.limit && date <= earliest.limit) {\n return true // done\n }\n date = await dateFolder.loadPrevious(date, backwards) // backwards\n\n debug.log(\n `insertPreviousMessages: from ${\n backwards ? 'backwards' : 'forwards'\n } loadPrevious: ${date}`\n )\n if (!date && !backwards && !liveMessageTable) {\n await appendCurrentMessages() // If necessary skip to today and add that\n }\n if (!date) return true // done\n let live = false\n if (!backwards) {\n const todayDoc = dateFolder.leafDocumentFromDate(new Date())\n const doc = dateFolder.leafDocumentFromDate(date)\n live = doc.sameTerm(todayDoc) // Is this todays?\n }\n const newMessageTable = await createMessageTable(date, live)\n extremity.messageTable = newMessageTable // move pointer to earliest\n if (backwards ? newestFirst : !newestFirst) {\n // put on bottom or top\n div.appendChild(newMessageTable)\n } else {\n // put on top as we scroll back\n div.insertBefore(newMessageTable, div.firstChild)\n }\n return live // not done\n }\n\n /* Remove message tables earlier than this one\n */\n function removePreviousMessages (backwards, messageTable) {\n if (backwards ? newestFirst : !newestFirst) {\n // it was put on bottom\n while (messageTable.nextSibling) {\n div.removeChild(messageTable.nextSibling)\n }\n } else {\n // it was put on top as we scroll back\n while (messageTable.previousSibling) {\n div.removeChild(messageTable.previousSibling)\n }\n }\n const extr = backwards ? earliest : latest\n extr.messageTable = messageTable\n }\n\n /* Load and render message table\n ** @returns DOM element generates\n */\n async function createMessageTable (date, live) {\n debug.log(' createMessageTable for ' + date)\n const chatDocument = dateFolder.leafDocumentFromDate(date)\n try {\n await store.fetcher.load(chatDocument)\n } catch (err) {\n const messageTable = dom.createElement('table')\n const statusTR = messageTable.appendChild(dom.createElement('tr')) // ### find status in exception\n if (err.response && err.response.status && err.response.status === 404) {\n debug.log('Error 404 for chat file ' + chatDocument)\n return await renderMessageTable(date, live) // no mssage file is fine.. will be craeted later\n // statusTR.appendChild(widgets.errorMessageBlock(dom, 'no message file', 'white'))\n } else {\n debug.log('*** Error NON 404 for chat file ' + chatDocument)\n statusTR.appendChild(widgets.errorMessageBlock(dom, err, 'pink'))\n }\n return statusTR\n }\n return await renderMessageTable(date, live)\n }\n\n async function renderMessageTable (date, live) {\n const scrollBackbutton = null // was let\n const scrollForwardButton = null // was let\n\n /// ///////////////// Scroll down adding more above\n\n async function extendBackwards () {\n const done = await insertPreviousMessages(true)\n if (done) {\n if (scrollBackbutton) {\n scrollBackbutton.firstChild.setAttribute(\n 'src',\n icons.iconBase + 'noun_T-Block_1114655_000000.svg'\n ) // T\n scrollBackbutton.disabled = true\n }\n messageTable.initial = true\n } else {\n messageTable.extendedBack = true\n }\n setScrollBackbuttonIcon()\n return done\n }\n\n function setScrollBackbuttonIcon () {\n if (!scrollBackbutton) {\n return\n }\n const sense = messageTable.extendedBack ? !newestFirst : newestFirst\n const scrollBackIcon = messageTable.initial\n ? 'noun_T-Block_1114655_000000.svg'\n : getScrollbackIcon(sense)\n scrollBackbutton.firstChild.setAttribute(\n 'src',\n icons.iconBase + scrollBackIcon\n )\n\n function getScrollbackIcon (sense) {\n return sense ? 'noun_1369241.svg' : 'noun_1369237.svg'\n }\n }\n\n /// ////////////// Scroll up adding more below\n\n async function extendForwards () {\n const done = await insertPreviousMessages(false)\n /*\n if (done) {\n scrollForwardButton.firstChild.setAttribute(\n 'src',\n icons.iconBase + 'noun_T-Block_1114655_000000.svg'\n )\n scrollForwardButton.disabled = true\n messageTable.final = true\n } else {\n messageTable.extendedForwards = true\n }\n setScrollForwardButtonIcon()\n */\n return done\n }\n\n function setScrollForwardButtonIcon () {\n if (!scrollForwardButton) return\n const sense = messageTable.extendedForwards ? !newestFirst : newestFirst // noun_T-Block_1114657_000000.svg\n const scrollForwardIcon = messageTable.final\n ? 'noun_T-Block_1114657_000000.svg'\n : getScrollForwardButtonIcon(sense)\n scrollForwardButton.firstChild.setAttribute(\n 'src',\n icons.iconBase + scrollForwardIcon\n )\n\n function getScrollForwardButtonIcon (sense) {\n return !sense ? 'noun_1369241.svg' : 'noun_1369237.svg'\n }\n }\n\n async function scrollForwardButtonHandler (_event) {\n if (messageTable.extendedForwards) {\n removePreviousMessages(false, messageTable)\n messageTable.extendedForwards = false\n setScrollForwardButtonIcon()\n } else {\n await extendForwards() // async\n latest.messageTable.scrollIntoView(newestFirst)\n }\n }\n\n /// ///////////////////////\n /*\n options = options || {}\n options.authorDateOnLeft = true\n const newestFirst = options.newestFirst === '1' || options.newestFirst === true // hack for now\n const channelObject = new ChatChannel(chatChannel, options)\n const dateFolder = channelObject.dateFolder\n\n const div = dom.createElement('div')\n const statusArea = div.appendChild(dom.createElement('div'))\n const userContext = { dom, statusArea, div: statusArea } // logged on state, pointers to user's stuff\n\n*/\n debug.log('Options for called message Area', options)\n const messageTable = dom.createElement('table')\n messageTable.style.width = '100%' // fill the pane div\n messageTable.extendBackwards = extendBackwards // Make function available to scroll stuff\n messageTable.extendForwards = extendForwards // Make function available to scroll stuff\n\n messageTable.date = date\n const chatDocument = dateFolder.leafDocumentFromDate(date)\n messageTable.chatDocument = chatDocument\n\n messageTable.fresh = false\n messageTable.setAttribute('style', 'width: 100%;') // fill that div!\n if (live) {\n messageTable.final = true\n liveMessageTable = messageTable\n latest.messageTable = messageTable\n const tr = renderMessageEditor(channelObject, messageTable, userContext, options)\n if (newestFirst) {\n messageTable.insertBefore(tr, messageTable.firstChild) // If newestFirst\n } else {\n messageTable.appendChild(tr) // not newestFirst\n }\n messageTable.inputRow = tr\n }\n\n /// ///// Infinite scroll\n //\n // @@ listen for swipe past end event not just button\n const test = true\n if (test) { // ws options.infinite but need for non-infinite\n const titleTR = dom.createElement('tr')\n const scrollBackbuttonCell = titleTR.appendChild(\n dom.createElement('td')\n )\n // up traingles: noun_1369237.svg\n // down triangles: noun_1369241.svg\n /*\n const scrollBackIcon = newestFirst\n ? 'noun_1369241.svg'\n : 'noun_1369237.svg' // down and up arrows respoctively\n scrollBackbutton = widgets.button(\n dom,\n icons.iconBase + scrollBackIcon,\n 'Previous messages ...'\n )\n scrollBackbuttonCell.style = 'width:3em; height:3em;'\n scrollBackbutton.addEventListener('click', scrollBackbuttonHandler, false)\n messageTable.extendedBack = false\n scrollBackbuttonCell.appendChild(scrollBackbutton)\n setScrollBackbuttonIcon()\n */\n const dateCell = titleTR.appendChild(dom.createElement('td'))\n dateCell.style =\n 'text-align: center; vertical-align: middle; color: #888; font-style: italic;'\n dateCell.textContent = widgets.shortDate(date.toISOString(), true) // no time, only date\n\n // @@@@@@@@@@@ todo move this button to other end of message cell, o\n const scrollForwardButtonCell = titleTR.appendChild(\n dom.createElement('td')\n )\n if (options.includeRemoveButton) {\n scrollForwardButtonCell.appendChild(widgets.cancelButton(dom, _e => {\n div.parentNode.removeChild(div)\n }))\n }\n /*\n const scrollForwardIcon = newestFirst\n ? 'noun_1369241.svg'\n : 'noun_1369237.svg' // down and up arrows respoctively\n scrollForwardButton = widgets.button(\n dom,\n icons.iconBase + scrollForwardIcon,\n 'Later messages ...'\n )\n scrollForwardButtonCell.appendChild(scrollForwardButton)\n scrollForwardButtonCell.style = 'width:3em; height:3em;'\n scrollForwardButton.addEventListener(\n 'click',\n scrollForwardButtonHandler,\n false\n )\n messageTable.extendedForward = false\n setScrollForwardButtonIcon()\n */\n messageTable.extendedForwards = false\n\n if (!newestFirst) {\n // opposite end from the entry field\n messageTable.insertBefore(titleTR, messageTable.firstChild) // If not newestFirst\n } else {\n messageTable.appendChild(titleTR) // newestFirst\n }\n }\n\n const sts = store.statementsMatching(null, ns.wf('message'), null, chatDocument)\n if (!live && sts.length === 0) {\n // not todays\n // no need buttomns at the moment\n // messageTable.style.visibility = 'collapse' // Hide files with no messages\n }\n for (const st of sts) {\n await addMessage(st.object, messageTable)\n }\n messageTable.fresh = true\n\n // loadMessageTable(messageTable, chatDocument)\n messageTable.fresh = false\n return messageTable\n } // renderMessageTable\n\n async function addNewChatDocumentIfNewDay () {\n // @@ Remove listener from previous table as it is now static\n const newChatDocument = dateFolder.leafDocumentFromDate(new Date())\n if (!newChatDocument.sameTerm(latest.messageTable.chatDocument)) {\n // It is a new day\n if (liveMessageTable.inputRow) {\n liveMessageTable.removeChild(liveMessageTable.inputRow)\n delete liveMessageTable.inputRow\n }\n const oldChatDocument = latest.messageTable.chatDocument\n await appendCurrentMessages()\n // Adding a link in the document will ping listeners to add the new block too\n if (\n !store.holds(\n oldChatDocument,\n ns.rdfs('seeAlso'),\n newChatDocument,\n oldChatDocument\n )\n ) {\n const sts = [\n $rdf.st(\n oldChatDocument,\n ns.rdfs('seeAlso'),\n newChatDocument,\n oldChatDocument\n )\n ]\n try {\n store.updater.update([], sts)\n } catch (err) {\n alert('Unable to link old chat file to new one:' + err)\n }\n }\n }\n }\n\n /*\n function messageCount () {\n var n = 0\n const tables = div.children\n for (let i = 0; i < tables.length; i++) {\n n += tables[i].children.length - 1\n // debug.log(' table length:' + tables[i].children.length)\n }\n return n\n }\n*/\n\n /* Add the live message block with entry field for today\n */\n async function appendCurrentMessages () {\n const now = new Date()\n const chatDocument = dateFolder.leafDocumentFromDate(now)\n\n /// ///////////////////////////////////////////////////////////\n const messageTable = await createMessageTable(now, true)\n div.appendChild(messageTable)\n div.refresh = async function () {\n // only the last messageTable is live\n await addNewChatDocumentIfNewDay(new Date())\n await syncMessages(chatChannel, messageTable) // @@ livemessagetable??\n desktopNotification(chatChannel)\n } // The short chat version the live update listening is done in the pane but we do it in the widget @@\n store.updater.addDownstreamChangeListener(chatDocument, div.refresh) // Live update\n liveMessageTable = messageTable\n latest.messageTable = liveMessageTable\n return messageTable\n }\n\n async function loadMoreWhereNeeded (event, fixScroll) {\n if (lock) return\n lock = true\n const freeze = !fixScroll\n const magicZone = 150\n // const top = div.scrollTop\n // const bottom = div.scrollHeight - top - div.clientHeight\n let done\n\n while (\n div.scrollTop < magicZone &&\n earliest.messageTable &&\n !earliest.messageTable.initial &&\n earliest.messageTable.extendBackwards\n ) {\n // If this has been called before the element is actually in the\n // user's DOM tree, then this scrollTop check won't work -> loop forever\n // https://github.com/solidos/solid-ui/issues/366\n if (div.scrollHeight === 0) {\n // debug.log(' chat/loadMoreWhereNeeded: trying later...')\n setTimeout(loadMoreWhereNeeded, 2000) // couple be less\n lock = false\n return // abandon now, do later\n }\n // debug.log(' chat/loadMoreWhereNeeded: Going now')\n const scrollBottom = div.scrollHeight - div.scrollTop\n debug.log('infinite scroll: adding above: top ' + div.scrollTop)\n done = await earliest.messageTable.extendBackwards()\n if (freeze) {\n div.scrollTop = div.scrollHeight - scrollBottom\n }\n if (fixScroll) fixScroll()\n if (done) break\n }\n while (\n options.selectedMessage && // we started in the middle not at the bottom\n div.scrollHeight - div.scrollTop - div.clientHeight < magicZone && // we are scrolled right to the bottom\n latest.messageTable &&\n !latest.messageTable.final && // there is more data to come\n latest.messageTable.extendForwards\n ) {\n const scrollTop = div.scrollTop\n debug.log(\n 'infinite scroll: adding below: bottom: ' +\n (div.scrollHeight - div.scrollTop - div.clientHeight)\n )\n done = await latest.messageTable.extendForwards() // then add more data on the bottom\n if (freeze) {\n div.scrollTop = scrollTop // while adding below keep same things in view\n }\n if (fixScroll) fixScroll()\n if (done) break\n }\n lock = false\n }\n\n async function loadInitialContent () {\n function yank () {\n if (selectedMessageTable && selectedMessageTable.selectedElement) {\n selectedMessageTable.selectedElement.scrollIntoView({ block: 'center' })\n }\n }\n\n // During initial load ONLY keep scroll to selected thing or bottom\n function fixScroll () {\n if (options.selectedElement) {\n options.selectedElement.scrollIntoView({ block: 'center' }) // align tops or bottoms\n } else {\n if (liveMessageTable.inputRow.scrollIntoView) {\n liveMessageTable.inputRow.scrollIntoView(newestFirst) // align tops or bottoms\n }\n }\n }\n\n let live, selectedDocument, threadRootDocument\n if (options.selectedMessage) {\n selectedDocument = options.selectedMessage.doc()\n }\n if (threadRootMessage) {\n threadRootDocument = threadRootMessage.doc()\n }\n const initialDocment = selectedDocument || threadRootDocument\n\n if (initialDocment) {\n const now = new Date()\n const todayDocument = dateFolder.leafDocumentFromDate(now)\n live = todayDocument.sameTerm(initialDocment)\n }\n\n let selectedMessageTable\n if (initialDocment && !live) {\n const selectedDate = dateFolder.dateFromLeafDocument(initialDocment)\n selectedMessageTable = await createMessageTable(selectedDate, live)\n div.appendChild(selectedMessageTable)\n earliest.messageTable = selectedMessageTable\n latest.messageTable = selectedMessageTable\n yank()\n setTimeout(yank, 1000) // @@ kludge - restore position distubed by other cHANGES\n } else {\n // Live end\n await appendCurrentMessages()\n earliest.messageTable = liveMessageTable\n latest.messageTable = liveMessageTable\n }\n\n await loadMoreWhereNeeded(null, fixScroll)\n div.addEventListener('scroll', loadMoreWhereNeeded)\n if (options.solo) {\n document.body.addEventListener('scroll', loadMoreWhereNeeded)\n }\n }\n\n // Body of main function\n\n options = options || {}\n options.authorDateOnLeft = false // @@ make a user optiosn\n const newestFirst = options.newestFirst === '1' || options.newestFirst === true // hack for now\n\n const channelObject = new ChatChannel(chatChannel, options)\n const dateFolder = channelObject.dateFolder\n\n const div = dom.createElement('div')\n channelObject.div = div\n\n const statusArea = div.appendChild(dom.createElement('div'))\n const userContext = { dom, statusArea, div: statusArea } // logged on state, pointers to user's stuff\n\n let liveMessageTable\n let threadRootMessage\n const earliest = { messageTable: null } // Stuff about each end of the loaded days\n const latest = { messageTable: null }\n\n if (options.thread) {\n const thread = options.thread\n threadRootMessage = store.any(null, ns.sioc('has_reply'), thread, thread.doc())\n if (threadRootMessage) {\n const threadTime = store.any(threadRootMessage, ns.dct('created'), null, threadRootMessage.doc())\n if (threadTime) {\n earliest.limit = new Date(threadTime.value)\n debug.log(' inifinite: thread start at ' + earliest.limit)\n }\n }\n }\n\n let lock = false\n\n await loadInitialContent()\n return div\n}\n"],"mappings":";;;;;;;;;;;;AAKA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,EAAA,GAAAL,uBAAA,CAAAC,OAAA;AAGA,IAAAK,OAAA,GAAAN,uBAAA,CAAAC,OAAA;AAGA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAiE,SAAAQ,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAV,wBAAAc,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA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OAAAU,UAAA,CAAAzC,IAAA;MAAA;IAAA,GAAAO,SAAA;EAAA,CACX;EAAA,OAAAD,oBAAA,CAAAxC,KAAA,OAAAC,SAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"infinite.js","names":["$rdf","_interopRequireWildcard","require","_solidLogic","debug","_iconBase","ns","widgets","_chatLogic","_message","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e2","f","TypeError","normalCompletion","didErr","err","step","next","_e3","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","desktopNotification","str","window","warn","Notification","permission","requestPermission","then","insertMessageIntoTable","_x","_x2","_x3","_x4","_x5","_x6","_insertMessageIntoTable","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","channelObject","messageTable","message","fresh","options","userContext","messageRow","ele","newestFirst","dateString","wrap","_callee$","_context","prev","renderMessageRow","sent","selectedMessage","sameTerm","style","backgroundColor","selectedElement","firstChild","abrupt","newestfirst","AJAR_date","insertBefore","nextSibling","appendChild","stop","infiniteMessageArea","_x7","_x8","_x9","_x10","_infiniteMessageArea","_callee15","dom","wasStore","chatChannel","syncMessages","_syncMessages","addMessage","_addMessage","insertPreviousMessages","_insertPreviousMessages","removePreviousMessages","createMessageTable","_createMessageTable","renderMessageTable","_renderMessageTable","addNewChatDocumentIfNewDay","_addNewChatDocumentIfNewDay","appendCurrentMessages","_appendCurrentMessages","loadMoreWhereNeeded","_loadMoreWhereNeeded","loadInitialContent","_loadInitialContent","dateFolder","div","statusArea","liveMessageTable","threadRootMessage","earliest","latest","thread","threadTime","lock","_callee15$","_context15","_loadInitialContent3","_callee14","yank","fixScroll","live","selectedDocument","threadRootDocument","initialDocment","now","todayDocument","selectedMessageTable","selectedDate","_callee14$","_context14","_fixScroll","scrollIntoView","block","inputRow","_yank","doc","Date","leafDocumentFromDate","dateFromLeafDocument","setTimeout","addEventListener","solo","document","body","_loadInitialContent2","_loadMoreWhereNeeded3","_callee13","event","freeze","magicZone","scrollBottom","scrollTop","_callee13$","_context13","initial","extendBackwards","scrollHeight","log","clientHeight","extendForwards","_loadMoreWhereNeeded2","_x20","_x21","_appendCurrentMessage2","_callee12","chatDocument","_callee12$","_context12","refresh","_callee11","_callee11$","_context11","store","updater","addDownstreamChangeListener","_appendCurrentMessage","_addNewChatDocumentIf2","_callee10","newChatDocument","oldChatDocument","sts","_callee10$","_context10","removeChild","holds","rdfs","st","update","alert","_addNewChatDocumentIf","_renderMessageTable3","_callee9","date","scrollBackbutton","scrollForwardButton","_extendBackwards","setScrollBackbuttonIcon","_extendForwards","setScrollForwardButtonIcon","scrollForwardButtonHandler","_scrollForwardButtonHandler","tr","titleTR","scrollBackbuttonCell","dateCell","scrollForwardButtonCell","_iterator2","_step2","_callee9$","_context9","_scrollForwardButtonH2","_callee8","_event","_callee8$","_context8","extendedForwards","_scrollForwardButtonH","_x22","_setScrollForwardButt","sense","scrollForwardIcon","getScrollForwardButtonIcon","setAttribute","icons","iconBase","_extendForwards3","_callee7","_callee7$","_context7","_extendForwards2","_setScrollBackbuttonI","extendedBack","scrollBackIcon","getScrollbackIcon","_extendBackwards3","_callee6","_callee6$","_context6","disabled","_extendBackwards2","createElement","width","renderMessageEditor","textContent","shortDate","toISOString","includeRemoveButton","cancelButton","_e","parentNode","statementsMatching","wf","object","t0","finish","_renderMessageTable2","_x18","_x19","_createMessageTable3","_callee5","statusTR","_callee5$","_context5","fetcher","load","response","status","errorMessageBlock","_createMessageTable2","_x16","_x17","_removePreviousMessag","backwards","previousSibling","extr","_insertPreviousMessag2","_callee4","extremity","todayDoc","newMessageTable","_callee4$","_context4","limit","loadPrevious","concat","_insertPreviousMessag","_x15","_addMessage3","_callee3","id","_callee3$","_context3","isDeleted","showDeletedMessages","isReplaced","any","sioc","uri","_addMessage2","_x13","_x14","_syncMessages3","_callee2","displayed","ele2","messages","stored","_iterator","_step","m","_callee2$","_context2","AJAR_subject","each","refreshTree","_syncMessages2","_x11","_x12","authorDateOnLeft","ChatChannel","dct"],"sources":["../../src/chat/infinite.js"],"sourcesContent":["/**\n * Contains the [[infiniteMessageArea]] class\n * @packageDocumentation\n */\n// import { findBookmarkDocument } from './bookmarks'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport { store } from 'solid-logic'\nimport * as debug from '../debug'\nimport { icons } from '../iconBase'\nimport * as ns from '../ns'\n// import * as style from '../style'\n// import * as utils from '../utils'\nimport * as widgets from '../widgets'\n// import * as pad from '../pad'\n// import { DateFolder } from './dateFolder'\nimport { ChatChannel, isDeleted, isReplaced } from './chatLogic'\nimport { renderMessageEditor, renderMessageRow } from './message'\n\n// const UI = { authn, icons, ns, media, pad, $rdf, store, style, utils, widgets }\n\nexport function desktopNotification (str) {\n // Let's check if the browser supports notifications\n if (!('Notification' in window)) {\n debug.warn('This browser does no t support desktop notification')\n } else if (Notification.permission === 'granted') {\n // Let's check whether notificatio n permissions have already been granted\n // eslint-disable-next-line no-new\n new Notification(str)\n } else if (Notification.permission !== 'denied') {\n // Otherwise, we need to ask the user for permission\n Notification.requestPermission().then(function (permission) {\n // If the user accepts, let's create a notification\n if (permission === 'granted') {\n // eslint-disable-next-line no-new\n new Notification(str)\n }\n })\n }\n // At last, if the user has denied notifications, and you\n // want to be respectful there is no need to bother them any more.\n}\n\n/**\n * Renders a chat message inside a `messageTable`\n */\nexport async function insertMessageIntoTable (channelObject, messageTable, message, fresh, options, userContext) {\n const messageRow = await renderMessageRow(channelObject,\n message,\n fresh,\n options,\n userContext\n )\n\n // const message = messageRow.AJAR_subject\n if (options.selectedMessage && options.selectedMessage.sameTerm(message)) {\n messageRow.style.backgroundColor = 'yellow'\n options.selectedElement = messageRow\n messageTable.selectedElement = messageRow\n }\n\n let done = false\n for (let ele = messageTable.firstChild; ; ele = ele.nextSibling) {\n if (!ele) {\n // empty\n break\n }\n const newestFirst = options.newestfirst === true\n const dateString = messageRow.AJAR_date\n if (\n (dateString > ele.AJAR_date && newestFirst) ||\n (dateString < ele.AJAR_date && !newestFirst)\n ) {\n messageTable.insertBefore(messageRow, ele)\n done = true\n break\n }\n }\n if (!done) {\n messageTable.appendChild(messageRow)\n }\n}\n\n/**\n * Common code for a chat (discussion area of messages about something)\n * This version runs over a series of files for different time periods\n *\n * Parameters for the whole chat like its title are stored on\n * index.ttl#this and the chats messages are stored in YYYY/MM/DD/chat.ttl\n *\n * Use to import store as param 2, now ignores it and uses the UI main store\n *\n * Options include:\n\n - shiftEnterSendsMessage: Use shift/enter to send message, Enter to add newline, instead of the reverse.\n - authorDateOnLeft: Display the author's anme and date of the message in the left column instead of first above the content\n - selectedMessage: Display one message highlighted with the chat around it\n - solo: By itelf on a webpage, so user scroll anywhere in the web page scan scroll the chat.\n - newestFirst: Arrange the chat messages chronologically newest at the top insted of at the bottom\n - infinite: Use infinite scroll\n - showDeletedMessages: Show messages which have been delted as \"deleted message\". Otherwise hide them.\n - expandImagesInline: If a URI by itself in a message looks like an image URI, replace it with the image\n - inlineImageHeightEms: The height (in ems) of images expaned from their URIs in the chat.\n\n */\nexport async function infiniteMessageArea (dom, wasStore, chatChannel, options) {\n // ///////////////////////////////////////////////////////////////////////\n\n async function syncMessages (chatChannel, 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\n const messages = store.each(chatChannel, ns.wf('message'), null, messageTable.chatDocument)\n const stored = {}\n for (const m of messages) {\n stored[m.uri] = true\n if (!displayed[m.uri]) {\n await addMessage(m, messageTable)\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 for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {\n if (ele.AJAR_subject) {\n // Refresh thumbs up etc\n widgets.refreshTree(ele) // Things inside may have changed too\n }\n }\n } // syncMessages\n\n // Called once per original message displayed\n async function addMessage (message, messageTable) {\n // const latest = await mostRecentVersion(message)\n // const content = store.any(latest, ns.sioc('content'))\n if (isDeleted(message) && !options.showDeletedMessages) {\n return // ignore deleted messaged -- @@ could also leave a placeholder\n }\n if (isReplaced(message)) { //\n return // this is old version\n }\n let thread = store.any(null, ns.sioc('has_member'), message, message.doc())\n const id = store.any(message, ns.sioc('id'), null, message.doc())\n if (id && !thread) {\n thread = store.any(null, ns.sioc('has_member'), id, message.doc())\n }\n\n if (options.thread) { // only show things in thread\n if (store.holds(message, ns.sioc('has_reply'), options.thread)) { // root of thread\n debug.log(' addMessage: displaying root of thread ' + thread)\n } else if (thread && thread.sameTerm(options.thread)) {\n debug.log(' addMessage: Displaying body of thread ' + message.uri.slice(-10))\n } else {\n debug.log(' addMessage: Suppress non-thread message in thread table ' + message.uri.slice(-10))\n return // suppress message not in thread\n }\n } else { // Not threads\n if (thread) {\n debug.log(' addMessage: Suppress thread message in non-thread table ' + message.uri.slice(-10))\n return // supress thread messages in body\n } else {\n debug.log(' addMessage: Normal non-thread message in non-thread table ' + message.uri.slice(-10))\n }\n }\n\n await insertMessageIntoTable(channelObject,\n messageTable,\n message,\n messageTable.fresh,\n options,\n userContext\n ) // fresh from elsewhere\n }\n\n /* Add a new messageTable at the top/bottom\n\n */\n async function insertPreviousMessages (backwards) {\n const extremity = backwards ? earliest : latest\n let date = extremity.messageTable.date // day in mssecs\n\n // Are we at the top of a thread?\n if (backwards && earliest.limit && date <= earliest.limit) {\n return true // done\n }\n debug.log(' insertPreviousMessages: loadPrevious given date ' + date)\n\n date = await dateFolder.loadPrevious(date, backwards) // backwards\n debug.log(' insertPreviousMessages: loadPrevious returns date ' + date)\n\n debug.log(\n `insertPreviousMessages: from ${\n backwards ? 'backwards' : 'forwards'\n } loadPrevious: ${date}`\n )\n if (!date && !backwards && !liveMessageTable) {\n await appendCurrentMessages() // If necessary skip to today and add that\n }\n if (!date) return true // done\n let live = false\n if (!backwards) {\n const todayDoc = dateFolder.leafDocumentFromDate(new Date())\n const doc = dateFolder.leafDocumentFromDate(date)\n live = doc.sameTerm(todayDoc) // Is this todays?\n }\n const newMessageTable = await createMessageTable(date, live)\n extremity.messageTable = newMessageTable // move pointer to earliest\n if (backwards ? newestFirst : !newestFirst) {\n // put on bottom or top\n div.appendChild(newMessageTable)\n } else {\n // put on top as we scroll back\n div.insertBefore(newMessageTable, div.firstChild)\n }\n return live // not done\n }\n\n /* Remove message tables earlier than this one\n */\n function removePreviousMessages (backwards, messageTable) {\n if (backwards ? newestFirst : !newestFirst) {\n // it was put on bottom\n while (messageTable.nextSibling) {\n div.removeChild(messageTable.nextSibling)\n }\n } else {\n // it was put on top as we scroll back\n while (messageTable.previousSibling) {\n div.removeChild(messageTable.previousSibling)\n }\n }\n const extr = backwards ? earliest : latest\n extr.messageTable = messageTable\n }\n\n /* Load and render message table\n ** @returns DOM element generates\n */\n async function createMessageTable (date, live) {\n debug.log(' createMessageTable for ' + date)\n const chatDocument = dateFolder.leafDocumentFromDate(date)\n try {\n await store.fetcher.load(chatDocument)\n } catch (err) {\n const messageTable = dom.createElement('table')\n const statusTR = messageTable.appendChild(dom.createElement('tr')) // ### find status in exception\n if (err.response && err.response.status && err.response.status === 404) {\n debug.log('Error 404 for chat file ' + chatDocument)\n return await renderMessageTable(date, live) // no message file is fine. will be created later\n // statusTR.appendChild(widgets.errorMessageBlock(dom, 'no message file', 'white'))\n } else {\n debug.log('*** Error NON 404 for chat file ' + chatDocument)\n statusTR.appendChild(widgets.errorMessageBlock(dom, err, 'pink'))\n }\n return statusTR\n }\n return await renderMessageTable(date, live)\n }\n\n async function renderMessageTable (date, live) {\n const scrollBackbutton = null // was let\n const scrollForwardButton = null // was let\n\n /// ///////////////// Scroll down adding more above\n\n async function extendBackwards () {\n const done = await insertPreviousMessages(true)\n if (done) {\n if (scrollBackbutton) {\n scrollBackbutton.firstChild.setAttribute(\n 'src',\n icons.iconBase + 'noun_T-Block_1114655_000000.svg'\n ) // T\n scrollBackbutton.disabled = true\n }\n messageTable.initial = true\n } else {\n messageTable.extendedBack = true\n }\n setScrollBackbuttonIcon()\n return done\n }\n\n function setScrollBackbuttonIcon () {\n if (!scrollBackbutton) {\n return\n }\n const sense = messageTable.extendedBack ? !newestFirst : newestFirst\n const scrollBackIcon = messageTable.initial\n ? 'noun_T-Block_1114655_000000.svg'\n : getScrollbackIcon(sense)\n scrollBackbutton.firstChild.setAttribute(\n 'src',\n icons.iconBase + scrollBackIcon\n )\n\n function getScrollbackIcon (sense) {\n return sense ? 'noun_1369241.svg' : 'noun_1369237.svg'\n }\n }\n\n /// ////////////// Scroll up adding more below\n\n async function extendForwards () {\n const done = await insertPreviousMessages(false)\n /*\n if (done) {\n scrollForwardButton.firstChild.setAttribute(\n 'src',\n icons.iconBase + 'noun_T-Block_1114655_000000.svg'\n )\n scrollForwardButton.disabled = true\n messageTable.final = true\n } else {\n messageTable.extendedForwards = true\n }\n setScrollForwardButtonIcon()\n */\n return done\n }\n\n function setScrollForwardButtonIcon () {\n if (!scrollForwardButton) return\n const sense = messageTable.extendedForwards ? !newestFirst : newestFirst // noun_T-Block_1114657_000000.svg\n const scrollForwardIcon = messageTable.final\n ? 'noun_T-Block_1114657_000000.svg'\n : getScrollForwardButtonIcon(sense)\n scrollForwardButton.firstChild.setAttribute(\n 'src',\n icons.iconBase + scrollForwardIcon\n )\n\n function getScrollForwardButtonIcon (sense) {\n return !sense ? 'noun_1369241.svg' : 'noun_1369237.svg'\n }\n }\n\n async function scrollForwardButtonHandler (_event) {\n if (messageTable.extendedForwards) {\n removePreviousMessages(false, messageTable)\n messageTable.extendedForwards = false\n setScrollForwardButtonIcon()\n } else {\n await extendForwards() // async\n latest.messageTable.scrollIntoView(newestFirst)\n }\n }\n\n /// ///////////////////////\n /*\n options = options || {}\n options.authorDateOnLeft = true\n const newestFirst = options.newestFirst === '1' || options.newestFirst === true // hack for now\n const channelObject = new ChatChannel(chatChannel, options)\n const dateFolder = channelObject.dateFolder\n\n const div = dom.createElement('div')\n const statusArea = div.appendChild(dom.createElement('div'))\n const userContext = { dom, statusArea, div: statusArea } // logged on state, pointers to user's stuff\n\n*/\n debug.log('Options for called message Area', options)\n const messageTable = dom.createElement('table')\n messageTable.style.width = '100%' // fill the pane div\n messageTable.extendBackwards = extendBackwards // Make function available to scroll stuff\n messageTable.extendForwards = extendForwards // Make function available to scroll stuff\n\n messageTable.date = date\n const chatDocument = dateFolder.leafDocumentFromDate(date)\n messageTable.chatDocument = chatDocument\n\n messageTable.fresh = false\n messageTable.setAttribute('style', 'width: 100%;') // fill that div!\n if (live) {\n messageTable.final = true\n liveMessageTable = messageTable\n latest.messageTable = messageTable\n const tr = renderMessageEditor(channelObject, messageTable, userContext, options)\n if (newestFirst) {\n messageTable.insertBefore(tr, messageTable.firstChild) // If newestFirst\n } else {\n messageTable.appendChild(tr) // not newestFirst\n }\n messageTable.inputRow = tr\n }\n\n /// ///// Infinite scroll\n //\n // @@ listen for swipe past end event not just button\n const test = true\n if (test) { // ws options.infinite but need for non-infinite\n const titleTR = dom.createElement('tr')\n const scrollBackbuttonCell = titleTR.appendChild(\n dom.createElement('td')\n )\n // up traingles: noun_1369237.svg\n // down triangles: noun_1369241.svg\n /*\n const scrollBackIcon = newestFirst\n ? 'noun_1369241.svg'\n : 'noun_1369237.svg' // down and up arrows respoctively\n scrollBackbutton = widgets.button(\n dom,\n icons.iconBase + scrollBackIcon,\n 'Previous messages ...'\n )\n scrollBackbuttonCell.style = 'width:3em; height:3em;'\n scrollBackbutton.addEventListener('click', scrollBackbuttonHandler, false)\n messageTable.extendedBack = false\n scrollBackbuttonCell.appendChild(scrollBackbutton)\n setScrollBackbuttonIcon()\n */\n const dateCell = titleTR.appendChild(dom.createElement('td'))\n dateCell.style =\n 'text-align: center; vertical-align: middle; color: #888; font-style: italic;'\n dateCell.textContent = widgets.shortDate(date.toISOString(), true) // no time, only date\n\n // @@@@@@@@@@@ todo move this button to other end of message cell, o\n const scrollForwardButtonCell = titleTR.appendChild(\n dom.createElement('td')\n )\n if (options.includeRemoveButton) {\n scrollForwardButtonCell.appendChild(widgets.cancelButton(dom, _e => {\n div.parentNode.removeChild(div)\n }))\n }\n /*\n const scrollForwardIcon = newestFirst\n ? 'noun_1369241.svg'\n : 'noun_1369237.svg' // down and up arrows respoctively\n scrollForwardButton = widgets.button(\n dom,\n icons.iconBase + scrollForwardIcon,\n 'Later messages ...'\n )\n scrollForwardButtonCell.appendChild(scrollForwardButton)\n scrollForwardButtonCell.style = 'width:3em; height:3em;'\n scrollForwardButton.addEventListener(\n 'click',\n scrollForwardButtonHandler,\n false\n )\n messageTable.extendedForward = false\n setScrollForwardButtonIcon()\n */\n messageTable.extendedForwards = false\n\n if (!newestFirst) {\n // opposite end from the entry field\n messageTable.insertBefore(titleTR, messageTable.firstChild) // If not newestFirst\n } else {\n messageTable.appendChild(titleTR) // newestFirst\n }\n }\n\n const sts = store.statementsMatching(null, ns.wf('message'), null, chatDocument)\n if (!live && sts.length === 0) {\n // not todays\n // no need buttomns at the moment\n // messageTable.style.visibility = 'collapse' // Hide files with no messages\n }\n for (const st of sts) {\n await addMessage(st.object, messageTable)\n }\n messageTable.fresh = true\n\n // loadMessageTable(messageTable, chatDocument)\n messageTable.fresh = false\n return messageTable\n } // renderMessageTable\n\n async function addNewChatDocumentIfNewDay () {\n // @@ Remove listener from previous table as it is now static\n const newChatDocument = dateFolder.leafDocumentFromDate(new Date())\n if (!newChatDocument.sameTerm(latest.messageTable.chatDocument)) {\n // It is a new day\n if (liveMessageTable.inputRow) {\n liveMessageTable.removeChild(liveMessageTable.inputRow)\n delete liveMessageTable.inputRow\n }\n const oldChatDocument = latest.messageTable.chatDocument\n await appendCurrentMessages()\n // Adding a link in the document will ping listeners to add the new block too\n if (\n !store.holds(\n oldChatDocument,\n ns.rdfs('seeAlso'),\n newChatDocument,\n oldChatDocument\n )\n ) {\n const sts = [\n $rdf.st(\n oldChatDocument,\n ns.rdfs('seeAlso'),\n newChatDocument,\n oldChatDocument\n )\n ]\n try {\n store.updater.update([], sts)\n } catch (err) {\n alert('Unable to link old chat file to new one:' + err)\n }\n }\n }\n }\n\n /*\n function messageCount () {\n var n = 0\n const tables = div.children\n for (let i = 0; i < tables.length; i++) {\n n += tables[i].children.length - 1\n // debug.log(' table length:' + tables[i].children.length)\n }\n return n\n }\n*/\n\n /* Add the live message block with entry field for today\n */\n async function appendCurrentMessages () {\n const now = new Date()\n const chatDocument = dateFolder.leafDocumentFromDate(now)\n\n /// ///////////////////////////////////////////////////////////\n const messageTable = await createMessageTable(now, true)\n div.appendChild(messageTable)\n div.refresh = async function () {\n // only the last messageTable is live\n await addNewChatDocumentIfNewDay(new Date())\n await syncMessages(chatChannel, messageTable) // @@ livemessagetable??\n desktopNotification(chatChannel)\n } // The short chat version the live update listening is done in the pane but we do it in the widget @@\n store.updater.addDownstreamChangeListener(chatDocument, div.refresh) // Live update\n liveMessageTable = messageTable\n latest.messageTable = liveMessageTable\n return messageTable\n }\n\n async function loadMoreWhereNeeded (event, fixScroll) {\n if (lock) return\n lock = true\n const freeze = !fixScroll\n const magicZone = 150\n // const top = div.scrollTop\n // const bottom = div.scrollHeight - top - div.clientHeight\n let done\n\n while (\n div.scrollTop < magicZone &&\n earliest.messageTable &&\n !earliest.messageTable.initial &&\n earliest.messageTable.extendBackwards\n ) {\n // If this has been called before the element is actually in the\n // user's DOM tree, then this scrollTop check won't work -> loop forever\n // https://github.com/solidos/solid-ui/issues/366\n if (div.scrollHeight === 0) {\n // debug.log(' chat/loadMoreWhereNeeded: trying later...')\n setTimeout(loadMoreWhereNeeded, 2000) // couple be less\n lock = false\n return // abandon now, do later\n }\n // debug.log(' chat/loadMoreWhereNeeded: Going now')\n const scrollBottom = div.scrollHeight - div.scrollTop\n debug.log('infinite scroll: adding above: top ' + div.scrollTop)\n done = await earliest.messageTable.extendBackwards()\n if (freeze) {\n div.scrollTop = div.scrollHeight - scrollBottom\n }\n if (fixScroll) fixScroll()\n if (done) break\n }\n while (\n options.selectedMessage && // we started in the middle not at the bottom\n div.scrollHeight - div.scrollTop - div.clientHeight < magicZone && // we are scrolled right to the bottom\n latest.messageTable &&\n !latest.messageTable.final && // there is more data to come\n latest.messageTable.extendForwards\n ) {\n const scrollTop = div.scrollTop\n debug.log(\n 'infinite scroll: adding below: bottom: ' +\n (div.scrollHeight - div.scrollTop - div.clientHeight)\n )\n done = await latest.messageTable.extendForwards() // then add more data on the bottom\n if (freeze) {\n div.scrollTop = scrollTop // while adding below keep same things in view\n }\n if (fixScroll) fixScroll()\n if (done) break\n }\n lock = false\n }\n\n async function loadInitialContent () {\n function yank () {\n if (selectedMessageTable && selectedMessageTable.selectedElement) {\n selectedMessageTable.selectedElement.scrollIntoView({ block: 'center' })\n }\n }\n\n // During initial load ONLY keep scroll to selected thing or bottom\n function fixScroll () {\n if (options.selectedElement) {\n options.selectedElement.scrollIntoView({ block: 'center' }) // align tops or bottoms\n } else {\n if (liveMessageTable.inputRow.scrollIntoView) {\n liveMessageTable.inputRow.scrollIntoView(newestFirst) // align tops or bottoms\n }\n }\n }\n\n let live, selectedDocument, threadRootDocument\n if (options.selectedMessage) {\n selectedDocument = options.selectedMessage.doc()\n }\n if (threadRootMessage) {\n threadRootDocument = threadRootMessage.doc()\n }\n const initialDocment = selectedDocument || threadRootDocument\n\n if (initialDocment) {\n const now = new Date()\n const todayDocument = dateFolder.leafDocumentFromDate(now)\n live = todayDocument.sameTerm(initialDocment)\n }\n\n let selectedMessageTable\n if (initialDocment && !live) {\n const selectedDate = dateFolder.dateFromLeafDocument(initialDocment)\n selectedMessageTable = await createMessageTable(selectedDate, live)\n div.appendChild(selectedMessageTable)\n earliest.messageTable = selectedMessageTable\n latest.messageTable = selectedMessageTable\n yank()\n setTimeout(yank, 1000) // @@ kludge - restore position distubed by other cHANGES\n } else {\n // Live end\n await appendCurrentMessages()\n earliest.messageTable = liveMessageTable\n latest.messageTable = liveMessageTable\n }\n\n await loadMoreWhereNeeded(null, fixScroll)\n div.addEventListener('scroll', loadMoreWhereNeeded)\n if (options.solo) {\n document.body.addEventListener('scroll', loadMoreWhereNeeded)\n }\n }\n\n // Body of main function\n\n options = options || {}\n options.authorDateOnLeft = false // @@ make a user optiosn\n const newestFirst = options.newestFirst === '1' || options.newestFirst === true // hack for now\n\n const channelObject = new ChatChannel(chatChannel, options)\n const dateFolder = channelObject.dateFolder\n\n const div = dom.createElement('div')\n channelObject.div = div\n\n const statusArea = div.appendChild(dom.createElement('div'))\n const userContext = { dom, statusArea, div: statusArea } // logged on state, pointers to user's stuff\n\n let liveMessageTable\n let threadRootMessage\n const earliest = { messageTable: null } // Stuff about each end of the loaded days\n const latest = { messageTable: null }\n\n if (options.thread) {\n const thread = options.thread\n threadRootMessage = store.any(null, ns.sioc('has_reply'), thread, thread.doc())\n if (threadRootMessage) {\n const threadTime = store.any(threadRootMessage, ns.dct('created'), null, threadRootMessage.doc())\n if (threadTime) {\n earliest.limit = new Date(threadTime.value)\n debug.log(' inifinite: thread start at ' + earliest.limit)\n }\n }\n }\n\n let lock = false\n\n await loadInitialContent()\n return div\n}\n"],"mappings":";;;;;;;;;;;;AAKA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,EAAA,GAAAL,uBAAA,CAAAC,OAAA;AAGA,IAAAK,OAAA,GAAAN,uBAAA,CAAAC,OAAA;AAGA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAiE,SAAAQ,yBAAAC,WAAA,eAA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,GAAG;YAAE9D,YAAY,EAAE;UAAK,CAAC,EAAC;UAClC+D,MAAM,GAAG;YAAE/D,YAAY,EAAE;UAAK,CAAC;UAErC,IAAIG,OAAO,CAAC6D,MAAM,EAAE;YACZA,MAAM,GAAG7D,OAAO,CAAC6D,MAAM;YAC7BH,iBAAiB,GAAGgE,iBAAK,CAAC2H,GAAG,CAAC,IAAI,EAAE9U,EAAE,CAAC+U,IAAI,CAAC,WAAW,CAAC,EAAEzL,MAAM,EAAEA,MAAM,CAACwB,GAAG,EAAE,CAAC;YAC/E,IAAI3B,iBAAiB,EAAE;cACfI,UAAU,GAAG4D,iBAAK,CAAC2H,GAAG,CAAC3L,iBAAiB,EAAEnJ,EAAE,CAACuW,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,EAAEpN,iBAAiB,CAAC2B,GAAG,EAAE,CAAC;cACjG,IAAIvB,UAAU,EAAE;gBACdH,QAAQ,CAAC6K,KAAK,GAAG,IAAIlJ,IAAI,CAACxB,UAAU,CAAC9G,KAAK,CAAC;gBAC3C3C,KAAK,CAACsM,GAAG,CAAC,8BAA8B,GAAGhD,QAAQ,CAAC6K,KAAK,CAAC;cAC5D;YACF;UACF;UAEIzK,IAAI,GAAG,KAAK;UAAAE,UAAA,CAAAxG,IAAA;UAAA,OAEV2F,kBAAkB,EAAE;QAAA;UAAA,OAAAa,UAAA,CAAA/C,MAAA,WACnBqC,GAAG;QAAA;QAAA;UAAA,OAAAU,UAAA,CAAAzC,IAAA;MAAA;IAAA,GAAAO,SAAA;EAAA,CACX;EAAA,OAAAD,oBAAA,CAAAxC,KAAA,OAAAC,SAAA;AAAA"}
|
package/lib/chat/messageTools.js
CHANGED
|
@@ -76,8 +76,8 @@ function ActionClassFromEmoji(emoji) {
|
|
|
76
76
|
return null;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
// Allow the
|
|
80
|
-
// or get the emoji from the class
|
|
79
|
+
// Allow the action to give its own emoji as content,
|
|
80
|
+
// or get the emoji from the class of action.
|
|
81
81
|
function emojiFromAction(action) {
|
|
82
82
|
var content = _solidLogic.store.any(action, ns.sioc('content'), null, action.doc());
|
|
83
83
|
if (content) return content;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTools.js","names":["debug","_interopRequireWildcard","require","_iconBase","ns","rdf","utils","widgets","_bookmarks","_solidLogic","_chatLogic","_message","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","dom","window","document","PENCIL_ICON","THUMBS_UP_ICON","THUMBS_DOWN_ICON","REPLY_ICON","emojiMap","schema","emojiFromActionClass","action","ActionClassFromEmoji","emoji","a","sym","slice","emojiFromAction","content","store","any","sioc","doc","klass","em","sentimentStrip","_x","_x2","_sentimentStrip","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","target","versions","actions","strings","wrap","_callee$","_context","prev","next","allVersions","sent","log","map","version","each","flat","abrupt","createTextNode","join","stop","sentimentStripLinked","_x3","_x4","_sentimentStripLinked","_callee3","strip","refresh","_refresh","_callee3$","_context3","_refresh3","_callee2","sentiments","_callee2$","_context2","innerHTML","isDeleted","length","sort","forEach","ss","_ss","_slicedToArray2","theClass","agent","res","createElement","setAttribute","uri","textContent","appendChild","_refresh2","then","messageToolbar","_x5","_x6","_x7","_x8","_messageToolbar","_callee10","message","messageRow","userContext","channelObject","deleteMessage","_deleteMessage","editMessage","_editMessage","replyInThread","_replyInThread","div","closeToolbar","deleteThingThen","_deleteThingThen","me","sentimentButton","context1","cancelButton","_callee10$","_context10","_sentimentButton","context","icon","actionClass","mutuallyExclusive","setColor","button","style","backgroundColor","label","_ref","_callee4","_event","insertMe","dirty","i","_callee4$","_context4","newThing","st","updater","update","existingAction","refreshTree","_x11","filter","x","holds","_deleteThingThen3","_callee9","_callee9$","_context9","connectedStatements","_deleteThingThen2","_x10","_closeToolbar","parentElement","removeChild","_replyInThread3","_callee8","thread","options","_callee8$","_context8","createThread","chatOptions","Error","showThread","_replyInThread2","_editMessage3","_callee7","_callee7$","_context7","value","foaf","switchToEditor","_editMessage2","_x9","_deleteMessage3","_callee6","author","msg","area","_callee6$","_context6","alert","sameTerm","t0","warn","statusArea","parentNode","errorMessageBlock","_deleteMessage2","mostRecentVersion","t1","authn","currentUser","deleteButtonWithCheck","icons","iconBase","renderBookmarksButton","bookmarkButton","t2","t3","t4","dct","_callee5","_callee5$","_context5","firstChild","opacity","addEventListener"],"sources":["../../src/chat/messageTools.js"],"sourcesContent":["/**\n * Tools for doing things with a message\n * Let us be creative here. Allow all sorts of things to\n * be done to a message - linking to new or old objects in an open way\n *\n * Ideas: Bookmark, Like, star, pin at top of chat, reply as new thread,\n * If you made it originally: edit, delete, attach\n * @packageDocumentation\n */\nimport * as debug from '../debug'\nimport { icons } from '../iconBase'\n// import { media } from '../media/index'\nimport * as ns from '../ns'\n// import * as pad from '../pad'\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// import * as style from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\nimport { renderBookmarksButton } from './bookmarks'\nimport { authn, store } from 'solid-logic'\n\nimport { allVersions, mostRecentVersion, isDeleted } from './chatLogic'\nimport { switchToEditor } from './message'\n\nconst dom = window.document\n\n// THE UNUSED ICONS are here as reminders for possible future functionality\n// const BOOKMARK_ICON = 'noun_45961.svg'\n// const HEART_ICON = 'noun_130259.svg' -> Add this to my (private) favorites\n// const MENU_ICON = 'noun_897914.svg'\n// const PAPERCLIP_ICON = 'noun_25830.svg' -> add attachments to this message\n// const PIN_ICON = 'noun_562340.svg' -> pin this message permanently in the chat UI\nconst PENCIL_ICON = 'noun_253504.svg' // edit a message\n// const SPANNER_ICON = 'noun_344563.svg' -> settings\nconst THUMBS_UP_ICON = 'noun_1384132.svg'\nconst THUMBS_DOWN_ICON = 'noun_1384135.svg'\nconst REPLY_ICON = 'noun-reply-5506924.svg'\n/**\n * Emoji in Unicode\n */\nconst emojiMap = {}\nemojiMap[ns.schema('AgreeAction')] = '👍'\nemojiMap[ns.schema('DisagreeAction')] = '👎'\nemojiMap[ns.schema('EndorseAction')] = '⭐️'\nemojiMap[ns.schema('LikeAction')] = '❤️'\n\nexport function emojiFromActionClass (action) {\n return emojiMap[action] || null\n}\n\nexport function ActionClassFromEmoji (emoji) {\n for (const a in emojiMap) {\n if (emojiMap[a] === emoji) {\n return rdf.sym(a.slice(1, -1)) // remove < >\n }\n }\n return null\n}\n\n// Allow the qction to give its own emoji as content,\n// or get the emoji from the class lof action.\nexport function emojiFromAction (action) {\n const content = store.any(action, ns.sioc('content'), null, action.doc())\n if (content) return content\n const klass = store.any(action, ns.rdf('type'), null, action.doc())\n if (klass) {\n const em = emojiFromActionClass(klass)\n if (em) return em\n }\n return '⬜️'\n}\n\n/**\n * Create strip of sentiments expressed\n */\nexport async function sentimentStrip (target, doc) { // alain seems not used\n const versions = await allVersions(target)\n debug.log('sentimentStrip Versions for ' + target, versions)\n const actions = versions.map(version => store.each(null, ns.schema('target'), version, doc)).flat()\n debug.log('sentimentStrip: Actions for ' + target, actions)\n const strings = actions.map(action => emojiFromAction(action) || '')\n return dom.createTextNode(strings.join(' '))\n}\n/**\n * Create strip of sentiments expressed, with hyperlinks\n *\n * @param target {NamedNode} - The thing about which they are expressed\n * @param doc {NamedNode} - The document in which they are expressed\n */\nexport async function sentimentStripLinked (target, doc) {\n const strip = dom.createElement('span')\n async function refresh () {\n strip.innerHTML = ''\n if (isDeleted(target)) return strip\n const versions = await allVersions(target)\n debug.log('sentimentStripLinked: Versions for ' + target, versions)\n const actions = versions.map(version => store.each(null, ns.schema('target'), version, doc)).flat()\n debug.log('sentimentStripLinked: Actions for ' + target, actions)\n if (actions.length === 0) return strip\n const sentiments = actions.map(a => [\n store.any(a, ns.rdf('type'), null, doc),\n store.any(a, ns.sioc('content'), null, doc),\n store.any(a, ns.schema('agent'), null, doc)\n ])\n debug.log(' Actions sentiments ', sentiments)\n sentiments.sort()\n sentiments.forEach(ss => {\n const [theClass, content, agent] = ss\n let res\n if (agent) {\n res = dom.createElement('a')\n res.setAttribute('href', agent.uri)\n } else {\n res = dom.createTextNode('')\n }\n res.textContent = content || emojiMap[theClass] || '⬜️'\n strip.appendChild(res)\n })\n debug.log(' Actions strip ', strip)\n }\n refresh().then(debug.log('sentimentStripLinked: sentimentStripLinked async refreshed'))\n strip.refresh = refresh\n return strip\n}\n/**\n * Creates a message toolbar component\n */\nexport async function messageToolbar (message, messageRow, userContext, channelObject) {\n async function deleteMessage () {\n const author = store.any(message, ns.foaf('maker'))\n if (!me) {\n alert('You can\\'t delete the message, you are not logged in.')\n } else if (me.sameTerm(author)) {\n try {\n await channelObject.deleteMessage(message)\n } catch (err) {\n const msg = 'Error deleting messaage ' + err\n debug.warn(msg)\n alert(msg)\n const area = userContext.statusArea || messageRow.parentNode\n area.appendChild(widgets.errorMessageBlock(dom, msg))\n }\n messageRow.parentNode.removeChild(messageRow)\n } else {\n alert('You can\\'t delete the message, you are not logged in as the author, ' + author)\n }\n closeToolbar()\n }\n\n async function editMessage (messageRow) {\n if (me.value === store.any(message, ns.foaf('maker')).value) {\n closeToolbar() // edit is a one-off action\n await switchToEditor(messageRow, message, channelObject, userContext)\n }\n }\n\n async function replyInThread () {\n const thread = await channelObject.createThread(message)\n const options = userContext.chatOptions\n if (!options) throw new Error('replyInThread: missing options')\n options.showThread(thread, options)\n closeToolbar() // a one-off action\n }\n\n // alain: TODO allow chat owner to fully delete message + sentiments and replacing messages\n\n const div = dom.createElement('div')\n // is message deleted ?\n if (await mostRecentVersion(message).value === ns.schema('dateDeleted').value) return div\n function closeToolbar () {\n div.parentElement.parentElement.removeChild(div.parentElement) // remive the TR\n }\n\n async function deleteThingThen (x) {\n await store.updater.update(store.connectedStatements(x), [])\n }\n\n // Things only the original author can do\n let me = authn.currentUser() // If already logged on\n if (me && store.holds(message, ns.foaf('maker'), me)) {\n // button to delete the message\n div.appendChild(widgets.deleteButtonWithCheck(dom, div, 'message', deleteMessage))\n // button to edit the message\n div.appendChild(widgets.button(dom, icons.iconBase + PENCIL_ICON, 'edit', () => editMessage(messageRow)))\n } // if mine\n // Things anyone can do if they have a bookmark list async\n /*\n var bookmarkButton = await bookmarks.renderBookmarksButton(userContext)\n if (bookmarkButton) {\n div.appendChild(bookmarkButton)\n }\n */\n // Things anyone can do if they have a bookmark list\n\n renderBookmarksButton(userContext).then(bookmarkButton => {\n if (bookmarkButton) div.appendChild(bookmarkButton)\n })\n\n /** Button to allow user to express a sentiment (like, endorse, etc) about a target\n *\n * @param context {Object} - Provide dom and me\n * @param target {NamedNode} - The thing the user expresses an opnion about\n * @param icon {uristring} - The icon to be used for the button\n * @param actionClass {NamedNode} - The RDF class - typically a subclass of schema:Action\n * @param doc - {NamedNode} - the Solid document iunto which the data should be written\n * @param mutuallyExclusive {Array<NamedNode>} - Any RDF classes of sentimentswhich are mutiually exclusive\n */\n function sentimentButton (\n context,\n target,\n icon,\n actionClass,\n doc,\n mutuallyExclusive\n ) {\n function setColor () {\n button.style.backgroundColor = action ? 'yellow' : 'white'\n }\n const button = widgets.button(\n dom,\n icon,\n utils.label(actionClass),\n async function (_event) {\n if (action) {\n await deleteThingThen(action)\n action = null\n setColor()\n } else {\n // no action\n action = widgets.newThing(doc)\n const insertMe = [\n rdf.st(action, ns.schema('agent'), context.me, doc),\n rdf.st(action, ns.rdf('type'), actionClass, doc),\n rdf.st(action, ns.schema('target'), target, doc)\n ]\n await store.updater.update([], insertMe)\n setColor()\n\n if (mutuallyExclusive) {\n // Delete incompative sentiments\n let dirty = false\n for (let i = 0; i < mutuallyExclusive.length; i++) {\n const a = existingAction(mutuallyExclusive[i])\n if (a) {\n await deleteThingThen(a) // but how refresh? refreshTree the parent?\n dirty = true\n }\n }\n if (dirty) {\n // widgets.refreshTree(button.parentNode) // requires them all to be immediate siblings\n widgets.refreshTree(messageRow) // requires them all to be immediate siblings\n }\n }\n }\n }\n )\n function existingAction (actionClass) {\n const actions = store\n .each(null, ns.schema('agent'), context.me, doc)\n .filter(x => store.holds(x, ns.rdf('type'), actionClass, doc))\n .filter(x => store.holds(x, ns.schema('target'), target, doc))\n return actions.length ? actions[0] : null\n }\n function refresh () {\n action = existingAction(actionClass)\n setColor()\n }\n let action\n button.refresh = refresh // If the file changes, refresh live\n refresh()\n return button\n }\n\n // THUMBS_UP_ICON\n // https://schema.org/AgreeAction\n me = authn.currentUser() // If already logged on\n\n if (me && (await mostRecentVersion(message).value !== ns.schema('dateDeleted').value)) {\n const context1 = { me, dom, div }\n div.appendChild(\n sentimentButton(\n context1,\n message, // @@ TODO use widgets.sentimentButton\n icons.iconBase + THUMBS_UP_ICON,\n ns.schema('AgreeAction'),\n message.doc(),\n [ns.schema('DisagreeAction')]\n )\n )\n // Thumbs down\n div.appendChild(\n sentimentButton(\n context1,\n message,\n icons.iconBase + THUMBS_DOWN_ICON,\n ns.schema('DisagreeAction'),\n message.doc(),\n [ns.schema('AgreeAction')]\n )\n )\n }\n // Reply buttton\n\n if (store.any(message, ns.dct('created'))) { // Looks like a messsage? Bar can be used for other things\n div.appendChild(widgets.button(dom, icons.iconBase + REPLY_ICON, 'Reply in thread', async () => {\n await replyInThread()\n }))\n }\n // X button to remove the tool UI itself\n const cancelButton = div.appendChild(widgets.cancelButton(dom))\n cancelButton.style.float = 'right'\n cancelButton.firstChild.style.opacity = '0.3'\n cancelButton.addEventListener('click', closeToolbar)\n return div\n}\n"],"mappings":";;;;;;;;;;;;;;;;AASA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,EAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,GAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAEA,IAAAI,KAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,UAA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AAY,CAAC4F,UAAU,CAAClF,KAAK,CAACmF,OAAO,GAAG,KAAK;UAC7C7F,YAAY,CAAC8F,gBAAgB,CAAC,OAAO,EAAEpG,YAAY,CAAC;UAAA,OAAAQ,UAAA,CAAA/D,MAAA,WAC7CsD,GAAG;QAAA;QAAA;UAAA,OAAAS,UAAA,CAAA5D,IAAA;MAAA;IAAA,GAAAwC,SAAA;EAAA,CACX;EAAA,OAAAD,eAAA,CAAAhE,KAAA,OAAAC,SAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"messageTools.js","names":["debug","_interopRequireWildcard","require","_iconBase","ns","rdf","utils","widgets","_bookmarks","_solidLogic","_chatLogic","_message","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","dom","window","document","PENCIL_ICON","THUMBS_UP_ICON","THUMBS_DOWN_ICON","REPLY_ICON","emojiMap","schema","emojiFromActionClass","action","ActionClassFromEmoji","emoji","a","sym","slice","emojiFromAction","content","store","any","sioc","doc","klass","em","sentimentStrip","_x","_x2","_sentimentStrip","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","target","versions","actions","strings","wrap","_callee$","_context","prev","next","allVersions","sent","log","map","version","each","flat","abrupt","createTextNode","join","stop","sentimentStripLinked","_x3","_x4","_sentimentStripLinked","_callee3","strip","refresh","_refresh","_callee3$","_context3","_refresh3","_callee2","sentiments","_callee2$","_context2","innerHTML","isDeleted","length","sort","forEach","ss","_ss","_slicedToArray2","theClass","agent","res","createElement","setAttribute","uri","textContent","appendChild","_refresh2","then","messageToolbar","_x5","_x6","_x7","_x8","_messageToolbar","_callee10","message","messageRow","userContext","channelObject","deleteMessage","_deleteMessage","editMessage","_editMessage","replyInThread","_replyInThread","div","closeToolbar","deleteThingThen","_deleteThingThen","me","sentimentButton","context1","cancelButton","_callee10$","_context10","_sentimentButton","context","icon","actionClass","mutuallyExclusive","setColor","button","style","backgroundColor","label","_ref","_callee4","_event","insertMe","dirty","i","_callee4$","_context4","newThing","st","updater","update","existingAction","refreshTree","_x11","filter","x","holds","_deleteThingThen3","_callee9","_callee9$","_context9","connectedStatements","_deleteThingThen2","_x10","_closeToolbar","parentElement","removeChild","_replyInThread3","_callee8","thread","options","_callee8$","_context8","createThread","chatOptions","Error","showThread","_replyInThread2","_editMessage3","_callee7","_callee7$","_context7","value","foaf","switchToEditor","_editMessage2","_x9","_deleteMessage3","_callee6","author","msg","area","_callee6$","_context6","alert","sameTerm","t0","warn","statusArea","parentNode","errorMessageBlock","_deleteMessage2","mostRecentVersion","t1","authn","currentUser","deleteButtonWithCheck","icons","iconBase","renderBookmarksButton","bookmarkButton","t2","t3","t4","dct","_callee5","_callee5$","_context5","firstChild","opacity","addEventListener"],"sources":["../../src/chat/messageTools.js"],"sourcesContent":["/**\n * Tools for doing things with a message\n * Let us be creative here. Allow all sorts of things to\n * be done to a message - linking to new or old objects in an open way\n *\n * Ideas: Bookmark, Like, star, pin at top of chat, reply as new thread,\n * If you made it originally: edit, delete, attach\n * @packageDocumentation\n */\nimport * as debug from '../debug'\nimport { icons } from '../iconBase'\n// import { media } from '../media/index'\nimport * as ns from '../ns'\n// import * as pad from '../pad'\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// import * as style from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\nimport { renderBookmarksButton } from './bookmarks'\nimport { authn, store } from 'solid-logic'\n\nimport { allVersions, mostRecentVersion, isDeleted } from './chatLogic'\nimport { switchToEditor } from './message'\n\nconst dom = window.document\n\n// THE UNUSED ICONS are here as reminders for possible future functionality\n// const BOOKMARK_ICON = 'noun_45961.svg'\n// const HEART_ICON = 'noun_130259.svg' -> Add this to my (private) favorites\n// const MENU_ICON = 'noun_897914.svg'\n// const PAPERCLIP_ICON = 'noun_25830.svg' -> add attachments to this message\n// const PIN_ICON = 'noun_562340.svg' -> pin this message permanently in the chat UI\nconst PENCIL_ICON = 'noun_253504.svg' // edit a message\n// const SPANNER_ICON = 'noun_344563.svg' -> settings\nconst THUMBS_UP_ICON = 'noun_1384132.svg'\nconst THUMBS_DOWN_ICON = 'noun_1384135.svg'\nconst REPLY_ICON = 'noun-reply-5506924.svg'\n/**\n * Emoji in Unicode\n */\nconst emojiMap = {}\nemojiMap[ns.schema('AgreeAction')] = '👍'\nemojiMap[ns.schema('DisagreeAction')] = '👎'\nemojiMap[ns.schema('EndorseAction')] = '⭐️'\nemojiMap[ns.schema('LikeAction')] = '❤️'\n\nexport function emojiFromActionClass (action) {\n return emojiMap[action] || null\n}\n\nexport function ActionClassFromEmoji (emoji) {\n for (const a in emojiMap) {\n if (emojiMap[a] === emoji) {\n return rdf.sym(a.slice(1, -1)) // remove < >\n }\n }\n return null\n}\n\n// Allow the action to give its own emoji as content,\n// or get the emoji from the class of action.\nexport function emojiFromAction (action) {\n const content = store.any(action, ns.sioc('content'), null, action.doc())\n if (content) return content\n const klass = store.any(action, ns.rdf('type'), null, action.doc())\n if (klass) {\n const em = emojiFromActionClass(klass)\n if (em) return em\n }\n return '⬜️'\n}\n\n/**\n * Create strip of sentiments expressed\n */\nexport async function sentimentStrip (target, doc) { // alain: seems not used\n const versions = await allVersions(target)\n debug.log('sentimentStrip Versions for ' + target, versions)\n const actions = versions.map(version => store.each(null, ns.schema('target'), version, doc)).flat()\n debug.log('sentimentStrip: Actions for ' + target, actions)\n const strings = actions.map(action => emojiFromAction(action) || '')\n return dom.createTextNode(strings.join(' '))\n}\n/**\n * Create strip of sentiments expressed, with hyperlinks\n *\n * @param target {NamedNode} - The thing about which they are expressed\n * @param doc {NamedNode} - The document in which they are expressed\n */\nexport async function sentimentStripLinked (target, doc) {\n const strip = dom.createElement('span')\n async function refresh () {\n strip.innerHTML = ''\n if (isDeleted(target)) return strip\n const versions = await allVersions(target)\n debug.log('sentimentStripLinked: Versions for ' + target, versions)\n const actions = versions.map(version => store.each(null, ns.schema('target'), version, doc)).flat()\n debug.log('sentimentStripLinked: Actions for ' + target, actions)\n if (actions.length === 0) return strip\n const sentiments = actions.map(a => [\n store.any(a, ns.rdf('type'), null, doc),\n store.any(a, ns.sioc('content'), null, doc),\n store.any(a, ns.schema('agent'), null, doc)\n ])\n debug.log(' Actions sentiments ', sentiments)\n sentiments.sort()\n sentiments.forEach(ss => {\n const [theClass, content, agent] = ss\n let res\n if (agent) {\n res = dom.createElement('a')\n res.setAttribute('href', agent.uri)\n } else {\n res = dom.createTextNode('')\n }\n res.textContent = content || emojiMap[theClass] || '⬜️'\n strip.appendChild(res)\n })\n debug.log(' Actions strip ', strip)\n }\n refresh().then(debug.log('sentimentStripLinked: sentimentStripLinked async refreshed'))\n strip.refresh = refresh\n return strip\n}\n/**\n * Creates a message toolbar component\n */\nexport async function messageToolbar (message, messageRow, userContext, channelObject) {\n async function deleteMessage () {\n const author = store.any(message, ns.foaf('maker'))\n if (!me) {\n alert('You can\\'t delete the message, you are not logged in.')\n } else if (me.sameTerm(author)) {\n try {\n await channelObject.deleteMessage(message)\n } catch (err) {\n const msg = 'Error deleting messaage ' + err\n debug.warn(msg)\n alert(msg)\n const area = userContext.statusArea || messageRow.parentNode\n area.appendChild(widgets.errorMessageBlock(dom, msg))\n }\n messageRow.parentNode.removeChild(messageRow)\n } else {\n alert('You can\\'t delete the message, you are not logged in as the author, ' + author)\n }\n closeToolbar()\n }\n\n async function editMessage (messageRow) {\n if (me.value === store.any(message, ns.foaf('maker')).value) {\n closeToolbar() // edit is a one-off action\n await switchToEditor(messageRow, message, channelObject, userContext)\n }\n }\n\n async function replyInThread () {\n const thread = await channelObject.createThread(message)\n const options = userContext.chatOptions\n if (!options) throw new Error('replyInThread: missing options')\n options.showThread(thread, options)\n closeToolbar() // a one-off action\n }\n\n // alain: TODO allow chat owner to fully delete message + sentiments and replacing messages\n\n const div = dom.createElement('div')\n // is message deleted ?\n if (await mostRecentVersion(message).value === ns.schema('dateDeleted').value) return div\n function closeToolbar () {\n div.parentElement.parentElement.removeChild(div.parentElement) // remive the TR\n }\n\n async function deleteThingThen (x) {\n await store.updater.update(store.connectedStatements(x), [])\n }\n\n // Things only the original author can do\n let me = authn.currentUser() // If already logged on\n if (me && store.holds(message, ns.foaf('maker'), me)) {\n // button to delete the message\n div.appendChild(widgets.deleteButtonWithCheck(dom, div, 'message', deleteMessage))\n // button to edit the message\n div.appendChild(widgets.button(dom, icons.iconBase + PENCIL_ICON, 'edit', () => editMessage(messageRow)))\n } // if mine\n // Things anyone can do if they have a bookmark list async\n /*\n var bookmarkButton = await bookmarks.renderBookmarksButton(userContext)\n if (bookmarkButton) {\n div.appendChild(bookmarkButton)\n }\n */\n // Things anyone can do if they have a bookmark list\n\n renderBookmarksButton(userContext).then(bookmarkButton => {\n if (bookmarkButton) div.appendChild(bookmarkButton)\n })\n\n /** Button to allow user to express a sentiment (like, endorse, etc) about a target\n *\n * @param context {Object} - Provide dom and me\n * @param target {NamedNode} - The thing the user expresses an opnion about\n * @param icon {uristring} - The icon to be used for the button\n * @param actionClass {NamedNode} - The RDF class - typically a subclass of schema:Action\n * @param doc - {NamedNode} - the Solid document iunto which the data should be written\n * @param mutuallyExclusive {Array<NamedNode>} - Any RDF classes of sentimentswhich are mutiually exclusive\n */\n function sentimentButton (\n context,\n target,\n icon,\n actionClass,\n doc,\n mutuallyExclusive\n ) {\n function setColor () {\n button.style.backgroundColor = action ? 'yellow' : 'white'\n }\n const button = widgets.button(\n dom,\n icon,\n utils.label(actionClass),\n async function (_event) {\n if (action) {\n await deleteThingThen(action)\n action = null\n setColor()\n } else {\n // no action\n action = widgets.newThing(doc)\n const insertMe = [\n rdf.st(action, ns.schema('agent'), context.me, doc),\n rdf.st(action, ns.rdf('type'), actionClass, doc),\n rdf.st(action, ns.schema('target'), target, doc)\n ]\n await store.updater.update([], insertMe)\n setColor()\n\n if (mutuallyExclusive) {\n // Delete incompative sentiments\n let dirty = false\n for (let i = 0; i < mutuallyExclusive.length; i++) {\n const a = existingAction(mutuallyExclusive[i])\n if (a) {\n await deleteThingThen(a) // but how refresh? refreshTree the parent?\n dirty = true\n }\n }\n if (dirty) {\n // widgets.refreshTree(button.parentNode) // requires them all to be immediate siblings\n widgets.refreshTree(messageRow) // requires them all to be immediate siblings\n }\n }\n }\n }\n )\n function existingAction (actionClass) {\n const actions = store\n .each(null, ns.schema('agent'), context.me, doc)\n .filter(x => store.holds(x, ns.rdf('type'), actionClass, doc))\n .filter(x => store.holds(x, ns.schema('target'), target, doc))\n return actions.length ? actions[0] : null\n }\n function refresh () {\n action = existingAction(actionClass)\n setColor()\n }\n let action\n button.refresh = refresh // If the file changes, refresh live\n refresh()\n return button\n }\n\n // THUMBS_UP_ICON\n // https://schema.org/AgreeAction\n me = authn.currentUser() // If already logged on\n\n if (me && (await mostRecentVersion(message).value !== ns.schema('dateDeleted').value)) {\n const context1 = { me, dom, div }\n div.appendChild(\n sentimentButton(\n context1,\n message, // @@ TODO use widgets.sentimentButton\n icons.iconBase + THUMBS_UP_ICON,\n ns.schema('AgreeAction'),\n message.doc(),\n [ns.schema('DisagreeAction')]\n )\n )\n // Thumbs down\n div.appendChild(\n sentimentButton(\n context1,\n message,\n icons.iconBase + THUMBS_DOWN_ICON,\n ns.schema('DisagreeAction'),\n message.doc(),\n [ns.schema('AgreeAction')]\n )\n )\n }\n // Reply buttton\n\n if (store.any(message, ns.dct('created'))) { // Looks like a messsage? Bar can be used for other things\n div.appendChild(widgets.button(dom, icons.iconBase + REPLY_ICON, 'Reply in thread', async () => {\n await replyInThread()\n }))\n }\n // X button to remove the tool UI itself\n const cancelButton = div.appendChild(widgets.cancelButton(dom))\n cancelButton.style.float = 'right'\n cancelButton.firstChild.style.opacity = '0.3'\n cancelButton.addEventListener('click', closeToolbar)\n return div\n}\n"],"mappings":";;;;;;;;;;;;;;;;AASA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,EAAA,GA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AAA,CACtB,GAAC,CAAC;UACL;UACA;UACMzF,YAAY,GAAGP,GAAG,CAACpB,WAAW,CAAC/G,OAAO,CAAC0I,YAAY,CAAC/G,GAAG,CAAC,CAAC;UAC/D+G,YAAY,CAACU,KAAK,SAAM,GAAG,OAAO;UAClCV,YAAY,CAAC4F,UAAU,CAAClF,KAAK,CAACmF,OAAO,GAAG,KAAK;UAC7C7F,YAAY,CAAC8F,gBAAgB,CAAC,OAAO,EAAEpG,YAAY,CAAC;UAAA,OAAAQ,UAAA,CAAA/D,MAAA,WAC7CsD,GAAG;QAAA;QAAA;UAAA,OAAAS,UAAA,CAAA5D,IAAA;MAAA;IAAA,GAAAwC,SAAA;EAAA,CACX;EAAA,OAAAD,eAAA,CAAAhE,KAAA,OAAAC,SAAA;AAAA"}
|
package/lib/chat/thread.js
CHANGED
|
@@ -402,7 +402,7 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
402
402
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
403
403
|
while (1) switch (_context5.prev = _context5.next) {
|
|
404
404
|
case 0:
|
|
405
|
-
// alain test for delete or edit depending on me = maker
|
|
405
|
+
// alain: test for delete or edit depending on me = maker
|
|
406
406
|
td3.removeChild(sureButton);
|
|
407
407
|
td3.removeChild(cancelButton);
|
|
408
408
|
// deleteMessage(message) // alain or sendMessage(message, 'delete' or 'edit') //alain
|