chat-pane 2.4.19 → 2.4.20

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":"longChatPane.js","names":["ns","UI","mainClass","meeting","CHAT_LOCATION_IN_CONTAINER","SPANNER_ICON","SIDEBAR_COMPONENT_STYLE","style","sidebarComponentStyle","SIDEBAR_STYLE","sidebarStyle","longChatPane","icon","icons","iconBase","name","label","subject","context","kb","session","store","holds","rdf","any","sioc","dct","mintClass","mintNew","newPaneOptions","updater","me","uri","Error","newInstance","sym","newBase","newChatDoc","doc","add","dc","Date","Promise","resolve","reject","put","statementsMatching","undefined","uri2","ok","message","render","paneOptions","dom","preferencesFormText","preferencesForm","preferencesFormDoc","$rdf","parse","preferenceProperties","ui","property","map","st","object","renderPreferencesSidebar","noun","preferencesArea","createElement","appendChild","panelCloseButton","minWidth","maxHeight","triptychHeight","menuTable","registrationArea","statusArea","authn","currentUser","login","registrationControl","div","chatChannel","console","log","preferences","renderPreferencesForm","panel","removePanel","parentNode","removeChild","button","widgets","margin","backgroundColor","preferencesButtonPressed","_event","paneRight","contains","renderCreationControl","refreshTarget","creationDiv","creationContext","chatPane","paneRegistry","byName","relevantPanes","create","newThingUI","renderInstances","theClass","instancesDiv","registrationList","type","otherChatsArea","otherChatsHandler","paneLeft","participantsArea","participantsHandler","alert","pad","manageParticipation","selectedMessage","wf","triptych","paneRow","paneMiddle","paneBottom","paddingRight","paddingLeft","buttonCell","participantsIcon","participantsButton","addEventListener","otherChatsIcon","otherChatsButton","menuButton","setAttribute","options","infinite","participantsHandlerContext","buildPane","getPreferencesForClass","prefMap","complain","propuri","split","solo","infiniteMessageArea","chatControl","resize","overflow","then"],"sources":["../src/longChatPane.js"],"sourcesContent":["/* Long Chat Pane\n **\n ** A long chat consists a of a series of chat files saved by date.\n */\nimport { authn } from 'solid-logic'\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nconst mainClass = ns.meeting('LongChat') // @@ something from SIOC?\n\nconst CHAT_LOCATION_IN_CONTAINER = 'index.ttl#this'\n\n// const menuIcon = 'noun_897914.svg'\nconst SPANNER_ICON = 'noun_344563.svg'\n// resize: horizontal; min-width: 20em;\nconst SIDEBAR_COMPONENT_STYLE = UI.style.sidebarComponentStyle || ' padding: 0.5em; width: 100%;'\nconst SIDEBAR_STYLE = UI.style.sidebarStyle || 'overflow-x: auto; overflow-y: auto; border-radius: 1em; border: 0.1em solid white;'\n// was purple border\nexport const longChatPane = {\n CHAT_LOCATION_IN_CONTAINER,\n\n // noun_704.svg Canoe noun_346319.svg = 1 Chat noun_1689339.svg = three chat\n icon: UI.icons.iconBase + 'noun_1689339.svg',\n\n name: 'long chat',\n\n label: function (subject, context) {\n const kb = context.session.store\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) {\n // subject is the object\n return 'Chat channnel'\n } // Looks like a message -- might not havre any class declared\n if (\n kb.any(subject, ns.sioc('content')) &&\n kb.any(subject, ns.dct('created'))\n ) {\n return 'message'\n }\n return null // Suppress pane otherwise\n },\n\n mintClass: mainClass,\n\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n var updater = kb.updater\n if (newPaneOptions.me && !newPaneOptions.me.uri) {\n throw new Error('chat mintNew: Invalid userid ' + newPaneOptions.me)\n }\n\n var newInstance = (newPaneOptions.newInstance =\n newPaneOptions.newInstance ||\n kb.sym(newPaneOptions.newBase + CHAT_LOCATION_IN_CONTAINER))\n var newChatDoc = newInstance.doc()\n\n kb.add(newInstance, ns.rdf('type'), ns.meeting('LongChat'), newChatDoc)\n kb.add(newInstance, ns.dc('title'), 'Chat channel', newChatDoc)\n kb.add(newInstance, ns.dc('created'), new Date(), newChatDoc)\n if (newPaneOptions.me) {\n kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc)\n }\n\n return new Promise(function (resolve, reject) {\n updater.put(\n newChatDoc,\n kb.statementsMatching(undefined, undefined, undefined, newChatDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n resolve(newPaneOptions)\n } else {\n reject(\n new Error(\n 'FAILED to save new chat channel at: ' + uri2 + ' : ' + message\n )\n )\n }\n }\n )\n })\n },\n\n render: function (subject, context, paneOptions) {\n const dom = context.dom\n const kb = context.session.store\n\n /* Preferences\n **\n ** Things like whether to color text by author webid, to expand image URLs inline,\n ** expanded inline image height. ...\n ** In general, preferences can be set per user, per user/app combo, per instance,\n ** and per instance/user combo. Per instance? not sure about unless it is valuable\n ** for everyone to be seeing the same thing.\n */\n // const DCT = $rdf.Namespace('http://purl.org/dc/terms/')\n const preferencesFormText = `\n @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n @prefix solid: <http://www.w3.org/ns/solid/terms#>.\n @prefix ui: <http://www.w3.org/ns/ui#>.\n @prefix : <#>.\n\n :this\n <http://purl.org/dc/elements/1.1/title> \"Chat preferences\" ;\n a ui:Form ;\n ui:parts ( :colorizeByAuthor :expandImagesInline :newestFirst :inlineImageHeightEms\n :shiftEnterSendsMessage :authorDateOnLeft :showDeletedMessages).\n\n :colorizeByAuthor a ui:TristateField; ui:property solid:colorizeByAuthor;\n ui:label \"Color user input by user\".\n\n :expandImagesInline a ui:TristateField; ui:property solid:expandImagesInline;\n ui:label \"Expand image URLs inline\".\n\n :newestFirst a ui:TristateField; ui:property solid:newestFirst;\n ui:label \"Newest messages at the top\".\n\n :inlineImageHeightEms a ui:IntegerField; ui:property solid:inlineImageHeightEms;\n ui:label \"Inline image height (lines)\".\n\n :shiftEnterSendsMessage a ui:TristateField; ui:property solid:shiftEnterSendsMessage;\n ui:label \"Shift-Enter sends message\".\n\n :authorDateOnLeft a ui:TristateField; ui:property solid:authorDateOnLeft;\n ui:label \"Author & date of message on left\".\n\n :showDeletedMessages a ui:TristateField; ui:property solid:showDeletedMessages;\n ui:label \"Show placeholders for deleted messages\".\n`\n const preferencesForm = kb.sym(\n 'https://solid.github.io/solid-panes/longCharPane/preferencesForm.ttl#this'\n )\n const preferencesFormDoc = preferencesForm.doc()\n if (!kb.holds(undefined, undefined, undefined, preferencesFormDoc)) {\n // If not loaded already\n $rdf.parse(preferencesFormText, kb, preferencesFormDoc.uri, 'text/turtle') // Load form directly\n }\n const preferenceProperties = kb\n .statementsMatching(null, ns.ui.property, null, preferencesFormDoc)\n .map(st => st.object)\n\n // Preferences Menu\n //\n // Build a menu a the side (@@ reactive: on top?)\n\n async function renderPreferencesSidebar (context) {\n // const noun = 'chat room'\n const { dom, noun } = context\n const preferencesArea = dom.createElement('div')\n preferencesArea.appendChild(panelCloseButton(preferencesArea))\n // @@ style below fix .. just make it onviious while testing\n preferencesArea.style = SIDEBAR_COMPONENT_STYLE\n preferencesArea.style.minWidth = '25em' // bit bigger\n preferencesArea.style.maxHeight = triptychHeight\n const menuTable = preferencesArea.appendChild(dom.createElement('table'))\n const registrationArea = menuTable.appendChild(dom.createElement('tr'))\n const statusArea = menuTable.appendChild(dom.createElement('tr'))\n\n var me = authn.currentUser()\n if (me) {\n await UI.login.registrationControl(\n { noun, me, statusArea, dom, div: registrationArea },\n chatChannel,\n mainClass\n )\n console.log('Registration control finsished.')\n preferencesArea.appendChild(\n UI.preferences.renderPreferencesForm(\n chatChannel,\n mainClass,\n preferencesForm,\n {\n noun,\n me,\n statusArea,\n div: preferencesArea,\n dom,\n kb\n }\n )\n )\n }\n return preferencesArea\n }\n\n // @@ Split out into solid-ui\n\n function panelCloseButton (panel) {\n function removePanel () {\n panel.parentNode.removeChild(panel)\n }\n const button =\n UI.widgets.button(context.dom, UI.icons.iconBase + 'noun_1180156.svg', 'close', removePanel)\n button.style.float = 'right'\n button.style.margin = '0.7em'\n delete button.style.backgroundColor // do not want white\n return button\n }\n async function preferencesButtonPressed (_event) {\n if (!preferencesArea) {\n // Expand\n preferencesArea = await renderPreferencesSidebar({ dom, noun: 'chat room' })\n }\n if (paneRight.contains(preferencesArea)) {\n // Close menu (hide or delete??)\n preferencesArea.parentNode.removeChild(preferencesArea)\n preferencesArea = null\n } else {\n paneRight.appendChild(preferencesArea)\n }\n } // preferencesButtonPressed\n\n // All my chats\n //\n /* Build a other chats list drawer the side\n */\n\n function renderCreationControl (refreshTarget, noun) {\n var creationDiv = dom.createElement('div')\n var me = authn.currentUser()\n var creationContext = {\n // folder: subject,\n div: creationDiv,\n dom: dom,\n noun: noun,\n statusArea: creationDiv,\n me: me,\n refreshTarget: refreshTarget\n }\n const chatPane = context.session.paneRegistry.byName('chat')\n const relevantPanes = [chatPane]\n UI.create.newThingUI(creationContext, context, relevantPanes) // Have to pass panes down newUI\n return creationDiv\n }\n\n async function renderInstances (theClass, noun) {\n const instancesDiv = dom.createElement('div')\n var context = { dom, div: instancesDiv, noun: noun }\n await UI.login.registrationList(context, { public: true, private: true, type: theClass })\n instancesDiv.appendChild(renderCreationControl(instancesDiv, noun))\n return instancesDiv\n }\n\n var otherChatsArea = null\n async function otherChatsHandler (_event) {\n if (!otherChatsArea) { // Lazy build when needed\n // Expand\n otherChatsArea = dom.createElement('div')\n otherChatsArea.style = SIDEBAR_COMPONENT_STYLE\n otherChatsArea.style.maxHeight = triptychHeight\n otherChatsArea.appendChild(panelCloseButton(otherChatsArea))\n\n otherChatsArea.appendChild(await renderInstances(ns.meeting('LongChat'), 'chat'))\n }\n // Toggle visibility with button clicks\n if (paneLeft.contains(otherChatsArea)) {\n otherChatsArea.parentNode.removeChild(otherChatsArea)\n } else {\n paneLeft.appendChild(otherChatsArea)\n }\n } // otherChatsHandler\n\n // People in the chat\n //\n /* Build a participants list drawer the side\n */\n var participantsArea\n function participantsHandler (_event) {\n if (!participantsArea) {\n // Expand\n participantsArea = dom.createElement('div')\n participantsArea.style = SIDEBAR_COMPONENT_STYLE\n participantsArea.style.maxHeight = triptychHeight\n participantsArea.appendChild(panelCloseButton(participantsArea))\n\n // Record my participation and display participants\n var me = authn.currentUser()\n if (!me) alert('Should be logeed in for partipants panel')\n UI.pad.manageParticipation(\n dom,\n participantsArea,\n chatChannel.doc(),\n chatChannel,\n me,\n {}\n )\n }\n // Toggle appearance in sidebar with clicks\n // Note also it can remove itself using the X button\n if (paneLeft.contains(participantsArea)) {\n // Close participants (hide or delete??)\n participantsArea.parentNode.removeChild(participantsArea)\n participantsArea = null\n } else {\n paneLeft.appendChild(participantsArea)\n }\n } // participantsHandler\n\n var chatChannel = subject\n var selectedMessage = null\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) {\n // subject is the chatChannel\n console.log('Chat channnel')\n\n // Looks like a message -- might not havre any class declared\n } else if (\n kb.any(subject, ns.sioc('content')) &&\n kb.any(subject, ns.dct('created'))\n ) {\n console.log('message')\n selectedMessage = subject\n chatChannel = kb.any(null, ns.wf('message'), selectedMessage)\n if (!chatChannel) throw new Error('Message has no link to chatChannel')\n }\n\n var div = dom.createElement('div')\n\n // Three large columns for particpant, chat, Preferences. formula below just as a note\n // const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight\n const triptychHeight = '20cm' // @@ need to be able to set to window!\n var triptych = div.appendChild(dom.createElement('table'))\n triptych.style.maxHeight = '12\"' // Screen max\n var paneRow = triptych.appendChild(dom.createElement('tr'))\n var paneLeft = paneRow.appendChild(dom.createElement('td'))\n var paneMiddle = paneRow.appendChild(dom.createElement('td'))\n var paneRight = paneRow.appendChild(dom.createElement('td'))\n var paneBottom = triptych.appendChild(dom.createElement('tr'))\n paneLeft.style = SIDEBAR_STYLE\n paneLeft.style.paddingRight = '1em'\n paneRight.style = SIDEBAR_STYLE\n paneRight.style.paddingLeft = '1em'\n\n paneBottom.appendChild(dom.createElement('td'))\n const buttonCell = paneBottom.appendChild(dom.createElement('td'))\n paneBottom.appendChild(dom.createElement('td'))\n\n // Button to bring up participants drawer on left\n const participantsIcon = 'noun_339237.svg'\n var participantsButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + participantsIcon,\n 'participants ...'\n ) // wider var\n buttonCell.appendChild(participantsButton)\n participantsButton.addEventListener('click', participantsHandler)\n\n // Button to bring up otherChats drawer on left\n const otherChatsIcon = 'noun_1689339.svg' // long chat icon -- not ideal for a set of chats @@\n var otherChatsButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + otherChatsIcon,\n 'List of other chats ...'\n ) // wider var\n buttonCell.appendChild(otherChatsButton)\n otherChatsButton.addEventListener('click', otherChatsHandler)\n\n var preferencesArea = null\n const menuButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + SPANNER_ICON,\n 'Setting ...'\n ) // wider var\n buttonCell.appendChild(menuButton)\n menuButton.style.float = 'right'\n menuButton.addEventListener('click', preferencesButtonPressed)\n\n div.setAttribute('class', 'chatPane')\n const options = { infinite: true }\n const participantsHandlerContext = { noun: 'chat room', div, dom: dom }\n participantsHandlerContext.me = authn.currentUser() // If already logged on\n\n async function buildPane () {\n let prefMap\n try {\n prefMap = await UI.preferences.getPreferencesForClass(\n chatChannel, mainClass, preferenceProperties, participantsHandlerContext)\n } catch (err) {\n UI.widgets.complain(participantsHandlerContext, err)\n }\n for (const propuri in prefMap) {\n options[propuri.split('#')[1]] = prefMap[propuri]\n }\n if (selectedMessage) {\n options.selectedMessage = selectedMessage\n }\n if (paneOptions.solo) {\n // This is the top pane, title, scrollbar etc are ours\n options.solo = true\n }\n const chatControl = await UI.infiniteMessageArea(\n dom,\n kb,\n chatChannel,\n options\n )\n chatControl.style.resize = 'both'\n chatControl.style.overflow = 'auto'\n chatControl.style.maxHeight = triptychHeight\n paneMiddle.appendChild(chatControl)\n }\n buildPane().then(console.log('async - chat pane built'))\n return div\n }\n}\n"],"mappings":";;;;;;;;;AAIA;;AACA;;AACA;;;;;;+CALA,oJ;;;;;;AAMA,IAAMA,EAAE,GAAGC,EAAE,CAACD,EAAd;AAEA,IAAME,SAAS,GAAGF,EAAE,CAACG,OAAH,CAAW,UAAX,CAAlB,C,CAAyC;;AAEzC,IAAMC,0BAA0B,GAAG,gBAAnC,C,CAEA;;AACA,IAAMC,YAAY,GAAG,iBAArB,C,CACA;;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kBgJ,QAAlB,GAA6B,MAA7B;gBACAF,WAAW,CAAC9I,KAAZ,CAAkBiE,SAAlB,GAA8BC,cAA9B;gBACAqD,UAAU,CAACzD,WAAX,CAAuBgF,WAAvB;;cA3BF;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,CAhS+C;MAAA;IAAA;;IA6T/CR,SAAS,GAAGW,IAAZ,CAAiBrE,OAAO,CAACC,GAAR,CAAY,yBAAZ,CAAjB;IACA,OAAOH,GAAP;EACD;AA/XyB,CAArB"}
1
+ {"version":3,"file":"longChatPane.js","names":["ns","UI","mainClass","meeting","CHAT_LOCATION_IN_CONTAINER","SPANNER_ICON","SIDEBAR_COMPONENT_STYLE","style","sidebarComponentStyle","SIDEBAR_STYLE","sidebarStyle","longChatPane","icon","icons","iconBase","name","label","subject","context","kb","session","store","holds","rdf","any","sioc","dct","mintClass","mintNew","newPaneOptions","updater","me","uri","Error","newInstance","sym","newBase","newChatDoc","doc","add","dc","Date","Promise","resolve","reject","put","statementsMatching","undefined","uri2","ok","message","render","paneOptions","dom","preferencesFormText","preferencesForm","preferencesFormDoc","$rdf","parse","preferenceProperties","ui","property","map","st","object","renderPreferencesSidebar","noun","preferencesArea","createElement","appendChild","panelCloseButton","minWidth","maxHeight","triptychHeight","menuTable","registrationArea","statusArea","authn","currentUser","login","registrationControl","div","chatChannel","console","log","preferences","renderPreferencesForm","panel","removePanel","parentNode","removeChild","button","widgets","margin","backgroundColor","preferencesButtonPressed","_event","paneRight","contains","renderCreationControl","refreshTarget","creationDiv","creationContext","chatPane","paneRegistry","byName","relevantPanes","create","newThingUI","renderInstances","theClass","instancesDiv","registrationList","type","otherChatsArea","otherChatsHandler","paneLeft","participantsArea","participantsHandler","alert","pad","manageParticipation","selectedMessage","wf","triptych","paneRow","paneMiddle","paneBottom","paddingRight","paddingLeft","buttonCell","participantsIcon","participantsButton","addEventListener","otherChatsIcon","otherChatsButton","menuButton","setAttribute","options","infinite","participantsHandlerContext","buildPane","getPreferencesForClass","prefMap","complain","propuri","split","solo","infiniteMessageArea","chatControl","resize","overflow","then"],"sources":["../src/longChatPane.js"],"sourcesContent":["/* Long Chat Pane\n **\n ** A long chat consists a of a series of chat files saved by date.\n */\nimport { authn } from 'solid-logic'\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nconst mainClass = ns.meeting('LongChat') // @@ something from SIOC?\n\nconst CHAT_LOCATION_IN_CONTAINER = 'index.ttl#this'\n\n// const menuIcon = 'noun_897914.svg'\nconst SPANNER_ICON = 'noun_344563.svg'\n// resize: horizontal; min-width: 20em;\nconst SIDEBAR_COMPONENT_STYLE = UI.style.sidebarComponentStyle || ' padding: 0.5em; width: 100%;'\nconst SIDEBAR_STYLE = UI.style.sidebarStyle || 'overflow-x: auto; overflow-y: auto; border-radius: 1em; border: 0.1em solid white;'\n// was purple border\nexport const longChatPane = {\n CHAT_LOCATION_IN_CONTAINER,\n\n // noun_704.svg Canoe noun_346319.svg = 1 Chat noun_1689339.svg = three chat\n icon: UI.icons.iconBase + 'noun_1689339.svg',\n\n name: 'long chat',\n\n label: function (subject, context) {\n const kb = context.session.store\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) {\n // subject is the object\n return 'Chat channnel'\n } // Looks like a message -- might not havre any class declared\n if (\n kb.any(subject, ns.sioc('content')) &&\n kb.any(subject, ns.dct('created'))\n ) {\n return 'message'\n }\n return null // Suppress pane otherwise\n },\n\n mintClass: mainClass,\n\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n var updater = kb.updater\n if (newPaneOptions.me && !newPaneOptions.me.uri) {\n throw new Error('chat mintNew: Invalid userid ' + newPaneOptions.me)\n }\n\n var newInstance = (newPaneOptions.newInstance =\n newPaneOptions.newInstance ||\n kb.sym(newPaneOptions.newBase + CHAT_LOCATION_IN_CONTAINER))\n var newChatDoc = newInstance.doc()\n\n kb.add(newInstance, ns.rdf('type'), ns.meeting('LongChat'), newChatDoc)\n kb.add(newInstance, ns.dc('title'), 'Chat channel', newChatDoc)\n kb.add(newInstance, ns.dc('created'), new Date(), newChatDoc)\n if (newPaneOptions.me) {\n kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc)\n }\n\n return new Promise(function (resolve, reject) {\n updater.put(\n newChatDoc,\n kb.statementsMatching(undefined, undefined, undefined, newChatDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n resolve(newPaneOptions)\n } else {\n reject(\n new Error(\n 'FAILED to save new chat channel at: ' + uri2 + ' : ' + message\n )\n )\n }\n }\n )\n })\n },\n\n render: function (subject, context, paneOptions) {\n const dom = context.dom\n const kb = context.session.store\n\n /* Preferences\n **\n ** Things like whether to color text by author webid, to expand image URLs inline,\n ** expanded inline image height. ...\n ** In general, preferences can be set per user, per user/app combo, per instance,\n ** and per instance/user combo. Per instance? not sure about unless it is valuable\n ** for everyone to be seeing the same thing.\n */\n // const DCT = $rdf.Namespace('http://purl.org/dc/terms/')\n const preferencesFormText = `\n @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n @prefix solid: <http://www.w3.org/ns/solid/terms#>.\n @prefix ui: <http://www.w3.org/ns/ui#>.\n @prefix : <#>.\n\n :this\n <http://purl.org/dc/elements/1.1/title> \"Chat preferences\" ;\n a ui:Form ;\n ui:parts ( :colorizeByAuthor :expandImagesInline :newestFirst :inlineImageHeightEms\n :shiftEnterSendsMessage :authorDateOnLeft :showDeletedMessages).\n\n :colorizeByAuthor a ui:TristateField; ui:property solid:colorizeByAuthor;\n ui:label \"Color user input by user\".\n\n :expandImagesInline a ui:TristateField; ui:property solid:expandImagesInline;\n ui:label \"Expand image URLs inline\".\n\n :newestFirst a ui:TristateField; ui:property solid:newestFirst;\n ui:label \"Newest messages at the top\".\n\n :inlineImageHeightEms a ui:IntegerField; ui:property solid:inlineImageHeightEms;\n ui:label \"Inline image height (lines)\".\n\n :shiftEnterSendsMessage a ui:TristateField; ui:property solid:shiftEnterSendsMessage;\n ui:label \"Shift-Enter sends message\".\n\n :authorDateOnLeft a ui:TristateField; ui:property solid:authorDateOnLeft;\n ui:label \"Author & date of message on left\".\n\n :showDeletedMessages a ui:TristateField; ui:property solid:showDeletedMessages;\n ui:label \"Show placeholders for deleted messages\".\n`\n const preferencesForm = kb.sym(\n 'https://solid.github.io/solid-panes/longCharPane/preferencesForm.ttl#this'\n )\n const preferencesFormDoc = preferencesForm.doc()\n if (!kb.holds(undefined, undefined, undefined, preferencesFormDoc)) {\n // If not loaded already\n $rdf.parse(preferencesFormText, kb, preferencesFormDoc.uri, 'text/turtle') // Load form directly\n }\n const preferenceProperties = kb\n .statementsMatching(null, ns.ui.property, null, preferencesFormDoc)\n .map(st => st.object)\n\n // Preferences Menu\n //\n // Build a menu a the side (@@ reactive: on top?)\n\n async function renderPreferencesSidebar (context) {\n // const noun = 'chat room'\n const { dom, noun } = context\n const preferencesArea = dom.createElement('div')\n preferencesArea.appendChild(panelCloseButton(preferencesArea))\n // @@ style below fix .. just make it onviious while testing\n preferencesArea.style = SIDEBAR_COMPONENT_STYLE\n preferencesArea.style.minWidth = '25em' // bit bigger\n preferencesArea.style.maxHeight = triptychHeight\n const menuTable = preferencesArea.appendChild(dom.createElement('table'))\n const registrationArea = menuTable.appendChild(dom.createElement('tr'))\n const statusArea = menuTable.appendChild(dom.createElement('tr'))\n\n var me = authn.currentUser()\n if (me) {\n await UI.login.registrationControl(\n { noun, me, statusArea, dom, div: registrationArea },\n chatChannel,\n mainClass\n )\n console.log('Registration control finsished.')\n preferencesArea.appendChild(\n UI.preferences.renderPreferencesForm(\n chatChannel,\n mainClass,\n preferencesForm,\n {\n noun,\n me,\n statusArea,\n div: preferencesArea,\n dom,\n kb\n }\n )\n )\n }\n return preferencesArea\n }\n\n // @@ Split out into solid-ui\n\n function panelCloseButton (panel) {\n function removePanel () {\n panel.parentNode.removeChild(panel)\n }\n const button =\n UI.widgets.button(context.dom, UI.icons.iconBase + 'noun_1180156.svg', 'close', removePanel)\n button.style.float = 'right'\n button.style.margin = '0.7em'\n delete button.style.backgroundColor // do not want white\n return button\n }\n async function preferencesButtonPressed (_event) {\n if (!preferencesArea) {\n // Expand\n preferencesArea = await renderPreferencesSidebar({ dom, noun: 'chat room' })\n }\n if (paneRight.contains(preferencesArea)) {\n // Close menu (hide or delete??)\n preferencesArea.parentNode.removeChild(preferencesArea)\n preferencesArea = null\n } else {\n paneRight.appendChild(preferencesArea)\n }\n } // preferencesButtonPressed\n\n // All my chats\n //\n /* Build a other chats list drawer the side\n */\n\n function renderCreationControl (refreshTarget, noun) {\n var creationDiv = dom.createElement('div')\n var me = authn.currentUser()\n var creationContext = {\n // folder: subject,\n div: creationDiv,\n dom: dom,\n noun: noun,\n statusArea: creationDiv,\n me: me,\n refreshTarget: refreshTarget\n }\n const chatPane = context.session.paneRegistry.byName('chat')\n const relevantPanes = [chatPane]\n UI.create.newThingUI(creationContext, context, relevantPanes) // Have to pass panes down newUI\n return creationDiv\n }\n\n async function renderInstances (theClass, noun) {\n const instancesDiv = dom.createElement('div')\n var context = { dom, div: instancesDiv, noun: noun }\n await UI.login.registrationList(context, { public: true, private: true, type: theClass })\n instancesDiv.appendChild(renderCreationControl(instancesDiv, noun))\n return instancesDiv\n }\n\n var otherChatsArea = null\n async function otherChatsHandler (_event) {\n if (!otherChatsArea) { // Lazy build when needed\n // Expand\n otherChatsArea = dom.createElement('div')\n otherChatsArea.style = SIDEBAR_COMPONENT_STYLE\n otherChatsArea.style.maxHeight = triptychHeight\n otherChatsArea.appendChild(panelCloseButton(otherChatsArea))\n\n otherChatsArea.appendChild(await renderInstances(ns.meeting('LongChat'), 'chat'))\n }\n // Toggle visibility with button clicks\n if (paneLeft.contains(otherChatsArea)) {\n otherChatsArea.parentNode.removeChild(otherChatsArea)\n } else {\n paneLeft.appendChild(otherChatsArea)\n }\n } // otherChatsHandler\n\n // People in the chat\n //\n /* Build a participants list drawer the side\n */\n var participantsArea\n function participantsHandler (_event) {\n if (!participantsArea) {\n // Expand\n participantsArea = dom.createElement('div')\n participantsArea.style = SIDEBAR_COMPONENT_STYLE\n participantsArea.style.maxHeight = triptychHeight\n participantsArea.appendChild(panelCloseButton(participantsArea))\n\n // Record my participation and display participants\n var me = authn.currentUser()\n if (!me) alert('Should be logeed in for partipants panel')\n UI.pad.manageParticipation(\n dom,\n participantsArea,\n chatChannel.doc(),\n chatChannel,\n me,\n {}\n )\n }\n // Toggle appearance in sidebar with clicks\n // Note also it can remove itself using the X button\n if (paneLeft.contains(participantsArea)) {\n // Close participants (hide or delete??)\n participantsArea.parentNode.removeChild(participantsArea)\n participantsArea = null\n } else {\n paneLeft.appendChild(participantsArea)\n }\n } // participantsHandler\n\n var chatChannel = subject\n var selectedMessage = null\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) {\n // subject is the chatChannel\n console.log('Chat channnel')\n\n // Looks like a message -- might not havre any class declared\n } else if (\n kb.any(subject, ns.sioc('content')) &&\n kb.any(subject, ns.dct('created'))\n ) {\n console.log('message')\n selectedMessage = subject\n chatChannel = kb.any(null, ns.wf('message'), selectedMessage)\n if (!chatChannel) throw new Error('Message has no link to chatChannel')\n }\n\n var div = dom.createElement('div')\n\n // Three large columns for particpant, chat, Preferences. formula below just as a note\n // const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight\n const triptychHeight = '20cm' // @@ need to be able to set to window!\n var triptych = div.appendChild(dom.createElement('table'))\n triptych.style.maxHeight = '12\"' // Screen max\n var paneRow = triptych.appendChild(dom.createElement('tr'))\n var paneLeft = paneRow.appendChild(dom.createElement('td'))\n var paneMiddle = paneRow.appendChild(dom.createElement('td'))\n var paneRight = paneRow.appendChild(dom.createElement('td'))\n var paneBottom = triptych.appendChild(dom.createElement('tr'))\n paneLeft.style = SIDEBAR_STYLE\n paneLeft.style.paddingRight = '1em'\n paneRight.style = SIDEBAR_STYLE\n paneRight.style.paddingLeft = '1em'\n\n paneBottom.appendChild(dom.createElement('td'))\n const buttonCell = paneBottom.appendChild(dom.createElement('td'))\n paneBottom.appendChild(dom.createElement('td'))\n\n // Button to bring up participants drawer on left\n const participantsIcon = 'noun_339237.svg'\n var participantsButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + participantsIcon,\n 'participants ...'\n ) // wider var\n buttonCell.appendChild(participantsButton)\n participantsButton.addEventListener('click', participantsHandler)\n\n // Button to bring up otherChats drawer on left\n const otherChatsIcon = 'noun_1689339.svg' // long chat icon -- not ideal for a set of chats @@\n var otherChatsButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + otherChatsIcon,\n 'List of other chats ...'\n ) // wider var\n buttonCell.appendChild(otherChatsButton)\n otherChatsButton.addEventListener('click', otherChatsHandler)\n\n var preferencesArea = null\n const menuButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + SPANNER_ICON,\n 'Setting ...'\n ) // wider var\n buttonCell.appendChild(menuButton)\n menuButton.style.float = 'right'\n menuButton.addEventListener('click', preferencesButtonPressed)\n\n div.setAttribute('class', 'chatPane')\n const options = { infinite: true }\n const participantsHandlerContext = { noun: 'chat room', div, dom: dom }\n participantsHandlerContext.me = authn.currentUser() // If already logged on\n\n async function buildPane () {\n let prefMap\n try {\n prefMap = await UI.preferences.getPreferencesForClass(\n chatChannel, mainClass, preferenceProperties, participantsHandlerContext)\n } catch (err) {\n UI.widgets.complain(participantsHandlerContext, err)\n }\n for (const propuri in prefMap) {\n options[propuri.split('#')[1]] = prefMap[propuri]\n }\n if (selectedMessage) {\n options.selectedMessage = selectedMessage\n }\n if (paneOptions.solo) {\n // This is the top pane, title, scrollbar etc are ours\n options.solo = true\n }\n const chatControl = await UI.infiniteMessageArea(\n dom,\n kb,\n chatChannel,\n options\n )\n chatControl.style.resize = 'both'\n chatControl.style.overflow = 'auto'\n chatControl.style.maxHeight = triptychHeight\n paneMiddle.appendChild(chatControl)\n }\n buildPane().then(console.log('async - chat pane built'))\n return div\n }\n}\n"],"mappings":";;;;;;;AAIA;AACA;AACA;AAA8B;AAAA;AAAA,+CAL9B;AAA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.js CHANGED
@@ -21,10 +21,7 @@ Object.defineProperty(exports, "shortChatPane", {
21
21
  return _shortChatPane.shortChatPane;
22
22
  }
23
23
  });
