solid-ui 2.4.33-beta4-42e66c35 → 2.4.33-beta4-38e7fa0a

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.
@@ -1 +1 @@
1
- {"version":3,"file":"chatLogic.js","names":["debug","_interopRequireWildcard","require","_dateFolder","_solidLogic","ns","$rdf","utils","_signature","_keys","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ChatChannel","exports","channel","options","_classCallCheck2","channelRoot","doc","dateFolder","DateFolder","div","_createClass2","key","value","_createMessage","_asyncToGenerator2","_regenerator","mark","_callee","text","wrap","_callee$","_context","prev","next","abrupt","updateMessage","stop","createMessage","_x","apply","arguments","_updateMessage","_this","oldMsg","length","undefined","deleteIt","thread","_callee2","sts","now","timestamp","dateStamp","chatDocument","message","me","msg","oldMsgMaker","oldMsgMostRecentVersion","oldMsgThread","errMsg","privateKey","sig","_errMsg","_callee2$","_context2","Date","getTime","term","leafDocumentFromDate","store","sym","uri","authn","currentUser","getBlankMsg","id","any","foaf","mostRecentVersion","sent","push","st","dct","sioc","schema","warn","alert","Error","wf","literal","content","created","maker","getPrivateKey","signMsg","concat","SEC","lit","sameTerm","updater","updateMany","t0","_x2","_deleteMessage","_callee3","_callee3$","_context3","deleteMessage","_x3","_createThread","_callee4","threadRoot","already","insert","_callee4$","_context4","each","filter","holds","rdf","update","createThread","_x4","allVersions","_x5","_allVersions","_callee5","versions","done","m","_callee5$","_context5","fetcher","load","unshift","originalVersion","_x6","_originalVersion","_callee6","_callee6$","_context6","error","_x7","_mostRecentVersion","_callee7","_callee7$","_context7","isDeleted","isReplaced","isHidden","nick","person","s","label"],"sources":["../../src/chat/chatLogic.js"],"sourcesContent":["/**\n * Contains the [[ChatChannel]] class and logic for Solid Chat\n * @packageDocumentation\n */\n\nimport * as debug from '../debug'\nimport { DateFolder } from './dateFolder'\nimport { store, authn } from 'solid-logic'\nimport * as ns from '../ns'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as utils from '../utils'\nimport { getBlankMsg, signMsg, SEC, verifySignature } from './signature'\nimport { getPrivateKey, getPublicKey } from './keys'\n\n/* The Solid logic for a 'LongChat'\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 */\n\nexport class ChatChannel {\n constructor (channel, options) {\n this.channel = channel\n this.channelRoot = channel.doc()\n this.options = options\n this.dateFolder = new DateFolder(this.channelRoot, 'chat.ttl')\n this.div = null // : HTMLElement\n }\n\n /* Store a new message in the web,\n */\n async createMessage (text) {\n return this.updateMessage(text)\n }\n\n /* Store a new message in the web,\n as a replacement for an existing one.\n The old one iis left, and the two are linked\n */\n async updateMessage (text, oldMsg = null, deleteIt, thread = null) {\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n const chatDocument = oldMsg ? oldMsg.doc() : this.dateFolder.leafDocumentFromDate(now)\n const message = store.sym(chatDocument.uri + '#' + 'Msg' + timestamp)\n // const content = store.literal(text)\n\n const me = authn.currentUser() // If already logged on\n\n const msg = getBlankMsg()\n msg.id = message.uri\n if (oldMsg) { // edit message replaces old one\n const oldMsgMaker = store.any(oldMsg, ns.foaf('maker')) // may not be needed here, but needed on READ\n if (oldMsgMaker.uri === me.uri) {\n const oldMsgMostRecentVersion = await mostRecentVersion(oldMsg)\n sts.push($rdf.st(oldMsgMostRecentVersion, ns.dct('isReplacedBy'), message, chatDocument))\n // if oldMsg has_reply => add has_reply to message\n const oldMsgThread = store.any(oldMsgMostRecentVersion, ns.sioc('has_reply'))\n if (oldMsgThread) {\n sts.push($rdf.st(message, ns.sioc('has_reply'), oldMsgThread, chatDocument))\n }\n if (deleteIt) { // we need to add a specific signature, else anyone can delete a msg ?\n sts.push($rdf.st(message, ns.schema('dateDeleted'), dateStamp, chatDocument))\n }\n } else {\n const errMsg = 'Error you cannot delete/edit a message from someone else : \\n' + oldMsgMaker.uri\n debug.warn(errMsg)\n alert(errMsg)\n throw new Error(errMsg)\n }\n } else { // link new message to channel\n sts.push($rdf.st(this.channel, ns.wf('message'), message, chatDocument))\n }\n sts.push(\n $rdf.st(message, ns.sioc('content'), store.literal(text), chatDocument)\n )\n msg.content = text\n\n sts.push(\n $rdf.st(message, ns.dct('created'), dateStamp, chatDocument)\n )\n msg.created = dateStamp.value\n if (me) {\n sts.push($rdf.st(message, ns.foaf('maker'), me, chatDocument))\n msg.maker = me.uri\n // privateKey the cached private key of me, cached in store\n const privateKey = await getPrivateKey(me) // me.uri)\n\n const sig = signMsg(msg, privateKey)\n sts.push($rdf.st(message, $rdf.sym(`${SEC}proofValue`), $rdf.lit(sig), chatDocument))\n }\n if (thread) {\n sts.push($rdf.st(thread, ns.sioc('has_member'), message, chatDocument))\n if (!thread.doc().sameTerm(message.doc())) {\n sts.push($rdf.st(thread, ns.sioc('has_member'), message, thread.doc()))\n }\n }\n\n try {\n await store.updater.updateMany([], sts)\n } catch (err) {\n const errMsg = 'Error saving chat message: ' + err\n debug.warn(errMsg)\n alert(errMsg)\n throw new Error(errMsg)\n }\n return message\n }\n\n /* Mark a message as deleted\n * Wee add a new version of the message,m witha deletion flag (deletion date)\n * so that the deletion can be revoked by adding another non-deleted update\n */\n async deleteMessage (message) {\n return this.updateMessage('(message deleted)', message, true)\n }\n\n // Create a new thread of replies to the thread root message\n // or return one which already exists\n\n async createThread (threadRoot) {\n const already = store.each(threadRoot, ns.sioc('has_reply'), null, threadRoot.doc())\n .filter(thread => store.holds(thread, ns.rdf('type'), ns.sioc('Thread'), thread.doc()))\n if (already.length > 0) return already[0]\n\n const thread = $rdf.sym(threadRoot.uri + '-thread')\n const insert = [\n $rdf.st(thread, ns.rdf('type'), ns.sioc('Thread'), thread.doc()),\n $rdf.st(threadRoot, ns.sioc('has_reply'), thread, thread.doc())\n ]\n await store.updater.update([], insert)\n return thread\n }\n} // class ChatChannel\n\n// ////////// Utility functions\n\n// Have to not loop forever if fed loops\nexport async function allVersions (message) {\n const versions = [message]\n const done = {}\n done[message.uri] = true\n let m = message\n while (true) { // earlier?\n const prev = store.any(null, ns.dct('isReplacedBy'), m, m.doc())\n if (!prev || done[prev.uri]) break\n await store.fetcher.load(prev)\n versions.unshift(prev)\n done[prev.uri] = true\n m = prev\n }\n m = message\n while (true) { // later?\n const next = store.any(m, ns.dct('isReplacedBy'), null, m.doc())\n if (!next || done[next.uri]) break\n versions.push(next)\n done[next.uri] = true\n m = next\n }\n return versions\n}\n\nexport async function originalVersion (message) {\n let msg = message\n const done = {}\n // done[message.uri] = true\n while (msg) {\n if (done[msg.uri]) {\n debug.error('originalVersion: verion loop' + message)\n return message\n }\n done[msg.uri] = true\n message = msg\n await store.fetcher.load(message)\n msg = store.any(null, ns.dct('isReplacedBy'), message, message.doc())\n }\n return message\n}\n\nexport async function mostRecentVersion (message) {\n let msg = message\n const done = {}\n while (msg) {\n if (done[msg.uri]) {\n debug.error('mostRecentVersion: verion loop' + message)\n return message\n }\n done[msg.uri] = true\n message = msg\n await store.fetcher.load(message)\n msg = store.any(message, ns.dct('isReplacedBy'), null, message.doc())\n }\n return message\n}\n\nexport function isDeleted (message) {\n return store.holds(message, ns.schema('dateDeleted'), null, message.doc())\n}\n\nexport function isReplaced (message) {\n return store.holds(message, ns.dct('isReplacedBy'), null, message.doc())\n}\n\nexport function isHidden (message) {\n return this.isDeleted(message) || this.isReplaced(message)\n}\n\n// A Nickname for a person\n\nexport function nick (person) {\n const s = store.any(person, ns.foaf('nick'))\n if (s) return '' + s.value\n return '' + utils.label(person)\n}\n// ends\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,I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hG,OAAO,EAAE;EACjC,OAAO,IAAI,CAAC8F,SAAS,CAAC9F,OAAO,CAAC,IAAI,IAAI,CAAC+F,UAAU,CAAC/F,OAAO,CAAC;AAC5D;;AAEA;;AAEO,SAASiG,IAAIA,CAAEC,MAAM,EAAE;EAC5B,IAAMC,CAAC,GAAGnF,iBAAK,CAACO,GAAG,CAAC2E,MAAM,EAAEvK,EAAE,CAAC6F,IAAI,CAAC,MAAM,CAAC,CAAC;EAC5C,IAAI2E,CAAC,EAAE,OAAO,EAAE,GAAGA,CAAC,CAACnI,KAAK;EAC1B,OAAO,EAAE,GAAGnC,KAAK,CAACuK,KAAK,CAACF,MAAM,CAAC;AACjC;AACA","ignoreList":[]}
1
+ {"version":3,"file":"chatLogic.js","names":["debug","_interopRequireWildcard","require","_dateFolder","_solidLogic","ns","$rdf","utils","_signature","_keys","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ChatChannel","exports","channel","options","_classCallCheck2","channelRoot","doc","dateFolder","DateFolder","div","_createClass2","key","value","_createMessage","_asyncToGenerator2","_regenerator","mark","_callee","text","wrap","_callee$","_context","prev","next","abrupt","updateMessage","stop","createMessage","_x","apply","arguments","_updateMessage","_this","oldMsg","length","undefined","deleteIt","thread","_callee2","sts","now","timestamp","dateStamp","chatDocument","message","me","msg","oldMsgMaker","oldMsgMostRecentVersion","oldMsgThread","errMsg","privateKey","sig","_errMsg","_callee2$","_context2","Date","getTime","term","leafDocumentFromDate","store","sym","uri","authn","currentUser","getBlankMsg","id","any","foaf","mostRecentVersion","sent","push","st","dct","sioc","schema","warn","alert","Error","wf","literal","content","created","maker","getPrivateKey","signMsg","concat","SEC","lit","sameTerm","updater","updateMany","t0","_x2","_deleteMessage","_callee3","_callee3$","_context3","deleteMessage","_x3","_createThread","_callee4","threadRoot","already","insert","_callee4$","_context4","each","filter","holds","rdf","update","createThread","_x4","allVersions","_x5","_allVersions","_callee5","versions","done","m","_callee5$","_context5","fetcher","load","unshift","originalVersion","_x6","_originalVersion","_callee6","_callee6$","_context6","error","_x7","_mostRecentVersion","_callee7","_callee7$","_context7","isDeleted","isReplaced","isHidden","nick","person","s","label"],"sources":["../../src/chat/chatLogic.js"],"sourcesContent":["/**\n * Contains the [[ChatChannel]] class and logic for Solid Chat\n * @packageDocumentation\n */\n\nimport * as debug from '../debug'\nimport { DateFolder } from './dateFolder'\nimport { store, authn } from 'solid-logic'\nimport * as ns from '../ns'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as utils from '../utils'\nimport { getBlankMsg, signMsg, SEC } from './signature'\nimport { getPrivateKey } from './keys'\n\n/* The Solid logic for a 'LongChat'\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 */\n\nexport class ChatChannel {\n constructor (channel, options) {\n this.channel = channel\n this.channelRoot = channel.doc()\n this.options = options\n this.dateFolder = new DateFolder(this.channelRoot, 'chat.ttl')\n this.div = null // : HTMLElement\n }\n\n /* Store a new message in the web,\n */\n async createMessage (text) {\n return this.updateMessage(text)\n }\n\n /* Store a new message in the web,\n as a replacement for an existing one.\n The old one iis left, and the two are linked\n */\n async updateMessage (text, oldMsg = null, deleteIt, thread = null) {\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n const chatDocument = oldMsg ? oldMsg.doc() : this.dateFolder.leafDocumentFromDate(now)\n const message = store.sym(chatDocument.uri + '#' + 'Msg' + timestamp)\n // const content = store.literal(text)\n\n const me = authn.currentUser() // If already logged on\n\n const msg = getBlankMsg()\n msg.id = message.uri\n if (oldMsg) { // edit message replaces old one\n const oldMsgMaker = store.any(oldMsg, ns.foaf('maker')) // may not be needed here, but needed on READ\n if (oldMsgMaker.uri === me.uri) {\n const oldMsgMostRecentVersion = await mostRecentVersion(oldMsg)\n sts.push($rdf.st(oldMsgMostRecentVersion, ns.dct('isReplacedBy'), message, chatDocument))\n // if oldMsg has_reply => add has_reply to message\n const oldMsgThread = store.any(oldMsgMostRecentVersion, ns.sioc('has_reply'))\n if (oldMsgThread) {\n sts.push($rdf.st(message, ns.sioc('has_reply'), oldMsgThread, chatDocument))\n }\n if (deleteIt) { // we need to add a specific signature, else anyone can delete a msg ?\n sts.push($rdf.st(message, ns.schema('dateDeleted'), dateStamp, chatDocument))\n }\n } else {\n const errMsg = 'Error you cannot delete/edit a message from someone else : \\n' + oldMsgMaker.uri\n debug.warn(errMsg)\n alert(errMsg)\n throw new Error(errMsg)\n }\n } else { // link new message to channel\n sts.push($rdf.st(this.channel, ns.wf('message'), message, chatDocument))\n }\n sts.push(\n $rdf.st(message, ns.sioc('content'), store.literal(text), chatDocument)\n )\n msg.content = text\n\n sts.push(\n $rdf.st(message, ns.dct('created'), dateStamp, chatDocument)\n )\n msg.created = dateStamp.value\n if (me) {\n sts.push($rdf.st(message, ns.foaf('maker'), me, chatDocument))\n msg.maker = me.uri\n // privateKey the cached private key of me, cached in store\n const privateKey = await getPrivateKey(me) // me.uri)\n\n const sig = signMsg(msg, privateKey)\n sts.push($rdf.st(message, $rdf.sym(`${SEC}proofValue`), $rdf.lit(sig), chatDocument))\n }\n if (thread) {\n sts.push($rdf.st(thread, ns.sioc('has_member'), message, chatDocument))\n if (!thread.doc().sameTerm(message.doc())) {\n sts.push($rdf.st(thread, ns.sioc('has_member'), message, thread.doc()))\n }\n }\n\n try {\n await store.updater.updateMany([], sts)\n } catch (err) {\n const errMsg = 'Error saving chat message: ' + err\n debug.warn(errMsg)\n alert(errMsg)\n throw new Error(errMsg)\n }\n return message\n }\n\n /* Mark a message as deleted\n * Wee add a new version of the message,m witha deletion flag (deletion date)\n * so that the deletion can be revoked by adding another non-deleted update\n */\n async deleteMessage (message) {\n return this.updateMessage('(message deleted)', message, true)\n }\n\n // Create a new thread of replies to the thread root message\n // or return one which already exists\n\n async createThread (threadRoot) {\n const already = store.each(threadRoot, ns.sioc('has_reply'), null, threadRoot.doc())\n .filter(thread => store.holds(thread, ns.rdf('type'), ns.sioc('Thread'), thread.doc()))\n if (already.length > 0) return already[0]\n\n const thread = $rdf.sym(threadRoot.uri + '-thread')\n const insert = [\n $rdf.st(thread, ns.rdf('type'), ns.sioc('Thread'), thread.doc()),\n $rdf.st(threadRoot, ns.sioc('has_reply'), thread, thread.doc())\n ]\n await store.updater.update([], insert)\n return thread\n }\n} // class ChatChannel\n\n// ////////// Utility functions\n\n// Have to not loop forever if fed loops\nexport async function allVersions (message) {\n const versions = [message]\n const done = {}\n done[message.uri] = true\n let m = message\n while (true) { // earlier?\n const prev = store.any(null, ns.dct('isReplacedBy'), m, m.doc())\n if (!prev || done[prev.uri]) break\n await store.fetcher.load(prev)\n versions.unshift(prev)\n done[prev.uri] = true\n m = prev\n }\n m = message\n while (true) { // later?\n const next = store.any(m, ns.dct('isReplacedBy'), null, m.doc())\n if (!next || done[next.uri]) break\n versions.push(next)\n done[next.uri] = true\n m = next\n }\n return versions\n}\n\nexport async function originalVersion (message) {\n let msg = message\n const done = {}\n // done[message.uri] = true\n while (msg) {\n if (done[msg.uri]) {\n debug.error('originalVersion: verion loop' + message)\n return message\n }\n done[msg.uri] = true\n message = msg\n await store.fetcher.load(message)\n msg = store.any(null, ns.dct('isReplacedBy'), message, message.doc())\n }\n return message\n}\n\nexport async function mostRecentVersion (message) {\n let msg = message\n const done = {}\n while (msg) {\n if (done[msg.uri]) {\n debug.error('mostRecentVersion: verion loop' + message)\n return message\n }\n done[msg.uri] = true\n message = msg\n await store.fetcher.load(message)\n msg = store.any(message, ns.dct('isReplacedBy'), null, message.doc())\n }\n return message\n}\n\nexport function isDeleted (message) {\n return store.holds(message, ns.schema('dateDeleted'), null, message.doc())\n}\n\nexport function isReplaced (message) {\n return store.holds(message, ns.dct('isReplacedBy'), null, message.doc())\n}\n\nexport function isHidden (message) {\n return this.isDeleted(message) || this.isReplaced(message)\n}\n\n// A Nickname for a person\n\nexport function nick (person) {\n const s = store.any(person, ns.foaf('nick'))\n if (s) return '' + s.value\n return '' + utils.label(person)\n}\n// ends\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,EAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,IAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,KAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAAsC,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,E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,EAAE/B,OAAO,CAACtC,GAAG,CAAC,CAAC,CAAC;AAC5E;AAEO,SAASqI,UAAUA,CAAE/F,OAAO,EAAE;EACnC,OAAOgB,iBAAK,CAACiD,KAAK,CAACjE,OAAO,EAAErE,EAAE,CAACkG,GAAG,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE7B,OAAO,CAACtC,GAAG,CAAC,CAAC,CAAC;AAC1E;AAEO,SAASsI,QAAQA,CAAEhG,OAAO,EAAE;EACjC,OAAO,IAAI,CAAC8F,SAAS,CAAC9F,OAAO,CAAC,IAAI,IAAI,CAAC+F,UAAU,CAAC/F,OAAO,CAAC;AAC5D;;AAEA;;AAEO,SAASiG,IAAIA,CAAEC,MAAM,EAAE;EAC5B,IAAMC,CAAC,GAAGnF,iBAAK,CAACO,GAAG,CAAC2E,MAAM,EAAEvK,EAAE,CAAC6F,IAAI,CAAC,MAAM,CAAC,CAAC;EAC5C,IAAI2E,CAAC,EAAE,OAAO,EAAE,GAAGA,CAAC,CAACnI,KAAK;EAC1B,OAAO,EAAE,GAAGnC,KAAK,CAACuK,KAAK,CAACF,MAAM,CAAC;AACjC;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"infinite.js","names":["$rdf","_interopRequireWildcard","require","_solidLogic","debug","_iconBase","ns","widgets","_chatLogic","_message","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","F","s","done","value","_e2","f","TypeError","normalCompletion","didErr","err","step","next","_e3","minLen","_arrayLikeToArray","prototype","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","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","createIfNotExists","response","status","log","errorMessageBlock","_createMessageTable2","_x16","_x17","_removePreviousMessag","backwards","previousSibling","extr","_insertPreviousMessag2","_callee4","extremity","todayDoc","newMessageTable","_callee4$","_context4","limit","loadPrevious","_insertPreviousMessag","_x15","_addMessage3","_callee3","id","_callee3$","_context3","isDeleted","showDeletedMessages","any","sioc","_addMessage2","_x13","_x14","_syncMessages3","_callee2","displayed","ele2","messages","stored","_iterator","_step","m","_callee2$","_context2","AJAR_subject","uri","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 const messages = store.each(chatChannel, ns.wf('message'), null, messageTable.chatDocument)\n\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 if (!messageTable.fresh) { // if messageTable has been updated with insertMessageIntoTable() don't do it again\n // debug.log('@@@ infinite insertMessageIntoTable ' + message) // alain\n // debug.log('fresh ' + messageTable.fresh)\n // debug.log(messageTable)\n await insertMessageIntoTable(channelObject,\n messageTable,\n message,\n messageTable.fresh,\n options,\n userContext\n ) // fresh from elsewhere\n }\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 if (!liveMessageTable) await appendCurrentMessages() // If necessary skip to today and add that\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.createIfNotExists(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 // message table updated with insertMessageIntoTable()\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(' infinite: 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,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAA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G;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,GAAG+D,iBAAK,CAAC0H,GAAG,CAAC,IAAI,EAAExU,EAAE,CAACyU,IAAI,CAAC,WAAW,CAAC,EAAEvL,MAAM,EAAEA,MAAM,CAACwB,GAAG,CAAC,CAAC,CAAC;YAC/E,IAAI3B,iBAAiB,EAAE;cACfI,UAAU,GAAG2D,iBAAK,CAAC0H,GAAG,CAACzL,iBAAiB,EAAE/I,EAAE,CAACiW,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,EAAElN,iBAAiB,CAAC2B,GAAG,CAAC,CAAC,CAAC;cACjG,IAAIvB,UAAU,EAAE;gBACdH,QAAQ,CAAC6K,KAAK,GAAG,IAAIlJ,IAAI,CAACxB,UAAU,CAAC9G,KAAK,CAAC;gBAC3C;cACF;YACF;UACF;UAEI+G,IAAI,GAAG,KAAK;UAAAE,UAAA,CAAAzG,IAAA;UAAA,OAEV4F,kBAAkB,CAAC,CAAC;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","ignoreList":[]}
1
+ {"version":3,"file":"infinite.js","names":["$rdf","_interopRequireWildcard","require","_solidLogic","debug","_iconBase","ns","widgets","_chatLogic","_message","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","F","s","done","value","_e2","f","TypeError","normalCompletion","didErr","err","step","next","_e3","minLen","_arrayLikeToArray","prototype","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","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","createIfNotExists","response","status","log","errorMessageBlock","_createMessageTable2","_x16","_x17","_removePreviousMessag","backwards","previousSibling","extr","_insertPreviousMessag2","_callee4","extremity","todayDoc","newMessageTable","_callee4$","_context4","limit","loadPrevious","_insertPreviousMessag","_x15","_addMessage3","_callee3","id","_callee3$","_context3","isDeleted","showDeletedMessages","any","sioc","_addMessage2","_x13","_x14","_syncMessages3","_callee2","displayed","ele2","messages","stored","_iterator","_step","m","_callee2$","_context2","AJAR_subject","uri","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 } 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 const messages = store.each(chatChannel, ns.wf('message'), null, messageTable.chatDocument)\n\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 if (!messageTable.fresh) { // if messageTable has been updated with insertMessageIntoTable() don't do it again\n // debug.log('@@@ infinite insertMessageIntoTable ' + message) // alain\n // debug.log('fresh ' + messageTable.fresh)\n // debug.log(messageTable)\n await insertMessageIntoTable(channelObject,\n messageTable,\n message,\n messageTable.fresh,\n options,\n userContext\n ) // fresh from elsewhere\n }\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 if (!liveMessageTable) await appendCurrentMessages() // If necessary skip to today and add that\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.createIfNotExists(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 // message table updated with insertMessageIntoTable()\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(' infinite: 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,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,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.versionInfo = void 0;
7
7
  var versionInfo = exports.versionInfo = {
8
- buildTime: '2024-04-03T14:34:34Z',
9
- commit: '42e66c35a105904b59fcf17b8cfb491e38f0c9f9',
8
+ buildTime: '2024-04-03T14:49:14Z',
9
+ commit: '38e7fa0a85caa177f7a64744e092cba899ec5510',
10
10
  npmInfo: {
11
11
  'solid-ui': '2.4.33-beta4',
12
12
  npm: '8.19.4',
@@ -1 +1 @@
1
- {"version":3,"file":"versionInfo.js","names":["versionInfo","exports","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2024-04-03T14:34:34Z',\n commit: '42e66c35a105904b59fcf17b8cfb491e38f0c9f9',\n npmInfo:\n{\n 'solid-ui': '2.4.33-beta4',\n npm: '8.19.4',\n node: '16.20.2',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1v+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,cAAc;IAC1BC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"versionInfo.js","names":["versionInfo","exports","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2024-04-03T14:49:14Z',\n commit: '38e7fa0a85caa177f7a64744e092cba899ec5510',\n npmInfo:\n{\n 'solid-ui': '2.4.33-beta4',\n npm: '8.19.4',\n node: '16.20.2',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1v+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,cAAc;IAC1BC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ui",
3
- "version": "2.4.33-beta4-42e66c35",
3
+ "version": "2.4.33-beta4-38e7fa0a",
4
4
  "description": "UI library for writing Solid read-write-web applications",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",