24
-
25
24
  var _shortChatPane = require("./shortChatPane");
26
-
27
25
  var _longChatPane = require("./longChatPane");
28
-
29
26
  var _create = require("./create");
30
27
  //# sourceMappingURL=main.js.map
package/lib/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","names":[],"sources":["../src/main.js"],"sourcesContent":["export { shortChatPane } from './shortChatPane'\nexport { longChatPane } from './longChatPane'\nexport { getChat } from './create'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA"}
1
+ {"version":3,"file":"main.js","names":[],"sources":["../src/main.js"],"sourcesContent":["export { shortChatPane } from './shortChatPane'\nexport { longChatPane } from './longChatPane'\nexport { getChat } from './create'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA"}
@@ -1,32 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.shortChatPane = void 0;
9
-
10
8
  var _solidLogic = require("solid-logic");
11
-
12
9
  var UI = _interopRequireWildcard(require("solid-ui"));
13
-
14
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
12
  /* Chat Pane
19
13
  **
20
14
  ** Plan is to support a finte number of chat graph shapes
21
15
  ** and investigate the interop between them.
22
16
  */
23
-
24
17
  /* global $rdf */
18
+
25
19
  var ns = UI.ns;
26
20
  var shortChatPane = {
27
21
  icon: UI.icons.iconBase + 'noun_346319.svg',
28
22
  name: 'chat',
29
-
30
23
  /*
31
24
  * As part of the work on merging the existing chat views (aka panes) into one view
32
25
  * https://github.com/solid/chat-pane/issues/17
@@ -35,7 +28,6 @@ var shortChatPane = {
35
28
  * but we still want existing resources to be viewed by the Small Chat view
36
29
  */
37
30
  audience: [ns.solid('PowerUser')],
38
-
39
31
  /* AN RRSAgent IRC log:
40
32
  <irc://localhost:6667/&mit>
41
33
  a foaf:ChatChannel
@@ -55,6 +47,7 @@ var shortChatPane = {
55
47
  "timbl has joined &mit"
56
48
  a foaf:chatEvent.
57
49
  */
50
+
58
51
  label: function label(subject, context) {
59
52
  var kb = context.session.store;
60
53
  var n = kb.each(subject, ns.wf('message')).length;
@@ -64,7 +57,6 @@ var shortChatPane = {
64
57
  // subject is the file
65
58
  return 'Meeting chat';
66
59
  }
67
-
68
60
  if (kb.holds(undefined, ns.rdf('type'), ns.foaf('ChatChannel'), subject)) {
69
61
  // subject is the file
70
62
  return 'IRC log'; // contains anything of this type
@@ -72,25 +64,22 @@ var shortChatPane = {
72
64
 
73
65
  return null; // Suppress pane otherwise
74
66
  },
67
+
75
68
  mintClass: ns.meeting('Chat'),
76
69
  mintNew: function mintNew(context, newPaneOptions) {
77
70
  var kb = context.session.store;
78
71
  var updater = kb.updater;
79
-
80
72
  if (newPaneOptions.me && !newPaneOptions.me.uri) {
81
73
  throw new Error('chat mintNew: Invalid userid ' + newPaneOptions.me);
82
74
  }
83
-
84
75
  var newInstance = newPaneOptions.newInstance = newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase + 'index.ttl#this');
85
76
  var newChatDoc = newInstance.doc();
86
77
  kb.add(newInstance, ns.rdf('type'), ns.meeting('Chat'), newChatDoc);
87
78
  kb.add(newInstance, ns.dc('title'), 'Chat', newChatDoc);
88
79
  kb.add(newInstance, ns.dc('created'), new Date(), newChatDoc);
89
-
90
80
  if (newPaneOptions.me) {
91
81
  kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc);
92
82
  }
93
-
94
83
  return new Promise(function (resolve, reject) {
95
84
  updater.put(newChatDoc, kb.statementsMatching(undefined, undefined, undefined, newChatDoc), 'text/turtle', function (uri2, ok, message) {
96
85
  if (ok) {
@@ -104,20 +93,16 @@ var shortChatPane = {
104
93
  render: function render(subject, context) {
105
94
  var kb = context.session.store;
106
95
  var dom = context.dom;
107
-
108
96
  var complain = function complain(message, color) {
109
97
  var pre = dom.createElement('pre');
110
98
  pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';');
111
99
  div.appendChild(pre);
112
100
  pre.appendChild(dom.createTextNode(message));
113
101
  };
114
-
115
102
  var div = dom.createElement('div');
116
103
  div.setAttribute('class', 'chatPane');
117
104
  var options = {}; // Like newestFirst
118
-
119
105
  var messageStore;
120
-
121
106
  if (kb.holds(subject, ns.rdf('type'), ns.meeting('Chat'))) {
122
107
  // subject may be the file
123
108
  messageStore = subject.doc();
@@ -133,22 +118,20 @@ var shortChatPane = {
133
118
  query.vars.push(v[x] = $rdf.variable(x));
134
119
  });
135
120
  query.pat.add(v.chan, ns.foaf('chatEventList'), v.list); // chatEventList
136
-
137
121
  query.pat.add(v.list, v.pred, v.msg); //
138
-
139
122
  query.pat.add(v.msg, ns.dc('date'), v.date);
140
123
  query.pat.add(v.msg, ns.dc('creator'), v.creator);
141
124
  query.pat.add(v.msg, ns.dc('description'), v.content);
142
125
  return query;
143
126
  };
144
-
145
127
  messageStore = subject.doc();
146
128
  options.query = ircLogQuery();
147
129
  } else {
148
130
  complain('Unknown chat type');
149
- } // var context = {dom, div}
150
- // UI.authn.logIn(context).then( context => { // The widget itself sees to login
131
+ }
151
132
 
133
+ // var context = {dom, div}
134
+ // UI.authn.logIn(context).then( context => { // The widget itself sees to login
152
135
 
153
136
  div.appendChild(UI.messageArea(dom, kb, subject, messageStore, options));
154
137
  kb.updater.addDownstreamChangeListener(messageStore, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"shortChatPane.js","names":["ns","UI","shortChatPane","icon","icons","iconBase","name","audience","solid","label","subject","context","kb","session","store","n","each","wf","length","holds","rdf","meeting","undefined","foaf","mintClass","mintNew","newPaneOptions","updater","me","uri","Error","newInstance","sym","newBase","newChatDoc","doc","add","dc","Date","Promise","resolve","reject","put","statementsMatching","uri2","ok","message","render","dom","complain","color","pre","createElement","setAttribute","div","appendChild","createTextNode","options","messageStore","any","ircLogQuery","query","$rdf","Query","v","vv","map","x","vars","push","variable","pat","chan","list","pred","msg","date","creator","content","messageArea","addDownstreamChangeListener","widgets","refreshTree"],"sources":["../src/shortChatPane.js"],"sourcesContent":["/* Chat Pane\n **\n ** Plan is to support a finte number of chat graph shapes\n ** and investigate the interop between them.\n */\n/* global $rdf */\nimport { store } from 'solid-logic'\nimport * as UI from 'solid-ui'\n\nconst ns = UI.ns\n\nexport const shortChatPane = {\n icon: UI.icons.iconBase + 'noun_346319.svg',\n\n name: 'chat',\n\n /*\n * As part of the work on merging the existing chat views (aka panes) into one view\n * https://github.com/solid/chat-pane/issues/17\n * we want to dis-incentivize the use of Small Chat until we've gotten the work done\n * by making it difficult to create new data resources that uses the Small Chat view\n * but we still want existing resources to be viewed by the Small Chat view\n */\n audience: [ns.solid('PowerUser')],\n\n /* AN RRSAgent IRC log:\n\n <irc://localhost:6667/&mit>\n a foaf:ChatChannel\n foaf:chatEventList\n [ rdf:_100\n <#T19-10-58>\n rdf:_101\n <#T19-10-58-1>\n rdf:_102\n ..\n <#T19-28-47-1>\n dc:creator\n [ a wn:Person; foaf:nick \"timbl\" ]\n dc:date\n \"2016-03-15T19:28:47Z\"\n dc:description\n \"timbl has joined &mit\"\n a foaf:chatEvent.\n\n */\n\n label: function (subject, context) {\n const kb = context.session.store\n var n = kb.each(subject, ns.wf('message')).length\n if (n > 0) return 'Chat (' + n + ')' // Show how many in hover text\n\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('Chat'))) {\n // subject is the file\n return 'Meeting chat'\n }\n if (kb.holds(undefined, ns.rdf('type'), ns.foaf('ChatChannel'), subject)) {\n // subject is the file\n return 'IRC log' // contains anything of this type\n }\n return null // Suppress pane otherwise\n },\n\n mintClass: ns.meeting('Chat'),\n\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n var updater = kb.updater\n if (newPaneOptions.me && !newPaneOptions.me.uri) {\n throw new Error('chat mintNew: Invalid userid ' + newPaneOptions.me)\n }\n\n var newInstance = (newPaneOptions.newInstance =\n newPaneOptions.newInstance ||\n kb.sym(newPaneOptions.newBase + 'index.ttl#this'))\n var newChatDoc = newInstance.doc()\n\n kb.add(newInstance, ns.rdf('type'), ns.meeting('Chat'), newChatDoc)\n kb.add(newInstance, ns.dc('title'), 'Chat', newChatDoc)\n kb.add(newInstance, ns.dc('created'), new Date(), newChatDoc)\n if (newPaneOptions.me) {\n kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc)\n }\n\n return new Promise(function (resolve, reject) {\n updater.put(\n newChatDoc,\n kb.statementsMatching(undefined, undefined, undefined, newChatDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n resolve(newPaneOptions)\n } else {\n reject(\n new Error('FAILED to save new tool at: ' + uri2 + ' : ' + message)\n )\n }\n }\n )\n })\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n var complain = function complain (message, color) {\n var pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n\n var div = dom.createElement('div')\n div.setAttribute('class', 'chatPane')\n const options = {} // Like newestFirst\n var messageStore\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('Chat'))) {\n // subject may be the file\n messageStore = subject.doc()\n } else if (kb.any(subject, UI.ns.wf('message'))) {\n messageStore = store.any(subject, UI.ns.wf('message')).doc()\n } else if (\n kb.holds(undefined, ns.rdf('type'), ns.foaf('ChatChannel'), subject) ||\n kb.holds(subject, ns.rdf('type'), ns.foaf('ChatChannel'))\n ) {\n // subject is the file\n var ircLogQuery = function () {\n var query = new $rdf.Query('IRC log entries')\n var v = []\n var vv = ['chan', 'msg', 'date', 'list', 'pred', 'creator', 'content']\n vv.map(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n })\n query.pat.add(v.chan, ns.foaf('chatEventList'), v.list) // chatEventList\n query.pat.add(v.list, v.pred, v.msg) //\n query.pat.add(v.msg, ns.dc('date'), v.date)\n query.pat.add(v.msg, ns.dc('creator'), v.creator)\n query.pat.add(v.msg, ns.dc('description'), v.content)\n return query\n }\n messageStore = subject.doc()\n options.query = ircLogQuery()\n } else {\n complain('Unknown chat type')\n }\n\n // var context = {dom, div}\n // UI.authn.logIn(context).then( context => { // The widget itself sees to login\n\n div.appendChild(UI.messageArea(dom, kb, subject, messageStore, options))\n kb.updater.addDownstreamChangeListener(messageStore, function () {\n UI.widgets.refreshTree(div)\n }) // Live update\n // })\n\n return div\n }\n}\n"],"mappings":";;;;;;;;;AAMA;;AACA;;;;;;AAPA;AACA;AACA;AACA;AACA;;AACA;AAIA,IAAMA,EAAE,GAAGC,EAAE,CAACD,EAAd;AAEO,IAAME,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xB,EAA8BV,CAAC,CAACW,GAAhC,EAR4B,CAQS;;QACrCd,KAAK,CAACU,GAAN,CAAUnC,GAAV,CAAc4B,CAAC,CAACW,GAAhB,EAAqB3E,EAAE,CAACqC,EAAH,CAAM,MAAN,CAArB,EAAoC2B,CAAC,CAACY,IAAtC;QACAf,KAAK,CAACU,GAAN,CAAUnC,GAAV,CAAc4B,CAAC,CAACW,GAAhB,EAAqB3E,EAAE,CAACqC,EAAH,CAAM,SAAN,CAArB,EAAuC2B,CAAC,CAACa,OAAzC;QACAhB,KAAK,CAACU,GAAN,CAAUnC,GAAV,CAAc4B,CAAC,CAACW,GAAhB,EAAqB3E,EAAE,CAACqC,EAAH,CAAM,aAAN,CAArB,EAA2C2B,CAAC,CAACc,OAA7C;QACA,OAAOjB,KAAP;MACD,CAbD;;MAcAH,YAAY,GAAGhD,OAAO,CAACyB,GAAR,EAAf;MACAsB,OAAO,CAACI,KAAR,GAAgBD,WAAW,EAA3B;IACD,CArBM,MAqBA;MACLX,QAAQ,CAAC,mBAAD,CAAR;IACD,CA1CiC,CA4ClC;IACA;;;IAEAK,GAAG,CAACC,WAAJ,CAAgBtD,EAAE,CAAC8E,WAAH,CAAe/B,GAAf,EAAoBpC,EAApB,EAAwBF,OAAxB,EAAiCgD,YAAjC,EAA+CD,OAA/C,CAAhB;IACA7C,EAAE,CAACe,OAAH,CAAWqD,2BAAX,CAAuCtB,YAAvC,EAAqD,YAAY;MAC/DzD,EAAE,CAACgF,OAAH,CAAWC,WAAX,CAAuB5B,GAAvB;IACD,CAFD,EAhDkC,CAkD/B;IACH;;IAEA,OAAOA,GAAP;EACD;AAjJ0B,CAAtB"}
1
+ {"version":3,"file":"shortChatPane.js","names":["ns","UI","shortChatPane","icon","icons","iconBase","name","audience","solid","label","subject","context","kb","session","store","n","each","wf","length","holds","rdf","meeting","undefined","foaf","mintClass","mintNew","newPaneOptions","updater","me","uri","Error","newInstance","sym","newBase","newChatDoc","doc","add","dc","Date","Promise","resolve","reject","put","statementsMatching","uri2","ok","message","render","dom","complain","color","pre","createElement","setAttribute","div","appendChild","createTextNode","options","messageStore","any","ircLogQuery","query","$rdf","Query","v","vv","map","x","vars","push","variable","pat","chan","list","pred","msg","date","creator","content","messageArea","addDownstreamChangeListener","widgets","refreshTree"],"sources":["../src/shortChatPane.js"],"sourcesContent":["/* Chat Pane\n **\n ** Plan is to support a finte number of chat graph shapes\n ** and investigate the interop between them.\n */\n/* global $rdf */\nimport { store } from 'solid-logic'\nimport * as UI from 'solid-ui'\n\nconst ns = UI.ns\n\nexport const shortChatPane = {\n icon: UI.icons.iconBase + 'noun_346319.svg',\n\n name: 'chat',\n\n /*\n * As part of the work on merging the existing chat views (aka panes) into one view\n * https://github.com/solid/chat-pane/issues/17\n * we want to dis-incentivize the use of Small Chat until we've gotten the work done\n * by making it difficult to create new data resources that uses the Small Chat view\n * but we still want existing resources to be viewed by the Small Chat view\n */\n audience: [ns.solid('PowerUser')],\n\n /* AN RRSAgent IRC log:\n\n <irc://localhost:6667/&mit>\n a foaf:ChatChannel\n foaf:chatEventList\n [ rdf:_100\n <#T19-10-58>\n rdf:_101\n <#T19-10-58-1>\n rdf:_102\n ..\n <#T19-28-47-1>\n dc:creator\n [ a wn:Person; foaf:nick \"timbl\" ]\n dc:date\n \"2016-03-15T19:28:47Z\"\n dc:description\n \"timbl has joined &mit\"\n a foaf:chatEvent.\n\n */\n\n label: function (subject, context) {\n const kb = context.session.store\n var n = kb.each(subject, ns.wf('message')).length\n if (n > 0) return 'Chat (' + n + ')' // Show how many in hover text\n\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('Chat'))) {\n // subject is the file\n return 'Meeting chat'\n }\n if (kb.holds(undefined, ns.rdf('type'), ns.foaf('ChatChannel'), subject)) {\n // subject is the file\n return 'IRC log' // contains anything of this type\n }\n return null // Suppress pane otherwise\n },\n\n mintClass: ns.meeting('Chat'),\n\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n var updater = kb.updater\n if (newPaneOptions.me && !newPaneOptions.me.uri) {\n throw new Error('chat mintNew: Invalid userid ' + newPaneOptions.me)\n }\n\n var newInstance = (newPaneOptions.newInstance =\n newPaneOptions.newInstance ||\n kb.sym(newPaneOptions.newBase + 'index.ttl#this'))\n var newChatDoc = newInstance.doc()\n\n kb.add(newInstance, ns.rdf('type'), ns.meeting('Chat'), newChatDoc)\n kb.add(newInstance, ns.dc('title'), 'Chat', newChatDoc)\n kb.add(newInstance, ns.dc('created'), new Date(), newChatDoc)\n if (newPaneOptions.me) {\n kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc)\n }\n\n return new Promise(function (resolve, reject) {\n updater.put(\n newChatDoc,\n kb.statementsMatching(undefined, undefined, undefined, newChatDoc),\n 'text/turtle',\n function (uri2, ok, message) {\n if (ok) {\n resolve(newPaneOptions)\n } else {\n reject(\n new Error('FAILED to save new tool at: ' + uri2 + ' : ' + message)\n )\n }\n }\n )\n })\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n var complain = function complain (message, color) {\n var pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n\n var div = dom.createElement('div')\n div.setAttribute('class', 'chatPane')\n const options = {} // Like newestFirst\n var messageStore\n if (kb.holds(subject, ns.rdf('type'), ns.meeting('Chat'))) {\n // subject may be the file\n messageStore = subject.doc()\n } else if (kb.any(subject, UI.ns.wf('message'))) {\n messageStore = store.any(subject, UI.ns.wf('message')).doc()\n } else if (\n kb.holds(undefined, ns.rdf('type'), ns.foaf('ChatChannel'), subject) ||\n kb.holds(subject, ns.rdf('type'), ns.foaf('ChatChannel'))\n ) {\n // subject is the file\n var ircLogQuery = function () {\n var query = new $rdf.Query('IRC log entries')\n var v = []\n var vv = ['chan', 'msg', 'date', 'list', 'pred', 'creator', 'content']\n vv.map(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n })\n query.pat.add(v.chan, ns.foaf('chatEventList'), v.list) // chatEventList\n query.pat.add(v.list, v.pred, v.msg) //\n query.pat.add(v.msg, ns.dc('date'), v.date)\n query.pat.add(v.msg, ns.dc('creator'), v.creator)\n query.pat.add(v.msg, ns.dc('description'), v.content)\n return query\n }\n messageStore = subject.doc()\n options.query = ircLogQuery()\n } else {\n complain('Unknown chat type')\n }\n\n // var context = {dom, div}\n // UI.authn.logIn(context).then( context => { // The widget itself sees to login\n\n div.appendChild(UI.messageArea(dom, kb, subject, messageStore, options))\n kb.updater.addDownstreamChangeListener(messageStore, function () {\n UI.widgets.refreshTree(div)\n }) // Live update\n // })\n\n return div\n }\n}\n"],"mappings":";;;;;;;AAMA;AACA;AAA8B;AAAA;AAP9B;AACA;AACA;AACA;AACA;AACA;;AAIA,IAAMA,EAAE,GAAGC,EAAE,CAACD,EAAE;AAET,IAAME,aAAa,GAAG;EAC3BC,IAAI,EAAEF,EAAE,CAACG,KAAK,CAACC,QAAQ,GAAG,iBAAiB;EAE3CC,IAAI,EAAE,MAAM;EAEZ;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,QAAQ,EAAE,CAACP,EAAE,CAACQ,KAAK,CAAC,WAAW,CAAC,CAAC;EAEjC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAIEC,KAAK,EAAE,eAAUC,OAAO,EAAEC,OAAO,EAAE;IACjC,IAAMC,EAAE,GAAGD,OAAO,CAACE,OAAO,CAACC,KAAK;IAChC,IAAIC,CAAC,GAAGH,EAAE,CAACI,IAAI,CAACN,OAAO,EAAEV,EAAE,CAACiB,EAAE,CAAC,SAAS,CAAC,CAAC,CAACC,MAAM;IACjD,IAAIH,CAAC,GAAG,CAAC,EAAE,OAAO,QAAQ,GAAGA,CAAC,GAAG,GAAG,EAAC;;IAErC,IAAIH,EAAE,CAACO,KAAK,CAACT,OAAO,EAAEV,EAAE,CAACoB,GAAG,CAAC,MAAM,CA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,OAAO,CAACqD,2BAA2B,CAACtB,YAAY,EAAE,YAAY;MAC/DzD,EAAE,CAACgF,OAAO,CAACC,WAAW,CAAC5B,GAAG,CAAC;IAC7B,CAAC,CAAC,EAAC;IACH;;IAEA,OAAOA,GAAG;EACZ;AACF,CAAC;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chat-pane",
3
- "version": "2.4.19",
3
+ "version": "2.4.20",
4
4
  "description": "Solid-compatible Panes: Chat",
5
5
  "main": "./lib/main.js",
6
6
  "files": [
@@ -45,25 +45,25 @@
45
45
  },
46
46
  "homepage": "https://github.com/solid/chat-pane",
47
47
  "dependencies": {
48
- "rdflib": "^2.2.20",
49
- "solid-logic": "^2.0.0",
50
- "solid-ui": "2.4.23"
48
+ "rdflib": "^2.2.21",
49
+ "solid-logic": "^2.0.1",
50
+ "solid-ui": "2.4.24"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/cli": "^7.18.10",
54
- "@babel/core": "^7.18.13",
55
- "@babel/preset-env": "^7.18.10",
53
+ "@babel/cli": "^7.19.3",
54
+ "@babel/core": "^7.20.2",
55
+ "@babel/preset-env": "^7.20.2",
56
56
  "@babel/preset-typescript": "^7.18.6",
57
- "babel-loader": "^8.2.5",
57
+ "babel-loader": "^8.3.0",
58
58
  "buffer": "^6.0.3",
59
- "eslint": "^8.23.0",
59
+ "eslint": "^8.27.0",
60
60
  "html-webpack-plugin": "^5.5.0",
61
61
  "husky": "^7.0.4",
62
62
  "lint-staged": "^12.5.0",
63
63
  "typescript": "^4.8.2",
64
- "webpack": "^5.74.0",
64
+ "webpack": "^5.75.0",
65
65
  "webpack-cli": "^4.10.0",
66
- "webpack-dev-server": "^4.10.1"
66
+ "webpack-dev-server": "^4.11.1"
67
67
  },
68
68
  "husky": {
69
69
  "hooks": {